Top "Iteration" questions

Iterations are the successive repetitions in loops such as for, foreach or while.

Customizing unittest.mock.mock_open for iteration

How should I customize unittest.mock.mock_open to handle this code? file: impexpdemo.py def import_register(register_fn): …

python unit-testing mocking iteration python-mock
Fastest method for adding/summing the individual digit components of a number

I saw a question on a math forum a while back where a person was discussing adding up the digits …

algorithm math sum iteration digit
Allowing iteration without generating any garbage

I have the following code in an object pool that implements the IEnumerable interface. public IEnumerable<T> ActiveNodes { …

c# compact-framework garbage-collection iteration
How to execute a shell command for each file in a Gradle file collection?

I've recently been directed to implement all build/release engineering jobs in Gradle. So I'm new to Gradle and some …

shell gradle iteration filetree
How do I iterate over enum values in Google Closure?

I'm trying to find the best way to iterate over all of the values on an enum defined in Google …

javascript enums iteration google-closure google-closure-library
Iteratively find all combinations of size k of an array of characters (N choose K)

I am currently working on this problem as a personal project. Basically: Given an array of elements, e.g. E = {1,2,…

algorithm iteration combinations permutation variable-length
Palindromes using Scala

I came across this problem from CodeChef. The problem states the following: A positive integer is called a palindrome if …

scala loops iteration break palindrome
Using continue in a do-while loop

MDN states: When you use continue without a label, it terminates the current iteration of the innermost enclosing while, do-while …

javascript loops iteration do-while continue
What is the difference between iteration and traversing?

The past few weeks I have been learning about iterators. I still do not understand the main difference between iterating …

c++ data-structures iteration terminology traversal
ConcurrentHashMap crashing application compiled with JDK 8 but targeting JRE 7

I ran into a very unexpected error today and while I was able to find a way to fix the …

java iteration concurrenthashmap