Search Results

Search found 8557 results on 343 pages for 'infinite loop'.

Page 15/343 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Replace Infinite loop in Flex

    - by H P
    Hello, I want to access a webservice:getMonitorData() , on creationcomplete and returns an array, in an infinite loop so that the getIndex0.text is updated each time. Flex is not able to handle an infinite loop and gives a timeout error 1502. If I run the for loop until i<2000 or so it works fine. How can replace the loop so that my webservice is accessed continiously and the result is shown in getIndex0.text. This is how my application looks like: <?xml version="1.0" encoding="utf-8"?> <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300" xmlns:plcservicebean="server.services.plcservicebean.*" creationComplete="clientMonitor1()"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.rpc.CallResponder; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; [Bindable] public var dbl0:Number; //-----------Infinite Loop, Works fine if condition = i<2000------------------------ public function clientMonitor1():void{ for(var i:int = 0; ; i++){ clientMonitor(); } } public function clientMonitor():void{ var callResp:CallResponder = new CallResponder(); callResp.addEventListener(ResultEvent.RESULT, monitorResult); callResp.addEventListener(FaultEvent.FAULT, monitorFault); callResp.token = plcServiceBean.getMonitorData(); } public function monitorResult(event:ResultEvent):void{ var arr:ArrayCollection = event.result as ArrayCollection; dbl0 = arr[0].value as Number; } protected function monitorFault(event:FaultEvent):void{ Alert.show(event.fault.faultString, "Error while monitoring Data "); } ]]> </fx:Script> <fx:Declarations> <plcservicebean:PlcServiceBean id = "plcServiceBean" showBusyCursor="true" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" /> </fx:Declarations> <mx:Form x="52" y="97" label="Double"> <mx:FormItem label = "getMonitorValue"> <s:TextInput id = "getIndex0" text = "{dbl0}"/> </mx:FormItem> </mx:Form> </s:Group>

    Read the article

  • how to print numbers using for loop in java?

    - by Balkrushn Viroja
    I have one text box in which I take the value of how many number do you want to print. Now My question is that how can I use for loop so that the number which I want to print is equal to the number that I got from textbox.One more thing is that i want to print only three numbers in one line. i.e. If I got 14 in my text box the result will look like below. 1 2 3 4 5 6 7 8 9 10 11 12 13 14

    Read the article

  • Login crash loop

    - by dawmail333
    After about the second/third batch of updates on a fresh install of Ubuntu 12.04, I end up getting stuck in an infinite login loop: I enter my password, screen goes black and shows me the end of the initialisation messages (including things like CUPS initialising), and then the greeter reappears. Kicker is, as I'm using gnome-shell, I just decided to uninstall LightDM, ubuntu-desktop and unity-greeter, using GDM as my manager, and the problem still happens in exactly the same manner. I'm lost even as to where to start looking - Xorg logs, LightDM logs (before I removed it), syslog and dmesg logs have held no unusual information at all. I have a TeX assignment due next week, and reinstalling Ubuntu every time I want to work on it is not going to work (nor is using TeX on Windows ;). Anything else I should try?

    Read the article

  • infinite loop shutting down ensime

    - by Jeff Bowman
    When I run M-X ensime-disconnect I get the following forever: string matching regex `\"((?:[^\"\\]|\\.)*)\"' expected but `^@' found and I see this exception when I use C-c C-c Uncaught exception in com.ensime.server.SocketHandler@769aba32 java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) at java.net.SocketOutputStream.write(SocketOutputStream.java:153) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:220) at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:290) at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:294) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:140) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) at java.io.BufferedWriter.flush(BufferedWriter.java:253) at com.ensime.server.SocketHandler.write(server.scala:118) at com.ensime.server.SocketHandler$$anonfun$act$1$$anonfun$apply$mcV$sp$1.apply(server.scala:132) at com.ensime.server.SocketHandler$$anonfun$act$1$$anonfun$apply$mcV$sp$1.apply(server.scala:127) at scala.actors.Actor$class.receive(Actor.scala:456) at com.ensime.server.SocketHandler.receive(server.scala:67) at com.ensime.server.SocketHandler$$anonfun$act$1.apply$mcV$sp(server.scala:127) at com.ensime.server.SocketHandler$$anonfun$act$1.apply(server.scala:127) at com.ensime.server.SocketHandler$$anonfun$act$1.apply(server.scala:127) at scala.actors.Reactor$class.seq(Reactor.scala:262) at com.ensime.server.SocketHandler.seq(server.scala:67) at scala.actors.Reactor$$anon$3.andThen(Reactor.scala:240) at scala.actors.Combinators$class.loop(Combinators.scala:26) at com.ensime.server.SocketHandler.loop(server.scala:67) at scala.actors.Combinators$$anonfun$loop$1.apply(Combinators.scala:26) at scala.actors.Combinators$$anonfun$loop$1.apply(Combinators.scala:26) at scala.actors.Reactor$$anonfun$seq$1$$anonfun$apply$1.apply(Reactor.scala:259) at scala.actors.ReactorTask.run(ReactorTask.scala:36) at scala.actors.ReactorTask.compute(ReactorTask.scala:74) at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:147) at scala.concurrent.forkjoin.ForkJoinTask.quietlyExec(ForkJoinTask.java:422) at scala.concurrent.forkjoin.ForkJoinWorkerThread.mainLoop(ForkJoinWorkerThread.java:340) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:325) Is there something else I'm missing in my config or I should check on? Thanks, Jeff

    Read the article

  • How do I limit the game loop?

    - by user1758938
    How do I make a game update at a consistent speed? For example, this would loop too fast: while(true) { GetInput(); Render(); } This just wont work (hard to explain): while(true) { GetInput(); Render(); Sleep(16); } How do I sync my game to a certain framerate and still have input and functions going at a consistent rate?

    Read the article

  • Ubuntu 12.10 stucks in a Login Loop

    - by Calvin Wahlers
    My problem: As you can guess my Ubuntu 12.10 stucks in a login loop when trying to enter my desktop. Means the screen gets black and soon after that the login screen comes back. I'm a Ubuntu Newbie so if there's any answer please explain in a simply understandable language :) I've already read that the problem might be caused by an error depending on the graphics, so I post my graphics to: My graphics: ATI Radeon 7670M Hope you can help me, thank you ;)

    Read the article

  • Limit The Game Loop?

    - by user1758938
    How do I make a game go at the same speed? You probly dont understand that so here are examples: This Would Loop Too Fast while(true) { GetInput(); Render(); } This Just Wont Work, Hard To Exlplain while(true) { GetInput(); Render(); Sleep(16); } Basicly How Do I Sync It To Any FrameRate And Still Have To Input And Funtions Going At The Same Rate?

    Read the article

  • Unhandled event loop exception "Unknown Mozilla path" with Eclipse 3.7.1

    - by r.bitter
    I installed the Tizen SDK 2.0 which uses Eclipse 3.7.1 as an IDE on Ubuntu 12.10 64bit. When trying to create a Tizen Web Project I got the following error message from Eclipse: Unhandled event loop exception No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)] The problem is that Eclipse is configured to use Xulrunner as a headless browser inside the IDE. Xulrunner is not in the repositories for Ubuntu 12.10 any more, therefore Eclipse is not able to find the libraries.

    Read the article

  • ubuntu stuck in a login loop after editing profile file

    - by varunit
    I'm stuck in a login loop now. What I did was edited /etc/profile as root and added the following line export PATH = /opt/my jdk 7 path/bin:$PATH After logging out and tried to login, I cannot I have tried booting in recovery mode, entered root prompt and tried to edit the file in vi but it always opens in read only mode and hence cannot be saved. I just need a way to delete that line and boot into ubuntu again. Please help me out guys..

    Read the article

  • how to execute for loop with sed in terminal

    - by vipin8169
    I want to execute the for loop with sed command, and is getting an error for the same for i in <comma-separated server name list>;do "command";echo $i;done where command=sed '/^$/d' /home/nextag/instance.properties|grep -vc '#' I'm getting the following error :- -bash: sed "/^$/d" /home/nextag/instance.properties|grep -vc#: No such file or directory lu1 What is the correct way to execute this command to get the perfect output I tried this as well for i in lu1;do 'sed \'/^$/d\' /home/nextag/instance.properties|grep -vc \'#\'';echo $i;done Also, can some explain the part '/^$/d'in sed '/^$/d' /home/nextag/instance.properties|grep -vc '#'

    Read the article

  • unable to boot and boot-loop on splash screen

    - by Joel St Martin
    hey i have tried to install ubuntu many times, but once it installs it boot-loops at the splash screen. it just loops through the boot sound and the screen not sure why. nothing has seemed to work. also its only alowing me to boot windows all other oporating systems crash and loop just like ubuntu (android x86, linux mint, red hat, ubuntustudio). compac amd 64 3400+ 1gig ram 2 hhd (200 gig/120 gig) 1 ssd (500gig) win7 x86 a video showing what happens

    Read the article

  • Delay command execution over sockets

    - by David
    I've been trying to fix the game loop in a real time (tick delay) MUD. I realized using Thread.Sleep would seem clunky when the user spammed commands through their choice of client (Zmud, etc) e.g. east;south;southwest would wait three move ticks and then output everything from the past couple rooms. The game loop basically calls a Flush and Fill method for each socket during each tick (50ms) private void DoLoop() { Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); while (running) { // for each socket, flush and fill ConnectionMonitor.Update(); stopWatch.Stop(); WaitIfNeeded(stopWatch.ElapsedMilliseconds); stopWatch.Reset(); } } The Fill method fires the command events, but as mentioned before, they currently block using Thread.Sleep. I tried adding a "ready" flag to the state object that attempts to execute the command along with a queue of spammed commands, but it ends up executing one command and queuing up the rest i.e. each subsequent command executes something that got queued up that should've been executed before. I must be missing something about the timer. private readonly Queue<SpammedCommand> queuedCommands = new Queue<SpammedCommand>(); private bool ready = true; private void TryExecuteCommand(string input) { var commandContext = CommandContext.Create(input); var player = Server.Current.Database.Get<Player>(Session.Player.Key); var commandInfo = Server.Current.CommandLookup .FindCommand(commandContext.CommandName, player.IsAdmin); if (commandInfo != null) { if (!ready) { // queue command queuedCommands.Enqueue(new SpammedCommand() { Context = commandContext, Info = commandInfo }); return; } if (queuedCommands.Count > 0) { // queue the incoming command queuedCommands.Enqueue(new SpammedCommand() { Context = commandContext, Info = commandInfo, }); // dequeue and execute var command = queuedCommands.Dequeue(); command.Info.Command.Execute(Session, command.Context); setTimeout(command.Info.TickLength); return; } commandInfo.Command.Execute(Session, commandContext); setTimeout(commandInfo.TickLength); } else { Session.WriteLine("Command not recognized"); } } Finally, setTimeout was supposed to set the execution delay (TickLength) for that command, and makeReady just sets the ready flag on the state object to true. private void setTimeout(TickDelay tickDelay) { ready = false; var t = new System.Timers.Timer() { Interval = (long) tickDelay, AutoReset = false, }; t.Elapsed += makeReady; t.Start(); // fire this in tickDelay ms } // MAKE READYYYYY!!!! private void makeReady(object sender, System.Timers.ElapsedEventArgs e) { ready = true; } Am I missing something about the System.Timers.Timer created in setTimeout? How can I execute (and output) spammed commands per TickLength without using Thread.Sleep?

    Read the article

  • Basic Android game loop having issues

    - by WillDaBeast509
    I've set up a very basic game loop that should draw a circle, run 100 times, then draw another. I also have a text field that should display how many times the loop has ran. However, the screen seems to not update. It displays a different value for the tick count (different each time the app is ran) and simply stays there. After exiting the app, I get an error saying "Unfortunately, MyApp has stopped." Here is the relevant code: DrawView public class DrawView extends SurfaceView implements SurfaceHolder.Callback { Paint p = new Paint(); MainThread thread; private int y=0; public DrawView(Context c) { super(c); thread = new MainThread(this, getHolder()); thread.running = true; getHolder().addCallback(this); setFocusable(true); } public void draw(Canvas c) { if(c==null) return; //super.onDraw(c); c.drawColor(Color.WHITE); p.setColor(Color.RED); p.setTextSize(32); p.setTypeface(Typeface.SANS_SERIF); c.drawCircle(getWidth()/2-100,getHeight()/2, 50, p); c.drawText("y = " + y, 50, 50, p); if(y>=100) { Log.i("DRAW", "drawing circle"); c.drawCircle(getWidth()/2+100,getHeight()/2, 50, p); } else y++; Log.i("INFO", "y = " + y); } @Override public boolean onTouchEvent(MotionEvent event) { return true; } public void onDraw(Canvas c){} public void surfaceCreated(SurfaceHolder p1) { thread.start(); } public void surfaceChanged(SurfaceHolder p1, int p2, int p3, int p4) { // TODO: Implement this method } public void surfaceDestroyed(SurfaceHolder p1) { thread.running = false; boolean retry = true; while (retry) { try { thread.join(); retry = false; } catch (InterruptedException e) { Log.i("EX", "cathing exception"); } } } } MainThread public class MainThread extends Thread { private DrawView page; private SurfaceHolder holder; public boolean running; public MainThread(DrawView p, SurfaceHolder h) { super(); page = p; holder = h; } @Override public void run() { while(running) { Canvas c = holder.lockCanvas(); page.draw(c); holder.unlockCanvasAndPost(c); } } } Here is an example log outupt: http://pastebin.com/tM9dUPuk It counts the number of ticks correctly and should draw the second circle, but the screen looks like its not updating. After closing the app, the log continues to run and keep outputting "y = 100 drawing circle" until it crashes and shows the error report. What is going on and how can I fix these two problems?

    Read the article

  • jQuery Star Rating plugin - select in callback causes infinite loop

    - by Ian
    Using the jQuery Star Rating plugin everything works well until I select a star rating from the rating's callback handler. Simple example: $('.rating').rating({ ... callback: function(value){ $.ajax({ type: "POST", url: ... data: {rating: value}, success: function(data){ $('.rating').rating('select', 1); } }); } }); I'm guessing this infinite loop occurs because the callback is fired after a manual 'select' as well. Once a user submits their rating I'd like to 'select' the average rating across all users (this value is in data returned to the success handler). How can I do this without triggering an infinite loop?

    Read the article

  • Tooltips with infinite timeout?

    - by romkyns
    I'm thinking of setting the timeout on all my tooltips in a WinForms application to infinity (or an extremely large value). The motivation is that it's annoying for the user if the tooltip disappears while I'm still reading it, without providing any extra value whatsoever as far as I can tell. Normally I wouldn't ask something like this on StackOverflow, but the overwhelming majority of all software sets timeouts on tooltips, so it makes me wonder whether perhaps there is some important consideration I'm missing? Or is this just an old convention that nobody gives further thought to? If you would hate infinite timeout as opposed to a short timeout, please explain why. (If you just think tooltips are a bad idea altogether then that's a separate consideration; this question is specifically about the infinite timeout.)

    Read the article

  • How do I make this loop all children recursively?

    - by Matrym
    I have the following: for (var i = 0; i < children.length; i++){ if(hasClass(children[i], "lbExclude")){ children[i].parentNode.removeChild(children[i]); } }; I would like it to loop through all children's children, etc (not just the top level). I found this line, which seems to do that: for(var m = n.firstChild; m != null; m = m.nextSibling) { But I'm unclear on how I refer to the current child if I make that switch? I would no longer have i to clarify the index position of the child. Any suggestions? Thanks!

    Read the article

  • How to run a loop of queries in access?

    - by tksy
    Hi I have a database with a table which is full of conditions and error messages for checking another database. I want to run a loop such that each of these conditions is checked against all the tables in the second database and generae a report which gives the errors. Is this possible in ms access. For example, querycrit table id query error 1 speed<25 and speed>56 speed above limit 2 dist<56 or dist >78 dist within limit I have more than 400 queries like this of different variables. THe table against which I am running the queries is records table id speed dist accce decele aaa bbb ccc 1 33 34 44 33 33 33 33 2 45 44 55 55 55 22 23 regards ttk

    Read the article

  • VB.NET For Each steps into loop body for an IEnumerable collection! How? Why?

    - by Paul Sasik
    This is weird. I have a class that inherits from IEnumrable whose Count property is reporting 0 (zero) elements but the For Each loop steps into the loop body and tries to use the variable where it should just be moving on. My code: On Error Resume Next Dim d As Foo For Each d In fooCollection ' use d and throws an exception Next d Weirder still, every time d is accessed i get an exception thrown in the output window: A first chance exception of type 'System.NullReferenceException' but i'm not stopping on the exception (not in a try/catch block). Is "On Error Resume Next" causing this weirdness? Weirdness found: Per Rowland's and JohnH's comments i checked the Foo class: The GetEnumerator method inside of Foo didn't actually return anything! It had an empty body. That coupled with the On Error Resume Next before the loop caused the havoc! Wow this was ugly. Thanks for the clues guys!

    Read the article

  • How to get the previous value from incrementing variable in for loop?

    - by Parth
    In My last post I asked : How to create dynamic incrementing variable using "for" loop in php? like wise: $track_1,$track_2,$track_3,$track_4..... so on.... whose answer I selected as for($i = 0; $i < 10; $i++) { $name = "track_$i"; $$name = 'hello'; } and for($i = 0; $i < 10; $i++) { ${'track_' . $i} = 'val' } Now, What If I need the Value of variable previous than the current variable?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >