infinite-loop Questions

2

It's said that infinite loop for(;;); is undefined behavior. From http://en.cppreference.com/w/cpp/language/memory_model In a valid C++ program, every thread eventually does one of the follo...
Deterioration asked 25/12, 2016 at 11:26

0

I have a spring boot application that runs indefinitely as a service, cycling through its tasks every x seconds. This cycle time comes from a configuration file and can change at runtime. I used a ...
Mayer asked 22/9, 2021 at 9:34

18

Solved

I have an EditText field with a Customer Text Watcher on it. In a piece of code I need to change the value in the EditText which I do using .setText("whatever"). The problem is as soon as I make t...
Chambliss asked 21/2, 2012 at 21:0

3

Solved

Rust contains loop, which is specially designed for infinite looping: Using the keyword loop, Rust provides a way to loop indefinitely until some terminating statement is reached (like program ...
Grimonia asked 11/9, 2016 at 18:3

2

THE PROBLEM I have a problem using OpenID Connect 3 to provide authorisation for a website I am developing. The problem goes like this: I visit a protected page and am redirected to the Identit...

1

Solved

I am making an api call from useEffect hook function ChangePassword(props) { const token = props.match.params.token; const [state, setState] = useState({ password: "", confirmPasswor...
Crumple asked 26/6, 2021 at 7:19

2

Solved

In java we can write infinite loop using both while and for for(;;){ // doesn't stop[infinite loop] } and using while while(true){ // doesn't stop[infinite loop] } the syntax for kotlin's whi...
Deneendenegation asked 12/12, 2020 at 15:36

5

Solved

I have a Thread that only has to work when a certain circumstance comes in. Otherwise it just iterates over an empty infinite loop: public void run() { while(true) { if(ball != null) { // do so...
Recurvate asked 13/6, 2015 at 21:8

8

Solved

I need to run my Python program forever in an infinite loop.. Currently I am running it like this - #!/usr/bin/python import time # some python code that I want # to keep on running #...
Tribrach asked 24/11, 2013 at 2:4

4

What I want: I have been trying to implement two directional Endless viewpager in Android, Left to Right & Right to Left What I did: I have implemented Endless viewpager adapter, it works f...
Coriander asked 29/3, 2016 at 5:16

8

Solved

I want to type a multiple line text into the console using a BufferedReader and when I hit "Enter" to find the sum of the length of the whole text. The problem is that it seems I'm getting into an ...

6

Solved

I currently have code that basically runs an infinite while loop to collect data from users. Constantly updating dictionaries/lists based on the contents of a text file. For reference: while (True...
Milden asked 25/9, 2013 at 1:51

21

Solved

for (;;) { //Something to be done repeatedly } I have seen this sort of thing used a lot, but I think it is rather strange... Wouldn't it be much clearer to say while(true), or something along t...
Rhinestone asked 9/4, 2010 at 22:4

3

Solved

OneToMany relationship causing infinite loop using Spring Data JPA with hibernate as provider The problem here is not the type of exception but the infinite loop that causes this exception I tr...
Georgeanngeorgeanna asked 22/2, 2018 at 15:56

4

Solved

I have the following code: ignore_user_abort(true); while(!connection_aborted()) { // do stuff } and according to the PHP documentation, this should run until the connection is closed, but for ...
Colorless asked 17/6, 2011 at 4:16

2

Solved

I'm experimenting with Jupyter Widgets to see if I can make a better version of this, but apparently the observe handler triggers even when the change is not from the user, so it creates an infinit...
Reorganize asked 19/12, 2020 at 4:28

6

Solved

Let's say I have an object that provides some sort of functionality in an infinite loop. Is is acceptable to just put the infinite loop in the constructor? Example: class Server { public: Server(...
Symphonize asked 7/11, 2020 at 11:27

3

Solved

I want to build a headless application which will query the DB in infinite loop and perform some operations in certain conditions (e.g. fetch records with specific values and when found launch e-ma...
Riddell asked 11/4, 2016 at 6:59

2

Solved

The following code runs into an infinite loop: class SubCommandMap: def __init__(self): self._command = dict() def __getitem__(self, key): return self._command.get(key) def __setitem__(sel...
Mariannemariano asked 18/4, 2020 at 10:2

5

Solved

I have a simple infinite for loop looking like this: set_time_limit (0); for (;;) { ... //Doing some stuff including to write to a file sleep(300); } It's running on my server. (Shared hosting...
Sarcoma asked 23/9, 2011 at 9:12

4

Solved

I have two functions that I want to run at the same time but I can't just let them run separately as one function contains an infinite loop while(true). And the problem with JavaScript is that if y...
Configuration asked 23/9, 2019 at 14:10

16

Solved

I put together a quick WordPress site locally using MAMP, then checked it into an SVN repo. I then checked it out on to my development server. I didn't change anything except to run the search and...
Flair asked 26/1, 2013 at 0:37

5

I am making the game chess, and have gotten virtually everything but one thing: I need to make it so that it is impossible for a player to move a piece into check. I am having trouble on how to tac...
Apotheosize asked 29/5, 2013 at 1:3

1

Solved

On occasion my app begins to consume maximum CPU and the GUI becomes unresponsive. Maybe 1/50 attempts to reproduce this succeed. Based on the high CPU usage it obviously is running (not blocked ...
Reservation asked 25/7, 2019 at 19:41

3

Solved

In my code I have a "while True:" loop that needs to run for a varying amount of time while collecting live data (3-5 hours). Since the time is not predetermined I need to manually end the while lo...
Devinne asked 14/6, 2019 at 16:55

© 2022 - 2025 — McMap. All rights reserved.