Skip to main content

Questions tagged [dictionary]

0 votes
1 answer
158 views

I have an excel macro that imports daily share price files, and finds the highest price for a share after a given date. Each of these daily stock price files has ~1000 rows of data. Currently I have ...
Frankie139's user avatar
1 vote
1 answer
114 views

I'm looking for a method to map the content of a structured text file to a nested dictionary (dictionary tree). The text file consists of (nested) sections with each section starting with the pattern ...
user71769's user avatar
  • 121
3 votes
5 answers
2k views

I am designing a program and I am looking to decide over a Dictionary vs a List. Since I know I have unique values per item I imagined a Dictionary/List that looks like: Dictionary<(int k1, string ...
Ranald Fong's user avatar
1 vote
1 answer
139 views

I'm implementing an API key based authentication scheme and I'm caching valid API key entries (hash, scope etc.) in a memory cache. For the cache key, I had been using the first 8 characters of the ...
Daniel Vernall's user avatar
1 vote
1 answer
104 views

I am playing around with a cross-language spell-check sort of thing, and am still in the prototyping/ideation phases. Basically I have thought of something like a Trie data structure, but I keep ...
Lance Pollard's user avatar
7 votes
1 answer
3k views

In Python there are basically two ways to get a value from a dictionary: dictionary["key"] dictionary.get("key") Is there any - maybe historical - reason for this behavior? I ...
Thomas Junk's user avatar
  • 9,623
0 votes
0 answers
142 views

I am working on a ChildModelListSheetHandler, that has a childModelListDict. As what you're probably thinking, it maps the foreign keys that are the IDs of the parent models, to the list of child ...
Mike Warren's user avatar
2 votes
1 answer
869 views

In the simplest case, I have some code where the user may want to do one thing (a), another thing, (b), or both (a+b). The options are reasonably complex and have their own functions, but I would like ...
QuantumChris's user avatar
0 votes
1 answer
2k views

I have a list of python dictionaries (let's assume each dict is flat for the time being). The keys are all strings and the values are strings or real numbers. I would like the user to have the freedom ...
najeem's user avatar
  • 125
1 vote
2 answers
2k views

What is the intended usage of the ImmutableDictionary<TKey,TValue>.ValueComparer property? Why is it useful being able to compare dictionary values by using a specified equality semantic? I ...
Enrico Massone's user avatar
-4 votes
4 answers
3k views

Given an array of integers, we want to find how many explicit pairs can be made such that their sum is divisible by 60. The pairs are not necessarily non-unique. For example, let's say the input into ...
8protons's user avatar
  • 1,389
0 votes
1 answer
3k views

If python dictionaries are essentially hash tables and the length of hashes used in the python dictionary implementation is 32 bits, that would mean that regardless of the number of key-value pairs ...
MShakeG's user avatar
  • 127
-2 votes
1 answer
88 views

I have million of objects, each with an array smaller than 10 elements, which are the names of other objects in the dataset. Basically { a:[b,c,d,], b:[c,d,e], c:[a,e,f], ... e:[a,b,c] } will ...
DsCpp's user avatar
  • 97
0 votes
1 answer
2k views

my_dict = { 1: 11, 2: 12, 3: 13 } If I want to work on the list of keys from my_dict there appear to be (at least) three ways to do this in Python >3.5 (i.e. on or after PEP 448) List Comprehension: ...
dumbledad's user avatar
  • 317
1 vote
3 answers
557 views

Array := {"title": "Book Title", "author": "John Doe"} Some people use the following terminology: title and author are keys. Book Title and John Doe are values. "title": "Book Title" and "author": "...
john c. j.'s user avatar

15 30 50 per page
1
2 3 4 5