2020欧洲杯手机版注册

A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [enumerable]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
31 views

How can I make a generic list passed and returned as IEnumerable<T> return a proper value instead of null? [duplicate]

I'm just trying to solve various code katas, and have been stuck on the final piece of this problem for hours. The purpose is to return a result that doesn't have a repeating digit or character ...
-1
votes
1answer
65 views

How to batch enumerables in ruby

In my quest to understand ruby's enumerable, I have something similar to the followingFileReader.read(very_big_file) .lazy .flat_map {|line| get_array_of_similar_words } # array....
-3
votes
1answer
39 views

Why does the ToArray method of the OrderedQueryable class much allocated? [closed]

I looked source code of the System.Linq namespace and I noticed that the ToArray method of the OrderedQueryable class created three arrays, but we could use one array for ordering. Why is this done??
0
votes
2answers
36 views

Is there a way to do Bubble Sort algorithm in Ruby using a while loop with an any method?

I'm trying to use a while loop with an any enumerable to optimize the Bubble Sort algorithm, but having trouble figuring out a way to make it work. Right now, I'm getting an error, but I want to know ...
2
votes
2answers
50 views

How Do You Iterate Through An JObject If You Are Deleting Certain Elements?

Summary:With the US Department of Education API, I plan on creating a list of colleges and the median salary for their computer science graduates. However, many schools have null values and ...
0
votes
1answer
47 views

How do we assign a current property to be equal to new parameter and then remove it when a new value is assined?

The test should check when a train is assigned to a line he losts its previous line. The class Train should implement this test in the function public void AssignTo(ILine l) by following those steps (...
0
votes
0answers
20 views

Need suggestion in logic : find specific sub string in a system.collections.generic.ienumerable<system.text.regularexpression.match>

ex:I have a variable defined as below system.collections.generic.ienumerable<system.text.regularexpression.match>ex:item.tostring=('description:this is a test string','found Resolution:...
0
votes
2answers
41 views

querying a CSV::Table to find item with most sales between two given dates in plain old ruby script

I am trying to find the highest sales between two given dates.this is what my ad_report.csv file with headers:date,impressions,clicks,sales,ad_spend,keyword_id,asin2017-06-19,4451,1006,608,24.87,...
0
votes
1answer
36 views

Add Row Number column to IList<T>

I am trying to convert a DataSet to an IList<myDataModel> and got stuck when trying to populate the row number column.this is my method converting the data:private IList<Web_Notes.Models....
0
votes
2answers
71 views

How to get enumerable range with a variable step count

I am trying to get a list ranging from minimum and maximum values with variable step counts.For example: If I set minimum value as 10,000, maximum value as 150,000 and step count as 20,000. I ...
1
vote
2answers
61 views

Regarding evaluation of Enumerable/List [duplicate]

I've been playing with Lists and Enumerables and I think I understand the basics:Enumerable: The elements are evaluated each time they are consumed.List: The elements are evaluated on definition ...
-1
votes
3answers
58 views

Create Ranges in the list

I have a Price list as 10213090100150400I want to add prices in 10 increments below 100. Above 100 to display in increments of 100So my final price list would be like10203040506070...
-2
votes
1answer
57 views

Enumerable.Last method

I am trying to print the both the value of .First and .Last but only the value of .First() comes up. .Last() just prints my "Text: " word and then blank.I'v tried chainging the i to different values ...
0
votes
1answer
40 views

Compare enumerable values that can't be sorted

I need to compare enumerable values, but the set of those values is not ordered.I have values Rock,Paper,Scissors and I want that Rock loses over Paper for example. This is not happening, see the ...
0
votes
1answer
42 views

Add methods to an already-instantiated object? [duplicate]

I know how to use include to add mixins to a class in Ruby. However, I want to add one or more methods to an already instantiated object. Is that possible?For example, the Rack::File::Iterator class ...

15 30 50 per page