Class or Dictionary
I want to create a immutable Scale
class in C#.
Class or Dictionary
I want to create a immutable Scale
class in C#.
why my whole dictionary 1 values change when get a new value
I wrote a code to catch values in a dictionary as another dictionary value but when I run the code second values over write on pervious value.
Long dictionary/map key vs shorter key + equality check for an auth cache
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 base 64 representation of the key hash. I did this because there are 64^8 (281,474,976,710,656) possible keys, so I thought that would be more than enough.
Critique the Structure of my Horse Racing Betting Platform
I am creating a program (mostly just for fun) that displays live prices for horse racing markets and the prices that several models predict they should be. I am very interested in the optimal way to structure this kind of data.
Critique the Structure of my Horse Racing Betting Platform
I am creating a program (mostly just for fun) that displays live prices for horse racing markets and the prices that several models predict they should be. I am very interested in the optimal way to structure this kind of data.
In Python, is there any difference (apart from a few listed exceptions) between classes and dictionaries?
My logic goes like this:
Efficiency of C# dictionaries
C# dictionaries are a simple way to find if something exists etc etc. I have a question though on how they work. Let’s say instead of a dictionary I use an ArrayList. Instead of using ContainsKey
(or an equivalent method in another language) I loop through the ArrayList to check if something exists there (or performing binary search if data is sorted or something similar). What’s the difference in efficiency? Is the ContainsKey
method using some more efficient way rather than looping through the keys and check if what I am searching exists?
What are the advantages of linear probing over separate chaining or vice-versa when implementing hash tables?
I’ve been brushing up on algorithms and reviewed these two methods of implementing hash tables. It seems like they largely have similar performance characteristics and memory requirements.
Why should I use namedtuple over SimpleNamespace when not using dict, they seem very similar
At one point or another you might come over functions with a lot of arguments. Sometimes it makes sense to combine some of the arguments into super-arguments. I’ve often done this with dicts, but now I’m looking at better ways of doing it.