@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> drwatson.exe i think
<1> I was trying to work out wildcards too quantum
<1> trying to list jar contents
<1> oh he`s gone
<1> its NeverTooLate is it NeverTooLate?
<2> i'm transitioning from C++ to java
<2> how do you create a hashmap of hashmaps?
<2> the outer would have a key of strings and the inner would have a key of ints that maps to ints
<3> Map<String,Map<String,String>> map = new HashMap<String,Map<String,String>>(); map.put("tits", someothermap);



<3> String,String would be int,int in your case
<2> Map<String,Map<int,int>> map = new HashMap<String,Map<int,int>>(); is this correct?
<2> oh ok sweet
<3> yeah
<3> at least i think so.
<2> im quite confused on how to access it
<3> what do you mean
<3> map.get("blah").get(27);
<2> ok
<2> but i was referring to the put
<2> i want to be able to do this
<2> map["tits"][0] = 666
<2> that's in C++ terms
<2> which is intuitive
<3> Map blah = new HashMap<int,int>(); blah.put(1,2); map.get("string").put(blah);
<2> aaah ok
<2> this makes sense now
<4> you have to first check if map has "blah" key, and if not, add it with a new Int, Int hash map
<4> then add the 0 key and 666 value
<2> ok
<4> you could, of course, for clarity in your own program, do this generically in a seperate method and merely p*** String,Int,Int to it for "putting"
<4> er.. String, int, int
<2> good idea!
<4> 'course it's a good idea :)
<3> i really love generics
<3> going back to 1.4 makes me want to kill stuff
<2> such as putIt("tits", 0, 66)
<2> java is ***y!
<4> also.. can the hash use int as a key? or would it be Integer and use autoboxing?
<3> i think it autoboxes
<4> it autoboxes the generic if you define the generic as int?
<2> what would be the time complexity of accessing a value in the hashmap of hashmaps, its O(1) right ?
<4> dear lord no



<4> no searching algorithm is O(1) unless you only have 1 element :)
<3> or unless you're as awesome as me.
<2> well, in C++ its O(1) :S
<4> an array element, perhaps
<4> but you dont "search" for an array element
<3> O(0) biotch.
<2> i thought O(0) doesn't exist :P
<4> it doesnt
<4> he's joking
<4> worst case would be O(n) unless they have a more optimal storage, which i doubt
<2> oh im fine with O(n)
<2> as long as it's not quadratic
<2> i'll be back later
<2> thanks guys for the help
<5> is there a way to use TextArea to create some type of command-prompt type of window.. I don't want the user to be able to go back to previous lines and edit them
<1> why not use a textfield for input
<1> textarea for output
<5> I was thinking of doing something like that, similar to how mirc has an input line and the output is scrolled above
<5> but I was moreover hoping to simulate something like how msdos prompt works
<1> not tried generics yet, i should read up on them
<1> im not so sure
<1> write a java console app maybe
<5> well, that's what i'm trying to figure out how to do
<5> make a java console object that can be put into an app/applet
<1> hmm
<1> http://www.cs.wisc.edu/~cs302/io/JavaIO.html#consoleIN
<1> check this out
<1> i think System.in is what lets you type in a cli style window
<1> are generics so cool? :)
<5> well, System.in is what i'm avoiding, i wanted to make a console window that was built into the app, not launched seperately
<5> and generics are nice, but they'll annoy you later
<1> maybe customise a textarea is your best bet
<1> or some mental custom stufff
<1> hehe
<6> Your Queen is Back
<7> hello! I am looking for some help with this: I am trying to make a jar file include a txt file which my program is dependent on. Anyone know how to do this?
<3> don't you just put it in the directory of the files you're putting in the jar?
<8> hello


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

#kl
dinnerinvitation english
weezle model
#chat-world
#allnitecafe
budak melayu
#linux
#india
#chat-world
#worldchat



Home  |  disclaimer  |  contact  |  submit quotes