Switch to DuckDuckGo Search
   February 13, 2009  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | >


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:00:17] *** Varox has quit IRC
[00:00:40] *** blahjake has quit IRC
[00:00:47] <TryNiX> I wonder how far fmylife.com will go with such purpose.. discovered the link after a friend sent quoted it on his facebook
[00:01:56] *** marrd has quit IRC
[00:02:58] <cybereal> fmylife.com?
[00:04:00] *** redrebel has joined ##java
[00:04:13] <redrebel> what is 'public static final long serialVersionUID = 1L'
[00:04:21] <whaley> ~~ redrebel Serializable
[00:04:21] <javabot> redrebel, Serializable is http://www.oreilly.com/catalog/javarmi/chapter/ch10.html
[00:04:46] <sproingie> that particular one means "make up a serialVersionUID based on some hash of class members"
[00:04:50] *** Mack has quit IRC
[00:05:03] <cybereal> that's wrong
[00:05:13] <cybereal> wrong wrong wrongity wrong
[00:05:32] <cybereal> you should only change it when the class is no longer compatible with previous potentially serialized versions
[00:05:38] <redrebel> ah, that explains why all my serializeable objects that that
[00:05:52] <cybereal> it's a way for you to override the default determination of serializable compatibility
[00:06:12] <redrebel> i've never changed it's value
[00:06:34] <cybereal> so if you added an optional field that could acceptably be null, you don't need to change the UID, if you do, it'll break compatibility with older versions unnecessarily you see...
[00:07:01] <redrebel> i always thought it had something to do with my version control
[00:07:11] <cybereal> heh no
[00:07:28] <whaley> redrebel: try removing it... you'll get a compiler warning
[00:07:45] <cybereal> redrebel: serialization is a really sort of... delicate thing, this is the way you can take control over compatibility between changes is all
[00:07:55] <cybereal> whaley: I've never seen the compiler warn about it
[00:07:56] <cybereal> just IDE's
[00:08:02] <whaley> redrebel: it is good practice to include it in your Serializable classes, for reasons already stated
[00:08:12] <whaley> cybereal: orly? dumb me, then.
[00:08:29] <cybereal> I wouldn't jump to that conclusion
[00:08:35] <cybereal> maybe it shows up with the lint mode on?
[00:08:38] * cybereal doesn't compile that way
[00:08:47] *** sombriks has quit IRC
[00:09:06] <sproingie> eclipse whines about it by default
[00:09:24] <cybereal> yes it does, and it's the first thing I disable because I don't care
[00:09:32] <cybereal> I work on this aged codebase that predates the usage of that field
[00:09:45] <cybereal> and I'm sure as hell not going to update 300 classes with UID's just to salve a whining IDE :) hehe
[00:09:45] <sproingie> i was always told 1L was a magic default, but no, it uses that compatibility algorithm with any UID
[00:10:15] <cybereal> sproingie: the closest thing to a magic value is not having the field at all
[00:10:56] *** slango has joined ##java
[00:11:09] <sproingie> seems the only reason to use it is to explicitly make a new revision NOT compatible if you want it that way
[00:11:12] <redrebel> thanx, now I feel like i learned something
[00:11:55] *** G0-T0 has joined ##java
[00:12:04] *** ryuho has quit IRC
[00:13:04] <Ven]n> this wont work because setMediaTime is of the type Time and frameSlider is int: p.setMediaTime(frameSlider.getValue());
[00:13:12] <Ven]n> how do I get around it?
[00:13:40] *** Vicfred has quit IRC
[00:13:51] <Ven]n> there is a getSeconds that can be used with getMediaTime.. but i cant use it here i think
[00:14:59] *** BeholdMyGlory has quit IRC
[00:15:17] *** DrHouse__ has quit IRC
[00:15:40] *** bendermo has joined ##java
[00:16:11] *** neuro_damage has quit IRC
[00:17:10] *** teralaser has joined ##java
[00:17:38] <bendermo> hey guys
[00:17:41] *** Riov has quit IRC
[00:17:47] <cybereal> sproingie: yes, exactly, it's to prevent having to deal with partially loaded private data in a deserialized instance basically
[00:18:31] <cybereal> or the inverse, to allow that to happen if you want
[00:19:22] <cybereal> Ven]n: you'll probably need to convert that int into a Time instance, maybe Time has a constructor or a static method to do that
[00:19:38] *** yclian has quit IRC
[00:20:06] *** Bollinger has quit IRC
[00:20:21]
[00:20:39] <Ven]n> but.. now i have a big problem..
[00:21:09] <Ven]n> i have this on ChangeEvent: p.setMediaTime(new Time(frameSlider.getValue()));
[00:21:48] *** mitchnull has left ##java
[00:21:50] <cybereal> ~enter
[00:21:50] <javabot> cybereal, enter is not punctuation. Please don't press return until you've finished typing your question. It is annoying to see multiple lines for one question, and hard to follow.
[00:21:57] <Ven]n> :)
[00:22:02] *** jonaslund has quit IRC
[00:22:18] <Ven]n> and since I have my JSlider move every 200 millisecond.. it keeps changing setMediaTime over and over so I cant play the movie clip.
[00:22:55] <cybereal> so... don't do that?
[00:23:17] *** snikker has joined ##java
[00:23:30] <cybereal> shouldn't that be inverted anyway?
[00:23:40] <cybereal> shouldn't the playing of the video, the changing of the current timepoint, be what changes the slider?
[00:24:05] *** josemoreira has quit IRC
[00:24:35] *** TryNiX has quit IRC
[00:25:18] <Ven]n> well, yeah, i want both. i want the slider to change while movie is playing. but I also want to be able to change the current timepoint by moving the slider.
[00:25:37] <cybereal> sure but that's a totally different vector
[00:25:46] <cybereal> you shouldn't use the slider as a model
[00:25:47] *** CaptainMorgan has quit IRC
[00:26:15] <Ven]n> uhh
[00:26:54] <cybereal> I don't know your object graph but it seems to me that you already have a model, and it's the media time, from which your jslider should be set, not the other way around
[00:27:23] *** ciaron has quit IRC
[00:27:24] *** osmosis has quit IRC
[00:27:29] <Ven]n> im not following
[00:27:31] <cybereal> anyway the more I talk about this the less your problem makes any sense, so I'm going to get back to work
[00:27:57] <Ven]n> hehe
[00:28:01] <Ven]n> ok, ty
[00:29:49] *** FireSlash has joined ##java
[00:30:40] *** kapipi has quit IRC
[00:33:21] <bendermo> Ven]n
[00:33:25] <tieTYT2> i hate how intellj puts the help button by the close button
[00:33:28] <bendermo> how long it took to get any good at java?
[00:33:47] <Ven]n> bendermo, i dont know, im not any good at java
[00:33:53] <Ven]n> :)
[00:34:36] *** jdrake has joined ##java
[00:34:39] *** delskorch has joined ##java
[00:34:57] *** CaptainMorgan has joined ##Java
[00:35:33] <tomvolek> hi all, I like to keep java API documentaion on my own pc , is there a place I can download it ? I looked at the sun site and it seems u can download the tutorail .. Am I overlookign something ?
[00:36:02] <ernimril> ~download
[00:36:02] <javabot> Find current releases for Java at http://java.sun.com/javase/downloads/index.jsp and a comprehensive archive of current and older releases of various Java related products at http://java.sun.com/products/archive/
[00:36:25] <snikker> how can i calculate ∫(0,π) Sin(x)dx [with increment inc π/16] with java?
[00:36:27] <ernimril> tomvolek: see the "Java SE 6 Documentation"?
[00:36:40] *** thepointer-work has joined ##java
[00:37:01] <tomvolek> is the API inside the JAV SE 6 cocumentation ? So if i download that i get all the API pages ?
[00:37:15] <ernimril> tomvolek: yes
[00:37:29] *** mistik1 has quit IRC
[00:37:29] <tomvolek> thanks, i am on the site ..
[00:38:31] <tomvolek> ernimril .. i am here .. http://java.sun.com/javase/reference/api.jsp can i download the api to my local pc ?
[00:38:37] *** wyvern has joined ##java
[00:39:10] *** mistik1 has joined ##java
[00:39:35] <ernimril> tomvolek: why are you there?
[00:39:49] <tomvolek> that is where the link u mentioned took me to
[00:39:50] *** TheCastor has quit IRC
[00:40:00] <wyvern> Is there a pre-built semaphore with a dynamically tuneable number of permits?
[00:40:00] <ernimril> tomvolek: go to the download link javabot gave you, find the documentation entry, press the [Download] button
[00:40:09] <wyvern> the stock java one only has a fixed number of permits
[00:40:25] <wyvern> I'm not particularly relishing the task of writing my own
[00:40:31] *** Daniel_G has quit IRC
[00:40:34] <tomvolek> ok, tc ernimril
[00:41:20] <ernimril> wyvern: if you need more just call release a few times
[00:41:36] <ernimril> wyvern: "There is no requirement that a thread that releases a permit must have acquired that permit by calling..."
[00:41:38] *** vinse has joined ##java
[00:41:43] <wyvern> ernimril: aha, very clever! thanks.
[00:41:58] <ernimril> wyvern: it helps to read the documentation
[00:42:05] *** Daniel_G has joined ##java
[00:42:13] <wyvern> yeah... i missed that part :(
[00:42:13] *** rollins has quit IRC
[00:42:33] *** UK-sHaDoW has quit IRC
[00:42:49] *** Mkop2 has joined ##java
[00:42:57] *** Bonix has joined ##java
[00:43:06] *** EtherNet has joined ##java
[00:44:17] <wyvern> The tricky part is going to be reducing the number of available permits, as that might block... ah well.
[00:45:14] <ernimril> ~~wyvern javadoc Semaphore.reducePermits(*)
[00:45:15] <javabot> wyvern: http://is.gd/jm8Z [java.util.concurrent.Semaphore.reducePermits(int)]
[00:45:43] <wyvern> it's protected.
[00:45:46] *** UK-sHaDoW has joined ##java
[00:45:49] <ernimril> wyvern: protected though, you can subclass and make it public if you want to use it from other parts
[00:46:14] <wyvern> yeah... it does look like that's my best bet.
[00:46:37] *** kane77 has quit IRC
[00:46:47] *** supersako has joined ##java
[00:47:13] <wyvern> my situation is that I need to constrain how many calls are being made to thing X concurrently, so each method that can call X is using a semaphore. However, the semaphore survives for the length of the application uptime, and the user's preferences can change
[00:47:27] <supersako> anyone here bored... i need some direction on starting on my sudoku solver for class :p
[00:48:43] <supersako> the professor is going to run javac *.java and then run java Analyze or java Analyze < sample.txt
[00:49:23] *** Inhuman has joined ##java
[00:49:28] <Mkop2> supersako: figure out an algorithm of how you solve sudoku by hand, then implement it programmatically
[00:49:43] <Mkop2> does anyone know of a free sdk that can be used to merge pdfs?
[00:49:48] *** amz has quit IRC
[00:49:55] <wyvern> there's some pdf library for java that apprently doesn't suck
[00:50:10] <ernimril> wyvern: generating pdf of rendering?
[00:50:35] <Mkop2> I'm looking for something that can merge 2 pdfs
[00:50:54] <ernimril> wyvern: s/of/or/
[00:51:53] <Mkop2> this is actually for an application someone else is working on. He's already figured out the rendering (seems like using adobe reader) but the problem is that the files we're downloading are sometimes a 2 page document in 2 separate pdfs
[00:51:55] *** fez has quit IRC
[00:52:08] <snikker> no one can help me?
[00:52:20] <tieTYT2> anyone here use twitter? I'm tieTYT there
[00:52:51] *** amz has joined ##java
[00:52:56] <Sou|cutter> tieTYT2: desperate eh?
[00:52:58] *** durka42 has joined ##java
[00:53:00] <supersako> twitter is strange
[00:53:10] <tieTYT2> Sou|cutter: i donno
[00:53:15] <tieTYT2> i just am trying it again
[00:53:20] <supersako> s/strange/for strange ppl
[00:53:31] <Mkop2> lol
[00:53:53] <Sou|cutter> tieTYT2: added ya
[00:54:09] <tieTYT2> thanks
[00:55:02] <_val_> Hello there, I'm trying to generate some ints and usint an abstract methode which is defined in the class Interface. I'm not getting output. The code does compile. what could be wrong? This is what I've now http://fpaste.org/paste/3531
[00:56:52] <aceofspades19> _val_: you need to call getLight in the main method
[00:56:53] <ernimril> _val_: "for (int i=0; i<1; i++)" ?
[00:57:02] <wyvern> http://www.lowagie.com/iText/ [erja[s
[00:57:08] <wyvern> whoa, that was totally not the home row ;)
[00:57:27] *** fez has joined ##java
[00:57:27] <wyvern> *perhaps
[00:57:27] <_val_> aceofspades19: where to call it? I'm novivce to interface classes
[00:57:45] <aceofspades19> _val_: call getLight in main()
[00:57:47] <_val_> ernimril: it has to generate only once a random number @_@
[00:58:10] <aceofspades19> _val_: so why is it in a loop?
[00:58:10] <ernimril> _val_: why a for loop for that? kind of silly
[00:58:37] <_val_> ernimril: for example.. if I want to generate more ints.. I just could modify the loop
[00:58:44] <Mkop2> _val_: did you write that code yourself?
[00:58:53] <_val_> e.g for(int i=1; i<10; ++i)..
[00:58:57] <Mkop2> my guess is that you just modified it and don't really understand all of what it's doing
[00:59:18] <ernimril> _val_: why add loops that you do not need? _when_ you need to randomize many time you add the loops you need
[00:59:22] <_val_> Mkop2: ofcaurse I wrote it.. it isn't that much code thou
[00:59:37] <aceofspades19> _val_: wouldn't you just loop through it in main()?
[01:00:08] *** fez has quit IRC
[01:00:08] <aceofspades19> like for(int i=0;i<SOME_NUMBER;i++) x = getLight;?
[01:00:12] <_val_> let me just modify.. the loop.. but I don't think it's the loop. It's not returning anything
[01:00:13] <Mkop2> _val_: do you understand what everything's doing?
[01:00:33] <Mkop2> before you get into interfaces, make sure you understand classes and methods
[01:01:14] <Mkop2> also, getLight() should be static the way you're using it
[01:02:49] <_val_> Allright I modified the loop. http://fpaste.org/paste/3535
[01:03:22] <_val_> so.. now the loop is ok.. it still isn't doing anything. I'm trying to understand the abstract methode in teh interface
[01:03:23] <Mkop2> _val_: you still are not ever calling getLight()
[01:03:54] <Mkop2> I think you are getting ahead of yourself with Interfaces when you don't understand methods
[01:04:05] *** b3nn3tt has joined ##java
[01:04:46] <_val_> Mkop2: if I understand at least this small part.. I could try to understand the rest too
[01:04:53] *** vesz has joined ##java
[01:05:23] *** Riov has joined ##java
[01:05:57] <_val_> I called the methode getLight() in main.. but it gives me error
[01:06:18] <bendermo> Mkop2 ow long it take to be proficient in java
[01:06:20] <Mkop2> _val_: start with http://fpaste.org/paste/3537
[01:06:46] <Mkop2> bendermo: it depends how you define proficient, and how much time you're devoting
[01:07:08] <Mkop2> i am not a professional programmer, but can do some basic stuff
[01:07:19] *** TorfusPmorphus has joined ##java
[01:07:23] *** amz has quit IRC
[01:07:31] <Mkop2> I'm at the level that I can write programs that are actually useful, but not useful enough that someone would buy them
[01:07:34] <TorfusPmorphus> ~pastebin
[01:07:34] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[01:07:45] *** amz has joined ##java
[01:07:50] <bendermo> mkop:define "useful"
[01:07:54] *** ryuho has joined ##java
[01:08:05] <Mkop2> my first experience with java was in high school, about 6 years ago
[01:08:25] <bendermo> no wonder
[01:08:28] <bendermo> your old
[01:08:29] <bendermo> im 16
[01:08:31] <bendermo> :p
[01:08:35] <Mkop2> :-)
[01:08:47] *** vesz has quit IRC
[01:08:50] <Mkop2> actually, it was less than 6 years ago
[01:08:53] <Mkop2> more like 4
[01:08:57] <bendermo> still
[01:09:03] <bendermo> 4 years of straight java study
[01:09:05] <bendermo> pwns
[01:09:08] <Mkop2> no, not at all
[01:09:14] <Mkop2> not 4 years straight of java
[01:09:17] <Ven]n> can I have a changeListener that only reacts on touch, and not everything else including touch?
[01:09:26] *** ishino has quit IRC
[01:09:27] <Mkop2> 4 years of dabbling here and there a few hours a month, max
[01:09:34] <_val_> Mkop2: great that works.. but without implementing the interface .
[01:09:54] <Mkop2> _val_: do you understand the code?
[01:10:04] <bendermo> mkop:you enjoyed tv more to?
[01:10:18] <_val_> Mkop2: ofcaurse I do. but I don't know how to call the methode from the Interface class
[01:10:25] <Mkop2> you should be able to look at every line of the program and tell me what each individual line does
[01:10:34] <Mkop2> it's no different when it's an interface
[01:10:47] <Mkop2> an interface is simply a framework that requires a particular class to have a particular method
[01:11:17] <Mkop2> bendermo: no, I've just been doing other stuff. I'm not even a computer science major
[01:11:23] <_val_> All right.. System.out.println() prints just plaintext. We are making an instance of Random by using new Random() to generate random integers.
[01:11:45] <Mkop2> on line 8, what does each word mean?
[01:11:47] <_val_> then we use a preincrement in the loop to get 10 times the value of integers
[01:12:38] <_val_> we just define the method to be static
[01:12:53] <Mkop2> btw, I like that you explained the program from inside out. that's a much smarter way to think of it than linearly.
[01:13:10] <Mkop2> you know what static means? I bring this up because you didn't include it earlier
[01:13:21] <_val_> yes I do.
[01:13:29] <Mkop2> tell me
[01:13:41] <_val_> in java there are instance and static methodes
[01:13:57] <_val_> static methodes can't use any instance variables
[01:14:10] *** ankylose has quit IRC
[01:14:31] <_val_> Mkop2: I just can't find the link between Interfaces and the class.. it's purpose etc..
[01:14:36] <Mkop2> what would you need to do before you could call an instance method?
[01:14:54] <Mkop2> you would need to create a new Dummy() and then call theDummy.getLight()
[01:15:23] <_val_> true.. I did it inside the main methode.. but it gave me errors. How about the interface class?
[01:15:51] <_val_> I defined an abstract methode there. Does interface class need mor methodes in this case?
[01:16:00] *** dmlloyd_ has joined ##java
[01:16:02] <Mkop2> in this case, no
[01:16:06] *** _some0ne has joined ##java
[01:16:24] <Mkop2> what is an interface in real life?
[01:16:37] <Mkop2> an interface is a standard way of interacting with something
[01:17:03] *** zmanning has joined ##java
[01:17:13] <Mkop2> it's a series of methods that every object that implements it must have
[01:17:40] <_val_> but I read on a pdf which sais.. interface can ONLY have abstract methodes
[01:17:57] *** teralaser has quit IRC
[01:17:58] <Mkop2> that's true
[01:18:13] <Ven]n> These two are giving me problems. The playMovie() is changing the frameSlider while movie is running, but I want to be able to change the current time myself by dragging the slider. The problem is that by changing automatically in playMovie() it notices that in stateChanged() as well. And by that interferes so the video clip is lagging: http://rafb.net/p/6xe9DZ78.html
[01:18:23] <Mkop2> which makes sense if you understand what an interface is
[01:18:45] <Mkop2> usually interfaces are called ___Able
[01:19:37] *** cyth has quit IRC
[01:19:48] <_val_> Mkop2: when I say public class Dummy extends LightSensore.. which in this case is my interface class.. it goes to "public static void getLight() and says. The static methode cannot hide the instance methode from LightSensor
[01:19:49] <Mkop2> like Interface Printable means that you can print the object
[01:20:25] <_val_> s/extends/implements
[01:20:31] <Mkop2> which means that it *must* have a method print()
[01:20:39] <bendermo> mkop:Java is so object oriented that I consider c++ easier
[01:20:53] <Mkop2> Java is so object oriented that I consider java easier
[01:20:58] <Mkop2> OOP is awesome
[01:21:15] <Mkop2> _val_: that's the code from the compiler?
[01:21:22] <Mkop2> s/code/output/
[01:21:39] <_val_> Mkop2: no I meant public class Dummy implements LightSensor
[01:21:56] *** magcius has quit IRC
[01:21:59] <_val_> then I get that error at public static void getLight()
[01:22:19] *** dmlloyd has quit IRC
[01:22:20] <Mkop2> you need to change the method header up top to match what I made it down below
[01:22:21] *** G0-T0 has quit IRC
[01:22:23] *** dmlloyd_ is now known as dmlloyd
[01:22:29] <Mkop2> instead of int getLight() make it static void getLight()
[01:23:08] <_val_> Mkop2: but the abstract methode in interface class LightSensor is defined as abstract int getLight();
[01:23:19] <Mkop2> so change it
[01:23:32] *** peerce has joined ##java
[01:23:38] *** TorfusPmorphus has left ##java
[01:23:39] <_val_> to abstract void getLight(); ?
[01:23:52] <Mkop2> that might work
[01:24:10] <peerce> I'm running into an odd syntax I don't quite understand... like, a declaration in a class template looks like: public List<Contact> read();
[01:24:10] <_val_> So you are saying abstract int getLight() wont work? @_@
[01:24:13] <peerce> whats the < > thing?
[01:24:45] *** Riov has quit IRC
[01:24:47] <hiredman> Generics
[01:24:54] *** LordMetroid has joined ##Java
[01:25:01] <Mkop2> _val_: the way you wrote getLight() it doesn't make sense for it to return an int
[01:25:05] <hiredman> ~generics
[01:25:05] <javabot> For a tutorial on generics, please see http://javachannel.net/wiki/pmwiki.php/Main/Generics
[01:25:17] <_val_> Mkop2: I think I figured it out
[01:25:18] <hiredman> <-- first time javabot user
[01:25:21] <_val_> Dummy dm = new Dummy();
[01:25:23] <_val_> dm.getLight();
[01:25:54] *** Varox has joined ##java
[01:26:31] <Mkop2> if you do that, it doesn't need to be static
[01:26:32] <Sou|cutter> So I'm having connection pool starvation issues, and I'm thinking about writing a prepared statement wrapper which will keep a handle to the connection, and close the connection immediately after ps.close() is called (for non-transactional queries only). Can anybody think of any gotchas there? (is this a bad idea for some reason that I haven't thought of)?
[01:26:46] <Mkop2> but there's still the question of does it return an int or not
[01:26:48] *** drip has quit IRC
[01:26:53] <_val_> Mkop2: indeed.. I made it public void getLight();
[01:27:07] <Sou|cutter> because currently it's all but guaranteed that conn.close() isn't called immediately after ps.close() in most cases
[01:27:20] <_val_> Mkop2: it does return now . But my methode is now void and not int
[01:27:21] <_val_> :<
[01:27:24] <dmlloyd> Sou|cutter: assuming you're using JDBC directly, yeah you should close the connection as soon as you can I would think
[01:27:28] *** meanburrito920_ has joined ##java
[01:27:47] <Mkop2> _val_: I'm basing off the code I sent you
[01:28:04] <Mkop2> that return 0 is pointless if it's not in a main method
[01:28:10] <_val_> Mkop2: Ok thanks in advance
[01:28:26] <Sou|cutter> dmlloyd: hopefully the overhead of doing jndi lookups for the pool is less than the contention/starvation problems... or that's my thinking
[01:28:42] <Sou|cutter> less of an issue, I mean
[01:29:08] *** eidolon has joined ##java
[01:30:44] <peerce> hiredman, k, that makes sense, I think. still digesting what all it means, but I can move forward (trying to understand a framework, kept running into things like that in the examples)
[01:30:50] *** peerce has left ##java
[01:31:14] *** dunmer has quit IRC
[01:31:17] <_val_> Mkop2: how would the version of int be?
[01:31:35] <_val_> I know void doesn't return anything as it's name implies "empty"
[01:34:19] *** orgy` has quit IRC
[01:34:21] <Mkop2> _val_: what do you mean the version?
[01:34:26] *** snikker has quit IRC
[01:35:00] <_val_> Mkop2: I mean.. making the methode getLight() of the type int in the class LightSensor
[01:35:00] *** nixblicker has quit IRC
[01:35:22] *** gregor_k has quit IRC
[01:35:23] <_val_> and getting the same result which I'm getting now with being it as of void type.
[01:35:57] *** quodt has quit IRC
[01:36:38] <Mkop2> _val_: I still don't know what you're asking
[01:37:49] <_val_> Mkop2: as you can see here http://fpaste.org/paste/3535 the methode in the class LightSensor which is the interface class is declared as abstract int getLight()
[01:38:03] <joed> Oi.
[01:38:09] <joed> Let there be light....
[01:38:23] <_val_> how do I modify the methode in the class Dummy to be also of type int and get the same result which I'm getting now
[01:38:31] *** alek_b has joined ##java
[01:38:33] *** javahorn has joined ##java
[01:39:05] <_val_> joed: java is pretty dark to me @_@.. but I'm kaing progress each day "I think"
[01:39:15] <_val_> s/kaing/making
[01:39:37] *** mengu has joined ##java
[01:40:26] <_val_> I know I'm killing somebody's brain.. but hey if I knew everything I wouldnt be here. I've googled everything no concrete solution.
[01:40:48] <Sou|cutter> I don't understand the question
[01:40:54] <Sou|cutter> Dummy already implements LightSensor
[01:41:15] <_val_> Ok let me give you the idea.
[01:41:19] <Sou|cutter> and getLight() already returns an int
[01:42:21] <_val_> see http://fpaste.org/paste/3544
[01:42:22] *** Inhuman has quit IRC
[01:42:48] <_val_> this won't coompile cause there is no return statement in the methode. But I want to be it int and NOT void.
[01:43:34] <_val_> It's nothing wrong with void.. but it's just getting to know the other way of using it.
[01:43:43] <Sou|cutter> ok...
[01:43:51] *** indeterminatus has quit IRC
[01:44:22] <Sou|cutter> _val_: So the problem is that you don't return an int from a method whose signature says you need to return an int
[01:45:13] <Sou|cutter> I don't know why you're looping 10x to get a random intensity -- why not eliminate the loop and just have getLight() return the first random intensity value that it produces?
[01:45:32] <Sou|cutter> you can loop around your method call to getLight() to get multiple random intensities if you want
[01:45:53] <_val_> Sou|cutter: yes I wouldn't mind but do I use return getLight();
[01:45:54] <_val_> ?
[01:46:16] <Sou|cutter> no, that would be infinitely recursive
[01:46:17] <_val_> I put the loop just to produce more text.. nothing special on that
[01:47:54] *** Ven]n has quit IRC
[01:47:57] <_val_> I got it ^^
[01:48:01] <Mkop2> _val_: what book/website are you using to learn java?
[01:48:17] *** bendermo has quit IRC
[01:48:25] <_val_> Mkop2: just an PDF
[01:48:29] <Mkop2> from where?
[01:48:35] <_val_> which says 3 times Java Java Java
[01:48:47] <_val_> let me see the author
[01:48:52] <Mkop2> where'd you get it from?
[01:48:59] <Sou|cutter> _val_: http://fpaste.org/paste/3545 something more like that
[01:49:03] <Mkop2> there are great java tutorials online http://java.sun.com/docs/books/tutorial/java/index.html
[01:49:38] <_val_> By Ralph Morelli, Ralph Walde - Trinity College
[01:49:48] *** yclian has joined ##java
[01:49:54] <_val_> Sou|cutter: I'll have a look.. I solved it thou.
[01:50:56] <_val_> Sou|cutter: yes.. exactly.. that's what I was trying to do. Anyways.. I now know both methodes. Thanks to you guys. There is a lot to learn. I'm trying!
[01:50:57] *** convivial has quit IRC
[01:51:28] <Sou|cutter> I have some problems with that code, but for a beginner I didn't want to get into deeper issues than what you're asking about (you have plenty of time to figure out better ways to do things once you have more-solid fundamentals)
[01:51:42] <Sou|cutter> _val_: Glad to help.
[01:52:04] <_val_> Writing a class itself with methodes and other stuff isn't that hard.. but I just lost the concept of using the Interface class
[01:52:49] <Sou|cutter> It should become more natural to you as you learn more
[01:53:06] <Sou|cutter> sounds like you're on the right track :)
[01:53:48] <_val_> I hope so. As many says, the beginning is always taugh, but I'm not giving it up
[01:54:50] <_val_> And I'm focusing a lot on theorie of Java, less the implementation of it. But if you can't implement it.. what's the need of theory?
[01:55:33] *** EdwardIII has quit IRC
[01:58:04] *** LordMetroid has quit IRC
[02:00:26] <kingping> Hello
[02:00:46] *** Niike has quit IRC
[02:01:28] <kingping> Is it possible to avoid obtaining objects from some OU if I perform search in the all LDAP directory using SUBTREE_SCOPE in search controls (JNDI) ?
[02:03:36] *** supersako has quit IRC
[02:07:27] *** Infinito- is now known as Infinito
[02:08:16] *** Niike has joined ##java
[02:09:48] *** Niike has quit IRC
[02:10:25] *** Niike has joined ##java
[02:13:07] *** Niike| has joined ##java
[02:13:19] *** nor3 has joined ##java
[02:15:26] *** amnesiac has quit IRC
[02:15:53] *** Vicfred has joined ##java
[02:16:06] *** mele- has joined ##java
[02:16:42] *** Varox has quit IRC
[02:16:49] *** Niike has quit IRC
[02:16:58] *** Niike has joined ##java
[02:17:39] *** Mkop2 has quit IRC
[02:19:49] *** mistik1 has quit IRC
[02:21:46] *** bitshuffler has quit IRC
[02:21:56] *** mistik1 has joined ##java
[02:22:24] *** javahorn has quit IRC
[02:22:45] *** cybereal has quit IRC
[02:23:23] *** Niike| has quit IRC
[02:23:37] *** Niike has quit IRC
[02:25:53] *** Infinito is now known as Infinito-
[02:26:06] *** javahorn has joined ##java
[02:26:18] *** Infinito- is now known as Infinito
[02:30:49] *** thefalling has joined ##java
[02:33:34] <thefalling> If I send a DatagramPacket to a server using multicastsocket, is there a way i can get the senders IP easily?
[02:33:51] *** Niike has joined ##java
[02:34:52] *** srcerer has quit IRC
[02:37:14] *** svm_invictvs has joined ##java
[02:37:35] <svm_invictvs> hola
[02:38:00] *** UK-sHaDoW has quit IRC
[02:38:38] <aleksei> holaaaaaaaaaaa
[02:38:46] <svm_invictvs> heh
[02:38:50] <aleksei> ~Cajo
[02:38:50] <javabot> aleksei, I have no idea what Cajo is.
[02:39:01] <aleksei> ~cajo
[02:39:02] <javabot> aleksei, I have no idea what cajo is.
[02:39:07] <aleksei> what a shame
[02:39:37] *** srcerer has joined ##java
[02:39:48] *** HockeyInJune has joined ##java
[02:43:17] *** ScottG489 has quit IRC
[02:45:34] *** convivial has joined ##java
[02:46:28] *** The_Birdman has joined ##java
[02:48:20] <kavon> so i've finally traded the unicycle for a ferrari... I've used a debugger and I must say it makes life easier ;)
[02:48:33] <kavon> almost like i'm cheating
[02:49:07] *** tissue has joined ##java
[02:50:32] *** mele- is now known as rburton-
[02:53:02] *** tyler_d has quit IRC
[02:53:06] *** Akuma0n3 has joined ##java
[02:56:23] *** Bonix has quit IRC
[02:58:35] *** staykov has quit IRC
[03:02:31] <aleksei> it's funny I rarely use a debugger... all my programs run flawlessly from the first time
[03:02:35] <aleksei> hehe
[03:02:54] <aleksei> just kidding, but I usually forget to debug using a debugger
[03:03:29] *** Niike| has joined ##java
[03:03:43] <aleksei> I mean, when you see a NPE you almost immediately know where it's happening
[03:04:59] *** l2trace99 has joined ##java
[03:07:50] *** Akuma has quit IRC
[03:08:17] *** b3nn3tt has quit IRC
[03:09:13] <kavon> aleksei: ya but in this situation the program was hanging for seemingly no reason, and i put in breakpoints and watched the loop unfold and saw the problem
[03:09:25] *** l2trace99 has left ##java
[03:09:50] *** spaceonline has joined ##java
[03:10:12] <kavon> what is a proper term for designing a program's code layout and flow... architecture ?
[03:10:21] <kavon> i need to make it sound technical
[03:10:24] *** TJC09 has quit IRC
[03:11:10] *** Akuma0n3 has quit IRC
[03:11:12] *** cofeineSunshine has quit IRC
[03:11:22] *** cofeineSunshine has joined ##java
[03:11:30] <_some0ne> anyone know where i can find an algorithm for converting infix expressions to prefix, a.k.a. polish notation (not be confused with rpn a.k.a. reverse polish notation)?
[03:12:05] *** Akuma has joined ##java
[03:13:01] *** Akuma0n3 has joined ##java
[03:13:53] *** tomvolek has quit IRC
[03:15:15] <wyvern> _some0ne: surely it's not hard to do that with, oh, a stack
[03:15:51] <_some0ne> wyvern: that's what i'm doing
[03:16:00] <_some0ne> i'm just having a hard time getting it fully correct
[03:16:28] <_some0ne> all the pseudocode on the internet is about rpn and not pn
[03:16:53] *** oxi has joined ##java
[03:16:58] <oxi> hi
[03:17:17] <eidolon> ~~oxi hi
[03:17:17] <javabot> http://i38.tinypic.com/25aopzn.jpg
[03:17:35] <oxi> I believe in java there's a way to make a class directly accessible by it's classpath name without having to instanciate it.
[03:17:40] <oxi> I'm not sure thought.
[03:17:44] <AMcBain> _some0ne: with a little imagination, it's not hard to do ... the shuntyard algorithm would work nicely here, but you instead of adding the operations to the end of the strring when it says, you put them at the beginning.
[03:17:49] <eidolon> ~~oxi static
[03:17:49] <javabot> oxi, static is a keyword which indicates that a member is scoped to a class rather than an object instance. Members of interfaces (except methods) are always static. Nested interfaces and enums are always static. See http://tinyurl.com/3q7oc and http://tinyurl.com/34vr3u for more information.
[03:17:53] <oxi> Does anyone remeber the term.?
[03:18:00] *** waz is now known as Guest3804
[03:18:08] <_some0ne> that's basically what i'm working trying to do
[03:18:18] <oxi> so, the thing is that you can make a whole class static, right?
[03:18:32] <AMcBain> well, the S-Y algorithm isn't hard ... I did it in a short amount of time.
[03:18:41] <oxi> I thought there was a different term.
[03:18:48] <AMcBain> (I'd give it, but that'd ruin your fun :)
[03:19:02] *** waz has joined ##java
[03:19:05] <_some0ne> well i'm sure i'll figure it out
[03:19:24] <AMcBain> Wikipedia has a nice overview of how the algorithm works ... that's how I figured out mine and wrote it.
[03:19:38] *** kaos01 has joined ##java
[03:19:48] <kaos01> anyone know how i can globaly set teh default memory java uses when running java or javac ?
[03:20:57] <eidolon> you can cahnge the max memory via command line options to the jvm.
[03:21:21] <kaos01> yes, i liek a global setting ,idealy some global config files
[03:21:27] <eidolon> try -Xmx128m
[03:21:29] <AMcBain> _some0ne: I redefined their idea of a "token" to be 1 character and processed things that way, as operators are 1 character in length, and anything else was either a space (ignore), a A-Z_a-z character (function name), or a number. if I received numbers or characters, I kept looping until I hit another space or operator. (this does require you to append a space to the end of the string to make sure you get everything though :P)
[03:21:31] *** staykov has joined ##java
[03:21:44] *** staykov has quit IRC
[03:21:52] <nor3> am i right in thinking a classLoader can load classes into _any_ domain, and not just the domains it itself came from?
[03:22:00] *** staykov has joined ##java
[03:22:17] <AMcBain> So basically, operators are limited to the symbols, but for basic math, this holds true: ! % ^ ( ) >
[03:22:24] <AMcBain> (oh and =)
[03:22:33] <AMcBain> '=' )*
[03:22:55] <AMcBain> ( > being used in such thigns as >> and >>>)
[03:23:16] <joed> \|/
[03:23:25] <joed> ~sushi
[03:23:25] <javabot> joed, I have no idea what sushi is.
[03:23:32] *** werdan7 has joined ##java
[03:23:41] *** trentg has quit IRC
[03:23:59] <AMcBain> Wouldn't chopsticks look more like this? \Y/
[03:25:54] <_some0ne> yeah i got the basic idea down
[03:26:09] <eidolon> mm, sushi.
[03:26:20] <AMcBain> well, if you get stuck or need help, just ask. I'd be happy to review the algorithm code if you have a need.
[03:27:04] <AMcBain> (mine wasn't very complex, a stack, queue, and StringBuilder for appending the string function or number sections (as I was disecting by character))
[03:27:47] <AMcBain> (I avoided the [Vector]Stack though ... :-/ )
[03:28:18] <AMcBain> Which reminds me ... if you have Java 6, there's a Deque ...
[03:28:30] *** Akuma has quit IRC
[03:28:42] *** Akuma has joined ##java
[03:29:20] *** zmanning has quit IRC
[03:29:29] * AMcBain should update his bookmarks.
[03:29:31] *** redrebel has quit IRC
[03:29:39] <AMcBain> (java 6 has been out for a while now)
[03:30:15] <AMcBain> oh, nevermind, you get it with LinkedList. Problem solved :)
[03:30:59] <kavon> wait theres a Java 6
[03:31:34] <kavon> ;)
[03:31:50] <AMcBain> nice attempt at trolling ... gotta try harder than that.
[03:32:48] *** warriorforgod has quit IRC
[03:35:18] *** zophy has quit IRC
[03:35:27] *** lolsuper_ has quit IRC
[03:36:38] *** warriorforgod has joined ##java
[03:37:09] *** Akuma0n3 has quit IRC
[03:37:22] *** slango has quit IRC
[03:38:11] *** mibocote has joined ##java
[03:38:31] *** lintlock has joined ##java
[03:39:30] <kavon> What is a good way to clear/clean a system clipboard? Should I just set it to null? Or maybe I should run through a loop 31 times, setting the system clipboard to nanoTime() and then to null?
[03:40:08] *** svm_invictvs has quit IRC
[03:40:13] <kavon> in order to purge an operating system's clipboard cache
[03:40:18] <dmlloyd> why stop at 31
[03:40:27] <kavon> because the 32nd time would be null
[03:40:51] <kavon> dmlloyd: so when the user presses ctrl+v they dont paste the nanoTime() from the 32nd time, but rather nothing because its null
[03:41:26] <kavon> 32 is a magic number
[03:41:30] <dmlloyd> your sarcasm detector is broken
[03:41:35] <AMcBain> ~slap kavon
[03:41:35] <javabot> slaps kavon. Thank you. Come again please.
[03:41:44] <AMcBain> actions are broken?
[03:42:38] * kavon rubs his cheek in pain.
[03:42:45] <kavon> they work
[03:43:05] <AMcBain> I think the point here is that looping will do jack crap ... why bother?
[03:44:13] <kavon> AMcBain: well, what if a user had sensitive data in his clipboard and needs it cleared. there could be something caching the clipboard like microsoft word
[03:44:44] <kavon> or a virus
[03:44:47] <AMcBain> that's not necessarily your program's problem, actually ... but hey, I'll leave you to it.
[03:44:54] <kavon> hrm
[03:45:46] <kavon> yea screw the users if you've got a virus its not my problem
[03:46:08] <aleksei> nor3: I don't think so, that's the whole point of classloaders
[03:46:09] <kavon> it would send out all the information ever put in the clipboard anyway
[03:46:37] <AMcBain> I never said don't consider it, I just pointed out that you can't try to fix problems outside of your control, at least not in this case.
[03:46:47] * aleksei wonders
[03:47:03] <AMcBain> (well, if they are "outside of your control" then I guess you can't anyways ... so ... yeah)
[03:49:14] *** tinh has joined ##java
[03:51:40] *** mistik1 has quit IRC
[03:52:08] <lintlock> I am going to regret asking this question but here goes. I am looking for a good example on how to build tables using HtmlDataTable. I am trying to figure out how to build a table based on a userType and am trying to use java for building the table.
[03:53:47] *** mistik1 has joined ##java
[03:54:39] <aleksei> webapps.. oh so lovely!
[03:54:57] <joed> lintlock: Context?
[03:55:14] <aleksei> joed: hehe.. just what I thought
[03:57:34] *** ScottG489 has joined ##java
[03:57:39] <lintlock> I hope I answer this properly. a user logs in and is directed to mypage.jsp(faces) and I am trying to have a table like h:datatable value="#{mybean.dataTable}" and allow this to build the table rather than html code itself
[03:57:43] *** eduardopl has joined ##java
[03:58:23] <aleksei> hola eduardo
[03:58:34] *** Techdeck has joined ##java
[03:59:18] *** oxi has quit IRC
[04:00:32] *** tinh has quit IRC
[04:01:11] <eduardopl> hey
[04:01:35] <Techdeck> ho
[04:02:15] *** Daniel_H has quit IRC
[04:02:47] *** mistik1 has quit IRC
[04:04:27] *** mistik1 has joined ##java
[04:04:44] *** aTypical has joined ##java
[04:08:38] <lintlock> oh well I guess I stated my question wrong.
[04:08:53] <AMcBain> _some0ne: how's it comming?
[04:08:54] *** ader10 has joined ##java
[04:09:22] <AMcBain> left a while ago, it seems.
[04:09:49] <AMcBain> oh .. the _ threw me off.
[04:09:59] <ader10> http://pastebin.com/m5924db28 The background colors are not being set (for at least myLabel1). Please help :-)
[04:10:29] <AMcBain> Did you set the JLabel opaque?
[04:11:09] <ader10> I don't think so
[04:11:28] <AMcBain> most components are default opaque, JLabels are not, so it causes a bit of trouble when you try to set one, as it never paints all of itself.
[04:11:41] <AMcBain> s/one/a background/
[04:14:18] <ader10> Thanks :-)
[04:14:34] <AMcBain> np
[04:15:21] *** metsfan has joined ##java
[04:15:58] <metsfan> hi all, i am having a problem with a JProgressBar, I have a JProgressBar taht updates in a loop, however, the bar is not getting updated until the loop is done
[04:16:04] *** brady_k has joined ##java
[04:16:12] <brady_k> r0bby: you around?
[04:16:19] <r0bby> brady_k: busy
[04:16:21] <r0bby> not now.
[04:16:29] <brady_k> ah well i just wanted to know one thing... you shower yet?
[04:16:29] <aleksei> metsfan: ahhh then u have to learn how to use swing ;)
[04:16:30] <brady_k> ;-)
[04:16:31] *** trentg has joined ##java
[04:16:38] <r0bby> ~~ aleksei aolbonics
[04:16:38] <javabot> aleksei, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this language depicts you as an imbecile in the eyes of the helpful regulars in this channel, and is generally not tolerated. If you want intelligent answers, the least you can do is speak intelligently. Additionally arguing about this rule will get you nowhere except banned. Have a nice day!
[04:16:49] <r0bby> it's YOU not 'u'
[04:17:03] <brady_k> r0bby: um... reread it. I said "you"
[04:17:11] <aleksei> oh please forgive mee
[04:17:23] <brady_k> oh you're speaking to aleksei, sorry
[04:17:30] <metsfan> well i'm not an expert, but i do have this program mostly done, i tried using a Runnable, and tried SwingMethods.invokeLater neither solved my problem
[04:17:31] <r0bby> oh.
[04:17:32] <AMcBain> metsfan: try doing the update via EventQueue.invokeLater
[04:17:38] <r0bby> yeh ok im nopt crazy
[04:17:43] <r0bby> SwingUtilities
[04:17:48] <r0bby> not SwingMethods
[04:17:50] <metsfan> swingutilities yea w/e
[04:17:51] <brady_k> r0bby: haha alright. anyways, hope you showered! peace.
[04:17:52] <AMcBain> ... nevermind. if you tried that, I have no idea why it didn't work.
[04:17:53] *** brady_k has left ##java
[04:17:53] <metsfan> sorry =)
[04:17:58] <aleksei> anyway, metsfan, the problem is, i'd bet, you are not updating the JProgressBar in the EDT
[04:18:04] <r0bby> that fucker
[04:18:13] * AMcBain wrote a cool "progress-bar" once :P
[04:18:33] <The_Birdman> so how cooler is AMcBain now?
[04:18:35] <AMcBain> I think the JAR might even still be up on my website :-/ ... never got around to taking it down.
[04:19:35] * aTypical washes r0bby's mouth out with soap.
[04:19:45] <The_Birdman> hehe
[04:19:52] <AMcBain> http://www.asmcbain.net/projects/temp/ProgressBarDemo.jar ... I don't guarantee it to be perfect, just a bit more lively than the one offered by Swing.
[04:20:09] <AMcBain> (it should be an executable JAR)
[04:20:33] <metsfan> ok ill check it out thanx
[04:20:46] <lintlock> ~mastering jsf
[04:20:46] <javabot> lintlock, I have no idea what mastering jsf is.
[04:21:06] <lintlock> sigh, thought it would find the book
[04:22:46] *** aTypical has quit IRC
[04:23:11] <metsfan> aleksei, if i am putting the code to update eth progress bar in a runnable which i run with invokeLater, doesn't that mean i'm doing the update in the EDT?
[04:23:42] <metsfan> am i misunderstanding how the EDT works?
[04:23:57] <AMcBain> invokeLater should run on the EDT, yes.
[04:23:58] <aleksei> metsfan: yes, then there must be something else blocking the EDT
[04:24:11] <AMcBain> you shouldn't be doing processing on the EDT, just updating.
[04:24:13] <aleksei> why dont you pastebin the code
[04:24:19] <metsfan> will do
[04:24:37] * AMcBain runs and watches his progress bar scroll by ...
[04:24:40] *** viperhr has quit IRC
[04:25:11] <aleksei> AMcBain: so what are the features of your ProgressBar?
[04:25:32] <AMcBain> similar to the real one, you can set a percentage or let it infinitely "loop"
[04:25:56] <AMcBain> doesn't have a real "interface" from a Swing component other than the JPanel it was probably made on.
[04:26:16] <AMcBain> I think you can even set som text, but it's rather static ... I didn't try hard there.
[04:26:58] <AMcBain> iirc, the code was rather simple, so it's easily hackable for different colors, etc.
[04:27:06] <AMcBain> you may have been able to set the speed it moved at.
[04:27:33] <aleksei> I see
[04:28:01] <metsfan> http://pastebin.com/m2921bcd
[04:28:15] <metsfan> i included only the code relevent to the progress bar
[04:28:20] <AMcBain> I did it once to see if I could make it from a Canvas and JS script I created once. and I'd much rather something like it or the original JProgressBar make it into nimbus ... as the progressbar for nimbus (last I checked) look fugly.
[04:28:26] *** monkeycid has quit IRC
[04:29:23] <AMcBain> aleksei: you might have an easier time if you just downloaded it and opened it up .. I think the source is in it.
[04:30:18] <metsfan> i mean the code is pretty simple i don't see why it wouldn't work
[04:30:40] <aleksei> I don't think repaint is needed
[04:30:47] <metsfan> same result without it
[04:31:06] <AMcBain> you might try moving the setValue and stuff about that before the invokeLater, and just call repaint inside the invokeLater.
[04:32:02] *** SherlawkDragon has joined ##java
[04:32:09] <SherlawkDragon> Hey
[04:32:18] <metsfan> nope no go blah im jsut abuot ready to give up on this
[04:32:31] <metsfan> stupid progress bars
[04:32:34] <metsfan> why can't people just be patient
[04:33:12] <aleksei> maybe it's so fast you dont see it moving?
[04:33:42] <aleksei> it just increases the PBar value but does nothing...
[04:34:01] <metsfan> na there are other operations going on, the loop takes about 10 seconds to complete with a list of 20+ things
[04:34:02] <SherlawkDragon> anyone know which package deals with connecting to a <ySQL server?
[04:34:06] <SherlawkDragon> ^MySQL
[04:34:14] <metsfan> but none of the otehr operations are concurrent
[04:34:23] <metsfan> so i don't see how they would have an effect on the EDT
[04:34:42] *** optraz has joined ##java
[04:35:03] <aleksei> that for loop, it's not being executed in an ActionListener, is it?
[04:35:31] <metsfan> HA
[04:35:35] <metsfan> it is!
[04:35:39] <metsfan> i am such a noob
[04:35:47] *** ofl_ has quit IRC
[04:35:58] <aleksei> hehe.. there you go
[04:36:02] *** yclian has quit IRC
[04:36:52] <aleksei> if the actionPerformed method is triggered by a button it gets queued in the EDT
[04:37:20] *** ebering has joined ##java
[04:37:23] <metsfan> indeed that would make sense
[04:37:33] <AMcBain> SherlawkDragon: try JDBC
[04:37:42] <metsfan> so the operations i am doing would have to be done outside the action listener?
[04:37:51] <ebering> so I'd like to know why the java spec sucks so much. It allows the following productions for OctalEscape:
[04:37:54] <ebering> \ OctalDigit
[04:38:00] <ebering> \ OctalDigit OctalDigit
[04:38:03] <aleksei> yes, just spawn a Thread
[04:38:06] <metsfan> k
[04:38:07] <ebering> \ ZeroToThree OctalDigit OctalDigit
[04:38:26] <AMcBain> but that thread has to call invokeLater though ... otherwise you're accessing the EDT on a different thread
[04:38:28] <ebering> but in the following paragraph states that \300 is invalid.
[04:38:29] <aleksei> and in that thread use EventQueue.invokeLater if you are touching the UI
[04:38:29] <ebering> What?
[04:38:43] *** Draconx|Laptop has joined ##java
[04:39:37] <SherlawkDragon> AMcBain> thanks
[04:39:45] <AMcBain> np
[04:39:57] <metsfan> so am i to invoke this thread in the actionPerformed method?
[04:40:21] *** mistik1_ has joined ##java
[04:40:32] <ebering> More succinctly: "\300" is a parse error. "\400" is a lex error.
[04:40:35] <aleksei> metsfan: that's right
[04:40:46] *** SherlawkDragon has left ##java
[04:41:00] *** Draconx|Laptop has left ##java
[04:41:07] *** ebering has left ##java
[04:43:46] *** mistik1 has quit IRC
[04:43:51] *** mistik1 has joined ##java
[04:44:03] *** mistik1_ has quit IRC
[04:44:12] * AMcBain wonders if _some0ne is really that busy working or just AFK :P
[04:44:58] *** zophy has joined ##java
[04:45:30] <metsfan> i must be doing this wrong because the EDT still isn't letting go of the button event even when i put the code inside a new thread
[04:45:51] *** drip has joined ##java
[04:47:49] <aleksei> pastebin again
[04:48:02] *** kater has joined ##java
[04:48:03] <metsfan> i put all the code that was in actionPerformed, dumped it into a new method called "update()", and call SwingUtilies.invokeLater on the new thread which jsut calls update()
[04:49:15] <metsfan> http://pastebin.com/m31753e4e
[04:50:35] <aleksei> that's what you are doing wrong...
[04:50:58] <aleksei> you are just doing the same thing in a different manner hehe
[04:51:17] <AMcBain> ~~metsfan wrong
[04:51:17] <javabot> No, you're doing it wrong! See http://www.doingitwrong.com/wrong/wrong18.jpg
[04:51:29] <aleksei> put that update in a new Thread
[04:51:35] <aleksei> not the EDT
[04:52:09] <aleksei> just replace SUtil.invokeLater with new Thread(...)
[04:52:14] <AMcBain> (new Thread(new Runnable() { public void run() { ... } })).start();
[04:52:14] <aleksei> and then of course start it
[04:53:05] *** mistik1_ has joined ##java
[04:53:23] <metsfan> ok
[04:53:24] *** mistik1 has quit IRC
[04:53:26] <metsfan> finaly it works
[04:53:28] *** mistik1_ is now known as mistik1
[04:53:30] <metsfan> thank you so much guys
[04:53:40] <AMcBain> gl with the rest of it :)
[04:53:42] <aleksei> you are welcome
[04:55:23] <aleksei> now, is it possible to get a Map's contents in the order they where put()?
[04:55:55] <AMcBain> LinkedHashMap
[04:56:09] <aleksei> how nice! thanks
[04:56:22] *** waz has quit IRC
[04:56:24] *** Guest3804 has quit IRC
[04:56:47] <AMcBain> Yeah, if the name doesn't give it away, it uses a LinkedList to maintain a second holder for the order in which things were inserted.
[04:57:40] <aleksei> yeah, sounds logical
[05:00:25] <aleksei> it's bad about netbeans, doesn't show the "all known implemented classes" or "direct known subclasses" bit of the Javadoc
[05:01:43] *** kater_ has quit IRC
[05:02:15] *** mistik1 has quit IRC
[05:03:34] *** josemoreira has joined ##java
[05:04:06] *** mistik1 has joined ##java
[05:06:03] *** notyouravgjoel has joined ##java
[05:06:16] <notyouravgjoel> is there any very fast way of creating a powerset?
[05:06:32] *** aleksei has quit IRC
[05:06:32] <notyouravgjoel> (disclaimer: I'm using clojure, and going back to java for performance)
[05:09:40] <thefalling> In java, if you call a thread in an application, and that application is closed without closing the thread first, does that thread terminate?
[05:10:30] <dmlloyd> an application is a set of running threads
[05:10:38] <dmlloyd> it terminates when all non-daemon threads terminate
[05:10:49] <dmlloyd> killing an app with exit() kills all threads immediately
[05:11:21] <dmlloyd> in other words, no threads outlive the process
[05:11:39] *** mistik1_ has joined ##java
[05:12:10] <thefalling> so if i call a thread in a main method, and the main method finishes, the thread is killed?
[05:12:19] *** mistik1 has quit IRC
[05:12:23] *** mistik1_ is now known as mistik1
[05:12:26] <dmlloyd> only if the thread is a daemon thread
[05:12:37] <dmlloyd> your main method is also running in a thread you see.
[05:13:04] <dmlloyd> once your main method starts up a thread, you now have two threads. The app doesn't terminate until both threads do, or until you call .exit()
[05:13:40] <thefalling> kk
[05:13:53] *** delskorch has quit IRC
[05:14:32] *** beol has joined ##java
[05:15:40] *** trentg has quit IRC
[05:18:42] *** `House` has joined ##java
[05:19:25] *** squi has joined ##java
[05:22:05] *** Ububegin has joined ##java
[05:22:37] *** FireSlash has quit IRC
[05:22:59] <Ububegin> for swing, to read in a file, I used JFileChooser component.. how about to write to a file..which component would be nice.... thanks
[05:22:59] *** javaCE has joined ##java
[05:23:32] *** linxuz3r has joined ##java
[05:24:12] *** Csow has joined ##java
[05:24:17] *** amz has quit IRC
[05:24:19] *** pstickne has joined ##java
[05:24:41] *** kaos01 has quit IRC
[05:24:55] <Csow> ~pastebin
[05:24:55] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[05:25:55] <r0bby> Ububegin: a stream.
[05:26:32] <Ububegin> r0bby: i dont mean that... the UI component , which will allow me to a choose a location to save the output
[05:26:49] <r0bby> http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html
[05:26:55] <r0bby> did you look there?
[05:27:02] <pstickne> look where?!?!?
[05:27:06] <pstickne> omg lolz!
[05:28:28] *** drip has quit IRC
[05:28:41] <Ububegin> r0bby: yeah, i have aleady used this compoenent..to choose files and upload to my programm.. But to download back to the hard drive, this doesnt look nice... You have to choose an existing file and overwrite..
[05:29:13] *** metsfan has quit IRC
[05:30:24] <Csow> need help adding element to list about line 53 to 58 http://rifers.org/paste/show/8779
[05:30:50] *** phyburn has joined ##java
[05:32:23] <r0bby> issuew is what?
[05:32:38] <r0bby> ~~ Csow doesn't work
[05:32:39] <javabot> Csow, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions)
[05:33:05] *** Riov has joined ##java
[05:33:06] <Riov> hey
[05:33:25] <r0bby> Csow: when somebody asks a question, it's nice to actually answer
[05:33:44] <Csow> working on it
[05:34:16] <Csow> line 55 says Syntax error on token "(", Expression expected after this token
[05:34:16] <r0bby> what errors are you getting?
[05:34:26] <r0bby> wait
[05:34:43] <r0bby> that;'s not valid
[05:35:04] <r0bby> new StateList(["Alabama Montgomery, 4447"] << you can't do this
[05:35:52] <r0bby> new StateList(new String[] { "Alabama Montgomery, 4447"});
[05:35:56] <r0bby> THAT is how you'dd do it
[05:36:18] <Csow> ok thanks
[05:36:45] <r0bby> BUT why the hell are you ignoring newEntry?
[05:37:18] <Csow> it will be used
[05:37:28] *** javahorn has quit IRC
[05:38:09] <r0bby> ~~ Csow arrays
[05:38:10] <javabot> Csow, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[05:38:13] <r0bby> read up on that
[05:39:04] *** Vicfred has quit IRC
[05:39:50] <Csow> going to now
[05:45:03] *** Kwitschibo has quit IRC
[05:45:48] *** Kwitschibo has joined ##java
[05:46:46] *** lowki has joined ##java
[05:47:14] <lowki> hey is there a static method that checks whether a certain element is in an array?
[05:48:04] <Agrajag-> g'day, i'm having a problem with jaxb marshalling with namespaces. i can only get it to include the namespace in the root element, in all child elements there's no namespace information. i created my classes with xjc from xsds, which all contain elementFormDefault="qualified". why might this be happening? what can i look for in the generated classes to find out if something is missing there?
[05:49:29] <lowki> like how would i binary search through a char[]? or do I have to write my own static method?
[05:50:12] <nmx> ~~lowki javadoc java.util.Arrays
[05:50:13] <javabot> lowki: http://is.gd/iqF5 [java.util.Arrays]
[05:50:53] <nmx> (of course, it has to be sorted already)
[05:51:01] <r0bby> ~~ lowki javadoc Arrays
[05:51:01] <javabot> lowki: http://is.gd/iqF5 [java.util.Arrays]
[05:51:10] <r0bby> er damn nmx beat me
[05:51:13] <nmx> wtg r0bby
[05:51:13] <r0bby> nmx: o/
[05:54:22] *** The_Birdman has quit IRC
[05:54:58] *** ekontsevoy has joined ##java
[05:56:02] *** thefalling has quit IRC
[05:56:46] <lowki> nmx: thanks :)
[05:57:10] <nmx> no problem
[05:57:31] *** staykov has quit IRC
[05:58:28] *** theatrus has joined ##java
[06:02:47] <ekontsevoy> Our primary application is Ruby/Rails/Apache and now we're going to add 2nd server that will be serving Java webapp that we bought, so I need a crash course on Tomcat/JSP. Which book do you guys recommend?
[06:03:55] *** staykov has joined ##java
[06:05:02] *** mohax has quit IRC
[06:07:09] *** beol has quit IRC
[06:08:23] *** ekontsevoy has quit IRC
[06:10:03] <AMcBain> _some0ne, you coulda pinged me in channel :)
[06:10:09] <_some0ne> hey
[06:10:19] <_some0ne> i got tired of screwing around with that so i went afk
[06:10:24] <_some0ne> but could i see your code?
[06:10:47] *** bhz- has quit IRC
[06:10:53] <AMcBain> hmm, this is for a school project, right?
[06:11:01] <_some0ne> yes
[06:11:11] <_some0ne> i'm quite off at this point
[06:11:47] <AMcBain> well, pastebin what you've got and tell me what it does, versus what you want (which I assume is infix to prefix)
[06:12:58] <_some0ne> ok
[06:14:34] *** bhz- has joined ##java
[06:15:01] *** conan has quit IRC
[06:15:08] <AMcBain> pastebinning it in channel (in fact doing it all in channel) allows others to look and help if they wish.
[06:15:32] <_some0ne> http://rafb.net/p/d0atFZ48.html
[06:15:36] *** exbio has joined ##java
[06:15:40] <_some0ne> some of the things to keep in mind is that the operands are single character letters and not numbers
[06:15:53] <_some0ne> it's gotten progressively uglier..
[06:16:16] *** nixblicker has joined ##java
[06:16:27] <_some0ne> i didn't look at the shunting yard algorithm (i used it for the postfix conversion) so i did this off the top off my head, but i'm sure i went wrong in a billion places
[06:16:58] <AMcBain> yeah, the shunting-yard algorithm description at Wikipedia gives you loads of help how it works, and it makes this loads easier.
[06:17:05] <AMcBain> So does using classes for operators, etc.
[06:17:08] <pstickne> why is that so much code?
[06:17:28] <_some0ne> because i like typing
[06:17:35] <_some0ne> i could type all day
[06:17:43] *** nixblicker has quit IRC
[06:19:41] <AMcBain> _some0ne: http://www.asmcbain.net/projects/sya/SYA.java *however*, I used a switch where I could have used an if statement (and saved lines of code, as I'm operating on a char and can compare to the int value of that char for ranges), and I also only do infix to postfix, and the regex before I do parsing doesn't always work right, and I don't handle negative or positive indicators right (I assume they wrongly, are plus or minus *operators* ... so their overlo
[06:19:41] <AMcBain> aded abilities are ignored). If you can fix all those things (make it work for you), you can have it ;)
[06:20:05] <AMcBain> The stack-based evaluator won't work on prefix notation, so you can discard that, it's useless.
[06:20:26] <_some0ne> wow, yours is so long (and i assume, extensive)
[06:20:43] <AMcBain> Half of that is the stack-based evaluator.
[06:21:01] <AMcBain> I also allow you to include your own functions and operators (passed in via a list, use the Operator class as I show)
[06:21:07] <_some0ne> so wait, you ONLY have infix to postfix?
[06:21:11] <AMcBain> yup
[06:21:13] <_some0ne> lol
[06:21:15] <_some0ne> well i got that done
[06:21:18] <AMcBain> there's your challenge
[06:21:19] <_some0ne> long time ago..
[06:21:30] <_some0ne> i dont need help with the postfix part
[06:21:32] <AMcBain> to make it work for infix to prefix, you just have to swap where it adds stuff.
[06:21:42] <_some0ne> hmm
[06:21:43] *** nixblicker has joined ##java
[06:21:45] <AMcBain> (append it to the beginning instead of the end)
[06:22:03] <_some0ne> the 'it' being the complex part
[06:22:25] <AMcBain> you'd need a dequeue instead of a stack, so that you can add to the front, but that's easy, just conver it to use that instead of my LinkedStack
[06:24:23] <_some0ne> eh.. maybe i'll just try to convert from my postfix code here: http://rafb.net/p/hrTCsM82.html
[06:24:27] <AMcBain> line 298 (including package), line 312, line 328, line 340, and line 373
[06:24:30] <_some0ne> your code is an overkill for my purposes
[06:24:32] <AMcBain> those are your "its"
[06:24:38] <_some0ne> ic
[06:24:50] <AMcBain> make those I think.
[06:25:05] <pstickne> AMcBain: languages with easily matchable discriminated unions really excel here :)
[06:25:30] *** nixblicker has left ##java
[06:25:33] <AMcBain> yeah, my switch was an initial thing that seemed a great idea until I realized I needed to do each alpah character.
[06:25:42] <AMcBain> alpha*
[06:25:51] <AMcBain> but I never converted it ... I just typed away
[06:26:59] <AMcBain> _some0ne: as I said, make those lines (except for the first one) into something that puts the stuff at the beginning of the LinkedList instead of the end (the push() that it currently does) and you'll have your prefix
[06:27:34] <AMcBain> the only ones you want to stay as a "push" are the numbers themselves, I assume? or is prefix a reverse of postfix?
[06:27:37] *** casmo has joined ##java
[06:27:41] <AMcBain> (in which case the numbers flip too)
[06:27:56] <_some0ne> prefix is conceptually a revers of postfix, iirc
[06:28:11] <AMcBain> ah yes, then you want to convert line 298 too
[06:28:35] <AMcBain> you can change my LinkedStacks to use the LinkedList directly and do addFirst instead.
[06:28:54] <AMcBain> the output will still be a "pop" to turn it back into a string, though.
[06:29:30] <AMcBain> I'd at least try it and see how it works.
[06:29:39] <_some0ne> well thanks for all your help. I'll keep your code in mind as i work on mine. i g2g now..
[06:29:39] <AMcBain> you can drop half that code by removing the evaluator
[06:29:48] *** jkriesten has joined ##java
[06:29:57] *** _some0ne has quit IRC
[06:30:22] <AMcBain> Yeah ... assuming you ignore that the +3 ... -3 etc, don't parse right, that code works rather nicely :)
[06:30:39] <AMcBain> (the regex works sorta well, but it fails on -(3 ... ) type stuff)
[06:30:44] *** eduardopl has quit IRC
[06:32:39] *** Junior has joined ##java
[06:37:31] *** rburton- has quit IRC
[06:39:46] *** squi has quit IRC
[06:39:59] *** squi has joined ##java
[06:40:13] *** thefalling has joined ##java
[06:40:47] *** josemoreira has quit IRC
[06:43:04] *** epoxy has joined ##java
[06:46:27] <Junior> mornin`
[06:48:45] *** thefalling has quit IRC
[06:48:59] *** _bugz_ has quit IRC
[06:59:25] *** ahughes has quit IRC
[07:00:28] *** BSWolf has quit IRC
[07:01:20] *** cybereal has joined ##java
[07:02:34] *** taxon has joined ##java
[07:02:49] *** Resistance has quit IRC
[07:03:01] <Wicked> hmm hello all. im getting "java.lang.NumberFormatException: multiple points" and it points to some code that looks like this "double parsedDouble = Double.parseDouble(letterRemoved);" ...any ideas why?...is this not right?
[07:03:34] *** _bugz_ has joined ##java
[07:03:51] <reverend> did you read the javadoc for that exception?
[07:04:20] <tieTYT> Wicked: I bet when you print out letterRemoved it'll be obvious ;)
[07:04:45] <Wicked> hmm
[07:05:23] <Wicked> hmm reverend after googling for 15 mins..i dont see the link for the error on any javadocs
[07:05:29] *** mengu has quit IRC
[07:05:36] <Wicked> tieTYT, hmm ok let me see if i can get it to print it out.
[07:05:39] <reverend> it's an API exception
[07:05:44] <reverend> look at the API docs
[07:06:12] <reverend> and jesus, it's the first hit for 'java.lang.NumberFormatException' in google
[07:06:34] <tieTYT> ~javadoc NumberFormatException
[07:06:37] <javabot> tieTYT: http://is.gd/jo0x [java.lang.NumberFormatException]
[07:07:13] <reverend> seriously, if after all this time you still can't find the documentation for java you should just give up
[07:07:13] <Wicked> hmm reverend i had been googling "java.lang.NumberFormatException: multiple points"....i didnt think just to google the 1st part
[07:07:28] *** mengu has joined ##java
[07:07:32] <tieTYT> man, i hate comments
[07:07:40] *** Resistance has joined ##java
[07:07:51] <tieTYT> my comments are out of date by the time i hit the enter key
[07:08:51] *** BSWolf has joined ##java
[07:09:53] *** phyburn has quit IRC
[07:10:46] *** zophy has quit IRC
[07:11:20] *** t3mp3st has quit IRC
[07:15:07] <AMcBain> tieTYT: we just need to hook up a brain scanner that changes the comments as necessary :P
[07:15:35] <tieTYT> or turn your comments into methods with descriptive names
[07:16:11] <AMcBain> that's a nice approach too :)
[07:16:58] <AMcBain> I put comments where necessary (enough that someone could determine what I mean) but descriptive names on variables classes, methods, etc. helps imensly, even if it's just yourself coming back half a year later.
[07:17:18] <tieTYT> yes it's more helpful than comments
[07:17:24] *** CrypticSquared has quit IRC
[07:17:34] <tieTYT> and it's harder to lie
[07:17:38] <nmx> comments are helpful for explaining why something is done a certain way
[07:18:05] <AMcBain> public void thisMethodAlwaysReturnsNull(int i); :P
[07:18:08] <cybereal> I only write comments as reminders to myself
[07:18:15] <cybereal> javadoc is for explanation
[07:18:23] *** Riov has quit IRC
[07:18:42] <tieTYT> i consider a javadoc to be a comment
[07:18:46] <AMcBain> yeah, Javadoc is the forward facing "comments" for people using it.
[07:18:57] <tieTYT> i mean my own javadoc
[07:19:01] <tieTYT> i assume that's what you mean too
[07:19:04] <cybereal> javadoc might go IN a comment but it's not a comment
[07:19:15] <cybereal> it's documentation, that's different
[07:19:19] <cybereal> it shouldn't be changing often
[07:19:40] <tieTYT> it should never change
[07:19:43] <tieTYT> doesn't mean it won't change all the time
[07:19:54] <cybereal> no, it should change
[07:19:58] <cybereal> just not very frequently
[07:20:11] <tieTYT> ideally it should never change
[07:20:19] <tieTYT> just like ideally comments will never become out of date
[07:20:56] <tieTYT> you can put javadoc on a private method if you want
[07:20:58] <tieTYT> or even a field
[07:21:09] <tieTYT> that will probably change
[07:21:28] <tieTYT> i'm rambling, but I consider comments and javadoc a necessary evil
[07:21:40] <cybereal> I totally disagree with all of that
[07:21:44] * cybereal shrugs
[07:23:22] <tieTYT> anyway
[07:23:29] <tieTYT> intellij can't rename struts tile names
[07:23:31] <tieTYT> i think it's a bug
[07:23:34] *** repnop has quit IRC
[07:23:46] <tieTYT> just thought everyone here should know
[07:24:42] *** mengu has quit IRC
[07:25:09] *** jdrake has quit IRC
[07:25:10] *** zophy has joined ##java
[07:25:14] *** casmo has quit IRC
[07:26:08] <cybereal> what's a struts tile?
[07:26:10] <cybereal> is it java code?
[07:26:14] *** coastermaster has joined ##java
[07:26:23] <tieTYT> no
[07:26:32] <tieTYT> it's like a reusable layout with variables
[07:26:46] <tieTYT> and it's defined in xml
[07:26:57] <cybereal> and IDEA has special support for it?
[07:27:15] <tieTYT> yeah
[07:27:18] <tieTYT> it has some struts support
[07:27:24] <tieTYT> and if you ctrl+f6 on it
[07:27:29] <tieTYT> it pops up the dialog to rename things
[07:27:36] <tieTYT> but the refactor button is always disabled
[07:27:46] * r0bby sneezes
[07:30:16] <cybereal> r0bby: don't do that
[07:32:10] <r0bby> do what :)
[07:32:40] <AMcBain> be yourself
[07:32:47] *** meanburrito920_ has quit IRC
[07:40:44] <r0bby> AMcBain: Can I be you?
[07:40:55] <AMcBain> Not sure you'd want to be.
[07:41:01] <r0bby> you're right.
[07:41:05] <r0bby> Wayy too oooglay
[07:41:19] *** bindaas has joined ##java
[07:41:19] <r0bby> and you like swing
[07:43:06] *** Woflborg has joined ##java
[07:43:13] <AMcBain> There's nothing wrong with Swing
[07:44:54] <tieTYT> i think there's something wrong with it
[07:44:58] <tieTYT> it looks like balls by default
[07:45:01] <tieTYT> and it's hard to make look better
[07:47:53] *** sebr has quit IRC
[07:48:12] *** kavon has quit IRC
[07:50:52] <r0bby> AMcBain: i just hate GUI programming :)
[07:51:05] <tieTYT> i heard of this thing called MiGLayout
[07:51:09] <tieTYT> supposed to be better than GBL
[07:51:23] <AMcBain> tieTYT: I almost always tell it to use the System L&F ... which makes it look relatively nice on everything but Linux
[07:51:24] <tieTYT> cause you don't have to create so many panels inside panels to get things to look like you want
[07:51:43] <tieTYT> AMcBain: you're a fool of a took if you think that looks relatively good on windows
[07:51:54] <tieTYT> compared to what? Toad for oracle?
[07:52:03] * tieTYT hopes you know that tool
[07:52:05] <AMcBain> tieTYT: I have a nice Windows theme ... I ran a patcher, can use the themes I want.
[07:52:16] <AMcBain> my OS looks nice.
[07:52:36] <AMcBain> The default blue is shit, and so is "classic" though
[07:52:48] <tieTYT> well that's kinda irrelevant. EIther way java's defaults on windows look ugly
[07:53:24] <AMcBain> Setting it to use the System L&F isn't a default ... you have to explicitly do it.
[07:54:37] <tieTYT> i know
[07:58:49] *** linxuz3r has quit IRC
[08:00:53] <cybereal> I like the newest theme
[08:01:02] <r0bby> nimbus?
[08:01:05] <cybereal> yes
[08:01:12] <r0bby> :>
[08:01:14] <cybereal> it looks great and even better it's all vectors
[08:01:27] <cybereal> much nicer than windows native or even worse, gtk blech
[08:01:35] *** webPragmatist has quit IRC
[08:01:52] <cybereal> gtk's default look is "Hey I know, let's put three times the margin around everything that every other UI kit does!"
[08:02:29] <AMcBain> nibus's JProgressBar is fugly ... that's my only complaint.
[08:02:43] <AMcBain> It looks great until you put it into indeterminant mode.
[08:03:00] <cybereal> never saw that, what does it do?
[08:03:17] <AMcBain> it looks like orange lumps pumping down a tupe ... or shit, however you see it.
[08:03:21] <AMcBain> tube*
[08:03:27] <cybereal> heh sounds cool
[08:03:31] <AMcBain> let me see if I can find an image.
[08:04:13] <AMcBain> http://www.jasperpotts.com/blog/category/nimbus/ bottom of the page.
[08:04:23] *** Shirik has joined ##java
[08:04:59] <cybereal> seems fine to me, but still, overall it's much nicer than usual java cruft
[08:05:35] <Shirik> Hello all, can someone explain this discrepancy to me? Why is line 3 legal but not line 6?
[08:05:37] <Shirik> http://wowi.pastey.net/108229
[08:05:39] <AMcBain> it all looks good, but for that one mode, for that one object, I see shit down a tube :P
[08:05:58] <AMcBain> (and the orange color just stands out)
[08:06:40] <cybereal> eh
[08:06:59] <cybereal> Shirik: your error in your comment doesn't even make sense, what java compiler are you using?
[08:07:17] <Shirik> sec
[08:08:07] <cybereal> oh wait I see that's in a ... yeah didn't notice that was an anonymous inner class there
[08:08:16] <cybereal> there's absolutely no point in making a static member on an anonymous class
[08:08:27] <Shirik> adding -version says javac 1.6.0_11
[08:08:38] <Shirik> it's the Sun JDK
[08:08:51] <cybereal> Shirik: what happens when you remove that line entirely?
[08:09:08] <Shirik> cybereal: It compiles fine
[08:09:17] <Shirik> Now I can accept that line 6 is an error; it doesn't make sense
[08:09:20] <Shirik> but why is line 3 not an error
[08:09:27] <cybereal> it compiles fine?
[08:09:37] <Shirik> yup
[08:09:39] <cybereal> does it compile fine or not?
[08:09:42] <cybereal> then what's the problem?
[08:09:53] <Shirik> the fact that there's a discrepancy between line 3 and 6
[08:10:04] <Shirik> If static members are not legal, then why is line 3 not an error
[08:10:05] <cybereal> you're being obtuse
[08:10:06] *** woogley has joined ##java
[08:10:16] <cybereal> or just a moron
[08:10:18] <Shirik> No, I'm being curious. I already have a solution, that's not what I'm asking for.
[08:10:24] *** foo-nix has quit IRC
[08:10:25] <cybereal> does line 6 compile or not?
[08:10:28] <Shirik> I'm asking for insight into why this would be legal.
[08:10:34] <Shirik> You said remove it; I remove it and it's fine
[08:10:49] <cybereal> Shirik: ok, so the big difference here is that your line 6 is invoking a method
[08:11:02] <cybereal> to make a final assignment to a static member
[08:11:21] <cybereal> Shirik: whereas the first one is just inlining a literal
[08:11:32] <Shirik> ok, that makes sense
[08:11:34] <cybereal> very different operations
[08:11:53] <selckin> Shirik: http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
[08:12:06] *** CrypticSquared has joined ##java
[08:12:12] *** ldam has quit IRC
[08:12:32] <Shirik> personally I think the error message is a little ambiguous, but that's not really important :)
[08:12:34] <Shirik> Thanks
[08:12:41] <cybereal> still a better question is why you'd have a static final variable on an anonymous class
[08:13:11] <Shirik> I just don't want to keep compiling the pattern. I was hoping that making it static would do it just once and keep it
[08:13:18] <Shirik> I just moved it to the enclosing class, not a big deal
[08:13:38] <selckin> or don't make it an anonymous class
[08:13:39] <cybereal> anonymous classes are kinda hacky
[08:14:15] <tieTYT> i think when java gets lambdas
[08:14:22] <tieTYT> it's going to make java syntax look like C++
[08:14:36] <cybereal> java syntax already looks like C++, always has, it was designed to
[08:15:05] <tieTYT> it's not as bad
[08:15:12] <tieTYT> it doesn't have * and ::
[08:15:15] <tieTYT> and : all over the place
[08:15:28] <tieTYT> nor >> and <<
[08:15:32] <tieTYT> oh wait, it does have one of those
[08:15:39] <tieTYT> but it's not very common
[08:15:41] <AMcBain> ::--
[08:15:48] <tieTYT> 8===D
[08:15:57] <AMcBain> er, I was going for :: minus minus ...
[08:16:02] <AMcBain> (pervert)
[08:16:08] <pfn> how are lambdas going to make java look like c++
[08:16:22] <tieTYT> i overload 8==D to be my string concatenation operator
[08:16:32] <pfn> I guess if they're bgga, you've got => but that doesn't look like c++
[08:16:45] <tieTYT> pfn: literally, they won't
[08:16:56] <tieTYT> pfn: but i think if they're type safe it's going to be kinda messy to look at
[08:17:05] <tieTYT> by type safe, i mean with generics on them
[08:17:22] *** perry753 has joined ##java
[08:18:30] *** staykov has quit IRC
[08:18:43] *** Resistance has quit IRC
[08:19:07] *** staykov has joined ##java
[08:19:36] *** mistik1 has quit IRC
[08:19:37] <tieTYT> anyway, i heard .NET has lambdas already
[08:19:37] *** ilyak has quit IRC
[08:19:43] <tieTYT> i thought that woudl be big enough news that I'd hear more about it
[08:20:31] <cybereal> why?
[08:20:36] <cybereal> .NET has had interesting things java lacks for years now
[08:20:50] <cybereal> news would be the other way around only imo
[08:20:56] <cybereal> http://gallery.me.com/zacheryjensen#100125/IMG_0481&bgcolor=black
[08:22:21] *** Bevin has joined ##java
[08:22:25] <tieTYT> is that your kid?
[08:22:34] <cybereal> yeah, my little girl
[08:22:46] <cybereal> she's hilarious when she pouts and I feel bad, she's sad and I can't help but laugh
[08:23:00] <tieTYT> to her face?
[08:23:16] <cybereal> yeah
[08:23:41] <cybereal> I mean she's 11 mo. old, she's sad because she is hungry not because she's having a serious emotional situation or something lmao
[08:23:48] *** repnop has joined ##java
[08:24:01] <cybereal> actually in that case she got scared because my wife sneezed
[08:28:55] <pfn> tieTYT, it'll only look as much like c++ as generics look like templates
[08:29:35] <AMcBain> heh
[08:32:48] <tieTYT> that's good
[08:33:57] *** jgoo has joined ##java
[08:34:30] *** riotz has quit IRC
[08:34:53] <jgoo> hola amigos - I have some dope files written on an ancient mac, and I have no idea about their encoding. I've dealt with this before in Java, but am now searching for some 'encoding brute force' framework that takes a file, and displays snippets of it after trying different encoding / conversions
[08:35:24] <jgoo> I've seen this problem before, but because it is a mac file originally, I am stumped... maybe over-thinking it, but the bext I can get out of it is ÁÔÚ‡ÔÌÂÓ
[08:35:51] <jgoo> Which means it is some native format being decoded as utf8?
[08:36:30] <AMcBain> most likely
[08:36:39] *** tomvolek has joined ##java
[08:36:42] <cybereal> jgoo: or it's not character data at all...
[08:37:48] <jgoo> No, it is character data, I am sure of that
[08:38:02] <jgoo> I have people say that the company that archived the files from these old macs showed the files on another mac
[08:38:31] <cybereal> how is that relevant?
[08:38:50] <jgoo> Oh, I see what you are saying - no, they are character data
[08:38:50] <cybereal> hey jgoo, if it's from a PPC mac the byte order is probably wrong
[08:38:53] <jgoo> I can tell they are not binary
[08:38:59] <cybereal> maybe it's utf-16 with swapped bom
[08:39:00] <jgoo> on account of formatting and linebreaks of the document
[08:39:02] <cybereal> :)
[08:39:05] <cybereal> (though not likely)
[08:39:25] <cybereal> can you open it in vim?
[08:39:26] <jgoo> Yeah, shame, best editor for testing is notepad++, a gnu app, NOT AVAILABLE ON LINUX
[08:39:30] <jgoo> I'll try emacs
[08:39:54] <jgoo> wait, I don't think that supports utf8 even (or is that only via ssh) I forget
[08:40:11] <jgoo> Can you swap a BOM? I think it is either there or not...
[08:40:21] <cybereal> you can swap byte order
[08:40:26] <AMcBain> JsDoc Toolkit :-/ I can write documentation for something as a property, but then I don't get parameters, or I can document it as a function, but then people won't know they can replace it with their own ... JavaDoc++ JsDoc--
[08:40:26] *** gnufied has quit IRC
[08:40:27] <cybereal> I shouldn't have said "m"
[08:40:46] <jgoo> aaah right, so, without a bom, yet the order is not as you'd expect?
[08:41:09] <jgoo> Yeah, the problem is, I can almost read some badly encoded files, because you are used to how they look... this one does open the way I usually achieve it...
[08:41:38] <jgoo> between notepad++ and gedit there is a half decent editor buried in there.
[08:41:53] <AMcBain> nano? :P
[08:42:59] <neshaug> anyone know of a tool / framwork that searches for TODO's in java code and makes some structured format out of the search?
[08:43:12] <jgoo> neshaug, eclipse does this
[08:43:18] *** ramdam has quit IRC
[08:43:19] <jgoo> for TODO FIXME and XXX by default
[08:43:25] <jgoo> you can add your own custom one. I added WTF
[08:43:36] *** ramdam has joined ##java
[08:43:42] <jgoo> you can assign an icon (severity) and they show up as todo's, like bookmarks
[08:43:46] <neshaug> hehe, well netbeans does this to, but I want to export it, like have it XML so I can do stuff with it.
[08:43:55] <neshaug> in*
[08:44:08] <jgoo> eclipse should make every ui component be able to serialize its model to JSON.
[08:44:19] <jgoo> I bet it is 4-5 lines of code and a few cups of coffee to celebrate.
[08:44:53] <mitch0> jgoo: have you tried iconv?
[08:44:56] <neshaug> nice, well I'll look into making a netbeans plugin or something
[08:45:04] <mitch0> (about the badly encoded text files)
[08:45:06] <jgoo> !google iconv
[08:45:15] <jgoo> ... damn you google. always hiding.
[08:45:21] *** corpwicle has joined ##java
[08:45:24] <corpwicle> hello
[08:45:40] <AMcBain> jgoo: learn to use the proper prefix: ~
[08:45:41] <mitch0> jgoo: http://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html
[08:46:08] *** omegaman has joined ##java
[08:46:14] <omegaman> hi there
[08:46:22] <jgoo> AMcBain, ? as in ~google lolcats?
[08:46:24] <mitch0> try UCS2-BE and UCS2-LE
[08:46:30] <omegaman> is there a good framework out there to hack up web surveys / questionairees?
[08:46:42] <AMcBain> jgoo: yes, the bot in this channel responds to ~
[08:46:51] <jgoo> ~google cuil
[08:46:51] <javabot> http://letmegooglethatforyou.com/?q=cuil
[08:46:58] <jgoo> that is great
[08:47:03] <jgoo> ~cuil cuil
[08:47:03] <javabot> jgoo, I have no idea what cuil cuil is.
[08:47:21] <Logi> ~cuil
[08:47:21] <javabot> Logi, I have no idea what cuil is.
[08:47:48] <jgoo> This looks good mitch, thanks. I like the docs about the circular dependency it has
[08:49:28] <mitch0> jgoo: what circular dpes?
[08:49:39] <mitch0> s/dpes/deps/
[08:49:43] <jgoo> "first libiconv, then gettext, then libiconv again,"
[08:50:02] <jgoo> then it says, or the other way around... probably something needs to be pulled out into a libtextutil or something
[08:50:45] <mitch0> erm, you lost me there, but nevermind. just try it out ;)
[08:50:50] <jgoo> Will do =).
[08:51:05] <jgoo> So, the other day I was thinking, ffs, there isn't any decent font showcase app out there.
[08:51:07] *** agnul has joined ##java
[08:51:42] <mitch0> I think I saw one once
[08:51:56] <mitch0> xfontselector? something like that
[08:52:14] <jgoo> I went online and download all the crap windows font previews (into a clean vm... they have so much crap) and they all sucked, and none of them supported utf8. In less time than it took to download all of those, I hacked up a quick demo that pulls all the installed fonts, and lets you preview your text in multiple fonts, paging.
[08:52:51] *** ridoo has joined ##java
[08:52:52] <cybereal> font book on mac is pretty nice for exploring fonts...
[08:52:55] <jgoo> I wrote one in Java... I want to optimize is... and add the ability to have large font sizes, kerning previews, overlay comparisons, and perhaps a 'find this font' feature.
[08:53:02] <jgoo> mac has everything, damn it.
[08:53:27] <jgoo> this little file encoding problem is the perfect excuse to buy the new macbook.
[08:53:52] <cybereal> heh well if it's from some old-ass mac app there's no special reason to believe a new mac is going to display the file any easier
[08:54:03] <cybereal> though I could try it for you if you wanted ;)
[08:54:25] <pfn> download the most recent 'file' command and 'magic' and use it
[08:54:34] <jgoo> =)) yeah, problem is, some of the files are confidential... and because I can't read them, I don't know which ones :((
[08:54:58] <mitch0> hehe
[08:55:17] <jgoo> pfn, it is a plain text file, can magic detect encodings? (non-latin characters) I thought it just detected filetypes
[08:55:38] <pfn> tias
[08:56:07] *** tomvolek has quit IRC
[08:57:04] *** jgoo is now known as reqqit
[08:57:06] <mitch0> jgoo: apparently it can detect some stuff
[08:57:14] <mitch0> UTF-8 Unicode English text, with CRLF line terminators
[08:57:19] <mitch0> that's what it says
[08:57:31] *** Bollinger has joined ##java
[08:57:33] <mitch0> (and in this case it got it right ;)
[08:57:42] <reqqit> I will try them both, cheers =)
[08:58:00] *** thpar has joined ##java
[08:58:20] *** foo-nix has joined ##java
[09:00:23] *** foo-nix has quit IRC
[09:00:43] *** Junior has quit IRC
[09:00:56] *** Junior has joined ##java
[09:01:16] *** smoog has quit IRC
[09:01:42] *** gdoko has joined ##java
[09:02:50] *** xabbuh has joined ##java
[09:03:06] *** f3ew has quit IRC
[09:04:28] *** f3ew has joined ##java
[09:04:44] *** Balgan has quit IRC
[09:08:31] *** tieTYT has quit IRC
[09:09:18] *** smoog has joined ##java
[09:09:53] *** dpy has joined ##java
[09:10:13] *** CrypticSquared has quit IRC
[09:11:31] *** _stack has joined ##java
[09:15:43] *** squi has quit IRC
[09:16:47] *** thepointer-work has quit IRC
[09:17:42] *** fmontesi has joined ##java
[09:18:15] <fmontesi> hi everyone. i'm looking for a good upnp library. does anyone know one? i tried upnplib but it looks like it can't discover my IGD router
[09:18:22] *** epoxy has quit IRC
[09:18:38] *** deSilva has joined ##java
[09:18:59] *** Resistance has joined ##java
[09:19:15] *** vesz has joined ##java
[09:19:31] *** ghostknife has joined ##java
[09:20:43] <ghostknife> With BufferStrategy's show() method, does it do the drawing by directly modifying the display buffer or waiting for paint() ?
[09:22:02] *** cybereal has quit IRC
[09:23:02] *** Ragnor has quit IRC
[09:23:13] *** Ragnor has joined ##java
[09:23:31] *** baklava- has joined ##java
[09:23:49] *** baklava- is now known as baklava
[09:24:12] *** baller has joined ##java
[09:25:40] *** dmlloyd_ has joined ##java
[09:25:44] *** skoskav has joined ##java
[09:25:53] *** ldam has joined ##java
[09:26:19] *** staykov has quit IRC
[09:26:19] *** perry753 has quit IRC
[09:26:19] *** werdan7 has quit IRC
[09:26:19] *** spaceonline has quit IRC
[09:26:19] *** optraz has quit IRC
[09:26:19] *** AgentScorpion has quit IRC
[09:26:19] *** twolf has quit IRC
[09:26:19] *** le_biloute has quit IRC
[09:26:19] *** prgrmr has quit IRC
[09:26:20] *** nmx has quit IRC
[09:26:20] *** Helios has quit IRC
[09:26:20] *** tieTYT2 has quit IRC
[09:26:20] *** hiredman has quit IRC
[09:26:20] *** skoude has quit IRC
[09:26:20] *** gcarrier has quit IRC
[09:26:20] *** Cycom has quit IRC
[09:26:20] *** dotCOMmie has quit IRC
[09:27:19] *** staykov has joined ##java
[09:27:19] *** optraz has joined ##java
[09:27:19] *** spaceonline has joined ##java
[09:27:19] *** AgentScorpion has joined ##java
[09:27:19] *** twolf has joined ##java
[09:27:19] *** le_biloute has joined ##java
[09:27:19] *** prgrmr has joined ##java
[09:27:19] *** skoude has joined ##java
[09:27:19] *** Cycom has joined ##java
[09:27:19] *** nmx has joined ##java
[09:27:19] *** Helios has joined ##java
[09:27:19] *** tieTYT2 has joined ##java
[09:27:19] *** dotCOMmie has joined ##java
[09:27:19] *** gcarrier has joined ##java
[09:31:07] *** dunmer has joined ##java
[09:32:30] *** sphenxes has joined ##java
[09:35:41] *** hoerup has joined ##java
[09:35:49] *** baller has quit IRC
[09:37:15] *** kapipi has joined ##java
[09:37:58] *** ramdam has quit IRC
[09:39:36] *** dmlloyd has quit IRC
[09:39:58] *** andrewy has joined ##java
[09:42:08] <andrewy> for some reason calling deleteRow() on a ResultSet isn't removing the row with mysql jdbc. anyone have any idea why?
[09:44:36] *** TheCastor has joined ##java
[09:45:53] *** `House` is now known as DrHouse__
[09:46:27] <DrHouse__> andrewy
[09:46:34] <DrHouse__> you mean info is not removed on db?
[09:46:48] <andrewy> DrHouse__: right, it's still there even after I close the resultset and connection
[09:47:01] <andrewy> but no exception is thrown
[09:47:08] *** rdancer has joined ##java
[09:47:47] <DrHouse__> did you declared it as Concur_updatetable?
[09:48:11] <andrewy> yes
[09:48:19] *** scorchsaber has joined ##java
[09:48:42] <DrHouse__> how was your statement declaration?
[09:49:27] <andrewy> conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE.executeQuery("select ...") and then I call deleteRow() on some elements, but they're not removed from the db
[09:51:03] <DrHouse__> then I cannot help you further, sorry, not enough knowledge
[09:51:15] <andrewy> ok, thanks
[09:53:24] *** coastermaster has quit IRC
[09:54:50] *** ankylose has joined ##java
[09:55:15] *** coastermaster has joined ##java
[09:56:02] *** kungen has joined ##java
[09:56:49] *** deepjoy has joined ##java
[10:00:14] *** gregor_k has joined ##java
[10:02:19] *** shadewind has joined ##java
[10:03:10] *** AlanasAnikonis has quit IRC
[10:03:51] *** andrewy has left ##java
[10:08:19] *** KikiJiki has joined ##java
[10:12:21] *** blankthemuffin has quit IRC
[10:12:25] *** blankthemuffin_ has quit IRC
[10:17:15] *** josip has joined ##java
[10:17:21] *** epalm has quit IRC
[10:18:03] *** MichielH has joined ##java
[10:18:37] *** AskHL has quit IRC
[10:18:39] *** phenom9600 has joined ##java
[10:19:17] *** josip has left ##java
[10:19:49] *** Infinito- has joined ##java
[10:20:02] *** Infinito- has quit IRC
[10:20:15] *** valcker has joined ##java
[10:21:24] *** orgy` has joined ##java
[10:21:47] <omegaman> is there a good framework out there to hack up web surveys / questionairees?
[10:22:15] *** umz has joined ##java
[10:22:33] <umz> can anyone guide me how to develop callback rmi client
[10:22:34] <umz> ?
[10:23:16] <umz> !ping me
[10:23:24] <umz> ~~tell callback
[10:23:24] <javabot> The user tell is not on ##java
[10:23:30] <umz> ~tell callback
[10:23:38] <umz> ~~umz callback
[10:23:38] <javabot> umz, I have no idea what callback is.
[10:23:43] <umz> ~~umz callbacks
[10:23:43] <javabot> umz, I have no idea what callbacks is.
[10:23:46] <umz> ~~umz RMI callbacks
[10:23:47] <javabot> umz, I have no idea what RMI callbacks is.
[10:23:50] <umz> ~~umz RMI
[10:23:50] <javabot> umz, RMI is http://java.sun.com/docs/books/tutorial/rmi/index.html
[10:25:52] *** KermitTheFragger has joined ##java
[10:28:16] *** woogley has quit IRC
[10:28:21] <umz> any RMI guru here?
[10:29:06] * FauxFaux slaps umz.
[10:29:09] <fmontesi> umz: shoot your problem, if someone knows he'll answer
[10:29:19] <dangertools> where's the problem? pass a reference of the client to the server and use that for your callbacks
[10:29:27] <umz> fmontesi, I need some help regarding RMI callbacks
[10:29:39] <umz> dangertools, am new to callback
[10:29:48] <umz> tried few tutorials but they aren't comipling
[10:29:51] *** respecting has joined ##java
[10:30:10] <umz> basically am stuck at how to pass the client reference to server
[10:30:12] <umz> for callback
[10:30:17] *** bas-i has joined ##java
[10:30:30] <dangertools> can you pass data from the server to the client?
[10:30:47] <respecting> please what's the best logging utility do you recommand log4j commons logging is there any others? thanks in advance
[10:31:13] <umz> yups dangertools
[10:31:30] <umz> conventional RMI is working fine
[10:31:38] <umz> I have designed the callback server
[10:31:41] *** kungen has quit IRC
[10:31:44] <dangertools> umz: well, that is just conventional rmi
[10:32:05] <umz> but don't know how to pass the client's ref. to server
[10:33:07] <umz> dangertools, do you wana have a look at my client code?
[10:33:29] <umz> when I try to declare the ClientInterface obj = new ClientImpl();
[10:33:37] <umz> I get errors ..
[10:33:42] *** isr` has joined ##java
[10:33:43] <goki-_-> respecting: Well, it depends what you want to do. You can always just use the built-in java logging, if you don't want any extra library dependencies
[10:33:59] *** Kjartan has joined ##java
[10:34:05] <umz> like I have to either cast it to ClientImpl or change the type to ClientImpl
[10:34:12] <respecting> i don't have any idea but i want the best one if it's possible
[10:34:14] <isr`> do you guys know of any good swing tutorials for how to implement nontrivial gui's
[10:34:24] *** omegaman has left ##java
[10:34:37] <dangertools> umz: does ClientImpl implement ClientInterface?
[10:34:47] <umz> dangertools, yes
[10:35:09] <Kjartan> Hey guys, I'm having some trouble with JTextArea. I'm extending a class into JTextArea. But it doesn't recognize my commands or when I mess with the ones that's already there. It copy, pastes and cuts exactly like it should do. What could be wrong?
[10:36:04] <dangertools> umz: i guess not, the compiler doesn't lie.
[10:36:18] <Infinito> isr`, complex guis are usually very specific... all you can do is really tutorials about the separate components..
[10:36:22] <umz> well dangertools lemme paste you the code at pastebin
[10:36:32] <Infinito> isr`, do you know the netbeans GUI Builder ?
[10:36:40] <goki-_-> respecting: It's not really possible, because there is no "best", only "best for what you want". I don't know what you want ;)
[10:36:56] <goki-_-> goki-_-: If you just want an answer, I would say use the built in java logging.
[10:37:05] <goki-_-> Dunno why I'm talking to myself
[10:37:07] <isr`> Infinito: i think i have to do this all by hand
[10:37:21] *** deepjoy has quit IRC
[10:37:34] *** juc0 has joined ##java
[10:37:40] <bindaas> respecting:well,you can use JUL
[10:37:46] <isr`> Infinito: i'm just not exactly sure how to go about it, i mean, would i put the GUI code in a class and have the backend in other classes or something
[10:39:14] <isr`> Infinito: like say i have a few different needs for a JFileChooser
[10:39:27] <isr`> i have a need for one to import files, one to save a project, and one to open a project.
[10:39:52] *** bashoh has joined ##java
[10:40:16] <umz> dangertools, check out http://pastebin.com/d3f922041
[10:41:15] <Infinito> isr`, yes, that's usually how it's done. You have the interface/gui separated from business logic, folowing the mvc architecture
[10:41:18] <Infinito> well
[10:42:04] *** kungen has joined ##java
[10:42:09] *** roadt has joined ##java
[10:42:11] <umz> dangertools, I have pasted the MAIN.java 2 times mistakenly kindly consider the one below
[10:42:19] <dangertools> umz: paste the exact error from javac
[10:42:35] <isr`> Infinito: wouldnt the interface/gui implement both the view and the controller?
[10:42:46] <Infinito> you could find some swing .pdf books online
[10:43:38] <umz> dangertools, http://pastebin.com/d3fa6bb80
[10:43:47] *** CrypticSquared has joined ##java
[10:43:48] <respecting> log4j commons logging Jul what's the better one ? you saud bindaas Jul ARe you sure?
[10:43:48] *** roadt has quit IRC
[10:44:19] <Infinito> that depends, if it's not that big of a project, yeah, you can merge both.
[10:44:30] *** roadt has joined ##java
[10:44:41] *** Resistance has quit IRC
[10:44:54] <respecting> i have a very Big J2EE project
[10:45:53] <Ububegin> Did anyone realise that today is Friday the 13th.... Hope, my programs/applications dont crash or something.. :)...
[10:46:25] <dangertools> umz: ClientImpl implements rmiclient.ClientInterface but you use rmiserver.ClientInterface
[10:46:49] *** valcker has quit IRC
[10:47:01] <umz> dangertools, you are right my bad
[10:47:09] <umz> dangertools, just a sec let me check the code
[10:47:46] *** valcker has joined ##java
[10:47:48] <bindaas> respecting: jul is good enough ,log4j is external and it's not necessary
[10:48:01] <bindaas> ~jul
[10:48:01] <javabot> bindaas, jul is an acronym for "java.util.logging", the JDK's built-in logging framework. See http://tinyurl.com/2pbpxz for more information.
[10:48:21] <umz> dangertools, how can i register ci (object of client Interface)
[10:48:34] <respecting> thank you bindas
[10:48:37] *** respecting has quit IRC
[10:48:41] <umz> dangertools, am getting error when i do rmiServer.registerForCallback(ci);
[10:48:57] <bindaas> respecting: you are welcome
[10:50:41] *** convivial has quit IRC
[10:51:03] <umz> bindaas, kaisay ha bhaee?
[10:52:51] <umz> dangertools, anyidea whats wrong this time?
[10:53:27] *** genesiss has joined ##java
[10:54:28] *** NiSoOo has quit IRC
[10:54:56] *** ilyak has joined ##java
[10:54:57] <ilyak> hi *
[10:57:30] *** Shirik has left ##java
[10:58:36] <umz> dangertools, check out http://pastebin.com/d18f76399
[10:58:42] <umz> focus on Main class
[10:59:03] <dangertools> i don't have the time to analyze all your code. think yourself
[10:59:27] *** umz has quit IRC
[11:01:01] *** umz has joined ##java
[11:01:05] *** bashoh has quit IRC
[11:01:09] <umz> dangertools, am not asking to analyse
[11:01:23] <dangertools> you are
[11:01:23] <umz> dangertools, am just pointing out the error and line on which error occur
[11:01:37] <umz> just to get an idea whats wrong
[11:01:38] <dangertools> yes, and then someone has to analyze why
[11:02:10] *** Resistance has joined ##java
[11:03:01] *** schasi has joined ##java
[11:03:02] *** UT2K3 has joined ##java
[11:03:03] *** rawblem has quit IRC
[11:04:11] *** n3llyb0y has joined ##java
[11:09:17] *** ghostknife has quit IRC
[11:09:32] *** UT2K3 has quit IRC
[11:10:57] <Kjartan> Hey guys, I'm having some trouble with JTextArea. I'm extending a class into JTextArea. But it doesn't recognize my commands or when I mess with the ones that's already there. It copy, pastes and cuts exactly like it should do. What could be wrong?
[11:12:11] *** juc0 has quit IRC
[11:12:27] *** CrypticSquared has quit IRC
[11:12:31] *** juc0 has joined ##java
[11:15:53] *** goki-_- has left ##java
[11:16:06] <Infinito> can you pastebin the code Kjartan ?
[11:16:24] <Infinito> add 'super();' to your extended class constructor
[11:18:32] *** UT2K3 has joined ##java
[11:20:22] *** deepjoy has joined ##java
[11:22:38] *** Epcylon has quit IRC
[11:22:39] <Kjartan> Infinito: What do you mean? Never used super before?
[11:24:17] <Infinito> you're affirming you never use super before? that's a way of explicitly telling the super variables and methods to be initialized along with your extended class.
[11:24:26] <Infinito> by pastebin I mean pastebin.com
[11:24:42] <Kjartan> http://dat101.pastebin.com/d68697d98
[11:24:54] *** roadt has quit IRC
[11:24:59] <Kjartan> http://dat101.pastebin.com/m427032bc
[11:25:04] *** shervin_a has joined ##java
[11:25:09] <Kjartan> Second file has all the commands I want to use
[11:25:23] <Kjartan> And all the way down in the first I'm trying to reach them.
[11:25:25] <Infinito> super == reference to the class you're extending from.
[11:25:31] <Kjartan> Sorry for the Norwegian comments.
[11:27:08] *** UT2K3 has quit IRC
[11:27:47] <Infinito> you need to declare a Constructor method Kjartan.
[11:29:11] <dangertools> Infinito: not necessary, the default constructor is there
[11:30:10] <Kjartan> Any reasons to why it will not work? :/
[11:30:28] *** EnderMB has joined ##java
[11:30:34] <Infinito> well, I don't know, I had problems with extended classes before and explicitly initializing the super methods solved it for me..
[11:31:19] <Kjartan> just super()M ?
[11:31:22] <Kjartan> super();
[11:31:26] <dangertools> Infinito: super() is called anyway if a default constructor is present in the super class
[11:31:30] *** tilerendering has quit IRC
[11:31:40] <dangertools> Kjartan: using your extended class would help
[11:32:54] *** acuster has joined ##java
[11:33:46] <Kjartan> Not to sound stupid, but I noticed that it was never in use. But I don't really know how to call it. I could extend from the first to the second, but then switching JFrame with EditorArea would break the first file.
[11:34:09] <dangertools> what?
[11:34:26] <Kjartan> Using the extended class?
[11:34:31] <dangertools> you should use EditorArea instead of JTextArea, not instead of JFrame
[11:35:46] *** bdbdbd has joined ##java
[11:36:08] <bdbdbd> how to remove "abcdefg" from string "123abcdefg456"
[11:36:19] <dangertools> ~~ bdbdbd javadoc String
[11:36:20] <javabot> bdbdbd: http://is.gd/6UoM [java.lang.String]; http://is.gd/iaWp [javax.print.DocFlavor.STRING]; http://is.gd/iaWp [javax.print.DocFlavor.STRING]
[11:36:50] *** reqqit has quit IRC
[11:37:07] <Kjartan> Oh thanks dangertools! Hate trying to edit someone elses code. Teacher should just have made us write our own program instead of tweaking/destroying his.
[11:37:23] *** UT2K3 has joined ##java
[11:38:22] *** mocas has joined ##java
[11:40:49] *** romanb has joined ##java
[11:41:54] *** fanti has joined ##java
[11:42:36] *** giaco has quit IRC
[11:42:40] <fanti> hello! i'm looking for an example on dynamic class REloading. when a class that is already present has changed to make the changes visible for new instances of that class
[11:43:28] <fanti> trying already to use the ClassLoader.loadClass method but that had no effect. it used always the old version of the class
[11:45:32] *** squiddle has joined ##java
[11:47:31] <wlfshmn> fanti: http://www.zeroturnaround.com/javarebel/
[11:48:15] <fanti> wlfshmn: thank you
[11:49:37] *** tomekw has joined ##java
[11:51:39] *** tilerendering has joined ##java
[11:52:02] <tomekw> what is the best way to present graph of connected devices with with adjacencies? loosy set of objects representing devices with list of connected ones? or maybe some matrix?
[11:54:15] *** spaceonline has quit IRC
[11:55:37] *** acuster has quit IRC
[11:59:58] *** Yancho has joined ##java
[12:00:30] <Yancho> anyone can please help me with watches .. when i do ctrl+shift+f7 and i write a new array / variable i am not getting it in the watches tab. any hint please?>
[12:01:35] *** geaaru has joined ##java
[12:02:32] *** tlrobinson has joined ##java
[12:06:53] *** Kjartan has quit IRC
[12:07:31] <chillitom> Yancho, i assume you are talking about an IDE.. but you give us nothing else to go on..
[12:07:50] <Yancho> chillitom netbeans
[12:07:56] *** Dilien has joined ##java
[12:08:38] <Dilien> Hey, I have a script that makes sockets to servers regularly, but I want it to use a proxy instead of my own IP. Is there some kind of doc that can help me?
[12:08:40] *** shadewind has quit IRC
[12:09:54] *** Jubei has joined ##java
[12:10:50] <Jubei> guys what is the best way to check for this ... ex. 50<x<100 , it cant be done with a switch statement right? do I have to do if (x>50 && x<100) ?
[12:12:24] <mitch0> that exact example could be done with a switch (but would be fugly :)
[12:12:39] <mitch0> the (x > 50 && x < 100) is the way to go
[12:12:49] <Jubei> thank you mitch0 .
[12:12:53] <mitch0> although I prefer to write (50 < x && x < 100)
[12:13:02] <Jubei> oh yea that looks nicer ^^
[12:13:15] <Jubei> thanks.
[12:13:51] *** enterneo has joined ##java
[12:14:13] *** umz has quit IRC
[12:14:59] <enterneo> when using struts html form tags, is it prudent to directly attach the EJB there, or a POJO bean, and then map the POJO values to EJB from which action?
[12:15:03] *** pstickne has quit IRC
[12:15:17] *** Dilien has quit IRC
[12:16:17] *** exbio has quit IRC
[12:18:00] *** JohnBat26 has quit IRC
[12:19:07] *** OsAC has joined ##java
[12:19:55] *** teralaser has joined ##java
[12:21:08] *** Epcylon has joined ##java
[12:24:07] *** igordcard has joined ##java
[12:25:07] *** shadewind has joined ##java
[12:26:01] *** rainmann has joined ##java
[12:26:02] *** Hates_ has joined ##java
[12:26:30] *** UT2K3 has quit IRC
[12:27:56] <tlrobinson> i'm trying to figure out the most efficient way to serve a static file from disk through a servlet
[12:28:50] *** squiddle has quit IRC
[12:28:56] <tlrobinson> i wanted to use nio's memory mapped files like this http://209.85.173.132/search?q=cache:-ZW01uV6y2AJ:x86.sun.com/thread.jspa%3FthreadID%3D5120854%26messageID%3D9421466+filechannel+servlet&hl=en&ct=clnk&cd=1&gl=us&client=safari but i'm having trouble
[12:29:34] *** JohnBat26 has joined ##java
[12:29:38] *** EtherNet has quit IRC
[12:29:41] *** sombriks has joined ##java
[12:30:05] <tlrobinson> any ideas?
[12:30:49] *** KikiJiki has quit IRC
[12:32:46] <enterneo> can I directly use EJB when attaching a bean in struts html form tag?
[12:32:50] *** OsAC has quit IRC
[12:33:02] *** Bevin has quit IRC
[12:36:05] *** squi has joined ##java
[12:36:19] *** KikiJiki has joined ##java
[12:36:29] *** skoskav has quit IRC
[12:36:54] *** JohnBat26 has quit IRC
[12:37:29] *** CrypticSquared has joined ##java
[12:37:44] *** spuz has joined ##java
[12:40:37] *** Bevin has joined ##java
[12:40:41] *** mohax has joined ##java
[12:42:39] <enterneo> hello
[12:43:27] *** JohnBat26 has joined ##java
[12:43:48] *** mazzachre has joined ##java
[12:45:02] <mazzachre> Anyone here programming xmpp components?
[12:46:21] *** werdan7 has joined ##java
[12:46:26] <jottinger> mornin
[12:47:48] *** JohnBat26 has quit IRC
[12:48:38] <bdbdbd> why would java complain about something not being thrown
[12:48:50] <bdbdbd> i have an object that someone else wrote, and the object attempts a socket write operation
[12:48:51] *** squiddle has joined ##java
[12:49:27] <jottinger> what's the actual error message
[12:49:29] <bdbdbd> but when i try to catch SocketException, it complains that it is not thrown by the contents of the try statement
[12:49:38] <bdbdbd> its on another computer i can't paste it directly
[12:49:47] <jottinger> pastebin, figure out a way
[12:50:16] *** sanity has joined ##java
[12:50:44] <mazzachre> bdbdbd: Well it is caught internally it sounds like... I also find it strange that java complains about that I try to catch something that is never thrown inside the try{}... It should warn me... not err out :/
[12:50:57] <sanity> anyone aware if there is a concurrent LinkedHashMap implementation (or something else I can use to create a fine-grained concurrent LRUMap)?
[12:51:23] *** mistik1 has joined ##java
[12:52:10] <jottinger> sanity: there's a concurrenthashmap, which you can use to do that (I did it, for example, last week)
[12:52:18] <jottinger> you can also se ehcache or oscache
[12:52:55] <sanity> jottinger: how do you use a concurrenthashmap to create an efficient LRUMap?
[12:53:01] <jottinger> s/se/use/
[12:53:27] <jottinger> sanity: it's a map... the actual internal storage/lookup shouldn't matter
[12:53:38] <jottinger> linkedhashmap is much harder to sync
[12:53:44] <jottinger> linkedmap, sorry
[12:53:50] <jottinger> I JUST woke up :/
[12:54:00] <sanity> jottinger: you have to maintain an ordering of the elements in the map, that is why you need a *Linked*HashMap
[12:54:03] *** Resistance has quit IRC
[12:54:16] *** morkar- has joined ##java
[12:54:35] <jottinger> but it's a map! Why would linked be necessary? Ah, I see what you're doing...
[12:54:43] <jottinger> sanity: that's fair, but in my experience, YAGNI
[12:55:01] <jottinger> sanity: removing expired entries is pretty easy regardless, no need for ordering
[12:55:01] <sanity> jottinger: why not?
[12:55:13] <sanity> jottinger: without the ordering it isn't LRU
[12:56:25] <jottinger> sanity: I use an access time and an expiry
[12:56:33] <jottinger> it depends on what you need and your environment
[12:56:42] <sanity> jottinger: how do you efficiently find the elements that are about to expire?
[12:56:55] *** CrypticS_ has joined ##java
[12:57:07] <jottinger> sanity: if it's an expirin map - i.e., entries live for X time - then I worry about THAT on retrieval
[12:57:18] <jottinger> (sorry, g key is sticking some today)
[12:57:39] <sanity> jottinger: ah, I see - but unfortunately I need it to prevent memory from filling up
[12:57:41] <jottinger> if I'm really worried about only having X entries, I'd store a List along with the map with the access order
[12:57:49] <jottinger> sanity: how many entries are you managing?
[12:57:54] *** CrypticSquared has quit IRC
[12:57:55] <sanity> jottinger: millions
[12:57:56] <jottinger> Is this in a java ee server?
[12:58:04] <sanity> jottinger: SE
[12:58:37] *** ilyak has quit IRC
[12:59:05] *** CrypticS_ is now known as CrypticSquared
[12:59:07] <jottinger> hmmm, and concurrency is required? You could write your own concurrentlinkedmap...
[12:59:29] <sanity> jottinger: writing concurrent collections is *very* *very* hard
[13:00:09] <sanity> jottinger: concurrency isn't required, but it means my app occasionally freezes if I need to traverse the map - which is not good
[13:00:13] <jottinger> sanity: I'm not disagreeing with you
[13:00:25] <sanity> jottinger: I know :-)
[13:00:36] <jottinger> that's why I don't worry so much and just chose to love the bomb
[13:00:43] *** enterneo has quit IRC
[13:00:53] <jottinger> golly, four points for me for Dr. Strangelove reference!
[13:01:02] *** enterneo has joined ##java
[13:01:45] <jottinger> you shouldn't have to award yourself stuff like that but hey this is ##java, nobody here has any culture
[13:02:34] <enterneo> can I directly use a EJB in <html:form> rather than a POJO bean?
[13:02:41] * jottinger blinks
[13:02:44] <jottinger> depends
[13:03:27] <enterneo> jottinger: for me?
[13:03:32] <jottinger> yes
[13:03:42] <bdbdbd> jottinger: http://mibbit.com/pb/aB9ELo
[13:03:43] <jottinger> for one thing, what's the context of <html:form>
[13:03:48] <jottinger> for another, what kind of EJB is it
[13:05:21] *** EnderMB has quit IRC
[13:05:28] <enterneo> jottinger: EJB is stateless, I am using EJB 3.0, so it will be bundled in seperate jar.
[13:05:55] <jottinger> enterneo: Is this JSF?
[13:06:04] <enterneo> jottinger: no struts1
[13:06:20] <jottinger> enterneo: ah, the magic of context. I don't know.
[13:07:13] <enterneo> jottinger: up until now I was using POJO bean to in <html:form> and then mapping POJO bean to EJB from within Action class, but this way i get 2 beans with exactly same properties (seems like an unnatural way of doing it)
[13:07:17] *** KikiJiki has quit IRC
[13:07:19] <enterneo> jottinger: oh ok
[13:07:30] *** KikiJiki has joined ##java
[13:08:12] *** giaco has joined ##java
[13:08:18] <jottinger> bdbdbd: check out the hierarchy for SocketException - it may be an Error. Or: instead of Exception, look at Throwable.
[13:08:21] *** KikiJiki has quit IRC
[13:08:54] *** kapipi has quit IRC
[13:09:06] <mitch0> socketexception is an ioexception
[13:09:17] <jottinger> mitch0: then Exception should have caught it
[13:09:24] <jottinger> there's something funky there for real then
[13:09:26] <mitch0> there's something else going on
[13:10:08] <mitch0> I don't even see where those stacks point to...
[13:10:16] <mitch0> so, it's hard to see what's wrong
[13:10:55] *** n3llyb0y has quit IRC
[13:11:52] <bdbdbd> ?
[13:12:00] *** bas-i has quit IRC
[13:12:07] <bdbdbd> What is the difference between Exception and Throwable?
[13:12:26] *** Daniel_H has joined ##java
[13:12:44] <mitch0> Throwable is the interface that _all_ exceptions must implement. not all exceptions extend Exception, though
[13:13:00] <mitch0> got bitten by that one once... evil stuff
[13:13:07] <bdbdbd> what's the difference between Throwable and a try block?
[13:13:07] *** bas-i has joined ##java
[13:13:20] <mitch0> (and if anyone throws that ~evil thing at me again...)
[13:13:41] *** ShanghaiScott1 has quit IRC
[13:13:56] <dangertools> mitch0: all Exceptions are Throwables but not all Throwables are Exceptions
[13:14:01] <mitch0> try { stuff; } catch (Throwable t) { } will catch everything. try { stuff ; } catch (Exception e) { } might let some exceptions sneak out
[13:14:02] <dangertools> mitch0: there's also java.lang.Error
[13:14:12] <dangertools> bdbdbd: one is a block, the other is an interface
[13:14:17] <jottinger> right, exceptions must be caught, errors don't care
[13:14:27] <mitch0> danger: it's not me with the problem ;)
[13:14:40] <bdbdbd> is it friday or is it saturday?
[13:14:48] <jottinger> depends on where you are
[13:14:51] <dangertools> mitch0: yes, but you state it wrong. catch (Exception) catches _all_ Exceptions
[13:14:57] <bdbdbd> us east coast
[13:15:09] <jottinger> bdbdbd: friday
[13:15:19] <mitch0> I didn't say Exceptions. I said exceptions
[13:15:27] <mitch0> oh well
[13:15:30] <mitch0> w/e
[13:16:12] <bdbdbd> lemme try the Throwable
[13:16:14] <bdbdbd> sec
[13:17:58] <bdbdbd> same thing happened
[13:18:00] *** AlanasAnikonis has joined ##java
[13:20:15] <mitch0> bdbd: which line the stack trace points to? (that is, which line is processing.net.Client.write(Client.java:442))
[13:20:42] <bdbdbd> Hard to tell but it looks like a library
[13:21:02] <bdbdbd> To further answer your question, it is this library: http://processing.org/reference/libraries/net/index.html
[13:21:19] <bdbdbd> I have submitted a bug report. It only offers disconnectEvent() on the server-side.
[13:22:21] *** skoskav has joined ##java
[13:23:12] <mitch0> wtf, 65MB download? :)
[13:23:50] <bdbdbd> It's a great ool.
[13:23:51] <bdbdbd> er..
[13:23:52] <bdbdbd> tool
[13:24:38] *** n3llyb0y has joined ##java
[13:24:45] <bdbdbd> actually
[13:24:56] <bdbdbd> it only offers disconnect on the client-side.. hmm
[13:25:35] <bdbdbd> brb
[13:26:24] <mitch0> I wonder if it has a jre bundled in it or what...
[13:26:41] *** shadewind has quit IRC
[13:27:04] *** snaud has joined ##java
[13:29:27] <mitch0> eh, yes...
[13:32:34] *** Ven]n^ has joined ##java
[13:33:54] <Ven]n^> how do I close an existing openFile when doing this? http://rafb.net/p/D8JTqI35.html
[13:34:25] *** tilerendering has quit IRC
[13:34:42] <Ven]n^> im making a media player and if i open a new file.. the existing video is still there while the new video shows underneath
[13:34:56] <dangertools> Ven]n^: so stop the running player
[13:35:02] *** isr` has left ##java
[13:35:06] <Ven]n^> hm
[13:35:08] *** isr` has joined ##java
[13:35:34] <Ven]n^> how?
[13:35:54] <dangertools> by reading the api
[13:36:08] *** tilerendering has joined ##java
[13:36:40] <Ven]n^> i dont see how stopping the running player will allow a new openFile to take the previous' file place
[13:36:48] *** Resistance has joined ##java
[13:37:12] *** enterneo has quit IRC
[13:37:40] *** enterneo has joined ##java
[13:38:20] <dangertools> first of all, "a new openFile" is the wrong term, it's just your method name. second, read the api, stop/close the old player, remove it from your container or reuse it with the new url
[13:39:28] <Ven]n^> i know its the wrong term, but the openFile method is so common
[13:39:44] <dangertools> to whom?
[13:39:55] <Ven]n^> most people
[13:39:57] *** javahorn has joined ##java
[13:40:22] *** Spike1506 has joined ##java
[13:40:57] *** csaba has quit IRC
[13:41:07] *** csaba has joined ##java
[13:41:40] *** r0bby has quit IRC
[13:46:02] *** Jubei has quit IRC
[13:47:13] *** L-----D has joined ##java
[13:47:22] *** enterneo has quit IRC
[13:56:42] *** Yancho has quit IRC
[13:56:54] *** beol has joined ##java
[14:02:05] *** eradicus has joined ##java
[14:02:10] *** durka42 has quit IRC
[14:02:12] *** eidolon has quit IRC
[14:04:38] *** waz has joined ##java
[14:06:02] *** squiddle has quit IRC
[14:07:07] *** StanAccy has joined ##java
[14:08:39] *** squiddle has joined ##java
[14:11:46] *** donavan has quit IRC
[14:13:31] *** steve-e has joined ##java
[14:15:21] *** mr_daniel has joined ##java
[14:15:43] *** vyoman has joined ##java
[14:15:56] *** donavan has joined ##java
[14:16:36] *** monkeycid has joined ##java
[14:16:46] <mr_daniel> I know in Java there is a speciel construct Classname.class to create a object of type Class<Classname>
[14:17:18] <mr_daniel> I understand this. The Class 'Class' is used to get introspecion and reflection capabilites
[14:17:30] <mr_daniel> like determine the names of methods, parameter list, etc.
[14:17:37] <mr_daniel> but what I don't understand:
[14:18:07] *** ScottG489 has quit IRC
[14:18:14] <mr_daniel> in which situation a programmer uses 'Classname.class'? when the use of 'Classname.class' is absolutely necessary?
[14:18:36] <mr_daniel> is there maybe a special type of programming paradigm, which relays on the use of 'Classname.class'?
[14:19:05] *** geaaru has quit IRC
[14:19:23] <mr_daniel> ...a speciel paradigm which depneds on 'Classname.class'...?
[14:20:09] <mr_daniel> the point is: I have NEVER used such a statemtent (Classname.clas) in any of my so far written java programs
[14:20:18] <dangertools> ~reflection
[14:20:18] <javabot> dangertools, reflection is http://java.sun.com/tutorial/reflect
[14:20:25] <mr_daniel> I just want examples when it makes sense to use a such feature
[14:20:36] <mitch0> Logger.getLogger(MyClass.class)
[14:21:22] <mr_daniel> 'Logger.getLogger(MyClass.class)'? But why not use 'Logger logger = new Logger(...)' ?
[14:21:40] <mr_daniel> for me 'new Loger(...)' and 'getLogger(...)' has the same effect
[14:21:43] <mr_daniel> and also the same benefit
[14:21:48] <mr_daniel> I dont see any difference
[14:22:12] <mitch0> erm, the first part was not important
[14:22:24] <mitch0> it could be new Logger(MyClass.class)
[14:22:28] *** nom_s has quit IRC
[14:22:54] <snodnipper> EntityManager.createNativeQuery(String sql, Class entity) in JPA
[14:23:00] <dangertools> mr_daniel: also look at the reflection link
[14:23:01] *** durka42 has joined ##java
[14:24:48] <mr_daniel> ok, I will read the tutorial at sun.com, hopefully this will explain my such a construct like Classname.class is ABSOLUTELY necessary in some cases
[14:24:53] <mr_daniel> thx for the link dangertools
[14:25:49] *** eradicus has quit IRC
[14:27:05] <snodnipper> mr_daniel: JPA, again, entityManager.find(MyEntity.class, id) - finds your entity based on the primary key.
[14:27:06] *** bitshuffler has joined ##java
[14:28:19] *** Spike1506 has quit IRC
[14:29:11] *** tomekw has quit IRC
[14:34:57] *** tissue has quit IRC
[14:35:02] *** riotz has joined ##java
[14:36:54] *** vezzoni has joined ##java
[14:37:05] *** alek_b has quit IRC
[14:37:49] *** Techdeck has quit IRC
[14:40:38] *** lintlock has quit IRC
[14:41:27] *** aleksei has joined ##java
[14:42:13] *** notyouravgjoel has quit IRC
[14:42:37] *** jchauncey has joined ##java
[14:43:07] *** acuster has joined ##java
[14:43:14] *** kibibyte has joined ##java
[14:43:36] *** acuster has quit IRC
[14:43:36] <jchauncey> stupid question but in a jpa app which is running on tomcat without spring, I am responsible for closing the entity manager when I am done correct?
[14:44:03] *** ilyak has joined ##java
[14:44:33] *** KikiJiki has joined ##java
[14:46:17] *** Resistance has quit IRC
[14:46:44] *** durka42 has quit IRC
[14:46:46] <snodnipper> depends if you are using a Container Managed Entity Manager or an Application Managed Entity Manager
[14:46:58] *** jdolan_ has joined ##java
[14:47:40] *** donavan has quit IRC
[14:53:09] *** Resistance has joined ##java
[14:54:50] <bindaas> snodsniper: if he is using tomcat minus spring,does not that mean his application is not conatiner managed?
[14:55:00] <bindaas> container*
[14:55:14] <bindaas> jchauncey : yes
[14:55:46] *** javahorn has quit IRC
[14:56:01] *** javahorn has joined ##java
[14:59:00] <snodnipper> An example of an application managed transaction:
[14:59:02] <snodnipper> http://www.datanucleus.org/products/accessplatform_1_0/jpa/transactions.html
[14:59:57] <snodnipper> To be honest, I am working with that right now...and I am using application managed transactions....but I am noticing that I am repeating the same old transaction code over again and again.
[15:01:16] <snodnipper> I had thought about creating 'Jobs' implementing an execute() method....which would mean that in the middle of, say, that example transaction from datanucleus, one could have job.execute()
[15:02:13] *** shadewind has joined ##java
[15:02:20] *** acuster has joined ##java
[15:02:31] <snodnipper> the question I'm unsure about is whether to use Container Managed transactions, which other people have commented aren't so clear/explicit.
[15:02:37] *** _acid__ has joined ##java
[15:02:47] <snodnipper> dunno.
[15:04:12] <Ven]n^> anyone knows how to get a video to play in fullscreen in JMF ?
[15:05:02] *** OsAC has joined ##java
[15:06:05] *** penthief has joined ##java
[15:07:32] *** monkeycid has quit IRC
[15:09:08] <penthief> ~pastebin
[15:09:08] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.
[15:10:05] *** hoerup has quit IRC
[15:10:35] *** rollins has joined ##java
[15:10:46] *** donavan has joined ##java
[15:13:35] *** blahjake has joined ##java
[15:13:39] *** userek has joined ##java
[15:14:11] <userek> hello, is it possible to have the cursor painted on uneditable JTextArea?
[15:14:35] *** thpar has quit IRC
[15:14:49] *** CarstenP2 has joined ##java
[15:14:51] *** M[]ssad has joined ##java
[15:15:27] *** magcius has joined ##java
[15:15:54] *** monkeycid has joined ##java
[15:18:47] *** eidolon has joined ##java
[15:19:23] *** vesz has quit IRC
[15:19:49] *** Woflborg has quit IRC
[15:20:56] <penthief> Friday challenge: http://eugeneciurana.com/pastebin/pastebin.php?show=40266
[15:21:16] <jottinger> errrrr...
[15:21:20] <jottinger> why is it a friday challenge?
[15:21:25] *** alek_b has joined ##java
[15:21:26] <jottinger> Should we care? What do we get for solving it?
[15:21:43] <penthief> Insight into generics?
[15:21:57] <ilyak> penthief: wtf
[15:22:04] <penthief> Okay, I just want help with some experimentation I'm doing in my lunchtime.
[15:22:09] <penthief> ilyak: troll
[15:22:27] <jottinger> we need more insight into generics? Why?
[15:23:14] <penthief> "This is one of the most popular and helpful programming channels in the IRC universe: a great place to learn about all things Java. "
[15:24:03] *** javahorn has quit IRC
[15:24:48] *** alek_b has quit IRC
[15:24:55] *** alek_b has joined ##java
[15:25:02] <jottinger> penthief: this means we do your homework?
[15:25:34] <penthief> jottinger: Not homework. I have a job, and a lunchbreak.
[15:25:57] <eidolon> ~be jottinger
[15:25:57] <javabot> All humans suck.
[15:26:05] <eidolon> words to keep in mind when working with him.
[15:26:20] <jottinger> ~be jottinger
[15:26:20] <javabot> All humans suck.
[15:26:23] <jottinger> ~be jottinger
[15:26:23] *** notyouravgjoel has joined ##java
[15:26:23] <javabot> Love is a a lie.
[15:26:34] <jottinger> There we go! I'm way more random than javabot makes me seem.
[15:26:58] <eidolon> notyouravgjoel: i've eaten at your brothers' restaurant. excellent food.
[15:27:23] *** durka42 has joined ##java
[15:27:43] *** ldam has quit IRC
[15:27:59] *** thpar has joined ##java
[15:28:18] <notyouravgjoel> ha, don't have a brother, but thanks!
[15:29:07] <neshaug> omg..
[15:29:30] <eidolon> witty humor fail.
[15:29:43] <neshaug> true that
[15:29:45] <notyouravgjoel> I thought there was something there I was missing
[15:30:25] <eidolon> http://www.notyouraveragejoes.com/
[15:30:39] *** dnmo has joined ##java
[15:30:48] *** riotz has quit IRC
[15:30:50] *** OsAC has quit IRC
[15:31:58] *** fanti has quit IRC
[15:32:13] <jottinger> the problem with witty humor is that you've only half of it.
[15:32:28] *** mazzachre has quit IRC
[15:32:30] <notyouravgjoel> wow, is this place well known?
[15:32:38] <notyouravgjoel> its only in two states, and barely 2
[15:32:51] <eidolon> well known around here. very good food.
[15:33:07] <notyouravgjoel> fair enough =)
[15:33:31] *** dnmo has quit IRC
[15:34:15] *** dnmo has joined ##java
[15:34:24] <notyouravgjoel> Not well known in Pittsburgh, however -(
[15:35:09] <eidolon> heh. i spend a fair amount of time in pittsburgh though. i'll have to introduce 'em. *nod*
[15:35:34] *** Varox has joined ##java
[15:35:34] <notyouravgjoel> hah, sounds good
[15:36:08] <notyouravgjoel> oh so last night I asked a question, but nobody was around: Is there a good/well-known way to quickly generate the powerset in java? or, something similar
[15:36:25] <notyouravgjoel> I realize the problem is exponential, and I'm working on that at the moment
[15:36:46] <eidolon> sounds like Math.
[15:36:48] <eidolon> ~math
[15:36:48] <javabot> <barbie>Math is hard, Ken!</barbie>
[15:37:01] <notyouravgjoel> ha
[15:38:35] <notyouravgjoel> yes well, it is
[15:38:47] <notyouravgjoel> though math is sometimes useful in CS =)
[15:39:34] <eidolon> ~javadoc math
[15:39:36] <javabot> eidolon: http://is.gd/jqfG [java.lang.Math]
[15:39:37] *** crowbar has joined ##java
[15:39:42] <eidolon> that's why we have that. *nod*
[15:39:52] *** Csow has quit IRC
[15:39:59] *** crowbar has quit IRC
[15:40:13] <notyouravgjoel> ah, no dice
[15:40:23] *** crowbar has joined ##java
[15:40:28] <notyouravgjoel> I think I found a way around it, though
[15:40:40] *** Vogil has joined ##java
[15:40:48] <eidolon> excellent.
[15:40:49] <eidolon> ~next
[15:40:49] <javabot> Another satisfied customer. Next!
[15:40:56] *** Yancho has joined ##java
[15:41:24] *** donavan has quit IRC
[15:41:49] <Vogil> using weblogic as a client, and sending a request to a stateful web service...how does one keep track of the session IDs. I don't know if this is the norm, but it's in the soap header
[15:42:13] <Vogil> the documentation says if you are using axis, just turn on simple session handling, but I don't know what the equivalent of that is in weblogic
[15:42:14] *** popcornPanic has joined ##java
[15:42:29] *** l3ns has joined ##java
[15:42:36] <l3ns> Hi everyone.
[15:43:25] <l3ns> dangertools: Thanks for the help the other day. Everything is working fine now with the GUI side. ^^
[15:43:44] *** dmlloyd_ is now known as dmlloyd
[15:44:00] *** csaba has quit IRC
[15:45:00] *** TooAngel has joined ##java
[15:47:07] *** Unavowed has joined ##java
[15:47:40] <Unavowed> question: if a class is final, does the VM use non-virtual (in the C++ sense) method calls on it?
[15:48:12] <Unavowed> i.e. are final classes faster than non-final classes?
[15:48:29] <eidolon> ~final
[15:48:29] <javabot> eidolon, final is a Java keyword that denotes that its target cannot change. A final field/variable cannot be assigned more than once, a final method cannot be overridden in a subclass, and a final class cannot be subclassed.
[15:48:48] <eidolon> there is likely a performance increase. TIAS.
[15:49:10] *** Hink has joined ##java
[15:49:19] <Unavowed> does that stand for "try it and see"?
[15:49:27] <eidolon> ~tias
[15:49:27] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[15:49:29] <jottinger> ~tias
[15:49:29] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[15:49:34] <eidolon> ~jottinger--
[15:49:34] <javabot> jottinger has a karma level of 236, eidolon
[15:49:47] * jottinger eyes eidolon
[15:49:57] *** notyouravgjoel has left ##java
[15:50:12] * eidolon spleens jottinger
[15:50:24] *** magcius has quit IRC
[15:50:32] * jottinger kidneys eidolon
[15:50:35] *** penthief has quit IRC
[15:50:45] * eidolon is hax0ring... word. :-/
[15:50:50] <Unavowed> well, thanks for the suggestion, i'll just assume that a smart vm will do better
[15:50:58] *** jdolan_ has quit IRC
[15:51:04] *** tvparys has joined ##java
[15:51:05] *** magcius has joined ##java
[15:51:09] <jottinger> generally it will. Safe assumption. if you question it, measure.
[15:51:19] *** corpwicle has quit IRC
[15:51:25] <Ven]n^> any suggestions how to get fullscreen in JMF guys? :)
[15:52:06] *** squiddle has quit IRC
[15:53:14] *** bjv has joined ##java
[15:53:40] *** ldam has joined ##java
[15:54:14] *** conan has joined ##java
[15:54:58] <bjv> naively i thought console input would 'just work'
[15:55:05] <bjv> BufferedReader stdIn = new BufferedReader( new InputStreamReader(System.in)); String inputStockSymbol = null;
[15:55:05] <bjv> System.out.println("type: "); try{ inputStockSymbol = stdIn.readLine(); }catch (IOException e){ System.out.println("IO error tring to read input"); }
[15:55:28] <bjv> after the prompt is printed, when i type it just sits there.
[15:55:43] <bjv> hitting enter gets me a new line, but im just typing into a dead console
[15:55:50] <eidolon> java console / curses support is weak, alas.
[15:56:15] <bjv> i thought it was because i was typing into a macOSX console
[15:56:33] <bjv> so i switched to a vt in a linux vm
[15:56:37] *** thpar has quit IRC
[15:56:49] <bjv> but in both casses i was typing in over ssh
[15:57:06] <bjv> javac is on a remote sun machine.
[15:57:23] *** thpar has joined ##java
[15:57:39] <eidolon> http://articles.techrepublic.com.com/5100-10878_11-5030298.html
[15:57:52] <eidolon> googling "java terminal input" is helpful.
[15:58:08] *** jabalsad has quit IRC
[15:58:26] *** jabalsad has joined ##java
[15:58:38] <bjv> whoops. my bad.
[15:59:14] <bjv> did a simple test & console input was working just as expected,
[15:59:19] *** hcMyth has joined ##java
[15:59:35] <bjv> prob is either the socket im talking into or the one im wating on. :|
[15:59:57] *** falx has joined ##java
[16:00:27] <falx> hello everybody
[16:00:36] *** Csow has joined ##java
[16:00:37] *** abruptus has joined ##java
[16:01:02] *** sombriks has quit IRC
[16:01:13] <falx> could someone please enlighten me as to how in God's green earth am I supposed to tell Spring Security that after successfully logging in I want to remain on the previously requested URL?
[16:01:28] <falx> it always redirects me to "/"
[16:01:33] *** rollins has quit IRC
[16:03:25] <falx> anyone?
[16:04:47] *** rollins has joined ##java
[16:05:09] *** progre55 has joined ##java
[16:06:00] *** Angel-SL has joined ##java
[16:06:56] *** durka42 has quit IRC
[16:07:10] *** donavan has joined ##java
[16:07:47] *** tvparys has quit IRC
[16:09:01] *** le_biloute has quit IRC
[16:09:17] *** le_biloute has joined ##java
[16:09:54] *** le_biloute has quit IRC
[16:10:08] *** le_biloute has joined ##java
[16:10:37] *** bolt has quit IRC
[16:12:18] *** deSilva has quit IRC
[16:12:48] <isr`> in case anyone wanted to know... It is a pure virtual private destructor that is inherited from a protected abstract virtual base. In other words, a destructor function that can only be called by members or friends of the class (private), and is assigned a 0 (pure virtual) in the base class (abstract base) that declares it, and will be defined later / overriden in a derived class that shares the multiply-inherited base (virtual base) in a pr
[16:15:16] *** acuster has quit IRC
[16:15:17] *** jdolan_ has joined ##java
[16:17:13] *** Techdeck has joined ##java
[16:17:13] *** harurenu has joined ##java
[16:17:21] *** trentg has joined ##java
[16:17:35] *** TooAngel has left ##java
[16:17:40] *** deepjoy has left ##java
[16:17:49] *** ATF3 has joined ##java
[16:18:10] <ilyak> isr`: *shrugs* we didn't
[16:18:13] *** vinse has quit IRC
[16:18:22] *** trentg has quit IRC
[16:18:40] *** conan has quit IRC
[16:19:15] *** thpar has quit IRC
[16:19:59] <csgeek> does anyone use a swing form designer of any type? I know netbeans has matisse.. and there a few addons for Eclipse that sort of work.. anyone know of any that just let you open up a form, generate a .java file.. independant of any IDE... take a .form maybe and create a .java from it
[16:20:30] <pr3d4t0r> csgeek: FOP used to do that; check if it's still around.
[16:21:05] <pr3d4t0r> csgeek: It would take an XSL:FO input and generate either a PDF or a Java GUI or a Postscript file.
[16:21:07] <csgeek> does FOP stand for anything?
[16:21:32] <pr3d4t0r> csgeek: FO == Formatting Objects. I don't recall what the P stands for (I haven't touched it since 2004).
[16:21:46] <pr3d4t0r> csgeek: Go to the Apache sites and dig for it.
[16:21:51] <pr3d4t0r> csgeek: It's an Apache project.
[16:21:53] <csgeek> Processor
[16:22:17] *** smellynoser has joined ##java
[16:22:51] <smellynoser> If I do: stream_fp = new File(); then do stream_fp.length() every 5 seconds, will the length be updated, or will it use the last known length of the file?
[16:22:59] <pr3d4t0r> csgeek: FOP was a bit of a pain; there was some commercial software that did the same thing and implemented the complete XSL:FO spec. It wasn't very expensive either; XDF or something.
[16:22:59] <smellynoser> Do I have to do: stream_fp = new File(); again to get the new length?
[16:23:54] *** progre55 has left ##java
[16:24:11] <pr3d4t0r> smellynoser: Write a test case and find out :)
[16:24:17] <smellynoser> Rar :P
[16:24:25] <pr3d4t0r> smellynoser: Does the documentation say anything about it?
[16:24:40] <smellynoser> pr3d4t0r: Not that I saw at http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#length()
[16:24:44] <smellynoser> but I may be short sighted
[16:24:54] *** teralaser has quit IRC
[16:26:05] <pr3d4t0r> smellynoser: From the description it looks like you can recycle the the File instance and just query the file size.
[16:27:02] <Csow> need help with here please http://rifers.org/paste/show/8783
[16:27:12] <smellynoser> pr3d4t0r: Thankyou
[16:27:29] <Csow> around line 63 to end
[16:28:40] <Yancho> how can i convert an int to an integer please?
[16:28:50] <dmlloyd> ~~ Yancho javadoc Integer
[16:28:52] <javabot> Yancho: http://is.gd/iswl [java.lang.Integer]
[16:28:56] <dmlloyd> it's in the docs
[16:29:02] <dmlloyd> there's at least two ways to do it
[16:29:24] *** LordMetroid has joined ##Java
[16:29:33] *** deepjoy has joined ##java
[16:29:49] *** deepjoy has left ##java
[16:29:56] <Yancho> dmead am i understanding well as Integer(variablewhichisanint) ?
[16:30:14] <dmead> que?
[16:30:19] <dmead> i think you mean dmlloyd
[16:30:31] *** smellynoser has quit IRC
[16:30:32] <Yancho> yes sorry
[16:30:34] *** pgib has joined ##java
[16:30:50] *** thecarlhall has joined ##java
[16:30:56] <dmlloyd> dmead: maybe we both get a prize the 100th time someone does that!
[16:30:59] <pr3d4t0r> Oh, he left.
[16:31:07] <csgeek> pr3d4t0r, I found something that seems to work... JFormDesigner which is essentially what I was looking for....
[16:31:09] <pr3d4t0r> And no, he doesn't need to reinstantiate File every thime :)
[16:31:18] <dmlloyd> Yancho: yeah, that'd be the constructor. There's also a "valueOf" method you should look at.
[16:31:30] <pr3d4t0r> http://eugeneciurana.com/pastebin/pastebin.php?show=40269 - in case anyone is interested.
[16:32:09] *** zophy has quit IRC
[16:32:18] *** zophy has joined ##java
[16:33:30] <Yancho> dmlloyd i am still getting required java.lang..Integer[][] ( i am trying to fill in a multi dimensional array of Integer )
[16:33:49] <dmlloyd> ~~ Yancho arrays
[16:33:49] <javabot> Yancho, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[16:34:26] *** squiddle has joined ##java
[16:36:20] *** Junior has quit IRC
[16:36:28] <Yancho> there is no example (or i cant see one) where the array is filled in bit by bit
[16:36:30] *** hcMyth has quit IRC
[16:36:47] <Csow> need help http://rifers.org/paste/show/8783
[16:39:24] <mitch0> yancho: new Integer[] { new Integer[]{ 1, 2, 3 }, ... } ?
[16:40:04] <Yancho> ok trying it thanks
[16:40:38] *** mengu has joined ##java
[16:41:52] *** donavan has quit IRC
[16:42:28] *** clever has quit IRC
[16:42:52] <mitch0> actually, this works, too: private int[][] a = new int[][]{ { 1, 2, 3}, {4, 5, 6} };
[16:44:16] *** steve-e has quit IRC
[16:44:47] *** toens has joined ##java
[16:46:13] *** sjhd has joined ##java
[16:46:24] <Yancho> but like this u need to put the data straight away
[16:46:27] <Yancho> not store variables
[16:46:41] <sjhd> will a gui made with javafx run on a linux system?
[16:46:48] *** kungen has quit IRC
[16:47:01] *** epalm has joined ##java
[16:47:03] *** Archon has joined ##java
[16:47:26] <Archon> Is there a technical reason for disallowing anonymous classes to have constructors?
[16:47:30] *** tom17bombadil_ has joined ##java
[16:47:35] <sjhd> no
[16:48:02] <Archon> Are they going to be allowed in a future version of Java?
[16:48:25] <Vogil> hrmm, does anyone know how to implement session IDs in soap headers when creating a client with weblogic, im not sure if it's specific to weblogic, just in general, is there a way to capture and send the session ID with subsequent calls?
[16:48:41] *** sombriks has joined ##java
[16:51:33] *** schasi has quit IRC
[16:51:58] *** eduardoboss has joined ##java
[16:52:37] *** conan has joined ##java
[16:52:40] *** vesz has joined ##java
[16:53:00] *** BW^- has joined ##java
[16:53:43] <BW^-> where's there an example of how i generate a public and private 4096 bit RSA key, stuff them into a key store, and encrypt and decrypt strings using them?
[16:54:21] <BW^-> aha, KeyPairGenerator for generating.
[16:57:02] *** Archon has left ##java
[16:57:24] <sjhd> anyone here with experience in installing javafx on linux? sun only supports windows and macOS
[16:57:54] <dangertools> sjhd: you will have a hard time if linux is not supported
[16:59:40] <dangertools> anyway, looks like google has some howtos
[17:01:05] *** vix85 has joined ##java
[17:01:16] *** omaru has joined ##java
[17:01:38] *** vesz has quit IRC
[17:02:26] *** CrypticSquared has quit IRC
[17:02:28] *** Schmallon has joined ##java
[17:02:30] *** BeholdMyGlory has joined ##java
[17:02:37] *** marrd has joined ##java
[17:03:19] *** Woflborg has joined ##java
[17:03:26] <Schmallon> Is there any built-in way to get a VM-wide unique ID for an object?
[17:03:45] <aleksei> sha
[17:04:09] *** donavan has joined ##java
[17:04:10] *** Vogil has quit IRC
[17:05:12] *** L-----D has quit IRC
[17:06:08] <BeholdMyGlory> when playing a bit with cos sin and tan, I seem to get strange values with doubles, instead of 4, I get 4.000000000000000000008 or something like that
[17:06:11] <Schmallon> @aleksei: sha of what? a serialized object?
[17:06:46] *** fryderyk has quit IRC
[17:06:57] *** kibibyte has quit IRC
[17:07:49] <blahjake> ~floating point
[17:07:49] <javabot> blahjake, floating point is http://mindprod.com/jgloss/floatingpoint.html
[17:08:05] <blahjake> BeholdMyGlory: ^
[17:08:18] <squiddle> BeholdMyGlory: that's floating point in computers, either live with it or use BigDecimal or something else which guarantuees correct numbers
[17:08:53] <squiddle> s/in computers/in java/
[17:09:20] *** Yustme has joined ##java
[17:09:34] <squiddle> Schmallon: UUID
[17:09:54] <BeholdMyGlory> hm, okay. well, I guess I could just round off the numbers to about 10-13 decimal places or so
[17:10:01] <sjhd> dangertools, howtos to get it on linux?
[17:10:01] <squiddle> Schmallon: http://java.sun.com/j2se/1.5.0/docs/api/java/util/UUID.html
[17:10:13] <sjhd> dangertools, I googled but didn't find any
[17:10:19] *** JamesIry has joined ##java
[17:10:25] <sjhd> dangertools, well, I'll take a closer look
[17:10:27] *** JamesIry has left ##java
[17:10:51] *** xabbuh has quit IRC
[17:11:21] *** Resistance has quit IRC
[17:12:04] <Schmallon> @squiddle: I guess that means I have to take care of the object->ID mapping myself? I mean, that's ok. I was just wondering whether something like this isn't built in.
[17:12:20] *** FuZion755 has joined ##java
[17:12:25] *** Voyager1960 has joined ##java
[17:12:37] *** MigoMipo has joined ##java
[17:13:32] *** ankylose has quit IRC
[17:13:34] <FuZion755> I'm looking for a good tutorial about packing resources into a JAR, say an image, and referencing them from the Java program, can someone point me in the right direction?
[17:14:09] <dangertools> ~~ FuZion755 javadoc Class.getResource(*)
[17:14:09] <javabot> FuZion755: http://is.gd/jfj7 [java.lang.Class.getResource(String)]
[17:14:11] *** waz has quit IRC
[17:14:41] *** waz has joined ##java
[17:14:49] <reisi> does anyone know if tiles.apache.org is being developed anymore?
[17:15:01] <jottinger> yes, it is still an active project
[17:15:10] <jottinger> not a lot of new development with it, since it, like, works
[17:15:16] *** falx has quit IRC
[17:15:18] *** hiredman has joined ##java
[17:15:37] <Unavowed> Schmallon: what about Object.identityHashCode() ? that returns the in-memory address of the object
[17:15:50] <FuZion755> thank you much
[17:15:54] *** FuZion755 has left ##java
[17:17:01] <pr3d4t0r> FuZion755: <begin-tutorial>Package the resource in the .jar file. Get an instance of your current class and class loader. Use the loadResource() API to load the resource from the .jar using /path/to/resource.ext, where the "root" is just the highest directory level when you made the .jar.<end-tutorial>
[17:17:06] *** clever has joined ##java
[17:17:20] <squiddle> Unavowed: this is as random as a uuid and can't be resolved back too, and it hides the fact that an id is needed, i would not use that
[17:17:29] <jottinger> what's the uuid for?
[17:17:39] <squiddle> Schmallon: whats the id for?
[17:18:16] <Unavowed> if no two objects of a class need to be equal, identityHashCode should be enough
[17:18:33] *** shervin_a has quit IRC
[17:18:58] *** mengu has quit IRC
[17:19:19] <sjhd> too bad I'd really like to do it with javaFX
[17:20:06] <jottinger> sjhd: what with javafx?
[17:20:17] <dangertools> sjhd: what's wrong with the howtos found via google?
[17:20:21] <squiddle> Unavowed: that is not guaranteed
[17:20:30] *** donavan has quit IRC
[17:20:47] <sjhd> jottinger, I have to implement a gui for my project and some guys here pointed me to javaFX which is great, but it's not supported on linux
[17:21:07] *** teralaser has joined ##java
[17:21:15] <sjhd> dangertools, they say I should use the macOS installs
[17:21:23] <dangertools> yes
[17:21:45] *** sidelil has joined ##java
[17:21:49] *** donavan has joined ##java
[17:22:11] <cheeser> sjhd: most of it works on linux. jsut not the video codecs yet.
[17:22:39] <sjhd> and the eclipse plugin is outdated
[17:24:26] <sidelil> Hi everyone, I'm having troubles with the the Full Screen mode. I followed the tutorial and I'm checking if the change to full screen is supported with isFullScreenSupported(), as sugguested. It always return false, both on win and on linux. Does anyone know why and a way to have it working? Thanks a lot
[17:29:10] <sjhd> gotta go, thx for the hints. dangertools I'll take a closer look, thx
[17:29:17] *** sjhd has left ##java
[17:31:39] *** AlphaOmega has joined ##java
[17:32:47] *** Csow has quit IRC
[17:34:12] *** Stef1 has joined ##java
[17:36:06] *** monkeycid has quit IRC
[17:36:07] *** popcornPanic has quit IRC
[17:36:24] *** Unavowed has quit IRC
[17:36:40] *** Odin79 has joined ##java
[17:37:00] *** neuro_damage has joined ##java
[17:37:08] *** goki-_- has joined ##java
[17:37:32] *** donavan has quit IRC
[17:38:20] *** donavan has joined ##java
[17:39:25] *** ATF3 has quit IRC
[17:40:18] *** Riov has joined ##java
[17:40:25] *** mengu has joined ##java
[17:41:05] *** igordcard has quit IRC
[17:42:00] *** Hates_ has quit IRC
[17:42:01] *** rlubke has joined ##java
[17:42:13] *** jbartels has joined ##java
[17:43:53] *** phyburn has joined ##java
[17:43:59] *** KikiJiki has quit IRC
[17:44:11] *** legistrate has joined ##java
[17:44:18] *** KikiJiki has joined ##java
[17:44:30] *** gdoko has quit IRC
[17:44:41] <legistrate> is there a JSP channel on freenode?
[17:44:51] *** Greyhound- has quit IRC
[17:45:00] <legistrate> just jsp was empty
[17:45:19] <legistrate> or should I just ask questions here?>
[17:45:33] *** Greyhound- has joined ##java
[17:45:59] <jottinger> wall*e!
[17:46:21] <Stef1> just ask, and the person who knows the answer will reply.
[17:46:49] <_W_> or will he? perhaps he's busy right now
[17:47:02] <legistrate> I am trying to forward XML as a text parameter to a PDF printing servlet on our sserver, and the way that everyone else has done it was to form the xml in a srciptlet, then forward the string as a parameter using jsp:forward
[17:47:59] <legistrate> but I figure with things like jsp:include which can process the page first, there should be some clever way to detach the input from the forward page and bring the content in as a string
[17:48:28] *** zophy has quit IRC
[17:48:31] <cheeser> legistrate: stick the xml in the request from serlvet A then forward to the PDF servlet
[17:48:37] <cheeser> or just do it all in one servlet
[17:48:45] <legistrate> Is there perhaps a scriptlet counterpart to the jsp:include command that could process the page and return the output to a Java String?
[17:48:55] *** NiSoOo has joined ##java
[17:48:57] *** agnul has quit IRC
[17:49:28] <cheeser> JSPs don't return values
[17:49:37] <cheeser> and you shouldn't be using a JSP for this anyway.
[17:49:40] <cheeser> JSP == presentation
[17:49:40] <legistrate> but taglibs do
[17:49:53] <cheeser> taglibs aren'tJSPs are they?
[17:50:08] <legistrate> scriptlets can call compiled apis that return code
[17:50:27] <legistrate> I figured since taglibs are compiled code, there might eb a function that does the same thing
[17:50:35] <legistrate> :D
[17:50:40] <legistrate> no they are not
[17:50:55] <cheeser> you really should just use a servlet to generate the xml
[17:50:58] *** Bevin has quit IRC
[17:52:05] *** isr` has quit IRC
[17:53:25] <legistrate> Im not familiar with servlets, and my timeline doesnt have enough wiggle room to learn them. Why would a servlet be so much better than a JSP page. A JSP translates to a servlet right?
[17:53:50] <BW^-> how do i best serialize and deserialize java.security.Key to/from string?
[17:53:55] <BW^-> i want to put it in a keystore
[17:54:25] *** LordMetroid has quit IRC
[17:54:26] *** elmomalmo has quit IRC
[17:55:06] *** josemoreira has joined ##java
[17:55:30] *** cybereal has joined ##java
[17:55:51] *** dpy has quit IRC
[17:56:16] *** donavan has quit IRC
[17:56:36] <Stef1> What is the best way to add tests to a project as in the package location? I have src/ lib/ res/ and now I added test/ but my ide gives a compiler error since it is not under the classpath
[17:57:22] *** Angel-SL has quit IRC
[17:57:41] *** amitev has quit IRC
[17:57:49] *** donavan has joined ##java
[17:57:57] <Stef1> when I add it to the classpath it compiles but then I have as package in a test class package subPack instead of test.subPack :/
[17:58:04] *** Schmallon has quit IRC
[17:58:32] *** l3ns has quit IRC
[17:58:50] <Stef1> On 1 line: how do you add tests to a project.
[17:58:59] <cheeser> so add the aprent of test to the classpath
[17:59:06] <cheeser> or fix your code layout to something reasonable.
[17:59:42] <cheeser> ~~ Stef1 newbie ide
[17:59:43] <javabot> Newbies shouldn't start with IDEs. It's important to learn the environment and fundamentals of a language before offloading those to an IDE. Learn about packages and imports and classpaths. Learn how to compile and use the JDK tools. Get some basic grasp of the API layout. Learn how to do things then switch to an IDE to do them faster. See http://tinyurl.com/yvks48 and and http://tinyurl.com/2cpn6o for more info.
[18:00:03] <Stef1> :(
[18:01:31] *** donavan has quit IRC
[18:01:46] <jottinger> Stef1: look up maven. or learn what the classpath is. Or, heck, learn java.
[18:01:49] <jottinger> It's a cool language.
[18:02:00] <paulweb515> Stef1: it's a folder problem? Why not create test_src or something, and then put it under test/subPack ... i.e. make test_src the source folder, not tests
[18:02:06] <paulweb515> s/tests/test
[18:02:14] *** bolt has joined ##java
[18:02:51] *** TJC09 has joined ##java
[18:03:57] *** TJC09 has quit IRC
[18:04:26] *** TJC09 has joined ##java
[18:05:14] <Stef1> the classpath is a list of dirs where the compiler looks for classes to launch, classes outside of it are not found y? it's a list with ; in between c:/java/jdk/;c:/proj/src;c:/proj/test
[18:06:01] <cheeser> it's a list of locations. not dirs.
[18:06:41] <cheeser> Stef1: any class in c:/proj/test/subPack has to be in the packate subPack. not test.subPack
[18:06:54] <cheeser> ~~ Stef1 packages
[18:06:54] <javabot> please see http://java.sun.com/tutorial/java/interpack/packages.html and some examples http://javafaq.mine.nu/lookup?254
[18:07:00] *** UT2K3 has joined ##java
[18:07:41] *** legistrate has quit IRC
[18:08:46] *** cuban has quit IRC
[18:09:35] *** zophy has joined ##java
[18:09:46] *** Archon has joined ##java
[18:10:27] *** oxi has joined ##java
[18:11:11] *** phyburn has quit IRC
[18:11:29] <Stef1> The problem is when I have subPack as package when I make a jar it will be in the top package ie src/ subPack/
[18:12:16] * jottinger sighs
[18:12:27] <jottinger> the real problem is that you're trying to do stuff you don't understand
[18:14:43] <Archon> What happens if you use synchronized(aNullObject){} ? Will it cause an exception?
[18:14:59] *** alek_b has quit IRC
[18:15:02] *** CarstenP2 has left ##java
[18:16:37] *** svm_invictvs has joined ##java
[18:16:43] <cheeser> ~tias
[18:16:43] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[18:17:09] *** Carnage\ has joined ##java
[18:19:58] <Stef1> I think I know what I did wrong, src is just the top dir it's not included in the packages so I have to add my tests under src like src/test/ then my test packages will be test.subPack.
[18:20:26] *** Archon has left ##java
[18:20:39] <jbartels> question about event/observer: http://pastebin.com/d56240c5
[18:21:00] <jbartels> Should I create a new observer for each item that I want to observe or share one observer between all of them
[18:21:09] <jottinger> depends on what you want it to do
[18:21:18] <jbartels> treat that snippet as psuedo code BTW
[18:21:31] *** NiSoOo has quit IRC
[18:21:41] <jbartels> its a JTAPI -> HTTP bridge. So all JTAPI events on a set of terminals go to one HTTP connection
[18:22:26] <jbartels> that HTTP POST is handled by the observer
[18:22:35] *** ankylose has joined ##java
[18:22:52] *** NiSoOo has joined ##java
[18:23:06] <NiSoOo> can a thread run without a process?
[18:23:10] <NiSoOo> can a process run with no thread?
[18:23:28] <Stephmw> whut?
[18:23:28] *** Chouser has joined ##java
[18:24:02] <dmlloyd> a process is a collection of threads
[18:24:05] <cybereal> NiSoOo: no and no
[18:24:23] <dmlloyd> a process with no threads is dead or a zombie
[18:24:36] *** javahorn has joined ##java
[18:24:39] <cybereal> or very old :)
[18:24:40] <NiSoOo> why cant a process be with no threads?
[18:24:46] * pr3d4t0r wonders if they still teach operating system classes in schools.
[18:24:50] <dmlloyd> because anything that runs, is running in a thread
[18:24:54] *** mdmkolbe has joined ##java
[18:25:01] <dmlloyd> a thread is an execution context for an application
[18:25:03] <NiSoOo> (it's theortical)
[18:25:08] <cybereal> NiSoOo: this is ##java not ##remedialosquestions
[18:25:33] *** progre55 has joined ##java
[18:25:34] <dmlloyd> ...is this homework?
[18:25:41] *** valcker has quit IRC
[18:25:43] *** vesz has joined ##java
[18:26:06] * pr3d4t0r wonders if they teach operating systems theory in Israel.
[18:26:43] <jottinger> in israel they just say "buy some more blades" and leave it at that
[18:26:55] <Chouser> In case ant questions aren't too OT: Anyone know how to set a sysproperty depending on an ant command-line option (presumably -Dsomething)?
[18:26:55] <mdmkolbe> Why is this "import static" not working? http://pastebin.com/m625dcb7f
[18:26:59] <pr3d4t0r> jottinger: What if they process has multiple threads?
[18:27:08] <jottinger> they use a multithreaded environment!
[18:27:13] <jottinger> and buy more blades!
[18:27:16] <Stef1> foo.*;
[18:27:19] <pr3d4t0r> jottinger: Ah, makes sense.
[18:27:26] <pr3d4t0r> jottinger: And what if it isn't a Java process?
[18:27:36] <cybereal> Chouser: those are ALREADY system properties
[18:27:39] <jottinger> then you use .net
[18:27:48] <jottinger> processes aren't java or .net, they're concepts
[18:27:51] <jottinger> you dumbass!
[18:27:57] <Stef1> mdmkolbe: http://java.sun.com/j2se/1.5.0/docs/guide/language/static-import.html
[18:28:15] <pr3d4t0r> Mmmm... movie with Audrey Tautau coming tomorrow on Netflix :)
[18:28:21] <cheeser> mdmkolbe: put tested in a package
[18:28:25] <pr3d4t0r> jottinger: But... but... but...
[18:28:32] <jottinger> :)
[18:28:39] <jottinger> You should be washing cars, shouldn't you?
[18:28:41] <mdmkolbe> Stef1: "Tested" is the class not the package so "import static Tested.foo.*;" will not work
[18:28:50] <pr3d4t0r> jottinger: Heh.
[18:28:51] <mdmkolbe> cheeser: is there anyway without putting it in a package?
[18:28:59] <pr3d4t0r> jottinger: I told Ari to contact you.
[18:29:03] * jottinger goes to count his money in the pawn shop
[18:29:11] <pr3d4t0r> Hrm...
[18:29:13] *** le_biloute has quit IRC
[18:29:15] <jottinger> pr3d4t0r: i think I chased it down; I'm going to test it here (locall) first though
[18:29:16] <pr3d4t0r> Is it time for a little snack...?
[18:29:18] <Chouser> cybereal: I need to set a sysproperty in a <java> task. Sorry if that was critical, I barely have a clue what I'm doing in this build.xml file.
[18:29:21] <pr3d4t0r> jottinger: OKi, thanks.
[18:29:34] <cybereal> ~~ Chouser ant manual
[18:29:34] <javabot> Chouser, ant manual is http://ant.apache.org/manual/
[18:29:37] <dmlloyd> ~~chouser antcore java
[18:29:37] <javabot> http://ant.apache.org/manual/CoreTasks/java.html
[18:30:13] <jottinger> pr3d4t0r: The docs were a little unclear; what I thought they were purposefully not documenting was the active/passive failover, but they were ACTUALLY not documenting active/active striping
[18:30:13] <dmlloyd> ~static import
[18:30:14] <javabot> dmlloyd, static import is http://java.sun.com/j2se/1.5.0/docs/guide/language/static-import.html
[18:30:17] <jottinger> which we don't need
[18:30:20] <dmlloyd> just checking
[18:30:32] <Chouser> yeah, staring at that page already, but sysproperty appears to only take a literal value. Can I wrap an <if> around it or something?
[18:30:34] *** cybereal has quit IRC
[18:30:51] <jottinger> and since what we need is active/passive failover... win
[18:31:16] <dmlloyd> Chouser: use a value of ${some.property}, then you can set it on the ant cmdline via -Dsome.property=theValue
[18:31:32] <cheeser> mdmkolbe: i don't thinks. all you classes *should* be in packages anyway.
[18:32:01] <mdmkolbe> cheeser: the students I'm working with don't know about packages just yet
[18:32:17] <cheeser> mdmkolbe: so teach them.
[18:32:31] *** jchauncey has quit IRC
[18:32:32] <pr3d4t0r> jottinger: Schweet.
[18:32:37] <pr3d4t0r> jottinger: I'm looking forward to it.
[18:32:51] * pr3d4t0r ponders skulling jottinger -- in another channel ;)
[18:33:26] *** jchauncey has joined ##java
[18:33:35] *** conan has quit IRC
[18:33:43] <Chouser> dmlloyd: Ah! I had tried that already, but was getting a literal "${some.property}"
[18:33:58] *** josip has joined ##java
[18:34:01] <Chouser> dmlloyd: but trying that again, I see that's just the default and I can indeed override it on the ant command line.
[18:34:02] *** imohax has joined ##java
[18:34:13] <Chouser> dmlloyd: which seems clumsy but is good enough. thanks!
[18:34:17] *** ldam has quit IRC
[18:34:21] <dmlloyd> Chouser: you can set a default using the <property> task.
[18:34:28] <dmlloyd> Chouser: in ant, whoever writes first, writes best.
[18:34:34] <josip> Hello, I have problems with log4j. The file janta.log is created but nothing gets logged to it, while I get output to the console. The config file: http://pastebin.ca/1336236
[18:34:35] <dmlloyd> so to speak.
[18:34:35] *** le_biloute has joined ##java
[18:35:08] *** EnderMB has joined ##java
[18:35:17] *** KermitTheFragger has quit IRC
[18:35:48] <svm_invictvs> Hm...
[18:35:50] <jottinger> leave your skull stuff away from me
[18:35:54] <svm_invictvs> So tihs is the WTF of the day...
[18:35:59] <Chouser> dmlloyd: perfect! thanks again.
[18:36:32] *** squiddle has quit IRC
[18:36:46] <svm_invictvs> Compile Errors: 4 Warnings 20. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0. Build Status: PASSED.
[18:37:21] <EnderMB> Small beginner question. Is it bad to use public if you can use protected?
[18:37:32] <svm_invictvs> yes
[18:37:41] <Stef1> private would be best
[18:37:45] <svm_invictvs> Yeah
[18:37:50] <svm_invictvs> Protected.
[18:38:05] <svm_invictvs> Protected has a few use cases where it's highly appropriate.
[18:38:14] <EnderMB> I'm extending one class to two subclasses though so I can't change some of my variables to private
[18:38:27] <svm_invictvs> so?
[18:38:57] <EnderMB> I have a Game class where I've set my variables, so if I were to set them to private they couldn't be called in one of the subclasses
[18:39:09] *** ExxKA has joined ##java
[18:39:12] <svm_invictvs> Make getters for them?
[18:39:29] <Stef1> what do the subclasses need?
[18:39:34] <jbartels> EnderMB: http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
[18:39:47] <jbartels> there is a little chart on there that should help clarify
[18:40:19] <svm_invictvs> EnderMB: show us a little testcase.
[18:40:21] <svm_invictvs> ~testcase
[18:40:21] <javabot> Provide complete, compilable Java source code for a SINGLE class that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)
[18:40:57] *** goki-_- has left ##java
[18:41:13] *** ldam has joined ##java
[18:41:21] <EnderMB> Well the majority of my logic is in one class so I could just upload that one?
[18:41:27] *** AlphaOmega has left ##java
[18:41:38] <svm_invictvs> EnderMB: actually, that's a bad factoid. You don't necessairly limit it to one class.
[18:41:43] <EnderMB> Also that link doesn't work
[18:41:47] <svm_invictvs> I noticed
[18:42:15] <EnderMB> Well I created a Game class to handle most of the logic, extended it to MainGame and TestGame and put the extra logic in the subclasses
[18:42:31] <svm_invictvs> Sounds good...
[18:43:36] <EnderMB> At the moment the variables in the Game class are protected and are being called within the subclasses too, although I think it'd be better to make them private and find a way around calling them from within the subclasses.
[18:43:42] *** KikiJiki has quit IRC
[18:43:43] *** M[]ssad_ has joined ##java
[18:43:55] <EnderMB> I'll just put the Game class in the pastebin. It's not that big.
[18:45:06] <EnderMB> Here it is: http://eugeneciurana.com/pastebin/pastebin.php?show=40274
[18:45:58] <jbartels> EnderMB: the usual pattern is to make the variables private and then use get and set methods
[18:45:58] *** javahorn has quit IRC
[18:47:02] *** Chouser has left ##java
[18:47:02] <EnderMB> Should I write the setters in the Game class or in one of the subclasses?
[18:47:06] *** ries has joined ##java
[18:47:08] *** amnesiac has joined ##java
[18:47:09] *** M[]ssad__ has joined ##java
[18:47:10] <svm_invictvs> and use get and set methods only where appropriate. If you end up making a getter/setter for everything, it could be a sign you could make things a little better.
[18:47:24] *** javahorn has joined ##java
[18:47:26] <ries> hey all, I found this sample on the net : strm = new BufferedInputStream(new FileInputStream(propertiesFile));
[18:47:34] <ries> In that example, who is closing FileInputStream ???
[18:47:42] <Stef1> you can make random private and create a method getNextRandom()
[18:47:47] <svm_invictvs> ries: Nobody.
[18:47:56] * cheeser nods.
[18:47:57] <ries> svm_invictvs: so that's code, right?
[18:47:57] <svm_invictvs> ries: The file input stream will be closed when you close the buffered input stream.
[18:48:16] *** pandora-- has joined ##java
[18:48:34] <ries> svm_invictvs: why don't I have to close explicitly the FileInputStream myself in finalize for example?
[18:48:36] <cheeser> reading the source++
[18:48:48] <cheeser> ries: you should never, ever write a finalize method.
[18:48:52] <cheeser> evar!
[18:49:06] <joed> Evarz!!!
[18:49:20] <cheeser> ries: http://java.sun.com/developer/technicalArticles/javase/finalization/
[18:49:21] <ries> cheeser: :) good to know...
[18:50:04] <EnderMB> Stef1: Should getNextRandom() be private, because if I make it private it won't work within my subclasses
[18:50:28] <ries> cheeser: You are saying I should close the result in my catch or after I don't need the resource anymore, right?
[18:50:39] <cheeser> close resources in finally
[18:50:53] <cheeser> try {} catch() {} finally { //here }
[18:51:01] *** durka42 has joined ##java
[18:51:16] <dmlloyd> ~~ ries resource management
[18:51:16] <javabot> proper resource management is easy to get right - see http://dmlloyd.blogspot.com/2008/07/proper-resource-management.html for more information.
[18:51:43] <ries> cheeser: sorry about my usagege of finalize, I did mean to say finally..... sorry about the confusion
[18:51:43] *** javahorn has quit IRC
[18:51:47] * dmlloyd inflicts his terrible article writing skills on yet another hapless victim
[18:51:48] <Stef1> EnderMB: probably be protected then...
[18:51:50] <jbartels> ahha! Found my observer/event issue. Thanks all for letting me bounce my thoughts around
[18:52:01] <cheeser> ries: hehe
[18:52:22] <ries> I still don't understand why BufferedInputStream would close the resource from FileInputStream.....
[18:52:30] <dmlloyd> yeah, that's lame.
[18:52:41] <dmlloyd> chained streams should never close what they're chaining to.
[18:52:46] <dmlloyd> or flush, for that matter.
[18:52:50] <svm_invictvs> I'm still baffled over the build system faux pas this morning.
[18:53:18] *** popcornPanic has joined ##java
[18:53:18] <svm_invictvs> 1 unit test fails and 4 compliation errors, yet hte build system emailed everybody, "BUILD PASSED!"
[18:53:25] *** jdolan_ has quit IRC
[18:53:27] *** M[]ssad_ has quit IRC
[18:53:38] <cheeser> ship it!
[18:53:58] *** javahorn has joined ##java
[18:54:28] <svm_invictvs> blah
[18:54:32] <Stephmw> sue it!
[18:54:34] <svm_invictvs> lol
[18:54:41] <svm_invictvs> Wasn't my code.
[18:54:46] <Stephmw> sue them!
[18:54:55] *** Stef1 has quit IRC
[18:55:10] <svm_invictvs> Where does portage install maven?
[18:55:11] *** javahorn has quit IRC
[18:55:12] <svm_invictvs> WTF.
[18:55:25] *** Stef1 has joined ##java
[18:55:29] <cheeser> ask portage
[18:55:37] <cheeser> and it's called maven2-bin last i checked
[18:56:07] *** javahorn has joined ##java
[18:58:11] <svm_invictvs> cheeser: It's installed, I just have an ant script that's shitting all over itself trying to to a maven task from ant.
[18:58:31] <Stef1> cheeser: what is the difference between a location and a directory in a class path?
[18:58:38] <Ven]n^> how to prevent JPanels to resize? I dont want to be able to drag the window bigger.
[18:59:09] <Ven]n^> i want it to keep this size: http://rafb.net/p/mo2I2z37.html
[18:59:10] *** UK-sHaDoW has joined ##java
[18:59:23] <cheeser> Stef1: a jar is not a directory
[18:59:38] <cheeser> nor is a zip
[18:59:49] <Stef1> i see
[19:00:22] *** zophy has quit IRC
[19:00:22] *** Ivellina has joined ##java
[19:00:22] *** javahorn has quit IRC
[19:01:07] *** javahorn has joined ##java
[19:02:05] *** M[]ssad has quit IRC
[19:02:17] <sidelil> Hi everyone, I'm having troubles with the the Full Screen mode. I followed the tutorial and I'm checking if the change to full screen is supported with isFullScreenSupported(), as sugguested. It always return false, both on win and on linux. Does anyone know why and a way to have it working? Thanks a lot
[19:02:18] *** mdmkolbe has left ##java
[19:02:32] *** zophy has joined ##java
[19:03:19] <jbartels> sidelil: which tutorial?
[19:03:51] <sidelil> jbartels, http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html
[19:04:16] *** javahorn has quit IRC
[19:04:39] <jbartels> hrm, ok. sorry i can't help much, but just checking to see that you had a good tutorial source
[19:04:45] *** zophy has quit IRC
[19:05:11] *** zophy has joined ##java
[19:05:22] <jbartels> do the javadocs indicate that there might be quirks to isFullScreenSupported() ?
[19:05:45] <tieTYT2> isn't that easy to check?
[19:05:52] *** javahorn has joined ##java
[19:06:06] *** thorat has joined ##java
[19:06:14] <sidelil> jbartels, Im checking and it always returns that i cannot use the fullScreenMode
[19:06:42] <jbartels> what happens if you skip the check and just go straight to fullscreen mode?
[19:10:54] <pgib> Hello, we have a case where our application receives data from a 3rd party. We need to verify the sender of the message. So, the sender salts the payload with a pre-shared key, then send the MD5 of this with the payload. Then we verify the message by recomposing the MD5 with the same preshared-key we have on our server
[19:11:10] <pgib> This works, but any suggestions on maybe a better digest algorithm to use?
[19:12:06] <pgib> and is there someway to do this with a private/public key pair? I know it is slightly offtopic, but I figured there is a good deal of Java+Web experience here
[19:13:42] *** Riov has quit IRC
[19:14:35] <Sou|cutter> pgib: use SHA-256 instead of MD5
[19:15:19] <Sou|cutter> pgib: You could use TLS Authentication... a two-way ssl handshake
[19:15:29] <pgib> OK, any recommendation on privateKey size? I guess around 512 or so?
[19:15:39] <dmlloyd> SHA doesn't use a private key
[19:15:48] <Sou|cutter> it's just a hash
[19:15:49] <pgib> well,I mean for the salt
[19:15:53] <dmlloyd> unless you mean a shared secret ke to salt
[19:15:58] <dmlloyd> in which case, longer is better :)
[19:16:25] <dmlloyd> you might also want to look at MAC...
[19:16:28] <dmlloyd> ~~ pgib javadoc Mac
[19:16:30] <javabot> pgib: http://is.gd/jrIr [javax.crypto.Mac]
[19:16:31] <pgib> ya. OK, well this will be sufficient. This isn't like a healthcare program or anything. This is for us to remotely authenticate users
[19:16:44] *** fmontesi has quit IRC
[19:17:18] <sidelil> jbartels, oh sorry i didnt see your message. I happens that it creates a maximised window (i.e. in the top left corner) as it's supposed to do when it cannot turn to full screen. I thought it was a problem on my linux machine, but it doesnt run full screen on windows either
[19:17:26] <dmlloyd> and signatures...
[19:17:32] <dmlloyd> ~~ pgib javadoc Signature
[19:17:33] <javabot> pgib: http://is.gd/jrIV [java.security.Signature]
[19:17:47] <dmlloyd> I sure like the new javadoc output
[19:17:54] <dmlloyd> snazzy
[19:17:56] <Sou|cutter> I was just thinking that I kinda miss the whole urls :(
[19:18:07] <Sou|cutter> but they were spammy
[19:18:16] <dmlloyd> snazzy > spammy
[19:18:17] <pgib> sure. Ok thanks for the resources
[19:18:20] <jbartels> sidelil: OK so since it doesn't work you were using the isFullScreenSupported() to find out if it should work on that machine
[19:18:22] <cheeser> dmlloyd: danke. 8^)=
[19:18:29] <dmlloyd> :)
[19:19:01] <cheeser> i found a url shortener that tracks clickthroughs. might be interesting to use that and track stats...
[19:19:05] <dmlloyd> looks like it's gonna hit z*** soon
[19:19:29] *** progre55 has quit IRC
[19:19:37] <sidelil> jbartels, yeah I check before turning to full screen anyway, it's good programming practise and it was reccomended on the sun tutorial
[19:20:00] <jbartels> sidelil: my thought was that the check was somehow returning the wrong answer
[19:20:24] *** Copter has joined ##java
[19:20:30] <sidelil> jbartels, oh i see, no I tried without checking as well :(
[19:20:48] <jbartels> sidelil: bummer. I am out of ideas. :(
[19:21:49] <sidelil> jbartels, :) thanks anyway!
[19:23:28] *** igordcard has joined ##java
[19:24:32] *** ofl_ has joined ##java
[19:24:33] *** javahorn has quit IRC
[19:25:28] *** javahorn has joined ##java
[19:26:39] *** tomvolek has joined ##java
[19:27:39] *** alek_b has joined ##java
[19:27:48] *** M[]ssad__ has left ##java
[19:27:54] *** M[]ssad__ has joined ##java
[19:27:57] *** M[]ssad__ is now known as M[]ssad
[19:29:25] *** Riov has joined ##java
[19:31:45] <_val_> Hello can somebody look at this http://fpaste.org/paste/3594 I'm trying to get the md5 hash when the command !md5 test is invoked it should have returned the hash of the word "test"
[19:33:02] *** popcornPanic has quit IRC
[19:33:38] <FauxFaux> _val_: Yeeeah, you might want to learn programming.
[19:34:14] *** convivial has joined ##java
[19:34:31] <_val_> FauxFaux: that's what I'm doing. Where does it look like?
[19:34:36] <FauxFaux> That sounds mean. :/ I mean, that's not even remotely right, you mightwant to try a tutorial to get familiar with the basic concepts.
[19:34:40] <FauxFaux> ~tij
[19:34:40] <javabot> FauxFaux, tij is Thinking in Java by Bruce Eckel, see http://www.mindview.net/Books/TIJ/ for the 3rd edition (free download, published in 2002) or see http://www.mindview.net/Books/TIJ4 for the current edition which covers Java 5 features.
[19:34:52] <csgeek> I have a gridbaglayout that contains al my elements.. how do I set it so it fills the entire Jframe..
[19:35:18] <FauxFaux> _val_: Think about what `` "!md5"+ message '' will be at that point.
[19:35:46] *** harurenu has quit IRC
[19:35:58] <_val_> FauxFaux: +message is defined as parameter.. so it gets the word e.g test
[19:36:16] <_val_> !md5 test which is defined as message
[19:36:29] <aleksei> csgeek: give them a wheight horizontally and vertically and the fill in GridBagConstraints
[19:36:43] <FauxFaux> So if ("!md5 test").equalsIgnoreCase("!md5" + "!md5 test"))?
[19:37:04] <FauxFaux> So if ("!md5 test".equalsIgnoreCase("!md5" + "!md5 test"))?
[19:37:54] *** staykov has quit IRC
[19:38:09] <_val_> FauxFaux: ? else if("!md5 test".equalsIgnoreCase("!md5" + "!md5 test"))
[19:38:15] <_val_> is this what you mean?
[19:38:15] *** mohax has quit IRC
[19:38:17] *** imohax has quit IRC
[19:38:27] <FauxFaux> Close enough, yeah. Is that ever going to be true?
[19:38:37] *** ankylose has quit IRC
[19:38:46] <_val_> yes
[19:39:06] <FauxFaux> Really? When?
[19:39:10] <_val_> I mean I'm trying to return the hash.. of the word
[19:39:28] <_val_> !md5 test == !md5 test so what's wrong?
[19:40:07] <dmlloyd> read it again :)
[19:40:26] <dmlloyd> do you see what "!md5" + "!md5 test" is?
[19:40:42] <cheeser> pickles!
[19:40:52] *** skypce has joined ##java
[19:40:54] <FauxFaux> (I'd rather you understood what was (horribly) wrong with the current code than us just tell you the answer. Thanks for playing, dmlloyd)
[19:41:14] <_val_> dmlloyd: !md5 is just the command .. the hash of the word "test" should be returned
[19:41:21] <dmlloyd> heh
[19:41:33] <dmlloyd> you're just making things up now
[19:41:41] <FauxFaux> _val_: Do you see what "!md5" + "!md5 test" is?
[19:41:43] *** ries has quit IRC
[19:41:53] <dmlloyd> ...
[19:42:06] <FauxFaux> I capitalised it for you.
[19:42:16] <_val_> FauxFaux: yes it's just a string. Can you be more specific?
[19:42:35] <skypce> hi , give me one hand please, http://www.pastie.org/388449
[19:42:49] <jottinger> ~skypce++
[19:42:49] <javabot> skypce has a karma level of 1, jottinger
[19:42:53] <jottinger> being blunt rocks
[19:43:06] <FauxFaux> _val_: So you're asserting that "!md5 test".equals("!md5" + "!md5 test")? Yes/no answer please. :)
[19:43:16] *** gfather has joined ##java
[19:43:24] <_val_> no
[19:43:27] <skypce> hi jottinger
[19:43:47] <FauxFaux> _val_: So why have you written code that looks like that in your bot?
[19:44:01] <gfather> is java supposed to seem very diffecult to new peopl trying to learn it ?
[19:44:14] <eidolon> yes, it was deliberately designed to be difficult.
[19:44:19] <eidolon> it was in the first specification docs.
[19:44:23] <eidolon> "Be painful to use."
[19:44:29] <gfather> :)
[19:44:41] <_val_> FauxFaux: when I invoke !koha e.g it returns the time.. so I now want to try with this code to get the hash of a word . so when I enter !md5 test it returns the hash of test. I said it 100 times @_@
[19:44:48] <jottinger> gfather: java's very easy for people to use, except when those people try to think it's not what it is
[19:45:21] *** tomvolek has quit IRC
[19:45:27] <_val_> !md5 whoknows to return the has of whoknows.. and so on..
[19:45:48] <FauxFaux> _val_: I /know/ what you want. I want to you to know why what you have at the moment will never work. Anyway, you don't seem interested, try message.startsWith("!md5").
[19:45:51] *** nytejade has quit IRC
[19:46:21] <_val_> FauxFaux: I'm desperate to get this working :S.. ofcaurse I'm interested
[19:48:38] *** giaco is now known as giaco_auaii
[19:48:56] <gfather> @jottinger how did u learn it ?
[19:49:29] <gfather> i got couple of books , the only ine i can bearlly read , an its good , is java head first
[19:49:38] <cheeser> ~~ gfather aolbonics
[19:49:38] <javabot> gfather, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this language depicts you as an imbecile in the eyes of the helpful regulars in this channel, and is generally not tolerated. If you want intelligent answers, the least you can do is speak intelligently. Additionally arguing about this rule will get you nowhere except banned. Have a nice day!
[19:50:18] <gfather> :S
[19:50:34] <gfather> well english is not my first language ,
[19:50:38] <gfather> im really sorry
[19:50:52] <gfather> but im really trying to find a way to learn java
[19:50:57] <jottinger> gfather: I learned from the java tutorial. But then again I knew a lot of languages by then; java was easy.
[19:51:36] <jottinger> Java's just a VM with a set of languages that run on it.
[19:51:42] <ernimril> java was a lot smaller in the api when it appeared
[19:51:42] <gfather> jottinger: i don have programing backround , i have html and css , but those are very easy
[19:51:48] *** kwvarga has joined ##java
[19:52:07] <jottinger> gfather: then you shold be well off, since Java's just a big version of what a browser does
[19:52:12] <jottinger> it gives you a sandbox you can play in.
[19:52:27] <gfather> and when i thought about what programming languages i should lean , java was the best option
[19:53:06] <jottinger> it's not a bad choice.
[19:53:17] <gfather> maybe i should find a java book im my language , but i dont think it will be helpfull in the future
[19:53:50] *** deepjoy has joined ##java
[19:54:08] <_val_> FauxFaux: so.. am I too far from getting this done? gettin the hash returned by what I've now?
[19:54:38] *** mohax has joined ##java
[19:56:02] <FauxFaux> VaNNi: Did you try my suggestion at the end of that last line?
[19:56:30] <_val_> FauxFaux: message.startsWith("!md5") ?
[19:57:49] *** kane77 has joined ##java
[19:58:21] *** i-bas has joined ##java
[19:58:23] *** bas-i has quit IRC
[19:59:12] <FauxFaux> No, one of the other bits of java code at the end of that line.
[19:59:41] *** EdwardIII has joined ##java
[19:59:47] <EdwardIII> hey
[19:59:52] <_val_> FauxFaux: http://fpaste.org/paste/3594 what line?
[20:00:13] <EdwardIII> sorry if this is daft - the API is so huge - i'm trying to find what i need from the java api to just download some content via the web and put it in a string?
[20:00:44] <EdwardIII> i've tried googling for "download web pages with java", "java webclient", "java download xml feed" but no luck
[20:00:59] *** ankylose has joined ##java
[20:01:29] <ernimril> EdwardIII: why do you want it in a string?
[20:01:43] <ernimril> EdwardIII: URL/URLConnection will give you a stream to read from
[20:02:05] *** javahorn has quit IRC
[20:02:12] <EdwardIII> ah ok, that's a good start thanks ernimril - good question though, i actually want to parse xml so i should probably find out about java's xmlreader and find it if it can accept a URL
[20:02:33] <EdwardIII> just making a little rss reader as an exercise, then i might try and port it onto my phone
[20:03:02] *** EnderMB has quit IRC
[20:03:09] *** durka42 has quit IRC
[20:03:43] *** oxi has quit IRC
[20:04:28] <EdwardIII> hrm xml handling is in javax? isn't there anything for xml parsing within the standard 'java' package?
[20:04:43] <svm_invictvs> Is a high or low surrogate a code point?
[20:05:04] <ernimril> ~xml
[20:05:05] <javabot> ernimril, xml is http://www.w3.org/XML - XML stands for "eXtensible Markup Language". It looks a bit like HTML except that you can define whatever tag you want. Used to store hierarchical data of any kind into a standard format. See "xml parsing" for how to write or parse XML.
[20:05:08] <ernimril> ~xml parsing
[20:05:08] <javabot> ernimril, xml parsing is best accomplished with one of - XOM @ http://www.xom.nu/ - JAXB @ http://java.sun.com/xml/jaxb/ - JDOM @ http://www.jdom.org/ - XmlMap @ http://tinyurl.com/3pjxjn - JAXP (including StAX as well as the legacy SAX and DOM) @ https://jaxp.dev.java.net/
[20:05:12] <svm_invictvs> ernimril: eh?
[20:05:17] <svm_invictvs> ernimril: was that directed at me?
[20:05:20] <teralaser> close... ##1234567890 (sorry irrelevant)
[20:05:28] *** convivial has quit IRC
[20:05:52] <ernimril> svm_invictvs: no, to EdwardIII
[20:05:56] <svm_invictvs> o
[20:06:40] <EdwardIII> hrm ernimril that's a lot of options
[20:06:47] <cheeser> indeed
[20:06:54] *** cybereal has joined ##java
[20:08:22] <EdwardIII> mrrrm actually perhaps i'm aiming too high, i should read more of the documentation before actually knuckling down to coding i think
[20:08:52] *** zophy has quit IRC
[20:09:39] * cheeser falls out of his chair
[20:09:44] <cheeser> what'd you just say?
[20:09:49] <cheeser> i couldn't have heard that right
[20:09:51] *** ishino has joined ##java
[20:09:54] * svm_invictvs gets the paddles
[20:09:54] <cybereal> I read it like 7 times
[20:09:59] <cybereal> it says what you think
[20:10:03] * cybereal shocked, awed
[20:10:07] * cheeser shakes his head.
[20:10:16] * cheeser reads again.
[20:10:18] <svm_invictvs> lol
[20:10:20] <cheeser> well, i'll be damned.
[20:10:28] *** deepjoy has quit IRC
[20:10:34] <AlanasAnikonis> who needs documentation when you got an autocompleting IDE?
[20:10:38] <EdwardIII> hahaha
[20:10:41] <AlanasAnikonis> :P
[20:10:55] <EdwardIII> i thought i'd achieved smart-questions-faq zen for a moment then
[20:11:34] <AlanasAnikonis> isn't the javabot supposed to reply when you /msg it?
[20:11:59] <cybereal> AlanasAnikonis: not you
[20:12:01] <cybereal> just everyone else
[20:12:14] <AlanasAnikonis> well it doesn't know "help" :(
[20:12:14] *** zophy has joined ##java
[20:12:23] <cheeser> AlanasAnikonis: it replies just fine
[20:12:30] <cheeser> ~help
[20:12:30] <javabot> cheeser, I have no idea what help is.
[20:12:33] <AlanasAnikonis> but just tested the javadoc command, that worked
[20:12:48] <cheeser> "help" works just fine, too.
[20:12:51] <AlanasAnikonis> most basic command and it says nothing smart :P
[20:12:59] <Sou|cutter> ~help me program
[20:13:00] <javabot> Sou|cutter, I have no idea what help me program is.
[20:13:02] <AlanasAnikonis> * Ask it how in a private message: /msg javabot help
[20:13:04] <Sou|cutter> :(
[20:13:05] <AlanasAnikonis> http://javachannel.net/wiki/pmwiki.php/FAQ/Javabot
[20:13:07] <AlanasAnikonis> lies!
[20:13:15] <Sou|cutter> well that used to work
[20:13:26] <cybereal> the factoid's been deleted apparently
[20:13:26] *** zophy has quit IRC
[20:13:31] <cybereal> or something else, dunno
[20:13:33] <AlanasAnikonis> obviously...
[20:13:38] <cheeser> ~~ AlanasAnikonis help
[20:13:40] <javabot> I need somebody. Help! Not just anybody.
[20:13:50] <cybereal> AlanasAnikonis: javabot is working fine, it's replying and everything
[20:13:53] <AlanasAnikonis> i am very interested in the javabots script
[20:13:59] <AlanasAnikonis> for my own channel
[20:14:03] <cybereal> it's not a script
[20:14:06] <svm_invictvs> ~halp
[20:14:06] <javabot> svm_invictvs, I have no idea what halp is.
[20:14:07] <AlanasAnikonis> please say it's coded in java :D
[20:14:13] <cheeser> ~source
[20:14:14] <javabot> you can find my source at my project site http://kenai.com/projects/javabot
[20:14:18] <cybereal> AlanasAnikonis: of course ...
[20:14:21] <AlanasAnikonis> woohoo, i will go look
[20:14:22] <svm_invictvs> halp halp
[20:14:27] *** zophy has joined ##java
[20:14:53] <AlanasAnikonis> i am so tired of coding tcl scripts for eggdrop...
[20:15:11] <EdwardIII> maybe you can implement javabot
[20:15:23] <cybereal> tcl, eggdrop? that crap is still in use?
[20:15:24] <AlanasAnikonis> i redirect all queries to jsp pages anyway
[20:15:26] <EdwardIII> the guy who maintains it just upgraded his home server to 10GB ram
[20:15:30] * cybereal is reminded of 10 years ago
[20:15:43] <AlanasAnikonis> yes, apt-get install eggdrop
[20:16:13] <cybereal> um I don't use politically motivated linux distributions
[20:16:36] <EdwardIII> debian is political?
[20:16:40] <cheeser> yes
[20:16:47] <EdwardIII> which party?
[20:16:48] <cheeser> FOSS or nothing
[20:16:52] <EdwardIII> ah right
[20:16:53] <cybereal> EdwardIII: its sole reason for existence, actually
[20:17:04] <EdwardIII> ubuntu isn't so strict, is it? maybe he's apting from ubuntu!
[20:17:10] <cybereal> heh
[20:17:12] * EdwardIII is irsssing from ubuntu
[20:17:23] <AlanasAnikonis> well I am using ubuntu/kubuntu only...
[20:17:24] <cybereal> sss
[20:17:28] <EdwardIII> there you go - no politics!
[20:17:30] <AlanasAnikonis> kubuntu for desktop and ubuntu for server
[20:17:34] <cybereal> EdwardIII: I don't use linux at all, actually
[20:17:38] <cybereal> and I don't use fink
[20:17:40] <AlanasAnikonis> i didn't know i had politics in my computers :(
[20:17:55] <EdwardIII> i think apt is a fantastic bit of software and way ahead of the game when it was first popular
[20:17:58] <EdwardIII> haha
[20:18:01] <AlanasAnikonis> so will the politics police take me if i use Sun JDK 6?
[20:18:13] *** jieryn-w has joined ##java
[20:18:23] <cybereal> AlanasAnikonis: if you use linux you're participating in a sort of political idealism through GNU and all its nonsense...
[20:18:30] <cybereal> not that you can really avoid it these days
[20:18:33] <cybereal> they've been pretty successful
[20:18:38] <cybereal> GPL all over the place
[20:18:53] <AlanasAnikonis> i only use linux because i don't want to use a pirated XP ...
[20:19:00] <cybereal> You could buy xp
[20:19:06] <jieryn-w> i'm aware of how to getClass().getResource("foo") but, what is the best way to get all resources at classpath location getClass() that match a particular file name pattern?
[20:19:08] <cybereal> could being the operative word
[20:19:10] <_W_> or use BSD
[20:19:17] * cybereal bought OS X instead
[20:19:25] <AlanasAnikonis> pay for no service? why would I do that when I can get same for free :D
[20:19:26] <repnop> meh gpl doesn't matter as an end user
[20:19:29] <cybereal> though I do own a few xp licenses
[20:19:35] *** thepenguin37 has joined ##java
[20:19:48] <AlanasAnikonis> even if I pay 250 for Windows, I still have to pay to get support for it
[20:20:00] <EdwardIII> heh.. cybereal, what's your OS of choice?
[20:20:05] <cybereal> EdwardIII: OS X
[20:20:09] * pr3d4t0r paid $129 for OS X.
[20:20:11] <EdwardIII> you joke?
[20:20:12] <thepenguin37> ~pastebin
[20:20:12] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.
[20:20:12] * pr3d4t0r is happy.
[20:20:21] <cybereal> EdwardIII: why would I be joking? OS X is awesome
[20:20:32] <EdwardIII> eat a lot of candy, do you?
[20:20:39] <cybereal> what are you talking about?
[20:20:40] <pr3d4t0r> EdwardIII: Most professional Java developers are on OS X.
[20:20:46] *** coalado has joined ##java
[20:20:48] <cheeser> s/most/a lot/
[20:20:49] <cybereal> I liked OS X before I did java, though
[20:20:51] <svm_invictvs> pr3d4t0r: I'm on linux.
[20:20:51] <EdwardIII> heh i joke, i like OS X but i'm not paying $129 for it
[20:20:52] <coalado> hey.
[20:20:54] <pr3d4t0r> EdwardIII: I'd say, most who aren't in a corporate environment.
[20:21:04] <pr3d4t0r> svm_invictvs: I'd be hard pressed to call you a "professional" :P
[20:21:05] <svm_invictvs> dey let me use Gentoo Linux here at work.
[20:21:10] <svm_invictvs> pr3d4t0r: Dick head.
[20:21:15] <EdwardIII> are a lot of Mac OSX apps built in java?
[20:21:16] * pr3d4t0r bowz.
[20:21:16] <coalado> anyone in here who can give me some tips on "how to download large files via http"
[20:21:24] <cybereal> pr3d4t0r: I work for Pearson, and OS X is the dominant OS in this company (Pearson == Financial Times, Penguin, Pearson)
[20:21:39] <pr3d4t0r> cybereal: I know exactly who they are :)
[20:21:40] <coalado> atm I use nio in blocing mode with a buffersize of 100-200 kb
[20:21:40] <svm_invictvs> pr3d4t0r: What makes you say that?
[20:21:47] <dmlloyd> ~~ coalado javadoc URL.getConnection(*)
[20:21:48] <javabot> I don't know of any documentation for URL.getConnection(*)
[20:21:50] <dmlloyd> hm
[20:21:52] <dmlloyd> ~~ coalado javadoc URL.connect(*)
[20:21:53] <javabot> I don't know of any documentation for URL.connect(*)
[20:21:54] <cybereal> EdwardIII: no
[20:21:58] <dmlloyd> well, it's in there somewhere
[20:22:00] <dmlloyd> ~~ coalado javadoc URL
[20:22:06] <coalado> dmlloyd: i do not need any infos about this
[20:22:10] <cybereal> EdwardIII: it's just a fantastic platform on which to do development
[20:22:12] <blahjake> ~javadoc URL.openConnection(*)
[20:22:16] <blahjake> no?
[20:22:17] <dmlloyd> there it is
[20:22:17] <javabot> coalado: http://is.gd/js94 [javax.print.DocFlavor.URL]; http://is.gd/js98 [java.net.URL]; http://is.gd/js94 [javax.print.DocFlavor.URL]
[20:22:17] <svm_invictvs> Fine, I'll get my own IRC channel.
[20:22:18] * blahjake snaps
[20:22:21] <cybereal> comforts of a commercially supported OS with the comforts of UNIX
[20:22:23] <javabot> blahjake: http://is.gd/js9b [java.net.URL.openConnection()]; http://is.gd/js9e [java.net.URL.openConnection(Proxy)]
[20:22:23] <svm_invictvs> /join ##java-blackjack-hookers
[20:22:28] <pr3d4t0r> cybereal: I'm on the 2009 Board for The Economist Conferences ;)
[20:22:32] <blahjake> oh there it is
[20:22:39] <thepenguin37> hi. i have a question about threads. is the thread killed after complete its work in run method
[20:22:41] <thepenguin37> http://eugeneciurana.com/pastebin/pastebin.php?show=40278
[20:22:47] <pr3d4t0r> cybereal: So I had to learn the relationship between The Economist, FT, and Pearson, and how it plays.
[20:22:50] <svm_invictvs> pr3d4t0r: What is that/
[20:22:51] <coalado> guys... thx but I do not need any links to the URL.java docs
[20:22:54] <dmlloyd> coalado: URL is the way you download stuff via http, or at least, the simplest way
[20:22:57] <EdwardIII> cybereal: why is it any more fantastic than linux + gnome? plus i don't think that to the majority of users that linux is about the freedom of speech, more about the stuff for free
[20:22:58] <cybereal> thepenguin37: killed is the wrong word, the thread exits
[20:23:16] <pr3d4t0r> svm_invictvs: ?
[20:23:17] <thepenguin37> cybereal: ok.
[20:23:17] <EdwardIII> cybereal: i'm not trying to troll or be aggressive by the way, i'm just interested
[20:23:20] <coalado> dmlloyd: I already wrote a download system
[20:23:26] <pr3d4t0r> svm_invictvs: What is what?
[20:23:26] <coalado> that uses multiple connections
[20:23:29] <dmlloyd> coalado: then... what's your question
[20:23:30] <cybereal> EdwardIII: it works, I have never once had to edit a configuration file to get X11 running again after an update fucked it up, for example
[20:23:35] <svm_invictvs> pr3d4t0r: Economicst COnferences
[20:23:41] <cybereal> EdwardIII: I can go to the store, buy BRAND NEW awesome hardware/devices and they are supported, etc.
[20:23:42] <EdwardIII> heh - to be fair i've never had that issue either
[20:23:43] <pr3d4t0r> svm_invictvs: Are you familiar with The Economist?
[20:23:44] <coalado> but my problem is the right buffersize
[20:23:48] <pr3d4t0r> svm_invictvs: The British magazine.
[20:23:54] <svm_invictvs> maazine?
[20:23:55] <svm_invictvs> *oh
[20:23:57] <cybereal> EdwardIII: just generally, it's the most UNIX for the least effort
[20:23:58] <svm_invictvs> Magazine
[20:23:58] <svm_invictvs> Yeah
[20:24:10] <coalado> i use a buffersize of about 200kb / connection
[20:24:24] <pr3d4t0r> svm_invictvs: The Economist has a division called The Economist Intelligence Unit that does D-, C-, VP- level conferences all over the US, on various topics.
[20:24:25] <thepenguin37> cybereal: did you look my code. after invoke stop method thread exists in run method.
[20:24:25] <coalado> which results in many harddisk action
[20:24:27] <cybereal> EdwardIII: I was a biiiig linux advocate before my switch btw, I just got sick of spending hours getting my exotic hardware working
[20:24:28] <dmlloyd> that's pretty big
[20:24:33] <svm_invictvs> pr3d4t0r: what *is* your position at Leapfrog?
[20:24:43] <coalado> (seeking to the current position ->write buffer ->sekk to next buffer position etc)
[20:24:48] <cybereal> thepenguin37: I'm not looking at your code bcause you don't understand threading... what's the point of me looking at your code? read a book.
[20:24:50] <EdwardIII> cybereal: i was very pleased when i heard Apple were going to use a BSD layer for their very pretty pizza topping
[20:24:51] <dmlloyd> svm_invictvs: he's Leap
[20:24:52] <cybereal> ~~ thepenguin37 jcip
[20:24:52] <javabot> thepenguin37, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[20:24:56] <pr3d4t0r> svm_invictvs: I'm on the board for 2009. It basically means that I give suggestions about what topics would make sense and go to cool networking parties.
[20:24:57] *** SinisterBen has quit IRC
[20:25:03] <cybereal> EdwardIII: indeed, i hated OS 9
[20:25:05] <svm_invictvs> I see.
[20:25:07] <pr3d4t0r> svm_invictvs: I'm the director of systems infrastructure.
[20:25:11] <svm_invictvs> Ah
[20:25:12] *** casmo has joined ##java
[20:25:23] <pr3d4t0r> svm_invictvs: Essentially I do pretty much whatever I want, and keep the lights on for all web systems.
[20:25:30] <cybereal> EdwardIII: but NeXTSTEP, BSD, iPod, all happily paying together? how can that be bad? heheh
[20:25:30] <svm_invictvs> lol
[20:25:41] <pr3d4t0r> svm_invictvs: I don't play well in corporate environments that have too many rules.
[20:25:45] <thepenguin37> cybereal: i have read much about threads but i ask a different ques.
[20:25:46] <EdwardIII> cybereal: that was a very amusing typo heh, but i take your point
[20:25:54] <svm_invictvs> pr3d4t0r: That's why I like hwere I work now...
[20:26:09] <svm_invictvs> pr3d4t0r: Too many, unnecessary, pointless, rules.
[20:26:16] <cybereal> EdwardIII: yes though it brings up an important point: I don't mind buying good things
[20:26:19] <repnop> cybereal: here's one nice thing about linux/bsd/etc, i can use this single cd i've burnt and install/use it on any system i run into. :)
[20:26:22] *** Meddi has joined ##java
[20:26:38] *** waz is now known as Guest74137
[20:26:43] <cybereal> EdwardIII: I'd rather pay an extra $50 than have to hack for hours to get my shiny gadgets working on linux, basically
[20:26:45] <Meddi> Hi guys, is there a way to Deselect a radio button once it has been selected ?? unfortunately setSelected() does not work :\
[20:26:46] *** lunk has joined ##java
[20:26:49] <repnop> osx is nice but the hardware lockin is what keeps me away.
[20:26:49] *** waz has joined ##java
[20:26:52] <EdwardIII> cybereal: that's true - most people don't seem to mind shelling out on decent hardware but do object to paying for software
[20:27:01] <EdwardIII> cybereal: could age be a factor in that attitude?
[20:27:14] <cheeser> ~interesting
[20:27:14] <javabot> this is all very interesting (not really) but please take it somewhere else.
[20:27:27] <waz> ~be cheeser
[20:27:27] <javabot> how is this java?
[20:27:39] <EdwardIII> ~be waz
[20:27:40] <javabot> EdwardIII, I have no idea what be waz is.
[20:27:42] *** firefox88 has joined ##java
[20:27:46] <firefox88> hi
[20:27:50] * EdwardIII shrugs
[20:27:52] <waz> ~waz
[20:27:53] <javabot> waz, I have no idea what waz is.
[20:28:02] <cybereal> EdwardIII: not so much age but, I have more things going on my life, no more time to throw away tweaking setup and such... but I guess we should stop this um.. thread. :)
[20:28:13] <EdwardIII> cheeser: you have to spend an awful lot of time looking at your OS of choice as a development environment... it's not *that* off topic
[20:28:14] <waz> someone deleted that factoid :(
[20:28:15] <firefox88> is there any way a Java program can "ask" JVM "how much heap and stack size do you have set?"
[20:28:24] <waz> you have to?
[20:28:37] <cybereal> firefox88: sure
[20:28:37] <firefox88> yes
[20:28:44] <cybereal> I think it's in Runtime
[20:28:47] <cybereal> ~~ javadoc Runtime
[20:28:47] <javabot> The user javadoc is not on ##java
[20:28:50] <cybereal> whoops
[20:28:52] *** Guest74137 has quit IRC
[20:28:52] <cybereal> ~javadoc Runtime
[20:28:53] <dmlloyd> well played
[20:29:00] <firefox88> uhm I just couldn't find it
[20:29:02] <dmlloyd> javabot: is kinda slow
[20:29:03] <javabot> no, you are!
[20:29:04] <firefox88> I go check Runtime
[20:29:04] <javabot> cybereal: http://is.gd/jsbE [org.omg.SendingContext.RunTime]; http://is.gd/jsbH [java.lang.Runtime]
[20:29:11] <cybereal> omg!
[20:29:24] <dmlloyd> cheeser: maybe the shortener *could* stand a replacement - it's a touch laggy
[20:29:29] *** skypce has quit IRC
[20:29:32] <dmlloyd> ~javadoc Runtime
[20:29:33] <javabot> dmlloyd: http://is.gd/jsbE [org.omg.SendingContext.RunTime]; http://is.gd/jsbH [java.lang.Runtime]
[20:29:34] <cheeser> EdwardIII: yes, it *is* offtopic. this is a java channel.
[20:29:38] <dmlloyd> yeah, definitely the shortener
[20:29:49] <cheeser> dmlloyd: yeah. that first time can be a bitch
[20:30:06] <cybereal> could setup a process to slowly request them ahead of time for the whole index
[20:30:07] <firefox88> this is the one? http://java.sun.com/javase/6/docs/api/java/lang/Runtime.html#maxMemory()
[20:30:17] <firefox88> it seems appropriate
[20:30:19] <cybereal> firefox88: amongst others, read the whole page
[20:30:31] <dmlloyd> cybereal: that's a bigger index than you might think :)
[20:30:43] <dmlloyd> the owners probably wouldn't care for that
[20:31:02] *** jkriesten has quit IRC
[20:31:03] <cybereal> that's why I said slowly
[20:31:13] <cybereal> they're persistent links right?
[20:31:18] <dmlloyd> cheeser: odd that it put org.omg first there...
[20:31:32] <dmlloyd> cybereal: yeah but consider that 98% of them will probably *never* be used.
[20:31:41] <cybereal> dmlloyd: maybe it sorted by URI
[20:31:53] <dmlloyd> ~~ cybereal javadoc AbstractColorChooserPanel.getPreviewPanel()
[20:31:54] <javabot> I don't know of any documentation for AbstractColorChooserPanel.getPreviewPanel()
[20:31:54] <cybereal> dmlloyd: you pose a strong argument
[20:32:01] <cheeser> dmlloyd: hrm. i'm not sure i'm ordering the class lookups. methods are sorted but not classes I think.
[20:32:21] <cheeser> ~javadoc AbstractColorChooserPanel.getPreviewPanel(*)
[20:32:21] <javabot> I don't know of any documentation for AbstractColorChooserPanel.getPreviewPanel(*)
[20:32:30] <cheeser> ~javadoc AbstractColorChooserPanel
[20:32:36] <javabot> cheeser: http://is.gd/jsdA [javax.swing.colorchooser.AbstractColorChooserPanel]
[20:32:58] * cheeser eyes dmlloyd
[20:32:59] * dmlloyd was coming up with an obscure ref just to prove a point, but screwed it up :)
[20:33:08] <cheeser> 8^)=
[20:33:46] <svm_invictvs> anyhow...
[20:33:56] <svm_invictvs> pr3d4t0r: you still up in the bay area?
[20:34:04] <pr3d4t0r> svm_invictvs: Yeah.
[20:34:13] <pr3d4t0r> svm_invictvs: I gotta go now, though. Meeting in 10 minutes in Japantown.
[20:34:17] <pr3d4t0r> svm_invictvs: Noodles can't wait.
[20:34:17] <svm_invictvs> What's that really good sushi place?
[20:34:19] *** conan has joined ##java
[20:34:23] *** thepenguin37 has quit IRC
[20:34:28] <lunk> svm_invictvs: japan
[20:34:38] <cybereal> dmlloyd: your tyrannical optimization makes my daughter sad face! http://gallery.me.com/zacheryjensen#100125/IMG_0481&bgcolor=black
[20:35:06] <pr3d4t0r> svm_invictvs: Takara Restaurant.
[20:35:17] <pr3d4t0r> svm_invictvs: 22 Peace Plaza, inside the Miyako building.
[20:35:27] *** [trip] has joined ##java
[20:35:30] <pr3d4t0r> svm_invictvs: We have the Java cabal meetings there every 3 weeks or so.
[20:35:31] <[trip]> i see..
[20:35:45] <pr3d4t0r> svm_invictvs: Lat night we had the Terracotta, Mule, Jetty, Apache, and LF gang gorging on fish there.
[20:36:00] *** Riov has quit IRC
[20:36:07] *** dmlloyd_ has joined ##java
[20:36:45] *** dmlloyd has quit IRC
[20:36:49] *** dmlloyd_ is now known as dmlloyd
[20:37:43] <svm_invictvs> pr3d4t0r: Java cabal?
[20:38:07] <svm_invictvs> pr3d4t0r: I only asked because I'm going up to SF here in a few weeks and I wanna try out a good Sushi place.
[20:38:34] *** Meddi has quit IRC
[20:38:51] *** csgeek has quit IRC
[20:39:25] *** Yancho has quit IRC
[20:41:33] <deebo> i thought SF was a sausage fest
[20:41:51] <cybereal> I went to SF, it smells bad and they have bums living in trees
[20:42:03] <cybereal> omg embarcadero smells like you're breathing a cloud of pure urine
[20:45:16] *** kwvarga has quit IRC
[20:45:19] *** firefox88 has quit IRC
[20:45:21] *** Razec has joined ##java
[20:47:43] *** gallatin has joined ##java
[20:49:10] *** performance has joined ##java
[20:49:23] <pfn> that's the tenderloin
[20:49:32] <svm_invictvs> heh
[20:49:33] <svm_invictvs> SF
[20:49:36] <whaley> or any bart station entrance
[20:49:39] <pfn> svm_invictvs, as for sushi and other good local eats, use yelp.com
[20:49:49] <svm_invictvs> Why do that when I can just bug pr3d4t0r?
[20:50:04] <pfn> because you should harness the wisdom of crowds :p
[20:50:26] <performance> hi, i am trying to convert an applet into a desktop application..
[20:50:36] *** ridoo has quit IRC
[20:50:41] <performance> what is the equivalent of applet.getParameter() ?
[20:50:54] <pfn> to do what
[20:51:03] <pfn> there are no "applet.getParameters" in applications
[20:51:24] *** cyth has joined ##java
[20:51:52] *** jieryn-w has left ##java
[20:52:14] *** beol has quit IRC
[20:52:31] <performance> exactly, that is why i asked for an equivalent
[20:52:46] *** vol has joined ##java
[20:52:52] <_val_> fols could someone just help me with that little bot?
[20:53:13] *** Mack has joined ##java
[20:54:08] <vol> Hi, I've got a JNI question. I'm trying to do GetMethodID, on a method that accepts an inner class as an argument.
[20:54:15] *** AskHL has joined ##java
[20:54:30] *** dunmer has quit IRC
[20:54:34] <vol> in particular, http://code.google.com/android/reference/android/media/MediaPlayer.html , I'm trying to get the method id for setOnCompletionListener, which accepts the inner class of MediaPlayer.OnCompletionListener
[20:54:35] *** vix85 has quit IRC
[20:55:09] *** Varox has quit IRC
[20:55:12] <vol> I've tried "(Landroid/media/MediaPlayer/OnCompletionListener)V" and "(Landroid/media/MediaPlayer.OnCompletionListener)V", but no joy
[20:55:34] *** UT2K3 has quit IRC
[20:55:40] <vol> oh shoot, missing a ;, that might be it
[20:57:40] *** waz has quit IRC
[20:57:41] *** vix85 has joined ##java
[20:59:45] <dmlloyd> vol: inner classes are named OuterClass$InnerClass
[20:59:56] <vol> Ah, that would do it.
[20:59:58] <vol> Thanks!
[21:00:00] <dmlloyd> vol: and you do need a ;
[21:00:05] <dmlloyd> after any object class
[21:00:14] <vol> right, just managed to forget that : )
[21:00:42] *** beol has joined ##java
[21:01:50] <vol> Yep, that did the trick, thanks!
[21:02:11] *** Riov has joined ##java
[21:02:31] *** kane77 has quit IRC
[21:03:12] *** zophy has quit IRC
[21:04:03] *** Vicfred has joined ##java
[21:05:24] *** kane77 has joined ##java
[21:06:29] *** paulweb515 has quit IRC
[21:07:50] *** Voyager1960 has left ##java
[21:12:27] *** fryderyk has joined ##java
[21:14:57] *** MichielH has quit IRC
[21:15:11] *** MichielH has joined ##java
[21:15:39] *** dos000 has joined ##java
[21:16:08] <dos000> i have an embedded tomcat finally .. yay !
[21:16:38] *** tilerendering has quit IRC
[21:17:05] <dos000> how do you call one of the controllers from java ? i need to mimick real application cases from within tomcat.
[21:17:17] *** BeholdMyGlory has quit IRC
[21:17:31] <dos000> i tried calling it and it expect the contexes to be already set !
[21:17:48] *** jamil_1 has joined ##java
[21:17:50] <cheeser> ~~ dos000 httpunit
[21:17:50] <javabot> dos000, httpunit is an automated testing framework for your web applications. See http://httpunit.sourceforge.net/ for more information.
[21:17:52] *** exbio has joined ##java
[21:18:30] *** oxi has joined ##java
[21:18:46] <Riov> hey
[21:20:05] <jamil_1> how does java implement an array ? I have always difficulty in understanding arrays in general. The point that bugs me often, is that how come we have a Data Structure which allows us random access in constant time ?
[21:21:09] <dmlloyd> ~~ jamil_1 arrays
[21:21:09] <javabot> jamil_1, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[21:21:23] <cybereal> jamil_1: the data is a linear block, each "slot" is an equal size, and the index multiplied by the size tells you where in memory to look for the item or a reference to the item, either way the complexity doesn't change by the size of the structure so access is reduced to constant time
[21:21:54] <vol> jamil_1: do you mean java's implementation, as compared to say, C?
[21:22:28] <vol> If so, I'm pretty sure that there's a variable that keeps a reference of the size of that array, and get/set operations perform bounds checking against that variable
[21:24:18] <jamil_1> cybereal: Ok even if I get to know where in memory is the required object, but still then how do I access it in Constant time ?
[21:24:30] *** jdolan_ has joined ##java
[21:24:40] <cybereal> jamil_1: do you even know what it means to access something in constant time?
[21:24:51] <jamil_1> vol: No, in general
[21:25:05] <cybereal> jamil_1: all that means is that it will take the same amount of operations/work regardless of the size of the structure/number of elements/whatever that you're working with
[21:25:32] <vol> jamil_1: Do you know how arrays work in languages like C? Basically, you just have a contiguous portion in memory of a pretermined size.
[21:25:36] <cybereal> jamil_1: no matter the size of the array, it requires no more effort to access the value of a given index
[21:25:44] <jamil_1> cybereal: oh yes
[21:25:45] <vol> You then take a pointer into that memory, and add to it the index that you want
[21:25:49] <cybereal> that's all it means to be constant time here
[21:26:03] *** Zvpun has joined ##java
[21:26:07] <jamil_1> cybereal: I got the point
[21:26:19] <vol> jamil_1: The java array isn't a linked list or anything silly like that.
[21:26:39] *** n3llyb0y has quit IRC
[21:27:03] <vol> jamil_1: http://www.cplusplus.com/doc/tutorial/arrays.html
[21:27:28] <vol> Basically, that, except that the java implementation has an internal reference to the size of the array specified, and any get/set operations are bounds checked, so that you don't accidentally go out of bounds
[21:28:24] *** jchauncey has quit IRC
[21:29:35] *** javaCE has quit IRC
[21:30:17] *** funktor has quit IRC
[21:31:43] *** chrismaster1 has joined ##java
[21:32:28] <Zvpun> I want a GUI program with a jpeg image (representig a card from a card game). I did use an ImageIcon h10 = new ImageIcon("hearts10.jpg"); and a JLabel("hearts 10", h10, SwingConstants.LEFT); Is this reasonable or is there a better way to display a picture? (I want to use drag and drop later on to move the card from one deck to another.)
[21:32:52] *** Stef1 has quit IRC
[21:33:26] <ernimril> Zvpun: that is the easy way to show an image...
[21:33:39] *** ExxKA has quit IRC
[21:33:50] <ernimril> Zvpun: (well, possibly change the image to use classloader and getResource instead, but that is mostly the same)
[21:34:09] <Zvpun> ernimril: thank you, since I am very new to Java I wanted to ask this.
[21:34:10] *** Noya has quit IRC
[21:34:41] <Zvpun> ernimril: futhermore how can I make it drag and droppable?
[21:34:50] <ernimril> ~dnd
[21:34:50] <javabot> ernimril, drag and drop is http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html
[21:34:56] <ernimril> Zvpun: ^^^
[21:35:01] <Zvpun> thank you Sir.
[21:35:21] *** staykov has joined ##java
[21:35:36] <ernimril> Zvpun: the bot has a lot of factoids, try it out... "/msg javabot help" or "/msg javabot dnd"
[21:35:46] *** {aaron} has joined ##java
[21:36:01] <ernimril> hmmm, the help factoid is not very helpful :-/
[21:36:09] <Zvpun> indeed
[21:36:58] *** vezzoni has quit IRC
[21:37:08] <ernimril> ~info help
[21:37:08] <javabot> help was added by: cheeser on 02-13-2009 at 2:14 PM, EST and has a literal value of: <reply>I need somebody. Help! Not just anybody.
[21:37:17] <ernimril> hmmm
[21:38:11] *** igordcard has quit IRC
[21:38:17] *** igordcard has joined ##java
[21:38:36] <Zvpun> I am also looking for a gui builder, can you recommend one?
[21:38:55] <chrismaster1> netbeans
[21:38:56] <ernimril> Zvpun: no, they all suck and give you code that you do not want to touch/maintain
[21:39:06] <ernimril> ~~Zvpun layout
[21:39:06] <javabot> Zvpun, layout managers is http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html If the layout managers included with the jdk don't satisfy you, have a look at FormLayout, TableLayout, PercentLayout, HTMLLayout, CentreLayout, or GridLayoutPlus (ask me about each of those to learn more). Book chapter at http://javafaq.mine.nu/lookup?290
[21:39:17] <ernimril> Zvpun: just use the layout managers and write the code by hand
[21:39:31] <ernimril> Zvpun: if you have a paper/whiteboard sketch it is easy to do most layouts
[21:40:22] *** sidelil has quit IRC
[21:41:27] *** staykov has quit IRC
[21:41:30] <Zvpun> since I have no clear idea on it yet I want it mostly to try out things, I think that writing the code by hand is fine later once I have a plan but at the moment I want it to try things and changing the code is alot of work.
[21:41:40] *** LordMetroid has joined ##Java
[21:41:52] *** morkar- has quit IRC
[21:41:59] <chrismaster1> Zvpun: try Netbeans
[21:42:03] *** pierrep has quit IRC
[21:42:24] <ernimril> Zvpun: what do you think is faster: whiteboard drawing or pulling components around on screen?
[21:42:38] <Zvpun> when I did search the web i found Netbeans but since there are no debian packages in main i didnt want to install netbeans
[21:42:54] <chrismaster1> no problem
[21:42:55] <Zvpun> ernimril: pulling componentts around on the screen.
[21:42:57] <chrismaster1> u only need java
[21:42:59] <ernimril> Zvpun: matisse is the netbeans gui builder you can try it, there is a gui builder for eclipse as well, not sure of the name though, I do not use it
[21:43:06] <ernimril> ~~chrismaster1 aolbonics
[21:43:06] <javabot> chrismaster1, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this language depicts you as an imbecile in the eyes of the helpful regulars in this channel, and is generally not tolerated. If you want intelligent answers, the least you can do is speak intelligently. Additionally arguing about this rule will get you nowhere except banned. Have a nice day!
[21:43:30] <ernimril> Zvpun: you are wrong, thinking and drawing a sketch is much faster. Try it
[21:44:15] <chrismaster1> on debian you dont even have to install netbeans, just download the zip file extract it and run the netbeans file
[21:44:18] <Zvpun> alright I consider your suggestions. I was just thinking of the old days back in school where we used Delphi and hoped for something like that.
[21:44:20] <chrismaster1> no installation
[21:44:27] <Zvpun> ok, thanks.
[21:45:03] <ernimril> Zvpun: coming up with a good gui layout is hard, but the hard part of it is not writing the code
[21:45:13] <ernimril> Zvpun: (or drawing the code if you use a gui editor)
[21:45:23] *** staykov has joined ##java
[21:45:41] <_val_> Hello is there still anyone that wants to help? This code generates the hash of the word "test" http://fpaste.org/paste/3601 . Now I want to implement the same code but instead of using the word test.. to use a parameter. This is the code of the bot I'm trying to create http://fpaste.org/paste/3602
[21:46:06] *** gionny has joined ##java
[21:46:10] *** funktor has joined ##java
[21:47:50] <vol> _val_: What's the problem? And are you sure you want the last argument of sendmessage to be storeHash?
[21:48:08] *** csgeek has joined ##java
[21:48:24] *** deepjoy has joined ##java
[21:48:40] <_val_> vol: I'm making an irc bot.. so when I enter the command !md5 test it returns the hash fo the word test
[21:48:52] <vol> Yes, that much is clear, though the syntax of sendMessage is not
[21:49:11] *** deepjoy has quit IRC
[21:49:34] <_val_> vol: it gets it from pircbot
[21:49:36] <vol> You might want to have your md5 method return the MD5 hash value, and then have sendmessage send it wherever it needs to be; channel, wherever.
[21:50:14] *** pgib has quit IRC
[21:50:25] *** CrypticSquared has joined ##java
[21:50:44] <_val_> vol: how would You implement it then? cause I'm struggeling with it all the night
[21:52:10] *** Woflborg has quit IRC
[21:52:37] *** Carnage\ has quit IRC
[21:52:59] *** Carnage\ has joined ##java
[21:53:52] <vol> http://fpaste.org/paste/3603
[21:53:56] <vol> something a bit more like that
[21:54:11] <AlanasAnikonis> SIGSEGV (0xb) at pc=0xb76aa4a2, pid=26706, tid=1827478416 :(
[21:54:19] <AlanasAnikonis> i keep getting these on my ubuntu
[21:54:27] <AlanasAnikonis> *sigh*
[21:54:28] *** Woflborg has joined ##java
[21:57:19] <AlanasAnikonis> Problematic frame: V [libjvm.so+0x3e4a2] ... any clue what this is about?
[21:57:59] <vol> What version of java are you running?
[21:58:13] <AlanasAnikonis> Java VM: OpenJDK Client VM (1.6.0_0-b12 mixed mode linux-x86)
[21:58:18] *** eidolon has left ##java
[21:58:31] <gionny> I have a HashSet<MyClass<?>> containing MyClass<?> objects. MyClass has got a method to return its member type (public class MyClass<T> { ... public Class<T> getMemberClass() ... }).
[21:58:38] <AlanasAnikonis> i do get same kind of crashes with Sun JDK... i hope it's not memory related...
[21:59:00] <AlanasAnikonis> i don't have crashes anywhere else, only jdk's that crash when I use for example jEdit and IntelliJ
[21:59:31] *** {aaron} has left ##java
[21:59:47] <AlanasAnikonis> system uptimes of 30 days is not uncommon, so it seems to be only in my java runtime
[21:59:57] <gionny> I iterate all set members and I want to do something for object of type MyClass<Boolean>, so I check it with Boolean.class.isAssignableFrom(myClassObject.getMemberClass()) ... then I just cast it: MyClass<Boolean> m = (MyClass<Boolean>) myClassObject ... but I get some compilation warning
[22:00:17] <gionny> so, which one is the best way of doing it so that I don't have compilation warnings, please?
[22:00:20] *** waz has joined ##java
[22:00:34] <gionny> I am sure that the cast will work... I check it before
[22:00:40] *** convivial has joined ##java
[22:01:15] *** ExxKA has joined ##java
[22:01:45] <gionny> and I would like to avoid a @SuppressWarnings annotation
[22:02:44] <_val_> vol: thank you so much ^^. You are not a man of words but of actions :)
[22:03:06] *** mengu has quit IRC
[22:03:08] <_val_> I'm now reading the code to understand what I missed
[22:03:17] <vol> _val_: not much?
[22:03:33] <_val_> vol: trust me you are.
[22:03:40] <_val_> It works just as I wanted :)
[22:05:55] *** cyth has quit IRC
[22:06:47] *** cyth has joined ##java
[22:07:34] *** riotz has joined ##java
[22:08:12] *** Meddi has joined ##java
[22:08:15] *** mitchnull has joined ##java
[22:08:16] <Meddi> ~pastebin
[22:08:16] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[22:09:03] *** squi has quit IRC
[22:10:22] <Meddi> http://pastebin.stonekeep.com/5652 ---> Hi guys. when the sortRows() function is called, it works fine, but I get those java warning about unsafe and unchecked operations in the RowSorter class. Though I dont know which operations are unsafe and how to fix them. could anyone help me?
[22:10:34] *** jacobw-uk has joined ##java
[22:10:42] *** jacobw-uk has left ##java
[22:11:03] *** Geralt has joined ##java
[22:11:37] *** M[]ssad has quit IRC
[22:11:57] <Geralt> Hi, I'm running the following command "JAVA_HOME=/opt/JAVA_HOME=/opt/sun-jdk-1.6.0.11/ ant" and ant complains that /build.xml:87: Unable to find a javac compiler;
[22:11:57] <Geralt> com.sun.tools.javac.Main is not on the classpath.
[22:11:57] <Geralt> Perhaps JAVA_HOME does not point to the JDK.
[22:11:57] <Geralt> It is currently set to "/opt/sun-jre-bin-1.6.0.11". How can that be?
[22:12:01] *** SinisterBen has joined ##java
[22:12:17] <ernimril> Meddi: try compiling with "-Xlint:unchecked" as the compiler tells you to
[22:12:27] *** cybereal has quit IRC
[22:12:30] <ldam> Geralt, jre is not the same as jdk
[22:13:03] *** OsAC has joined ##java
[22:13:28] <Geralt> ldam: yes, but I've set JAVA_HOME to the jdk, so why is it still seeing the jre path?
[22:13:30] <Meddi> I did, do you want me to tell you where the problem is, ernimril ?
[22:15:03] <vol> Geralt: export ?
[22:15:21] <vol> actually
[22:15:27] <vol> JAVA_HOME=/opt/JAVA_HOME=/opt/sun-jdk-1.6.0.11/
[22:15:35] <Geralt> vol: that's pasting mistkae
[22:15:35] <vol> what the heck are you doing here? Is this a typo?
[22:15:37] <Geralt> mistake
[22:15:39] <vol> alright
[22:15:40] *** martyn-dev has joined ##java
[22:15:45] <martyn-dev> Hi.
[22:15:48] <martyn-dev> everybody.
[22:15:57] <vol> I don't know, try "export JAVA_HOME=/opt/sun-jdk-1.6.0.11/; ant"
[22:16:00] <vol> hi
[22:16:04] <Geralt> but I have exported it, and running it in that way is basically the same as export at least for the dommand I run.
[22:16:06] <martyn-dev> I'm using JAGIServer to connect with Asterisk...
[22:16:06] <Meddi> ernimril: 3, 56, 58
[22:16:12] <martyn-dev> I have a question..
[22:16:19] <Geralt> but I just found out where to set the path, so problem solved, thanks :)
[22:17:43] *** Riov has quit IRC
[22:18:03] <martyn-dev> In JAGIClient the method readLine() detect "510 Invalid or unknown command" from a module of asterisk.. but i dont know why this module detect it if no one command is send to asterisk...
[22:18:18] *** bitshuffler has quit IRC
[22:20:03] *** Stef1 has joined ##java
[22:20:24] *** ExxKA has quit IRC
[22:21:46] *** cmihai has joined ##java
[22:21:48] <cmihai> Hi
[22:22:52] *** Geralt has left ##java
[22:23:09] *** Gary is now known as Chipmonk
[22:24:26] *** spocky has joined ##java
[22:24:41] * spocky peeks around
[22:24:58] <sproingie> boo!
[22:25:07] <spocky> eek!
[22:26:37] *** jcapinc has joined ##java
[22:27:34] <jcapinc> hey, what object should I use to grab the html of a website IE take the entire content of http://www.freenode.net/index.htm and put it into a string variable?
[22:27:55] <jcapinc> and by content I mean html only
[22:28:33] <spocky> ...Dunno
[22:28:34] <vol> StringBuilder? :P
[22:28:34] <sproingie> ~javadoc java.net.URI
[22:28:36] <javabot> sproingie: http://is.gd/iyGz [java.net.URI]
[22:29:01] <jcapinc> wow! all at once you guys are awsome, thanks I will check these out
[22:29:07] *** Meddi has quit IRC
[22:29:10] <vol> no matter what, you'll have to do some parsing if you don't want the <script> and <css> tags and such
[22:29:18] <sproingie> i see javabot's got a new ~javadoc
[22:29:36] <spocky> I'm not the coding type..
[22:29:57] <sproingie> you're in ##java. it's code.
[22:30:02] <Stef1> you are the normal type
[22:30:07] *** Zvpun has quit IRC
[22:30:10] <spocky> Yep
[22:30:26] *** omaru has quit IRC
[22:30:41] <spocky> the person who couldn't figure out how to program a bot to save her life. Yep.
[22:31:20] <sproingie> argh it's java.net.URL not URI
[22:31:28] <spocky> lol
[22:31:51] <sproingie> maximum confusion owing from the existence of both
[22:31:52] *** Bonix has joined ##java
[22:33:02] *** hse-hoens has joined ##java
[22:33:41] <csgeek> I understand how to bind a component (ie. JButton ) to an event.. but how do I do a global event.. ie. if user hits escape, to close the form.
[22:33:49] *** thecarlhall has quit IRC
[22:33:52] *** spocky has left ##java
[22:34:36] <Stef1> in Swing you can set the close behavior of the JFrame
[22:35:17] *** LinuS has joined ##java
[22:35:23] *** Mack has quit IRC
[22:35:53] *** romanb has quit IRC
[22:36:13] <LinuS> hi. i was wondering: is there any not-to-so-hard-to-use and free "visual java" apps?
[22:36:23] <Stef1> csgeek: http://www.herongyang.com/swing/jframe.html for examples
[22:36:34] <csgeek> LinuS, visual java apps?
[22:36:41] <csgeek> thank you Stef1
[22:36:56] <LinuS> csgeek: you know, using java like it was visual basic, for swing or awt
[22:37:07] *** Bonix has quit IRC
[22:37:10] <csgeek> so.. a GUI builder?
[22:37:21] <LinuS> yes
[22:37:37] <hse-hoens> does anyone have any good tutorial that shows how to make a 'meter' in a gui ala http://www.logitekaudio.com/assets/product_gfx/uv71_sv71_surround.jpg
[22:37:46] <vol> LinuS: Netbeans I guess?
[22:37:53] <csgeek> yah.. quiet a few these days... I'm using Jigloo at the moment which integrates into Eclipse.. or netbeans comes with one out of the box
[22:38:08] <csgeek> or...
[22:38:09] <csgeek> J#
[22:38:11] * csgeek ducks
[22:38:19] <Stef1> hse-hoens: See JSlider
[22:38:30] <Stef1> http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-JSlider.html for examples
[22:38:35] <sproingie> Visual J#++.NET
[22:39:11] <hse-hoens> i dont' necessarily want a slider
[22:39:22] *** Cycom has quit IRC
[22:39:26] <csgeek> is that still around even? J#
[22:39:26] <hse-hoens> well i do but not with the huge knob :)
[22:39:51] <LinuS> i'm checking those names out
[22:40:19] *** pchapman has quit IRC
[22:40:24] *** anair has joined ##java
[22:40:52] <coalado> its possible to download an UTF encoded website
[22:41:03] <coalado> by openeninge the INputstream with "UTF8" as second parameter
[22:41:34] <coalado> i'm sure that there is abetter way than parsing the content-type header yb myself
[22:41:36] <LinuS> uhm, seems J# can't compile java source code
[22:41:37] <coalado> is it?
[22:41:38] *** mengu has joined ##java
[22:42:04] *** vesz has quit IRC
[22:42:14] *** pchapman_ has joined ##java
[22:42:42] *** rlubke has quit IRC
[22:44:17] <LinuS> what about jigloo and netbeans easiness? i'm going to teach it to some non-programmer so.. eheh
[22:44:56] <AlanasAnikonis> let the non-programmer just design the gui! don't let him/her touch code....
[22:44:59] *** MigoMipo has quit IRC
[22:45:16] <LinuS> i'll have to teach them how to code to..
[22:45:39] * AlanasAnikonis calls for a pilot to fly his trailer
[22:45:51] <LinuS> but they need it for gui apps, so i was thinking about gui builder rather then teaching them how to use awt too
[22:45:56] <LinuS> dunno :< any thoughts?
[22:46:31] <AlanasAnikonis> if you want something done, do it yourself.. that's only thing i can think of :(
[22:46:42] *** anair has left ##java
[22:46:46] <AlanasAnikonis> and on a friday 13 evening, i am thinking i need beer
[22:46:55] <AlanasAnikonis> oh, java related thoughts?
[22:47:05] <LinuS> well.
[22:47:19] <LinuS> casual talk too, but mainly i was looking for java related thoughts, yes.
[22:47:21] <LinuS> :P
[22:47:39] *** ScottG489 has joined ##java
[22:48:00] *** funktor has quit IRC
[22:48:19] * AlanasAnikonis opens up a drink and looks at his IntelliJ... hey, this thing has a gui designer too!
[22:48:30] <AlanasAnikonis> are you restricted to Java?
[22:48:39] <AlanasAnikonis> why not use... Qt?
[22:48:40] *** funktor has joined ##java
[22:49:06] <AlanasAnikonis> from the little i saw of Qt designer it was quite good
[22:49:11] *** beol has quit IRC
[22:49:23] <LinuS> hmm..qt
[22:50:16] *** gallatin has quit IRC
[22:50:54] <sproingie> i'm told qt supports java too
[22:51:31] <sproingie> not exactly pure java, but that's not a priority for everyone
[22:52:15] <LinuS> i've got to understand what do they mean for "not exactly pure java"
[22:52:21] *** waz has quit IRC
[22:52:57] *** jbartels has quit IRC
[22:53:07] <LinuS> by the way, is there an applet gui builder too?
[22:53:28] <sproingie> applets are just panels
[22:53:31] <AlanasAnikonis> applets are no different from other java guis
[22:54:00] <AlanasAnikonis> if you can drop a layoutmanager on it, you are fine
[22:54:12] *** waz has joined ##java
[22:54:27] <LinuS> oh. indeed. sorry but i've never used this fancy guy things, my code always runs via commandline :P
[22:54:53] <AlanasAnikonis> well I've been focusing on server code for last ~6 years
[22:55:01] <sproingie> likewise. that or simple one-screen web apps
[22:55:07] <AlanasAnikonis> had a java applet too, but i delegated it :P
[22:55:51] *** HeatHawk[AP2] has quit IRC
[22:57:38] *** chrismaster1 has quit IRC
[23:01:02] *** HeatHawk[AP2] has joined ##java
[23:01:47] *** crowbar has quit IRC
[23:02:06] *** MaryjaneLopes has joined ##java
[23:02:31] *** _acid__ has quit IRC
[23:07:11] *** waz- has joined ##java
[23:07:20] *** Serva has joined ##java
[23:08:07] *** spathi has quit IRC
[23:08:19] *** r0bby has joined ##java
[23:09:11] *** jabalsad has quit IRC
[23:09:29] *** jabalsad has joined ##java
[23:09:33] *** Carnage\ has quit IRC
[23:10:34] *** mengu has quit IRC
[23:11:05] <blahjake> what's an example of a Collection generic parameter declaration that would not cause an unchecked warning when passed to the Collections.min or Collections.max single argument versions?
[23:11:54] <svm_invictvs> What a slow day
[23:11:59] <toens> hehe.
[23:12:46] *** kercyr has joined ##java
[23:13:03] <nDuff> .../join #yum
[23:13:05] <nDuff> erk
[23:13:23] <kercyr> On Windows, if you weren't using an IDE, what editor would you use? (I don't have Windows, so I have no experience.)
[23:13:49] <svm_invictvs> blahjake: Collections.min(new LinkedList<Integer>());
[23:14:10] <cheeser> kercyr: vim
[23:14:28] *** waz has quit IRC
[23:14:28] <sproingie> emacs
[23:14:55] <sproingie> i actually like emacs better on windows. purty fonts.
[23:14:56] <kercyr> other than the two obvious ones that's universal.
[23:15:08] <svm_invictvs> jedit
[23:15:08] <MaryjaneLopes> damn, i get stoned only looking a thoase lines
[23:15:16] *** MaryjaneLopes has left ##java
[23:15:53] *** bjv has quit IRC
[23:16:02] <hse-hoens> is there any java swing component that acts as a bar with lights on it?
[23:16:28] <pfn> hse-hoens, not directly, no--but it's pretty trivial to do
[23:16:37] <hse-hoens> pfn using what?
[23:16:49] <pfn> using a JPanel and some ImageIcons
[23:16:57] <kercyr> JLabel and some html?
[23:17:00] <pfn> and JLabels
[23:17:15] <hse-hoens> i see
[23:17:20] <hse-hoens> use a verticall stacked jlabel
[23:17:33] *** phyburn has joined ##java
[23:17:33] <hse-hoens> grid layout i guess
[23:17:44] <hse-hoens> with as manyh rowsa s ehight
[23:17:47] <hse-hoens> fair enough i can do that
[23:17:56] <hse-hoens> thanks
[23:18:06] <pfn> I have no idea what you just went on about, but you're welcome
[23:18:12] <kercyr> hse-hoens, you can just override paintComponent(Graphics) on JComponent. That might be the easiest way.
[23:18:25] <pfn> kercyr, why would any one want to do that
[23:18:26] <blahjake> svm_invictvs: thanks, that makes it clear i was barking up the wrong tree, the type i was parameterizing implements raw-type Comparable not parameterized Comparable
[23:18:27] <svm_invictvs> blahjake: you can use checkecCollection, too, if you're working with an API that doesn't use generics.
[23:18:30] <pfn> just setIcon on a JLabel
[23:18:33] <pfn> to be the appropriate "light"
[23:18:44] <svm_invictvs> blahjake: that too. Integer implements comparable, iirc.
[23:18:49] <hse-hoens> yeah exactly pfn, seems much easier :)
[23:19:05] <svm_invictvs> Collections.min(Collection<? extends Comparable> c);
[23:19:16] <blahjake> svm_invictvs: nod, when i saw Integer implements Comparable<Integer> it became clear
[23:20:12] *** waz has joined ##java
[23:20:31] * svm_invictvs high fives blahjake
[23:21:42] <kercyr> pfn, um... because it's easier?
[23:22:06] <pfn> paintComponent isn't the easiest way
[23:22:46] *** SwanR has joined ##java
[23:23:27] <kercyr> pfn, if you say so.
[23:23:33] <SwanR> Hello, i am trying to get the caret position to always be at the bottom of a JTextArea (so when things are appended , it automatically sticks to the bottom). I have made it go there initially, but when things are appended it does not follow. Could somebody point me in the right direction ?
[23:23:38] <pfn> jlabel.setIcon(new ImageIcon("offlight.png")); jlabel.setIcon(new ImageIcon("onlight.png")); is harder than doing class MyComponent extends JComponent { @Override .. paintComponent(...) { if (on) drawImage(onImage); else drawImage(offImage); } }
[23:23:44] <pfn> right....
[23:24:19] *** jeffmoss has joined ##java
[23:24:20] <pfn> and on top of that, you need a method to modify the 'on' variable, and a request to repaint, at that
[23:24:48] *** teralaser has quit IRC
[23:25:02] *** dmlloyd_ has joined ##java
[23:25:07] <jeffmoss> how do I know if I have JMX? It says it comes with J2SE 5, I have JDK 6 ???
[23:25:14] <pfn> then you have it
[23:25:34] *** cybereal has joined ##java
[23:26:29] *** waz- has quit IRC
[23:26:31] <pfn> kercyr, that's really easier huh :p
[23:26:59] <jeffmoss> pfn: I have an example that says to use "start.jar" for jetty, is there an equivalent in tomcat speak?
[23:27:06] <kercyr> pfn, well... if you want a bunch of these.... maybe. It wasn't just one blinking light.
[23:27:08] <jeffmoss> something like that?
[23:27:53] <pfn> jeffmoss, define the JMX options in setenv.sh
[23:28:39] <pfn> jeffmoss, add CATALINA_START_OPTS="-Dcom.sun.management.jmxremote.port= ...."
[23:28:48] <pfn> jeffmoss, google for the appropriate jmxremote variables
[23:29:05] <kercyr> I assumed that the number depended on the dimensions of this bar... like a 100x100 box would have 10000 lights on it.
[23:29:06] <jeffmoss> pfn: thank ya
[23:29:09] *** cactaur has joined ##java
[23:29:14] <pfn> kercyr, even so, creating a new component is overkill, unless there's something specific about JLabel that doesn't what you need
[23:29:21] <pfn> do
[23:29:35] *** zophy has joined ##java
[23:29:39] *** waz has quit IRC
[23:29:47] *** Woflborg has quit IRC
[23:30:27] *** zophy has quit IRC
[23:30:29] <hse-hoens> it's just a vumeter that i'm making
[23:30:32] <hse-hoens> :P
[23:30:43] <hse-hoens> a bunch of labels will work fine
[23:30:44] *** waz has joined ##java
[23:31:12] <hse-hoens> i probably don't even need to even use icons... just set the background of the jlabel to be dark (color) if off, and light (color) if on
[23:31:33] *** Ivellina has quit IRC
[23:31:44] *** zophy has joined ##java
[23:31:53] *** thorat has quit IRC
[23:33:26] *** skypce has joined ##java
[23:34:32] *** TheCastor has quit IRC
[23:35:32] <skypce> http://www.pastie.org/388690 , it return insert into productos_empresa values( 3,'dsdsdsd,'sdsds'); why dont put a ' after dsdsdsd
[23:35:50] *** mohax has quit IRC
[23:37:02] <vol> skypce: stare at it for a minute
[23:37:07] <vol> look at where you're putting 's
[23:37:28] <vol> also, use a StringBuilder
[23:37:30] <cheeser> and consider using prepared statements
[23:37:34] <vol> ^^
[23:37:43] <skypce> thank you vol
[23:37:52] *** bindaas has quit IRC
[23:37:56] <vol> prepared statements will go a long way towards preventing sql injection (of which you're not checking against)
[23:38:02] <cheeser> and calling toString() explicitly is redundant
[23:38:05] *** thorat has joined ##java
[23:38:14] <ycy> 1234564632
[23:38:16] <ycy> it's coming
[23:38:19] <vol> oh god
[23:38:22] <vol> so am I
[23:38:31] <sproingie> ZOMGWTFBBQ
[23:38:43] <benJIman> ycy: /j ##1234567890
[23:38:49] <skypce> thank you guysa
[23:38:55] <skypce> guys
[23:40:05] *** dmlloyd has quit IRC
[23:40:11] *** dmlloyd_ is now known as dmlloyd
[23:41:01] <_val_> vol: still around?
[23:41:06] <vol> no
[23:41:11] *** twolf has quit IRC
[23:41:26] <_val_> ah I see.. just a little question. Can I?
[23:41:52] <vol> you already have
[23:41:55] <Sou|cutter> Can I? <-- is that the question?
[23:42:09] <LinuS> you just get one question, did we tell you?
[23:42:26] <Sou|cutter> LinuS: that was yours for the day
[23:42:56] <_val_> it's about this http://fpaste.org/paste/3609 so when I enter in the channel !md5 test
[23:43:00] <LinuS> oh, shit!
[23:43:06] <vol> !md5 test
[23:43:18] <_val_> it doesn't return just the hash of test.. but also of !md5 and the space between !md5 test
[23:43:31] <_val_> just a sec
[23:43:34] *** Yancho has joined ##java
[23:43:35] <vol> well shit
[23:43:43] <vol> I assumed you were parsing this up
[23:43:54] <vol> I guess I was wrong
[23:44:43] *** phyburn has quit IRC
[23:44:51] <LinuS> hmm. http://pastebin.com/m6080d78a error got: Bg.java:27: cannot find symbol - symbol : class ClickListener, what am i doing wrong? i think i've imported everything ok
[23:44:54] <_val_> no !md5 shouln't be parsed
[23:45:07] <Sou|cutter> get message.substring(0, message.length() - 3).trim()
[23:45:09] <vol> as in figuring out which part to use.
[23:45:22] <cheeser> LinuS: so import that class
[23:45:26] <Sou|cutter> or something like that
[23:45:29] <vol> Sou|cutter: that will return !md5 abc if the user types !md5 abcdef
[23:45:32] <Sou|cutter> mine's not quite right, but you get the point
[23:45:40] <Sou|cutter> vol: indeed
[23:45:46] <vol> you meant 5, message.length() and that ignores multiple spaces
[23:46:01] <svm_invictvs> I saw some autogenerated code which did something like... import foo.bar.ClassName.* and I could use methods from that class....
[23:46:04] <LinuS> cheeser: "import java.awt.event.*;"
[23:46:06] <svm_invictvs> I never knew you could do that.
[23:46:08] *** Level1 has joined ##java
[23:46:11] <Sou|cutter> what I don't get is that it's looking for !md5 at the end of a message
[23:46:17] <_val_> vol: it will return not the hash of test.. but also get the !md5 test
[23:46:34] <vol> String[] tokens = String.split(" "); String hash = md5(tokens[tokens.length-1]);
[23:46:34] <_val_> Sou|cutter: I just changed that it was startsWith("!md5"))
[23:46:44] <cheeser> ~javadoc ClickListener
[23:46:45] <javabot> I don't know of any documentation for ClickListener
[23:46:49] * cheeser eyes LinuS
[23:46:53] <Sou|cutter> _val_: there you go, then. substring(4, message.length()).trim()
[23:46:55] <cheeser> ~~ LinuS * imports
[23:46:55] <javabot> LinuS, star imports is http://en.wikibooks.org/wiki/Java_Programming/StarImports
[23:46:56] <Sou|cutter> or something
[23:46:58] <vol> Running a regex is overkill and this won't filter out tabs.
[23:46:58] * Sou|cutter shrugs
[23:47:01] *** noobraska has joined ##java
[23:47:11] <vol> you should probably use "\s" or something instead, but anyway
[23:47:13] <cheeser> Sou|cutter: message.substring(4).trim()
[23:47:14] <vol> this is the quick and dirty.
[23:47:15] <_val_> where to put this?
[23:47:25] <vol> _val_: where do you think?
[23:47:26] <_val_> ok hold @_@ I got 2 answers..
[23:47:27] <svm_invictvs> Yeah, ther'es no good reason to use star imports
[23:47:28] <Sou|cutter> cheeser: oh yeah, forgot about the telescoping method signature
[23:47:34] <cheeser> _val_: you should learn to program before writing bots.
[23:47:38] <svm_invictvs> Unless you're writing something quick and ddirty....
[23:47:58] <vol> I find it's easiest to just hit ctrl-shift-o every so often w/ eclipse ;D
[23:48:02] <svm_invictvs> especially when just about any IDE will auto generate the imports you need.
[23:48:10] <svm_invictvs> I haven' typed "import" in like 3 years.
[23:48:10] <_val_> @_@
[23:48:25] <_val_> cheeser: I'm trying to do that
[23:49:07] <NotADJ> How would I get a String from a Scanner?
[23:49:11] *** J0bk has quit IRC
[23:49:38] <Sou|cutter> NotADJ: read the javadocs
[23:49:51] <Sou|cutter> ~~ NotADJ javadoc Scanner
[23:49:52] <javabot> NotADJ: http://is.gd/izIT [java.util.Scanner]
[23:50:39] *** Yancho has quit IRC
[23:50:51] *** Tempoe has joined ##java
[23:52:29] <_val_> ok guys.. thank you.. it isn't still working.. but indeed substring could solve this
[23:52:56] <vol> Just use substring, or a string tokenizer that splits around " " (and use the last token)
[23:53:02] <vol> or String.split
[23:53:02] *** blahjake has quit IRC
[23:53:24] <vol> don't forget .trim if you use substring
[23:53:41] <_val_> Ok.. trim will remove spaces right
[23:53:59] *** Gracenotes has quit IRC
[23:54:07] <_val_> I'm using substring yes.. but get a syntac error.. probably too many braces
[23:54:21] *** Gracenotes has joined ##java
[23:54:56] *** dmlloyd has quit IRC
[23:55:18] *** surial has joined ##java
[23:55:32] <cheeser> ~~ _val_ source
[23:55:32] <javabot> you can find my source at my project site http://kenai.com/projects/javabot
[23:55:40] <cheeser> for inspiration
[23:55:53] <cheeser> because this is pretty trivial to do.
[23:56:03] *** jdolan_ has quit IRC
[23:57:20] <_val_> ok cheeser I'll have a look at it. My purpose is just to build a simple bot.. to learn the basics of java bots
[23:59:37] *** zerobytes is now known as twobytes
[23:59:38] <cheeser> no such thing
top

   February 13, 2009  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | >