Search Results

Search found 6612 results on 265 pages for 'seconds'.

Page 8/265 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • ActiveMq NMS Disconnects after about 30 seconds

    - by Kelly
    'm trying to do simple pub/sub with ActiveMq. I can get it all working fine, but the subscriber disconnects after about 30 seconds. I've looked for a timeout type of value I can change but nothing seems to be working. Here is the subscriber: using System; using Apache.NMS; using Apache.NMS.ActiveMQ; using Apache.NMS.ActiveMQ.Commands; namespace ActiveMQCatcher { internal class Program { private static void Main(string[] args) { IConnectionFactory factory = new ConnectionFactory("tcp://localhost:61616/"); using (IConnection connection = factory.CreateConnection()) { connection.ClientId = "MYID"; connection.Start(); using (ISession session = connection.CreateSession()) { IMessageConsumer consumer = session.CreateConsumer(new ActiveMQTopic("MYTOPIC"), null, false); consumer.Listener += consumer_Listener; Console.ReadLine(); } connection.Stop(); } } private static void consumer_Listener(IMessage message) { Console.WriteLine("Got: " + ((ITextMessage) message).Text); } } } I tried this: connection.RequestTimeout = TimeSpan.MaxValue; But it didn't seem to change anything. To get the problem just run the program and sit waiting for about 30 seconds. You can see the connection disappear in the ActiveMQ Console (http://localhost:8161/admin/connections.jsp by default) Any ideas?

    Read the article

  • DirectShow Filter I wrote dies after 10-24 seconds in Skype video call

    - by Robert Oschler
    I've written a DirectShow push filter for use with Skype using Delphi Pro 6 and the DSPACK DirectShow library. In preview mode, when you test a video input device in the Skype client Video Settings window, my filter works flawlessly. I can leave it up and running for many minutes without an error. However when I start a video call after 10 to 24 seconds, never longer, the video feed freezes. The call continues fine with the call duration counter clicking away the seconds, but the video feed is dead, stuck on whatever frame the freeze happened (although after a long while it turns black which I believe means Skype has given up on the filter). I tried attaching to the process from my debugger with a breakpoint literally set on every method call and none of them are hit once the freeze takes place. It's as if the thread that makes the DirectShow FillBuffer() call to my filter on behalf of Skype is dead or has been shutdown. I can't trace my filter in the debugger because during a Skype call I get weird int 1 and int 3 debugger hard interrupt calls when a Skype video call is in progress. This behavior happens even with my standard web cam input device selected and my DirectShow filter completely unregistered as a ActiveX server. I suspect it might be some "anti-debugging" code since it doesn't happen in video input preview mode. Either way, that is why I had to attach to the process after the fact to see if my FillBuffer() called was still being called and instead discovered that appears to be dead. Note, my plain vanilla USB web cam's DirectShow filter does not exhibit the freezing behavior and works fine for many minutes. There's something about my filter that Skype doesn't like. I've tried Sleep() statements of varying intervals, no Sleep statements, doing virtually nothing in the FillBuffer() call. Nothing helps. If anyone has any ideas on what might be the culprit here, I'd like to know. Thanks, Robert

    Read the article

  • Triangle numbers problem....show within 4 seconds

    - by Daredevil
    The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... Let us list the factors of the first seven triangle numbers: 1: 1 3: 1,3 6: 1,2,3,6 10: 1,2,5,10 15: 1,3,5,15 21: 1,3,7,21 28: 1,2,4,7,14,28 We can see that 28 is the first triangle number to have over five divisors. Given an integer n, display the first triangle number having at least n divisors. Sample Input: 5 Output 28 Input Constraints: 1<=n<=320 I was obviously able to do this question, but I used a naive algorithm: Get n. Find triangle numbers and check their number of factors using the mod operator. But the challenge was to show the output within 4 seconds of input. On high inputs like 190 and above it took almost 15-16 seconds. Then I tried to put the triangle numbers and their number of factors in a 2d array first and then get the input from the user and search the array. But somehow I couldn't do it: I got a lot of processor faults. Please try doing it with this method and paste the code. Or if there are any better ways, please tell me.

    Read the article

  • DWR and Spring Security - User is deauthenticated in few seconds

    - by Vojtech
    I am trying to implement user authentication via DWR as follows: public class PublicRemote { @Autowired @Qualifier("authenticationManager") private AuthenticationManager authenticationManager; public Map<String, Object> userLogin(String username, String password, boolean stay) { Map<String, Object> map = new HashMap<>(); UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(username, password); try { Authentication authentication = authenticationManager.authenticate(authRequest); SecurityContextHolder.getContext().setAuthentication(authentication); map.put("success", "true"); } catch (Exception e) { map.put("success", "false"); } return map; } public Map<String, Object> getUserState() { Map<String, Object> map = new HashMap<>(); Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); boolean authenticated = authentication != null && authentication.isAuthenticated(); map.put("authenticated", authenticated); if (authenticated) { map.put("authorities", authentication.getAuthorities()); } return map; } } The authentication works correctly and by calling getUserState() I can see that the user is successfully logged in. The problem is that this state will stay only for few seconds. In probably 5 seconds, the getAuthentication() starts returning null. Is there some problem with session in DWR or is it some misconfiguration of Spring Security?

    Read the article

  • Zend, slow load, "waiting for response" for 20-80 seconds on local site

    - by Tony C.
    So I have several sites running under the same zend setup. All of the sites run pretty normally except one. Upon loading or reloading this one site, reguardless of which page your on (excluding the 404 page explanation later...) you get a serious pause before any content begins to download. Using firebugs net panel you can see that the first request which is www.(siteaddress).com.local you see a "waiting for response" bar (purple) that is going for anywhere from 20 to sometimes 80+ seconds and this isn't on a dev site, this is on a local site under localhost. What I've managed to figure out so far is that all the pages do this except my 404 page. The reason the 404 page doesn't succumb to this is because it uses a seperate controller (the error controller) and therefore bypasses much of the controller and functions the other parts of the site use. Using exit statements I've manged to figure out that the problem happens somewhere between my post dispatch and my main (top most) controllers Init function. If i exit in the main controllers init the page loads (then exits instantly, no wait). If i do the same in the pre or post dispatch the page waits the 20-80 seconds then exits. Is there a diagram or explanation somewhere or a way for me to find out what events fire inbetween the post dispatch and the main controllers init function? Or does anyone have any clue what might cause this? Any help would be greatly appreciated...

    Read the article

  • how to execute any function in jquery after few seconds on the click of any link

    - by james Bond
    I have struts2 jquery grid where on click of a row I am calling a jQuery function for performating a struts2 action. My code is running fine. I want to perform my jQuery function after delay of a few seconds. How can I do this? <script type="text/javascript"> //assume this code is working fine on rowselect from my jquery grid, New Updation in it is "i want to execute or load the url after few seconds" $(function(){ $.subscribe('rowselect', function(event,data) { var param = (event.originalEvent.id); $("#myAdvanceDivBoxx").load('<s:url action='InsertbooksToSession' namespace='/admin/setups/secure/jspHomepage/bookstransaction'/>'+"?bid="+event.originalEvent.id); }); }); </script> What i tried is the below code but am unable to get the output which i am looking for: <script type="text/javascript"> $(function(){ $.subscribe('rowselect', function(event,data) { var param = (event.originalEvent.id); $("#myAdvanceDivBoxx").load('<s:url action='InsertbooksToSession' namespace='/admin/setups/secure/jspHomepage/bookstransaction'/>'+"?bid="+event.originalEvent.id); }).delay(9000); }); </script>

    Read the article

  • show a new view after x seconds?

    - by user301496
    hey all, i'm quite new to objective c and i have this problem. i'm animating an image an show this in a imageview. after 15 seconds i want to show another view, thought of a "flying in view from the bottom". any hints fpr me how i could manage that? thanx in advance marcus

    Read the article

  • JQuery remove .append after 5 seconds

    - by RussP
    Oh gosh here a lot today - oops Folks, best way to do this: $j('.done').append('Your services have been updated'); (that bits done) but then remove the append after say 5 seconds so that if a person resubmits a form(allowed) the append does not continue adding the text? i.e updated once "Your services have been updated", twice would read "Your services have been updated Your services have been updated" but I would only want Your services have been updated to show once

    Read the article

  • Using Time datatype in MySQL without seconds

    - by Alex
    I'm trying to store a 12/24hr (ie; 00:00) clock time in a MySQL database. At the moment I am using the time datatype. This works ok but it insists on adding the seconds to the column. So you enter 09:20 and it is stored as 09:20:00. Is there any way I can limit it in MySQL to just 00:00?

    Read the article

  • it takes 2 seconds to compile a hello world C++ project in netbeans (windows)

    - by Ethan
    I used code:blocks as the C++ IDE on Windows. I switched to netbeans 6.8 (with C/C++ plugin, MinGW, MSYS) recently, because netbeas have the nice feature of "checking syntax errors when typing" (same as working on Java or PHP projects). But the painful thing is that, it takes 2 seconds to compile a simple hello world project in netbeans. Any trick to make it as fast as code:blocks, or at least make the compiling time no more than 0.5 second?

    Read the article

  • Rails view - user enters minutes, we save seconds?

    - by sscirrus
    Hi everyone, I have a simple text_field in my form where a user enters a time in minutes, i.e. 60. How can I multiply that number by 60 before saving the form, such that the database stores the number in seconds? Then, how do I reverse that and show the field in minutes on another view? Thank you!

    Read the article

  • Why mysql 5.5 slower than 5.1 (linux,using mysqlslap)

    - by Zenofo
    my.cnf (5.5 and 5.1 is the same) : back_log=200 max_connections=512 max_connect_errors=999999 key_buffer=512M max_allowed_packet=8M table_cache=512 sort_buffer=8M read_buffer_size=8M thread_cache=8 thread_concurrency=4 myisam_sort_buffer_size=128M interactive_timeout=28800 wait_timeout=7200 mysql 5.5: ..mysql5.5/bin/mysqlslap -a --concurrency=10 --number-of-queries 5000 --iterations=5 -S /tmp/mysql_5.5.sock --engine=innodb Benchmark Running for engine innodb Average number of seconds to run all queries: 15.156 seconds Minimum number of seconds to run all queries: 15.031 seconds Maximum number of seconds to run all queries: 15.296 seconds Number of clients running queries: 10 Average number of queries per client: 500 mysql5.1: ..mysql5.5/bin/mysqlslap -a --concurrency=10 --number-of-queries 5000 --iterations=5 -S /tmp/mysql_5.1.sock --engine=innodb Benchmark Running for engine innodb Average number of seconds to run all queries: 13.252 seconds Minimum number of seconds to run all queries: 13.019 seconds Maximum number of seconds to run all queries: 13.480 seconds Number of clients running queries: 10 Average number of queries per client: 500 Why mysql 5.5 slower than 5.1 ? BTW:I'm tried mysql5.5/bin/mysqlslap and mysql5.1/bin/mysqlslap,result is the same

    Read the article

  • C# unaccurate timer?

    - by Ivan
    Hi there, I'm developing an application and I need to get the current date from a server (it differs from the machine's date). I receive the date from the server and with a simple Split I create a new DateTime: globalVars.fec = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, int.Parse(infoHour[0]), int.Parse(infoHour[1]), int.Parse(infoHour[2])); globalVars is a class and fec is a public static variable so that I can access it anywhere in the application (bad coding I know...). Now I need to have a timer checking if that date is equal to some dates I have stored in a List and if it is equal I just call a function. List<DateTime> fechas = new List<DateTime>(); Before having to obtain the date from a server I was using computer's date, so to check if the dates matched I was using this: private void timerDatesMatch_Tick(object sender, EventArgs e) { DateTime tick = DateTime.Now; foreach (DateTime dt in fechas) { if (dt == tick) { //blahblah } } } Now I have the date from the server so DateTime.Now can't be used here. Instead I have created a new timer with Interval=1000 and on tick I'm adding 1 second to globalVars.fec using: globalVars.fec = globalVars.fec.AddSeconds(1); But the clock isn't accurate and every 30 mins the clock loses about 30 seconds. Is there another way of doing what I'm trying to do? I've thought about using threading.timer instead but I need to have access to other threads and non-static functions. Thanks in advance, Ivan

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >