hashtable Questions

4

Solved

Some hashtables in PowerShell, such as those imported with Import-PowerShellDataFile, would be much easier to navigate if being a PSCustomObject instead. @{ AllNodes = @( @{ NodeName = 'SRV1' R...
Buskirk asked 29/9, 2022 at 10:35

10

Solved

What is the easiest way to convert a PSCustomObject to a Hashtable? It displays just like one with the splat operator, curly braces and what appear to be key value pairs. When I try to cast it to [...
Spinous asked 18/9, 2010 at 2:22

4

Solved

Lets suppose we were given the following two arrays String[] keys = new String[] {"a", "b", "c", "aa", "d", "b"}; int[] values = new int[...
Zinc asked 26/10, 2017 at 7:30

5

Solved

Here is my understanding of linear probing. For insertion: - We hash to a certain position. If that position already has a value, we linearly increment to the next position, until we encounter an ...
Pinchbeck asked 11/3, 2020 at 16:58

7

Solved

Can someone please explain Why my first examples don't work, and why adding in a ForEach-Object solves the problem? Thanks in advance! I parsed the return from a command into a hashtable (sample...
Benzaldehyde asked 10/5, 2011 at 18:14

16

Solved

What is the equivalent of Python dictionaries but in Bash (should work across OS X and Linux).
Tombac asked 29/9, 2009 at 18:29

10

Solved

I am trying to make a Dictionary lookup table in C#. I need to resolve a 3-tuple of values to one string. I tried using arrays as keys, but that did not work, and I don't know what else to do. At t...
Encrust asked 5/6, 2009 at 13:56

6

Solved

Is it possible to format the output of a hashtable in Powershell to output all the values onto one line? e.g. I have the hash table $hashErr with the below values: $hashErr = @{"server1" = "19...
Lefler asked 7/1, 2014 at 15:15

4

Solved

How to Store unique objects to avoid the duplicates in java Set? For example Consider Employee object which (Employee Id, name, salary....) list of employee of objects need to add in the Set. We...
Sikata asked 8/10, 2012 at 7:4

7

Solved

Does MATLAB have any support for hash tables? Some background I am working on a problem in Matlab that requires a scale-space representation of an image. To do this I create a 2-D Gaussian filt...
Nolpros asked 28/8, 2010 at 18:32

3

Solved

I am trying to create a custom hash function for some object that I'll be hashing into a dictionary. The hashing function is unique (not the standard Python one). This is very important to me: to u...
Hypochlorite asked 22/11, 2012 at 14:24

7

Solved

I can't use boost:hash because I have to stick with C and can't use C++. But, I need to hash a large number (10K to 100k) of tokens strings (5 to 40 bytes length) so that search within those are f...
Biting asked 13/4, 2009 at 13:54

8

Solved

I'm currently implementing a hash table in C++ and I'm trying to make a hash function for floats... I was going to treat floats as integers by padding the decimal numbers, but then I realized that...
Unsuspecting asked 21/11, 2010 at 13:40

2

Solved

The CppCoreGuidelines state that concepts should be specified for all template arguments. (see:T.10: Specify concepts for all template arguments) As practice for defining concepts, I am trying to b...
Louden asked 3/12, 2020 at 14:29

5

Solved

In the process of transforming a given efficient pointer-based hash map implementation into a generic hash map implementation, I stumbled across the following problem: I have a class representing ...
Tauromachy asked 27/4, 2009 at 13:24

7

Solved

I want to store a lua table where the keys are other lua tables. I know that this is possible BUT I want to be able to do look ups in the table using copies of those tables. Specifically, I want to...
Selfrising asked 8/2, 2012 at 21:20

3

Solved

This should be very simple - I need to return an array of hashtables from a function. This works when there is more than one hashtable, but when there is only one then the result is not an array. I...
Breadboard asked 2/2, 2017 at 9:1

3

Solved

I've completed speller and passed all checks. But I'm still bugged about the performance. I did my best with research and running tests, but my implementation is slower by 10-20% compared to staff'...
Teaser asked 1/3, 2022 at 19:38

11

Solved

I'm working on hash table in C language and I'm testing hash function for string. The first function I've tried is to add ascii code and use modulo (% 100) but i've got poor results with the first ...
Hydrodynamic asked 5/10, 2011 at 19:21

5

Solved

I am creating an implementation of a hash table in C for educational purposes. The hash function should return a size_t hash. Since the size of size_t is different in different platforms (and I w...
Hanover asked 18/2, 2013 at 14:8

13

If I pass the same key multiple times to HashMap’s put method, what happens to the original value? And what if even the value repeats? I didn’t find any documentation on this. Case 1: Overwritten ...
Teerell asked 3/11, 2009 at 20:17

6

Solved

I was told that one of the many reasons strings were made immutable in the C# spec was to avoid the issue of HashTables having keys changed when references to the string keys altered their content....
Exert asked 9/6, 2010 at 15:30

8

Solved

What's a correct and good way to implement __hash__()? I am talking about the function that returns a hashcode that is then used to insert objects into hashtables aka dictionaries. As __hash__() ...
Thurstan asked 25/5, 2010 at 22:56

5

Are there are differences between hashmap and hashtable in theory? I don't mean in the concrete definitions given in Java (or the implementation), but in theory. Isn't a hashtable a map that uses ...
Magus asked 7/5, 2015 at 19:41

1

Solved

I'm using Powershell desired state configuration and have a separate definition document (psd1) I load into memory via $ConfigData = Import-PowerShellDataFile "$Path" where I'd like to ...
Desmonddesmoulins asked 5/1, 2023 at 21:52

© 2022 - 2024 — McMap. All rights reserved.