Top "Infinite-loop" questions

An "infinite loop" is a loop in which the exit criteria are never satisfied; such a loop would perform a potentially infinite number of iterations of the loop body.

How to handle infinite loop caused by invalid input (InputMismatchException) using Scanner

So, I'm getting stuck with this piece of code: import java.util.InputMismatchException; import java.util.Scanner; public class ConsoleReader { …

java java.util.scanner infinite-loop
Php for loop with 2 variables?

is it possible to do this? (here is my code) for ($i = 0 ; $i <= 10 ; $i++){ for ($j = 10 ; $j >= 0 ; $j--){ …

php for-loop infinite-loop
What's the difference between "while 1" and "while True"?

I've seen two ways to create an infinite loop in Python: while 1: do_something() while True: do_something() Is there …

python while-loop infinite-loop
Running a BackgroundWorker continuously

I need to be able to continuously run my BackgroundWorker. The DoWork event contains a pool threaded process and the …

c# multithreading winforms backgroundworker infinite-loop
How do I run long term (infinite) Python processes?

I've recently started experimenting with using Python for web development. So far I've had some success using Apache with mod_…

python apache daemon infinite-loop
Cancel infinite loop execution in jsfiddle

When you get an infinite loop in jsfiddle in Chrome, your only choice (that I know of) is to close …

javascript google-chrome infinite-loop jsfiddle
C++ cin keypress event

I believe this is a very simple question, but I can't find a simple answer to it. I have an …

c++ keypress infinite-loop break onkeypress
Why do I get an infinite loop if I enter a letter rather than a number?

I am writing this code for a homework assignment (just starting C++ so please go easy). We've just started while, …

c++ infinite-loop
C exit from infinite loop on keypress

How can I exit from an infinite loop, when a key is pressed? Currently I'm using getch, but it will …

c infinite-loop getch
Infinite loop with cin when typing string while a number is expected

In the following loop, if we type characters as the cin input instead of numbers which are expected, then it …

c++ validation infinite-loop cin