Questions tagged [enumeration]

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

Use for enumeration types.

1894 questions
0
votes
2 answers

InvalidOperationException when adding items to a combobox in an event

I'm making a fairly simple SQL Server Database/Table selector in WPF, and, similar to SSMS' "Connection Properties" tab (when clicking the Options button), want an item in a combo box that will connect to the server, find a list of databases or…
Zalerinian
  • 101
  • 13
0
votes
1 answer

Why my if statement doesn't work for length > 1?

associationRules.csv = #I'm only displaying some lines here for my case ,antecedents,consequents,confidence 19,"(LM = 20, SMOK = y)",(DIAB = n),0.5 20,(LM = 20),"(DIAB = n, SMOK = y)",0.5 21,"(DIAB = n, RCA = 85, LM = 15)",(SMOK = y),1.0 175,(RCA…
user91
  • 365
  • 5
  • 14
0
votes
1 answer

How to implement a function that returns an "enumeration" of objects?

I am working on a project about design patterns using Java. The class diagram before using the design patterns is provided in the link. Since I am new to Java, some of the classes methods descriptions is ambiguous for me. For example in a class…
Mai
  • 121
  • 1
  • 10
0
votes
3 answers

Passing specific login credentials to custom commands from fixtures

I am attempting to utilize Cypress for various forms of testing, and have hit a snag with what I believe is syntax. I have generated a fixtures JSON file that contains two forms of ID under a name in the following format: "USER": { "stationID":…
Conocobhar
  • 11
  • 3
0
votes
1 answer

Enumerating WMI on Windows Server 2016 is significantly slower

I am using a simple vb script to get CPU0's load percentage, but the WMI enumeration is significantly slower on Windows Server 2016 then older versions and I need to optimize the speed. Here's my short script: Option Explicit Dim objWMIService,…
0
votes
2 answers

USB behavior not as expected

I am porting the USB driver from the STM32F4 device to STM32L4 device. It almost works. During the enumeration it sends and receives the information, but the data is not exactly the same as from the "plain" STM Cube generated project. II have the…
0___________
  • 60,014
  • 4
  • 34
  • 74
0
votes
0 answers

Is it possible to disable OS information in ElasticSearch?

ElasticSearch API can retrieve OS details with this API request: http://IP:9200/_nodes/os/ Is there a way to disable this feature? thx
0
votes
2 answers

Setting the currently selected item of a radio button to a value for use in a object constructor

Hey there, I have a Dog class, which has a constructor which takes, int Id, string Name, and SizeType sizeType values. The user can specify all these values from the user interface by typing into the text box for id and name, however for sizetype…
Ari
  • 73
  • 1
  • 1
  • 3
0
votes
1 answer

use xx.contain(xxx) in struts2 tag

Hi: This is the related eneities in my app: @Entity @Table( name = "t_user") public class User { private int id; private List role; @ElementCollection( targetClass =…
hguser
  • 35,079
  • 54
  • 159
  • 293
0
votes
3 answers

Rewite for in 0...n loop by map

I have a swift code like below var items: [Item] = [] for i in 0...20 { items.append( makeItem(atIndex: i) ) } would it be possible to rewrite above like var items: [Item] = [0...20].map { makeItem(atIndex: i) }
Bigair
  • 1,452
  • 3
  • 15
  • 42
0
votes
1 answer

Swift reduce - why is value optional?

Why is total optional on line return total + 1? return first.enumerated().reduce(0) { total, letter in let index = first.index(first.startIndex, offsetBy: letter.offset) if first[index] != second[index]{ return total + 1 } return…
Turnipdabeets
  • 5,815
  • 8
  • 40
  • 63
0
votes
4 answers

Function that does loop over various enum

For example, let be enum and let us loop over it enum Main_menu { NewGame, Options, AboutAuthor, Exit } static void Main(string[] args) { int k = 0; foreach (Main_menu item in Enum.GetValues(typeof(Main_menu))) { …
0
votes
0 answers

enumerate python using different start values

for index, value in enumerate(array_seller_name, start= 1): sheet.update_cell(index, 1, array_seller_name[index]) I'm trying to update google sheet with values from array. My problem is that index in google sheet has to start from 2 and index used…
who_am_i
  • 35
  • 1
  • 6
0
votes
1 answer

Python Script to enumerate registry

from _winreg import * areg=ConnectRegistry(None,HKEY_LOCAL_MACHINE) akey=OpenKey(areg,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall") count=0 for i in range (1024): try: subkey=EnumKey(akey,i) asubkey = OpenKey(akey,…
VRK
  • 3
  • 6
0
votes
2 answers

enumerating over the alphabet from 'a' to 'zzz'

I'm wondering if it is possible to enumerate over the alphabet from 'a' to 'zzz'? For example I have a cave system that contains a maximum of 1000 caves and I would like to assign a char value to each of them. 1 = a, 2 = b, 3 = c ... 27 = aa etc…
bdg
  • 465
  • 6
  • 18