@# Quotes DB     useful, funny, interesting





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



Comments:

<0> Hi. I am making a java console application. I have been searching for a while, but I don't seem to figure out how to get input from the keyboard
<0> like suppose I got int x; then ***ign x a value via keyboard...
<0> what is the name of the function/cl*** I need to use?
<1> hi.. i thought cl*** members were private by default, but according to netbeans, they are public... what's the correct ***umption?
<2> By default, package protected
<2> http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
<1> oh, so it's different from the rest of the access types.. thanks
<3> No access specifier == package access. Very important that you understand that it is different from private/protected/public.
<4> I need a Collection cl*** that supports fast operations for add(E), contains(E), remove(E), but also allows me to fetch a random element from the collection.
<4> I don't think there's anything in the standard Java library that will do that, is there?
<5> kwzh: how fast, and how large a collection?
<4> O(lg n) time would be satisfactory.
<4> I think the collection will probably reach about 30000 elements.



<6> can somebody check out why my program does not work properly?
<6> i pasted it at pastebin.com with the same username
<6> i get the message that a main is missing can somebody tell me wher to insert the main method ?
<6> it would be great :-)
<4> Do you have a main program at all?
<6> no
<4> Okay -- "main missing" can sometimes mean that you just misdeclared it, so I figured that would be good to check first.
<4> You need "public static void main(String[] args) { ... }" in whichever cl*** you're trying to launch, to tell it what to do when you launch it.
<3> kwzh - Would the 'list' need to retain insertion order or is some Comparable order acceptable?
<4> Any ordering would be acceptable
<6> i did that but i did not recive any output
<5> kwzh: will there be duplicate entries?
<6> when inserting cl*** in first order
<4> Andy, try putting { System.out.println("Hello"); } as the body of main, just to see if you can get it to do anything at all.
<6> that is exactly what i did
<6> but still didnt get no output
<6> at least i dont get an error message
<6> but this alone does not work for me
<5> kwzh: will there be duplicate elements in your collection?
<3> andy007 - Put the new code in the pastebin and post the URL here.
<4> Let's see, duplicates will already be avoided by some other means, so I guess the implementation can either permit or forbid duplicates, whichever is simpler.
<5> kwzh: considered something like hashset then? I'm not sure about the remove cost but I ***ume add and contains should be fast.
<4> Yeah, that's what I started with -- but HashSet doesn't have a random access get function.
<5> that seems like a very odd requirement?
<4> The current prototype has a stub function that wants to randomly select an element from the set.
<4> A later revision will probably have a more intelligent way of deciding which element it wants, but I don't know the details yet.
<5> kwzh: I'm ***uming the random selection should be a constant time operation too?
<4> Yes, or at least faster than linear.
<4> Now I'm thinking maybe I should use TreeSet
<6> http://pastebin.com/503335
<5> kwzh: treeset will be slower than hashset
<3> No indexed access of course.
<6> kwzh:http://pastebin.com/503335
<4> andy007: Your main function does nothing
<6> yup but does the order matter?
<6> kwzh: where to put it?
<4> No, it doesn't matter where in the cl*** you put it.
<3> a heapified array would enable indexed access, rapid location and moderately cheap add and remove. the index order would be bizarre and unstable.
<6> kwzh: ok, so what to do..
<4> andy007: What do you want the program to do when you run it?
<6> when i put the {System.out.println("Hello");} i recive Hello
<4> OKay, that's a good start.
<4> Now replace that with whatever the program is supposed to be doing.
<6> kwzh: i want it to spit the matrix (PrintStream ausgabe)
<4> What matrix? You haven't created any.
<5> to the tutorial with andy!
<4> andy007, you probably want to first create one or more Matrix objects, then do some operations on them, and then print one or more results. All of that framework should go in the main program, which calls the other methods to do the work.
<4> You also have incorrect Java in your constructors, and incorrect mathematics in your multiply routine, but if you want really detailed help I'll have to charge my consulting rate.
<4> Hm, if my "pick random element" function eventually evolves into "pick best element", then I'm going to want the set to be sorted by that criterion anyway. So maybe I should just use a sorted set with a random number as a sort key, for the prototype.
<5> kwzh: so use a treeset then I guess, with a random comparator
<4> Yeah. Except...
<5> that way you have constant time on random selection, but I worry that the tree balancing routine will be expensive
<4> I just realized that if I establish a randomized sort key at object creation time, then I'll always get the same "random" element. Hm.
<4> Whatever I eventually do for the non-prototype, though, is going to have to avoid getting stuck on always picking the same "best" element, too. So maybe I should do more design on that first.
<4> Bah. For the FIRST prototype, I can live with linear-time operations. I'll get that much working tonight and worry about efficiency later.
<7> hi all
<7> what is wrong: http://rafb.net/paste/results/Lh1z1k57.html ?
<3> Escape the \
<2> gidday talios



<8> 'allo
<8> how goes?
<2> Oh, good good.
<2> You heard I quit my job?
<8> no! I heard you were thinking of switching thou?
<2> Yeah, well I did that.
<8> not another gig?
<2> I've got a new job already :)
<9> hello
<8> got even
<9> anyone into java3D animations?
<2> My old boss wouldnt' release me from my non-compete (even though I wasn't competing with him, the clause prevents me from working at the client)
<8> LLyric, cool - actually coding this time or still manager ish foo?
<2> We'd destroy it in court, but the client didn't want go "go there" for a few months
<8> bastards :()
<2> talios: dude, I was never "managerish"
<2> I'm doing consulting stuff
<2> Technical consulting, just not programming (much).
<8> ah righty
<2> Manager? Phtooey!
<8> :P
<2> So it seems I'll be doing some consulting around vmware and storage stuff
<10> good morning
<11> good afternoon
<9> need help with Java 3D quaternions :((
<2> talios: how do I update ipod firmware with linux?
<12> LLyric: you might visit #macintosh channel
<12> LLyric: what generation of iPod you've got?
<2> 30gb ipod video
<2> Do I need an update?
<2> I never got it working properly in vmware
<2> 45MB? cripse
<2> cripse
<2> cripes
<2> (fook)
<8> LLyric, erm - um, erm - install windows :)
<8> LLyric, 45mb includes the firmware for 5 generations/versions of ipod
<8> not sure how big the individual firmware installs are, 6-7mb I think
<13> hello
<13> I'm having trouble having my applet display a jtree...
<2> Durentu: read the jtree bit in the tutorial
<2> It's even linked from the javadoc!
<13> LLyric, yeah, I got it
<13> gottan run the applet a few times before it shows up...
<2> talios: cool, I just converted some movies for the ipod, works fine
<8> via itunes?
<2> vlc
<8> or linux?
<2> yup
<8> cool :
<2> http://www.windley.com/archives/2005/11/using_vlc_to_cr.shtml
<8> apparantly iTunes has a built in transcoder as well now
<8> how good is the video on the ipod?
<2> Totally watchable, but I think quite large
<2> I might lower the framerate.
<8> i hear battery life is seriously drained watching video
<2> I expect so. I've no idea how long it lasts anyway :)
<14> hi all
<15> hi
<16> how can i extend jvm memory, exist some parameter ?
<17> which JVM
<16> is not the same parameter ?
<16> 1.41
<17> no
<17> 1.4.1 from Sun?
<16> yes
<16> sorry
<17> java -X will show you the options
<16> ok


Name:

Comments:

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






Return to #java
or
Go to some related logs:

joslin13
irgirl
#c++
#c++
rape taiwangirl
#php
#skype
#AllNiteCafe
#AllNiteCafe
houseman mirc



Home  |  disclaimer  |  contact  |  submit quotes