The tag has no wiki summary.

learn more… | top users | synonyms

-4
votes
0answers
30 views

Dictionary - Find the key by entering the value [migrated]

i have a little code but i don't know how to find the key in a dictionary by using the value. Here i have my code and what i want to do: NAMES = ['Alice', 'Bob', 'Cathy', 'Dan', 'Ed', 'Frank', ...
-2
votes
0answers
36 views

Example cases for each data structure? [closed]

I've been looking all over the Internet for a page that lists cases for when to use each abstract data type. I expect that reading through a series of both surprising and obvious uses for each type ...
0
votes
0answers
66 views

C# Linq question [migrated]

I am desperately trying to understand linq and now I have a concrete example of what I want to do (and fail): Console.WriteLine("{0}", (from myaddresses[x].PostalNr where x => ...
22
votes
4answers
11k views

Why store a function inside a python dictionary?

I'm a python beginner, and I just learned a technique involving dictionaries and functions. The syntax is easy and it seems like a trivial thing, but my python senses are tingling. Something tells me ...
5
votes
5answers
8k views

Efficient methods for storing tens of millions of objects for querying, with a high number of inserts per second?

This is basically a logging/counting application that is counting the number of packets and counting the type of packet, etc. on a p2p chat network. This equates to about 4-6 million packets in a 5 ...
0
votes
0answers
34 views

I have URL and ID pairings, and I send the URLs to an API which it returns in no specific order. How should I pair them back up?

This is a programming problem that I haven't came across yet and I want to make sure I'm tackling it in an efficient manner. I have an array of dictionaries, with each dictionary consisting of a ...
0
votes
2answers
193 views

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

Efficient solution for dictionary updates

Let's start with the problem: There is a large dictionary X that contains {key, value} pairs, i.e.: X = [{100, 10}, {101, 0}, {103, 0}, {106, 2}, {110, 1}] Every t seconds, X has to be updated ...
0
votes
3answers
197 views

Class or Dictionary

I want to create a immutable Scale class in C#. public sealed class Scale { string _Name; string _Description; SomeOrderedCollection _ScaleValueDefinitions; Unit _Unit // ...
0
votes
1answer
121 views

Algorithm for compression of a dictionary (words and definitions)

The theoretical situation is this: Let's say that we have a digital dictionary (by which I mean a traditional list of words and definitions, not an associative array). For the sake of simplicity, ...
0
votes
1answer
564 views

Fast lookup hash map implementations

I'm in the process of implementing a programming language on top of LLVM. For my polymorphic system, I'm looking for suggestions for a ultra-fast dictionary. I am not concerned with insert time, as ...
3
votes
2answers
450 views

History of Associative Array?

In quite a lot of modern scripting languages (e.g. Perl, Python, Ruby, PHP, Lua, JavaScript), associative arrays are supported as a primitive or first-class data type (with various names like map, ...
5
votes
2answers
312 views

What is a good way to keep track of strings for dictionary lookups?

I am working through the Windows 8 app tutorial. They have some code about saving app data like so: private void NameInput_TextChanged(object sender, TextChangedEventArgs e) { ...
4
votes
2answers
394 views

What are the relative advantages of dictionaries versus databases?

I have an environment that supports both dictionaries (json style) and databases (not relational or anything, just formatted data by row and column). My application doesn't really need database ...
6
votes
3answers
7k views

Practical size limits of a Hashtable and Dictionary in c#

What are the practical limits for the number of items a C# 4 Dictionary or Hashtable can contain and the total number of bytes these structures can reasonable contain. I'll be working with large ...
3
votes
2answers
1k views

Should I use a Class or Dictionary to Store Form Values

I am working on a C# .NET Application, where I have a Form with lots of controls. I need to perform computations depending on the values of the controls. Therefore, I need to pass the Form values to a ...