infinite-loop

Problems breaking an .htaccess redirect out of an infinite loop

So I have asked for help over at my weblog, scoured the internet, and pored over the examples you all have provided on here before, and I still cannot find an answer that works. Simply put, I am trying to take all traffic referred to my site from Site A, and redirect it all to Page B within my domain. I have gotten the redirect to wo...

Python Script Hangs, Potentially an Infinite Loop?

Once again working on Project Euler, this time my script just hangs there. I'm pretty sure I'm letting it run for long enough, and my hand-trace (as my father calls it) yields no issues. Where am I going wrong? I'm only including the relevant portion of the code, for once. def main(): f, n = 0, 20 while f != 20: f = 0 ...

trace infinite loop redirection in apache

I have a PHP script causing a infinite redirection loop and i don't know how to detect it. is there any way to detect this? can i add any command to my .htaccess to write redirections into a log? thanks in advance, ...

use of infinate loop to create auto-update program

Solved: You guys are the best! I took al the content of goyouidiot_Click and made it into a method called displayResult, and then: private void t1_TextChanged(object sender, EventArgs e) { displayResult(); } How didn't i thought of that before? lol, thx here is original messege: No lone ago i built a little...

PHP creating a while loop that is dependent on multiple variables that are independent of one another?

I'm stumped on this and my searches aren't turning up anything relevant.. I need to do a while loop that will continue if either of 2 variables are true... as far as I can tell you can't do a "while ($var = '' and $var2 = ''); so I tried this, basically I figured I could just set 2 different if statements so that it would change the vari...

How do I use less CPU with loops?

Hi, I've got a loop that looks like this: while (elapsedTime < refreshRate) { timer.stopTimer(); elapsedTime=timer.getElapsedTime(); } I read something similar to this elsewhere (http://stackoverflow.com/questions/1222574/c-main-loop-without-100-cpu), but this loop is running a high resolution timer that must be accurate. So ...

mono-service2 loops on exit running on mac osx 10.5

I have a C# service that needs to run on Windows and Mac. I created a separate project for the mac accessing the common code to handle any differences, and it sets a define for the code to use. I then copy the Visual Studio compiled .exe to the mac machine. The service runs OK, except that when I kill the process the iMac CPU goes to ...

Infinite recursion in jQuery plugin subfunction

I wrote the following jQuery plugin: (function($){ $.fn.imageSlide = function(options){ $(this).imageSlide.nextSlide(); console.log("imageslide"); }; $.fn.imageSlide.nextSlide = function(){ console.log("nextslide"); $this = $(this); }; })(jQuery); Some background: I want an image slider plugi...

VB.NET - Custom Serialization and Circular References, is there a clean solution?

I'm implementing some custom serialization (to byte array), and have run into a problem handling circular references. Example: Class A public MyBs as new List(of B) end class class B public MyParent as A public MiscInt1 as integer public MiscInt2 as integer end class When serializing A, I must serialize each instance of B....

What is the most appropriate sentinel method?

What is the most appropriate sentinel method? This breaks out of an infinite loop: infinite loop read in a value; if (value == Sentinel) then exit; process the value; This uses duplicate code: read in a value; while (value != Sentinel) process the value; read in a value; This uses a boolean variable i...

killing an infinite loop in java

I am using a third-party library to process a large number of data sets. The process very occasionally goes into an infinite loop (or is blocked - don't know why and can't get into the code). I'd like to kill this after a set time and continue to the next case. A simple example is: for (Object data : dataList) { Object result = Thei...

Ruby on Rails: Avoiding infinite loop when calling .save during an update

I have an order model that has_many :items. Each item has item.price for the cost of said item. I want to add up all of the item prices in the order for a order.total_price. Right now I'm doing that with after_save :update_total_price, :if => "self.saved.nil? " def update_total_price self.total_price = Item.find(item_ids).inject...

Multiple Jcarousel error "jCarousel: No width/height set for items..."

Link: http://misiur.com/teatr Error code: "jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..." I had one carousel - no error. Then I added new - this error. Build same as first one. Simple HTML: ul with children li > a > img I don't have any idea why is it happening. I've tried to add dimensions wit...

If you import yourself in Python, why don't you get an infinite loop?

This question is a response to the following SO post: http://stackoverflow.com/questions/3558718/how-do-i-pickle-an-object/3558783#3558783 In that thread, the OP accidentally imports his own module at the top of the same module. Why doesn't this cause an infinite loop? ...

When running user inputed Javascript, is there a way to detect and stop "problem" scripts?

On a page, something like jsFiddle, that executes user inputed Javascript, is there a way to stop / disrupt "problem" scripts running in an iframe? The major class of problem scripts would be infinite loops, I think. Browsers deal with multiple alerts quite well, but a script like, ​for (var i = 0; ++i; i < 100) { /* do stuff */ }​​​​​​...

Stream makes function run forever

Hi, What kind of stream can cause to function run forever ? Is such stream exist ? ...

Infinite loop when Json serializing a Collection (VB ASP.NET)

I am trying to use a Web Service to return Json for a Collection of Users from a Database Table. I'm only new to .NET (< 1 week experience), and I don't want to use the UpdatePanel for AJAX. I have tried using the JavaScriptSerializer as well as Json.NET to serialize. Both cases seem to spawn an Infinite Loop. What am I doing wrong? Is ...

while(true) versus for(;;)

Possible Duplicates: Is for(;;) faster than while (TRUE)? If not, why do people use it? for ( ; ; ) or while ( true ) - Which is the Correct C# Infinite Loop? Is there any appreciable difference between while(true) (or while(1)) and for(;;)? Would there be any reason to choose one over the other? ...

How c++ assert() can create an infinite loop?

Robot judges suck! I've been accepted by UVA, only after removing the following chunks of code: cin >> ntc; /* extract newline from previous read */ char dummy(0); cin.get(dummy); assert( '\n'==dummy ); /* newline extract completes */ Replacing it with : cin >> ntc; getline( cin, inputN ); /* extract remaining '\n' */ Before replac...

Why does this go into an infinite loop?

Okay, so I'm trying to create a list of he folders, and sub-folders and their files, but right now it doesn't print anything, and seems to be going into an infinite loop. Any idea why? //infinate loop start for(int j = 0; j < (int) dirs[i].folders.size(); j++){ dirs.push_back(Directory(dirs[i].folders[j])); ...