23 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for nipur23

Hi guys, I'm almost finished my assignment. It's purpose is to translate english words to pirate language. For example, when some enters "hello", "ahoy" is returned. But when I enter two words like "pardon me", "null" is returned even though I have assigned "avast" to it. I'm thinking this is …

Member Avatar for stultuske
0
1K
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 Forte1292

I have the numbers 0-8 so I can represent a state as 012345678 012345687 .... 876543201 876543210 This gives me 40320 ways to represent a state so I have a HashMap of size 40320 and I need a good way to make sure each state only corresponds to 1 key …

Member Avatar for Momerath
0
257
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
731
Member Avatar for jalpesh_007

Dear all, I have declared following two hashmap. `public static HashMap<Integer,String[]> m1 = new HashMap<Integer,String[]>();` `public static HashMap<Integer,String[]> temp = new HashMap<Integer,String[]>();` At starting point of my execution both map will contain key from 1 to 20 and mapped value with it. Means key value pair are same in both …

Member Avatar for NormR1
0
351
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 akashsinha123

I have a hashmap with key as unique word in string and value as count of duplicates word in string. I want to arrange the output by value. ex: String is "my name is my name and is my my". Output as: my 4 name 2 is 2 and 1 …

Member Avatar for pritaeas
0
102
Member Avatar for pendo826

0 down vote favorite I am currently making an application to store employee details such as name, id and email address. I am doing this using a HashMap. I am currently having difficulty with a searchByName,id and email address methods. How would i go about writing one ? Here is …

Member Avatar for JamesCherrill
0
1K
Member Avatar for pendo826

Hey i am making an application that stores employee's details and the output is different than what it should be i was expecting the output to be the toString() in the employee class can anyone see anythin wrong: //Imports: //******************************************************************** //Employee Class. public class Employee { //Variables. private String employeeName; …

Member Avatar for Krokcy
0
185
Member Avatar for DEAD TERMINATOR

I'm trying to write a method that displays the contents of a hashmap on screen. This hashmap contains Strings and an array of int for every String. I've put the String aspects of the hashmap into an arraylist and I'm trying to use another method to print the arrays for …

Member Avatar for JamesCherrill
0
300
Member Avatar for MastrLuigi

Hey guys. I'm new to this site. I just wanted someone to look over the code I have so far for a hash table that operates on linear probing. I don't have anyone to really check these things for me as my professor is always busy. Can anyone tell me …

Member Avatar for MastrLuigi
0
265
Member Avatar for Erickk

Hi, I am trying to pass the value of imgPath into imageAdapter.java. I manage to get the result from the toast. But i did not know how to write a proper code to display the value at myRemoteImages. Please help me out. PictureActivity.java [CODE]ArrayList<hashmap<string, string="">> imgList = new ArrayList<hashmap<string, string="">>(); …

Member Avatar for peter_budo
0
144
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 krishnisilva

hi, [CODE] public Record get(VideoObj v) { // TODO if((v ==null) || (v=="")) return null; else return ??; } [/CODE] Recor and VideoObj are classes. if the methos return type is Record, can someone tell me what should I return? thanks

Member Avatar for stultuske
0
227
Member Avatar for ashanu

I am new to C++ coding. I want to know how hash_map and list can work together. My requirement is: I have a structure with address elements, name My hash key should be name of address object. Using the key I should find out structure. I have dynamic list for …

Member Avatar for sundip
0
181
Member Avatar for ranu jain

i have to impliment a chained hash table. in this prog i am using java.util.LinkedList. in one node of linklise i have to store two object-- 1)key value 2)value but java.util.LinkedList. provide add(object) method. that means i can not add two elements in one node of linked list. then how …

Member Avatar for JeffGrigg
0
177
Member Avatar for ba.accounts

Hi, I am fairly new to Java and am about to begin a programming course in the next week. I am preparing by completing exercises and am stuck on this particular one. Basically, i need to read a file in a certain format and calculate some figures and writing the …

Member Avatar for JeffGrigg
0
288
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
165
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 DanHu

ok so i have 3 separate classes: Product, Action, and Invoice. Action would be my interface that allows me to add and remove items in my hashmap that is in my Invoice class. my Product class would have the instance variables name, info, id and quantity (correct me if I'm …

Member Avatar for NormR1
0
504
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
250
Member Avatar for daniiii

Hi guys, First, many thanks for reading my post, happy to have found you! I have data(objects) that is stored in a hashmap, my goal is to store this data in a JTable, using a separate cell for each entry, rather than starting on a new column each time. I …

Member Avatar for daniiii
0
178

The End.