Questions tagged [enumeration]

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

Use for enumeration types.

1894 questions
0
votes
0 answers

Iterating a Dictionary with String, Any pair in Swift

I have written this function that reads in values from a text file and stores them in a dictionary. The dictionary is formatted as: [String : Any]. Each key in the dictionary is associated with a Zipped list. The function returns the value…
edwardam
  • 45
  • 1
  • 6
0
votes
3 answers

Can I do a fast enumeration directly via a property?

if I have a property @property (nonatomic, retain) NSArray* myArray; Can I do ? And if yes why does this work ? for (id object in self.myArray) ; Or do I need to do ? NSArray* r = self.myArray; for (id object in r) ;
CodeFlakes
  • 3,671
  • 3
  • 25
  • 28
0
votes
2 answers

use Enumerations in for-each statements without RAM limitation?

Hi I have about 10 million values and getting Enumeration in enhanced-for loop, but It blasts my RAM. Is there any way to get Iteration rather than Enumeration. I am trying to to find an alternate for Collections.list() and…
AZ_
  • 21,688
  • 25
  • 143
  • 191
0
votes
1 answer

ATQA in Mifare and RFU configurations

I received some cards that are supposed to be Mifare Classic cards. When I perform the level 1 of anticollision (REQA) the ATQA is 04 00. According to ISO/IEC 14443-3, the first byte of the ATQA is RFU and the second part defines the UID size and…
Catosh
  • 163
  • 1
  • 2
  • 14
0
votes
1 answer

Can create enumeration as part of another enumeration?

I tried to create enum, which elements will be copied of another enum, like this: enum Modes { case mode1 case mode2 case additionalMode1 case additionalMode2 } enum GeneralModes { case mode1 case mode2 } I have no idea how…
Golovanov Dmytrii
  • 527
  • 1
  • 6
  • 20
0
votes
3 answers

user-defined exceptions with enumeration "error level"

I have made some user-defined exceptions and I would like to add an error level to each exception. forexample userInputerror, and internalError. The reason I'm coding this, is because I want to learn about exceptions so that's why I am reinventing…
user602996
0
votes
0 answers

DeviceInformation.Pairing is always null

I have a problem with Bluetooth pairing in the windows UWP device driver. I am currently on a windows 10 (Build 10240) computer and I use a vs2015. I create a device watcher with a (custom)selector to get paired and unpaired Bluetooth devices. I get…
dkeekstra
  • 1
  • 1
0
votes
1 answer

Google protobuff enum naming conventions

I'm unable to find specific guidance on naming conventions for Google protobuff enum values to avoid naming collisions. since protobuff enums are global, the following would cause a naming collision : enum CommissionType { UNKNOWN = 0; …
Jonnie
  • 101
  • 14
0
votes
1 answer

Limiting a function's input to specific integers

What is the best practice to limit a functions inputs to specific integers in java? lets say public Car(CarColor carcolor, (Range limited integer value) carnum) { // Rest of the code } For strings the best way is to use enumeration like enum…
KaO
  • 313
  • 1
  • 3
  • 13
0
votes
1 answer

Sort/Enumerate an NSArray from somewhere in the middle?

I have an NSArray, with objects ordered like so: a b c d e f I would like to enumerate through this array in this order: c d e f a b i.e. starting at some point that is not the beginning, but hitting all the items. I imagine this is a matter of…
Kenny Winker
  • 11,919
  • 7
  • 56
  • 78
0
votes
1 answer

Powershell command to get filesystem drive names - member-access enumeration

I am trying to fetch disk free space and used space in windows 2008 R2 enterprise edition. However the command fails to get the values. This command works fine in windows 2012 version. Get-PSDrive -PSProvider FileSystem will fetch below…
Pradeep Shanbhag
  • 437
  • 5
  • 8
  • 19
0
votes
1 answer

Basic recursive enumeration explanation

I have a simple class that computes and ultimately prints all possible combinations of X amount of 6-sided die, using recursive enumeration with a process function. However, while this program works (using found algorithms for the enumeration…
HunterM267
  • 199
  • 1
  • 12
0
votes
4 answers

Replace character at specific index in List, but indexer is read only

This is kind of a basic question, but I learned programming in C++ and am just transitioning to C#, so my ignorance of the C# methods are getting in my way. A client has given me a few fixed length files and they want the 484th character of every…
Jeff.Clark
  • 599
  • 1
  • 5
  • 27
0
votes
1 answer

Outlook VBA work with public store folder

I am trying to add events to an outlook calendar in a public store (e.g. a PF store which doesn't belong to any particular user) How to I reference that folder (calendar) to be able to work with items in it? Enumerating by path (and the code below)…
Zephyr Mays
  • 477
  • 3
  • 7
  • 24
0
votes
1 answer

vba grabbing minimum-repeated memeber(s) in one dimensional string array

I used following function to gather most frequent member in array column: Function MosFreqinsimplearr(ByRef arrin As Variant, colindx As Integer) As Variant Dim i As Integer Set dic = CreateObject("scripting.dictionary") On Error Resume Next xMax…