Questions tagged [enumeration]

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

Use enums for enumeration types.

1779 questions
0
votes
2 answers

Unable to print Subkeys of the subkeys through recursion in the System Registry

I'm Trying to look for the subkeys of the subkeys for a key in a HIVE.Below posted is my code I m able to get all the sub keys in the registry.However,i'm not able to get the subkeys for the subkeys in a registry.I wrote a recursive code to do…
ramu ranga
  • 57
  • 3
0
votes
1 answer

Scala enumeration serialization in jersey/jackson is not working for me

I've read the jackson-module-scala page on enumeration handling (https://github.com/FasterXML/jackson-module-scala/wiki/Enumerations). Still I'm not getting it to work. The essential code goes like…
thoredge
  • 11,158
  • 1
  • 34
  • 50
0
votes
1 answer

Get the Value of enum from the class

public class EmpModel { public string UserName { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public int Age { get; set; } public Gender Gender { get; set; } public int…
user4033545
0
votes
1 answer

how to know when block finished enumerating ALAssetsLibrary

Im enumerating the ALAssetsLibrary to know what groups my photo library have, How can I know when the block stopped enumerating? NSMutableArray *albumsArray = [NSMutableArray array]; ALAssetsLibrary *library = [[ALAssetsLibrary alloc]…
manuelBetancurt
  • 13,050
  • 29
  • 103
  • 194
0
votes
4 answers

C++ How to give a parameter a specific enumeration it can be?

How do I give a parameter a list of values it is allowed to be passed as? Here is an example function: void GamePiece::Rotate(int z){ int x, y; for(int i = 0; i < 4; i++){ x = pieceRectangles_[i].getPosition().y * z; y =…
jburn7
  • 115
  • 1
  • 3
  • 14
0
votes
1 answer

Thymeleaf OGNL To display HttpSession variables

It is pretty easy to access individual session variables by name in OGNL / Thymeleaf for display. The session variables however is a getAttributeNames() : Enumeration while the getValueNames() is deprecated (implying that I do not want to use the…
user1210708
  • 493
  • 4
  • 10
0
votes
2 answers

Ruby: sorting an array of arrays excluding 1st row

Having the following array [["Date", "Value"], ["2014-09-25", 0], ["2014-09-23", 1], ["2014-09-22", 0], ["2014-09-24", 2]] How can I sort the array excluding the first row from the sorting?
Triple
  • 115
  • 1
  • 9
0
votes
2 answers

About enumerations in Delphi and c++ in 64-bit environments

I recently had to work around the different default sizes used for enumerations in Delphi and c++ since i have to use a c++ dll from a delphi application. One function call returns an array of structs (or records in delphi), the first element of…
sum1stolemyname
  • 4,258
  • 2
  • 23
  • 44
0
votes
1 answer

Using pfnNtQuerySystemInformation, how do I determine the process's architecture?

Hey there awesome people. I'm working on a project that uses pfnNtQuerySystemInformation (SystemProcessInformation, (PVOID)proc, bufferSize, &ReturnLength); To enumerate processes and obtain their…
Moon
  • 309
  • 1
  • 3
  • 17
0
votes
3 answers

I need to user an enumerations to represent difficulties levels. I keep getting an error about using cin>>

I have to use a enumerations to represent the difficulty levels. Here is the code. // Menu Chooser // Demonstrates the switch statement #include #include using namespace std; int main() { cout <<…
mikeLspohn
  • 495
  • 8
  • 20
0
votes
2 answers

Replace All Elements in 2D List with Data from Other List - Using Unique ID - Python

I'm still only a few months into python, so please excuse the ugly code. I have a dataset composed of unique ID's. Consider this format of 3 rows each with 3 ID's: zList = [[1412,2521,53522], [52632,1342,1453], [3413,342,25232]] I am attempting…
nodoze
  • 127
  • 1
  • 13
0
votes
3 answers

NSArray enumerating by group

Using Objective-C, is it possible to go through an array by groups : exemple : NSArray *arr = 1, 2, 3, ....100; Every 10 objects, do something and go on so : object 0 to 9 : you do something with each object and after the 10° object you do a last…
hungry
  • 144
  • 8
0
votes
4 answers

C and enumerations

What's the advantage of creating a variable of enum type? I know how to define an enum type, and a variable - however, I don't quite see the advantage? #include int main(void){ enum colour{ white, red=2, …
user1341676
0
votes
1 answer

Unable to iterate over a Qt enumeration

I am trying to iterate over an enumeration. class MyEnumClass : public QObject { Q_GADGET Q_ENUMS(MyEnum) public: enum MyEnum { a, b, c }; MyEnumClass(QObject *parent = 0){} …
Thalia
  • 11,305
  • 15
  • 71
  • 169
0
votes
1 answer

Unable to enumerate usb device whenever it is connected while my application is running

I am building an app for UsbInterfacing and i need to enumerate usb devices continously while my application is running..i need to be notified when it is connected and disconnected.. My usb device's vendor id is 1204 and product-id is 64905..The…
hari8495
  • 21
  • 5
1 2 3
99
100