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
3
votes
3 answers

How does the hashlife alg go on forever in Golly?

In hashlife the field is typically treated as a theoretically infinite grid, with the pattern in question centered near the origin. A quadtree is used to represent the field. Given a square of 2^(2k) cells, 2k on a side, at the kth level of the…
Naximus
  • 579
  • 6
  • 18
3
votes
1 answer

Python: mechanize randomly stops the program infinitely

I am writing some code that uses mechanize to access a website, but often times, when I run the Python code, it halts indefinitely at a line in which I used mechanize.ParseResponse. It is not giving me an error, and in stead, I have to interrupt it…
Zhouster
  • 746
  • 3
  • 13
  • 23
3
votes
3 answers

Understanding floating points and infinite loops

I have this code: while (x < 10.0) { x += y; } If x and y are floating point numbers, apparently if you add them the loop will continue infinitely. I don't understand how it wont pass 10. It seems impossible to not pass ten but it doesn't…
user1832483
  • 107
  • 2
  • 8
3
votes
2 answers

Pattern to do infinite animation in javascript without stack overflow

I have the following pattern to repeat an animation (itself consisting of x frames), t times: sprite.prototype.loop = function(t,animation_name,frame_delay) { if(t > 0) { function next_run() { …
Cris Stringfellow
  • 3,714
  • 26
  • 48
3
votes
2 answers

loop carousel jquery

Possible Duplicate: my carousel does not work am a bit puzzled! i got this carousel am creating and i desire that it loops. everything else works out fine, but, when the last image has slid up i want the first one to do the same after it, then…
Wagaba
  • 49
  • 2
  • 7
3
votes
3 answers

How do make an infinite jscrollpane?

I've implemented drag scroll before, but what's the best way to go about creating an infinite scroll pane? Of course there won't be any scrollbars and I will implement drag scroll. What I am trying to do is implement dynamic loading on an infinite…
Pyrolistical
  • 27,624
  • 21
  • 81
  • 106
3
votes
4 answers

MySQL database structure for infinite items per user

I have a MySQL database with a growing number of users and each user has a list of items they want and of items they have - and each user has a specific ID The current database was created some time ago and it currently has each users with a…
Dan
  • 3,755
  • 4
  • 27
  • 38
3
votes
4 answers

Pause an infinite while loop with a single keypress

I'm new to python and I have been trying to find a simple way to pause an operating while-loop, making it possible to start it again from where it was paused. I have searched on Google for help and tips, but everything I find seems very complex. Is…
fatninja
  • 77
  • 3
  • 10
3
votes
2 answers

cuda infinite kernel

I am working on an application for which it is necessary to run a CUDA kernel indefinitely. I have one CPU thread that writes stg on a list and gpu reads that list and resets (at least for start). When I write inside the kernel …
amanda
  • 394
  • 1
  • 9
3
votes
1 answer

HashMap.put causing an infinite loop in Java

So I have a class named MainControl that is ran from another class (The main one) that I am certain only runs once. Inside of MainControl I have a few things that have to be loaded, one of which being a function that populates the HashMap with the…
André
  • 343
  • 2
  • 7
  • 15
2
votes
1 answer

Recursive Sudoku Solver doesn't work in Java

I had written a Sudoku game including a solver in C, and wanted to try it out in Java so people could use it a little easier (portability). I figured the port would be fairly simple because of the vast similarities between the languages, but it…
Caleb Stewart
  • 643
  • 6
  • 21
2
votes
3 answers

Infinite Background Position Animation - jQuery

I'm wondering how to make infinite animation on jquery with a plugin "background position animation" i tried to implement setInterval(); but it didn't work, there a jsfiddle. http://jsfiddle.net/fyuga/2/ You can see js code like …
Ivan
  • 1,221
  • 2
  • 21
  • 43
2
votes
2 answers

How do I check for infinite (1.#INF) and indefinite (1.#IND) numbers?

template MyClass { public: // ... void MyMethod(T dbNumber) { // ... T dbResult = do_some_operation_on_dbnumber(dbNumber); if (IsInfinite(dbResult)) { …
hkBattousai
  • 10,583
  • 18
  • 76
  • 124
2
votes
0 answers

Unable to center plot in zero due to infinite result in function: y = math.exp(-(1/(x**2)))

The plot is not centered in zero because as there is an infinite result when x takes the value = 0. How can I solve this issue and have the graphic centered in zero? import math import numpy as np import matplotlib.pyplot as plt def f(start, stop,…
2
votes
0 answers

Why does my solution to The Cigarette Smoker's Problem not terminate?

I wrote a solution to The Cigarette Smoker's Problem that does not terminate. A full description of the problem and pseudo-code for the solution can be found here. Briefly, the task is to synchronize four processes using semaphores. I used the…