Questions tagged [enumeration]

The process of enumerating values, for example from some collection.

Use enums for enumeration types.

1779 questions
0
votes
3 answers

Get Path To "Links" (AKA Favorites) Folder

UPDATE: So I just found out in doing all this leg work that it seems the "Links" folder in your user folder can be named ANYTHING and you can still access it by going to "C:\Users(username)\Links" Ex:…
Arvo Bowen
  • 3,742
  • 6
  • 37
  • 78
0
votes
1 answer

soap enumeration value in php

I want to create a soap enumeration value in php. Here is the complex object type customer and CustomerStage
charan
  • 176
  • 1
  • 2
  • 11
0
votes
1 answer

A bit field of enumeration type and a value stored to it

I wrote the following and I expected that 16 would be printed. #include enum E : long { e = 16 }; struct X { E e : 5; }; X x; int main(){ x.e = E::e; std::cout << static_cast(x.e) << std::endl; } DEMO But it wasn't. I got…
user2953119
0
votes
1 answer

generate a big list from a given list by enumeration in prolog

I am trying to generate a big list (2^N elements) from a small given list (N elements). For example, there is a list [X,Y,Z], in which X, Y or Z could only be 0.1 or 0.9. I will pick 0.1 or 0.9 from X, pick 0.1 or 0.9 from Y and pick 0.1 or 0.9 from…
Wayne
  • 33
  • 1
  • 9
0
votes
1 answer

Java accessing first element of enumeration

I want to access elements in an enumeration using the following code: Enumeration en = someFunctionToRetrieveEnumeration(); while(en.hasMoreElements()){ String name = en.nextElement().getName(); System.out.println(name); } The…
max
  • 581
  • 7
  • 28
0
votes
2 answers

enum not working, expected declaration

I'm new to swift and am trying to use enumeration: enum students : String { case Joseph = "Joseph", Matt = "Matt", Cody = "Cody", Rick = "Rick" static let allValues = [Joseph, Matt, Cody, Rick] for Joseph in…
ChallengerGuy
  • 2,275
  • 5
  • 24
  • 42
0
votes
0 answers

Defining a function to return members of a C++ enum definition, as part of a preprocessor macro?

Given an enumeration defined as: DEFINE_ENUM(name,enumerators) \ enum name \ { \ BOOST_PP_SEQ_ENUM(enumerators) …
ExOttoyuhr
  • 657
  • 1
  • 8
  • 21
0
votes
2 answers

Cannot implicitly convert type ... to ... problem

I have this code: public static IEnumerable searchCustomer(string Companyname) { TestdbDataContext db = new TestdbDataContext(); IEnumerable myCustomerList = (from Customer res …
Younes
  • 4,687
  • 4
  • 36
  • 64
0
votes
1 answer

Loop through text fields array and check if ALL are empty

Im looping through an array of UITextFields and checking if any of them are empty NSArray*textFields = ...; textFieldHasData = YES; [textFields enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { if ([obj isEqualToString:@""])…
JSA986
  • 5,739
  • 9
  • 40
  • 89
0
votes
0 answers

Collection was modified; enumeration operation might not operate

The system some time give the error mentioned in the title. the code block is given below. when i debug or try to check it it does not give an error but when the system is running it gives error. i use this code in remoting application which runs 24…
Sahib Khan
  • 431
  • 4
  • 15
0
votes
1 answer

How can I set my own order for an Enumeration in Latex?

I want the items in my enumerations of the second level to look like this everytime in this order: Binary: i) Decimal: ii) Hex: …
Cold_Class
  • 2,324
  • 2
  • 25
  • 56
0
votes
1 answer

Finding permitted attributes for a Rails model

I'm familiar with the attributes method but what I'd like to do is only return the attributes that were permitted in my model's controller. #users_controller.rb def user_params params.require(:user).permit(:name, :birthday, :email) end What I'd…
Carl Edwards
  • 11,370
  • 7
  • 46
  • 88
0
votes
2 answers

How do I enter a value in one class and have it enumerated in another class to output the proper info?

I have created 2 classes one that is the enumeration class to determine what the grades someone received are and the other is supposed to be a simple program to call it and display the gpa value and the pass or fail value here is the enumeration…
0
votes
0 answers

Binding csv data to a chart in C# - Enumeration Exception

I have problems to bind the Y-Value to a chart. I have following code: private void button1_Click_1(object sender, EventArgs e) { var date = new List(); var forecast = new List(); string dir =…
uzi42tmp
  • 241
  • 2
  • 5
  • 19
0
votes
1 answer

Why do methods from Enumerable return an Enumerator?

Many methods from Ruby's Enumerable will return an Enumerator if you don't pass a block. Example: array = [1,2,3] array.each.class # => Enumerator array.each { |n| n+10 }.class # => Array What is the reason for this? Why wouldn't they just return…
SharkLaser
  • 653
  • 1
  • 8
  • 17
1 2 3
99
100