Questions tagged [infinite]

An infinite structure or process is one which does not terminate. Infinite loops or structures may be bugs in certain contexts, but also may be desired behavior, particularly in server-processes or lazy languages.

An infinite structure or process is one which does not terminate. Infinite loops or structures may be bugs in certain contexts, but also may be desired behavior, particularly in server-processes or lazy languages.

1090 questions
-1
votes
1 answer

fscanf saving integers causes infinite loop

I'm saving into an array the integers from the following content of a .txt file: "15 ,12,10,19,22,2,20,17,5 ,2,20,25 ,12 ,10 ,23" What I need to do is ignore the whitespace as well as commas, and save the numbers to an array. Simple, right? Not…
D Mills
  • 51
  • 1
  • 7
-1
votes
2 answers

how to to define a function make_ 3 rd _form() which given a verb in infinitive form returns its third person singular form?

I need to to define a function make_3rd_form() which given a verb in infinitive form returns its third person singular form. The third person singular verb form in English is distinguished by the suffix-s, which is added to the stem of the…
-1
votes
2 answers

Why is my While loop infinite

This while loop is giving me trouble as it simply will not stop, I'm trying to update elem to eventually be larger then char by using an exponent i but that simply doesn't happen and was wondering if there were any solutions. i = 0 char = 20 elem =…
-1
votes
3 answers

PHP/MySQL tree that is inifinite

I've got a tree-algorithm and database problem I'd like to have an answer to. I've got a few areas, let's say 20. Each of these areas have sub-areas ~ 20 each. These parent areas are spread out on a map. Some of these parent areas are close to…
Snappyjs
  • 318
  • 1
  • 9
-1
votes
1 answer

Spontaneous click of a button in Swing

So if a user do not press any button,the action listener is not triggered and i end up with an exception. So i thought to put a default String in my FrameClass and change that String whenever a button is clicked,than in my main class i do a loop…
Roudy Tarabay
  • 29
  • 2
  • 7
-1
votes
2 answers

Display output in infinite loop iOS

I am new to iOS and I need some feedback about how I can display the output on Iphone screen in an infinite loop. When the button is pressed, the application goes in an endless loop and creates some outputs. I would like to display these outputs on…
-1
votes
2 answers

Creating an unbounded number of objects in Python 2.7.3

I have started to make an artificial life simulator in Python 2.7.3 but I am unable to create classes at runtime, continuously. I know that I can do this in C++ by storing the class in a list. Does anyone know how to do this? I mean something like…
-1
votes
1 answer

To check for infinite while loop. I am using a boolean variable

I am using the following code: boolean continueProcessing = true; boolean lastRecord = false; while (continueProcessing) //can it be changed to while (continueProcessing == true), what's the advantage { if(refListItemItr.hasNext() ||…
dev
  • 132
  • 1
  • 3
  • 11
-2
votes
1 answer

How to fix this infinite loop?

I put in system print outs to see where the problem was, and 2 and 7 were the two that kept repeating in the infinite loop. This part of the code is suppose to search a list and find the match that the user puts in, but every time i use the search…
Joseph Do
  • 23
  • 2
  • 5
-2
votes
2 answers

How to loop string inputs that break/end only when "#" is input on a single line?

Basically, I want to create a loop that will continue getting string inputs from users until the user types only a "#" on a line. I am coming from C++ so I am a bit lost in this Python project I have in mind.
Eric
  • 1
-2
votes
1 answer

I want to make infinite Vector of elements and make the user enter the value and stop entering by pressing Enter

//C++ code .. and it is working I just want to make it infinite #include #include #include using namespace std; int main(){ vector N(3); //vector vector M(3); //vector for(int i=0; i<3; i++){ …
-2
votes
2 answers

Efficient way to perform summation to infinite in c++

I am new to c++ and I am trying to implement a function that has a summation between k=1 and infinite: Do you know how summation to infinite can be implemented efficiently in c++?
CafféSospeso
  • 1,101
  • 3
  • 11
  • 28
-2
votes
1 answer

How to solve the infinite time complexity problem shown below

90 Kilograms of rocket fuel is necessary to propel 100 Kilograms of mass into Earth's orbit from sea level. However, this becomes tricky as, now the mass of the rocket is (100 + 90) = 190 Kilograms, inclusive of the original mass and the mass of…
Stackm
  • 13
  • 2
-2
votes
1 answer

Why this program is going infinite for several inputs like in picture?

Blockquote for _ in range(int(input())): s1,s2,x=input(),input(),input() l=[] c=1 a=0 k=0 while(k
-2
votes
1 answer

while (1) loop with continue and break statements

I need help with a while(1) loop that contains a continue and break statement. It must count from numbers 1 to 20 and for every even number, it must output the values. I have to use a continue after my writeToPage statement and use a break statement…
coding cat
  • 17
  • 5