Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
71 views

When editing an array of enumeration with unknown size in Dymola (2025x r1), it is possible for the user to set a value to the array which is not a vector: type Catalogue = enumeration(A "A",...
AngeliqueR's user avatar
1 vote
1 answer
83 views

I am trying to understand the behavior of iterators in Python, particularly when using the copy.copy() and copy.deepcopy() functions. I have the following script: import copy my_list = ["a",...
shannu_boi's user avatar
4 votes
2 answers
168 views

In C17's final draft N2176, in the 1st paragraph of 6.2.1 it says member of an enumeration is called an enumeration constant. in the 7th paragraph 6.2.1 it says Each enumeration constant has scope ...
Cinverse's user avatar
  • 333
1 vote
0 answers
154 views

In short, I think, Delphi compares four byte enumeration values as Integer (signed), not as Cardinal (unsigned), as opposed to the documentation: Finally, if an enumerated type is declared in the {$...
malom's user avatar
  • 243
0 votes
1 answer
45 views

I am trying to join to tables together in vb.Net using linq to return the distinct count of the primary keys, and I can't quite seem to get the syntax Here's the code to create the tables Dim ...
josmond's user avatar
  • 17
0 votes
0 answers
56 views

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
3 votes
2 answers
129 views

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,437
0 votes
2 answers
123 views

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,899
0 votes
0 answers
135 views

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
  • 53.4k
0 votes
1 answer
39 views

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,555
0 votes
1 answer
1k views

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
90 views

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 ...
Avicii4ever's user avatar
1 vote
2 answers
160 views

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
80 views

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
  • 842
0 votes
1 answer
62 views

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
130 views

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
237 views

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
  • 373
0 votes
3 answers
166 views

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
48 views

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
101 views

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
  • 571
-1 votes
1 answer
154 views

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
157 views

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
  • 432
0 votes
1 answer
53 views

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
238 views

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
47 views

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
62 views

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
110 views

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
  • 42.2k
3 votes
2 answers
554 views

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
500 views

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
70 views

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,784
5 votes
3 answers
232 views

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,549
2 votes
1 answer
130 views

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
281 views

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
  • 79
1 vote
1 answer
733 views

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
190 views

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
  • 53.4k
3 votes
2 answers
408 views

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,128
0 votes
1 answer
119 views

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
100 views

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
123 views

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
40 views

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
145 views

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
289 views

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,254
0 votes
1 answer
111 views

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
264 views

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
31 views

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
31 views

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
91 views

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
756 views

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
  • 67
1 vote
1 answer
367 views

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
3 answers
144 views

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

1
2 3 4 5
39