tagged [loops]
Iterate a certain number of times without storing the iteration number anywhere
Iterate a certain number of times without storing the iteration number anywhere I was wondering if it is possible to perform a certain number of operations without storing the loop iteration number an...
How to loop through a plain JavaScript object with the objects as members
How to loop through a plain JavaScript object with the objects as members How can I loop through all members in a JavaScript object, including values that are objects? For example, how could I loop th...
- Modified
- 19 Jul at 11:36
C# loop - break vs. continue
C# loop - break vs. continue In a C# (feel free to answer for other languages) loop, what's the difference between `break` and `continue` as a means to leave the structure of the loop, and go to the n...
- Modified
- 7 Jul at 20:59
How to create an infinite loop in Windows batch file?
How to create an infinite loop in Windows batch file? This is basically what I want in a batch file. I want to be able to re-run "Do Stuff" whenever I press any key to go past the "Pause". Looks like...
- Modified
- 1 Apr at 15:25
Batch script loop
Batch script loop I need to execute a command 100-200 times, and so far my research indicates that I would either have to copy/paste 100 copies of this command, OR use a `for` loop, but the `for` loop...
- Modified
- 13 Jan at 09:43
Changing objects value in foreach loop?
Changing objects value in foreach loop? In one place i am using the list of string in that case the i am able to change the value of the string as code given below, But for object of class i am not ab...
- Modified
- 30 Dec at 12:54
How to make a setInterval stop after some time or after a number of actions?
How to make a setInterval stop after some time or after a number of actions? I've created a loop of "changing words" with jQuery by using the code in this answer: [jQuery: Find word and change every f...
- Modified
- 27 Aug at 08:20
Difference between "while" loop and "do while" loop
Difference between "while" loop and "do while" loop What is the difference between while loop and do while loop. I used to think both are completely same.Then I came across following piece of code: ``...
Breaking out of a nested loop
Breaking out of a nested loop If I have a for loop which is nested within another, how can I efficiently come out of both loops (inner and outer) in the quickest possible way? I don't want to have to ...
- Modified
- 13 Mar at 14:52
Is there a "do ... until" in Python?
Is there a "do ... until" in Python? Is there a in Python, or a nice way to implement such a looping construct?
Can I use break to exit multiple nested 'for' loops?
Can I use break to exit multiple nested 'for' loops? Is it possible to use the `break` function to exit several nested `for` loops? If so, how would you go about doing this? Can you also control how m...
- Modified
- 13 Jan at 18:33
Check if key exists and iterate the JSON array using Python
Check if key exists and iterate the JSON array using Python I have a bunch of JSON data from Facebook posts like the one below: The JSON da
How to iterate over array of objects in Handlebars?
How to iterate over array of objects in Handlebars? This might seem a silly question but I can't seem to find the answer anywhere. I'm hitting this Web API that returns an array of objects in JSON for...
- Modified
- 22 Nov at 03:18
C++11 reverse range-based for-loop
C++11 reverse range-based for-loop Is there a container adapter that would reverse the direction of iterators so I can iterate over a container in reverse with range-based for-loop? With explicit iter...
- Modified
- 29 Aug at 20:51
While, Do While, For loops in Assembly Language (emu8086)
While, Do While, For loops in Assembly Language (emu8086) I want to convert simple loops in high-level languages into assembly language (for emu8086) say, I have this code: ``` for(int x = 0; x
- Modified
- 20 Aug at 03:16
Stop vs Break in Parallel.For
Stop vs Break in Parallel.For I have difficulty to understand `loopState.Stop()` and `loopState.Break()`. I have read MSDN and several posts about it but I am still confused. What I understand is that...
- Modified
- 19 Aug at 13:49
Loop through each row of a range in Excel
Loop through each row of a range in Excel This is one of those things that I'm sure there's a built-in function for (and I may well have been told it in the past), but I'm scratching my head to rememb...
- Modified
- 8 Jul at 20:13
Breaking from a loop with button click - C#
Breaking from a loop with button click - C# I have a question regarding looping with button click event, I've tried many methods & searched many pages in search for a simple answer for the past hour, ...
What's the best way to break from nested loops in JavaScript?
What's the best way to break from nested loops in JavaScript? What's the best way to break from nested loops in Javascript? ``` //Write the links to the page. for (var x = 0; x
- Modified
- 19 May at 21:6
How to loop through array in jQuery?
How to loop through array in jQuery? I am trying to loop through an array. I have the following code: Am trying to get all the data out of the array. Can some one lead me in the right path please?
- Modified
- 12 Apr at 15:18
how to loop through rows columns in excel VBA Macro
how to loop through rows columns in excel VBA Macro You can see t
Iterate through object properties
Iterate through object properties How does the variable `propt` represent the properties of the object? It's not a built-in method or property. Why does it come up with every property in the object?
- Modified
- 13 Mar at 10:58
Python : List of dict, if exists increment a dict value, if not append a new dict
Python : List of dict, if exists increment a dict value, if not append a new dict I would like do something like that. ``` list_of_urls = ['http://www.google.fr/', 'http://www.google.fr/', 'ht...