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
9 answers

Safari stuck in infinite loop whilst testing - any way out?

I'm hoping someone can help me out here - I'm testing some javascript and put an alert in a while loop to show how some variables were changing, but... I put it in the wrong line and now Safari (on a Mac) is just looping the alert. Is there any way…
Mike
  • 325
  • 1
  • 8
  • 16
3
votes
4 answers

Infinite self-referencing list

Problem I'm trying to implement the modified Dragon Curve from AoC Day 16 as an infinite list in Haskell. The list is composed of True and False. We start with some list s0: s1 = s0 ++ [False] ++ (map not . reverse) s0 s2 = s1 ++ [False] ++ (map…
3
votes
1 answer

Matlab division by 0: Inf or -Inf

I cannot figure out why division by 0 gives different results in the following two cases. amort is a function that calculates a constant amortization schedule. The only thing we care about now is that the last element of A is exactly 0. amort =…
Giuseppe
  • 518
  • 10
  • 22
3
votes
4 answers

Do while goes infinite with try catch

I have a problem when trying to execute try-catch statement inside do while loop.I ask user to first enter letter and then a number and if he enters number correctly the program ends.If he enters letter instead of number the program should say "An…
Stanimir
  • 51
  • 6
3
votes
2 answers

Comparing iterator with (fixed sized) array

I built an iterator that generates an infinite list of primes. The types look like this: pub struct Primes { … } impl Iterator for Primes { type Item = u32; fn next(&mut self) -> Option { … } } Now I want to test if my iterator…
Sebastian
  • 313
  • 1
  • 15
3
votes
0 answers

Shopify Infinite Scroll With Product.Loop

Alright. So I am trying to get this following script to work with infinite scroll on shopify. http://www.davecap.com/post/9675189741/infinite-scroll-for-shopify-collections The problem is I have a special version in my theme called product.loop…
Nick T
  • 29
  • 1
  • 3
3
votes
1 answer

Infinite Rotation Command (or button) in toolbar in Codename One

I'd like to 'infinite' rotate on of my Commands (the refresh Command) in the Codename One Toolbar (until loading is done, then I want to stop rotation, but the image still has to be visible). Can I change the icon so it will start rotation? How can…
Maaike
  • 321
  • 2
  • 10
3
votes
8 answers

Is it possible to construct an "infinite" string?

Is there any real sequence of characters that always compares greater than any other string? My first thought was that a string constructed like so: std::basic_string(std::string::max_size(), std::numeric_limits::max()) Would do the trick,…
Jon Purdy
  • 53,300
  • 8
  • 96
  • 166
3
votes
0 answers

ORMLite one to many foreign object is fetched with foreignAutoRefresh = false

I have one to many relationship in local database. I am using ORMLite technology and my foreign object for one part is configured with foreignAutoRefresh = false. @DatabaseTable(tableName = "Person") public class Person{ …
BozhidarMT
  • 83
  • 8
3
votes
2 answers

How does Python handle infinite recursion?

So when toying with Python, I noticed that there is basically no limit on the program's stack size (kept performing power operations on a number, the precision stayed perfect even after getting to like thousands of digits). This makes me wonder:…
Coffee Maker
  • 1,543
  • 1
  • 16
  • 29
3
votes
6 answers

In Haskell, how can you sort a list of infinite lists of strings?

So basically, if I have a (finite or infinite) list of (finite or infinite) lists of strings, is it possible to sort the list by length first and then by lexicographic order, excluding duplicates? A sample input/output would be: Input: [["a",…
HaskellNoob
  • 31
  • 1
  • 2
3
votes
3 answers

Haskell -- Unexpected expected type

I'm trying to write a function in Haskell that will pop some items that have been serialized to a list of strings. (This list represents the lines of a text file -- one line is not necessarily one item) The function is called with another function…
3
votes
1 answer

Detect Infinite Loop?

I'm working on a Sudoku solver program. The idea is that the user inputs the Sudoku puzzle and the program solves it for them. The program works fine when entering any normal puzzle. However, there are some puzzles that are impossible to solve. Here…
Chris
  • 57,622
  • 19
  • 111
  • 137
3
votes
1 answer

Haskell Program Out of Memory (Infinite Recursion? Loop? Something?)

EDIT: Updated to include entire code. I'm pretty new to Haskell, and am having an issue with a program I've written to do some entropy calculations for a course assignment (the assignment is the calculations, the use of Haskell is a choice, so I'm…
JackGibbs
  • 230
  • 2
  • 9
3
votes
0 answers

3D Infinite Cone line intersection formula

EDIT: Would be awesome if someone could explain in a comment what really goes on. We basically found out the answer by coincidences. I'm trying to do line tests against an infinitely large cone, but I'm having trouble understanding what I'm doing…
NangiDev
  • 55
  • 6