tagged [iteration]

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?

How to iterate through two IEnumerables simultaneously?

How to iterate through two IEnumerables simultaneously? I have two enumerables: `IEnumerable list1` and `IEnumerable list2`. I would like to iterate through them simultaneously like: If they don't con...

28 Apr at 19:30

How do I efficiently iterate over each entry in a Java Map?

How do I efficiently iterate over each entry in a Java Map? If I have an object implementing the `Map` interface in Java and I wish to iterate over every pair contained within it, what is the most eff...

Convert nested for-loops into single LINQ statement

Convert nested for-loops into single LINQ statement can someone please help me turn this nested structure into a single LINQ statement? ``` EventLog[] logs = EventLog.GetEventLogs(); for (int i = ...

6 Jul at 05:12

Java: Most efficient method to iterate over all elements in a org.w3c.dom.Document?

Java: Most efficient method to iterate over all elements in a org.w3c.dom.Document? What is the most efficient way to iterate through all DOM elements in Java? Something like this but for every single...

4 Apr at 12:59

How to iterate through range of Dates in Java?

How to iterate through range of Dates in Java? In my script I need to perform a set of actions through range of dates, given a start and end date. Please provide me guidance to achieve this using Java...

28 Jul at 16:58

Is there a way to iterate over a dictionary?

Is there a way to iterate over a dictionary? I know `NSDictionaries` as something where you need a `key` in order to get a `value`. But how can I iterate over all `keys` and `values` in a `NSDictionar...

How to modify a foreach iteration variable from within foreach loop?

How to modify a foreach iteration variable from within foreach loop? When I try to do this... ...I get `Cannot assign to 'item' because it is a 'foreach iteration variable'`. Still, I'd

In C# .NET 2.0, what's an easy way to do a foreach in reverse?

In C# .NET 2.0, what's an easy way to do a foreach in reverse? Lets say I have a Dictionary object: Now I want to iterate through the dictionary in reverse order. I can't use a simple for loop because...

17 Sep at 13:0

How can I loop through a C++ map of maps?

How can I loop through a C++ map of maps? How can I loop through a `std::map` in C++? My map is defined as: For example, the above container holds data like this: ``` m["name1"]["value1"] = "data1"; m...

1 Jan at 15:36