Top "Enumerable" questions

"enumerable" refers to an ordering scheme that enables items in a set, sequence or collection to be readily addressed or traversed.

How to find a min/max with Ruby

I want to use min(5,10), or Math.max(4,7). Are there functions to this effect in Ruby?

ruby enumerable
What is the best way to modify a list in a 'foreach' loop?

A new feature in C# / .NET 4.0 is that you can change your enumerable in a foreach without getting the exception. …

c# .net list enumeration enumerable
Transform a DataTable into Dictionary C#

I want to know how to transform a DataTable into a Dictionary. I did something like this. using System.Linq; …

c# linq dictionary datatable enumerable
Possible to access the index in a Hash each loop?

I'm probably missing something obvious, but is there a way to access the index/count of the iteration inside a …

ruby enumerable
IEnumerable doesn't have a Count method

I have the following method: public bool IsValid { get { return (GetRuleViolations().Count() == 0); } } public IEnumerable<RuleViolation> GetRuleViolations(){ //code here } …

c# asp.net enumerable
What does enumerable mean?

I was directed to MDN's for..in page when it said, "for..in Iterates over the enumerable properties of an …

javascript enumerable
Array#each vs. Array#map

hash = { "d" => [11, 22], "f" => [33, 44, 55] } # case 1 hash.map {|k,vs| vs.map {|v| "#{k}:#{v}"}}.join(",") => "d:11,d:22,f:33,…

ruby arrays enumerable
How do you sort an array alphabetically using sort_by in ruby?

I have an array of memberships. In each membership is a group. I need to sort this array of memberships …

ruby-on-rails ruby arrays sorting enumerable
Executing a certain action for all elements in an Enumerable<T>

I have an Enumerable<T> and am looking for a method that allows me to execute an action …

linq c#-3.0 enumerable
Apply method to each elements in array/enumerable

This is my array: array = [:one,:two,:three] I want to apply to_s method to all of my array …

ruby arrays enumerable