Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 89 results for
linkedhashmap
- Page 1
Update a LinkedHashMap.
Programming
Software Development
7 Years Ago
by newbee_jv
… <String, String>invalid = new
LinkedHashMap
<String, String>(); invalid.put("…Map <String, String>valid = new
LinkedHashMap
<String, String>(); valid.put("222222222222222222222…Map <String, String>invalid3 = new
LinkedHashMap
<String, String>(); invalid.put("33333333333333333333&…
Re: Update a LinkedHashMap.
Programming
Software Development
7 Years Ago
by JamesCherrill
`results` has just two entries (see lines 11,12). You can add stuff to the maps that they contain, but there are still only two entries in `results`itself Try printing the contents of all your maps to see what's going on - at first sight I think your code is doing what you wanted.
Sockets are retain even after closing them?
Programming
Software Development
10 Years Ago
by newbie14
…util.LinkedList$Node 35: 24 960 java.util.
LinkedHashMap
$Entry 36: 19 912 java.util.HashMap 37:… 40 1600 [Z 50: 40 1600 java.util.
LinkedHashMap
$Entry 51: 19 1520 [Ljava.util.concurrent.ConcurrentHashMap$Segment…
java collection iteration
Programming
Software Development
16 Years Ago
by Thirusha
… the collection in order to populate my
linkedhashmap
, the items are inserted into the
linkedhashmap
in a different order. Is there any… the order of the resulset, and put it into the
linkedhashmap
so i can display it in the corrrect order? Thanx…
question on a code segment
Programming
Software Development
12 Years Ago
by winecoding
…[CODE]public class PetCount3 { static class PetCounter extends
LinkedHashMap
<Class<? extends Pet>,Integer> {… the above code. [CODE]static class PetCounter extends
LinkedHashMap
<Class<? extends Pet>,Integer> …[/CODE] What does
LinkedHashMap
<Class<? extends Pet>,Integer> …
Huffman coding writing large binary file
Programming
Software Development
10 Years Ago
by tingwong
…; huffTree; private static Map<Character, String> table = new
LinkedHashMap
<Character, String>(); /** * Method for creating Huffman Tree * @param… charCount(String s){ Map<Character, Integer> counts = new
LinkedHashMap
<Character, Integer>(); ArrayList<Character> chars = new…
Generics mayhem!
Programming
Software Development
13 Years Ago
by lee.j.baxter
… have another class that has the following member; [CODE]private
LinkedHashMap
<Class, ArrayList<TypeModule>> m_modules = ...[/CODE] Here… dilemma. I need something more like the following; [CODE]private
LinkedHashMap
<Class<?>, ArrayList<TypeModule<?>>…
Case-sensitivity in word count program
Programming
Software Development
14 Years Ago
by Godstryke
… order of appearance Map<String, Integer> textInput = new
LinkedHashMap
<String, Integer>(); // Determining the number of distinct words…
Re: Case-sensitivity in word count program
Programming
Software Development
14 Years Ago
by Godstryke
… order of appearance Map<String, Integer> textInput = new
LinkedHashMap
<String, Integer>(); // Determining the number of distinct words…
Identifying words + removing punctutaion
Programming
Software Development
14 Years Ago
by Godstryke
… order of appearance Map<String, Integer> textInput = new
LinkedHashMap
<String, Integer>(); // Determining the number of distinct words…
Wordcount in command line
Programming
Software Development
14 Years Ago
by sajohnson05
… order of // appearance Map<String, Integer> textInput = new
LinkedHashMap
<String, Integer>(); // Determining the number of distinct words…
Re: Wordcount in command line
Programming
Software Development
14 Years Ago
by Software guy
… order of // appearance Map<String, Integer> textInput = new
LinkedHashMap
<String, Integer>(); // Determining the number of distinct words…
java code help
Programming
Software Development
11 Years Ago
by jinxmc
… java.util.ArrayList; import java.util.Iterator; import java.util.
LinkedHashMap
; class oldEmployee { public static final int length = 0; static int…
Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by Doogledude123
I need a boolean to be stored with a String (or possibly a Path, not sure which one I want to use yet). I thought about using a Map, so I did some looking around and found out that LinkedHashMaps are the only type of Map that stay in Order when you do something with them. I could use two arrays, but I'm sure theres something better to use. …
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by JamesCherrill
What's the requirement for keeping them ordered?
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by Doogledude123
Iterating through them. Does each iteration trigger a reorder? I don't want to iterate over the same ones multiple times.
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by JamesCherrill
Iterating any Collection will visit each member once. Do you specifically need to iterate them in the order in which they were created?
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by Doogledude123
Now that I really think about it, No I do not believe so. I'll explain what I want to Accomplish. I recently enabled BitLocker on my Desktop PC and I am having issues with Start Up programs not starting (because they are on another drive which isn't unlocked with the system drive). I am going to create an application which will be stored on the …
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by JamesCherrill
Why not just take a copy of the list at startup and remove each program from the copy when its started? When the copy is empty you are done, and the original list is still there for next time. (Presumably the original list is a disk file, and the copy is the loaded list in the Java program)
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by Doogledude123
Yeah, that's what I was going to do. I'm just not sure the best class to use.
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by JamesCherrill
It doesn't matter! You just need to process and remove entries until there are none left. Any Collection will do. With, I dunno, maybe a dozen entries there is no issue about space or runtime efficiency. Pick one at random.. how about about ArrayList?
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by Slavi
Just out of curriocity ... what is the startup method used by the ones that don't start by default? You could also just delay them to start after 30 secs or a minute(I've got conky on my unix system to start 20 secs after user log in for example) when the drive is unlocked, cant you? BTW in my case, I have a bash script that is executed upon start…
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by Doogledude123
Awesome James, thanks as always. Slavi, The thing is about just simply delaying it is that if I don't unlock the drive before that time, then it won't try again. This way, every 5 seconds I can retry starting the program if it didn't start.
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by Slavi
Yeah correct, it has to be done before the time .. Well I guess you could try the way you and James were going for though, just out of curiosity why having start up programs in differnet drives?
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by Doogledude123
SSD and Storage Drives. My important Programs like my Anti-Virus are put on my SSD whereas the lesser important ones are just put on my Storage Drive.
Re: Should I use a LinkedHashMap for this?
Programming
Software Development
8 Years Ago
by Slavi
If you consider an antivirus program an important one(I don't xD), I would highly advice you to get a tool called PeStudio. It has a direct link to virustotal, therefore if you can perform a quick static analysis of any file that you might have suspiciouns on(if you don't know what virtustotal is, it is where you can test a file against 56 …
Re: Java Code to make an Word-Frequency-Counter
Programming
Software Development
10 Years Ago
by JamesCherrill
… the new Comparator, then adds them to the
LinkedHashMap
, so the
LinkedHashMap
is now in the same order that the List…should have noticed that you have no need of the
LinkedHashMap
at all for this application. Everything you need is …to sort descending rather than ascending. Get rid of the
LinkedHashMap
and just use the List. That will also prove …
Re: Hashtable and Enumeration
Programming
Software Development
13 Years Ago
by ~s.o.s~
… which they were inserted) hence you'd have to use
LinkedHashMap
. If you are feeling adventurous, you can extend HashTable to… mimic
LinkedHashMap
but that would be *really* unwieldy and not recommended. BTW… is it that you don't want to use a
LinkedHashMap
?
Re: duplicates elements in array
Programming
Software Development
8 Years Ago
by JamesCherrill
… entry when a given size was reached. Then I discovered `
LinkedHashMap
`. It keeps the map with a linked list of values… the oldest entry, eg int MAX_CACHE = 1000;
LinkedHashMap
<T,V> cache = new
LinkedHashMap
<T,V>(){ @Override protected boolean…
Re: Checking for duplicates in a orderedered linked list
Programming
Software Development
18 Years Ago
by Narue
… O(N/2). >You might want to consider a
LinkedHashMap
. This is not Java. In C++, he would have to…
1
2
3
Next
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC