Questions tagged [hashtable]

A hash table in programming is a collection that uses a hash function to map identifying values (keys) to their associated values.

The basic advantage of a hash table is that they provide very efficient lookup and search functionality. Unlike many other linear collection types (such as arrays and linked lists), one does not have to loop through all the elements in a hash table searching for a particular entity.

For Java: https://docs.oracle.com/javase/8/docs/api/java/util/Hashtable.html

5453 questions
2
votes
1 answer

Shell script hash table

I'm trying to translate a .bat file into a .sh script. Several parameters are passed to the script, one of these being a hash table. The code looks like... date /T time /T FOR /F "tokens=1-11" %%A IN (%4) DO ( set args1=%%A %%B %%C %%D %%E %%F…
user1795370
  • 332
  • 2
  • 4
  • 18
2
votes
1 answer

how to store an hashtable or object in cookie

How to store object or hashtable in cookies? I am trying to store multiple values in hastable/class to the cookie in my asp.net mvc (C#) application. How to do it?
Prasad
  • 58,881
  • 64
  • 151
  • 199
2
votes
3 answers

One array or many? (hash table)

I've an array that is being used to store the conversion factors for a conversion program I'm currently working on. A short Example: var Length = { "lengthsA" : { "inch" : 0.0254, "yard" : 0.9144, "mile" : 1609.344, "foot" : 0.3048, …
null
  • 3,469
  • 7
  • 41
  • 90
2
votes
2 answers

Directly access value based on another value in anonymous array of hashes

Given the following anonymous array of hashes: $AoH = [ { 'FORM_FIELD_ID' => '10353', 'VISIBLE_BY' => '10354', 'FIELD_LABEL' => 'ISINCIDENT', 'VALUE' => '', …
Namuna
  • 1,030
  • 8
  • 16
2
votes
2 answers

Type.InvokeMember when method has a Dictionary parameter

I am getting a Method 'MyNameSpace.MyClass.MyMethod' not found. when I changed a parameter of MyMethod from Hashtable to Dictionary. The invoke call is return = t.InvokeMember("MyMethod", (BindingFlags.DeclaredOnly |…
Sam Leach
  • 12,746
  • 9
  • 45
  • 73
2
votes
3 answers

About the HashMap, rehashing

Directly from this javadoc: An instance of HashMap has two parameters that affect its performance: initial capacity and load factor. The capacity is the number of buckets in the hash table, and the initial capacity is simply the capacity at…
Rollerball
  • 12,618
  • 23
  • 92
  • 161
2
votes
2 answers

Using dynamic array to handle collisions in hash tables

Looking around at some of the hash table implementations, separate chaining seems to be handled via a linked list or a tree. Is there a reason why a dynamic array is not used? I would imagine that having a dynamic array would have better cache…
DavidL
  • 905
  • 3
  • 10
  • 14
2
votes
1 answer

Simple Hash Table Excel VBA

I'm a long user of arrays in VBA but I recently learned a bit about hashing and I was wondering if I could use that to build more efficient searches in my arrays. To keep it specific, what I did was to turn a two dimensional array into a dictionary…
user2491612
2
votes
1 answer

OCAML hashtbl remove specific bindings

I am using a hash table as a multi-mapping and I want to remove any of the previous bindings. The Hashtbl.remove just removes the current binding. I am thinking of something like remove hash x y which removes the binding of y to x. If there are…
Sludge
  • 123
  • 3
2
votes
2 answers

Frequently Used metadata Hashmap

Are there any implementations of a static size hashtable that limits the entries to either the most recently or most frequently used metadata? I would prefer not to keep track of this information myself. I know most caching components keep track of…
monksy
  • 14,156
  • 17
  • 75
  • 124
2
votes
1 answer

longest common sub-string, Python complexity analysis

I built a function which finds the longest common sub-string of two text files in ascending order based on Rabin–Karp algorithm. the main function is "find_longest" and the inner functions are: "make_hashtable","extend_fingerprints" and…
GroundIns
  • 541
  • 1
  • 5
  • 11
2
votes
2 answers

How to access/iterate over all non-unique keys in an unordered_multimap?

I would like to access/iterate over all non-unique keys in an unordered_multimap. The hash table basically is a map from a signature that does indeed occur more than once in practice to identifiers . I would like to find those entries in…
Stefan
  • 1,131
  • 2
  • 12
  • 30
2
votes
5 answers

C# dictionary vs list usage

I had two questions. I was wondering if there is an easy class in the C# library that stores pairs of values instead of just one, so that I can store a class and an integer in the same node of the list. I think the easiest way is to just make a…
James Joshua Street
  • 3,259
  • 10
  • 42
  • 80
2
votes
2 answers

hastables on java card

I'm new on Java Card applications. At this moment I would like to store a hash table (dictionary) that contains the configuration of a terminal that reads this type of cards. If the hash table has values, those must be retrieved to the terminal (I…
2
votes
2 answers

why is Hashtable not a part of Java Collection framework?

I usually work in non multi threaded environment so usually go for HashMap instead of Hashtable. I know the difference between both and I also know Hashtbale was introduced way before Java Collection framework was introduced. If we go through…
Aniket Thakur
  • 66,731
  • 38
  • 279
  • 289
1 2 3
99
100