Questions tagged [enumeration]

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

Use for enumeration types.

1894 questions
0
votes
1 answer

Token Enumeration in Java

I'm writing a lexer using jflex for a made up programming language. It requires an enumeration java class which holds a bunch of tokens for the made up language. Things like STRING_TKN, ON_TKN, GOTO_TKN, COMMAND_TKN, etc. I haven't used java in a…
Corey
  • 771
  • 3
  • 14
  • 32
0
votes
2 answers

access values from enumerations scala object doesn't work

Hello I have the following enumeration and I want to get the values out of the enumeration defined : So here my enumeration object object ConfType extends Enumeration { type ConfType = Value val Dfered = Value("Dfered") val Dedeo =…
scalacode
  • 1,096
  • 1
  • 16
  • 38
0
votes
1 answer

unexpected behaviour of c compiler when using enumerate as constant

In the following c-code, the function func1 decides which element of enumerate ENUM1 is given as input. In the first call func1(ENUM_ELEMENT1); it works as expected but in the second and third calls the results are wrong (it is expected that the…
Ben2400
  • 41
  • 4
0
votes
0 answers

Converting Enumeration Object to List More Than Once

Why does converting Enumeration object to List more than once result to empty list after the first one? Here is an example: List strings = Arrays.asList("page.info1", "page.info2"); Enumeration stringEnumeration =…
Julez
  • 1,010
  • 22
  • 44
0
votes
1 answer

What is the keycode of these characters? - WPF

I'm working ona code editor based on Windows Presentation Foundation(WPF). I wanna automatically add close bracket when the user add an open brakcet. But in System.Windows.Input.Key, I can't find a keycode for brackets. I also need a few more…
Burak Yeniçeri
  • 91
  • 2
  • 15
0
votes
1 answer

Python 3 Enumeration List Value doesn't support membership test

from enum import IntEnum from typing import List class EnumClass(IntEnum): A = 1 B = 2 @staticmethod def listofconditions() -> 'List[EnumClass]': return [EnumClass.A.numerator, \ EnumClass.B.numerator] if 1 in…
JGFMK
  • 8,425
  • 4
  • 58
  • 92
0
votes
3 answers

Sort hashtable and put into a new hashtable

I cannot figure out why the loop below is return null keys. I think $hashSorted is not of type Hashtable; so how do I force it to be? Thinking now I need a deep/copy? I just want to sort my hashtable and put it into another hashtable. This might…
NealWalters
  • 17,197
  • 42
  • 141
  • 251
0
votes
1 answer

Enumeration in SAS

I want to enumerate over groups in SAS. I have the following data set and have attached 2 possible scenarios that I am looking for. locationnurseunitcodedesc transaction_start_dt_tm transaction_stop_dt_tm THIS IS WHAT I WANT BETTER YET STATION 1 …
A. MATULA
  • 31
  • 1
  • 7
0
votes
1 answer

CCSprite not deleting

I have a class called Projectiles which inherits from CCSprite class, Currently there are 2 types of projectiles, rain1 and rain2. I have a method that creates a bunch of these sprites every 2 seconds to give the illusion of pulsating rain. Each…
Ospho
  • 2,756
  • 5
  • 26
  • 39
0
votes
1 answer

Filtering Dictionary with an array of random Ints to make a new dict

So I have this method to get an array of random ints between 1-9, a random number of times between 1 and 7. let n = arc4random_uniform(7) + 1 var arr: [UInt32] = [] for _ in 0 ... n { var temp = arc4random_uniform(9) + 1 while…
Harper Creek
  • 437
  • 6
  • 19
0
votes
1 answer

What is a happening with this enumeration

In this code, I make list of days and then make an enumerate object from it. When I convert this to a list I get an expected result. What is happening to the my_enumerate_object when I do list(my_enumerate_object) The second time I get an empty…
nerak99
  • 640
  • 8
  • 26
0
votes
2 answers

Deal with enumeration in Microservices architecture

I recently faced a problem when I designed the microservices architecture of our new system. To give more context on that, let's suppose that we have two different services. A service is responsible to make payments and the other one B service…
pik4
  • 1,283
  • 3
  • 21
  • 56
0
votes
4 answers

Implementing an abstract Enum property in a child class

I have the following base class public abstract class Character : MonoBehaviour { protected abstract Enum CurrentState { get; set; } } and the following child class public class Player : Character { protected…
Sean Carey
  • 799
  • 5
  • 12
0
votes
0 answers

Generate a enumeration matrix in MATLAB

I have a quick question. Lets say i want to form a matrix with all possible combinations of some acceptable value, eg. lets say i have 3 elements and i the possible values are 0 1 2 so the matrix would be 0 0 0 0 0 1 0 0 2 …
Yan Song
  • 2,285
  • 4
  • 18
  • 27
0
votes
1 answer

Delphi XE6: How to enumerate RCData resource names?

I have embedded several resources into the executable, for instance language (text) files. Below you can see the contents of Languages.rc file: Language_English RCDATA Languages\English.ini Language_German RCDATA …
Vlastimil Burián
  • 3,024
  • 2
  • 31
  • 52