8 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for aravind326

Hi, I have a java class that is being used by multiple people (from a UI). In the class i have a static HashMap with the userKey as the map key and an arraylist with data pertaining to the user as the value. I am using this kind of like …

Member Avatar for aravind326
0
385
Member Avatar for crownedzero

Working with polymorphism collections, list, arraylists etc. I have a sorted collection that I would like to split based on one of the objects properties. All records > 0 to one; all less than to another. I'm trying to think of the best way to implement this. I'm thinking Comparable/Comparator …

Member Avatar for Taywin
0
216
Member Avatar for jalpesh_007

dear all, I am working on hashmap and treemap. At the starting of my program i have declared two map,m1 and temp,both are hashmap. At starting point both map contains same kay value pair. At some instance of program, i want to change the value in temp, remove some key …

Member Avatar for jalpesh_007
0
732
Member Avatar for jalpesh_007

Dear all, I have stuck with one problem. I have taken one Hashmap, Performing some input operation,remove operation on it. So after performing remove operation, i want value of 2 successive key in two different array. Also i want to match 1st key's value with all other keys' value. Like …

Member Avatar for JamesCherrill
-1
1K
Member Avatar for freedomflyer

Earlier on, in [URL="http://www.daniweb.com/software-development/java/threads/412571"]this thread[/URL] my question was answered about how to add objects of a custom class I called State into a HashSet which was a value for a key in a HashMap. [CODE]Map<String, HashSet<State>> mapping = new HashMap<String, HashSet<State>>();[/CODE] However, I need to ensure that there are only …

Member Avatar for JamesCherrill
0
340
Member Avatar for Dorson8009

Hello, this is a newbie question, sorry for that, I am trying to port some Java code to C++. In this code I have a hashmap connecting string values to float arrays of varying sizes. They are specified like this: [CODE=Java] HashMap <String, float[]> hm = new HashMap <String, float[]> …

Member Avatar for Dorson8009
0
166
Member Avatar for Slimmy

Hi! I have an array of doubles that I map to a hashmap to keep track of the indices of the elements. I want to be able to sort the array and still keep track of the indices and thats no problem as long as the elements are distinct. But …

Member Avatar for Slimmy
0
123
Member Avatar for PhoenixInsilico

[CODE] my %distAvail; foreach (map(split(/\D+/,$_),<STDIN>)) { $distAvail{$_ }++; };[/CODE] What does [COLOR="#ff0000"]$distAvail{$_ }++;[/COLOR] mean here? The input is set of distances separated by whitespace (or any non-digit character). The book says %distAvail keys are distances and whose values give the number of copies of the key. But I don't understand …

Member Avatar for PhoenixInsilico
0
251

The End.