Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

How do I enumerate registry entries in powershell with wmi?

I'm trying to enumerate the registry valuenames in FirewallRules. The code I have is not working, what is wrong with it? $HKEY_LOCAL_MACHINE =2147483650 $Key = "SYSTEM\CurrentControlSet\Services\...
KingVoodoo's user avatar
0 votes
0 answers
19 views

How to enumerate all Documents/tabs of a DockPanel?

This is using DockPanelSuite in winforms. I have a DockPanel dockMain with many tabs on it, including FloatWindows. I have a function that is supposed to check if a tab exists with a certain name, and ...
CocoaMix86's user avatar
0 votes
0 answers
149 views

Unable to provide permissions to USB device on android 14

I am new to Android studio, I am trying to read a rotary data connected to my machine using USB. I could able to read data from /dev/ttyACM0 using cat command. I have created a basic application with ...
mohammed aqdam's user avatar
3 votes
2 answers
100 views

Enumerating all possible lists (of any length) of non-negative integers

I would like to generate/enumerate all possible lists of non-negative integers such that the algorithm will generate lists like the following at some point [1] [24542,0] [245,904609,848,24128,350,999] ...
2080's user avatar
  • 1,417
0 votes
2 answers
104 views

Converting an element of enum class type into its matching string

I have an enum class, I'm trying to create a function that will return a string of its matching enum class member. For example if I have the following enum class: enum class SignalState { red, ...
tadm123's user avatar
  • 8,766
0 votes
0 answers
100 views

Can this Discrete Program Search have improved asymptotics in Haskell?

I've been researching how to use optimal evaluation to optimize Discrete Program Search and I arrived at a simple solution that seems to be really effective. Based on the following tests: f 1001101110 ...
MaiaVictor's user avatar
  • 52.8k
0 votes
1 answer
28 views

Collection.Count shows zero even though Collection.GetEnumerator.Current contains a reference after MoveNext()

Note: An answer in either VB.NET or C# will be fine. I have no preference for this Q&A. I'm trying to test my networking code and I'm running into a very strange problem: the GatewayAddresses ...
InteXX's user avatar
  • 6,357
0 votes
1 answer
345 views

Typst Report-Style Enumeration

I would like to modify Typst's #enum function to number every paragraph within my document following a technical report style. For example + Paragraph 1 + SubParagraph 1 + Sub-SubParagraph 1 + ...
user20383837's user avatar
-1 votes
1 answer
81 views

How to call a Swift enum function to get string in objc?

I have this enum in Swift SDK, and need to print the description as a debug message. @objc public enum ResultCode : UInt16 { case noError = 0x0000 @objc public func description() -> String ...
ChengEn's user avatar
  • 107
1 vote
2 answers
141 views

static java reflection - enum of fields of a class (pre-compilation)

is there a type of reflection in Java that provides simply an enum of the fields in a class? The information is, afterall, "precompilation-static". Why should it not be compiled into the ...
avertx's user avatar
  • 37
1 vote
1 answer
69 views

Is enumeration over custom union type possible? [duplicate]

Having a disjoint union type like this: type yolo = | A | B | C Is it possible in OCaml to iterate/enumerate over each possible value of type yolo without prior knowledge of how many/what these ...
zajer's user avatar
  • 803
0 votes
1 answer
56 views

Managing enumeration members in header files

In an application I am developing, there is a header file responsible for the entire functions of an ADC, let's call it adc.h. Where there is an enumeration indicating the input PINs used in the ADC. ...
Geisterfahrer's user avatar
0 votes
2 answers
119 views

Enumerate unique multiples of numbers

Suppose we're given an array of positive numbers M, say [3, 5, 7] and we want to enumerate all numbers which are multiple of any one of them, less than some upper bound, say K, so in this case 0, 3, 5,...
bihariforces's user avatar
-2 votes
1 answer
185 views

Delphi - Binary OR values from an enumerated type

I have a variable declared from an enumerated type. I would like to binary OR values from this enumeration to the variable. type TValues = (vValue1 = $01, vValue2 = $02); procedure BinaryOR; var ...
bluscape's user avatar
  • 363
0 votes
0 answers
10 views

How to collapsed record into one based on start date and end date of record in R

I have a dataframe that I'd like to have a column label collapse record based on 2 condition: Overlapping: the second event start date is either the same with first event start date or between first ...
yue007's user avatar
  • 1
0 votes
3 answers
142 views

DropDownListFor selected value returns null in the Enum property Model on form POST in ASP.Net Core MVC

I have a form page with DropDownlistFor or select as below: <select asp-for="LeaveType" class="form-control" style="max-width:180px" asp-items=&...
hms's user avatar
  • 33
2 votes
0 answers
38 views

Seeking Efficient Enumeration Strategies for Graph Partitioning

I am currently working on a class project that involves partitioning a non-directed graph, possibly weighted, into p classes. The objective is to minimize the sum of the weights of the edges between ...
Goliaaath's user avatar
1 vote
1 answer
70 views

Trying to import csv string value, with variable within string? [duplicate]

I'm a bit stuck trying to use param values in a string, imported from within a CSV. I've tried a few methods, and can't seem to enumerate the parameter within the string. First of all I have a csv ...
Kareem's user avatar
  • 556
-1 votes
1 answer
122 views

How do I get a list of possible names/values from System.Net.SecurityProtocolType [duplicate]

I wish to present a drop down list of the System.Net.SecurityProtocolType available on the server that the code is running from (The servers are different) So I wish to do the working equivalent of ......
MarkEMarkEMark's user avatar
1 vote
1 answer
128 views

Efficient calculation of all permutations mapping a vector into another in Python?

Given two vectors, I would like to calculate (in Python) all permutations (as vectors of coordinates) which map the first vector into the second. The vectors are given as numpy arrays of the same ...
gabalz's user avatar
  • 413
0 votes
1 answer
48 views

Enumerated with default value, but not name

public class Document { @Id @Column(name = "id") @GeneratedValue private Long id; @Column(name = "type") private Long subjectType; @Column(name = &...
Aleksandr Berestov's user avatar
0 votes
1 answer
184 views

How do I setup my coroutine to go through each character's turn, one by one?

I am trying to set up a Turn-based combat system in Unity where I can step through each of the character's turns, and on the player's turn, get some input. I have heard coroutines & IEnumerators ...
Terrible-Coder6776's user avatar
0 votes
0 answers
46 views

Getting Bytes Per Sector using WMI in C# by only knowing the Partition Letter

For my application, I need to determine the best drive / partition. The requirements are as follows: 20GB or more free The drive must be fixed (as in, it mustn't be a detachable USB Drive, etc) The ...
bari eune's user avatar
0 votes
0 answers
47 views

Python - Emumerating all possibilities of a list with duplicates in it [duplicate]

Hello there here's the problem : I have this code : from graphes import Graphe def permutations(liste): """ Génère toutes les permutations d'une liste donnée. Entrée: ...
Louis Declerck's user avatar
0 votes
0 answers
57 views

Is there any way to override the name of enum in scala?

I am new to the Scala. I am sorry if it's just basic one. I want to have a way where I can Override the enum name using any method. object ErrorCode extends Enumeration { type ErrorCode = Value ...
sagar.musale's user avatar
0 votes
1 answer
98 views

How to write a function defined for a subset of all enumeration values?

Suppose I've got enumeration A : object A extends Enumeration { type A = Int; val A1 = 1; val A2 = 2; val A3 = 3 } Also, I have a function defined only for A1 or A2 but not for A3. def foo(a: A): Int ...
Michael's user avatar
  • 42k
3 votes
2 answers
329 views

HashTable enumeration with unexpected results

This may be a dumb question so please be kind LOL. I'm trying to wrap my head around something I just ran into. First I have a HashTable that I can enumerate using the following: $ht = [hashtable]@{&...
Matthew McDonald's user avatar
0 votes
1 answer
263 views

JAXB Maven plugin won't generate Java enum

I have the following snippet in my XSD file. I would expect that it generates a Java enum with the two elements STANDALONE and CONNECTED. <xs:attribute name="Sample"> <xs:...
olimtrail's user avatar
-1 votes
1 answer
47 views

How to define a type with enumerated strings in RELAX NG?

Still learning RELAX NG (wondering whether I should learn XSD instead), I got my element hierarchy mostly right, so I'm working on contents: One element (Unit) uses an enumeration type (a fixed set of ...
U. Windl's user avatar
  • 4,315
5 votes
3 answers
217 views

Efficiently enumerate all subsets with difference constraints in R

I have a vector V of consecutive integers of length l , e.g., 1, 2, 3, 4, 5, 6, 7. I want to find all subsets of size k such that the difference between any two numbers in the subset can be no less ...
Noah's user avatar
  • 4,375
2 votes
1 answer
104 views

Assigning the same number to multiple enum members [duplicate]

If I assign the same number to the variables in the enum structure, which one will it call? It varies according to the same number of values ​​I give, 2 same value or 3 same value. Sometimes first ...
Emirhan Şen's user avatar
0 votes
1 answer
205 views

Have Description of Enum show as a tooltip in Razor page

I'm trying to have a tooltip show up in a dropdown consisting of enum values in a Razor page in a MVC application(see screenshot below). I see other posts referring to using the Title attribute so I ...
ray805's user avatar
  • 61
1 vote
1 answer
516 views

Pycharm gives a warning with an enum created using functional syntax

I am writing an enumeration using function-call (functional) syntax, like this: from enum import Enum Color = Enum('Color', ['RED', 'GREEN', 'BLUE']) myColor = Color.RED print(myColor) The ...
DrVicious's user avatar
2 votes
2 answers
156 views

How to efficiently enumerate binary black-white trees, while accounting for symmetry?

Consider the following type of black-white binary trees: data BW = Black BW BW | White BW BW | Leaf Nat With the following equivalence relation: ∀ a b c d . Black (White a b) (White c d) == White (...
MaiaVictor's user avatar
  • 52.8k
3 votes
2 answers
363 views

Validate csv by checking if enumeration columns contains any invalid coded values

We recieve many different csv files from external labs and centers. When recieving such a file, we first need to do some QA checks before further processing. So make sure the data is correct, at least ...
BdR's user avatar
  • 3,018
0 votes
1 answer
112 views

Is this design introducing Circular Dependency?

Supposed I have two types of customers - Regular and VIP. I would like to give discounts to them based on CustomerType and their attributes. I have following design in my mind: class Customer { ...
Pandey's user avatar
  • 91
0 votes
2 answers
87 views

How to store enums in external file and import in java code

How to store enum in separate file and import in java code. In the following code I have created enum for hostMessages. In that, it has more than 3000 errorcodes. So it is failing to compile. So I am ...
Gugan A R's user avatar
1 vote
1 answer
99 views

Is enumerating combinations of k values from k sets of n values each (one value from each set) polynomial time?

Suppose I am writing a program to enumerate all possible combinations of k values, where each combination contains one value from each of k sets. Each set has n values each. The input to the program ...
thunderbird30's user avatar
-1 votes
2 answers
28 views

Creating Question Drill Down with Nested Enums

I have a view controller that will show users a "question drill down", where answering one question shows the next assigned question based on the previous answer. I'm trying to figure out ...
Alex Ritter's user avatar
  • 1,041
0 votes
1 answer
134 views

How can I find the least number of segments to get from start point to end point using Python?

So, I have start number, end number and a list of segments. start = 10 end = 100 li = [(50, 60), (10, 20), (10, 40), (40, 60), (60, 80), (75, 95), (95, 100), (35, 45)] And I need to find the least ...
Ionnafan's user avatar
2 votes
2 answers
182 views

Python: Solving "Generate Parentheses" with Backtracking --> Confused About stack.pop()

I am trying to understand the backtracking code below: class Solution: def generateParenthesis(self, n: int) -> List[str]: stack = [] res = [] def backtrack(openN, ...
PineNuts0's user avatar
  • 5,214
0 votes
1 answer
88 views

Why do I get an enumeration error using xlwings to return the result of an Excel add-in function?

I have an Excel addin that has a formula I would like to use. I have xlwings update the spreadsheet with the formula and then get the value of the formula. I have had numerous times where I have ...
carljong2019's user avatar
-2 votes
3 answers
192 views

I want to use the indexes I got from enumerate() for slicing the word. I can't find how to do it [duplicate]

I am working with a word which is input by the user. Example: "where". I need to find the first vowel and start the word from it, and place the beginning of the word to the end. First I want ...
DKzK's user avatar
  • 1
0 votes
1 answer
29 views

Backchange enumeration mistakes

I have to change an array with an enumeration. It´s made of 0.0025 steps, but because of a methode I use it changes slightly. So it looks kind of like this: [0, 0] [0.002499989, 1] [0.0049989, 2] [0....
vinc00's user avatar
  • 55
0 votes
1 answer
28 views

Can I apply enumeration to a schema element only in specific situations?

In my XML Schema, I have an element that looks like this: <xs:element name="food"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded&...
jmwink's user avatar
  • 45
1 vote
1 answer
82 views

Is there a compiler attribute to decrement enumerator-list values/enumeration-constants (in C)?

When you declare a enum, the constant values of the enumerator-list automatically increment. E.g. typedef enum{ TEST0 = 0, TEST_X, // automatically will be 1 TEST_Y, // ...will be 2 ... }test_t; ...
EmbeddedAlex's user avatar
0 votes
1 answer
632 views

Test-NetConnection behaves differently in one specific port

I'm currently finishing the Try Hack Me's "Hacking with Powershell" room. In the last challenge, you are supposed to write a script to find all open ports within a range [130-140]. Here is ...
Jon A's user avatar
  • 66
1 vote
1 answer
319 views

Python string matching to a string in a list on indices and return a value in the list based on most matches

I am passing a string argument into a function that I want to match as closely as possible to an item in a list. The layer of complexity added here is that the argument and items in the list will all ...
R.T. Canterbury's user avatar
2 votes
2 answers
96 views

Better way to rotate index back to first element in `for` loop with enumerate() in Python

I hope more experienced users in Python will be able to help me make this more efficient: If I need cyclic operations, for example if the last element of an array needs to be connected to the first ...
MathX's user avatar
  • 134
0 votes
2 answers
210 views

Processing large strings only a lot of numbers in C#

We need to process a lot of strings, which contain many numbers (formatted as strings) and are separated by an arbitrary character. Ex: numbers separated by a space: var s = "1234.555 43434.43 ...
R. Hoek's user avatar
  • 1,106

1
2 3 4 5
39