Skip to main content
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
3 votes
2 answers
259 views

Is iteration order of a set in Python preserved until that set is modified?

According to the Python documentation, set is a mutable unordered collection. Usually, it's implemented as a hash table that stores references to objects as its keys. Comparing to dict (which is also ...
SLebedev777's user avatar
8 votes
3 answers
1k views

How can I create an array of arrays of strings of varying lengths in C?

I am trying to solve the problem posed in this question. Here the OP asks that given a 15 element set, its 2^15 element power set be generated in a manner such that the elements of the power set are ...
uran42's user avatar
  • 469
4 votes
2 answers
172 views

Combination generator written in C : works for big n but for small n when n=0 or n=k crashes saying "segmentation fault"

Let's say I have a box and there is a bunch of balls in that box. I can label each ball with a character while making sure no two balls get the same character as labels. I get a string this way. Let's ...
uran42's user avatar
  • 469
0 votes
3 answers
81 views

How Do Sets and Set Comparisons Work in Python? [duplicate]

I'm learning Python coming from some beginner-level experience with Java. It all makes sense for the most part, but one of the exercises kind of made me wonder what actually happens within Python. ...
Lucas Durrant's user avatar
0 votes
2 answers
49 views

How can I add elements to an existing Set in GAMSPy?

I'm working with the GAMSPy Python API and using Set objects to define sets in a GAMS model. I can define a set like this: from gamspy import Container, Set m = Container() regions = Set(m, name=&...
user30451554's user avatar
2 votes
3 answers
202 views

Writing a Von Neumann Ordinal generator in C : Problem with malloc

I want to write a computer programme that will do the following things : 1a. It will make an array 3 characters long. £££ 2a. It will then initialize the array with the string "{_}" and ...
uran42's user avatar
  • 469
1 vote
2 answers
59 views

A dead loop problem in JavaScript about Set

Why the following code caused dead loop? const s = new Set([1]); s.forEach(e => { s.delete(e) s.add(e) }) I tried to change the order about delete and add operation,the dead loop ...
Turbo Zhang's user avatar
0 votes
2 answers
98 views

Would python function any() iterate or just locate the item if used with a hashset

to clarify, it would be used like any(set()). I am asking for efficiency sake. Example: if any(fnmatch(a,b) for a in set) where a would be an item in a set and b would be a string.
arnoldpalmer's user avatar
5 votes
3 answers
271 views

Fastest way to find the least amount of subsets that sum up to the total set in Python

Say I have a dictionary of sets like this: d = {'a': {1,2,8}, 'b': {3,1,2,6}, 'c': {0,4,1,2}, 'd': {9}, 'e': {2,5}, 'f': {4,8}, 'g': {0,9}, 'h': {7,2,3}, 'i': {5,6,3}, 'j': {4,6,8}} Each set ...
Shaun Han's user avatar
  • 2,963
0 votes
1 answer
40 views

Alternative for ajax with async true too slow

I have a serious problem with an app. I have a selection box with types of services and other below with student names. Once selected the service, the students will be filtered to the ones that are ...
machsantos's user avatar
0 votes
0 answers
56 views

Delphi Extending a set with custom values [duplicate]

I'm looking for a way to extend the tFieldType with my own custom types. I've tried type pSetExtendedFieldTypes = (ftAlpha, ftAlphaNumeric, ftNumeric); pSetNativeFieldTypes = tFieldType; pSetDataTypes ...
user2383818's user avatar
0 votes
1 answer
122 views

Why does 'set /a counter=counter+1' work without using %% in a batch script?

in this code I think I have to write set /a counter=%counter%+1 but I just tried write it without %% and interestingly it works I don't how?! can anyone explain it @echo off setlocal ...
Mikel91's user avatar
  • 33
2 votes
3 answers
138 views

How to use output iterators without a container: Set intersection without storage

The C++ reference has this example for printing the intersection of two sets (or sorted containers): #include <algorithm> #include <iostream> #include <iterator> #include <vector&...
Michaël's user avatar
  • 580
-1 votes
1 answer
35 views

Error setting sublist value Netsuite client script

I am trying to set sublist value on suietelet in a client script. Getting error as: cannot read properties of undefined reading 0. Please advise Thank You! Below is client script sample. function ...
Maira S's user avatar
  • 121
1 vote
1 answer
53 views

Automation error due to 1000+ workbooks opened and closed

Me and my colleagues have created around 14.000 copies of a certain workbook in the last 8 years or so. Pretty simple lightweight workbook, few userforms, some code, 2 sheets with a variable amount of ...
BenVenNL's user avatar

15 30 50 per page
1
2 3 4 5
810
Morty Proxy This is a proxified and sanitized view of the page, visit original site.