Switch to DuckDuckGo Search
   February 24, 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:11] *** TooAngel has joined ##java
[00:00:35] *** whaley has joined ##java
[00:06:13] *** ShadowHntr has quit IRC
[00:07:35] *** deadbeef has joined ##java
[00:07:57] <deadbeef> hi there friends, excuseme: do you know any good tutorial on creating web services on eclipse starting from the wsdl ?
[00:08:53] *** shadewind has quit IRC
[00:09:35] *** fridim_ has quit IRC
[00:10:04] *** gregor_k has quit IRC
[00:10:05] *** Bollinger has quit IRC
[00:11:16] *** PhyloGenesis has quit IRC
[00:11:39] *** rosh_ has quit IRC
[00:12:24] *** elaltaico has quit IRC
[00:12:24] *** genesiss has quit IRC
[00:14:38] *** genesiss has joined ##java
[00:15:18] <vol> deadbeef: I don't know the answer, sorry. Also, you're no cafebabe ;D
[00:15:28] *** claudio_ch has quit IRC
[00:18:29] <deadbeef> vol: maybe i got it
[00:18:35] <deadbeef> (using eclipse web tools platform)
[00:18:46] <vol> cool
[00:19:15] *** waz has joined ##java
[00:19:33] <deadbeef> (i'm reversing a websphere .ear application to make it work on tomcat or glassfish, if you have any hint)
[00:19:58] *** Daniel_G has quit IRC
[00:20:11] *** mitchnull has left ##java
[00:21:08] <vol> no, I don't work with those, sorry
[00:22:22] <deadbeef> thanks a lot anyway
[00:22:58] *** henry_r has quit IRC
[00:23:09] <pfn> sounds like it should be "trivial"
[00:24:11] *** bitcrave has quit IRC
[00:24:32] <pfn> deadbeef, I don't know about using eclipse, but you can generate java code from wsdl using wsimport
[00:24:45] <deadbeef> yep i just discovered how to do it
[00:25:05] <deadbeef> new -> web service -> top-down approach (start from wsdl)
[00:25:16] <deadbeef> sorry i'm very new to this
[00:25:46] *** smoog has quit IRC
[00:26:16] *** smoog has joined ##java
[00:28:31] *** skoskav has quit IRC
[00:32:06] *** KingBilly has joined ##java
[00:33:59] *** dos000 has joined ##java
[00:34:33] <KingBilly> hey i was wondering if there was a way to format a text string so that the initial letter is capitalised when the string is all lower case?
[00:34:55] *** bas-i has quit IRC
[00:35:20] <theCarpenter> KingBilly: look up string.toUpper
[00:35:50] <theCarpenter> or maybe its toUpperCase? use that with string concatenation
[00:36:02] *** bas-i has joined ##java
[00:36:28] *** convivial has quit IRC
[00:36:49] *** aknm has joined ##java
[00:37:12] <KingBilly> i guess i should have just looked up string :)
[00:37:23] <theCarpenter> i'm trying to setup some basic sniffing/MITM stuff... any suggestions for Java networkign libs that do this?
[00:37:47] <r0bby_> theCarpenter: google did not help?
[00:38:03] <r0bby_> KingBilly: http://commons.apache.org/lang/api/org/apache/commons/lang/StringUtils.html#capitalize(java.lang.String)
[00:38:08] <r0bby_> ~commons lang
[00:38:08] <javabot> r0bby_, I have no idea what commons lang is.
[00:38:11] <r0bby_> ~commons-lang
[00:38:11] <javabot> r0bby_, commons-lang is http://commons.apache.org/lang/
[00:38:20] <r0bby_> that's what you need to download and throw on your classpath
[00:38:32] <theCarpenter> r0bby_: google is giving me tutorials and tons of random different libs. i need a personal recommendation
[00:38:41] <theCarpenter> r0bby_: the top hits for a given lib are not always the best hits
[00:39:24] *** TooAngel has quit IRC
[00:39:26] <repnop> theCarpenter: i've always been partial to libpcap
[00:41:07] *** convivial has joined ##java
[00:41:50] *** psypointer has joined ##java
[00:41:58] <psypointer> hi
[00:42:16] *** SuperTux88 has joined ##java
[00:42:21] <psypointer> do i have to close an open instance of InputStream? or can i just leave it open without calling .close() and let the gc do the rest?
[00:42:42] <psypointer> (close when reading is done)
[00:43:12] *** convivial has quit IRC
[00:43:32] *** convivial has joined ##java
[00:44:39] <r0bby_> psypointer: you have to close it
[00:44:48] <r0bby_> close it in a finally block
[00:45:09] <r0bby_> finally blocks ALWAYS run
[00:45:14] <psypointer> nope
[00:45:21] <psypointer> if you do return in a catch { } finally is not executed
[00:45:27] <r0bby_> wrong
[00:45:31] <psypointer> nope
[00:45:33] <psypointer> test it.
[00:45:49] *** TooAngel has joined ##java
[00:45:54] <pfn> psypointer, you should test it
[00:46:01] <psypointer> i tested it.
[00:46:15] <r0bby_> did you?
[00:46:17] <psypointer> wait.
[00:47:04] <r0bby_> ~pastebin
[00:47:04] <javabot> http://www.papernapkin.org/pastebin Paste the final url after you've pasted your stuff there.
[00:47:08] <psypointer> wow, thats sick
[00:47:10] <pfn> you gone done it wrong
[00:47:23] <psypointer> is the behaviour the same in jdk 1.5?
[00:47:26] <r0bby_> yes.
[00:47:29] <r0bby_> it's always been
[00:47:43] <psypointer> brr, then i have some other strange effects in my program...
[00:47:53] <r0bby_> finally is used to close resources to prevent leaks
[00:48:02] *** freeone3000 has joined ##java
[00:48:07] <psypointer> hm
[00:48:14] <psypointer> ok, you don't have to close an InputStream
[00:48:16] *** kane77 has quit IRC
[00:48:19] *** taxon has joined ##java
[00:48:20] <r0bby_> you DO have to.
[00:48:26] <r0bby_> it won't be gc'd.
[00:48:30] <r0bby_> and it will leak
[00:48:33] <psypointer> r0bby_: look in the jdk sources
[00:48:43] <psypointer> the implementation of InputStream.close is empty.
[00:48:53] <r0bby_> because it's overriden
[00:49:01] <psypointer> ?!
[00:49:08] <psypointer> is implements the interface closeable
[00:49:13] *** phix has quit IRC
[00:49:19] <r0bby_> yes!
[00:49:33] <psypointer> you have to close FileInputStream, but you needn't close InputStream
[00:49:38] <r0bby_> psypointer: notice the woird 'abstract'?
[00:49:43] *** phix has joined ##java
[00:49:45] <r0bby_> means it has to be subclassed.
[00:50:06] <psypointer> ah, okay, i never have a running instance, okay.
[00:50:17] <r0bby_> no you do
[00:50:25] <r0bby_> just you instantiate a subclass.
[00:50:28] <psypointer> yep
[00:50:45] <psypointer> ok, but why do i have a memory leak when i forget to close a file input stream?
[00:50:45] <r0bby_> the subclasses DO have a close() that has logic in it.
[00:50:55] <psypointer> the file input stream finalize calls the close method
[00:51:17] <r0bby_> psypointer: there is an entire JSR on this
[00:51:35] <psypointer> yes, but tell me please - i'm really interessed in the answer
[00:51:36] *** bitcrave has joined ##java
[00:51:42] *** tactics has quit IRC
[00:51:54] <r0bby_> because it's still open and referenced
[00:52:05] <psypointer> i can't understand why i have to close a file input stream on a unix system (where no crappy file locks exist) if the finalize method does the same
[00:52:07] *** zelnick has quit IRC
[00:52:18] *** buntfalke has quit IRC
[00:52:23] <psypointer> if it wouldn't be destroyed by the gc when you left it open the finalize close would make no sense
[00:54:09] <psypointer> i agree with you that it's a memory leak when i forget to close a special stream which registers his self in some other class / session. but for File input stream it doesn't seem to be the case
[00:54:18] *** tactics has joined ##java
[00:54:33] <r0bby_> psypointer: http://java.sun.com/docs/books/tutorial/essential/io/
[00:54:35] <r0bby_> go read
[00:54:49] *** phix has quit IRC
[00:55:00] *** phix has joined ##java
[00:56:11] <psypointer> there is no answer for my question.
[00:56:22] *** [S^K] has quit IRC
[00:57:02] *** The_Birdman has joined ##java
[00:57:07] *** meanburrito920_ has joined ##java
[00:57:11] *** vyoman has quit IRC
[00:58:44] <vol> psypointer: politeness, prevent unexpected errors
[00:59:12] <r0bby_> also: java runs more than just unix.
[00:59:26] <AMcBain> runs on* ?
[00:59:39] <r0bby_> yeh
[01:00:05] <psypointer> yep, i know that it's bad style, but techically it shouldn't make if difference for the user / system if i leave a file input stream open
[01:00:23] <sproingie> it does if you run out of filehandles
[01:00:35] <AMcBain> or if a file, when opened, is then locked ...
[01:01:19] <psypointer> are the file handles really closed when you close a file input stream? in the implementation i saw just a method which handles the file lock
[01:02:04] <r0bby_> psypointer: InputStream or the subclasses?
[01:02:31] <psypointer> r0bby_: file input stream
[01:02:41] <psypointer> hm well
[01:03:33] <psypointer> oh!
[01:03:47] <psypointer> i didn't see that the file input stream close calls a native close0
[01:04:12] <psypointer> so the file handles are open till the gc comes - taken. but how long does it take till the gc eats an object if it's not referenced?
[01:04:18] *** darkfrog has joined ##java
[01:04:47] <r0bby_> psypointer: a lot of the api calls native methods
[01:04:49] <darkfrog> I'm trying to create an dispatch my own instance of ActionEvent in Swing and I can't seem to figure out how to generate the "id"?
[01:05:19] <psypointer> r0bby_: yep, i just realized that. but shouldn't the gc eat an unreferenced object at each run?
[01:06:56] <r0bby_> I'm not up to speed on gc or anything. I'm a moron
[01:07:26] <psypointer> ... :S
[01:07:40] <psypointer> anyone here knowing that?
[01:07:44] <r0bby_> ~gc
[01:07:44] <javabot> r0bby_, garbage collection is http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html and http://www-128.ibm.com/developerworks/java/library/j-jtp09275.html?ca=dgr-lnxw07JavaUrbanLegends
[01:07:49] <r0bby_> ^ info on it
[01:07:52] *** TryNiX has quit IRC
[01:08:59] <vol> psypointer: "should".
[01:09:12] <vol> the GC isn't guarenteed to do a single thing
[01:09:33] *** delskorch has joined ##java
[01:09:42] *** benny`work has quit IRC
[01:09:44] <KingBilly> hey im still trying to capitalize the initial letter in a string, it seems fairly straight forward using the stringUtils package, but it wont work for me, ive imported the package and believe ive used it correctly
[01:09:52] <KingBilly> http://pastie.org/397997 << my example
[01:10:06] <KingBilly> its saying i dont have the capitalise method
[01:10:06] *** NiallC has joined ##java
[01:10:52] <r0bby_> KingBilly: did you set your classpath up?
[01:11:04] <KingBilly> yea its in the classpath too
[01:11:08] <vol> is your classpath set up? do you have the right version?
[01:11:18] <KingBilly> buildpath you mean?
[01:11:23] <vol> that too.
[01:11:27] *** josemoreira has joined ##java
[01:11:29] <r0bby_> build path _AND_ classpath
[01:11:34] <r0bby_> newbies and ides--
[01:11:38] <KingBilly> :)
[01:11:47] <KingBilly> well how do i set it in the class path hehe
[01:11:47] *** aksn has quit IRC
[01:11:54] <r0bby_> apparently you don't
[01:11:54] <KingBilly> i imported it into the class
[01:12:02] <KingBilly> :s
[01:12:06] <vol> If you're using an ide, make sure it's part of the "project" somehow.
[01:12:13] <r0bby_> KingBilly: why did you use a static import?
[01:12:18] <r0bby_> when you need just one method?
[01:12:27] <KingBilly> how do you mean
[01:12:32] *** VaNNi has quit IRC
[01:12:34] <The_Birdman> copy and paste?
[01:12:35] <r0bby_> just do StringUtils.capitialize(...);
[01:12:52] <KingBilly> oh
[01:13:02] <r0bby_> did you bother to read the docs?
[01:13:06] <KingBilly> yes
[01:13:11] <r0bby_> Apparently not
[01:13:14] <psypointer> ok i see (juts testing a gc test program). thank you for the help! bye!
[01:13:33] <r0bby_> because it gives you examples
[01:13:48] *** blankthemuffin has joined ##java
[01:13:48] <r0bby_> you have a lot of misunderstandings going on here
[01:14:03] <r0bby_> now you _CAN_ make this work
[01:14:19] <r0bby_> but anyways that's how you do it.
[01:14:35] *** bas-i has quit IRC
[01:14:36] *** HideousNashimoto has quit IRC
[01:15:24] <Sou|cutter> Random question for ya... any of you guys ever used Lua with Java? I'm trying to get LuaJava working, however I can't build it on my OS X it would seem
[01:16:09] <Sou|cutter> I've tweaked the ./config file a few times, but it seems to die compiling the C
[01:16:16] <Sou|cutter> no matter what I do :P
[01:16:36] <The_Birdman> Sou|cutter: I see some steps... http://retrovirus.com/incr/2005/08/building-luajava/
[01:17:09] <Sou|cutter> yup, I followed those steps
[01:17:20] <Sou|cutter> I like that name... The Incrementalist
[01:17:25] *** Hink has quit IRC
[01:18:01] *** psypointer has left ##java
[01:18:06] <The_Birdman> if it die when compiling some C, then it's a build issue right? Nothing you can't do if you don't do any C.
[01:18:07] *** cher has quit IRC
[01:18:09] *** cyth has quit IRC
[01:18:15] <The_Birdman> dies*
[01:18:17] <Sou|cutter> lots of junk like this: src/c/luajava.c:3374: error: ‘lua_State’ undeclared (first use in this function)
[01:18:36] <Sou|cutter> yeah, it is a build issue
[01:18:38] *** indeterminatus has quit IRC
[01:18:55] <Sou|cutter> Well, I did C about 12 years ago
[01:19:09] <Sou|cutter> but damned if I'm going to dive back into that now
[01:19:13] <Sou|cutter> :(
[01:19:24] <Sou|cutter> guess I'll check their mailing list (if they have one)
[01:20:41] *** SuperTux88 has left ##java
[01:20:51] *** aknm has quit IRC
[01:21:27] *** aknm has joined ##java
[01:21:44] *** KingBilly has quit IRC
[01:22:14] *** parker` has joined ##java
[01:22:52] *** cher has joined ##java
[01:23:11] *** rawbk has quit IRC
[01:23:20] <parker`> I am reading values in from a file with Scanner and the values are separated by tabs but some of the values are empty (i.e. some values are separated by two tabs). When there is an empty value, I would like Scanner to give me an empty string.. what pattern can I use to make this happen?
[01:23:41] *** Frederick has quit IRC
[01:24:44] <Sou|cutter> maybe macports installs a wrong version of lua
[01:24:53] *** EspenG has quit IRC
[01:25:47] *** ChanServ has quit IRC
[01:26:29] <parker`> nvm I found my problem, was shooting out ints instead of strings so it was ignoring the empties.. :o
[01:26:58] *** ChanServ has joined ##java
[01:26:58] *** irc.freenode.net sets mode: +o ChanServ
[01:27:48] *** TooAngel has quit IRC
[01:29:34] *** TryNiX has joined ##java
[01:31:40] *** tieTYT has quit IRC
[01:31:58] <Sou|cutter> hmm, I'm getting somewhere
[01:33:04] <TryNiX> Hi all. If anyone familiar with handling images. Basically I split an image into smaller chunks of squares each representing the topright, topleft, bottomright, and bottomleft of a bigger square. I am using this code: http://pastebin.com/d88e7dfc . Problem is, it's working fine for images size 256x256 for example, but I encounter an error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!" if image size is 264x25
[01:33:52] *** immortalfire has joined ##java
[01:34:29] *** jhujhiti has left ##java
[01:35:09] *** giaco has joined ##java
[01:35:26] <pfn> TryNiX, your math is wrong
[01:35:36] *** xiata has joined ##java
[01:35:43] <sproingie> use a debugger and check your array indexes
[01:36:14] *** darkfrog has left ##java
[01:36:45] <TryNiX> pfn: can you elaborate a bit please?
[01:37:28] <pfn> TryNiX, you can't round up
[01:37:43] <pfn> 25 / 2 rounded = 13
[01:38:06] *** josemoreira has quit IRC
[01:39:01] <freeone3000> Ah, but 25/2.0 = 12.5.
[01:39:09] <freeone3000> And math.round(12.5) returns 13.0, every time.
[01:39:10] *** rainmann has joined ##java
[01:39:27] <TryNiX> pfn: I tried rounding down, but this is what I get in a 264x256 image for example: http://img232.imageshack.us/my.php?image=picture1xba.png ... white strip lines appear
[01:39:36] <pfn> you figure out your math :p
[01:39:39] <pfn> I'm not going to solve it for you
[01:40:03] <pfn> perhaps you need to make a special condition if your image has an odd number of rows or lines
[01:40:08] <pfn> s/rows/columns
[01:40:13] *** rainmann has left ##java
[01:40:26] <pfn> er, rows or columns
[01:40:35] *** immortalfire has quit IRC
[01:40:38] *** chetnick has quit IRC
[01:41:28] <TryNiX> I guess so. Will figure out what to do in such condition. Thanks for your help.
[01:43:41] *** TooAngel has joined ##java
[01:46:39] *** BeholdMyGlory has quit IRC
[01:46:56] *** IppatsuMan has quit IRC
[01:46:57] <TryNiX> A simple solution that seems to work is adding 1 to the current node re-draw. g.fillRect(node.rect.x, node.rect.y, node.rect.width + 1,node.rect.height);
[01:47:52] *** le_biloute has joined ##java
[01:52:19] *** skoskav has joined ##java
[01:52:58] *** banisterfiend has joined ##java
[01:53:01] *** banisterfiend has left ##java
[01:53:24] *** hrehf has joined ##java
[01:53:47] *** ramdam has joined ##java
[01:53:47] *** mosno has joined ##java
[01:56:03] <Sou|cutter> ah HA! I finally got LuaJava to run.
[01:56:18] <Sou|cutter> damn OSX libs in crazy places
[01:56:37] <Sou|cutter> I should write a new blog post to take over the one i was reading (which was either outdated or wrong)
[01:57:54] *** Daniel_G has joined ##java
[01:58:08] *** mele- has joined ##java
[01:58:44] <parker`> if I allocate an integer array in java, is it *guaranteed* to be all zeros?
[01:59:10] <AMcBain> int array or Integer array?
[01:59:16] <parker`> int, primitives, sorry
[01:59:34] <AMcBain> then it should be filled with the default value for int primitives. which happens to be 0.
[01:59:44] <parker`> okay thanks
[02:00:02] *** nvictor has joined ##java
[02:01:28] *** nvictor has left ##java
[02:03:33] <deadbeef> excuseme, i've a problem
[02:03:46] <deadbeef> in a project i've imported the following class is missing
[02:04:24] *** amnesiac has quit IRC
[02:04:33] <deadbeef> import javax.ejb.CreateException;
[02:04:51] <deadbeef> in my jre the package javax.ejb is missing
[02:05:05] *** Daniel_G has quit IRC
[02:05:12] *** Daniel_G has joined ##java
[02:06:05] *** ofl_ has quit IRC
[02:06:28] <pfn> get the appropriate jar file
[02:06:40] <pfn> add the java ee library in eclipse
[02:07:05] <deadbeef> i'm downloading openejb
[02:07:12] <deadbeef> but i dont know if i'm doing it right
[02:07:49] <The_Birdman> deadbeef: from whom did you download the project? You need to follow the instructions if any.
[02:07:56] *** Ven]n has quit IRC
[02:08:59] <deadbeef> The_Birdman: the instructions are for websphere
[02:09:04] <deadbeef> i'm trying to get it running on tomcat
[02:09:24] *** hrehf has quit IRC
[02:11:12] *** teralaser has quit IRC
[02:12:19] *** Lhet has joined ##java
[02:12:53] <parker`> is there any good way to check if a string *could* be parsed as an int without doing a try/catch? :)
[02:12:59] *** VaNNi has joined ##java
[02:13:13] <FauxFaux> Why do you want to avoid the try catch?
[02:13:21] *** xiata has quit IRC
[02:13:21] <parker`> just keeping it simple
[02:13:22] <kavon> parker`: that is the whole point of the try catch
[02:13:27] <deadbeef> parker`: you could use regex to check if it matches {0, .., 9}*
[02:13:28] *** xiata has joined ##java
[02:13:39] <parker`> alright I'll just use t/c thanks
[02:13:46] <svm_invictvs> yeah, parker` try/catch simplifies things greatly
[02:13:46] <FauxFaux> Very locale-sensitive, deadbeef.
[02:14:17] <svm_invictvs> \d*?
[02:14:21] <svm_invictvs> ~javadoc Pattern
[02:14:21] <javabot> svm_invictvs: http://is.gd/izkz [java.util.regex.Pattern]
[02:14:26] *** Daniel_H has quit IRC
[02:15:00] <kavon> Can one add arrays like this: A[] = {"abc", "def"} A += "ghi"
[02:15:15] <kavon> if A[] has a length greater than 2
[02:15:25] <r0bby_> kavon: use a List.
[02:15:26] *** mele- is now known as rburton
[02:15:31] <r0bby_> and have you tried it?
[02:15:38] <jottinger> kavon: try it and see.
[02:16:41] <r0bby_> http://weblogs.java.net/blog/cayhorstmann/archive/2009/02/a_simple_servle_1.html
[02:16:43] <r0bby_> cute
[02:17:28] <jottinger> cay horstmann is annoying.
[02:19:04] *** aknm has quit IRC
[02:19:28] <svm_invictvs> FauxFaux: What's wrong with \d+?
[02:19:32] *** aknm has joined ##java
[02:20:25] <FauxFaux> Integer accepts scientific notation and thousadns seperators and.. doesn't it?
[02:20:58] <cheeser> ~tias
[02:20:58] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[02:21:01] <svm_invictvs> Good question
[02:21:39] <FauxFaux> The docs say not, but you did forget the minus sign.
[02:21:41] <kavon> FauxFaux: quick answer: no it does not, thousands separator is a char
[02:22:17] <svm_invictvs> FauxFaux: yeah...good point.
[02:22:23] <svm_invictvs> FauxFaux: fuck my life
[02:22:30] <svm_invictvs> :P
[02:22:32] <kavon> svm_invictvs: gladly
[02:22:43] <svm_invictvs> fmylife.com
[02:25:16] *** EspenG has joined ##java
[02:25:58] *** orgy` has quit IRC
[02:27:17] <kavon> classical music gets my in the zone
[02:27:18] *** dorito has joined ##java
[02:27:19] <kavon> me
[02:27:21] *** TooAngel has quit IRC
[02:28:40] <dorito> heya im getting an error at the } else { line
[02:28:49] <dorito> it says 'else' without 'if'
[02:28:58] <dorito> yet I have used many if's before that
[02:29:16] <dorito> anyone willing to help a beginner please? :<
[02:29:17] <kavon> dorito: you probably closed one of the ifs or somthing
[02:29:23] <kavon> pastebin.com
[02:29:27] <kavon> lets see what you did
[02:29:27] <dorito> youre not supposed to close them?
[02:29:46] <AMcBain> kavon: no ... try ~pastebin ... but do not recommend pastebin.com, ever.
[02:29:52] *** icedtea has joined ##java
[02:29:55] *** icedtea has left ##java
[02:30:00] *** TooAngel has joined ##java
[02:30:00] *** waz is now known as Guest86911
[02:30:04] <cheeser> dorito: just match up your { }
[02:30:09] *** ScottG489 has joined ##java
[02:30:20] *** fcky has joined ##java
[02:30:24] <svm_invictvs> Whats' so bad about pastebin.com?
[02:30:43] *** Guest86911 has quit IRC
[02:30:46] *** redrebel has joined ##java
[02:31:16] <AMcBain> it's slow, it sometimes times out, and there are even people who can't get to it at all.
[02:31:41] <AMcBain> s/sometimes//
[02:31:46] <TryNiX> man I'm so knackered
[02:31:54] <kavon> OMG IM SO PLASTERED
[02:32:15] <redrebel> i have a jpa question. if i persist an new object where the PK is automatically generated using @identity. how can I retrieve the PK??
[02:32:25] <r0bby_> kavon: OH MY GOD.. nobody cares
[02:33:06] * cheeser unlimbers his banhammer
[02:33:15] * kavon gives r0bby_ his sarcastic thumbs up.
[02:33:17] <TryNiX> I made this function which splits big squares into smaller ones. It keep generating an error if the rectangle width is not a multiple of 2, although the if statements are there to ensure that goes smoothly... I can't really see what oversight I did, and would appreciate any input.
[02:33:24] <TryNiX> http://pastebin.com/d62371beb
[02:33:37] <kavon> oh em gee he used pastebin.com
[02:33:40] <r0bby_> okies.. this is the point where i take abreak
[02:33:56] <svm_invictvs> I think we should give r0bby_ ops for a day
[02:33:58] <svm_invictvs> See what happens.
[02:34:01] <kavon> lol
[02:34:01] <r0bby_> bad idea
[02:34:09] <dmlloyd> TryNiX, I'd probably keep it as a float until you get the final result
[02:34:15] <svm_invictvs> If the channel isn't completely gone by the end of the day, I think it's safe to say there is no god.
[02:34:26] <dmlloyd> you're mixing int and double there, but float should be more than sufficient
[02:34:44] <dmlloyd> and since you're dividing in half, float will let you get down to *really* tiny squares :)
[02:34:48] <svm_invictvs> grumble
[02:35:11] <r0bby_> svm_invictvs: god doesn't exist
[02:35:24] * r0bby_ goes get food
[02:35:34] <svm_invictvs> anyhow.
[02:36:59] <svm_invictvs> how do you get Javabot to shun you?
[02:37:07] <svm_invictvs> spam it with requests?
[02:37:37] <r0bby_> you explicitly trigger the shun; otherwise you just eventually lag the bot to hell I'd think
[02:37:58] <svm_invictvs> I see.
[02:38:05] <svm_invictvs> ~shun svm_invictvs
[02:38:05] <javabot> svm_invictvs, I have no idea what shun svm_invictvs is.
[02:38:17] <r0bby_> that is assuming ShunOperation is loaded
[02:38:27] <svm_invictvs> Shuns time out, right?
[02:38:36] <r0bby_> 5 minutes i think
[02:39:20] <svm_invictvs> ~shun dk_schrute
[02:39:20] <javabot> svm_invictvs, I have no idea what shun dk_schrute is.
[02:39:25] <svm_invictvs> Must not be enabled.
[02:40:20] <dorito> is this : System.out.print(" error message!\n please enter again :")
[02:40:23] <TryNiX> dmlloyd: I digged a bit deeper, and the problem seems to be that during the recursive splitting, one of the small rectangles' width exceeds that of the main rectangle..
[02:40:31] <dorito> the same as this ? :
[02:40:32] <dorito> System.out.println ( "error message");
[02:40:32] <dorito> System.out.println ( "please enter again : ");
[02:41:13] <kavon> no
[02:41:16] <AMcBain> not quite ... you need an \n after the ":" in the first example to make them the same.
[02:41:48] <dorito> ic
[02:41:52] <dorito> ty
[02:42:01] <kavon> dorito: System.out.print("\nerror message\nplease enter again : \n");
[02:42:06] <kavon> dorito: that should be equivilent
[02:42:17] <AMcBain> no ... that has 1 too many newlines
[02:43:06] <kavon> AMcBain: that last \n might be extra
[02:43:29] <kavon> AMcBain: would have to test personally if a print() after a println() ends up on the same line or is on a new one
[02:43:36] <AMcBain> no, the first \n is wrong. println will print on the same line as a previous print call ... it only adds the \n *after* the line it prints.
[02:43:55] *** Vicfred has joined ##java
[02:44:02] <kavon> AMcBain: woops i had my thinking backwards eh
[02:44:18] <kavon> AMcBain: sounds like an AP exam question lol
[02:44:46] <AMcBain> that wouldn't be a very hard AP exam
[02:45:05] <dorito> AMcBain ill pay for the plane ticket if youre willing to do the exam for me
[02:45:13] <svm_invictvs> ugh
[02:45:16] *** morkar- has quit IRC
[02:45:20] <svm_invictvs> Writing unit tests for a midlet can be a pain in the ass.
[02:49:14] *** Vicfred has quit IRC
[02:49:25] *** Vicfred has joined ##java
[02:49:38] <r0bby_> dorito: no
[02:49:45] <r0bby_> you need to do things on your own.
[02:50:31] <r0bby_> Didn't your parents give you any sense of values? Cheating is f'en wrong.
[02:50:56] <redrebel> how do you retrieve the primary key generated by JPA??
[02:51:53] *** Vicfred has quit IRC
[02:51:58] *** Vicfred has joined ##java
[02:52:31] <cheeser> redrebel: it's in the Entity after you persist() it
[02:52:33] *** Carnage\ has quit IRC
[02:52:47] *** ionine_ has joined ##java
[02:52:47] *** ChanServ sets mode: +b *!*n=ionine@*.dyn.optonline.net
[02:52:47] *** ionine_ was kicked by ChanServ (Banned: seriously. just stfu.)
[02:52:56] *** Carnage\ has joined ##java
[02:56:33] <dos000> how do you obtain a lock on 2 obj at the same time ?
[02:56:35] *** rlubke has quit IRC
[02:56:43] <dos000> a sunchronized lock
[02:57:44] <redrebel> cheeser: i'm using toplink, and it doesn't the id property is not updated in the entity after i do em.persist(contact);
[03:09:05] *** waz has joined ##java
[03:09:32] *** aknm has quit IRC
[03:10:02] *** aknm has joined ##java
[03:10:50] *** Lhet has quit IRC
[03:12:38] *** Inhuman has quit IRC
[03:13:27] *** [[thufir]] has joined ##java
[03:15:13] *** redrebel has quit IRC
[03:17:45] *** bhz- has joined ##java
[03:17:51] *** PuffTheMagic has quit IRC
[03:18:32] *** PuffTheMagic has joined ##java
[03:19:10] *** SystemWizard has joined ##java
[03:20:21] *** PuffTheMagic has quit IRC
[03:20:51] *** bitshuffler has joined ##java
[03:21:33] *** ovnicraft has joined ##java
[03:21:53] *** TryNiX has quit IRC
[03:22:01] <ovnicraft> hi folks, @Override annotation inside method is just for documentation?
[03:23:47] *** xphillyx has joined ##java
[03:24:11] <svm_invictvs> ovnicraft: ?
[03:24:15] *** Copter has quit IRC
[03:24:23] <xphillyx> Hey, so if I have a collection of objects, what is the best way to get an individual component from it and make it type E?
[03:24:59] *** cactaur has joined ##java
[03:25:35] *** Carnage\ has quit IRC
[03:25:54] <ovnicraft> svm_invictvs, @Override != @override?
[03:26:58] *** PuffTheMagic has joined ##java
[03:27:54] *** nvictor has joined ##java
[03:28:11] <xphillyx> My code has to be written for all comparable classes, so string, int, double, etc. So I used <E extends Comparable<? super E>> earlier. But now I have a collection of objects coming in, and I need to get Collection<? extends E> to an E object
[03:28:36] *** nvictor has left ##java
[03:28:57] *** PuffTheMagic has quit IRC
[03:29:03] <xphillyx> I was thinking the toArray function, but I don't know how to get it into E.
[03:30:01] <svm_invictvs> ovnicraft: I think it's @Override and it's only at the method level.
[03:30:12] *** pchapman has quit IRC
[03:30:18] <svm_invictvs> ovnicraft: And I'm pretty sure it's only retained at the source level.
[03:30:20] *** flippo has joined ##java
[03:30:29] <cheeser> you can't override anything *but* methods.
[03:31:25] *** pchapman has joined ##java
[03:31:41] <ovnicraft> svm_invictvs, @Override ; public void run() {}
[03:31:47] <ovnicraft> that is the code
[03:32:16] <ovnicraft> ~pastebin
[03:32:17] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[03:32:37] *** PuffTheMagic has joined ##java
[03:32:46] <xphillyx> ovnicraft: Me? Or svm
[03:32:57] <dorito> what does illegal start of expression exactly mean
[03:33:02] <ovnicraft> http://rifers.org/paste/show/8832
[03:33:12] <dorito> i have this line if ( ){ highlighted
[03:33:27] <ovnicraft> xphillyx, if you can help.. too ;)
[03:33:53] *** cher has quit IRC
[03:33:57] *** PuffTheMagic has quit IRC
[03:34:07] *** aknm has quit IRC
[03:34:12] <xphillyx> i have no idea what he's talking about, I came in too late, but if anyone has any ideas for my question, I'd love some help haha.
[03:34:33] *** aknm has joined ##java
[03:34:40] *** [[thufir]] has left ##java
[03:34:53] *** PuffTheMagic has joined ##java
[03:35:32] *** PuffTheMagic has quit IRC
[03:36:06] *** [[thufir]] has joined ##java
[03:36:17] <svm_invictvs> ovnicraft: @Override just tells you that taht method overrides a superclass method.
[03:36:39] <dorito> reached end of file while parsing means you have too many }'s or too little?
[03:36:49] <xphillyx> It doesn't like E[] array = new E[collection.size()];
[03:37:13] *** Deformati has joined ##java
[03:37:16] *** Dracofodder has quit IRC
[03:37:37] <Deformati> Is j# basically compatible with java for the most part?
[03:37:45] <pfn> no
[03:37:53] <pfn> j# is unusable, don't touch it
[03:38:20] <Deformati> Well, I have the choice between c++, j#, and vb...
[03:38:54] <pfn> c++ it is
[03:38:54] <Deformati> Oh, c# too.
[03:39:07] <Deformati> Meh, I hate c++, and I do not know c#.
[03:39:18] <xphillyx> What are you doing with it?
[03:39:27] <Deformati> Contest.
[03:39:47] <pfn> j# is allowed but not java
[03:39:49] *** cactaur has left ##java
[03:39:49] <pfn> how strange
[03:39:56] <Deformati> I know.
[03:40:02] <Deformati> It is retarded.
[03:40:24] <Deformati> I tried to request software and they said they refuse to support any more software.
[03:41:20] *** theCarpenter has left ##java
[03:41:48] *** HockeyInJune has quit IRC
[03:42:19] <xphillyx> Anyone have any ideas on how to get Collection<? super E> collection to E var?
[03:42:22] *** HockeyInJune has joined ##java
[03:43:27] <pfn> you can't
[03:43:39] <pfn> because a superclass of E is rarely E
[03:43:43] <flippo> xphillyx, you want to get a var of type E out of it? Or you want a Collection<E>?
[03:44:11] * pfn hasn't yet understood why there's a 'super' keyword in generics
[03:44:29] *** UK-sHaDoW has joined ##java
[03:44:43] <xphillyx> Type E. Basically I have code written to have a single variable going into a tree. And I wanted to take my collection, and call that method for each index.
[03:45:20] <xphillyx> Sorry I mistyped, Collection<? extends E> collection
[03:45:32] *** pandora-- has quit IRC
[03:45:46] <pfn> xphillyx, getting a Collection<E> out of it should be pretty easy--what exactly is the problem
[03:45:50] <flippo> xphillyx, sounds like you want a foreach loop
[03:46:17] <flippo> xphillyx, for (E e: collectionOfEs) {...}
[03:46:35] *** UK-sHaDoW has left ##java
[03:46:51] <xphillyx> I've never used for each's before. Can you explain that syntax?
[03:47:05] <flippo> ~foreach
[03:47:05] <javabot> flippo, foreach is " for (Foo foo: fooList) { foo.setBar(baz); } " more at http://java.sun.com/j2se/1.5.0/docs/guide/language/foreach.html
[03:48:06] *** rawblem has joined ##java
[03:48:43] <xphillyx> So for(E e: collection) {...}
[03:49:05] <flippo> yes, looks very similar to what I typed the first time
[03:49:14] <xphillyx> yea i was clarifying
[03:49:24] <xphillyx> and then i should do insert(...); what should I put inside the insert
[03:49:55] <flippo> Depends on what the insert wants
[03:50:11] <flippo> and what the insert belongs to
[03:50:20] <xphillyx> something of type E
[03:50:38] <flippo> Then you could pass that e without a compilation error
[03:51:26] <flippo> I hope that's a different collection than the one you are iterating over though
[03:51:28] <xphillyx> do i have to do anything for iterate e?
[03:51:38] <xphillyx> to iterate**
[03:51:40] *** tule has joined ##java
[03:51:42] <flippo> I'm wearing out this spoon.
[03:51:57] *** TooAngel has left ##java
[03:52:11] *** DCPom has joined ##java
[03:53:16] <xphillyx> http://pastebin.com/d1d2acf78 That looks wrong.
[03:53:25] <xphillyx> what makes it iterate
[03:54:15] *** PuffTheMagic has joined ##java
[03:54:19] <[pwgr]> concurrent mod exception ?
[03:55:17] <joed> [pwgr]: Indeed.
[03:56:08] *** ttmrichter has joined ##java
[03:56:28] *** thunderbolt has joined ##java
[03:57:07] <Deformati> Ugh.
[03:57:10] <Deformati> This contest is stupid.
[03:57:16] <Deformati> They support the worst software ever.
[03:57:32] *** ader10 has joined ##java
[03:57:44] <cybereal> they support logitech's harmony remote programming software?
[03:58:04] <Deformati> http://www.engin.umd.umich.edu/contest/2009/2009_info.php
[03:58:22] *** elementz has quit IRC
[03:58:29] *** elementz has joined ##java
[03:59:16] *** DCPom has quit IRC
[03:59:17] <ader10> http://pastebin.com/m4f58007 I get a compile error described in the first lines of the link. I would greatly appreciate help.
[03:59:50] *** aknm has quit IRC
[04:00:12] *** python_user has joined ##java
[04:00:17] *** aknm has joined ##java
[04:00:43] <xphillyx> http://pastebin.com/d1d2acf78 Would that code work?
[04:01:04] <ader10> (sorry, is that a reply to me?)
[04:01:08] *** LordMetroid has quit IRC
[04:01:28] <xphillyx> no
[04:01:43] <ader10> good, because I don't understand any of that :P
[04:01:50] <python_user> hi
[04:02:05] <thunderbolt> Hello.
[04:02:38] <vinse> ader10: i'm afraid to say, it looks like you need more help than can be provided here. do some swing tutorial and understand how a "hello world" swing app works, then try your app again
[04:03:14] <ader10> vinse: I can make a hello world swing app
[04:03:59] *** elementz has quit IRC
[04:08:13] *** bhz- has quit IRC
[04:08:34] *** RenatoSilva has joined ##java
[04:09:01] <RenatoSilva> Is it possible to run a junit test from ant's build.xml in Eclipse?
[04:09:23] <cybereal> of course
[04:09:27] <cybereal> why wouldn't it be?
[04:09:29] <python_user> does anyone how I can use the class Runnable, and I've looked at the API. Basically, I'm writing two classes, one is called Parent and the other is called Child and they both extend Thread. Now Child has a constructor method called "void Child(int n)" which stores the initial parameter "n" in a local variable "num" and has a public void run() method which should print the string "This is Child <n>". And it should then
[04:09:32] <python_user> http://pastebin.com/d27efff03
[04:11:22] <RenatoSilva> cybereal: because I've wrote a ruby script to get my tests running whenever I save a file, but don't remember why exactly
[04:11:57] *** _acid__ has quit IRC
[04:12:11] <RenatoSilva> cybereal: I guess it was because ANT doesn't integrate with eclipse regarding build path
[04:12:36] *** _acid__ has joined ##java
[04:12:45] <cybereal> nope but it shouldn't need to
[04:12:54] <RenatoSilva> cybereal: since I show a JFace dialog for test errors, I need a few jars from the eclipse plugins dir
[04:13:24] <cybereal> RenatoSilva: in your ant script act as though it was running on the command line
[04:13:32] <dorito> while comes before or after if?
[04:13:42] <python_user> sorry I just realised, Runnable is an interface
[04:13:43] <joed> python_user: unnable provides the means for a class to be active while not subclassing Thread.
[04:13:49] <joed> Runnable even.
[04:14:15] *** kab has quit IRC
[04:14:17] <RenatoSilva> cybereal: with ant I'd have to change the build path whenever the jar names change (updates)
[04:14:33] <cybereal> RenatoSilva: so what?
[04:14:37] <svm_invictvs> Yeah. I think Runnable was added after Thread.
[04:15:18] <RenatoSilva> cybereal: the scripts seeks for the jar files automatically, when name changes it still can find it
[04:15:28] <cybereal> ant can do that kind of thing
[04:15:31] <cybereal> learn ant
[04:15:31] <RenatoSilva> * the scripT
[04:16:13] <RenatoSilva> cybereal: no it can't
[04:16:19] <cybereal> yes it can
[04:16:24] <RenatoSilva> no it can't
[04:16:37] <reverend> yes, it can.
[04:16:47] <joed> svm_invictvs: My point was that one should search and think for a long time before going to thread directly.
[04:16:50] <python_user> joed, so how can I get the void run() method to print the current child?
[04:16:55] <RenatoSilva> yes, we can
[04:16:56] <joed> RenatoSilva: Yes it can.
[04:17:03] <cybereal> RenatoSilva: based on what little you given all you're doing is finding files based on a wildcard, that's trivial
[04:17:08] <svm_invictvs> joed: People still use Thread.run()?
[04:17:16] <python_user> I've tried creating a new instance of Child, but that doesn't work
[04:17:23] <joed> svm_invictvs: People still go to war?
[04:17:33] <svm_invictvs> joed: heh
[04:17:44] <svm_invictvs> good point
[04:19:00] <cybereal> RenatoSilva: on top of all that, I know you can get eclipse to set additional jars on the classpath when it executes ant, so if it's something that ant itself needs, there you go
[04:19:28] <reverend> cue RenatoSilva calling us all nerds and running off to cry
[04:19:50] <cybereal> even more confusing is why you don't just execute junit directly from eclipse
[04:20:00] <cybereal> it's got a nice interface to it and everything
[04:20:27] <RenatoSilva> cybereal: the test class itself needs those jars to compile, therefore the jars are already in build path
[04:20:42] <RenatoSilva> cybereal: do you mean I'd duplicate the entry?
[04:20:42] <joed> RenatoSilva: 'So....'
[04:20:53] <cybereal> RenatoSilva: I mean you configure the fucking runner, learn to use your IDE jebus
[04:20:53] *** tule has left ##java
[04:20:54] <reverend> because RenatoSilva has a history of doing things in his own way that is always a little bit more inconvenient and retarded than everyone else
[04:21:04] <cybereal> reverend: ah, gotcha
[04:21:06] *** Inhuman has joined ##java
[04:21:10] * cybereal was starting to pick up on that
[04:21:13] <RenatoSilva> cybereal: take a look at what I've been doing: http://pastie.org/398142
[04:21:25] <joed> RenatoSilva: If I could not run a test in my IDE I'd remove it as a useless test.
[04:21:33] *** tote has quit IRC
[04:21:42] <cybereal> RenatoSilva: no, thanks, I have had my fill of dumb for the hour
[04:21:47] <RenatoSilva> cybereal: I run it as an external builder on autobuilds, I remember in the past I was trying to make ant doing the same thing tough
[04:21:52] * joed things cybereal is catching on real fast.
[04:21:56] <joed> thinks.
[04:22:13] <reverend> RenatoSilva: quick, call us nerds and go cry
[04:22:17] <dmlloyd> reverend: ...and that's why he's been on my /ignore list for the past year or so :)
[04:22:24] <RenatoSilva> joed: uhu????
[04:22:35] <joed> You write tests depending on external builds? where the fuck did you get employed?
[04:22:57] <reverend> wait for it. :)
[04:23:09] <joed> ~reverend++
[04:23:09] <javabot> reverend has a karma level of 36, joed
[04:23:33] <RenatoSilva> for non-stupids: I remember at teh time I worte that script I tried to do the same thing with ant, but can't remember why I couldn't get it
[04:23:45] *** popcornPanic has joined ##java
[04:23:46] <joed> ~teh
[04:23:46] <javabot> joed, I have no idea what teh is.
[04:23:56] <reverend> RenatoSilva: it's mainly because you're shooting in the dark in general
[04:24:20] <RenatoSilva> reverend: ok man
[04:24:21] <cybereal> ~tryingtoconfuseanideintobecomingacontinuousintegrationplatform--
[04:24:21] <javabot> tryingtoconfuseanideintobecomingacontinuousintegrationplatform has a karma level of -1, cybereal
[04:24:22] *** epoxy has joined ##java
[04:24:56] <thunderbolt> Gah, that's so long.
[04:25:21] <epoxy> if i have an array of bytes of color (from a PPM image, actually)... i want to draw them to an area pixel by pixel, would i use a Canvas or Image object?
[04:25:27] <reverend> RenatoSilva: i suggest writing both unit tests and build scripts in C
[04:25:42] *** Dr_Link has quit IRC
[04:25:46] *** multi_io has joined ##java
[04:25:50] <reverend> for performance reasons
[04:25:50] <thunderbolt> Forth! Real programmers use forth for everything.
[04:26:04] <xphillyx> Psh, real programmers use punch cards.
[04:26:10] <RenatoSilva> for non-stupids: (00:20:47) rawblem: RenatoSilva, ant can launch another java process to spawn a unit test if you want... but that'll be run in the ant script itself and the junit tools won't recognize it
[04:26:12] <RenatoSilva> (00:21:14) rawblem: so yes you can run the unit test in that fashion if you want but the junit view with the green and red bar will not work
[04:26:26] <thunderbolt> xphillyx: Fortran punchcards?
[04:26:37] <multi_io> how do you make sure a class is loaded?
[04:27:00] <xphillyx> i was just throwing in one of those old timer jokes. I've never used a punch card.
[04:27:08] <multi_io> TheClass.class.getName() ?
[04:27:18] *** aknm has quit IRC
[04:27:31] <cybereal> multi_io: if you're directly referencing a class, it will be loaded the moment it's necessary for code execution or binding
[04:27:39] <svm_invictvs> lol
[04:27:42] <svm_invictvs> My WTF of the day.
[04:27:47] *** aknm has joined ##java
[04:27:51] <multi_io> cybereal: yeah, I thought so too
[04:27:57] <reverend> RenatoSilva: yes, no one has _ever_ figured out how to make the green and red bar work
[04:27:59] <cybereal> multi_io: if you're concerned about reflectively finding things or triggering SPI sorts of operations, a common trigger is to do Class.forName("the.whole.ClassName");
[04:28:09] <reverend> RenatoSilva: i suggest ruby build scripts as a solution
[04:28:20] <multi_io> looks like the static initializer isn't executed
[04:28:31] <multi_io> I'll try the forName
[04:28:31] <cybereal> it won't be executed until the class is actually loaded
[04:28:46] <cybereal> just because it's referenced in some piece of code won't for e it to be loaded, not until it's actually needed
[04:29:12] <svm_invictvs> LOL: http://rafb.net/p/NuejEm95.html
[04:29:19] <multi_io> I'm referencing a public static final field of it
[04:29:30] *** kater_ has joined ##java
[04:29:37] <cybereal> multi_io: that's being inlined into your consuming class most likely during compile time
[04:29:47] <cybereal> depending on the type
[04:29:49] <multi_io> cybereal: hm, ok
[04:30:19] <cybereal> multi_io: if you *must* be sure a static initializer runs, you can do ClassName.getName() or Class.forName(...) either should have the effect
[04:30:27] <RenatoSilva> reverend: there is a bug about it....don't know if will be implemented in 3.5 tough
[04:30:34] <cybereal> er ClassName.class.getName() :)
[04:30:46] <reverend> yes. a bug.
[04:30:55] <xphillyx> breadth first traversal = get left child, then right child, then left childs left child then right child then right childs left, then its right?
[04:30:59] <svm_invictvs> Oh, nevermind
[04:31:03] <svm_invictvs> my code isn't as WTFy as I thought
[04:31:11] <reverend> I BEG TO DIFFER
[04:31:17] *** ries has quit IRC
[04:31:24] <svm_invictvs> me?
[04:31:58] <xphillyx> Yes you. Bird's nest.
[04:32:05] <svm_invictvs> I was able to reduce it to...http://rafb.net/p/eTypfp21.html
[04:32:19] <svm_invictvs> reverend: why?
[04:32:24] <reverend> i'm just generally trolling, don't mind me
[04:32:39] <reverend> i'm disappointed that RenatoSilva hasn't run off to cry yet with a snappy quit message
[04:32:42] *** python_user has quit IRC
[04:32:45] <svm_invictvs> oh
[04:32:54] <RenatoSilva> reverend: ?
[04:33:13] <RenatoSilva> reverend: you're unprofessional
[04:33:20] <reverend> indeed
[04:33:59] <RenatoSilva> reverend: believe me, sex is better than what you're doing
[04:34:05] *** taxon has quit IRC
[04:34:34] *** RenatoSilva has left ##java
[04:34:38] <reverend> there we go
[04:34:53] *** taxon has joined ##java
[04:34:53] <reverend> thumbs up from the aircraft carrier, 'mission accomplished'
[04:36:07] <ader10> http://pastebin.com/m65f5f87b Compile errors included at beginning of paste. Please help me.
[04:37:35] <reverend> ader10: exists is a method, you're missing something
[04:37:38] <multi_io> cybereal: TheClass.name.getName(); isn'T enough, calling an empty static method is
[04:39:24] <cybereal> multi_io: are you using an unusual classloader?
[04:39:37] <ader10> reverend: Ah, xyz.exists(), correct?
[04:40:18] <ader10> Thanks, that's one compile error gone already :)
[04:41:27] <multi_io> cybereal: hm, it's a web application running in tomcat
[04:41:57] <multi_io> both classes (loader and loaded) and loaded from the same jar in WEB-INF/lib/
[04:42:30] <multi_io> s/and/are/
[04:42:36] <cybereal> interesting, well strictly speaking, reading metadata on a class like that doesn't require it be activated so I guess it's ok, still it's kind of bad design to depend on a class to have been loaded when you're not instantiating it or invoking its methods
[04:42:50] <cybereal> anyway I suppose you got your solution, hacky as it may be :)
[04:45:58] *** kater has quit IRC
[04:46:15] <ader10> http://pastebin.com/m7d0967eb Down to one compile error, I would love help or advice.
[04:46:38] *** immortalfire has joined ##java
[04:49:30] <xphillyx> why isn't it public?
[04:49:50] <xphillyx> you could write a public function that calls the private one
[04:50:06] <xphillyx> if it doesnt let you make it private
[04:50:12] <xphillyx> err, public
[04:50:14] *** aknm has quit IRC
[04:50:48] *** aknm has joined ##java
[04:50:53] <ader10> Is that a response to me?
[04:51:25] <xphillyx> yeah i misread your code though, ignore me
[04:51:45] <ader10> :P Thanks for at least reading it, most people don't seem to
[04:51:59] *** woogley has joined ##java
[04:54:10] <xphillyx> Is it possible to do a breadth first traversal without using a queue?
[04:54:22] *** sfuentes has joined ##java
[04:55:25] *** rlubke has joined ##java
[04:56:10] *** cobolfoo has joined ##java
[04:57:24] *** alg0rithm has joined ##java
[04:58:02] *** whaley has quit IRC
[04:58:57] *** woogley_ has joined ##java
[04:59:09] *** woogley has quit IRC
[04:59:11] *** woogley_ is now known as woogley
[05:00:16] <cybereal> xphillyx: yeah but you'll revisit nodes a lot
[05:03:25] *** TranceControl has quit IRC
[05:05:36] *** amitev has quit IRC
[05:08:29] *** ovnicraft has quit IRC
[05:09:07] <sfuentes> how do people typically deal with access to global data? it seems *ugly* to be passing around references to all classes/objects that need access to this resource. are there any other alternatives?
[05:09:29] <cobolfoo> sfuentes create gateway functions?
[05:10:00] <cybereal> sfuentes: you might think it's ugly but it's the right way
[05:10:21] <cybereal> sfuentes: it's actually quite elegant looking from the other point of view, from the pov of the actual implementations of business logic
[05:10:39] <cybereal> once you finally get down to the business, it's passed in everything it needs
[05:11:01] <cybereal> and the consuming framework has total control over the resources the logic effects or that affect it
[05:11:10] <cybereal> the benefits of encapsulation...
[05:11:29] <cybereal> there are lots of ways to ease the pain, such as IoC frameworks, and dependency injection frameworks
[05:11:50] <sfuentes> cyberreal: what if the structure of the data changes ... then all references (which would be many classes) become invalid
[05:12:02] <cybereal> that happens no matter what
[05:12:12] <cybereal> that's why god invented refactoring tools :)
[05:12:12] <joed> sfuentes: Tis not Perl
[05:12:33] <cobolfoo> hehe long live the refactoring tools
[05:12:41] <cobolfoo> I miss theses features when I work on big C++ projects
[05:12:44] <cybereal> sfuentes: anyway if you're talking about *data* you've got a whole other set of options to more dynamically represent and or access data
[05:12:57] <sfuentes> i see. this is a lesson i'm learning.
[05:13:19] <sfuentes> cyberreal: perhaps a data services object?
[05:13:42] *** radixor has quit IRC
[05:14:03] <joed> \BananaHammockCarrierAndWarcraft implements WarfareAndLooseBallCatcher
[05:14:05] <cybereal> or simply more dynamic data structures like maps vs. full on objects, or whatnot
[05:15:11] *** pattwo has joined ##java
[05:15:31] <cybereal> sfuentes: still, type safety is nice, and I wouldn't be afraid of this occurrence of data changes requiring code changes, chances are that it will be required anyway or... why would the data have been needed in the code?
[05:15:56] <cybereal> if you were working against a db with an ORM you could add data to the db and jsut ignore it for the objects in the app if it wasn't needed...
[05:16:10] <cybereal> sfuentes: situation will dictate the best choices
[05:16:52] *** aknm has quit IRC
[05:17:26] *** aknm has joined ##java
[05:19:02] <sfuentes> cybereal: thank you for your insight.
[05:19:24] *** examancer has joined ##java
[05:20:37] *** Kwitschibo has quit IRC
[05:20:54] <ader10> What swing layout would you recommend for 3 buttons across the top and an image at the bottom?
[05:21:27] <cybereal> ~htmllayout
[05:21:27] <javabot> cybereal, htmllayout is a Java LayoutManager that allows you to specify the layout and resize behaviors of your components using a simple html-like syntax (no need to learn another language). HtmlLayout is similar to the GridBadLayout included with the JDK except that it is reasonably easy to use: http://braindamage.org/htmllayoutdocs/
[05:21:55] <cybereal> or if you don't like the idea of a third party layout manager, just use gridbaglayout directly, it'll handle practically everything
[05:22:08] <cybereal> it's just kind of apain in the ass to configure
[05:22:09] <ader10> Thank you!
[05:22:14] <ader10> I'll read up about it :)
[05:22:22] <ader10> I assume there's enough out there that I won't need IRC
[05:22:31] <joed> Holy shit.
[05:22:38] <joed> ~ader10++
[05:22:38] <javabot> ader10 has a karma level of 1, joed
[05:22:43] <joed> ~ader10++
[05:22:43] <javabot> Rest those fingers, Tex
[05:22:45] <ader10> :D
[05:22:57] <ader10> Thanks
[05:23:13] <joed> ader10: No offence, first time in I guess two years I've heard that utterance.
[05:23:15] <cybereal> it'd be nice if karma changes were made in increments relative to the karma of the person making the change
[05:23:27] *** javabot has quit IRC
[05:23:38] <joed> cybereal: I'd still be here increasing his karma.
[05:23:45] <ader10> joed: No offense taken :D
[05:23:47] <cybereal> heh what is yours low?
[05:23:49] <cybereal> ~karma joed
[05:23:54] <cheeser> cybereal: what do you mean?
[05:23:55] *** javabot has joined ##java
[05:23:59] <cheeser> ~shun joed
[05:24:06] <joed> haha
[05:24:13] <cybereal> cheeser: so when you did ++, instead of just one, it'd do some fraction of the karma the person making the change had
[05:24:17] <cheeser> joed: try it now...
[05:24:21] <javabot> cheeser, I have no idea what shun joed is.
[05:24:22] <cheeser> it was broken earlier
[05:24:24] <joed> ~ader10++
[05:24:25] <joed> ~ader10++
[05:24:25] <javabot> ader10 has a karma level of 2, joed
[05:24:25] <joed> ~ader10++
[05:24:27] <joed> ~ader10++
[05:24:27] <javabot> Rest those fingers, Tex
[05:24:27] <cheeser> javabot: you suck
[05:24:29] <javabot> Rest those fingers, Tex
[05:24:31] <javabot> Rest those fingers, Tex
[05:24:33] <javabot> A tool is only as good as its user. Tool.
[05:24:54] <cybereal> anyway it's just a musing, surely a toy like karma barely deserves so much thought :)
[05:24:55] <joed> cheeser: Looks like a queue / List not being read.
[05:25:34] <cheeser> no test for it yet either
[05:26:15] *** cobolfoo is now known as coboldead
[05:26:21] <cybereal> basically if robby did ~blah++ it'd go up one, but if pr3d4t0r did it, it'd go up like 3 or 5
[05:26:25] <cybereal> ~karma r0bby_
[05:26:25] <javabot> r0bby_ has a karma level of 7, cybereal
[05:26:29] <cybereal> ~karma pr3d4t0r
[05:26:29] <javabot> pr3d4t0r has a karma level of 530, cybereal
[05:26:35] <cybereal> because of those values
[05:26:47] <cheeser> i see.
[05:27:06] <cheeser> yeah. that's probably too much work for karma.
[05:27:11] <cheeser> at least for *me* to do it.
[05:27:11] <svm_invictvs> Shun works now?
[05:27:13] <cheeser> P^)=
[05:27:15] <cybereal> heh
[05:27:17] <cheeser> svm_invictvs: apparently not
[05:27:59] <cheeser> ~escape
[05:27:59] <javabot> cheeser, escape is escape dialog is explained at http://www.javaworld.com/javaworld/javatips/jw-javatip69.html
[05:28:16] *** meanburrito920_ has quit IRC
[05:30:34] *** mosno has quit IRC
[05:30:53] *** prgrmr has quit IRC
[05:31:13] * r0bby_ looks around
[05:31:24] *** BlindHunter has joined ##java
[05:31:53] *** waz has quit IRC
[05:32:12] *** Inhuman has quit IRC
[05:34:11] * joed smacks r0bby_
[05:34:46] *** BlindHunter has quit IRC
[05:35:37] *** aleksei has quit IRC
[05:36:10] *** asap18 has quit IRC
[05:37:13] *** _bugz_ has quit IRC
[05:37:31] *** casmo has quit IRC
[05:38:56] <r0bby_> joed: I like it when you do that
[05:43:49] *** casmo has joined ##java
[05:44:37] *** sebr is now known as sebr_
[05:45:21] *** sebr_ is now known as sebr__
[05:45:27] *** sebr__ is now known as sebr
[05:46:51] *** kavon has quit IRC
[05:47:03] *** bigjocker has joined ##java
[05:47:07] *** bigjocker has quit IRC
[05:48:46] *** Frostix has quit IRC
[05:49:19] <svm_invictvs> ~shun cheeser
[05:49:19] <javabot> svm_invictvs, I have no idea what shun cheeser is.
[05:49:21] <svm_invictvs> :(
[05:49:24] <svm_invictvs> What's wrong with it?
[05:50:02] <r0bby_> wont let you shun an admin
[05:50:05] *** chyea has joined ##java
[05:50:07] <r0bby_> or shouldnt
[05:50:10] <cybereal> ~shun r0bby_
[05:50:10] <javabot> cybereal, I have no idea what shun r0bby_ is.
[05:50:16] <cybereal> ~shun casmo
[05:50:16] <javabot> cybereal, I have no idea what shun casmo is.
[05:50:23] <cybereal> seems it doesn't know the command at all
[05:50:24] <r0bby_> yeh shun is busted
[05:51:13] *** popcornPanic has quit IRC
[05:51:44] *** StanAccy has joined ##java
[05:51:59] <StanAccy> Whats the easiest way to persist (JPA) a Map<String, String> ?
[05:54:01] *** Bridge| has joined ##java
[05:54:14] <Bridge|> anyu ops round?
[05:54:16] *** StanAccy has quit IRC
[05:56:03] *** CrypticSquared has joined ##java
[05:56:10] *** rlubke has quit IRC
[05:58:39] <r0bby_> Bridge|: /whois Bridge|
[05:58:45] <r0bby_> lol
[05:58:52] <Bridge|> whois Bridge|
[05:59:01] <r0bby_> ignore that lol
[05:59:07] <Bridge|> hehe
[06:00:35] <joed> ~lol
[06:00:35] <javabot> http://idisk.mac.com/zacheryjensen-Public/images/vglol.png
[06:00:53] <joed> Bridge|: What is up.
[06:01:00] <Bridge|> sup
[06:01:05] *** Inc` has quit IRC
[06:01:20] <flippo> joed, nothing much, is my guess.
[06:01:45] <Bridge|> stuck on this project i have to get done, the sad part is i'm not stucc on the coding side of it, i'm stuck on the math aspect
[06:01:45] <joed> flippo: sup, sounds like a bad menu...
[06:02:07] *** sfuentes has left ##java
[06:02:15] <joed> Bridge|: So why the 'Are there any Ops angle?'
[06:02:25] <Bridge|> the quadratic equation is easy if all real numbers but the whole complex/imaginary apect is messing with me
[06:02:52] <Bridge|> didnt wanna just ask when its homework involved, i did read the rules first
[06:02:53] <Bridge|> hehe
[06:03:19] <joed> Okay..... I'll happily grin and go to bed then.
[06:03:26] <Bridge|> lol
[06:03:27] *** metrix has joined ##java
[06:03:51] *** deadbeef has quit IRC
[06:03:59] <flippo> joed, yeah, if we see any ops, we'll let you know.
[06:04:20] <The_Birdman> Bridge|: being a student is a whole lot of fun :-)
[06:04:23] <r0bby_> Bridge|: you're not gonna get much help from ops who typically enforce the no hw bit
[06:04:35] *** thunderbolt has quit IRC
[06:04:37] <joed> Please refrain from lolling... I did my math work on Julia and Mandelbrot rendering, I kinda doubt we'll be able to teach you this in this forum.
[06:04:37] <The_Birdman> forget those simple problems and go chase women
[06:04:39] <r0bby_> Bridge|: go ask your TA
[06:04:49] <Bridge|> lol he blew me off
[06:04:59] <r0bby_> Bridge|: then perhaps try again
[06:05:00] <flippo> Bridge|, that was your last lol, right?
[06:05:11] <r0bby_> try your prof?
[06:05:21] <Bridge|> when to my teachers office houurs right after and he just briefly went over what he allready told us not much help with him
[06:05:23] <r0bby_> ask your fellow classmates?
[06:05:43] <r0bby_> maybe they can help you
[06:06:05] <r0bby_> hint: google also may help you, but i'd be VERY careful using what you find though.
[06:06:15] <joed> Bridge|: so how did you fall into a math class dealing with imaginary numbers and you have no coding skills?
[06:06:15] <flippo> Bridge|, #math has a special way with students seeking help with homework
[06:06:31] <Bridge|> joed its the complete opposite
[06:06:43] <r0bby_> so you have ZERO math skills?
[06:06:49] <r0bby_> Bridge|: sqrt(-1)
[06:06:55] <Bridge|> i'm in java(cs110) but no no 0 math skills
[06:06:56] <Bridge|> hehe
[06:07:00] <The_Birdman> I used not to show up at the labs, see the nerd, ask the nerd to write/send the lab for you
[06:07:01] <Bridge|> not*
[06:07:12] <r0bby_> Bridge|: google.
[06:07:25] <The_Birdman> r0bby_: that's way to complicated
[06:07:30] <The_Birdman> too*
[06:07:30] <joed> Bridge|: Then.... get lost.
[06:07:44] <r0bby_> Bridge|: drop the class until you have some math background
[06:07:56] <r0bby_> do you have basic algebra at least?
[06:08:06] <Bridge|> yes
[06:08:11] <Bridge|> i place into pre-cal
[06:08:12] <r0bby_> imaginary numbers are algebra...
[06:08:15] <The_Birdman> man, he's just trying to get it done, why are you getting so emotional r0bby_? :-)
[06:08:17] * joed draws a square circle.
[06:08:21] <r0bby_> then what the fuck.. you HAVE math skills
[06:08:25] * The_Birdman draws a whole
[06:08:48] <r0bby_> you can't place into precalc w/o math skills.
[06:08:49] <The_Birdman> ah silly my english is bad
[06:08:54] * joed watches r0bby_ explain depth.
[06:08:58] <flippo> r0bby_, you're noisier than the helpless student
[06:09:12] * r0bby_ goes back to writing bad code
[06:09:13] <Bridge|> ;)
[06:09:39] <chyea> does anyone know anything about encoding speech data using the Speex codec? or any codec for that matter. is there like a default data type that these codecs expect the data to be in before encoding it?
[06:09:40] *** Junior has joined ##java
[06:09:48] <chyea> like, wav or something? or do they not even care
[06:09:49] <joed> r0bby_: So in a conifer point in a julia collection where would you say we put the tapestry up?
[06:10:08] <r0bby_> Oh i blow at math
[06:10:12] <Junior> morning
[06:10:21] <r0bby_> I squeaked by
[06:10:49] *** immortalfire has quit IRC
[06:11:54] <joed> chyea: Yes. Speech is a 64k channel, codecs compress it. A729.a is the best compression, it it licensed.
[06:12:59] *** immortalfire has joined ##java
[06:13:15] *** immortalfire has quit IRC
[06:14:37] <chyea> joed: maybe you know this then. if i were wanting to write a simple internet voice chat application, what format does data initially come in as when capturing audio with Java?
[06:14:55] <chyea> i'm betting there's some sort of standard way to capture audio
[06:15:11] <joed> Probably H323
[06:15:34] <joed> Look at the developers manual of your microphone.
[06:16:21] <chyea> it'd be up to the microphone?
[06:16:22] *** jkriesten has joined ##java
[06:16:31] <joed> Probably.
[06:17:47] <chyea> hrm. alright. i'll continue looking into this. i've been reading up on Speex, but i don't even know how to get to a point where i've got a data format stored that Speex will know how to use.
[06:17:57] <chyea> or properly compress.
[06:18:48] <chyea> i'm writing this in Java for multi-platform compatibility, but if it's all up to the microphone anyways then maybe that doesn't matter heh
[06:20:59] *** factor has quit IRC
[06:23:36] *** bigjocker has joined ##java
[06:23:36] *** bigjocker has quit IRC
[06:24:53] <svm_invictvs> grumblefuck
[06:25:00] <Bridge|> lol
[06:25:09] <svm_invictvs> Bridge|: what?
[06:25:17] <svm_invictvs> I feel ike I'm doing this wrong.
[06:25:47] <vol> you are (what are you doing)
[06:26:14] <svm_invictvs> Using a singleton
[06:26:25] <The_Birdman> ~singleton
[06:26:26] <javabot> In most cases singletons should be avoided, they often make non-trivial programs clunky and difficult to maintain. If you really are considering using a singleton, you should first read http://www.ibm.com/developerworks/library/co-single.html and http://www.ddj.com/cpp/184401625 before doing so to ensure using a singleton is absolutely, positively necessary.
[06:26:30] <vol> well you're clearly doing it wrong (what are you doing)
[06:26:31] <svm_invictvs> To get various settings from the invironment.
[06:26:41] <The_Birdman> ~svm)invictvs
[06:26:41] <javabot> The_Birdman, I have no idea what svm)invictvs is.
[06:26:47] <svm_invictvs> The_Birdman: Look at who wrote that factoid.
[06:26:55] <vol> ~sum_invicvs
[06:26:55] <javabot> vol, I have no idea what sum_invicvs is.
[06:27:02] <The_Birdman> :-)
[06:27:02] <svm_invictvs> ~literal singleton
[06:27:02] <javabot> <reply>In most cases singletons should be avoided, they often make non-trivial programs clunky and difficult to maintain. If you really are considering using a singleton, you should first read http://www.ibm.com/developerworks/library/co-single.html and http://www.ddj.com/cpp/184401625 before doing so to ensure using a singleton is absolutely, positively necessary.
[06:27:06] *** riotz has quit IRC
[06:27:08] <vol> ~sum_invictvs
[06:27:08] <javabot> vol, I have no idea what sum_invictvs is.
[06:27:11] <vol> boo
[06:27:13] <svm_invictvs> ~factinfo singleton
[06:27:14] <javabot> svm_invictvs, I have no idea what factinfo singleton is.
[06:27:16] <The_Birdman> ~info singleton
[06:27:16] <javabot> singleton was added by: svm_invictvs on 08-27-2008 at 2:18 PM, EDT and has a literal value of: <reply>In most cases singletons should be avoided, they often make non-trivial programs clunky and difficult to maintain. If you really are considering using a singleton, you should first read http://www.ibm.com/developerworks/library/co-single.html and http://www.ddj.com/cpp/184401625 before doing so to ensure using a singleton is absolutely, positively n
[06:27:41] <svm_invictvs> The singleton contains an "Environment" object.
[06:27:42] <The_Birdman> A man gotta stand by his own rules
[06:27:53] <svm_invictvs> That returns various information about the device
[06:28:06] <svm_invictvs> Either hardcoded or laoded externally.
[06:29:11] <svm_invictvs> (Welcome to the messiness of J2ME) Some features I need are reported by the phone through System.getProperty(), some are defined in the jad, and on some devices I can do neither and just have to hardcode it. SO I have a singleton that instantiates an "Envrionment" object based on whatever dozens of corner cases arise.
[06:29:43] <svm_invictvs> It just makes testing clunky
[06:29:50] <svm_invictvs> But tha's also because I have to instantiate a midlet.
[06:30:45] <svm_invictvs> It's just a little bit of mixed cohesion.
[06:31:22] <svm_invictvs> I was just contemplating weather or not something like environment settings is an acceptable use of a singletone.
[06:31:24] <svm_invictvs> *singleton
[06:31:58] <svm_invictvs> And what really sucks is I can't write unit tests ><
[06:33:05] <The_Birdman> forget unit tests
[06:33:22] <The_Birdman> and Yes "I truly believe in agile and TDD"
[06:33:34] <svm_invictvs> unit testing is part of agile
[06:34:09] <svm_invictvs> The_Birdman: If you had to do what i"m doing, you'd be begging for unit tests. I have to play through to the end of a level o trigger this bug. I mean...I have to play the game every time.
[06:34:21] <svm_invictvs> And, yeah, I'm not very good at the game I wrote the AI kicks my ass every time.
[06:36:38] <AMcBain> you need a pipe, like in mario where it takes you straight to the end of the level :P
[06:36:44] *** blankthemuffin has quit IRC
[06:37:09] <The_Birdman> lol, a pipe in french is like a candy
[06:37:15] <The_Birdman> or an icecream
[06:37:24] <The_Birdman> would you like an icecream AMcBain?
[06:37:41] <AMcBain> actually, I'd like to go to bed ... something I'm doing to do right now :P
[06:38:01] <svm_invictvs> AMcBain: I'm sorry, I can't get over your nick
[06:38:10] <AMcBain> It's okay
[06:38:18] <The_Birdman> :-)
[06:38:39] *** casmo has quit IRC
[06:39:10] * AMcBain heads off for a night of dreaming
[06:39:33] <joed> The_Birdman: Could you blog about this clearly traumatic experience?
[06:40:08] <svm_invictvs> joed: Wht experience?
[06:40:20] <svm_invictvs> I also made the latest changes to my resume.
[06:40:32] *** blankthemuffin has joined ##java
[06:40:33] *** [[thufir]] has quit IRC
[06:41:09] <svm_invictvs> w00w00t
[06:41:40] *** bindaas has joined ##java
[06:41:40] *** chyea has quit IRC
[06:42:48] *** blankthemuffin has quit IRC
[06:44:41] *** Vicfred has quit IRC
[06:46:03] <svm_invictvs> I also use a singleton for debug/logging code.
[06:46:04] <svm_invictvs> So there
[06:46:05] *** blankthemuffin has joined ##java
[06:51:09] <The_Birdman> to singleton or not to singleton that's not the question
[06:51:39] *** metrix has quit IRC
[06:51:48] <svm_invictvs> No, Debug.println(); is perfectly fine.
[06:52:01] <svm_invictvs> Debug.getDebug().println():
[06:52:08] <svm_invictvs> Debug.getDebug().Assert();'
[06:52:18] <svm_invictvs> That got old, so I just made a private singleton :(
[06:52:44] <svm_invictvs> Proguard is set to toss Debug and all method calls to it when I do the release build anyhow.
[06:53:33] <The_Birdman> when you get older it's easy to anticipate reactions, that's interesting
[06:53:42] *** djp[mbp] has quit IRC
[06:55:07] <svm_invictvs> The_Birdman: eh?
[06:55:23] *** tltstc has quit IRC
[06:55:41] <The_Birdman> just bored, forget about me
[06:55:42] *** epoxy has quit IRC
[06:55:58] <The_Birdman> I probably need lots of sleep
[06:56:00] <vol> Doesn't Java already have something ike that?
[06:56:05] *** woogley has quit IRC
[06:56:15] <The_Birdman> like java?
[06:56:37] <vol> :@
[06:56:39] <vol> goodnight
[06:56:40] <svm_invictvs> vol: Like what?
[06:56:59] <vol> svm_invictvs: I could have sworn there was some sort of debugger/logging/etc singleton you could use
[06:57:07] <vol> heck, not even a singleton
[06:57:12] <vol> just a class with static methods
[06:57:13] <svm_invictvs> Not in J2me
[06:57:27] <svm_invictvs> ~javadoc java.util.Logger
[06:57:28] <javabot> I don't know of any documentation for java.util.Logger
[06:57:34] <svm_invictvs> ~javadoc Logger
[06:57:35] <javabot> svm_invictvs: http://is.gd/io1F [java.util.logging.Logger]
[06:57:48] <vol> yes, Logger.
[06:57:54] <vol> that's what I was thinking off
[06:57:55] <vol> *of
[06:58:18] <vol> anyway, using an externally available reference singleton is silly.
[06:58:22] <vol> just use static methods
[06:58:28] <vol> those methods can check for a singleton internally
[06:58:32] <vol> if necessary
[06:58:50] <vol> it will make your code a touch cleaner
[06:59:03] <The_Birdman> that's amazing vol
[06:59:25] *** bitshuffler has quit IRC
[06:59:41] <svm_invictvs> what is?
[06:59:58] <The_Birdman> gn, I need some sleep, I'll tell you tomorrow svm_invictvs :-)
[07:00:02] *** The_Birdman has quit IRC
[07:01:00] *** bindaas has quit IRC
[07:01:20] *** tltstc has joined ##java
[07:01:36] *** bindaas has joined ##java
[07:02:53] *** AMcBain has quit IRC
[07:03:18] *** _acid__ has quit IRC
[07:05:52] *** sepult has joined ##java
[07:15:05] *** CrypticSquared has quit IRC
[07:16:15] *** Kwitschibo has joined ##java
[07:17:09] *** fcky has quit IRC
[07:17:12] *** epoxy has joined ##java
[07:19:14] <epoxy> i have an array[][] of color values that i want to create an image with. could someone point me to some classes/methods that would help me accomplish this.. i can't seem to get bufferedimage or canvas working right
[07:20:34] <epoxy> or something that i can draw pixel by pixel would word.
[07:20:37] <epoxy> work
[07:22:01] *** prgrmr has joined ##java
[07:23:16] *** adi112358 has joined ##java
[07:23:57] *** squi has joined ##java
[07:24:29] *** adi112358 has quit IRC
[07:27:14] *** SystemWizard has quit IRC
[07:29:24] *** td123 has joined ##java
[07:29:50] <td123> I have a question about getRGB http://java.sun.com/j2se/1.5.0/docs/api/java/awt/image/BufferedImage.html#getRGB(int,%20int,%20int,%20int,%20int[],%20int,%20int)
[07:30:07] <svm_invictvs> td123: ok....?
[07:30:11] <td123> it says that to get the pixel, you do y*scansize+x
[07:30:55] <td123> but it doesn't make any sense to me that we use scansize to multiply it with y
[07:31:13] <td123> since most examples set the scansize to image.getwidth, not getheight
[07:31:24] <td123> err wait
[07:31:57] <td123> omg, it does make sense :P sorry
[07:32:12] * td123 goes back to a sleeping trans
[07:33:20] <svm_invictvs> td123: no, that's how it's implemented.
[07:36:41] *** tomvolek has joined ##java
[07:41:05] *** xphillyx has quit IRC
[07:41:42] *** geaaru has joined ##java
[07:42:52] <td123> svm_invictvs: I know, it makes sense :D ty
[07:43:24] *** ahughes has quit IRC
[07:43:39] *** sepult has quit IRC
[07:47:27] *** meanburrito920_ has joined ##java
[07:48:33] *** doc`` has quit IRC
[07:50:26] *** armyriad has joined ##java
[07:51:41] *** pandora-- has joined ##java
[07:55:07] *** vix85 has quit IRC
[07:56:40] *** sebr is now known as sebr_afk
[07:58:20] <armyriad> Let's say that I have a linked list. The only reference to a node is in the previous node. If I remove a reference to the first node, will Java garbage collect the whole list even though some nodes still have references to them?
[07:58:39] <cybereal> yes
[08:00:36] *** boringwall has quit IRC
[08:01:58] <armyriad> Ok, good.
[08:02:30] *** ridoo has joined ##java
[08:03:52] <letfunbegin> though it would be JRE dependent, wouldn't it?
[08:03:57] <cybereal> no
[08:04:07] <cybereal> not the rules about what prevents collection
[08:04:21] <cybereal> though you could find a vm that never collected anything I suppose
[08:04:42] <cybereal> but if an object is not accessible to any threads it is garbage
[08:04:50] <letfunbegin> you wouldn't have a reference? I
[08:04:56] <letfunbegin> think I should do some reading up
[08:05:18] <cybereal> some gc implementations are prone to circular references preventing collection but that's a bug, strictly speaking
[08:05:45] *** ghostknife has joined ##java
[08:06:01] <letfunbegin> yeah, reference count garbage collectors I guess
[08:06:13] <cybereal> generally
[08:07:11] <ghostknife> I want to change the way text is placed to it's baseline. I basically want text to be written below it's baseline, or center, or whatever. What is this called? I was looking through the apidoc for 2 hours last night. couldn't find something like this in any of LineMetrics/FontMetrics/Font/Graphics/etc/etc/
[08:08:11] *** amz has joined ##java
[08:09:56] *** nocture has joined ##java
[08:14:59] <svm_invictvs> hooray
[08:15:09] <svm_invictvs> latest resume...http://svminvictvs.wordpress.com/resume/
[08:17:43] *** selckin has quit IRC
[08:17:57] <r0bby_> svm_invictvs: quit pimping your resume
[08:18:05] *** selckin has joined ##java
[08:18:10] <svm_invictvs> lol r0bby_
[08:18:12] <svm_invictvs> Okay
[08:18:13] <svm_invictvs> I'm done
[08:18:24] <r0bby_> you're pimping it here on facebook and on the street corners
[08:18:32] *** musically_ut has joined ##java
[08:18:54] *** Thorn has joined ##java
[08:19:03] *** klwei has joined ##java
[08:19:03] *** meanburrito920_ has quit IRC
[08:19:13] <klwei> is the compiler flawless?
[08:19:16] <klwei> bugless?
[08:21:46] <r0bby_> klwei: not by a long shot
[08:22:05] <klwei> what really?
[08:22:16] *** Junior has quit IRC
[08:22:22] <klwei> so one not only has to worry about personal bugs but even COMPILER bugs
[08:22:25] <klwei> what a wonderful world
[08:22:41] <r0bby_> you likely won't run into them
[08:22:47] <r0bby_> but they DO exist
[08:22:49] <klwei> is it a general fact that compilers have bugs? for most languages
[08:23:09] <r0bby_> klwei: ever notice the pattern java 6u10?
[08:23:17] <klwei> no
[08:23:27] <r0bby_> yeh well those are likely bug fixes and such
[08:23:39] <klwei> ah ok
[08:24:06] <r0bby_> klwei: compilers are coded by human beings and humans make errors
[08:24:20] <r0bby_> granted that some of those are caught if you test dilligently :)
[08:24:29] <epoxy> on my freebsd box an app a was playing with works great. the same exact build on my windows box results in: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Color parameter outside of expected range: Green
[08:24:37] *** flippo has quit IRC
[08:24:39] <klwei> but they are the very foundations of a language they should get reviewed and reviewed and reviewed till theyre perfect
[08:24:44] <klwei> theyre rather small too after all
[08:24:45] <r0bby_> cheeser: throw the spring 2.5 javadocs into javabot?
[08:25:11] <epoxy> is there something about colors that different between xorg and windows or something?
[08:25:15] * epoxy is confused
[08:25:20] <r0bby_> klwei: like i said odds you run into one of these bugs is slim
[08:26:55] <klwei> ok
[08:28:50] <r0bby_> people have run into these bugs for example with groovy
[08:28:54] <r0bby_> and grails etc
[08:29:00] <r0bby_> hell I've heard about it with scala
[08:29:14] <r0bby_> so the assumptions compilers are perfect is EXTREMELY flawed
[08:30:38] <svm_invictvs> klwei: THe likelihood that you'll encounter an implementation bug is pretty small
[08:30:52] <svm_invictvs> Mainly because the implementation is very well tested.
[08:31:16] *** tom17bombadil has joined ##java
[08:31:22] <klwei> hm thanks guys. striking news
[08:31:43] <klwei> could you estimate the likelihood? like 1% or 0.001%
[08:32:51] *** Sikul has joined ##java
[08:33:18] <cybereal> klwei: the compiler or the runtime?
[08:33:26] <cybereal> it's blurred with most java vm's
[08:33:32] <cybereal> what with JIT and such
[08:33:33] *** NiallC has quit IRC
[08:34:14] <klwei> hm good question!
[08:34:18] <klwei> both in fact
[08:34:21] <klwei> another variable enters the scene
[08:37:11] <r0bby_> klwei: I'd say VERY slim
[08:37:14] *** Angel-SL has joined ##java
[08:37:56] <r0bby_> don't become pre-occupied w/ the fact that a bug may or may not exist it'll make your code be shitty
[08:38:29] *** marvi has joined ##java
[08:39:27] <klwei> ok
[08:39:38] * epoxy doesnt get how freebsd and windows coloring differs :-/
[08:39:46] *** CrypticSquared has joined ##java
[08:40:31] *** dpy has joined ##java
[08:40:39] <ghostknife> I had an odd problem last night. Is this a bug or not? Take an empty Area object. Now the following rectangles are all 10x10 sized. Add to Area rectangle positioned at (0,0). Area.isRectangular() returns true. add to Area (0,10). Area is still rectangular. Add (0,10). Area is not rectangular anymore. But now adding (10,10) makes the area rectangular again (a 20x20 square positioned at 0,0), but Area.isRectangular() returns false. I checke
[08:41:13] <ghostknife> I fixed the problem by writing my own "isRectangular()" which uses the PathIterator, but still, isn't it supposed to recalculate when adding that final rect?
[08:41:18] *** LostMonarch has joined ##java
[08:44:34] *** td123 has left ##java
[08:45:36] *** staykov has joined ##java
[08:47:43] *** mmc has joined ##java
[08:47:51] *** staykov has quit IRC
[08:47:59] *** staykov has joined ##java
[08:49:54] *** rburton has quit IRC
[08:50:20] *** bitcrave has quit IRC
[08:51:12] *** AdrienC has joined ##java
[08:51:53] <AdrienC> hi
[08:52:04] *** amitev has joined ##java
[08:52:29] *** epoxy has quit IRC
[08:55:04] *** cher has joined ##java
[08:55:53] *** deSilva has joined ##java
[08:56:49] *** Bollinger has joined ##java
[08:59:58] <svm_invictvs> klwei: I've gotten javac to barf before
[09:00:16] <svm_invictvs> klwei: I happened upon a known bug with generics in Java1.5
[09:00:21] <klwei> wow
[09:00:29] <svm_invictvs> But it was a known issue with a known workaround.
[09:00:34] <klwei> this doesn't sound like slim chance!
[09:00:55] <svm_invictvs> And the bug didnt' produce incorrect code.
[09:01:07] <svm_invictvs> It failed to compile some very convoluted and complicated generic code.
[09:01:21] <klwei> ah
[09:01:22] *** bushwakko has joined ##java
[09:01:41] <svm_invictvs> The other thing about compiler bugs you find is that they may not be bugs.
[09:02:04] <svm_invictvs> You may just happen upon a very obscure or hard to understand part of the language spec
[09:02:18] <svm_invictvs> For instance...I discovered what I thought was a "bug" in gcc's memset
[09:03:04] <svm_invictvs> I felt it was a bug, gcc didn't.
[09:03:17] *** gdoko has joined ##java
[09:03:58] <svm_invictvs> er, rather the gcc mainainers.
[09:04:33] *** skoskav has quit IRC
[09:05:43] <jerkface03> what's with java apps just abruptly closing down? netbeans just shutdown on me 2 times today without any warning
[09:06:48] <jerkface03> anyone know if this is an issue with the jre?? does it have logs up somewhere?
[09:07:57] <gjvc> jre could have segfault
[09:07:58] <gjvc> ed
[09:08:23] <svm_invictvs> jerkface03: if the jvm crashes it usually drops out a file like... hs_error.lo
[09:08:27] <svm_invictvs> g
[09:08:31] <jerkface03> where at?
[09:08:41] <svm_invictvs> hm... from where it was run...
[09:08:48] <svm_invictvs> or in the home director
[09:08:51] <svm_invictvs> *directory
[09:08:53] <svm_invictvs> I dont' know.
[09:09:17] <jerkface03> k i'll search for hs_error.log in my hd
[09:09:33] <cybereal> it's not that exactly
[09:09:38] <cybereal> try searching for hs_*
[09:09:44] <svm_invictvs> jerkface03: on my linux box...I have a few hs_err_pidXXXXX.log
[09:10:09] *** n3llyb0y has joined ##java
[09:12:44] *** orgy` has joined ##java
[09:12:44] *** bigip has joined ##java
[09:13:01] <jerkface03> there we go
[09:13:10] <jerkface03> i got several of these bad boys in the netbeans directory
[09:13:16] <svm_invictvs> I ain't no goddamn son of a bitch.
[09:13:21] <svm_invictvs> yeah
[09:14:30] <jerkface03> what's the next step? should i submit this to sun somewhere?
[09:14:54] *** skoskav has joined ##java
[09:14:54] <svm_invictvs> search to see that it's not been submitted
[09:16:17] <jerkface03> ah fuck it
[09:16:30] <jerkface03> if it crashes this often i'm sure a flurry of people have submitted the bug already
[09:17:44] <svm_invictvs> *shrug*
[09:17:45] *** staykov has quit IRC
[09:18:46] <Bridge|> Whoop-D-Whoop
[09:18:46] *** BigAllan has joined ##java
[09:18:55] * Bridge| project is Solved
[09:18:57] <Bridge|> ;)
[09:19:06] <jerkface03> \o/
[09:19:41] *** neshaug has joined ##java
[09:20:23] <svm_invictvs> the VM shouldn't ever crash
[09:20:43] <jerkface03> yes well
[09:20:46] <jerkface03> here we are
[09:20:59] <svm_invictvs> Unlesss it's linking a library
[09:21:13] <svm_invictvs> then crashes cant' be attributed to just a VM bug
[09:23:34] <svm_invictvs> When I say, "The VM shoudln't crash" I mean, that under normal circumstances...
[09:23:42] * svm_invictvs is oh snap.
[09:23:52] *** bushwakko has quit IRC
[09:24:17] *** pattwo has left ##java
[09:25:44] *** Bevin has joined ##java
[09:29:29] *** Orphis has joined ##java
[09:30:04] <svm_invictvs> hm
[09:31:43] *** mfonda has joined ##java
[09:32:33] <mfonda> I have an ArrayList of int[2] and I am trying to check if it contains a given int[2]. How can I do this?
[09:32:45] *** ldam has quit IRC
[09:34:06] *** victori has joined ##java
[09:34:29] <victori> might be a stupid question but why bother with log4j/sf4j/commons when there is a logging package in the jdk?
[09:34:33] <victori> for jdk1.4 compat?
[09:37:12] *** staykov has joined ##java
[09:37:15] *** bas-i has joined ##java
[09:37:20] *** shervin_a has joined ##java
[09:37:28] *** rainmann has joined ##java
[09:37:47] *** amz has quit IRC
[09:39:28] *** ldam has joined ##java
[09:40:23] *** siri0n has joined ##java
[09:40:30] *** gdoko has quit IRC
[09:42:25] *** vpit3833 has joined ##java
[09:48:34] *** siri0n has quit IRC
[09:48:50] *** systat has joined ##java
[09:53:59] *** marqueed has joined ##java
[09:54:02] *** Bevin has quit IRC
[09:54:28] <marqueed> hi - is there any facility in java for conditional imports? i can't seem to find one, i want to import the amazon aws/ecs api if its available, but if not i'd like to fallback gracefully
[09:55:01] *** valcker has joined ##java
[09:55:35] *** KikiJiki has joined ##java
[09:57:22] *** ridoo has quit IRC
[09:58:07] *** teralaser has joined ##java
[10:00:46] *** mfonda has quit IRC
[10:00:47] <marvi> marqueed: Java doesn't load any classes with the import statement.
[10:01:02] <marvi> import is just a namespace thing.
[10:01:17] <marqueed> could you say how i could accomplish what i'm getting at?
[10:01:45] *** deepjoy has joined ##java
[10:01:51] <marvi> What you can do is to use Class.forName and check for Exceptions.
[10:02:53] *** snodnipper has quit IRC
[10:02:53] *** mirari has quit IRC
[10:02:53] *** yahooooo has quit IRC
[10:02:53] *** HeatHawk[AP2] has quit IRC
[10:02:53] *** slap_stick has quit IRC
[10:02:54] *** nekrozion has quit IRC
[10:02:54] *** Wagoo has quit IRC
[10:02:54] *** elliottcable has quit IRC
[10:03:06] *** HeatHawk[AP2] has joined ##java
[10:03:07] *** elliottcable has joined ##Java
[10:03:20] *** Wagoo has joined ##java
[10:03:32] *** CrypticSquared has quit IRC
[10:03:41] *** yahooooo has joined ##java
[10:03:59] *** Bevin has joined ##java
[10:04:00] *** siri0n has joined ##java
[10:04:41] *** sphenxes has joined ##java
[10:06:32] *** siri0n has quit IRC
[10:07:28] *** klwei has quit IRC
[10:07:30] *** musically_ut has quit IRC
[10:07:55] *** siri0n has joined ##java
[10:07:55] *** victori has left ##java
[10:09:21] *** flb has joined ##java
[10:11:27] *** Gracenotes is now known as Gracenotes_away
[10:12:04] *** thpar has joined ##java
[10:12:58] *** mosno has joined ##java
[10:15:48] *** KermitTheFragger has joined ##java
[10:16:03] *** antipivo has joined ##java
[10:19:15] <antipivo> hi all, i wont get cont byte open file, use method available() class FileInputStream, file there, but method available() return 0. why?
[10:19:20] *** siri0n has quit IRC
[10:20:25] <antipivo> File source = new File("./source.txt"); - open
[10:20:25] <antipivo> FileInputStream in = new FileInputStream(source);
[10:20:25] <antipivo> int cc=0; cc = in.available();
[10:20:34] <antipivo> help me please
[10:21:02] <Bridge|> || Paste limit is 2 lines. Use ~pastebin to list options ||
[10:21:51] *** deSilva has quit IRC
[10:22:04] <marvi> antipivo: http://java.sun.com/docs/books/tutorial/essential/io/index.html
[10:22:13] *** deepjoy has quit IRC
[10:24:05] <antipivo> marvi: thanks
[10:28:21] <svm_invictvs> ugh
[10:28:31] <svm_invictvs> I hate how it takes an hour or so to check out from SVN
[10:28:50] *** spuz has joined ##java
[10:30:08] *** juc0 has joined ##java
[10:30:10] *** agnul has joined ##java
[10:30:46] <rawblem> ~tias
[10:30:46] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[10:31:16] *** musically_ut has joined ##java
[10:31:57] *** WielkiSzu has joined ##java
[10:32:16] <mosno> well, i've recently started getting back into Java in my own time, and i'm loving it a whole lot more now, versus back at Uni when i *had* to learn it..
[10:32:38] <mosno> ps. hi chan
[10:33:55] *** WielkiSzu has quit IRC
[10:35:00] *** NiallC has joined ##java
[10:36:17] <svm_invictvs> rawblem: ?
[10:36:23] <svm_invictvs> Why the tias?
[10:36:52] <rawblem> svm_invictvs, sorry... someone in another channel needed to hear it... and the bot there didn't respond to tias
[10:37:02] <svm_invictvs> oh
[10:37:03] <rawblem> so i needed to copy it from here
[10:37:05] <svm_invictvs> lol
[10:37:06] <rawblem> cuz i'm lazy
[10:37:19] *** dnmo has joined ##java
[10:37:52] *** JoeA1 has joined ##java
[10:38:34] *** squi has quit IRC
[10:40:06] *** JoeA1 has left ##java
[10:42:06] *** saintiss has joined ##java
[10:42:16] <saintiss> hi all
[10:42:18] <saintiss> int b[] = new int[10];
[10:42:20] <saintiss> why is this an error in java 6?
[10:42:39] *** parker` has quit IRC
[10:42:42] <dangertools> which error?
[10:43:27] <saintiss> hmm
[10:43:33] <saintiss> it said "syntax error on token '10':
[10:43:48] <saintiss> but apparently it was eclipse not properly recompiling after I edited...
[10:44:03] <saintiss> so nvm
[10:44:08] *** Bevin has quit IRC
[10:44:26] *** Carnage\ has joined ##java
[10:45:40] *** cher has quit IRC
[10:46:52] *** deepjoy has joined ##java
[10:48:29] *** TryNiX has joined ##java
[10:50:34] *** Bevin has joined ##java
[10:50:44] *** pucko has joined ##java
[10:50:46] <TryNiX> Hi all. I wrote this recursive function for splitting a rectangle into 4 quarters. The only problem I have with it is that it doesnt work for rectangles who's widths or heights are not a power of 2... Any idea what's wrong? http://pastebin.com/d608d698d
[10:51:18] <pucko> Suggestion on a java profiler? preferably free :)
[10:51:27] <marvi> pucko: Netbeans
[10:52:17] <pucko> marvi: Thanks. Gonna see if I can convert my eclipseprojekt to NB
[10:52:20] *** Dyllan has joined ##java
[10:52:24] <Dyllan> hi all.
[10:52:28] *** tomvolek has quit IRC
[10:52:53] <Dyllan> Does anyone here know if there is a sun-jre release for PPC 64bit?
[10:53:01] <Dyllan> I am struggling to get java working on my PPC
[10:53:16] <pucko> Dyllan: there's none afaik.
[10:54:05] <Stephmw> Dyllan: you might be able to build it though, have a google for icedtea
[10:54:18] <Dyllan> pucko, damn.. . i wonder if the ibm-java will do the job.
[10:54:20] <pucko> Dyllan: well, actuallty the older 1.3 might have for sparcsolaris
[10:54:52] <Dyllan> Stephmw, yesi have used icedtea before on my other linux 64bit machines, although sun recently released a 64bit so i no longer need it, but the PPC is different
[10:58:13] *** mirari has joined ##java
[10:59:07] *** romanb has joined ##java
[10:59:50] *** Carnage\ has quit IRC
[11:00:25] *** sphenxes has quit IRC
[11:00:28] *** fr0ggler has joined ##java
[11:00:58] *** saintiss has quit IRC
[11:01:00] *** theseinfeld has joined ##java
[11:02:25] *** Carnage\ has joined ##java
[11:04:06] *** justafish has joined ##java
[11:06:39] <TryNiX> Can anyone please take a look at my code, and tell me why the recursive function generates an error of out of bounds only if the main rectangle size is not a power of 2 : http://pastebin.com/d608d698d
[11:07:01] *** sledgeas has joined ##java
[11:07:06] <sledgeas> hello
[11:07:20] <sledgeas> could anyone help me out with struts1 here: http://www.nabble.com/DynaValidatorForm-arrives-as-null-(that-of-passed-by-ActionForm)-in-execute-td22159345.html ? pls huge
[11:07:28] <sledgeas> project is stalled :{
[11:08:47] *** Level1 has quit IRC
[11:09:18] *** buntfalke has joined ##java
[11:10:17] *** altern has joined ##java
[11:10:55] *** sepult has joined ##java
[11:13:55] *** kungen has joined ##java
[11:16:04] *** pandora-- has quit IRC
[11:17:09] <fr0ggler> TryNiX, what API is the QuadTreeNode from?
[11:17:36] <fr0ggler> without knowing that, it's gonna be hard to see where your error is being thrown
[11:17:37] <TryNiX> fr0ggler: a quad tree I wrote
[11:17:47] <deebo> hmmm uninitialized final field can be set once and only once?
[11:18:02] <deebo> like final String test; static {test = "testing";}
[11:19:14] <Tenac> Since the Eclipse IDE still makes a .class file even if the .java has errors, can I check in java if the .class has errors before continuing?
[11:19:27] <fr0ggler> deebo, yes, the final keyword makes that object immutable
[11:20:04] <fr0ggler> Tenac, if your source has errors, then your bytecode will have errors. simple.
[11:20:26] <fr0ggler> although i really dont know how Eclipse can compile bugged source into a working class file
[11:20:32] <fr0ggler> don't you get compiler errors?
[11:20:44] *** m4rtijn has joined ##java
[11:20:45] <Tenac> Yeah, but still makes a small .class file, idk why
[11:20:48] <m4rtijn> hello
[11:21:00] <fr0ggler> TryNiX, then check your QuadTreeNode code
[11:21:12] <fr0ggler> Tenac, no idea - i don't use Eclipse sorry!
[11:21:43] *** rawblem has quit IRC
[11:21:45] <m4rtijn> if I want to cast a Object[] to a custom class Array.. do I have to cast every single item in the Object[] ?
[11:22:03] <m4rtijn> somehow (Custom[])Object[] isnt working..
[11:22:36] <ilyak_> m4rtijn: make a new array, issue Arrays.copy
[11:22:38] *** ghostknife has quit IRC
[11:23:38] <fr0ggler> i'm not sure how reliable downcasting arrays is like that
[11:23:40] <TryNiX> fr0ggler: I copied the main parts of the code, http://pastebin.com/d12d6c7df , the error is a coordinate out of bounds , generated due to line 17. I tried the code on 2 photos, it worked fine on 256x256 but generated the error on 264x256
[11:25:12] <m4rtijn> ilyak_: so I have to cast every single Object in the array
[11:25:49] <ilyak_> Well, why not?
[11:27:06] <m4rtijn> maybe theres an easier way
[11:27:08] *** LouisJB1 has quit IRC
[11:27:18] <ilyak_> Well, why not try arrays.copy?
[11:28:19] *** LouisJB1 has joined ##java
[11:28:32] <fr0ggler> TryNiX, i'm don't really know - without seeing the whole stacktrace, it's a bit difficult to diagnose
[11:29:47] <m4rtijn> Ill try that then.. thanks ilyak_
[11:30:48] *** Daniel_H has joined ##java
[11:31:25] <TryNiX> fr0ggler: pasted the stacktrace too http://pastebin.com/d10723a9a . The line number reference has an offset of 23 to that of the pasted code line numbers
[11:31:55] *** ilyak_ has quit IRC
[11:32:15] *** ilyak has joined ##java
[11:33:17] <m4rtijn> hmm, Its still not working..
[11:34:57] <TryNiX> fr0ggler: oh I was able to trace it! it still doesn't do what I want but at least that bug is gone! cheers m8
[11:35:19] <m4rtijn> I have Custom[] c1 = (Custom[])o1
[11:35:30] <m4rtijn> o1 = an Object array
[11:36:55] *** gfather has joined ##java
[11:37:45] <gfather> anyone knows if there is a streaming/transcoding api for java other than jmf or how it can be done ?
[11:38:29] *** Varox has joined ##java
[11:40:20] <fr0ggler> m4rtijn, have you tried something like Custom[] c1 = (Custom[])o1.toArray(new Custom[o1.size()]);
[11:41:47] *** Jonny_ has quit IRC
[11:43:02] *** Techdeck has joined ##java
[11:44:12] *** Bevin has quit IRC
[11:46:58] *** skoskav has quit IRC
[11:51:29] *** ChanServ has quit IRC
[11:53:10] *** ChanServ has joined ##java
[11:53:10] *** irc.freenode.net sets mode: +o ChanServ
[11:53:17] *** DragonLord- has joined ##java
[11:53:59] <m4rtijn> hmm, could I pass a class type to a method which it then uses to cast ?
[11:55:41] <cybereal> m4rtijn: what would be the point of that?
[11:56:25] <m4rtijn> so I dont have to use o1.toArray which fr0ggler suggested
[11:57:55] <cybereal> what has that got to do with casting?
[11:58:38] <cybereal> m4rtijn: his suggestion wasn't even valid
[11:58:46] <cybereal> there's no .toArray method on arrays
[11:58:48] <m4rtijn> hmm, guess im just thinking wrong
[11:58:51] *** TryNiX has quit IRC
[11:59:08] <m4rtijn> I have made my own ObjectArray class
[11:59:17] <cybereal> why?
[11:59:23] <cybereal> why don't you just use ArrayList ?
[12:00:26] <m4rtijn> hmm.. because im not sure about its performance..
[12:00:45] <m4rtijn> I know how fast my class is.. and I could optimize it whenever I want
[12:00:59] <cybereal> that's fucking retarded
[12:01:07] <m4rtijn> probably
[12:01:13] <Daniel_G> tbh, ArrayList is going to perform better than any custom ObjectArray class you write yourself...
[12:01:28] <cybereal> you realize the source is available right? if you really actually think you could possibly be making something that performs better... I seriously doubt you did though.
[12:01:48] <m4rtijn> hmm
[12:01:52] <cybereal> you could easily find out, or you could just quit micro-optimizing and get on with your day
[12:01:54] *** ChanServ has quit IRC
[12:02:25] <cybereal> you have probably already wasted more time thinking about this than the difference of time between your version and arraylist would've saved, over 10 years of running your app :)
[12:02:47] <m4rtijn> hmm.. guess you're right
[12:02:48] <Techdeck> is there a way to make new URL(), follow redirects?
[12:02:59] <cybereal> and besides, if you use the List interface like you're supposed to, you can swap out the ArrayList with some other impl later if it proves slow
[12:03:01] <Techdeck> I'm having some weird issues with URLDataSource and I think it's because of a redirect
[12:03:17] <m4rtijn> I just was tought so many custom data structures in several classes.. I was thinking I have more control if I do my own ones
[12:03:19] <cybereal> Techdeck: URL's not responsible for such things, there is nos uch thing as a redirect within the scope of a URL
[12:03:32] <m4rtijn> but you are probably right
[12:03:36] <Techdeck> how about URLDataSource?
[12:04:12] *** ChanServ has joined ##java
[12:04:12] *** irc.freenode.net sets mode: +o ChanServ
[12:04:14] <cybereal> m4rtijn: it's such an incredibly basic data structure, there isn't much you can do to make it faster, I mean... ArrayList is literally backed by an array heh
[12:04:26] <cybereal> you can even set the initial size, seeing as the only potential for slowdown is growth
[12:04:34] *** sebrock has joined ##java
[12:04:38] *** sledgeas has left ##java
[12:04:51] <m4rtijn> I was thinking about sorting later on as well..
[12:05:09] <sebrock> Hello. I need some help with running two instances of the same thread in the same MIDlet, how do I separate them?
[12:05:26] *** scott_w has quit IRC
[12:05:29] <cybereal> Techdeck: i don't know but it probably follows http spec if it's an http url
[12:05:30] <m4rtijn> .. but I just have to get into the ArrayList.. its just at the university we did everything ourselves from the scratch
[12:05:43] <m4rtijn> im not used to rpre/made data structures
[12:05:58] <cybereal> m4rtijn: yes and for learning that's understandable, now in the real world you stop wasting time with such trivialities until you've proven under the scope of a profiler that there is actually a problem
[12:06:09] <m4rtijn> hehe
[12:06:11] <cybereal> there's too much other work to get done to be writing a new array every day heh
[12:06:17] <m4rtijn> thanks for slapping me on the head cybereal
[12:06:45] <cybereal> as for other needs, you should take a little tour through the classes and interfaces in the collections api
[12:07:05] <cybereal> then if you have time take a look at the commons-collections apache project which is a rather nice supplemental (free) library
[12:07:23] <cybereal> chances are whatever you need is there or easily created through composition of what is there
[12:07:48] <cybereal> oh and if you're extremely bent on "speed" you should know about javolution though it doesn't truly shine above the rest unless you're running on a special realtime vm
[12:07:53] <cybereal> ~collections
[12:07:53] <javabot> The Collections API is available at http://java.sun.com/javase/6/docs/technotes/guides/collections/index.html
[12:07:57] <cybereal> ~commons-collections
[12:07:57] <javabot> cybereal, jakarta commons collections is http://jakarta.apache.org/commons/collections
[12:08:01] <cybereal> ~javolution
[12:08:01] <javabot> cybereal, javolution is a high performance realtime java library which is released under the BSD license. See http://www.javolution.com/
[12:08:11] * cybereal wanders off to bed
[12:08:28] <Techdeck> gnight
[12:08:33] *** tom17bombadil has quit IRC
[12:08:34] <m4rtijn> thanks cybereal - and goofd night
[12:12:05] *** henry_r has joined ##java
[12:12:55] *** cybereal has quit IRC
[12:15:07] *** LouisJB1 has quit IRC
[12:15:27] *** Jonny has joined ##java
[12:18:34] *** HideousNashimoto has joined ##java
[12:20:12] <sebrock> why does this work: new Thread(midlet).start(); why does it not need an assignemnt like Thread thread1 = new Thread(...)
[12:21:45] *** tilerendering has joined ##java
[12:21:48] <tilerendering> hi
[12:22:20] *** TobiaszCudnik has joined ##java
[12:22:31] <tilerendering> how can I easily parse "back" a json object into the java object it has been "serialized" from ? I m thinking about xstream, but there is also jsonmapper with its method "tojava". what´s best from your experience ?
[12:22:32] *** TobiaszCudnik has left ##java
[12:22:58] *** TobiaszCudnik has joined ##java
[12:23:49] <marvi> tilerendering: what about http://json-lib.sourceforge.net/
[12:24:08] <tilerendering> let me check that out - what class in this library would you recommend ?
[12:24:13] *** morkar- has joined ##java
[12:24:33] *** multi_io has quit IRC
[12:24:42] <marvi> I would look at http://json-lib.sourceforge.net/usage.html
[12:24:47] <tilerendering> mhhh nice
[12:25:02] <tilerendering> i ll try if they work with json objects packed by jersey
[12:25:07] <TobiaszCudnik> hi, anybody knows Dynamator project ? http://dynamator.sourceforge.net/index.html
[12:25:28] <tilerendering> marvi, did you use it ?
[12:26:35] <marvi> tilerendering: Have looked at it We use Common Betwixt to store a graph of Javabeans, but XML is so wordy. Was looking into using json. People recommended json-lib.
[12:27:29] <tilerendering> thanks
[12:27:50] *** Razec has joined ##java
[12:27:51] <marvi> TobiaszCudnik: looks like a dead project.
[12:28:19] *** LordMetroid has joined ##Java
[12:28:20] <tilerendering> too bad actually that jersey doesnt support such a feature itself
[12:28:23] <tilerendering> would ease things a lot
[12:28:57] <LordMetroid> How good is the image loading that is incorporated in Java's standard library?
[12:29:02] <TobiaszCudnik> marvi: thats what im afraid of. but i would like to know some more. i'm interested in this templating pattern
[12:30:20] <TobiaszCudnik> so i probably would have to look up the author
[12:30:50] *** elmomalmo has joined ##java
[12:33:39] *** Nebulam has quit IRC
[12:35:43] *** systat has quit IRC
[12:36:02] *** lokedk has joined ##java
[12:40:02] *** altern has quit IRC
[12:41:41] *** bas-i has quit IRC
[12:41:49] <gfather> can i program in iphone with java ?
[12:42:11] <tilerendering> strange, I cant easily add libraries into netbeans - just doesnt work
[12:43:05] *** bas-i has joined ##java
[12:45:57] *** marqueed has quit IRC
[12:46:13] *** ries has joined ##java
[12:46:49] *** deSilva has joined ##java
[12:47:32] *** musically_ut has quit IRC
[12:47:38] *** marqueed has joined ##java
[12:48:20] *** armyriad has quit IRC
[12:48:31] *** gfather has left ##java
[12:54:37] <jottinger> morning
[12:54:53] <jottinger> tilerendering: then you're doing something fundamentally wrong somewhere
[12:55:33] <tilerendering> well I just made it - somehow - dont know perhaps i didnt have enough sleep yesterday ;)
[12:56:47] <fr0ggler> tilerendering, we use json-lib constantly. it's really nice
[12:57:10] *** asap18 has joined ##java
[12:57:28] <fr0ggler> and has the added bonus of being immediately and quickly parseable in other technologies like flex and javascript (spit)
[12:58:10] <tilerendering> froggler, hm but xstream´s capability of casting the json response to a java object right away is quite nice
[12:58:22] <tilerendering> i havent seen such a clean and simple example in json-lib
[12:58:51] <jottinger> xstream is nice
[12:59:09] <tilerendering> i will run into difficulties when trying to parse collections though, I guess.
[13:02:08] *** waz has joined ##java
[13:02:49] *** Copter has joined ##java
[13:04:18] <jottinger> nah
[13:04:54] *** mosno has quit IRC
[13:04:57] <tilerendering> hm ?
[13:06:21] *** whaley has joined ##java
[13:06:47] *** LouisJB1 has joined ##java
[13:07:14] <LouisJB1> hi, is there a channel for Java EE, JSTL and EL etc?
[13:07:28] <tilerendering> in fact what I m doing is I basically often parse entity beans/pojos into json, for use by many clients. but when accessing from a java client, I want to parse the response back into the entity bean classes
[13:08:48] <tilerendering> forget about the entity word in there - the service responses can be arbitrary beans, and they will need to be parsed back. sometimes, I will have to be able to detect collections and to parse them back conveniently.
[13:13:43] *** Dandre has joined ##java
[13:13:53] <Dandre> hello
[13:13:58] *** Bevin has joined ##java
[13:14:21] *** musically_ut has joined ##java
[13:14:21] <Dandre> How can I set the character encoding of a FileWriter?
[13:14:49] *** codethief has joined ##java
[13:18:31] *** skoskav has joined ##java
[13:19:09] <fr0ggler> tilerendering, i can process a json string into JSONObject by JSONObject.fromObject(string) if that's what you mean, but if you want to get those POJOs back into their corresponding beans, you'll have to write a parser, or use Serializable
[13:21:52] *** Varox has quit IRC
[13:22:21] *** Dandre has left ##java
[13:23:02] *** Bonix has joined ##java
[13:24:54] <tilerendering> well
[13:25:14] <tilerendering> xstream takes quite some work out of that
[13:25:15] *** kushal_12_27_200 has joined ##java
[13:29:13] <jottinger> LouisJB1: if you have a question, ask it.
[13:29:19] *** elaltaico has joined ##java
[13:29:24] *** ricky_clarkson has joined ##java
[13:29:35] <elaltaico> i'm able to make runnable jar file on netbans and my desktopallication2.jar works fine under dist directory..but if i copy paste it somewhere it does not work.
[13:29:49] <ricky_clarkson> How do you jump to implementers of an interface method in Eclipse (Java source)? (also asked in #eclipse)
[13:30:07] <fr0ggler> tilerendering, yeah i think that's a fair point
[13:30:09] <elaltaico> i need make some configurations on manifest file ?
[13:30:12] <jottinger> ~doesn't work
[13:30:12] <javabot> jottinger, 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)
[13:33:09] <LouisJB1> I have an Integer in scope which i can get from EL but I want to use jstl FormatDate on it... without conversion it throws a type conversion error because it expects a date
[13:33:30] <LouisJB1> So, anyway to convert to Date from Integer in EL / JSTL without using JSP scriptlets
[13:35:04] <tajen> ~pastebin
[13:35:04] <javabot> http://www.papernapkin.org/pastebin Paste the final url after you've pasted your stuff there.
[13:35:21] *** juc0 has quit IRC
[13:35:58] <jottinger> LouisJB1: not that I know of.
[13:36:03] <jottinger> Why not store a Date in scope?
[13:36:26] *** bitcrave has joined ##java
[13:36:34] <LouisJB1> I would, but it's using someone elses framework that's too narrow to pass me model in the method call
[13:36:40] <LouisJB1> I might change it so I can do that
[13:39:00] <elaltaico> anyone knows how to make runnable jar by netbeans except clicking Shift+11 ?
[13:39:11] <jottinger> elaltaico: what's the actual failure
[13:39:25] <jottinger> (it's kinda important to know what failed before saying 'here's how to fix it')
[13:40:42] <elaltaico> jottinger i can make executable jar by netbeans but it only works under /dist directory, when i copy paste it to somewhere else the jar does not work. it says 'could not find the main class'
[13:41:00] <jottinger> and how are you executing it
[13:41:15] <elaltaico> do you think i have to make some configurations on manifest file or i need to make jar by a differentt way ?
[13:41:19] <elaltaico> shift f11
[13:42:20] *** indeterminatus has joined ##java
[13:42:22] <jottinger> elaltaico: are you expecting shift-f11 to work when it's somewhere else?
[13:42:35] <jottinger> because that's not how most people start java apps
[13:43:02] <elaltaico> ehu
[13:43:11] <jottinger> What does "ehu" mean?
[13:43:13] <elaltaico> how i should make executable jar file ?
[13:43:17] <elaltaico> ehu = i see
[13:43:21] *** sebrock has quit IRC
[13:43:49] <jottinger> elaltaico: you probably already have one. But you start it with java -jar foo.jar (assuming your manifest is set correctly) or java -cp foo.jar my.main.class.here
[13:44:31] *** bitcrave has quit IRC
[13:44:33] <elaltaico> yes i have one jar file which is under /dist....but it does not work on desktop or somewhere else except under /dist directory
[13:44:42] <elaltaico> let me check my manifest
[13:45:23] *** ricky_clarkson has left ##java
[13:47:00] <elaltaico> jottinger my manifest file is blank
[13:47:14] <elaltaico> it only writes 'X-COMMENT: Main-Class will be added automatically by build'
[13:47:36] <jottinger> what is the manifest file in the actual built jar file?
[13:47:38] *** TooAngel has joined ##java
[13:47:57] <elaltaico> you meant what does it have or what it writes inside manifest file ?
[13:48:09] *** TooAngel has left ##java
[13:48:16] <elaltaico> there is no manifest file under /dist directory
[13:48:38] <jottinger> look in the jar file
[13:48:51] <elaltaico> or under the jar directory...there is only a manifest file inside the project directory which was also there before i had created the jar file
[13:49:06] <jottinger> so the jar file has no manifest?
[13:49:08] <elaltaico> there is no manifest in the /dist or in the directory where jar is created
[13:49:12] <elaltaico> yes jottinger
[13:49:14] <elaltaico> that's correct
[13:49:34] <jottinger> then netbeans is horribly broken, since every jar file has a manifest in it
[13:49:46] *** Sonderblade has joined ##java
[13:49:51] <jottinger> (i.e., i bet you're wrong. jar tvf yourjar.jar, look at the file entries.)
[13:49:55] *** eoh676 has joined ##java
[13:50:10] <elaltaico> jottinger there is a jar file in the project folder I meant in the DesktopApplication 2 project
[13:50:18] <elaltaico> but it has only two lines in it
[13:50:35] <jottinger> elaltaico: okay, back up.
[13:50:38] <elaltaico> but in the desktopapplication2/dist directory there is no manifest file...
[13:50:50] <jottinger> The manifest for a jar file is IN THE JAR FILE.
[13:50:52] <elaltaico> there is only one manifest file under dekstopapplication2/dist
[13:50:54] <jottinger> It's not external at all.
[13:50:57] <elaltaico> ok
[13:51:09] <jottinger> You need to open up the jar file and LOOK AT THE MANIFEST FILE it has.
[13:53:04] *** frego has joined ##java
[13:53:22] <elaltaico> i hope i understood what you meant.i opened the jar file by notepad and it says 'META-INF/MANIFEST.MFManifest-Version: 1.0'... and there are lots of sentences in it...
[13:53:40] <elaltaico> also it writes 'Main-Class: fd.DesktopApplication2'
[13:54:09] *** le_biloute has left ##java
[13:54:10] <elaltaico> there is no single jar file under the /dist directory or the directory where my jar file resides...
[13:54:17] <reverend> elaltaico: use the 'jar' utility to 'open' it
[13:54:18] <elaltaico> sorry single manifest file..sorry
[13:54:21] <jottinger> where... does... your... jar... file... reside
[13:54:22] <elaltaico> yes i used
[13:54:27] <elaltaico> and it opens correctly
[13:54:31] <jottinger> what did jar tvf yourjar.jar show?
[13:54:36] <jottinger> can you pastebin that?
[13:54:54] <elaltaico> my jar file resides at desktopapplication2/dist/desktopapplication2.jar
[13:55:04] <elaltaico> and there is no manifest file under dist directory
[13:55:23] <jottinger> so go to desktopapplication2/dist
[13:55:24] *** henry_r has quit IRC
[13:55:27] <paulweb515> elaltaico: uh, it would be *in* the jar itself
[13:55:30] <jottinger> jar tvf desktopapplication2.jar
[13:55:31] <elaltaico> my yourjar.jar show my program when i double click it..i meant it shows my gui application
[13:55:37] <jottinger> paulweb515: I've been telling him that
[13:55:44] <paulweb515> jottinger: I've seen :-)
[13:55:51] <elaltaico> in the jar ?
[13:55:54] <elaltaico> in the file ?
[13:55:55] <jottinger> IN THE JAR, yes
[13:56:00] <jottinger> it's not external
[13:56:10] <jottinger> jar tvf desktopapplication2.jar will show a manifest entry
[13:56:18] <mirari> elaltaico: The jar file is like a zip-file. If that helps your understanding.
[13:56:27] <jottinger> mirari: I doubt it will
[13:56:49] <elaltaico> i should click once and i should open itby notepad to see what it writes..because when i double click it,my program runs
[13:56:57] *** TooAngel has joined ##java
[13:56:59] * jottinger weeps
[13:57:26] <jottinger> I'm not in the mood to be me yet this morning
[13:57:27] *** bas-i has quit IRC
[13:57:28] *** TooAngel has left ##java
[13:57:28] <jottinger> ~be jottinger
[13:57:29] <javabot> I hate you.
[13:57:39] <jottinger> javabot, thank you, you're doing a fine impersonation
[13:57:39] <javabot> jottinger, I have no idea what , thank you, you're doing a fine impersonation is.
[13:57:50] <elaltaico> is this what you meant 'META-INF/MANIFEST.MFManifest-Version: 1.0'
[13:58:00] <elaltaico> Ant-Version: Apache Ant 1.7.1
[13:58:00] <elaltaico> Created-By: 1.6.0-b105 (Sun Microsystems Inc.)
[13:58:26] <eoh676> Hi, I'm the author of the Java Simple Plugin Framework (http://code.google.com/p/jspf/). I just wanted to announce there is a new version available and I would like to hear your feedback. If you're developing small to medium sized projects and have some minutes, please have a look at it and tell me what you think. Thank you!
[13:58:48] <mirari> elaltaico: Please read http://en.wikipedia.org/wiki/JAR_(file_format) and ask when you have done so. You need to grasp the basic concepts.
[13:58:51] <jottinger> eoh676: how is it different from OSGi? Why wouldn't you announce it on TSS or DZone or sites like that?
[13:58:53] *** staykov has quit IRC
[13:59:05] *** exussum has joined ##java
[13:59:14] <eoh676> jottinger: it's meant to be "5 minutes and you're good to go"
[13:59:25] *** m4rtijn has quit IRC
[13:59:51] *** m4rtijn has joined ##java
[13:59:57] <jottinger> why is it only at version 0.3?
[14:00:02] <eoh676> i don't know about TSS, but thought IRC would be the best place to get started with some feedback
[14:00:06] <jottinger> or, if you like, 0.3.1?
[14:00:10] *** geaaru has quit IRC
[14:00:19] <jottinger> If it's significant, TSS would have given you a lot more exposure than IRC would
[14:00:21] <eoh676> jottinger: uhm, tehre is no real reason
[14:00:23] <exussum> hi, Is it possible to call jLabel1 and jLabel2 by using jLabel + i ?
[14:00:43] <jottinger> eoh676: note that 0.3.1 looks a lot more like "avoid this project" than "1.3.1" does
[14:00:49] <jottinger> exussum: call
[14:00:50] <jottinger> ?
[14:01:40] <eoh676> jottinger: well, i don't *recommend* it's usage yet, I just say, it worked for me during the last three projects very well, so it might work for you too
[14:01:43] <elaltaico> he hey
[14:01:43] <jottinger> exussum: note that jLabel1 and jLabel2 are compiler-references and not, like, actual names
[14:01:47] <elaltaico> i found it
[14:01:52] <eoh676> btw, what's TSS?
[14:01:55] <elaltaico> jottinger i found the manifest file it writes
[14:02:03] <elaltaico> Created-By: 1.6.0-b105 (Sun Microsystems Inc.)
[14:02:03] <elaltaico> Main-Class: fd.DesktopApplication2
[14:02:08] <elaltaico> there are lots of sentences inside the manifest
[14:02:15] <jottinger> elaltaico: wow
[14:02:18] <elaltaico> :P
[14:02:19] *** riotz has joined ##java
[14:02:22] <elaltaico> 14 lines
[14:02:30] <elaltaico> so what is the next step ?
[14:02:39] <exussum> jottinger: Yes, but if i want to set all Label values to "test value" could i just loop though it ?
[14:02:44] <jottinger> well, the next step is to figure out why it's dying, if it's dying
[14:03:01] <jottinger> exussum: no. you can't infer valid variable names.
[14:03:02] <eoh676> (ah, tss: the server side, i see)
[14:03:03] <mirari> exussum: No, they are names. You need a data structure for that, like a list or an array
[14:03:24] <jottinger> eoh676: oh, sorry, was distracted by elaltaico
[14:03:32] <jottinger> ~tss
[14:03:32] <javabot> jottinger, tss is TheServerSide.com (AKA serverside.com, but that hostname is wrong!). Every day is April Fools' Day on TSS, except April 1. Go figure. It's all about teh flameage. The people who run the site are arrogant asshats, but you don't know them. (One of them is usually in channel.)
[14:03:47] <jottinger> Golly, that factoid is wrong
[14:04:04] <elaltaico> the reason : could not find the main class:fd.DesktopAppliation2.Program will exit
[14:04:08] *** bitshuffler has joined ##java
[14:05:13] *** coboldead has quit IRC
[14:05:14] <jottinger> ~no, TSS is TheServerSide.com (AKA serverside.com, but that hostname is wrong.) Every day is April Fools' Day on TSS, except April 1. Go figure. It's all about teh flameage. ##java tends to have people who've worked for TSS in channel, and yes, they know it's gone downhill.
[14:05:14] <javabot> I forgot about tss, jottinger.
[14:05:15] <javabot> OK, jottinger.
[14:05:32] <jottinger> elaltaico: then look and make sure the jar file has the class.
[14:05:50] <eoh676> i'm not quite sure if tss would be the right place for it, the framework is definitely not enterprise. it's rather "we're three people and we need to get things done instead of writing XML files"
[14:06:20] <jottinger> eoh676: *shrug* TSS mentions OSGi too
[14:06:28] <jottinger> who knows what the real definition of "enterprisey" is
[14:08:48] <exussum> jottinger mirari Thanks
[14:09:01] <eoh676> anyway, it's just an offer. if you're fine with osgi, please use that, but I always felt that every other plugin framework was bloated. for jspf it's possible to create working plugins, starting from zero, in less than 5 minutes
[14:09:54] *** ankylose has joined ##java
[14:10:12] <jottinger> eoh676: I'm not partial to any of them
[14:10:16] *** ishi has joined ##java
[14:10:22] <ishi> hello
[14:10:29] *** war10ck has joined ##java
[14:11:31] *** lem has joined ##java
[14:12:05] *** theseinfeld has quit IRC
[14:12:55] <ankylose> hi here
[14:14:51] <waz> jottinger: what about distributed OSGI? Like it?
[14:14:52] *** exussum has quit IRC
[14:15:18] *** ridoo has joined ##java
[14:16:00] *** AMcBain has joined ##java
[14:18:34] *** arpu has quit IRC
[14:19:11] *** exussum has joined ##java
[14:19:39] <jottinger> waz: it has tons and tons of potential
[14:19:49] <jottinger> but I bet that the OSGi consortium will screw IT up too
[14:21:25] <waz> heh
[14:22:12] *** kushal_12_27_200 has quit IRC
[14:26:52] *** NiallC has quit IRC
[14:27:13] <ishi> how do you go about switching between test/production configurations?
[14:27:16] <bobbytek2> When does it make sense to use a StringReader as an argument to a StreamSource?
[14:27:55] <jottinger> bobbytek2: uppose you're building an XML DOM in memory
[14:28:10] *** sphenxes has joined ##java
[14:28:11] *** exussum has quit IRC
[14:28:31] <bobbytek2> assuming I have the full string in memory, it doesn't make a difference right?
[14:28:58] *** magentar has joined ##java
[14:29:10] *** exussum has joined ##java
[14:29:23] <jottinger> well, your XML has to read from SOMETHING
[14:29:26] <jottinger> that something is a stream
[14:29:31] <bobbytek2> http://www.pastie.org/398495
[14:29:40] <bobbytek2> I'm building a xsl-fo dsl in groovy
[14:29:54] <bobbytek2> the result of the first phase is a string
[14:30:09] <bobbytek2> I feed that into FOP using a StreamSource / StringReader
[14:30:32] <bobbytek2> My guess is that the string reader is superflous
[14:30:43] <bobbytek2> *superfluous
[14:30:57] <jottinger> trying... desperately... to... care... overmuch....
[14:31:19] <bobbytek2> hehe
[14:31:23] <bobbytek2> nvm :)
[14:31:40] <jottinger> it's not that it's not cool or whatever
[14:32:01] *** djp[mbp] has joined ##java
[14:32:14] *** eoh676 has left ##java
[14:33:19] *** andfr672 has joined ##java
[14:33:43] *** popcornPanic has joined ##java
[14:33:45] <bobbytek2> I was hoping to use groovy to make reporting suck less, either with itext or fop. Using itext alone is somewhat painful, and trying to use fop with pojos is also painful
[14:33:58] <andfr672> is there any way to put functions into a list or hash and call them that way?
[14:34:13] <jottinger> waz: OSGi consortium is a classic example of the "how to take a killer tech and drown it" club, also inhabited by Java EE as a lesser member
[14:34:14] <magentar> are any of the 3d effects of javafx really hardware accelerated or are they being rendered in software mode (possible accelerated by the backing swing pipeline of course). As For example in the video cube demo.
[14:34:14] *** exussum has quit IRC
[14:34:15] <andfr672> like "call functions[1]"?
[14:34:18] <jottinger> andfr672: interfaces.
[14:34:30] <bobbytek2> andfr672: command pattern
[14:34:38] <andfr672> ok
[14:34:41] <andfr672> thx
[14:34:52] <jottinger> map<string, command> myMap; myMap.get("foo").executeCommand(args);
[14:35:04] <bobbytek2> or use groovy :)
[14:35:08] * bobbytek2 ducks
[14:35:15] <jottinger> ... or any scripting language, sure
[14:38:35] *** Thorn has quit IRC
[14:40:02] *** Bleadof has quit IRC
[14:40:13] *** exussum has joined ##java
[14:43:22] *** bitcrave has joined ##java
[14:46:23] *** TryNiX has joined ##java
[14:47:23] <TryNiX> How can I save a BufferedImage into a gif file?
[14:49:49] *** nocture has quit IRC
[14:51:35] *** Junior has joined ##java
[14:54:24] <antipivo> help please read and print each symbol txt file, I use code http://pastebin.com/m6a4e2cc7
[14:55:52] *** antipivo has quit IRC
[14:56:08] *** blahjake has joined ##java
[14:57:15] *** Varox has joined ##java
[14:57:31] *** antipivo has joined ##java
[14:58:14] *** arpu has joined ##java
[15:00:43] *** freeone3000 has quit IRC
[15:00:45] *** riotz has quit IRC
[15:01:28] *** imgrey has joined ##java
[15:01:32] *** imgrey has left ##java
[15:01:51] *** eidolon has joined ##java
[15:02:42] <fr0ggler> antipivo, without any knowledge of an error, we can't help you - but for a start, use FileReader is you want to read characters. FileInputStream is for binary files
[15:03:33] <fr0ggler> TryNiX, google perhaps? http://www.rgagnon.com/javadetails/java-0266.html
[15:06:34] *** justafish has quit IRC
[15:07:36] *** delskorch has quit IRC
[15:08:13] *** charzero has joined ##java
[15:09:19] *** bitcrave has quit IRC
[15:10:11] <Techdeck> hey fellas, I have to time how much a certain method takes to run, whats the best way to do it? new Date() before and after?
[15:10:36] <fr0ggler> currentTimeMillis
[15:10:53] *** dracony has joined ##java
[15:11:11] *** ttmrichter_ has joined ##java
[15:11:26] *** rollins has joined ##java
[15:11:30] <dracony> hi, i have a problem. i am trying to use a marshaller in my servlet to marshal a class i named Response.
[15:11:46] <Techdeck> thanks fr0ggler
[15:11:50] <dracony> JAXBContext responseContext = JAXBContext.newInstance(Response.class);
[15:11:52] <antipivo> fr0ggler: I get instead symbol numbers (
[15:11:58] <dracony> this throws a very strange exception
[15:12:07] <dracony> [Ljava.lang.StackTraceElement;@10c9860class org.apache.coyote.tomcat5.CoyoteRequestFacade nor any of its super class is known to this context.
[15:12:19] <dracony> WTF? i dont even use tomcat i use SJAS
[15:13:04] <dracony> how do i fix this?
[15:13:12] *** Nebulam has joined ##java
[15:13:32] <cheeser> dracony: SJAS includes a forked version of tomcat.
[15:13:41] <jottinger> Techdeck: how long do you expect the method to take?
[15:13:46] <cheeser> the class and package names were retained for compatibility/migration ease
[15:14:04] <Techdeck> jottinger, a few seconds
[15:14:18] <dracony> ok, so anyway how is tomcat ifluencing my JAXBCOntext?
[15:14:57] *** rollins has quit IRC
[15:15:56] *** indeterminatus has quit IRC
[15:16:19] <dracony> i tried to replace Response.class with some other
[15:16:24] *** vyoman has joined ##java
[15:16:50] <Techdeck> jottinger, why do you ask?
[15:18:05] *** jdolan_ has joined ##java
[15:18:19] <cheeser> ~javadoc -list
[15:18:19] <javabot> cheeser, I know of the following APIs: JDK ( http://java.sun.com/javase/6/docs/api/ ) ; JEE ( http://java.sun.com/javaee/5/docs/api/ ) ; Spring ( http://static.springframework.org/spring/docs/2.5.x/api/ ) ; Wicket ( http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/ )
[15:18:25] * cheeser eyes r0bby_
[15:18:57] *** rollins has joined ##java
[15:20:04] *** deadbeef has joined ##java
[15:20:20] *** ttmrichter has quit IRC
[15:20:48] <deadbeef> hi there, i've a problem: i've to write a web service that gives the data it receives to a persistent application
[15:20:53] <deadbeef> how would you do it?
[15:21:08] <deadbeef> i was thinking of using OpenEJB and try to write a persistent java bean
[15:21:21] <deadbeef> what do you think?
[15:21:25] <deadbeef> i'm very new to J2EE
[15:24:15] <jottinger> what is the system of record for the data?
[15:24:21] <jottinger> Are you going to interact with the data at all?
[15:24:41] <jottinger> read/write/update/delete? How many requests do you need to handle?
[15:24:58] <jottinger> Techdeck: there's also a nanotime call. But if it's seconds... use milliseconds :)
[15:25:26] *** djp[mbp] has quit IRC
[15:28:56] *** HeatHawk[AP2] has quit IRC
[15:29:19] <deadbeef> jottinger: i pass Instance objects
[15:29:26] <deadbeef> (to the webservice)
[15:29:33] <jottinger> That makes no difference.
[15:29:38] <jottinger> CRUD app? How much throughput?
[15:29:40] <deadbeef> i don't know how Instance is organized (it's a closed-source app)
[15:29:44] <deadbeef> no idea
[15:29:47] <deadbeef> proprietary
[15:29:59] <jottinger> okay, I'm lost
[15:30:04] <deadbeef> me too lol
[15:30:35] <jottinger> deadbeef: are you writing the service?
[15:30:51] <deadbeef> yep, but not the persistent application
[15:31:11] <jottinger> so why does it matter to you?
[15:32:24] *** HeatHawk[AP2] has joined ##java
[15:33:21] *** deepjoy has quit IRC
[15:33:48] *** waz has quit IRC
[15:34:33] *** Frostix has joined ##java
[15:34:52] *** examancer has quit IRC
[15:35:19] *** Gunirus has joined ##java
[15:39:39] *** sepult has quit IRC
[15:39:53] *** jEvil has joined ##java
[15:42:39] *** mohax has joined ##java
[15:42:45] *** sebrock has joined ##java
[15:43:20] *** sebrock has quit IRC
[15:43:22] *** grobot has joined ##java
[15:43:22] *** sebrock has joined ##java
[15:43:49] <sebrock> Can anyone tell me how to create a method with one or zero arguments
[15:44:11] <sebrock> ie wait() or wait(1000)
[15:44:18] <reisi> is there any way to localize the parameter given to the message (that is resolved from resourcebundles)? ie, spring sets parameter 1 on type mismatches (failed string to int conversion) as the field that the conversion failed in, and the field name is english of course
[15:44:22] <jottinger> sebrock: void foo() { foo(1000); } void foo(int n) {}
[15:44:27] <sebrock> wait() will wait for infinity and wait(1000) in 1000ms
[15:44:36] <jottinger> sebrock: Java has no default argument mechanism
[15:45:01] <sebrock> to its possble to define two methods with the same name?
[15:45:04] <bobbytek> java is sad because baby jesus cried
[15:45:13] <reisi> sebrock: if they have have different arguments, yes
[15:45:28] <sebrock> ok, so that is the standard way to do this?
[15:45:43] <sebrock> its not possibel to merge it into one method
[15:45:53] <reisi> sebrock: note that type erasure doesn't allow you to do foo(Collection<Baz>) and foo(Collection<String>) as their erasure types are the same foo(Collection)
[15:46:13] <reisi> sebrock: you just do it how jottinger describe above?
[15:46:24] <sebrock> yes I'll to that
[15:46:28] <sebrock> thank you
[15:46:40] <reisi> np
[15:47:48] <reisi> ~ resource
[15:47:49] <javabot> reisi, I have no idea what resource is.
[15:48:11] <fr0ggler> sebrock, yes you can "merge" it into one method by checking for null input parameters, but the wya jottinger described is best practice
[15:48:16] *** exussum has quit IRC
[15:48:17] <fr0ggler> way*
[15:48:20] *** bitcrave has joined ##java
[15:49:07] <sebrock> ok thanks again, works fine now
[15:52:05] <neshaug> is there a java equivalent to pythons gettext (storing different app languages) api?
[15:52:17] <jottinger> neshaug: in jython there is :)
[15:52:20] <andfr672> jottinger: I've found some info, but nothing about how to pass the args? any tip?
[15:52:21] <jottinger> what does gettext do again?
[15:52:33] <jottinger> andfr672: pass the args from where to where?
[15:52:39] * jottinger is suffering from lack of context
[15:52:42] <reisi> isn't it the same as messages/resourcebundles?
[15:52:46] <neshaug> jottinger: haha, heard jython isn't good for CGI
[15:52:57] <jottinger> neshaug: nothing is good for CGI
[15:53:02] <jottinger> but jython's faster than python :)
[15:53:14] <jottinger> and glassfish can run jython apps
[15:53:30] <andfr672> <jottinger> map<string, command> myMap; myMap.get("foo").executeCommand(args); to get the args to command
[15:53:33] <neshaug> well, okay, heard it was slow to use java API with jython
[15:53:50] <jottinger> andfr672: ah. well, they're just method arguments....
[15:53:55] <andfr672> jottinger: oh never mind
[15:54:02] <blahjake> you're saying jython is faster than cpython?
[15:54:18] <neshaug> how is it the other way around by the way? using python stuff from java?
[15:54:20] <jottinger> blahjake: yes
[15:54:24] <grobot> is there an elegant way to get items from a jtable into a string array?
[15:54:30] <jottinger> neshaug: JSR-223. It's a pain, but it works.
[15:54:36] *** Dracofodder has joined ##java
[15:54:54] <blahjake> that does not reflect my experience with running the same scripts under both
[15:55:11] <blahjake> are there serious benchmarks out there?
[15:55:28] <jottinger> blahjake: *shrug* That's fair. Mine is anecdotal, with a bayesian analysis.
[15:55:37] <grobot> im stepping through the jtable a row at a time and writing the data, regardless if there is data in there are not, i need to filter out the empty fields
[15:56:22] <reisi> grobot: try #swing ... sure sounds like a problem where there could be very easy to use simple solution...
[15:56:22] *** acuster has joined ##java
[15:56:27] *** dnmo has quit IRC
[15:56:31] <grobot> k thanks
[15:56:53] *** antipivo has left ##java
[15:58:00] <neshaug> jottinger: is it alot of pain to get tomcat / resin to run them?
[15:58:51] *** kadams has joined ##java
[15:59:23] *** Greeny_ has quit IRC
[15:59:37] *** Greeny_ has joined ##java
[16:01:07] *** mbroeker has joined ##java
[16:02:34] *** neshaug has quit IRC
[16:04:31] *** Vantaa has joined ##java
[16:08:25] *** frego has quit IRC
[16:09:30] *** phix has quit IRC
[16:09:41] *** phix has joined ##java
[16:10:19] *** Angel-SL has quit IRC
[16:11:17] *** HideousNashimoto has quit IRC
[16:11:44] *** systat has joined ##java
[16:11:57] *** TryNiX has quit IRC
[16:12:26] *** bobbytek2 has quit IRC
[16:13:27] *** {aaron} has joined ##java
[16:14:05] *** Hink has joined ##java
[16:15:38] *** rullie has joined ##java
[16:15:54] *** mohax has quit IRC
[16:17:16] *** rdancer has joined ##java
[16:17:56] <rdancer> is there a way to read directly from the System.in, apart from using new Scanner(System.in)
[16:18:08] *** ttmrichter__ has joined ##java
[16:18:31] <cheeser> rdancer: yes, there is.
[16:19:57] *** phenom9600 has quit IRC
[16:21:32] *** Sonderblade has quit IRC
[16:21:32] <{aaron}> hey guys, before I do something atrocious, anybody have any pointers on try to invoke code on one side fo a classloader wall when you have no interfaces/classes on the caller side? I think I'm SOL and am either left to reflection, or making sure there is a generic interface/impl i can call through
[16:21:41] *** userek has joined ##java
[16:23:12] <dos000> how would you move items from a list of active objects to deactive objects while avoiding to visit the whole active list ?
[16:23:57] *** dracony has quit IRC
[16:25:35] <cheeser> dos000: uh. what?
[16:25:36] *** ttmrichter_ has quit IRC
[16:25:55] <cheeser> {aaron}: sounds about right
[16:26:15] <dos000> i need to move items from a linked list of active objects that may or not need to be removed from the list
[16:26:44] <dos000> cheeser: i dont want the bacground removal process to hug the active list down by holding a lock
[16:27:20] <joed> Premature optimization?
[16:27:27] <cheeser> sounds like it.
[16:27:27] <dos000> maybe !
[16:28:17] *** monkeycid has joined ##java
[16:28:24] <dos000> i have 20~100 threads putting stuf in that active list
[16:28:55] <dos000> actually putting and removing stuff when they become obsolete ...
[16:29:39] <dos000> the prob is there maybe items in the list that can only be removed after a certain time .. they become obsolete based on time
[16:29:45] *** Woot4Moo has joined ##java
[16:31:20] <dos000> i need to visit the whole list at least once every 60 seconds.
[16:31:30] *** thpar has quit IRC
[16:34:11] *** wooli has joined ##java
[16:34:37] <wooli> any idea how to concatenate two org.w3c.dom.NodeList's?
[16:35:06] *** {aaron} has quit IRC
[16:35:06] <Woot4Moo> same way you concat any other 2 lists?
[16:35:17] <Woot4Moo> assuming that its a list
[16:36:16] <dos000> second question ... how do you make a cyclic list one that starts from the beginning when it reaches the end ?
[16:36:20] <Woot4Moo> use addAll(collection)
[16:36:37] <Woot4Moo> @wooli
[16:37:03] <dos000> assumming other processes can add stuff to your list while you are iterating over it
[16:37:28] *** smtms has joined ##java
[16:37:37] *** smtms has left ##java
[16:39:17] <Woot4Moo> what are you going on about dos?
[16:39:35] <wooli> dos?
[16:40:04] <rullie> dos000: extend ArrayList
[16:40:24] <Woot4Moo> write a python script
[16:41:21] <wooli> ohh... i wasn't paying attention
[16:41:31] <dos000> man this is java !
[16:41:58] <Woot4Moo> i know dos
[16:42:05] <Woot4Moo> i was making a joke
[16:42:28] <dos000> the first quetion is the tough one for me so far ... the second one i am not paying attention
[16:43:31] <dos000> Woot4Moo: got it !
[16:43:37] <joed> Did you actually test/time anything? Or are you just working on assumptions?
[16:43:51] *** deadbeef has quit IRC
[16:43:54] *** fr0ggler has left ##java
[16:44:01] <dos000> joed: once i have theory .. next step is testing
[16:44:33] <dos000> i dont have a strategy for this even .. beside the lock and process all one
[16:44:34] <joed> Why don't you go test then.
[16:44:45] * dos000 nods
[16:44:50] <Woot4Moo> TDD ftw
[16:44:55] <Stephmw> ~tias
[16:44:55] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[16:45:02] * Stephmw winks
[16:45:19] <rullie> Woot4Moo: i think joed meant tias, not tdd
[16:45:27] <joed> Woot4Moo: Less so fapping for TDD than stop fapping here.
[16:45:38] <dos000> agreed. the question was more about strategy .. i could not come up with an laternative
[16:46:29] <Woot4Moo> english joed :)
[16:46:31] <joed> dos000: I think you'll find out you can work with a substantial amount of objects in lists without very many problems.
[16:46:34] *** xoLax_wrk has joined ##java
[16:46:50] <dos000> joed: in the order of ?
[16:47:13] *** regnskog has joined ##java
[16:47:31] <xoLax_wrk> should'n SHA1withRSA create a signature identical to one created when signing a SHA-1 hash with openssl RSA_SIGN in c?
[16:47:39] <xoLax_wrk> for me they are not equal :/
[16:48:00] *** dpy has quit IRC
[16:48:21] *** tds5016 has joined ##java
[16:48:34] <tds5016> hello all. can someone tell me how to install connector/j?
[16:48:42] *** toens has joined ##java
[16:48:49] <tds5016> I have it downloaded, but I'm not sure how to import it to the project correctly.
[16:48:57] <cheeser> ~~ tds5016 classpath
[16:48:57] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://is.gd/j4gM [sun.com] for more info.
[16:49:03] <cheeser> ~~ tds5016 newbie ide
[16:49:03] <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.
[16:49:26] <xoLax_wrk> now solve my problem cheeser :)
[16:49:58] *** toens has left ##java
[16:50:03] <tds5016> thanks cheeser.... but I'm not a complete newbie as it were... haven't dealt with installing the odbc drivers recently :-/.
[16:51:37] <joed> dos000: I have no idea what your needs are.
[16:51:53] <tds5016> cheeser how would I set the class path within eclipse?
[16:52:00] *** BlindHunter has joined ##java
[16:52:09] <cheeser> tds5016: i don't use eclipse and neither should you (yet)
[16:52:12] <tds5016> cheeser: thank you btw.
[16:52:25] <tds5016> cheese I knkow... don't use an IDE....
[16:52:41] <tds5016> but it makes importing other things so nice... I'd rather have it done that way.
[16:54:12] <rullie> oh, that i agree. i hate writing import
[16:54:16] <tds5016> so this isn't added like a regular library?
[16:54:27] <cheeser> ~~ tds5016 tias
[16:54:27] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[16:54:38] <tds5016> I'm sorry, I'm trying to understand :-/.
[16:54:43] <tds5016> cheeser: I did, and it didn't work.
[16:54:50] <tds5016> but I think I may've done so the wrong way :-/.
[16:55:09] <tds5016> I just wanted to know if I should attempt doing so a different way.
[16:55:18] <joed> dos000: Also you might want to get jcip (Java concurrency in practice)
[16:57:21] *** Techdeck has quit IRC
[16:58:24] *** ankylose has quit IRC
[16:59:05] *** Hink has quit IRC
[17:04:53] *** casmo has joined ##java
[17:08:51] *** regnskog has left ##java
[17:10:41] *** popcornPanic has quit IRC
[17:14:30] *** jabalsad has joined ##java
[17:16:35] *** UT2K3 has joined ##java
[17:17:30] *** Resistance has quit IRC
[17:18:20] *** bigip has quit IRC
[17:19:34] *** k0p has joined ##java
[17:20:12] *** shervin_a has quit IRC
[17:20:54] *** chrome_ has joined ##java
[17:21:49] *** deSilva has quit IRC
[17:22:35] <chrome_> is there any good tut. for making interfaces with java?
[17:24:27] *** ldam has quit IRC
[17:24:47] <tds5016> cheeser I added it to the class path....
[17:24:47] *** dude7064 has joined ##java
[17:24:52] *** analyser has joined ##java
[17:24:54] <tds5016> Class.forName("com.mysql.jdbc.Driver").newInstance();
[17:25:06] <tds5016> that still doesn't add it cheeser.
[17:25:52] <cheeser> tds5016: you set the classpath using -cp when you called javac *and* when you called java?
[17:25:52] <analyser> Hi guys, anyone know how can I get the key from a HashMap?
[17:26:02] <cheeser> ~~ analyser javadoc HashMap
[17:26:05] <javabot> analyser: http://is.gd/kGoc [java.util.HashMap]
[17:26:13] *** riotz has joined ##java
[17:26:24] <tds5016> cheeser I added the library, and added that line, so yes; as far as I know?
[17:26:31] <dude7064> I need to convert all numbers in a string in the form #.### to -> ### (omitting the first two characters, and keeping the decimals only) .. I tried using replaceAll([\d].[\d][\d][\d], ) but don't know how to preserve the digits in the decimals .
[17:26:35] <tds5016> cheeser: I could be wrong.
[17:26:44] <tds5016> cheeser: sorry for being a pain..
[17:26:49] <dude7064> can somebody please give me hints on how to do that ?
[17:26:49] <cheeser> tds5016: stop using eclipse
[17:27:13] *** rawbk has joined ##java
[17:27:19] *** kungen has quit IRC
[17:27:42] <analyser> cheeser: thank you
[17:27:47] <tds5016> cheeser why should I? I don't mean that as being a jerk... but it's the easiest way to work with servlets/tomcat... etc for me.
[17:27:55] <analyser> cheeser: eclipse is not a good IDE?
[17:27:58] <cheeser> tds5016: it's clearly not.
[17:28:03] <cheeser> ~~ analyser newbie ide
[17:28:03] <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.
[17:28:04] <joed> Because you don't grok the basics.
[17:28:27] *** charzero has left ##java
[17:28:28] *** RenatoSilva has joined ##java
[17:28:29] *** tom17bombadil_ has joined ##java
[17:28:31] *** arakthor has joined ##java
[17:28:34] <cheeser> tds5016: and because you don't grok those basics and use an IDE that I don't use, i can't and won't help
[17:28:44] <dude7064> I need to convert numbers from the form #.### to ### (i.e. 1.235 -> 235 ) can somebody please give me any hints on how to do this ?
[17:28:55] <cheeser> if you'd like to learn *java*, I can help. but try ##eclipse otherwise.
[17:28:58] <RenatoSilva> reverend: http://ant4eclipse.sourceforge.net/
[17:29:09] <cheeser> dude7064: think it through. it's quite simple.
[17:29:31] <RenatoSilva> reverend: Ant CAN'T share cp data with eclipse, kid
[17:29:36] *** RenatoSilva has left ##java
[17:29:44] <tds5016> oh... I see the error... its saying the class isn't found :-/.
[17:29:48] <cheeser> heh. "kid"
[17:29:54] <dude7064> It's regex, I think,, but I don't know how to pass in the found numbers in the second paramter of replaceAll()
[17:29:54] <tds5016> that should've added it :-/.
[17:29:57] <joed> Drive by stupidity. Take that kid!
[17:30:10] <cheeser> yeah. douchebag.
[17:30:20] <dude7064> replaceAll([\d].[\d][\d][\d], 2ndParamter )
[17:30:33] <cheeser> dude7064: why are you replacing all that?
[17:30:50] <dude7064> I need it for a custom text file i have,,
[17:30:55] <cheeser> you only care about removing the first part
[17:31:09] <dude7064> true..
[17:31:22] <dude7064> the leaving the last 3 decimals intact
[17:31:34] <cheeser> so then...
[17:31:36] <tds5016> hmm, that may explain why...
[17:31:41] *** Yustme has joined ##java
[17:32:10] <tds5016> nevermind....
[17:32:14] <tds5016> I see the class right there.
[17:32:17] <tds5016> that's so frustrating.
[17:32:30] *** musically_ut has quit IRC
[17:33:00] *** acuster has quit IRC
[17:34:34] *** Thorn has joined ##java
[17:35:30] <dude7064> could anybody please help ? need to convert 1.234 to 234 (removing the first 2 characters, and leaving the last 3 intact)
[17:35:48] *** Gunirus has quit IRC
[17:35:57] *** Gunirus has joined ##java
[17:36:46] <joed> Read the API for string?
[17:37:09] *** ScottG489 has quit IRC
[17:37:19] <cheeser> dude7064: just how many hints do you need?
[17:37:32] *** gabbah has joined ##java
[17:37:35] *** chrome_ has quit IRC
[17:37:47] <joed> cheeser: 42
[17:38:11] <gabbah> meaning of life?
[17:38:19] <m4rtijn> douglas's birthday
[17:38:25] <gabbah> oh
[17:38:26] <m4rtijn> 4th feb
[17:38:51] <gabbah> i would code thas 0402 in that case
[17:38:56] <m4rtijn> hehe
[17:39:00] <gabbah> :P
[17:39:26] <gabbah> i never realised how much implementation you can actually put into an interface in java
[17:39:29] *** waz has joined ##java
[17:39:41] <dude7064> I haven' read any hints !!
[17:39:46] <gabbah> if you use enum or an inner class
[17:41:29] *** Varox has quit IRC
[17:41:32] *** spideryummy has joined ##java
[17:42:03] *** xxjaba has joined ##java
[17:42:08] * svm_invictvs thought he heard a clue dropping.
[17:43:36] <cheeser> dude7064: then that's half your problem. probably most of it.
[17:44:19] *** Dyllan has quit IRC
[17:45:17] *** Yustme has quit IRC
[17:45:36] *** monstrfolk has quit IRC
[17:45:47] *** arakthor has quit IRC
[17:46:27] *** monstrfolk has joined ##java
[17:46:29] *** svm_invictvs has quit IRC
[17:46:54] *** dk_schrute has joined ##java
[17:47:11] *** Chest has joined ##java
[17:48:22] <dk_schrute> Hola
[17:48:26] *** dk_schrute is now known as svm_invictvs
[17:48:29] <svm_invictvs> hm
[17:49:01] <csgeek> I'm trying to set it so that baesd on certain conditions.. the content of a JFrame with a GidBagLayout is replaced with something else... is there a simple way to clearing the content of a Jframe? or should I simply just iterate through all the components and set them to not be visible?
[17:49:16] *** arakthor has joined ##java
[17:49:25] <cheeser> ~javadoc JFrame
[17:49:26] <javabot> cheeser: http://is.gd/izv2 [javax.swing.JFrame]
[17:49:29] *** squi has joined ##java
[17:49:31] *** Carnage\ has quit IRC
[17:49:41] <dos000> is there a circular buffer implementation in java ?
[17:49:50] <dos000> i mean as part of the jdk
[17:49:53] <svm_invictvs> commons collections
[17:49:58] *** spideryummy has quit IRC
[17:50:07] <svm_invictvs> dos000: no, but you can use commons collections.
[17:50:24] <dos000> ah! .. thanks guys
[17:50:52] <svm_invictvs> commons collections, iirc has a ringbuffer
[17:51:36] *** gnech has joined ##java
[17:51:41] <gnech> hello
[17:52:10] <gnech> how do I make a button 'non-clickable'?
[17:52:32] <cheeser> ~javadoc JButton
[17:52:33] <javabot> cheeser: http://is.gd/iMLi [javax.swing.JButton]
[17:52:59] <tds5016> cheeser okay, I give up... how do I add it to the class path manually?
[17:53:04] <cheeser> ~classpath
[17:53:05] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://is.gd/j4gM [sun.com] for more info.
[17:53:13] <cheeser> which I showed you an hour ago or more.
[17:53:29] *** surial has joined ##java
[17:53:33] <rullie> use an ant script
[17:53:38] <tds5016> I know... I still think Eclipse should've added it but for some reason it didn't.
[17:53:38] <rullie> saves lives
[17:53:47] <tds5016> I'm getting so frustrated with this darned thing.
[17:54:05] <joed> Don't
[17:54:06] <joed> use
[17:54:08] <rullie> tds5016: it never makes sense in the begining
[17:54:08] <joed> Eclipse
[17:54:09] * cheeser grins smugly
[17:54:09] *** Bonix has quit IRC
[17:54:10] *** teralaser has quit IRC
[17:54:25] <cheeser> tds5016: which is why i say newbies shouldn't use IDEs.
[17:54:25] <rullie> tds5016: but once you figure it out, you'll shit bricks
[17:54:41] <tds5016> rullie this issue is that eclipse is lying about having added it to the damned build path.
[17:54:45] <cheeser> you have to learn the java language, the platform/environment, and the IDE all at once.
[17:54:53] <cheeser> tds5016: it's not eclipse. it's you.
[17:55:19] <rullie> tds5016: eclipse usually doesn't lie to me, it just dies on me
[17:55:27] *** LordMetroid has quit IRC
[17:55:28] <tds5016> well, adding it to the java build path in eclipse should do the same thing as the class path.
[17:55:34] <tds5016> but it didn't add the freakin' jar.
[17:55:41] <cheeser> says the guy who doesn't understand things.
[17:55:42] <repnop> learn your tool?
[17:55:42] *** ldam has joined ##java
[17:55:57] *** morkar- has quit IRC
[17:56:04] <tds5016> cheeser you're right... I'm just frustrated... hence I blame other things.
[17:56:12] <rullie> then calm down
[17:56:17] <rullie> it's just a classpath
[17:56:33] <cheeser> rullie: which means something to *you* because you took the time to learn.
[17:57:14] <tds5016> rullie yes, the java build path (as eclipse calls it) and the class path are the same thing, no?
[17:57:28] *** ChanServ has quit IRC
[17:57:41] <cheeser> damn ignorant n00bs. like patients who won't listen to their doctors.
[17:57:52] <tds5016> okay, I gotta get to class.... I will be back in a few.
[17:57:59] <Chest> gnech: JButton.isEnabled(false);
[17:58:00] <joed> Don't rush.
[17:58:05] <cheeser> joed: haha
[17:58:10] <cheeser> ~~ Chest spoonfeeding
[17:58:11] <javabot> Spoonfeed a newbie for a day and he'll come back with more questions. Teach him to find his own answers and you'll both be better off: you won't get stuck answering the easy questions and he'll be much more productive than before.
[17:58:15] <rullie> http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_classpath.htm
[17:58:18] <Chest> thats alright
[17:58:22] <tds5016> cheeser: I'm listening; I'm going to try to do it the way you suggested, I just want to understand.
[17:58:40] <cheeser> tds5016: use vim+javac (*maybe* ant) for 2 or 3 weeks.
[17:58:48] <cheeser> that's all it should take to get the concepts down.
[17:58:57] <cheeser> then eclipse will be *much* more productive for you.
[17:59:01] <sproingie> i'd say not even ant. write bash scripts to build
[17:59:17] <sproingie> then grab ant
[17:59:21] <cheeser> sproingie: yeah. that's great advice for the windows users.
[17:59:21] <cheeser> 8^)=
[17:59:35] <Chest> so's using vim
[17:59:42] <sproingie> then write cmd scripts. personally i use bash on windows.
[17:59:57] <cheeser> Chest: i used vim on windows for years.
[18:00:16] <rullie> i do too, but writing import statements got on my nerves
[18:00:18] <cheeser> i still do, in fact. when i have the misfortune of usig windows
[18:00:19] <sproingie> like your average windows user is going to tolerate vi
[18:00:20] <Chest> using an ide helps a great deal to learn the java language.
[18:00:29] <Chest> the javadoc lookup is essential
[18:00:34] <cheeser> Chest: it impedes more than it helps. at least at first.
[18:00:38] <cheeser> Chest: browsers can do that.
[18:00:38] <Chest> building .... not so much
[18:00:41] <sproingie> a web browser also helps with javadoc
[18:00:44] <Chest> yeah, so can ides
[18:00:52] <sproingie> i won't discount that an IDE is good for exploring
[18:01:04] <Chest> and its much more convenient.
[18:01:05] <cheeser> IDEs are much more harmful in the beginning as tds5016 clearly proves
[18:01:09] <Chest> no they arent
[18:01:10] <sproingie> but if you want to understand how stuff gets built, an IDE won't help you
[18:01:12] <Chest> your speculating
[18:01:15] <rullie> Chest: well, vim can do code completion just as good
[18:01:19] *** userek has quit IRC
[18:01:23] <Chest> rullie: no it cant
[18:01:24] <cheeser> Chest: then you and tds5016 can get a room together.
[18:01:25] <Chest> vim sucks
[18:01:33] <Chest> it was made in what .... 1970?
[18:01:36] <surial> emacs rule! </pointless-flame-war>
[18:01:43] <rullie> ok, i'm gonna restrain my inner urge, but let's stop
[18:01:44] *** Bridge| has quit IRC
[18:01:46] <cheeser> Chest: i've watched newbies get tripped for years and years here because of IDEs. just like tds5016. it's not speculation.
[18:01:51] <tds5016> I'll be back ina bit thoguh.
[18:01:51] <repnop> cygwin is great on windows :)
[18:01:58] <cheeser> repnop: it's better than nothing.
[18:01:59] <Chest> cheeser: i'd reference you to a dictionary
[18:02:00] <sproingie> 73, i think, and i think it sucks too but no one really cares. make the mental substitution to "editor" and get over it.
[18:02:04] *** tds5016 has left ##java
[18:02:22] <Chest> ide's obscure the build process. thats it.
[18:02:26] <surial> Chest: I know! I keep using that argument too when I explain why I think Claudia Schiffer sucks.
[18:02:35] <cheeser> Chest: like this? http://dictionary.reference.com/browse/reference
[18:02:55] <rullie> Chest: http://www.vim.org/scripts/script.php?script_id=1213
[18:02:59] <cheeser> and how reference is not a transitive verb? how it has no direct object?
[18:03:02] <Chest> cheeser: no, like this: http://dictionary.reference.com/browse/speculation
[18:03:02] <rullie> great stuff, check it out :)
[18:03:20] <cheeser> or like this?
[18:03:21] <cheeser> http://dictionary.reference.com/browse/observation
[18:03:24] <sproingie> personally i think learning the build process shouldn't have to be part of learning the language, but unfortunately it is and will continue to be for a while
[18:03:28] <cheeser> or http://dictionary.reference.com/browse/conclusion
[18:03:43] <Chest> cheeser: this may help http://en.wikipedia.org/wiki/Scientific_method
[18:04:02] <cheeser> oh, you mean years of research and observation aren't part of the SM?
[18:04:11] <cheeser> instead i should just make something up on the spot?
[18:04:14] <surial> sproingie: Yes. Learning a new language is best done by jumping right in, not by trying to juggle a handful of separate semi-complex processes. But we've had this flamewar 10 times already and I'm sick and tired of it.
[18:04:17] *** jabalsad has quit IRC
[18:04:28] <rullie> surial: 10?
[18:04:32] <Chest> cheeser: they are. your speculation is not
[18:04:35] <surial> rullie: At least 4.
[18:04:38] <cheeser> rullie: he's only counting today.
[18:04:39] <rullie> that's under an unerstatement
[18:04:52] <cheeser> Chest: i guess you didn't see it when I said I've seen this happen for years and years now.
[18:04:52] <sproingie> it's not like java's build process is even that hard
[18:05:09] <Chest> cheeser: i saw it. your sitting on irc. thats your sample. not scientific.
[18:05:12] <sproingie> fighting the linker in C++ results in far more manually-induced hair loss than any java build has caused me.
[18:05:15] <cheeser> i've lost count of the number of newbies trying to dev in an IDE without a basic graps of the funadmentals.
[18:05:22] <repnop> sproingie: we've had people in this channel who couldn't understand a why a function declared to return an int had to return an int from all branches...
[18:05:22] <cheeser> Chest: and yours is?
[18:05:29] <Chest> working with actual people
[18:05:29] <cheeser> so stfu about the scientific method.
[18:05:30] <cheeser> dumbass.
[18:05:35] <Chest> in person
[18:05:36] <cheeser> oh, i have done that.
[18:05:39] <Chest> in a classroom
[18:05:41] <cheeser> me, too! no way!
[18:05:42] <Chest> etc etc
[18:05:45] <repnop> so yes the build process can be complex to many people ;)
[18:05:45] <joed> No difference there.
[18:05:45] <cheeser> we should form a club!
[18:05:55] <Chest> then, obviously, these are opinions.
[18:05:57] <Chest> not facts
[18:06:05] <cheeser> like a fraternity. or a union or something.
[18:06:35] <Chest> i suspect that your 'students' find you to be overbearing and obnoxious, kinda like you are now.
[18:06:39] <cheeser> i love getting my balls busted about applying the scientific method and getting that argument supplemented by supposition and opinion.
[18:06:41] <Chest> hence the learning process is .... slowed
[18:06:42] <cheeser> irony++
[18:07:10] <cheeser> i'm not a professor. i'm not an academic. i'm a professional. with, you know, real world experience.
[18:07:15] <Chest> because the best way to have some one learn is say rtfm
[18:07:17] <Chest> right?
[18:07:23] <cheeser> i know that underrated in unis
[18:07:23] *** Niike has quit IRC
[18:07:28] <whaley> Chest: if tfm is good, yes.
[18:07:31] <cheeser> Chest: learning to research is fundamental.
[18:07:42] <cheeser> sometimes rtfm isn't appropriate and when it's not, i don't say that.
[18:07:54] <cheeser> but when someone asks basic API questions, i point them at the docs.
[18:07:55] <Chest> cheeser: yes it is. saying rtfm is not
[18:07:55] <tactics> Chest, no, not at all! We should always hold their hand and tell them *exactly* what they need to do.. maybe even code their program for them.
[18:07:59] <joed> Chest: it has worked for a few centuries or so.
[18:08:16] * svm_invictvs teabags Chest.
[18:08:22] <cheeser> javabot: svm_invictvs++
[18:08:22] <javabot> svm_invictvs has a karma level of 28, cheeser
[18:08:23] <Chest> it took all of 2 seconds to answer that guys question
[18:08:30] <repnop> besides in here rtfm = tell javabot to give them a url to the language reference :p
[18:08:35] <joed> And what did he gain from it?
[18:08:40] <cheeser> Chest: and the next one? and the next one?
[18:08:49] <repnop> the proper section most of the time
[18:08:51] *** ChanServ has joined ##java
[18:08:51] *** irc.freenode.net sets mode: +o ChanServ
[18:08:56] <Chest> but typically on this channel, the morons spend more time blabbing about rtfm
[18:08:56] <whaley> Chest: and when he has another question what will his first incliation be?
[18:08:56] <tactics> Chest, That's not the point.
[18:08:57] <svm_invictvs> What are we even arguing about?
[18:08:57] <whaley> Chest: to go ask someone else again...
[18:08:58] <cheeser> svm_invictvs: about how Chest is full of shit
[18:08:58] <AMcBain> 42
[18:08:59] <cheeser> 8^)=
[18:09:07] <tactics> Chest, The point is: if you give a man a fish, he eats for a day. If you teach a man to fish, he eats forever
[18:09:08] <Chest> cheeser: answer it if you will. who cares.
[18:09:14] <whaley> anyway... we've had this conversation 8 thousand times... it's a bunch of pointless Chest beating.
[18:09:18] <AMcBain> ~~tactics fire
[18:09:18] <javabot> Light a fire for a man, keep him warm for one night. Light a man on fire, keep him warm for the rest of his life.
[18:09:19] <svm_invictvs> I read the backlog to before I went away and it still doesnt' make sense to me.
[18:09:26] <cheeser> javabot: whaley++
[18:09:27] <javabot> whaley has a karma level of 188, cheeser
[18:09:27] <Chest> the point is that it takes very little effort to answer a very simple question
[18:09:28] <tactics> AMcBain, i like that one better ^^
[18:09:43] <Chest> so either do it or simply shut up. say nothing. jeez.
[18:09:45] <tactics> Chest, But that's not the point
[18:09:50] <repnop> Chest: and then the next little question, and the next
[18:09:51] <cheeser> Chest: it also takes very little to look up that answer.
[18:09:53] <Chest> thats not your point.
[18:09:56] <joed> The point is that that is not the point.
[18:09:56] <repnop> before you know it you're doing his job for him everyday
[18:09:57] <cheeser> it is.
[18:09:59] <Chest> its mine.
[18:09:59] <tactics> !tell Chest about fire
[18:10:09] <Chest> repnop: oh please
[18:10:12] <tactics> ~~Chest fire
[18:10:13] <javabot> Light a fire for a man, keep him warm for one night. Light a man on fire, keep him warm for the rest of his life.
[18:10:14] <tactics> whatever
[18:10:34] *** [S^K] has joined ##java
[18:10:45] *** monstrfolk has quit IRC
[18:10:58] <cheeser> i should go to the library now.
[18:11:02] *** Razec has quit IRC
[18:11:04] <cheeser> Chest: that's where they keep books.
[18:11:09] <Chest> dah dah dum
[18:11:13] <cheeser> for you now, reading.
[18:11:14] <Chest> bad joke
[18:11:15] <rullie> do ya'll answer netbeans questions?
[18:11:16] <cheeser> *know*
[18:11:20] <svm_invictvs> rullie: If we can
[18:11:21] *** JohnBat26 has joined ##java
[18:11:25] <tactics> rullie, s'pose so
[18:11:28] <Chest> rullie: sure!
[18:11:42] <rullie> svm_invictvs: how do i import a properties file into an existing project?
[18:11:55] <rullie> i can find creating one easily, but can't seem to find import
[18:12:21] <Chest> rullie: just drop it in the source structure.
[18:12:30] <Chest> rullie: or project folder.
[18:12:43] *** TranceControl has joined ##java
[18:12:43] <rullie> Chest: i checked it out from cvs and it's already in the proj folder
[18:12:46] <rullie> it aint' showing up
[18:12:51] <rullie> i'm a netbeans noob
[18:12:51] <Chest> hit refresh
[18:12:53] <svm_invictvs> can you refresh the projeect?
[18:12:57] <svm_invictvs> *project
[18:13:19] <whaley> "reload" in Netbeans nomenclature
[18:13:24] <rullie> eh
[18:13:36] <rullie> ok
[18:13:38] <rullie> :p
[18:14:01] <Chest> well, try hitting the plus next to the project if that doesn't work
[18:14:27] <svm_invictvs> I know Eclipse will do it if you hit "F5"
[18:14:42] <rullie> yeah, eclipse is running too slow on my lappy
[18:14:47] <rullie> so i am switching to netbeans
[18:15:01] <Chest> rullie: does it not show up in both the file and project tabs?
[18:15:18] <rullie> Chest: refreshing it solved the problem -_-
[18:17:05] *** lresende has joined ##java
[18:17:15] <surial> Hmm, is there a way to ship 1 jar file which contains a bunch of classes and 2 other jars (jars in a jar), where the other jars are dependencies listed in the main jar's Class-Path manifest.mf attribute?
[18:17:16] *** Ephidaurus has joined ##java
[18:17:21] <surial> Probably not, but I never looked it up.
[18:17:26] *** Ephidaurus has left ##java
[18:17:29] *** Ephidaurus has joined ##java
[18:17:36] *** Ephidaurus has left ##java
[18:17:39] * whaley thinks
[18:17:40] *** Ephidaurus has joined ##java
[18:17:41] <whaley> ~fatjar
[18:17:42] <javabot> whaley, fatjar is a jar file compiled from several other jars, see http://fjep.sourceforge.net/
[18:17:55] <AMcBain> ~jarjar
[18:17:55] <javabot> jarjar is yet another utility to repackage jars and embed them within your distribution. For more information see http://code.google.com/p/jarjar/
[18:18:18] <whaley> surial: *disclaimer*, I've never used that (and I am still not sure why someone would want to use that)
[18:18:21] <lresende> does java (pure sdk classes) have some model objects that would allow mapping user/credential/role information ?
[18:18:34] *** dk_schrute has joined ##java
[18:18:37] <surial> To have a simple jar you can just toss about. The dependency jars are signed, so I can't just unpack them and repack them, which is what this does, I assume?
[18:18:49] *** hrehf has joined ##java
[18:18:49] <AMcBain> surial: probably
[18:18:50] <surial> (and which is easily done with some ant tasks anyway)
[18:18:53] *** svm_invictvs has quit IRC
[18:18:57] *** dk_schrute is now known as svm_invictvs
[18:18:59] <svm_invictvs> what the fuck
[18:19:04] *** red-lichtie has joined ##java
[18:19:06] <svm_invictvs> need to update my router's firmware.
[18:19:07] * surial wishes mail.jar and activation.jar were just part of j2se already.
[18:19:21] <surial> Anyone here know how fatjar works? Does it just repack or does it do something a little more fancy?
[18:20:25] <AMcBain> " The One-JAR option integrates a specialised Class-Loader written by Simon Tuffs ( http://one-jar.sourceforge.net/ ) which handles jar-files inside a jar."
[18:20:27] <AMcBain> !
[18:20:42] <AMcBain> That's from their project page.
[18:20:43] *** acuster has joined ##java
[18:20:54] <surial> huh. That's nice.
[18:21:24] <surial> except this is a library and not an app, so there's no way to make the special classloader transparent as far as I can tell. Shame.
[18:21:29] *** monstrfolk has joined ##java
[18:22:28] <surial> meh, this is sort of a broken idea anyway and makes it hard to include in other libraries that are already dependent on mail/activation anyway.
[18:22:37] <surial> I'll just resign myself to working with 3 jars instead.
[18:25:20] *** teralaser has joined ##java
[18:25:54] *** BigAllan has quit IRC
[18:26:53] *** Bevin has quit IRC
[18:29:15] *** brousch has joined ##java
[18:32:00] *** morkar- has joined ##java
[18:32:12] *** agnul has quit IRC
[18:36:00] *** m4rtijn has quit IRC
[18:36:13] <red-lichtie> Any ideas how to define an annotation that can be applied to the "static { .... }" method of a class ?
[18:37:04] *** Tarantulafudge has joined ##java
[18:37:57] *** scott_w has joined ##java
[18:39:16] *** jor has joined ##java
[18:39:16] *** RLa has joined ##java
[18:41:11] *** alek_b has quit IRC
[18:41:19] *** alek_b has joined ##java
[18:41:57] *** KikiJiki has quit IRC
[18:43:15] <svm_invictvs> Nothing says, "I'm a tool" like filing a duplicate bug report.
[18:43:41] *** aknm has quit IRC
[18:43:50] <dmlloyd> red-lichtie: can't you put a method annotation on there?
[18:44:02] *** vpit3833 has quit IRC
[18:45:32] *** blip99 has joined ##java
[18:45:41] *** Ivellina has joined ##java
[18:46:06] <blip99> hi all, am I right in saying that Vectors cannot store ints but only Integer objects ?
[18:46:09] <red-lichtie> dmlloyd: No, I get "Syntax error, insert "enum Identifier" to complete EnumHeader
[18:46:17] <blip99> and the reason is print is a primitive type ?
[18:46:24] <blip99> *int is
[18:46:36] <dmlloyd> red-lichtie: wtf compiler are you using? eclipse?
[18:46:40] <svm_invictvs> \r is carriage return, right?
[18:46:42] <dmlloyd> red-lichtie: if so, that's no test. try it with javac
[18:46:43] <svm_invictvs> \n is line feed?
[18:46:46] *** aknm has joined ##java
[18:46:47] <dmlloyd> eclipses compiler is a piece
[18:46:58] <red-lichtie> yeah, eclipse
[18:47:42] <dmlloyd> yeah try it with javac before you write it off
[18:48:02] <dangertools> blip99: right. but you shouldn't use java.util.Vector anyway
[18:48:27] <blip99> dangertools, I'm looking for an automatically expanding array. Lists are harder to deal with
[18:48:33] <arakthor> dangertools, what is a better alternative?
[18:49:29] <dangertools> blip99: hu? why should java.util.List and its implementations be hard to deal with?
[18:49:50] <dangertools> arakthor: ArrayList, LinkedList, all the other "modern" lists
[18:50:10] <arakthor> dangertools, thanks.
[18:50:14] *** arakthor has quit IRC
[18:50:32] *** WielkiSzu has joined ##java
[18:51:11] <dangertools> blip99: btw, java.util.Vector implements java.util.List these days, but it's usually the bad choice because of usually unneeded synchronisation - which slows down quite a bit
[18:51:59] *** amnesiac has joined ##java
[18:52:07] *** ankylose has joined ##java
[18:54:40] <red-lichtie> dmlloyd: javac -> "illegal start of type", it seem it doesn't recognize them as methods (also tried simple "{ ... }" instance init block)
[18:54:51] <dmlloyd> interesting.
[18:54:57] *** elementz has joined ##java
[18:55:20] <dmlloyd> well, you could always reprocess the .class file to add the annotation to the <clinit> method if you really need it there. :)
[18:55:45] *** pchapman_ has quit IRC
[18:55:50] *** valcker has quit IRC
[18:56:23] <red-lichtie> Well, now that you mention it ;)
[18:56:58] *** a133x has joined ##java
[18:57:13] *** fryderyk has quit IRC
[18:57:52] *** a133x has left ##java
[18:57:53] *** casmo has quit IRC
[18:58:05] *** casmo has joined ##java
[18:59:08] *** Copter has quit IRC
[18:59:24] *** ofl_ has joined ##java
[18:59:28] *** Copter has joined ##java
[19:01:23] *** matsebc has joined ##java
[19:01:29] *** WielkiSzu has quit IRC
[19:02:09] <matsebc> question, what would be a good approach to convert a hexadecimal representation String to it's corresponding byte array?
[19:02:46] *** fryderyk has joined ##java
[19:03:23] <dangertools> parse an integer from it, use some way (shifting, bytebuffer, ...) to get the bytes
[19:04:04] <matsebc> yeah, I thought about the integer parsing, I'll do that, guess it's the simpler way, although probably no the faster, but i am not worried about speed at parsing an 8 bytes string
[19:04:07] <analyser> anyone how can I select elements from a HashSet?
[19:04:47] *** deepjoy has joined ##java
[19:04:57] <red-lichtie> matsebc: Loot at Integer.valueOf(String,int)
[19:05:07] <dangertools> analyser: iterate. there's no way of picking single elements from sets
[19:05:23] *** remu has joined ##java
[19:06:29] *** neshaug has joined ##java
[19:06:45] <analyser> dangertools: thank you.
[19:06:46] *** nijm has joined ##java
[19:06:56] *** Bevin has joined ##java
[19:07:43] <matsebc> thanks a lot red-lichtie
[19:07:53] *** noss has joined ##java
[19:08:13] *** Bevin has quit IRC
[19:09:12] <noss> Hi, anyone know what this might be called if i want to google for it: I'm looking for something that would parse java, and let me analyze program flow and variable use. To be more clear
[19:09:31] <noss> the way final restrict you from modifying a variable, i want to add other constraints using annotations.
[19:09:36] <ernimril> noss: if you can go with byte code then either asm or bcel may be useful
[19:09:57] <noss> that's really heavy. i rather work on AST that is closer to java.
[19:10:16] <noss> it would be more of a lint / advisory check.
[19:10:49] <ernimril> noss: have you looked at findbugs or pmd? they do a lot of lint-checking
[19:11:05] <noss> the thing is, id like to add a constraint of my own.
[19:11:26] <noss> i want to make object members that you're forbidden to assign something you construct with new
[19:11:29] *** marqueed has quit IRC
[19:11:39] <svm_invictvs> pmd
[19:11:40] <svm_invictvs> heh
[19:11:43] <svm_invictvs> What does PMD mean?
[19:11:44] <noss> and i would like to make object members that you're forbidden from letting escape away using return.
[19:11:48] <lem> how can one make sure that if a component has changed in a swing app that the window refreshes to display it?
[19:12:09] *** theunixgeek has joined ##java
[19:12:10] <dmlloyd> noss: that gets asked for periodically. It comes down to basically implementing 80-90% of a complete java compiler; there's no suitable thing out there that does this today and there doesn't seem to be anyone willing to take it on (right cheeser?) :)
[19:12:29] *** rollins has quit IRC
[19:12:32] <theunixgeek> I would like someone to convince me to use Java :) What makes it great? What makes it efficient?
[19:12:38] <reverend> don't do it
[19:12:46] <Stephmw> it's not worth your sanity
[19:12:46] *** k0p has quit IRC
[19:12:48] <noss> dmlloyd: nothing that even parses java to AST ?
[19:12:55] <dmlloyd> nope, nothing good anyway
[19:13:02] <noss> theunixgeek: why should anyone convince you?
[19:13:12] <ffgeek200b> dmlloyd, i saw it partially done once w/ c, it wasn't full proof and it wasnt pretty
[19:13:21] <dmlloyd> theunixgeek: don't use java. It's terrible. C is way better.
[19:13:22] <theunixgeek> noss: I want to know what's great about it
[19:13:24] <reverend> theunixgeek: nobody's really interested in having more novices doing java
[19:13:32] <dmlloyd> theunixgeek: or PHP. People really like PHP.
[19:13:32] <reverend> so i'd prefer you just used php or whatever
[19:13:33] <theunixgeek> dmlloyd: lol then why are you here? ;)
[19:13:37] <red-lichtie> ROFL
[19:13:41] <dmlloyd> theunixgeek: just to warn off folks like you.
[19:13:43] <ffgeek200b> Use BASIC.
[19:13:50] <theunixgeek> lol
[19:14:02] <dmlloyd> theunixgeek: have you looked at python? or ruby?
[19:14:03] <ffgeek200b> 10 PRINT "WEB SERVER STARTED"
[19:14:17] <reverend> theunixgeek: yeah, use python
[19:14:18] <reverend> it's hot
[19:14:28] <theunixgeek> dmlloyd: I prefer compiled languages, but Python was my 2nd programming language
[19:14:35] <theunixgeek> QBASIC was my first :P
[19:14:50] <ffgeek200b> I would rather stab myself in the eyeballs than use python for a large project.
[19:14:51] <reverend> python is compiled, just like java :)
[19:14:54] <Stephmw> ~dmlloyd++
[19:14:55] <javabot> dmlloyd has a karma level of 108, Stephmw
[19:14:58] <dmlloyd> noss: anyway if someone implemented something like that, it would be excellent. I'd use it for sure. But parsing Java is a pretty complex problem.
[19:15:11] <Stephmw> ~jobsecurity++
[19:15:12] <javabot> jobsecurity has a karma level of 1, Stephmw
[19:15:22] *** krad has joined ##java
[19:15:45] *** sphenxes has quit IRC
[19:15:55] <dmlloyd> noss: best of all would be like a pluggable compiler where stages could be introduced that process the AST. Sort of like what java does with the annotation processing stuff today, but with the whole AST.
[19:16:01] *** elementz is now known as elementz_
[19:16:08] <red-lichtie> theunixgeek: If you need platform independence then Java, if you are tied to a platform, the use what ever that platform provider uses
[19:16:13] <dmlloyd> noss: then you could add all those kinds of checking right in the build process...
[19:16:14] <noss> dmlloyd: heh, not that interested. :) imho the solution is to make the grammar simple enough that antlr could do it cleanly.
[19:16:22] <theunixgeek> reverend: well, not under some sort of virtual machine
[19:16:27] <theunixgeek> red-lichtie: what about frameworks like Qt?
[19:16:30] *** KermitTheFragger has quit IRC
[19:16:34] <ffgeek200b> if you want to spend your time chasing down memory leaks, use C/C++
[19:16:38] *** rollins has joined ##java
[19:16:44] <reverend> theunixgeek: actually, it is
[19:16:53] * EdwardIII loves memory leaks
[19:16:59] <ffgeek200b> If you like debugging core dumps, C/C++ is your huckleberry
[19:17:02] <theunixgeek> reverend: I mean, I prefer languages that don't run under virtual machiens
[19:17:03] <EdwardIII> i started looking into C. it was very grownup
[19:17:03] <theunixgeek> *machines
[19:17:03] <dmlloyd> noss: it's more complex than just parsing. you need context to be able to parse java - for example, you need to be able to tell whether foo.bar.baz is a field name or a class name.
[19:17:12] <reverend> theunixgeek: java does, so you're in the wrong spot
[19:17:25] *** Gunirus has quit IRC
[19:17:25] <theunixgeek> reverend: good point :P
[19:17:27] <ffgeek200b> If you like memory corruption and not knowing how memory was corrupted, you won't like java
[19:17:33] <noss> dmlloyd: see what i said about making the language simpler instead of accepting that it is difficult ? :) im a lispy person at heart.
[19:17:35] <dmlloyd> noss: this means you have to be able to parse many .java files at once, after loading a compile classpath as well.
[19:17:38] * red-lichtie loves dangling pointers
[19:17:47] <theunixgeek> so Java's better when it comes to memory management?
[19:17:50] <dmlloyd> noss: oh. Well, you're not going to be changing the language anytime soon. :)
[19:17:53] *** elementz_ is now known as elementz
[19:17:53] <reverend> theunixgeek: naw
[19:17:59] <reverend> java sucks, seriously
[19:18:04] <dmlloyd> theatrus: no, it's terrible. it barely works
[19:18:08] <dmlloyd> theunixgeek: ^^
[19:18:12] <ffgeek200b> if you just love it when you have to convert a string to use it in another library, you'll need C++
[19:18:13] <dmlloyd> sorry theatrus
[19:18:50] <dmlloyd> theunixgeek: you can't even free memory, and there's no destructors. and no operator overloading, I mean wtf right?
[19:19:15] <krad> there's finalize! and you can preempt the GC anytime!
[19:19:17] <reverend> theunixgeek: have you looked at D? that should work for you
[19:19:23] <noss> dmlloyd: id dont think so either :)
[19:19:26] <theunixgeek> reverend: yeah, but not too "standard"
[19:19:29] <dmlloyd> theunixgeek: yeah, D looks awesome
[19:19:29] <theunixgeek> reminds me a lot of C#
[19:19:36] <theunixgeek> I like it, though
[19:19:41] <theunixgeek> I just wish it were more widely used
[19:19:45] <dmlloyd> theunixgeek: oh I don't know, you should go hang out in ##d
[19:19:46] <reverend> standard? it compiles to native code
[19:19:46] <red-lichtie> theunixgeek: Listen to them, yo don't want to miss out on segv's do you ?
[19:19:53] <reverend> what kind of standard are you looking for?
[19:20:02] <theunixgeek> dmlloyd: the non-existant channel? ;)
[19:20:08] <theunixgeek> I know there are channels for different D frameworks
[19:20:18] <theunixgeek> there are 2 main ones; it's a flame war between the two
[19:20:19] <reverend> it's also the 12th most popular language according to TIOBE
[19:20:19] <dmlloyd> theunixgeek: yeah, you can't get SIGBUS or SIGSEGV. So I ask you this. *How do you know when you've dereferenced a misaligned pointer?*
[19:20:24] <ffgeek200b> theunixgeek, java is better at memory management, and memory management will consume 90% of your continuing engineering, so long term, garbage collected apps are cheaper
[19:20:28] <noss> java is for people that love mutable state all over and interesting race conditions and dead locks. :)
[19:20:46] <red-lichtie> theunixgeek: There are NO pointers in Java, thats why it sucks
[19:20:50] <svm_invictvs> dmlloyd: Look for an alignment exception?
[19:20:50] <dmlloyd> ffgeek200b: shh!
[19:20:57] <ffgeek200b> ok ok i will shutup
[19:21:12] <theunixgeek> ffgeek200b: I love garbage collection :)
[19:21:18] <dmlloyd> man, you guys are ruining my whole antitroll here
[19:21:19] <theunixgeek> leaves me more time to code and less with gdb
[19:21:34] <grobot> anyone here using iText?
[19:21:39] <svm_invictvs> ffgeek200b: Not really...if you follow how the language was intended to be used.
[19:21:40] *** Ven]n has joined ##java
[19:21:43] <ffgeek200b> now you dont want garbage collection for realtime apps that need responsiveness, like an OS
[19:21:47] <theunixgeek> well, I'll take all the info into consideration; thanks :)
[19:21:50] *** theunixgeek has left ##java
[19:21:58] <reverend> ~next
[19:21:58] <javabot> Another satisfied customer. Next!
[19:22:01] <Ven]n> how do you separate a String on two lines again?
[19:22:08] <ffgeek200b> svm_invictvs, that's in theory, then in reality you use an API that expects you to free memory a certain way and you could very well have a leak
[19:22:23] <ffgeek200b> so if you have control over everything, yes
[19:22:32] <svm_invictvs> ffgeek200b: Then it's a really bad API.
[19:22:49] <dmlloyd> yessss!
[19:22:59] <ffgeek200b> svm_invictvs, that's the problem w/ c/C++ you need api's here and there and not all of them are nice.
[19:22:59] <dmlloyd> just when I thought my efforts had failed...
[19:23:01] <Ven]n> like sysout("line1" \n "line") .. but I cant remember :p
[19:23:17] <svm_invictvs> a good API makes no assumtpion about how you allocate memory and lets the client code provide an allocator...
[19:23:24] <svm_invictvs> in some form or another.
[19:23:26] <dmlloyd> ~~ Ven]n strings
[19:23:26] <javabot> Ven]n, strings is http://java.sun.com/docs/books/tutorial/java/data/strings.html
[19:23:28] <reverend> Ven]n: seems like you forgot a lot more about java than how to embed newlines
[19:23:44] <svm_invictvs> ffgeek200b: What you said makes no sense. YOu need "APIs here and there?"
[19:24:00] *** claudio_ch has joined ##java
[19:24:02] <svm_invictvs> That's no different than Java...
[19:24:12] *** remu has quit IRC
[19:24:21] *** noss has left ##java
[19:24:27] *** Woot4Moo has quit IRC
[19:24:35] <ffgeek200b> svm_invictvs, java has a standard API for everything, C/C++ do not, so you are forced to get libraries from various sources and like an unregulated free market, some of them will not play nice. Java is like the well regulated free market you dream about, it ensures no such leaks
[19:24:53] <reverend> java has a standard API for everything?
[19:24:58] <svm_invictvs> ffgeek200b: Java doesnt' have standard APIs for everything.
[19:25:00] <ffgeek200b> most everything
[19:25:03] <ffgeek200b> Strings for one
[19:25:04] <reverend> ffgeek200b: wtf
[19:25:08] <Ven]n> reverend, nah.. ~lazy
[19:25:15] <ffgeek200b> strings is a huge thing
[19:25:16] <svm_invictvs> ffgeek200b: I had to download dizens of dependencies where I worked last...
[19:25:24] <svm_invictvs> ffgeek200b: C++ has a huge library for string manipulation.
[19:25:31] <ffgeek200b> svm_invictvs, and none of them leak memory
[19:25:33] <dmlloyd> ffgeek200b: only if what you're used to is punchcards and tape readers
[19:25:39] <reverend> ffgeek200b: first stop confusing C and C++, they're two different things
[19:25:41] <ffgeek200b> svm_invictvs, and not everyone uses it
[19:26:03] <ffgeek200b> the C++ string library is not used by everyone
[19:26:12] <blip99> hi, if i'm reading a file using fileinputstream, datainputstream and buffered reader. after i'm done i close the input stream. is it safe to open a new stream using those same objects ?
[19:26:19] *** TobiaszCudnik has quit IRC
[19:26:28] *** Galik has joined ##java
[19:26:44] <red-lichtie> blip99: closed is closed ...
[19:26:51] <blip99> or does it suffice to do something like "in = new FileInputStream..."
[19:27:02] *** Galik has left ##java
[19:27:14] <reverend> ffgeek200b: lots of people reinvent classes in the java api
[19:27:15] <svm_invictvs> ffgeek200b: And there's tons of java code out there reimplementing and reinventing functionality that exists in any dozens of frameworks.
[19:27:33] <red-lichtie> blip99: reusing variables is ok, but the instances are closed
[19:27:45] <svm_invictvs> ffgeek200b: Nothing you have brought up is valid criticism to specific C/C++ language features.
[19:28:06] <reverend> argh, please stop saying C/C++ :(
[19:28:21] <svm_invictvs> C++*
[19:28:28] *** UK-sHaDoW has joined ##java
[19:28:29] *** UT2K3 has quit IRC
[19:28:40] <ffgeek200b> reverend, and if they're good enough they're included in the standard api(concurrent), and there's version checking so everytying plays nice, and they are compatable with eachother via common classes (string)
[19:28:48] <blip99> red-lichtie, instances are closed as in I cannot make a new instance of a class and assign it the same name as an existing instance ?
[19:28:52] *** Levia_ has joined ##java
[19:28:52] <cheeser> dmlloyd: or building on top of openjdk's javac P^)=
[19:28:54] <krad> well both are not type safe
[19:28:54] <ffgeek200b> svm_invictvs, i've criticized the reality of large apps in C++
[19:29:00] *** Levia_ has quit IRC
[19:29:15] <ffgeek200b> of course in theory no one writes code that has a leak
[19:29:25] <red-lichtie> C++: multiple inheritance, pointers, no garbage collection, to name a few. Thousands if not millions of command line options that differ from platfomr to platfomr, etc.
[19:29:28] *** Gracenotes_away is now known as Gracenotes
[19:29:39] <svm_invictvs> ffgeek200b: You've criticized people who have used the language poorly. But poorly coded programs aren't unique to C, C++, Python, Java or any other language you can come up with.
[19:30:16] <ffgeek200b> svm_invictvs, poorly programmed C++ code will crash your code in unpredictable ways and leak memory. poorly programmed java code will give you a beautiful exception(even a null pointer exception).
[19:30:19] * cheeser criticizes svm_invictvs
[19:30:33] <pr3d4t0r> ~ridicule ffgeek200b.
[19:30:33] * javabot points at ffgeek200b and says "you're a 'tard"
[19:30:34] <svm_invictvs> cheeser: sory my spell chick is borken
[19:30:41] <cheeser> svm_invictvs: haha. nice.
[19:31:03] *** romanb has quit IRC
[19:31:05] <ffgeek200b> yes I guess that's what it comes down to. I'm a tard.
[19:31:13] <ffgeek200b> Well you're a poo poo head.
[19:31:13] *** UK-sHaDoW has quit IRC
[19:31:13] <svm_invictvs> O
[19:31:19] <svm_invictvs> I'm gonna have to agree with pr3d4t0r
[19:31:24] <pr3d4t0r> ffgeek200b: Talk to the 'bot, not me.
[19:31:33] <svm_invictvs> hm...I asked my friend to make me a 9 grid for me.
[19:31:34] <pr3d4t0r> ffgeek200b: In my opinion you're just inexperienced in Java :)
[19:31:39] <svm_invictvs> and yet...there's 12 tiles...
[19:31:46] <ffgeek200b> pr3d4t0r, how so?
[19:31:55] <pr3d4t0r> ffgeek200b: If you think that Java code will fail gracefully... yikes.
[19:31:57] <krad> in Java you can't any programming at the network layer
[19:31:59] *** teralaser has quit IRC
[19:32:15] <pr3d4t0r> ffgeek200b: You can find as many hairballs in Java code as in code written in any other programming language.
[19:32:17] <ffgeek200b> pr3d4t0r, it's much more graceful than C/C++.
[19:32:33] <pr3d4t0r> ffgeek200b: No. It just creates the illusion that it is.
[19:32:48] <RLa> krad, ?
[19:32:48] <pr3d4t0r> ffgeek200b: And Java lets morons be productive and not worry too much about resource management.
[19:33:02] <ffgeek200b> pr3d4t0r, in c++ you will get a null ptr bug and minutes later you'll see the bug manifest meanwhile you won't be able to track it down, nothing in java has that level of complexity
[19:33:05] <svm_invictvs> ffgeek200b: Just because you get some sort of exception doesn't mean you're any closer to solving a particular problem.
[19:33:18] <pr3d4t0r> ffgeek200b: In the end, though, you need as much understanding about how your code, the JVM, and the class libraries interact for the code to work well and degrade gracefully as in any other language.
[19:33:25] <ffgeek200b> svm_invictvs, of course not, but it's much more helpful
[19:33:32] <blip99> dangertools, I used ArrayLists as suggested but when i compile the program under linux i get a message saying "uses unchecked or unsafe operations.
[19:33:32] <blip99> "... so i recompiled with -Xlint and it tells me my arraylist.add calls are unchecked. I see that they could potentially return an IndexOutOfBoundsException however my entire code in this function is surrounded with try/catch(Exception e) so this shouldn't happen. any idea what else could be causing this complaint ?
[19:33:56] <svm_invictvs> ffgeek200b: Not really. I spent a day trying to figure out why Haddoop was throwing an NPE at me when the author really need to throw an IllegalStateException with a helpful message. Oops.
[19:34:05] <ffgeek200b> of course if we're all perfect then none of this matters. we just write perfect code all the time.
[19:34:08] <benJIman> blip99: You're probably using an ArrayList rather than an ArrayList<SomeType> ?
[19:34:18] <pr3d4t0r> ffgeek200b: I beg to disagree. Autoboxing conversions have created new opportunities for people to hose themselves. There are other issues with Java, especially when it comes to threading and resource allocation that are as bad as in any other language.
[19:34:26] <pr3d4t0r> Hrm...
[19:34:40] <ffgeek200b> svm_invictvs, I've spent weeks figuring out C++ memory corruption, running purify which was too slow, etc. you will have problems with java but not at that level
[19:34:47] <cheeser> ~interesting
[19:34:47] <javabot> this is all very interesting (not really) but please take it somewhere else.
[19:35:09] <ffgeek200b> meh we'll agree to disagree
[19:35:27] <svm_invictvs> I've never had that problem. I've never corrupted a heap so badly.
[19:35:33] *** jEvil has quit IRC
[19:35:48] <blip99> benJIman, are you saying I need to specify the type of the objects I will store in the ArrayList ? I'm just treating it as an autoexpanding array and i want to store a float or Float in each index
[19:35:51] <svm_invictvs> Even on the Wii I could find inconsistancies in the heap pretty quickly.
[19:36:19] <blip99> svm_invictvs, wait Wii as in Nintendo Wii ? you can run java code on that ?
[19:36:21] <benJIman> blip99: So are you using an ArrayList<Float> ?
[19:36:31] <svm_invictvs> blip99: C++
[19:36:32] <benJIman> blip99: You could post a testcase if you're not sure what's going on.
[19:36:46] <svm_invictvs> anyhow pr3d4t0r what's up?
[19:36:49] <blip99> ah no. I just said ArrayList al = new ArrayList. i'll try that now. thanks
[19:36:57] <krad> im ignorant when it comes to memory issues because java has taken care of most everything that deals with memory for me
[19:36:58] *** Tarantulafudge has quit IRC
[19:37:03] <pr3d4t0r> svm_invictvs: Just laughing.
[19:37:22] *** war10ck has quit IRC
[19:37:24] <pr3d4t0r> svm_invictvs: Busy with work and new projects. Setting up a company outside of the US so that I can move out of the country semi-permanently.
[19:37:33] <svm_invictvs> ah
[19:37:44] <svm_invictvs> semi-permanently?
[19:38:24] <pr3d4t0r> svm_invictvs: Yeah.
[19:38:38] <pr3d4t0r> svm_invictvs: Spend a few months out of the US, a few more here, go back and forth.
[19:38:45] <svm_invictvs> Ah yeah
[19:38:59] <pr3d4t0r> svm_invictvs: That's one of the reasons why I got my US citizenship. So that I could go elsewhere for extended periods of time if I wanted.
[19:39:32] <svm_invictvs> ah, yeah
[19:41:37] *** yeled has joined ##java
[19:41:40] *** squi has quit IRC
[19:41:49] *** squi has joined ##java
[19:42:52] <krad> java is purely evil, i dont want all of my objects to have default methods, in C++ the OOP contraints are more relaxed
[19:42:55] <svm_invictvs> This is funny...
[19:43:26] <svm_invictvs> krad: C++ makes no distinction between primitive types and objects.
[19:43:44] <dmlloyd> krad: that's right. I think you should just quit and go back to C++.
[19:44:02] <svm_invictvs> I have no love for Java, nor any for C++
[19:44:13] <svm_invictvs> (or any language for that matter)
[19:44:16] <dmlloyd> krad: use java's pure evil too long and it might permanently stain your soul
[19:44:17] <svm_invictvs> Whatever puts food on the table.
[19:44:57] <krad> dmlloyd, *nods*
[19:45:10] <svm_invictvs> I'm really curious what my artist was thinkin when I said, "Make me a 9 grid." and now I have a tileset with 12 tiles.
[19:45:22] <svm_invictvs> pr3d4t0r: So what game company were you telling me about?
[19:45:22] <dmlloyd> krad: so... bye!
[19:45:26] <svm_invictvs> the other day.
[19:45:38] *** dyodji has joined ##java
[19:46:02] <krad> and C++ will have a conditional GC in 0x
[19:46:17] * dmlloyd opens the door for krad
[19:46:29] <dmlloyd> ##c++ is down the hall to the left
[19:46:32] <svm_invictvs> krad: join ##Iso-C++ and let's continue this ;)
[19:46:47] <svm_invictvs> Okay, who in here knows what 9 grid is?
[19:47:01] <dmlloyd> I'm guessing a tic-tac-toe board
[19:47:08] *** mitchnull has joined ##java
[19:47:17] <krad> 9x9 array?
[19:47:32] <svm_invictvs> dmlloyd: Like for UI generation
[19:47:41] <dmlloyd> no idea
[19:47:47] <dmlloyd> tileset says "game" to me
[19:48:13] <svm_invictvs> It's like when you take an image, divide it into 9 sections and use that o make a scalable UI.
[19:48:15] <dmlloyd> maybe you should have been more straightforward :)
[19:48:20] <svm_invictvs> http://hempton.com/examples/scale9grid/
[19:48:44] <dmlloyd> oh, sure
[19:48:55] *** deinspanjer has joined ##java
[19:49:02] <dmlloyd> four corners, four borders, and a central area
[19:49:08] *** CrypticSquared has joined ##java
[19:49:16] <dmlloyd> for the record though, that page looks like crap without JS :)
[19:49:29] <dmlloyd> I've never heard that called a 9-grid before though
[19:49:57] <RLa> what does it have to do with java?
[19:50:23] *** josemoreira has joined ##java
[19:50:26] *** krad has quit IRC
[19:50:26] <svm_invictvs> Oh, I'm writing some code to render a 9 grid for my game.
[19:50:32] <deinspanjer> Hi folks, I'm just looking for a quick confirmation.. Is there any way that declaring a variable to be of type "Object" and then storing a new Long instance in it would require any more bytes of memory than it would if you declared the variable as type Long?
[19:50:45] <svm_invictvs> and my artist gave me an image with 12 tiles
[19:51:21] <cheeser> deinspanjer: uh...
[19:51:31] *** rlubke has joined ##java
[19:51:35] <cheeser> you want to use more memory for Long than is stricly necessary?
[19:51:39] <pr3d4t0r> svm_invictvs: Some company in NYC.
[19:51:49] <pr3d4t0r> svm_invictvs: I'm about to have a phone call with them in 7 minutes.
[19:51:58] <svm_invictvs> ah, cool.
[19:52:31] <dmlloyd> deinspanjer: that is sooo implementation-dependent. And anyway even if there were a few bytes difference, it wouldn't be a per-instance difference I'm sure. And even if it *was*, you'd probably need millions of them for it to matter. And even if you had millions, many, many other things would dominate memory usage at that point.
[19:52:46] <dmlloyd> in other words, stupid question. :)
[19:52:51] <deinspanjer> cheeser: No. The way I understood Java memory allocation, I felt that storing an instance of class Long in a variable declared as type Long would take exactly as many bytes as if you stored it in a variable declared as type Object.
[19:53:03] <deinspanjer> But someone else disagreed with me and I'm looking for validation of my understanding.
[19:53:26] <ernimril> deinspanjer: objects in java have overhead...
[19:53:28] <cheeser> the variable is always 32 bits
[19:53:33] *** UK-sHaDoW has joined ##java
[19:53:35] <cheeser> the objects they point to have varying sizes.
[19:53:36] <ernimril> deinspanjer: one class pointer and one monitor info
[19:53:43] <dmlloyd> deinspanjer: the kind of person who would raise something like that as an issue is the kind of person you really don't want to be working with.
[19:53:55] <cheeser> so Object o = new Long(5) is the same as Long l = 5;
[19:53:57] *** fragsworth has joined ##java
[19:54:11] <red-lichtie> deinspanjer: Stroing it a Object is worse, it use the same memory (i.e. Long) and you have to typecast it to Long to use it
[19:54:16] <svm_invictvs> pr3d4t0r: er, /msg?
[19:54:17] <fragsworth> is there a function to split a string into pieces based on a regular expression?
[19:54:27] <cheeser> ~javadoc Strin
[19:54:27] <javabot> I don't know of any documentation for Strin
[19:54:28] <cheeser> ~javadoc String
[19:54:28] <red-lichtie> s/Stroing/Storing/
[19:54:28] <javabot> cheeser: http://is.gd/6UoM [java.lang.String]; http://is.gd/iaWp [javax.print.DocFlavor.STRING]; http://is.gd/iaWp [javax.print.DocFlavor.STRING]
[19:54:32] *** cracki has joined ##java
[19:54:32] <deinspanjer> dmlloyd: This pertains to a data structure that is storing many millions of these objects, so yes, a few bytes and reduced overhead can make a difference.
[19:54:41] <pr3d4t0r> svm_invictvs: OKi.
[19:55:05] *** cracki has left ##java
[19:55:43] <dmlloyd> deinspanjer: trying to micro-engineer memory usage is never going to work out for you. Best bet: design it the *right* way first. Then, if a profiler is telling you that memory use is a problem, do something about it.
[19:56:02] <dmlloyd> never mind that in a lot of cases, storing millions of anything means you've got a design issue.
[19:56:45] <deinspanjer> cheeser: It sounds like you are agreeing with me. It sounds like there are a couple of dissenting opinions here though.. And of course dmlloyd telling me that I'm an idiot.
[19:57:00] <dmlloyd> but I contend that it's better to just have a big heap than to contort your code into a twisty mess to shave off a few bytes. RAM is cheap.
[19:57:12] <svm_invictvs> *shrug* I woudln't recommend an ArrayList<Long> for something like 64 DSP
[19:57:13] <cheeser> deinspanjer: the type of the reference has no bearing on the memory allocated.
[19:58:06] <svm_invictvs> dmlloyd: It woudlnt' be unreasonable to store something like a few megabytes in memory for something like a mesh.
[19:58:15] *** RLa has quit IRC
[19:58:17] <svm_invictvs> That woudl be a few million elements in some sort of data structure.
[19:58:41] <dmlloyd> sure. But in that case, wouldn't you just give the JVM enough RAM in the first place?
[19:58:45] <gabbah> Are u guys saying it's not a good idea to store the value of one million dollars as one million instances of a OneDollar class?
[19:58:46] <deinspanjer> red-lichtie: Thanks for pointing out the typecast requirement. I know it would take a few extra instructions to handle that, but I was wondering if maybe I might have been missing some extra hidden memory cost to the typecast.
[19:59:03] <dmlloyd> I guess if you're getting to the point where you're changing field types in the hopes of trimming a byte here and there, you're taking it too far
[19:59:11] <dmlloyd> I guess my point is that...
[19:59:16] <svm_invictvs> dmlloyd: Oh, yeah.
[19:59:26] <deinspanjer> dmlloyd: I know it can be frustrating to have someone come in here and ask a potentially loaded question when they don't give you lots of background to justify their case.
[19:59:41] <svm_invictvs> dmlloyd: I guess I was saying, it depends on your use case.
[19:59:59] <red-lichtie> deinspanjer: Can't get much smaller than "long[] values = new long[...]"
[20:00:19] <svm_invictvs> deinspanjer: Need to know more about what your'e doing I guess.
[20:00:25] <dmlloyd> yeah, long will use less bytes than Long for sure.
[20:00:34] <svm_invictvs> fewer bytes
[20:00:35] <dmlloyd> in fact I'd never really use Long for most things.
[20:00:42] <dmlloyd> svm_invictvs: whatever.
[20:00:45] <deinspanjer> dmlloyd: That said, this is an application that is designed to handle variable amounts of data and we have spent a lot of time collectively on the project making sure that we have designed the different pieces of it properly and have memory profiled with many different payloads and such.
[20:01:15] *** le_biloute has joined ##java
[20:01:24] *** lifecoder has joined ##java
[20:01:43] *** romanb has joined ##java
[20:01:53] <svm_invictvs> deinspanjer: Do you have an ArrayList<Long>?
[20:02:04] <svm_invictvs> that's getting to be a million elements or something?
[20:02:32] *** UK-sHaDoW has quit IRC
[20:02:36] <deinspanjer> This question pertains to an optimization that was made specifically for lookups of long values. In the cases where this can matter, you could easily require 16 to 64 GB of RAM to execute the process. In one of these cases, the next lowest hanging fruit is making sure that this data structure is efficient.
[20:03:12] <red-lichtie> deinspanjer: If you really want to save memory for repeating values use Long.valueOf(long) as it uses a cache for -127 to +128, instead of always using "new Long(value)"
[20:03:22] <deinspanjer> svm_invictvs: It is actually a native array of a tuple of Long,Long.
[20:03:31] <FauxFaux> I'm almost positive I just saw Sun's server jvm return memory to the OS (like, 2gb of it). I wasn't aware that it could do that, am I insane?
[20:04:00] <deinspanjer> svm_invictvs: My argument is that since we aren't using primitives, there is no savings vs having it be a tuple of Long,Object. And if it were Long,Object, the class would be more general purpose.
[20:04:02] <ernimril> FauxFaux: no, hotspot do return memory, a bit reluctantly (and rightfully so), but it does
[20:04:05] *** S3THST4 has joined ##java
[20:04:23] <EdwardIII> hrm looks like there's no channel for hsql
[20:04:33] *** gregor_k has joined ##java
[20:04:39] <FauxFaux> ernimril: Cool, okay. Thanks. :)
[20:05:12] <deinspanjer> FauxFaux: Note that if you specify a minimum heap size via the -Xms parameter, the JVM won't give that memory back.
[20:05:14] *** lowki has joined ##java
[20:05:21] <svm_invictvs> deinspanjer: I see. What is the second element in the tuple?
[20:05:36] <lowki> I'm having trouble getting my java to produce any sound
[20:05:42] <lowki> playing a clip
[20:05:47] <FauxFaux> Nah, giving it back is fine, I just didn't think hotspot could do it.
[20:05:57] *** red-lichtie has left ##java
[20:05:57] <deinspanjer> svm_invictvs: Now we're getting into details that take so long to explain that it would bore members of the channel and make them complain that I should leave. :)
[20:06:01] <lowki> it has a frameLength but nothing comes of it when I play on Eclipse
[20:06:03] <svm_invictvs> I see.
[20:06:25] <cheeser> <insert speaker volume joke here/>
[20:06:54] <bobbytek> <speakervolumjoke>poo! hehehe</speakervolumjoke>
[20:07:10] <deinspanjer> svm_invictvs: This data structure is used as a bucket for a very large sort job (on the key, the first member of the tuple). Right now, this structure can only be used if your key and your value are both Longs. If we made the value an Object reference, then the same structure could be used to sort Long keys with any payload.
[20:07:16] *** acuster has quit IRC
[20:07:28] <lowki> the clip plays fine with mplayer
[20:07:36] <svm_invictvs> deinspanjer: I see.
[20:07:44] <lowki> er the .wav file
[20:07:59] <lowki> but just not with java
[20:08:07] <lowki> :(
[20:08:32] *** claudio_ch has quit IRC
[20:08:50] *** AdrienC has quit IRC
[20:09:44] *** jEvil has joined ##java
[20:09:59] <lowki> is there any way of checking what device it's sending the sound to?
[20:10:15] <gabbah> deinspanjer, why not use generics for that class?
[20:10:39] <yeled> can someone help me understand how INADDR_ANY works in this context? http://java.sun.com/javase/6/docs/api/java/net/SocketOptions.html#SO_BINDADDR
[20:10:43] <gabbah> instead of going with object
[20:11:47] <yeled> ie. can i set the JVM to bind to an interface with an env var?
[20:12:43] *** monkeycid has quit IRC
[20:12:56] <csgeek> if I have several JFrames... I should be able to embed them in a JTabPanel, correct?
[20:13:53] *** IppatsuMan has joined ##java
[20:13:58] *** IppatsuMan has quit IRC
[20:14:24] *** marqueed has joined ##java
[20:16:18] <ernimril> csgeek: no
[20:16:47] *** vix85 has joined ##java
[20:20:41] *** elementz_ has joined ##java
[20:20:43] *** alvin_3 has joined ##java
[20:20:45] *** elementz_ has quit IRC
[20:25:13] <EdwardIII> hrm according to the HSQLDB documentation the default table type is 'MEMORY' which is persistent, but when my application exits my changes (i create a table and insert a sample row) aren't comitted to the HSQLDB .script file?
[20:25:20] *** wooli has left ##java
[20:25:50] <cheeser> i don't think "memory" gets saved
[20:26:13] *** genesiss has quit IRC
[20:26:26] <EdwardIII> hrm cheeser i'm not sure - the manual says "Memory tables are the default type when the CREATE TABLE command is used. Their data is held entirely in memory but any change to their structure or contents is written to the <dbname>.script file. The script file is read the next time the database is opened, and the MEMORY tables are recreated with all their contents. So unlike TEMP table, the default, MEMORY tables are persistent."
[20:26:44] *** teralaser has joined ##java
[20:27:17] *** Dandre has joined ##java
[20:27:23] <Dandre> Hello,
[20:27:47] <Dandre> How can I know the encoding charset of a file?
[20:27:57] <EdwardIII> Dandre: on linux: file <file> ?
[20:27:58] *** genesiss has joined ##java
[20:28:10] <Dandre> in java
[20:28:34] <EdwardIII> ah
[20:29:12] *** Resistance has joined ##java
[20:29:27] *** josemoreira has quit IRC
[20:30:07] <Dandre> or is there any way to read and write text files without any charset encoding/decoding?
[20:30:48] <EdwardIII> hrm cheeser i think my database might some how be designated 'memory only' mode - apparently that means MEMORY then becomes non-persistent
[20:31:07] <blahjake> Dandre: http://www.joelonsoftware.com/articles/Unicode.html
[20:32:20] <blahjake> Dandre: the short answer is no, there is no such thing as text without an encoding
[20:32:41] *** krad has joined ##java
[20:33:21] <Dandre> ok so I have a text file. How can I guess the encoding type (I am reading your ref ;-) )
[20:33:28] *** timte has joined ##java
[20:33:50] <EdwardIII> cheeser: ah.... no it was something else, it looks like it didn't comit my changes until i shutdown oddly
[20:34:06] <cheeser> that makes sense.
[20:34:58] *** sebrock has left ##java
[20:35:23] <EdwardIII> hrm although the manual says 'By default, new connections are in auto-commit mode.' shouldn't that mean that each change i make gets written?
[20:35:31] <blahjake> Dandre: some unicode encodings use leading bytes that indicate it, some others can be guessed based on statistical sampling techniques, i'm not sure what java libs are available to trying to do that
[20:35:43] <blahjake> for* trying
[20:35:52] *** chrome_ has joined ##java
[20:36:03] <chrome_> swinger is portable?
[20:36:03] *** S3THST4 has quit IRC
[20:36:42] <Dandre> ok My goal is to read a text file , do some simple modifications and then write this file.
[20:37:03] <Dandre> For instance, as a sample, a clone of dos2unix
[20:37:06] <rullie> EdwardIII: maybe without autocommit, your changes won't be commited when it shuts down.
[20:38:01] *** ojacobson has joined ##java
[20:38:04] <blahjake> Dandre: you'll usually get away with using FileReader
[20:39:07] *** matsebc has left ##java
[20:39:14] <EdwardIII> rullie: hrm so when developing software that uses small file-based databases is it usual to create your database object, do everything you wanted to do then call a shutdown on the object when you actually want these changes comitted?
[20:39:19] <rullie> for everything else, there's randomaccessfile
[20:39:19] *** CrypticSquared has quit IRC
[20:40:07] <rullie> EdwardIII: when to commit is an art
[20:40:08] <Dandre> in the FileReader doc:
[20:40:09] <Dandre> The constructors of this class assume that the default character encoding and the default byte-buffer size are appropriate
[20:40:26] <Dandre> what is considered as the default character encoding?
[20:40:39] <cheeser> varies by Locale
[20:40:46] <EdwardIII> rullie: heh yes i suppose it is - i guess it's always a trade off between being able to rollback or not having your changes made persistent if your app crashes or something?
[20:41:18] <rullie> EdwardIII: as well as synchronization with other threads reading the db
[20:42:09] <EdwardIII> rullie: ah ok. in my instance i'm writing a little test rss reader which eventually i hope to port to my blackberry so the latter shouldn't be an issue i'd've thought, it's single-user
[20:42:31] *** consmash has joined ##java
[20:42:35] <consmash> hi
[20:43:27] <rullie> oh, blackberries don't read rss?
[20:43:49] <EdwardIII> heh rullie it's more of an exercise
[20:43:56] *** romanb has quit IRC
[20:43:57] <EdwardIII> the browser has a built-in rss reader but it's basic
[20:44:02] <rullie> oh ok. i never had a smartphone so i wouldn't know
[20:45:16] <EdwardIII> i got some software called viigo which was pretty good but ad-supported so i thought it would be a good exercise and plus when it's finished i'll have a FOSS rss reader for my blickberry
[20:45:28] *** eidolon has left ##java
[20:45:32] <EdwardIII> well i say FOSS, i don't know what the impact of using java, the java api and possibly the blackberry api will have on this
[20:46:08] *** Nebulam has quit IRC
[20:46:30] <consmash> is it safe to decorate InputStream 'inp' with BufferedReader, do readLine() and later do read on raw InputStream 'inp'?
[20:46:37] <rullie> not that i know, but based on my thin knowledge, you probably don't want to do too much commit to disk on a mobile device due to power issue
[20:47:14] <EdwardIII> rullie: that makes sense but presumably you don't want to use too much memory either as they are somewhat lacking in that department too heh
[20:47:36] *** mitchnull has left ##java
[20:48:18] <rullie> whoa, blackberry don't got gigabytes of ram?!?! :p
[20:49:15] *** qizwiz has joined ##java
[20:49:28] <EdwardIII> but i know absolutely nothing about mobile development. i don't know how other stuff in the api scales down or the implications of importing 3rd party libraries (such as hsqldb), but at the moment i'm keeping it simple by developing the app for command line initially so as to learn the language
[20:50:29] <rullie> if it's a DK for mobile, then it should be ok?
[20:50:47] <EdwardIII> DK?
[20:50:52] <rullie> development kit
[20:50:52] <qizwiz> my code is not compiling in eclipse for some reason, so in desperation I moved it to emacs and now I'm absolutely lost without all the eclipse crutches.
[20:51:26] <cheeser> ~newbie ide
[20:51:26] <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.
[20:51:32] *** dmiles has joined ##java
[20:51:34] <cheeser> this is exactly why.
[20:51:35] *** dmiles_afk has quit IRC
[20:51:38] <rullie> eclipse's got pretty extensive static analysis showing you where the syntax problem is, mate
[20:51:51] <qizwiz> I've got two classes Scheduler and schedule (scheduler operates on schedules). I've got scheduler and schedule in the same package
[20:52:04] *** dude7064 has quit IRC
[20:52:05] <qizwiz> but schedule is not recognized.
[20:52:21] <qizwiz> I must be stupid about packages...
[20:52:50] <cheeser> not stupid. just ignorant. which, despite appearances, is quite different.
[20:53:05] <qizwiz> I'm not afraid of commandline tools....but everyone here at my office uses eclipse and I'm kind of socially forced to
[20:53:09] <cheeser> ~packages
[20:53:09] <javabot> please see http://java.sun.com/tutorial/java/interpack/packages.html and some examples http://javafaq.mine.nu/lookup?254
[20:53:36] <rullie> i have no choice but to use eclipse
[20:54:00] *** JohnBat26 has quit IRC
[20:54:02] <qizwiz> all I need, from what I understand, is to have my directory in the classpath, have the same package name for both files.
[20:54:09] <qizwiz> anything else?
[20:54:20] <EdwardIII> rullie: ah, well at the moment i'm developing without the mobile library just to explore how java works really. my next stage will be to try and get everything working off the midp mobile library
[20:54:45] <cheeser> qizwiz: whats not recognizing the other class, qizwiz ?
[20:54:58] <qizwiz> Scheduler has the main in it
[20:55:12] <qizwiz> and when I try to compile, schedule is not recognized
[20:55:25] <qizwiz> cannot find symbol
[20:56:20] <ffgeek200b> Java in general makes things very easy(synchronized keyword), but it's no susbstitution for knowing how synchronization is done underthe covers. multithreading in C/C++ is helpful since you really have to know what you're doing when working with pthread_*
[20:56:44] <rullie> ffgeek200b: do you have a point?
[20:57:10] <ffgeek200b> referring to cheeser's earlier point
[20:57:26] <rullie> qizwiz: why can't you compile your 2 class project in eclipse?
[20:57:36] <qizwiz> ~pastebin
[20:57:36] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[20:57:51] <qizwiz> main class is not recognized
[20:58:00] <qizwiz> er...not found
[20:58:02] *** Hink has joined ##java
[20:58:23] <rullie> qizwiz: can you trim your Scheduler down to a hello world and compile it alone?
[20:58:25] <Hink> is it possible in java to tell give a usb device power and then turn it off?
[20:58:32] <ffgeek200b> i've reverse engineered pthread mutex objects in solaris to find which thread as a lock, eclipse lock monitors make it easier but knowing the details helps
[20:59:30] <rullie> what detail? either A has the lock or B has the lock. :p
[21:00:05] <qizwiz> well, I've got a coworkers code (which never worked, but is better organized for my project than my own)...so I'm trying to debug hers block by block. The next block depends on schedule
[21:00:31] *** kane77 has joined ##java
[21:00:37] <rullie> qizwiz: you should get your 2 class project to compile first before debugging hers
[21:01:18] *** firen has joined ##java
[21:01:23] <qizwiz> mine actually compiles...but I had this ugly nested loop structure that makes the logic really ugly and tangled
[21:01:46] <rullie> oh, but a minute ago you said you couldn't compile it
[21:02:00] <qizwiz> I can't compile the one I'm interested in right now.
[21:02:15] <rullie> so it's not really just 2 classes
[21:02:44] <Hink> can you control power to a usb device using java
[21:02:59] <ffgeek200b> if you're doing a readwrite lock then it's actually implemented w/ a mutex under the covers, that could be useful if things are slow locking a mutex with a rw lock.
[21:03:05] *** monstrfolk has quit IRC
[21:03:32] <r0bby_> javabot: java ee
[21:03:32] <javabot> for a tutorial on java ee see http://java.sun.com/javaee/5/docs/tutorial/doc/
[21:03:33] *** monstrfolk has joined ##java
[21:03:33] *** Aquanox has joined ##java
[21:04:20] <rullie> do you mean a monitor by "mutex"?
[21:04:43] <qizwiz> actually, yes it is two classes. Mine is two classes...but what she has that doesn't work is better than what I have that's not giving me correct output at all
[21:05:08] <cheeser> ~~ qizwiz show us
[21:05:08] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[21:05:14] *** chrome_ has quit IRC
[21:05:26] <qizwiz> my last job was as a lisp developer at a startup. my java is really rusty.
[21:05:43] *** blip99 has quit IRC
[21:05:45] *** bas-i has joined ##java
[21:05:47] <ffgeek200b> rullie,a monitor is implemented with a mutex so yes
[21:05:51] <qizwiz> ~pastebin
[21:05:51] <javabot> http://www.papernapkin.org/pastebin Paste the final url after you've pasted your stuff there.
[21:05:55] *** lvh has joined ##java
[21:06:29] <lvh> hello
[21:06:33] <rullie> i have no idea what a mutex is in an implementation sense
[21:06:42] <lvh> What should I throw when someone gives me a bad argument?
[21:06:53] <lvh> I thought it was IllegalArgumentException, but apparently I'm mistaken.
[21:07:08] <rullie> you throw whatever you wanna throw, how can you be mistaken?
[21:07:31] <lvh> rullie: I thought there was a standard exception to throw for generic illegal arguments.
[21:07:34] <qizwiz> http://www.papernapkin.org/pastebin/view/4624/
[21:07:57] *** deinspanjer has left ##java
[21:08:40] *** cher has joined ##java
[21:09:38] <qizwiz> http://www.papernapkin.org/pastebin/view/4625/
[21:10:08] *** BW^- has joined ##java
[21:10:10] *** Deformati has quit IRC
[21:10:11] <BW^-> are MySQL database LOCK:s local to each Statement?
[21:10:17] *** _stijn_ has joined ##java
[21:10:28] <qizwiz> DBScheduler contains a lot of my original code commented out.
[21:10:52] *** _stijn_ has quit IRC
[21:11:07] <BW^-> ?
[21:11:15] *** _stijn_ has joined ##java
[21:11:23] <ffgeek200b> rullie, mutex is just a low level way of locking, http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html#SYNCHRONIZATION has more info
[21:11:35] <qizwiz> it also contains the code that I haven't gotten working yet
[21:11:52] *** _stijn_ has quit IRC
[21:12:10] *** _stijn_ has joined ##java
[21:12:43] <ffgeek200b> http://doc.trolltech.com/qq/qq11-mutex.html = how read lock is implemented under the covers
[21:12:56] *** pandora-- has joined ##java
[21:13:01] <cheeser> qizwiz: and the error?
[21:13:20] *** Yustme has joined ##java
[21:13:48] *** cico has joined ##java
[21:13:50] <qizwiz> DBScheduler.java:110: cannot find symbol
[21:13:52] <qizwiz> symbol : class Schedule
[21:13:53] <qizwiz> location: class scheduler.DBScheduler
[21:13:55] <qizwiz> private List<Schedule> getSchedules() {
[21:13:56] <qizwiz> ^
[21:14:14] <cico> Are the private methods of a base class inherited by its child class?
[21:14:15] <svm_invictvs> http://rymden.nu/exceptions.html
[21:14:19] <svm_invictvs> ~exceptions
[21:14:20] <javabot> svm_invictvs, exceptions is http://java.sun.com/tutorial/essential/exceptions
[21:14:34] <svm_invictvs> ~exception humor is <reply>http://rymden.nu/exceptions.html
[21:14:34] <javabot> OK, svm_invictvs.
[21:14:39] <svm_invictvs> ~exception humor
[21:14:39] <javabot> http://rymden.nu/exceptions.html
[21:14:43] <cheeser> qizwiz: don't paste here
[21:14:54] *** ScottG489 has joined ##java
[21:16:45] <r0bby_> qizwiz: no
[21:17:16] <r0bby_> protected, public, and package private (if in the same package as the name suggests)
[21:17:17] <cheeser> i don't see any code for DBScheduler.java
[21:17:21] <cico> can someone please help me with my question?
[21:17:26] <r0bby_> ~~ qizwiz access modifiers
[21:17:27] <javabot> qizwiz, access level is one of 'public' ,'private', 'protected', or default a.k.a. package private. They control which code is allowed to access the attribute / call the method. public means: Everybody, 'private' means: Only stuff in this source file. For more info, see ~public, ~private, ~package-private, and ~protected, and this link: http://is.gd/eJYt (sun.com)
[21:17:43] <r0bby_> er crap
[21:17:47] <r0bby_> cico: that was for you
[21:17:51] <cheeser> ~mock r0bby_
[21:17:51] * javabot points at r0bby_ and says "you suck!"
[21:17:52] <cheeser> 8^)=
[21:17:52] <qizwiz> you asked for the error
[21:18:01] <cheeser> qizwiz: you can pastebin errors, too.
[21:18:03] *** kater has joined ##java
[21:18:05] <cheeser> ~topicsmite qizwiz
[21:18:06] <javabot> And the wrath of /TOPIC descended with terrible fury upon qizwiz. And all the people marvelled, saying, Behold, we too should read the /TOPIC, lest we be stricken. And all the people read the /TOPIC, and went away edified.
[21:18:30] *** Aquanox has quit IRC
[21:18:32] *** Jimzy has quit IRC
[21:18:40] *** kater_ has quit IRC
[21:18:42] <qizwiz> I apologize.
[21:19:05] <cico> ~pastebin
[21:19:06] <javabot> http://www.papernapkin.org/pastebin Paste the final url after you've pasted your stuff there.
[21:19:16] <cico> ~javabot
[21:19:16] <javabot> for a FAQ and a quick tutorial on how to use javabot, see: http://javachannel.net/wiki/pmwiki.php/FAQ/Javabot
[21:19:26] <cico> ~cico
[21:19:26] <javabot> cico, I have no idea what cico is.
[21:19:30] <cico> ok
[21:19:41] *** kane77 has quit IRC
[21:19:56] <r0bby_> cico: was all that necessary? after the pastebin?
[21:20:14] <cico> actually, the pastebin was also not necessary.
[21:20:22] <qizwiz> anyway, does anyone see why it doesn't find schedule?
[21:20:29] *** kane77 has joined ##java
[21:20:29] <svm_invictvs> ParseException: YOu are not making any sense. Please calm down and try again.
[21:20:36] *** ernimril has quit IRC
[21:20:45] <r0bby_> cico: yes
[21:20:51] <r0bby_> your classpath is wrong
[21:20:55] <r0bby_> er qizwiz
[21:21:03] *** ankylose has quit IRC
[21:21:16] <qizwiz> ok
[21:21:29] <qizwiz> how so?"
[21:21:59] <rullie> ffgeek200b: is mutex pthread's way of saying a semaphore?
[21:22:37] <dmlloyd> no
[21:22:38] <r0bby_> qizwiz: java is case-sensitive
[21:22:50] <r0bby_> Schedule != scheduler
[21:22:51] <dmlloyd> a pthread mutex is like a java.util.concurrent.Lock
[21:23:08] <ffgeek200b> rullie, mutex is a way of ensuring that one thread can access code, or critical section
[21:23:12] <dmlloyd> pthread cond var is like java.util.concurrent.Condition
[21:23:19] <qizwiz> I understand that.
[21:23:31] <qizwiz> Scheduler and Schedule are in the package scheduler
[21:23:34] <r0bby_> well re-read your error
[21:23:36] <qizwiz> er
[21:23:45] <qizwiz> DBScheduler and Schedule are in the package scheduler
[21:23:49] <dmlloyd> UNIXy semaphores are implemented in java via java.util.concurrent.Semaphore
[21:24:02] <ffgeek200b> rullie, semaphore is a counter that counts up to n and you can have a function on it that waits for the count to go to zero. that's implementedu nder the covers w/ a mutex
[21:24:06] <r0bby_> qizwiz: but is that package on the classpath?
[21:24:34] <ffgeek200b> rullie, err underthe covers it uses a condition var
[21:24:44] <rullie> ffgeek200b: a counting semaphore you mean
[21:24:50] <ffgeek200b> rullie, yes
[21:24:54] *** ankylose has joined ##java
[21:25:04] *** boringwall has joined ##java
[21:25:22] *** EricHerman has joined ##java
[21:25:30] <r0bby_> qizwiz: note: that the directory parent directory of "scheduler" is the classpath, not scheduler itself
[21:25:33] *** Niike has joined ##java
[21:25:41] <r0bby_> qizwiz: note: that the parent directory of "scheduler" is the classpath, not scheduler itself
[21:25:43] <qizwiz> r0bby_: yes.
[21:25:45] <r0bby_> now it makes more sense
[21:26:03] <cheeser> just barely
[21:26:17] <qizwiz> my path is c:\documents and setting\myusername\java-test\scheduler
[21:26:27] <cheeser> ~~ qizwiz classpath
[21:26:27] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://is.gd/j4gM [sun.com] for more info.
[21:26:29] <r0bby_> java-test is your classpath
[21:26:34] <r0bby_> you didn't read what i wrote AT ALL.
[21:26:44] <cheeser> r0bby_: you didn't either. 8^)=
[21:26:47] <qizwiz> and I just added it to my classpath and tested again
[21:26:48] <r0bby_> i did
[21:26:56] <r0bby_> c:\documents and _W_ setting\myusername\java-test\ is your path.
[21:27:11] <r0bby_> cheeser: i fixed it sort of
[21:27:15] *** EricHerman has left ##java
[21:27:39] <consmash> actually, is it correct to read() from arbitrary object in stream chain or only the last chained object?
[21:28:20] <qizwiz> so my classpath should also have \scheduler tacked on?
[21:28:27] <r0bby_> qizwiz: no more problems should exist
[21:28:32] <r0bby_> NO
[21:29:02] <r0bby_> scheduler should just be a directory inside of that directory in your path
[21:29:34] <r0bby_> /path/to/foo for a package foo; now /path/to is what i set as my classpath
[21:30:08] <qizwiz> and if I have both in my classpath?
[21:30:15] <r0bby_> don't put both.
[21:30:18] <r0bby_> just put one
[21:30:27] <r0bby_> c:\documents and _W_ setting\myusername\java-test\ is your path.
[21:30:30] *** AbsintheSyringe has joined ##java
[21:30:32] <r0bby_> I gave you the exact path to use
[21:30:46] <qizwiz> so java-test is the classpath, but the files should be in java-test\scheduler
[21:30:54] <r0bby_> yes
[21:30:59] <AbsintheSyringe> I'm in process of learning java, and I have problem I just cannot solve: http://paste.debian.net/29131/
[21:31:00] <qizwiz> ok
[21:31:07] <r0bby_> it'll look for scheduler inside java-test
[21:31:12] <qizwiz> thank you, sir (or ma'am)
[21:31:15] <r0bby_> sir :)
[21:31:29] *** romanb has joined ##java
[21:31:50] <rullie> AbsintheSyringe: 2 class in 1 file
[21:32:48] <AbsintheSyringe> rullie, k, let me try seperating those two
[21:33:06] *** Odin79 has joined ##java
[21:33:07] <rullie> you gotta put HelloComponent2 in HelloComponent2.java
[21:33:26] *** boringwall has quit IRC
[21:33:28] *** lifecoder has quit IRC
[21:33:56] <qizwiz> CLASSPATH=.;c:\java\jdk1.5.0_06\lib;c:\sqldeveloper\jdbc\lib\ojdbc5.jar;"c:\Documents and Settings\myusername\java-test\scheduler"
[21:34:05] *** boringwall has joined ##java
[21:34:12] <qizwiz> and still doesn't work *sigh*
[21:34:36] <qizwiz> oh shit
[21:35:55] *** codethief has quit IRC
[21:36:11] <r0bby_> qizwiz: don't do that
[21:36:25] *** mmc has quit IRC
[21:36:37] <r0bby_> you DO NOT need CLASSPATH
[21:36:57] <r0bby_> just do javac -cp .:;c:\sqldeveloper\jdbc\lib\ojdbc5.jar;"c:\Documents and Settings\myusername\java-test\ ...
[21:37:01] <r0bby_> you STILL didn't listen to me
[21:37:11] <r0bby_> do it that way
[21:37:26] <r0bby_> and to run it just do java -cp .:;c:\sqldeveloper\jdbc\lib\ojdbc5.jar;"c:\Documents and Settings\myusername\java-test\ ...
[21:37:37] <AbsintheSyringe> rullie, believe it or not, this actually fixed it http://paste.debian.net/29134/
[21:37:38] <r0bby_> damn it remove the first : after .
[21:37:49] *** Copter has quit IRC
[21:40:27] <qizwiz> r0bby_: I'm listening to you and getting the same result. I've done exactly as you've suggested
[21:40:58] <r0bby_> and to run it just do javac -cp .;c:\sqldeveloper\jdbc\lib\ojdbc5.jar;"c:\Documents and Settings\myusername\java-test\ ...
[21:41:20] <qizwiz> I can't get it to compile yet
[21:41:21] *** Tempoe has joined ##java
[21:41:27] <r0bby_> and to run it just do javac -cp .;c:\sqldeveloper\jdbc\lib\ojdbc5.jar;"c:\Documents and Settings\myusername\java-test\ ...
[21:41:34] <r0bby_> that should work.
[21:41:46] <r0bby_> that's how you do it :)
[21:42:22] <qizwiz> ok, I was wrong
[21:42:36] <qizwiz> I still had scheduler tacked onto the end
[21:43:14] <r0bby_> yes you did.
[21:44:21] <surial> Okay, so this: " <copy todir="dist"><path refid="javax.mail" /></copy> " in my ant file does nothing (no error, no copy), eventhough that path refid works, otherwise the javac task would have bombed.
[21:44:22] <surial> WTF?
[21:44:23] <cheeser> qizwiz: you don't need the lib dir fromt he jdk in your classpath
[21:45:02] <qizwiz> ok, so do I need anything from the jdk?
[21:45:05] <cheeser> surial: does copy support a path? i'd think you'd need to conver that to a fileset
[21:45:11] <cheeser> qizwiz: it comes for free
[21:45:13] <cheeser> brb
[21:45:14] <surial> The manual says that is does.
[21:45:20] <Dandre> Why is setting JAVA_HOME so important?
[21:45:27] <surial> But how do I convert it to a fileset? The fact that copy takes paths, filesets, and files, is a WTF moment for me anyway.
[21:45:31] <surial> Dandre: It's not.
[21:45:51] *** antipivo has joined ##java
[21:46:23] <Dandre> I have an ant script that doen't run if it isn't set
[21:47:22] <antipivo> how determine length char massive?
[21:48:37] *** Copter has joined ##java
[21:48:46] *** lem has left ##java
[21:51:40] *** Junior has quit IRC
[21:52:27] *** Odin79 has quit IRC
[21:53:23] *** ries has quit IRC
[21:53:47] <reverend> antipivo: it's 1 char long
[21:55:08] <svm_invictvs> hm...
[21:55:11] *** boringwall has quit IRC
[21:55:23] <svm_invictvs> I wonder why Java pacakges can't have a "-" in the name :(
[21:55:36] *** _stijn_ has quit IRC
[21:55:53] <svm_invictvs> dmlloyd: I think I'm gonna try to use XNIO
[21:55:55] <svm_invictvs> ~xnio
[21:55:55] <javabot> svm_invictvs, xnio is an NIO replacement framework, which keeps Channels but does away with Selectors, developed by ##java's very own dmlloyd. The project can be found at http://www.jboss.org/xnio - have fun!
[21:56:30] <antipivo> I have char[] mass, his length may 100 or 200 or N, I wont get count elements this array
[21:56:44] <blahjake> ~arrays
[21:56:44] <javabot> blahjake, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[21:56:51] <dmlloyd> svm_invictvs: atta boy!
[21:56:57] *** jdolan_ has quit IRC
[21:57:03] <svm_invictvs> dmlloyd: Writing a dict client
[21:57:18] *** prophet05 has joined ##java
[21:57:22] <r0bby_> Dandre: because ant uses it
[21:57:47] <r0bby_> besides setting it makes updating PATH easier
[21:58:13] <svm_invictvs> dmlloyd: Is tehre a "Getting STarted" doc or something?
[21:58:17] <dmlloyd> nope
[21:58:18] <Dandre> ok but is there any way for ant to guess from the java full path?
[21:58:52] *** ShadowHntr has joined ##java
[21:58:54] <r0bby_> Dandre: why is setting ONE environment variable so hard for you?
[21:58:54] *** bindaas has quit IRC
[21:58:57] <surial> yes, apps can easily determine it. ant just doesn't do it. i sucks that way.
[21:59:12] <r0bby_> it actually makes your life easier
[21:59:55] <svm_invictvs> dmlloyd: never actually used nio at any advanced level :)
[22:00:09] <surial> r0bby_: Don't complain about the fact that I'm slamming your face into this wall. I'm making your life easier.
[22:00:12] <svm_invictvs> god damnit. A few months ago svminvictvs.net wasn't available and i registered svm-invictvs.net
[22:00:32] <r0bby_> surial: oh dear. So hard to learn to use your OS
[22:00:32] <repnop> you lucked out
[22:00:36] <repnop> pick it up ;p
[22:00:41] <surial> r0bby_: That's not what you said.
[22:00:42] <dmlloyd> don't worry. you could still use net.svm_invictvs
[22:00:54] <surial> r0bby_: You insinuated that being incapable of finding javac without a JAVA_HOME was somehow a good thing.
[22:01:12] <r0bby_> ideally it should use path
[22:01:12] <svm_invictvs> dmlloyd: Or I could register svminvictvs.net
[22:01:12] *** sphenxes has joined ##java
[22:01:14] <Dandre> ok
[22:01:23] <dmlloyd> whatever floats your boat
[22:01:26] <svm_invictvs> Is having an underscore in a package name inappropriate?
[22:01:33] <dmlloyd> some might find it so
[22:01:45] <svm_invictvs> I could find it a com.namazustudios project ;)
[22:01:56] <r0bby_> com.evilpeople.r0bby;
[22:02:05] <r0bby_> if only i owned that domain name
[22:02:59] <svm_invictvs> dmlloyd: Is xnio in the jboss maven repo?
[22:03:05] <dmlloyd> yes
[22:03:14] <dmlloyd> org.jboss.xnio xnio-api and xnio-nio
[22:03:21] <Stephmw> dmlloyd: are you pimping it at every occasion?
[22:03:28] <dmlloyd> Stephmw: he brought it up!
[22:03:47] <r0bby_> and anything to inflate his ego
[22:03:49] <Stephmw> dmlloyd: just giving you easy questions to answer :)
[22:03:51] <dmlloyd> but yeah, I am
[22:03:53] *** bowman has joined ##java
[22:03:54] <r0bby_> albeit it's a good thing
[22:03:55] <dmlloyd> for sure
[22:04:00] <Stephmw> r0bby_: as long as it's just his ego
[22:04:04] <svm_invictvs> dmlloyd: oh, it's separated into impl and api?
[22:04:08] <dmlloyd> yeah
[22:04:13] <r0bby_> Stephmw: pervert
[22:04:23] <dmlloyd> you'll thank me later, when there's xnio-native!
[22:04:26] <dmlloyd> zooooom
[22:04:33] *** LordMetroid has joined ##Java
[22:04:44] <r0bby_> nutjob
[22:04:47] <dmlloyd> then you'll be able to use it with serial ports and unix domain sockets too
[22:05:00] <svm_invictvs> dmlloyd: Like when I watch the needle on my bike reach 12k :)
[22:05:23] <dmlloyd> what does that indicate?
[22:05:29] <bowman> Hi all. I'm facing a weird problem with Java 6u12, AWT, Spring on WinXP. I have a bean of type java.awt.Color with 3 ctor args, each with value 255. This is supposed to become the color "white". Running on 6u12 uses the float ctor of Color though, which leads to an IllegalArgumentException, while running on jdk5 causes no problems at all. Anyone seen similar behaviour?
[22:05:43] <Stephmw> r0bby_: yes?
[22:05:56] <Stephmw> r0bby_: I work in IT, it's an occupational hazard
[22:05:59] <r0bby_> Stephmw: just making sure you know you're a sicko
[22:06:09] <svm_invictvs> dmlloyd: RPM
[22:06:10] *** Carnage\ has joined ##java
[22:06:23] <r0bby_> pot kettle black sureeee but just you have to know it :0
[22:06:30] <dmlloyd> bowman: yeah, that's not good. Are you sure you're passing in floats? can you pastebin a sample?
[22:06:34] <dmlloyd> svm_invictvs: oh. motorcycle.
[22:06:36] *** Zhig has quit IRC
[22:06:57] <bowman> dmlloyd: sure, hang on
[22:07:08] *** Thorn has quit IRC
[22:07:34] <svm_invictvs> jboss-xnio
[22:07:34] <svm_invictvs> hm
[22:07:45] <surial> r0bby_: It should, in order, use JAVA_HOME, then use the java 'find javac for me' device in java 1.6, then check the local environment and find it that way using some JNI / System.getProperty("os.arch and friends") magic, such as looking in /System/Library/Frameworks/JavaVM.Frameworks/Versions/Current/Home" on macs, then it should scour the path, and finally it should give up.
[22:08:02] *** Vicfred has joined ##java
[22:08:23] <r0bby_> on windows it should look in C:\program files\java\...
[22:08:27] *** Meddi has joined ##java
[22:08:43] <dmlloyd> svm_invictvs: it's not jboss-xnio, or at least, it shouldn't be
[22:08:43] <r0bby_> but i may install it in a non-traditional location
[22:09:44] <Meddi> Hi guys. URL: http://pastebin.com/m2f12c7d <---- I get ConcurrentModificationException on line 34. Any idea why ?:\
[22:10:09] <surial> Correction: It should scour the path before doing the 'look in the usual locations per OS' trick. Also, on windows it's not C:\program files\java. It's the location as set in the windows registry. The key is something like HKEY_PROGRAMS/Sun/java/Versions/Latest or something
[22:10:12] <bowman> dmlloyd: http://pastebin.com/m3480a14d - this is the spring beans snippet I use. I tried explicitly telling Spring to use java.lang.Integer as the type for the arguments, but that causes a different problem: no suitable constructor can be found. Originally, the 255's are integer values of course, so I have NO IDEA why the float constructor is called.
[22:11:07] <svm_invictvs> dmlloyd: oh, i'm a dunce. I forgot to add the repo
[22:11:07] <dmlloyd> bowman: oh, yeah it's a spring bug then. Try telling it you want to use "int". It's probably just grabbing the first likely constructor, and the iteration order happens to be different on that JDK
[22:11:13] <surial> On macs, the location is not modifiable by the user. os x auto updates just dumps JREs in there, and you can pick what the /usr/bin/java softlink points to in the java settings panel. Which is all considered nice when you need to go find the local JDK to use. It also helps that os x auto update puts entire JDKs in there, not just JREs.
[22:11:28] <r0bby_> Meddi: add/remove using the Iterator.
[22:11:49] *** LostMonarch has quit IRC
[22:11:51] <r0bby_> you changed the state mid-way through
[22:11:52] <bowman> dmlloyd: that would explain quite a lot - just like in another project we are testing on Java 6 right now, where PDF fields are shuffled because they rely on the order of a ... HashMap I think ;)
[22:12:00] <dmlloyd> argh
[22:12:23] *** cico has quit IRC
[22:12:29] <Meddi> r0bby_ : do you reckon using a while loop of the form while(!configurationsToCheck.isEmpty()) { } instead of the iterator would be succifient?
[22:12:41] <r0bby_> Meddi: you can't add/remove when using an iterator unless you do it through the iterators add/remove method
[22:12:45] <r0bby_> Meddi: no see above
[22:13:00] <Meddi> ohh
[22:13:43] <Meddi> let me try
[22:14:24] *** prophet05 has quit IRC
[22:14:25] <bowman> dmlloyd: funny enough, the very same Color thing just runs fine on 6u12 on a linux system. :D
[22:14:45] <Meddi> r0bby_ : Isnt there a way to specify the index when adding through the iterators ?
[22:14:54] <Meddi> Because I want to add the element at the end of the arraylist
[22:14:56] <Stephmw> bowman: I wouldn't be surprised if the ctor traversal order isn't guaranteed
[22:15:07] *** BW^- has quit IRC
[22:15:16] *** marqueed has quit IRC
[22:15:42] <r0bby_> Meddi: what are you trying to do?
[22:16:12] <bowman> Stephmw: me neither, especially because I don't know if a) this would be desired and b) because the Spring version used in this project is quite old.
[22:16:16] <Meddi> if a configuration is found which has not yet been examined, i want it to be added at the end of the array list
[22:16:36] <Meddi> and that configurtion is checked when its turn comes
[22:16:49] <r0bby_> you COULD do this using a using a field
[22:16:58] <r0bby_> setting the field on that instance in the list..
[22:17:10] <r0bby_> such foo.next().setChecked(true);
[22:18:32] <Meddi> yes but I want to examine them in the order they are found. I dont want the last one found to be the first to be checked
[22:18:35] *** ridoo has quit IRC
[22:18:56] <r0bby_> Meddi: also: .size()-1
[22:19:05] *** tds5016 has joined ##java
[22:19:08] <r0bby_> NOT .size()
[22:19:16] <r0bby_> same as arrays
[22:19:22] <tds5016> hello all. I am back again with my class path issue.
[22:19:45] <r0bby_> okay ask
[22:19:59] <Meddi> i tried size()-1 but I remember it puts it at position size()-1 and the element who was at that position is shifted one position towards the arraylist end
[22:20:19] <r0bby_> that should go out of bounds
[22:20:33] <Meddi> it doesnt :S
[22:20:39] <r0bby_> unless it behaves differently
[22:20:40] <Meddi> let me try again
[22:20:48] <r0bby_> Meddi: don't use an Iterator
[22:20:57] <Meddi> ok
[22:21:14] <r0bby_> or use a seperate list
[22:21:16] <Meddi> shall I use a loop which checks emptiness instead as I mentioned above? or could you recommend me anything better?
[22:21:18] <r0bby_> a copy
[22:21:39] <r0bby_> List<Arrow> temp = new ArrayList<Arrow>(configurationsToCheck);
[22:21:56] <bowman> well thank you all, you made my day a lot brighter :-)
[22:22:08] <r0bby_> i don't know, i didn't read much past your actual problem
[22:22:19] <Meddi> oh ok, alright let me try and see how it goes
[22:22:23] <Meddi> thank you lots
[22:22:24] <r0bby_> I knew what to look for
[22:22:28] *** Levia has quit IRC
[22:22:55] *** magentar has quit IRC
[22:22:56] <tds5016> Is there a way to add a jar to the class path in Eclipse?
[22:23:08] <tds5016> cheeser: will yell at me, but that's really the best solution for me right now.
[22:23:19] <tds5016> I tried adding it to the build path, but that didn't work :-/.
[22:23:21] <rullie> tds5016: http://www.cs.duke.edu/courses/cps004g/fall05/assign/final/addlibrary.html
[22:23:30] *** blankthemuffin has quit IRC
[22:23:46] <tds5016> thanks rullie
[22:23:48] <cheeser> tds5016: yeah. eclipse is really working well for you isn't it?
[22:23:54] * cheeser shakes his head
[22:23:56] <tds5016> that's what I did, and it's still giving me the error saying that the drive isn't there.
[22:24:04] * Meddi uses netbeans - is it better than eclipse?
[22:24:14] <rullie> Meddi: it's faster, imo
[22:24:30] <rullie> i like eclipse's debugger better though
[22:24:31] *** Levia has joined ##java
[22:24:33] <Meddi> I would use editpad if I could but netbeans makes everything so much easier :p
[22:24:37] <vol> ~holy wars
[22:24:37] <javabot> vol, I have no idea what holy wars is.
[22:24:40] <vol> ~holywars
[22:24:40] <javabot> vol, I have no idea what holywars is.
[22:24:43] <vol> ... really?
[22:24:47] <r0bby_> tds5016: ~ide wars
[22:24:50] <r0bby_> er
[22:24:52] <r0bby_> ~ide war
[22:24:52] <javabot> vi is shit, see http://xkcd.com/378/ for further details.
[22:24:58] <tds5016> sorry for starting any wars... I just need a solution that works.
[22:25:16] <tds5016> I see it listed under Libraries.
[22:25:16] <r0bby_> tds5016: your solution would be using a text editor and the command line and understand the classpath
[22:25:23] <tds5016> and I see com.mysql.jdbc.Driver
[22:25:28] <r0bby_> #eclipse can help you
[22:25:33] *** tom17bombadil_ has quit IRC
[22:25:50] <rullie> tds5016: did you import it in the class?
[22:25:52] <tds5016> and it just WILL not find it when I do Class.forName("com.mysql.jdbc.Driver").newInstance();
[22:26:16] <r0bby_> tds5016: does it work outside of eclipse?
[22:26:25] <r0bby_> Note: you SHOULD be able to survive w/o eclipse
[22:27:06] <tds5016> r0bby_: I know I'm going to get yelled at... but this is a Servlet, and I dunno how to deal with servleys outside of eclipse.
[22:27:43] <cheeser> tee hee hee
[22:27:54] <cheeser> working quite well, it seems.
[22:28:02] *** antipivo has left ##java
[22:28:05] <cheeser> you don't need to call newInstance()
[22:28:06] <tds5016> r0bby_: I'm unfortunately a bit of a pragmatist. I'm ideally looking for this to work now, and then I'll play around with personal projects to learn it later.
[22:28:12] <tds5016> will smaller things :-/. I'm sorry.
[22:28:27] * tds5016 removes newInstance();
[22:28:27] <cheeser> yeah. *that's* the pragmatic approach
[22:28:34] * cheeser mourns for his industry
[22:29:08] *** bowman has quit IRC
[22:29:54] <tds5016> sorry cheeser I am trying to learn :-/.
[22:30:10] <cheeser> no, you're not.
[22:30:11] <tds5016> normally I wouldn't write this type of app in java at all to be honest.
[22:30:30] <r0bby_> tds5016: you CAN write a small class that will do what you're doing?
[22:31:05] *** TobiaszCudnik has joined ##java
[22:31:07] <tds5016> I could. It'll give me the same error though, I'd imagine.
[22:31:12] *** Tarantulafudge has joined ##java
[22:31:16] <cheeser> because you lack imagination
[22:31:19] <Tarantulafudge> reisi: you there?
[22:31:50] <tds5016> cheeser: sorry for making you hate me.... I'm not trying to be stupid; it just comes natural.
[22:31:51] *** _acid__ has joined ##java
[22:32:08] <cheeser> i don't hate you, at all.
[22:32:13] <tds5016> okay, good news.
[22:32:23] <tds5016> you just wished I'd grow a brain and avoid the IDE ;-). haha.
[22:32:24] *** Dandre has left ##java
[22:32:40] <Tarantulafudge> reisi: you said something about having mms experience?
[22:32:47] <cheeser> but you're in a headlong rush to get shit done without the slightest clue as to what you're doing and yet you refuse to take a minute to try to figure it out.
[22:33:08] * pfn wishes IDEs had better tutorials/websites so that people would stop bugging ##java
[22:33:45] <tds5016> well, cheeser the biggest issue is that I want to figure out how to solve the problem the way I approached it.
[22:34:00] <tds5016> I'll figure out how to do it without the compiler later.
[22:34:06] <tds5016> and I actually will.
[22:34:14] <cheeser> you'll need the compiler. the IDE you could do without.
[22:34:47] <tds5016> which is what I meant.
[22:34:48] *** squi has quit IRC
[22:34:53] <tds5016> (sorry, didn't get much sleep last night)
[22:34:59] <cheeser> "this path is frustrating and full of heartache and even those to whom I turned to for help have suggested better paths, i'm gonna see this one through." brilliant!
[22:35:39] <rullie> cheeser: let him be, it's the essence of tias
[22:35:40] <tds5016> well, I'm interested in how to solve it this way now.
[22:35:42] <tds5016> that's the problem.
[22:36:07] <cheeser> rullie: yeah, there's always /ignore. but he *did* ask me. again. 8^)=
[22:36:12] <tds5016> http://www.cs.duke.edu/courses/cps004g/fall05/assign/final/addlibrary.html that IS the way that it should be done with eclipse though, right?
[22:36:19] <rullie> cheeser: pretend you're away
[22:36:24] <cheeser> rullie: what's that?
[22:36:31] *** Draiven has joined ##java
[22:36:34] <pfn> tds5016, who knows, it's eclipse, not java :p
[22:36:45] <tds5016> heh, you're right.
[22:36:45] <r0bby_> cheeser: what you do when I talk to you :P
[22:36:47] <cheeser> tds5016: try #eclipse
[22:36:49] <tds5016> essentially I am asking the wrong room.
[22:36:58] <Sou|cutter> tds5016: But yes, that page is correct
[22:37:01] <cheeser> r0bby_: destroy stuff in my office?
[22:37:01] <tds5016> and by room I mean channel.
[22:37:12] <Sou|cutter> tds5016: I hope you don't google for help, and for each page ask us if it is correct, though
[22:37:14] <r0bby_> cheeser: That's personal
[22:37:23] *** vix85 has quit IRC
[22:37:25] <tds5016> Sou|cutter: I don't.
[22:37:37] <r0bby_> tds5016: google until you're mentally exausted
[22:37:51] <r0bby_> Don't ask for help until you've done that
[22:37:55] <tds5016> Sou|cutter: I've been doing that for the past 2 hours, and I wanted to make sure I wasn't doing the wrong thing that long.
[22:38:02] *** elementz is now known as elementz_
[22:38:02] <tds5016> and waste a whole lot of more time.
[22:38:06] <r0bby_> ~~ tds5016 jdbc
[22:38:06] <javabot> tds5016, jdbc is Java DataBase Connection, the standard java API for communicating with databases using embedded SQL commands. See http://java.sun.com/tutorial/jdbc
[22:38:11] <r0bby_> has a tutorial
[22:38:15] <Sou|cutter> wow, 2 hours
[22:38:34] <r0bby_> "loading jdbc driver"
[22:38:55] <tds5016> Sou|cutter: I've been trying to figure out if that was the right thing for what I wanted for the past two hours rather.
[22:39:17] * cheeser twitches
[22:39:27] * r0bby_ hugs cheeser
[22:39:34] <r0bby_> quit twitching you're scaring me :P
[22:40:09] <r0bby_> okay time to go play with spring mvc
[22:40:22] <pfn> spring mvc? but why
[22:40:45] <rullie> swing mvc is alot more fun
[22:40:51] <cheeser> surial: btw, i put in your patch last night. after I debugged it.
[22:40:52] <cheeser> 8^)=
[22:41:36] <surial> got the mail. buggy? awww...
[22:42:12] <r0bby_> I've never submitted buggy code.. Just code with random characters in it
[22:42:35] <r0bby_> pfn: not my decision
[22:42:53] <cheeser> surial: the $C doesn't work because I toLower() factoid lookups. so i changed it to $^
[22:42:59] <pfn> r0bby_, got a job? congrats--and I fear for your employer ;-)
[22:43:03] <r0bby_> er no
[22:43:11] <r0bby_> google summer of code project i never finished
[22:43:28] <r0bby_> and i'm the only one that has to touch this code
[22:43:30] <pfn> in that case, I fear for that soc project
[22:43:38] <pfn> and you chose spring mvc?
[22:43:44] <r0bby_> er no
[22:43:50] <r0bby_> http://openmrs.org
[22:43:55] <r0bby_> remember docpaul?
[22:44:07] <cheeser> the beatle?
[22:44:10] <cheeser> oh, that's *sir* paul
[22:44:11] <r0bby_> er no!
[22:44:14] <rullie> wtf?!
[22:44:20] <rullie> someone's life is in r0bby_'s hand?!
[22:44:29] <r0bby_> rullie: not entirely
[22:44:32] <pfn> vaguely
[22:44:53] <r0bby_> just implementing a system similar to grails
[22:45:11] <r0bby_> class Foo { Patient p; Date dob; } -> I generate a view/controller
[22:45:20] <r0bby_> in groovy
[22:45:23] *** analyser has quit IRC
[22:45:41] <surial> googlelucky foo bar
[22:45:42] <surial> w00t.
[22:45:47] <surial> ~googlelucky foo bar
[22:45:48] <javabot> http://www.google.com/search?btnI=&q=foo+bar&ie=UTF-8&oe=UTF-8
[22:46:06] <r0bby_> ~info googlelucky
[22:46:06] <javabot> I have no factoid called "googlelucky"
[22:46:11] <r0bby_> what is googlelucky...
[22:46:18] <r0bby_> what is googlelucky $1
[22:46:23] <r0bby_> ~info googlelucky $1
[22:46:23] <javabot> I have no factoid called "googlelucky $1"
[22:46:45] <cheeser> the google operation picks up on that.
[22:46:54] <cheeser> ~google foo bar
[22:47:05] <javabot> http://letmegooglethatforyou.com/?q=foo+bar
[22:47:05] <cheeser> or maybe not
[22:47:05] <cheeser> 8^)=
[22:47:30] <AMcBain> surial: not a bad player ...
[22:47:32] <r0bby_> ahhh
[22:47:43] <r0bby_> you have two operations?
[22:47:57] <AMcBain> I have .9.5.5
[22:48:14] <AMcBain> hmm, that makes it old, by that listing.
[22:48:29] <tds5016> so apparently I have to add it to the runtime path too.
[22:48:31] <tds5016> btw.
[22:48:40] <r0bby_> why yes you do!
[22:48:57] <r0bby_> if you took a second to learn classpath before jumping into an IDE you'd know this
[22:49:08] <tds5016> yes *hangs head in shame*
[22:49:35] <r0bby_> knowing how to use the tools++
[22:49:48] *** vpit3833 has joined ##java
[22:50:08] <surial> ~info googlelucky $+
[22:50:08] <javabot> googlelucky $+ was added by: surial on 02-24-2009 at 4:46 PM, EST and has a literal value of: <reply>http://www.google.com/search?btnI=&q=$+&ie=UTF-8&oe=UTF-8
[22:50:13] <r0bby_> nice!
[22:50:18] *** Ivellina has quit IRC
[22:50:18] <r0bby_> Oh!
[22:50:21] <surial> and what was that thingie which camelcases everything?
[22:50:24] <r0bby_> that's what that patch was for :)
[22:50:28] <surial> r0bby_: yah.
[22:50:35] <surial> c2 or something.
[22:50:41] <r0bby_> coolios
[22:50:47] <r0bby_> javabot: surial++
[22:50:47] <javabot> surial has a karma level of 79, r0bby_
[22:50:54] <r0bby_> good job :-)
[22:51:04] <r0bby_> seems most of the regulars have code in javabot :x
[22:51:11] <surial> There's a $C which will turn 'foo bar' into fooBar'. There's a coding related website that uses wikinames in the URL.
[22:51:23] <cheeser> no, there's a $^ that will do that.
[22:51:24] <cheeser> 8^)=
[22:51:30] <surial> Or, right, $^.
[22:51:38] <r0bby_> cheeser: cool :)
[22:51:48] <cheeser> ~camel $^ is <reply>$^
[22:51:48] <javabot> OK, cheeser.
[22:51:51] <cheeser> ~camel like this
[22:51:51] <javabot> LikeThis
[22:52:01] <r0bby_> ~camel hump surial
[22:52:02] <javabot> HumpSurial
[22:52:07] <rullie> r0bby_: so you gotta be baptized by javabot to be a regular?
[22:52:17] <r0bby_> rullie: nah
[22:52:17] <cheeser> ~url $+ is <reply>$+
[22:52:17] <javabot> OK, cheeser.
[22:52:20] *** zelnick has joined ##java
[22:52:25] <cheeser> ~url blah blah bing bang bing
[22:52:25] <surial> rullie: That, or abuse javabot to make inane beavis and butthead humour. That also makes you a regular.
[22:52:25] <javabot> blah+blah+bing+bang+bing
[22:52:26] <r0bby_> ~url google.com
[22:52:27] <javabot> google.com
[22:52:47] <r0bby_> ~~ rullie lava
[22:52:47] <javabot> My loony bun is fine Benny Lava
[22:52:49] <surial> ~info google $+
[22:52:50] <javabot> I have no factoid called "google $+"
[22:52:53] <r0bby_> that's still in there :DDDDDDD
[22:53:03] <surial> So the google factoid still controls ~google foo?
[22:53:11] <r0bby_> surial: that hits the google factoid :)
[22:53:24] <surial> And why does it keep bouncing between google and lmgtfy?
[22:53:26] <r0bby_> ugh i hate this nick
[22:53:28] *** Frostix has quit IRC
[22:53:33] *** r0bby_ is now known as r0bby
[22:53:41] <surial> Death to the underscores!
[22:53:51] <cheeser> the google operation uses lmgtfy
[22:54:10] <cheeser> ~google lmgtfy
[22:54:10] <javabot> http://letmegooglethatforyou.com/?q=lmgtfy
[22:54:42] <r0bby> finally setting up irssi to autojoin for me
[22:54:46] *** rainmann has left ##java
[22:55:02] *** mbroeker has quit IRC
[22:55:09] <krad> is there a nice book that explains GDT/LDT.. etc
[22:55:14] <razel> double multiarray[][] = new double[10][10]; will that work ??
[22:55:19] <cheeser> tias
[22:55:29] <razel> t must be y
[22:56:37] <rullie> no, t is t
[22:56:40] <waz> ~tias
[22:56:40] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[22:57:02] *** T-Hawk has joined ##java
[22:57:12] <razel> yeah true lazinesss will always prevail
[22:57:26] *** phenom9600 has joined ##java
[22:57:40] <rullie> razel: nonono, we tias so we can be lazier later
[22:58:08] *** Frostix has joined ##java
[22:58:19] <razel> yeah depeneds on what side of the lake youre on
[22:58:22] *** olavgg has joined ##java
[22:58:51] <razel> you tias so you can see not i
[22:58:56] *** sebr_afk is now known as sebr
[22:59:26] *** victori has joined ##java
[22:59:58] <tds5016> wow, Java EE stuff is new to me... so that is awesome. I finally got it working. Thanks everyone for your help!
[23:00:16] <cheeser> jdbc is not JEE
[23:00:21] <victori> heh
[23:00:23] <dmlloyd> details
[23:00:24] <svm_invictvs> wah wah: http://rafb.net/p/iej3W314.html
[23:01:03] <r0bby> jdbc is Java SE.
[23:01:07] <victori> the point of JMS is for asynchronous operations? to throttle large writes in the background?
[23:01:16] <victori> or long running operations*
[23:02:24] <victori> am I warm here?
[23:02:33] <rullie> i thought the point of JMS is to send messages
[23:03:31] *** timte has quit IRC
[23:03:57] *** krad has quit IRC
[23:04:40] <victori> rullie: well yes, send a serialized anonymous function to do a long running task.
[23:04:57] <victori> err class I mean
[23:05:19] *** T-Hawk has quit IRC
[23:06:36] *** Chest has left ##java
[23:08:23] *** brousch has quit IRC
[23:09:01] *** _acid__ has quit IRC
[23:09:23] *** marqueed has joined ##java
[23:10:05] *** marqueed has quit IRC
[23:10:14] *** eduardopl has joined ##java
[23:11:51] * r0bby /win 160
[23:11:52] <r0bby> er
[23:11:59] <AMcBain> fail
[23:12:12] *** kshepherd has joined ##java
[23:12:38] *** qizwiz has quit IRC
[23:12:40] <r0bby> i always fail
[23:12:49] *** Lustra has joined ##java
[23:14:14] *** mosno has joined ##java
[23:17:00] *** Andrew`_ has joined ##java
[23:17:10] *** marqueed has joined ##java
[23:17:34] *** eduardopl has quit IRC
[23:17:37] *** Yustme has quit IRC
[23:17:55] <Andrew`_> I have a JTabbedPane and a JTable, I click on a cell in the JTable then click on a tab in the JTabbedPane, should JTabbedPane.isFocusOwner now be true? Because it doesn't seem to be
[23:18:07] <marqueed> hi all - i'm getting the following error: java.lang.NoSuchMethodException: com.amazonaws.a2s.AmazonA2SClient.itemSearch(com.amazonaws.a2s.model.ItemSearchRequest)
[23:18:11] <marqueed> on the following line: response = A2SClient.getMethod("itemSearch", request.getClass()).invoke(svc, new Object[]{request});
[23:18:33] <marqueed> and it's a method: http://s3.amazonaws.com/awscode/amazon-a2s/2007-10-29/java/library/doc/com/amazonaws/a2s/AmazonA2SClient.html
[23:22:33] <Ven]n> uhm, eclipse has just split all long lines into two lines.. any ideas why?
[23:23:02] <Stephmw> Andrew`_: I don't believe selecting tabs results in a focus change
[23:23:08] <Stephmw> Andrew`_: nor a visibility change
[23:23:50] <Stephmw> Andrew`_: iirc if you need to know if there's been tab changes you need a property change listener on the tabbedpane
[23:24:14] * Stephmw has a hazy memory about this point though, might be some other listener
[23:24:26] <Andrew`_> Stephmw: ok thankyou
[23:24:28] <Andrew`_> and damn :)
[23:24:36] <Stephmw> yeah, I felt exactly the same way
[23:25:04] <Andrew`_> so i guess the table still isFoucsOwner()?
[23:25:09] *** Zvpun has joined ##java
[23:25:10] <Andrew`_> seems strange as its been clicked off
[23:25:33] <Stephmw> it might be some other focuscycleroot
[23:25:42] *** dmead has quit IRC
[23:25:47] <Zvpun> is it bad style to call JFrame.add() instead of JFrame.getContentPane()? (add says it forwards)
[23:25:48] <Stephmw> grab the focusmanager and ask it :)
[23:25:57] <Stephmw> Zvpun: not anymore
[23:26:20] <Stephmw> Zvpun: should be fine in 1.5 and 1.6
[23:26:35] <Zvpun> Stephmw: I found the getContentPane in the Swing Tutorial Hallo World and was confused because add says it forwards.
[23:26:40] <Zvpun> Stephmw: thank you.
[23:27:17] *** nijm has quit IRC
[23:27:19] <Andrew`_> focusmanager eh, will have a look, cheers
[23:27:41] *** nijm has joined ##java
[23:28:35] *** nijm has quit IRC
[23:29:34] *** zelnick has quit IRC
[23:30:05] *** Woflborg has quit IRC
[23:30:22] *** peepsalot has joined ##java
[23:30:22] <marqueed> does anyone know about my error?
[23:30:37] <marqueed> i'm getting a NoSuchMethodException when it *IS* a method.
[23:30:39] *** Woflborg has joined ##java
[23:32:04] *** neshaug has quit IRC
[23:32:30] <surial> ~~marqueed pastebin
[23:32:30] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[23:32:51] <cheeser> marqueed: i'd say talk to amazon
[23:33:02] <Stephmw> marqueed: and you're sure it accepts that parameter type as well?
[23:33:03] <marqueed> cheeser: it doesn't look like Amazon's problem, though
[23:33:14] <marqueed> yeah, http://s3.amazonaws.com/awscode/amazon-a2s/2007-10-29/java/library/doc/com/amazonaws/a2s/AmazonA2SClient.html
[23:33:16] *** Zvpun has left ##java
[23:33:29] <marqueed> cheeser: plus i checked my code locally, it's there
[23:33:32] <cheeser> let's see. you call an amazon service. you get an error. hrm. i know I'm stumped.
[23:33:44] <cheeser> then fix the name of the method you're invoking.
[23:33:52] <marqueed> cheeser: it's not the Amazon service that's giving me the error... and the method is there
[23:34:11] *** AbsintheSyringe has quit IRC
[23:35:02] *** buntfalke has quit IRC
[23:35:16] <Drone> See marqueed's post at http://rifers.org/paste/show/8837
[23:36:12] <Drone> See marqueed's post at http://rifers.org/paste/show/8838
[23:37:00] *** tieTYT has joined ##java
[23:37:05] <surial> marqueed: Well, the class isn't there. That was easy.
[23:37:18] <surial> er, method, that is.
[23:37:26] <surial> marqueed: No, it isn't. Hence the NSMEx.
[23:37:39] <marqueed> surial: what do you mean? :(
[23:37:41] <surial> try doing a method listing ( getMethods(). Also, is the method private by any chance?
[23:37:46] <marqueed> public
[23:38:17] <surial> marqueed: List all methods, see what's in there. The only way an NSMEx is going to show up, is if the class you're querying does not have that method, period. Possibly the method has varargs?
[23:38:18] *** repnop has quit IRC
[23:38:24] <peepsalot> just curious, does anyone here really flowerbox every method of every class?
[23:38:29] <surial> or, the actual type isn't request.getClass(), but a superclass of that?
[23:38:32] *** repnop has joined ##java
[23:38:35] <surial> peepsalot: flowerbox?
[23:38:36] <marqueed> surial: it does
[23:38:44] *** waz has quit IRC
[23:38:47] <Sou|cutter> is that like telescoping?
[23:38:47] <marqueed> (re varargs) - how do i handle that?
[23:38:53] *** jor has quit IRC
[23:38:58] <surial> marqueed: By supplying an array of the varg type.
[23:39:12] <peepsalot> surial, /** comments for javadocs
[23:39:13] *** scott_w has quit IRC
[23:39:15] <surial> marqueed: that is, a class representing an array of the vararg type.
[23:39:24] <Sou|cutter> peepsalot: I do it for anything non-trivial
[23:39:57] <Sou|cutter> sometimes I'll skip it for private methods if they're obvious enough
[23:40:08] <surial> peepsalot: No, are you nuts? People who suggest writing javadocs for everything, even methods that are completely described by their name, their parameter's names, and whatever exceptions are thrown's names, should most very definitely not have a javadoc. (1) DRY, and (2) it's a real bitch keeping documentation up to date. Everyl ine you don't write is another line you don't need to pay the maintainance tax on.
[23:40:37] <Sou|cutter> docuentation is tough. You definitely don't want to just repeat in english what the java code does
[23:40:40] <benJIman> Indeed.
[23:40:59] <benJIman> At work they want to introduce a checkin policy that checks everything has comments. Doing it so wrong :(
[23:41:00] <peepsalot> surial, yeah that's my opinion as well, but not that of the management where I work :-/
[23:41:17] *** gregor_k has quit IRC
[23:41:48] <surial> management, not being confronted with either programming new stuff or maintaining the old, while having to worry about marketing and sales vagaries more than technical problems that can be bandaged around, generally always make stupid decisions.
[23:41:58] <surial> It's one of those reasons why 'enterprisey' is a curseword in many places.
[23:42:07] <Stephmw> surial: whoa, ease up, add it to javabot :)
[23:42:16] <marqueed> surial: could you demonstrate how to do that... i'm confused
[23:42:26] <surial> it implies lots of management muddling. It's morally acceptable to do the right thing and lie to your manager.
[23:42:31] * Stephmw turns the heat under surial to 'scorching' rather than 'nuking'
[23:42:36] <surial> marqueed: So I take it there are varargs involved?
[23:42:37] <marqueed> i have a Class object representing ItemSearchRequest, the vararg argument type for itemSearch
[23:42:39] *** Bollinger has quit IRC
[23:42:43] <marqueed> surial: yes
[23:42:57] <surial> uh, I think it involves java.lang.reflect.Array. hold on.
[23:42:59] <surial> ~javadoc Array
[23:43:01] <javabot> surial: http://is.gd/jyam [java.lang.reflect.Array]; http://is.gd/jyal [java.sql.Array]
[23:43:29] <peepsalot> i'm considering writing some kind of regex or such that generates javadocs for ex: getUserById => Gets a user by id
[23:43:31] *** Carnage\ has quit IRC
[23:43:33] *** Zvpun has joined ##java
[23:43:37] <Andrew`_> Stephmw: I just made the jtabbedPane grabFocus when the tab was clicked .. fitted in with what i'm doing easily :0
[23:43:38] <Andrew`_> :)
[23:44:02] <Stephmw> Andrew`_: haha, good one
[23:44:07] <Zvpun> Is it okay to call System.err.println() from the swing event dispatch thread?
[23:44:18] <Stephmw> ~tias
[23:44:19] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[23:44:20] <Stephmw> and sure
[23:44:26] *** deepjoy has quit IRC
[23:44:29] <surial> One way, though I think there's a nicer way, is to go Array.newInstance(componentType, 0).getClass()
[23:44:40] <surial> involves a bogus object creation, though.
[23:44:44] *** xphillyx has joined ##java
[23:44:50] *** benny`work has joined ##java
[23:44:55] <cheeser> 7
[23:44:55] <surial> peepsalot: If that helps you lie to your managers, go for it.
[23:44:58] <Stephmw> Zvpun: the EDT is sensitive to: a) lengthy operations, and b) calling UI methods that change visible state
[23:45:12] <surial> peepsalot: Make sure you have a tool that can strip those back out. Useful if you need to diff stuff.
[23:45:15] <surial> less noise.
[23:45:24] <Stephmw> Zvpun: everythine else is pretty much ok (with the necessary caveats for separation of concern, etc)
[23:45:58] <surial> marqueed: You saw that?
[23:46:33] *** bitshuffler has quit IRC
[23:46:43] <marqueed> surial: looking at it now
[23:46:52] *** Woflborg has quit IRC
[23:47:11] <Zvpun> Stephmw: wait are you saying that I should not call swing stuf in the EDT? I think i have to access all swing components only from EDT?
[23:47:20] *** Woflborg has joined ##java
[23:47:23] *** werdan7 has quit IRC
[23:47:25] <surial> Huh, wow. I really can't find a way to go directly from component type class to array of that component class without creating a bogus instance first.
[23:47:42] <r0bby> Zvpun: long running tasks should be run using SwingWorks
[23:47:46] <r0bby> ~~ Zvpun edt
[23:47:47] <javabot> Zvpun, edt is Event Dispatch Thread, the thread that drives the awt/swing gui. See http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html for a tutorial on Swing and threads, and note http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#1
[23:47:50] <surial> Zvpun: no, you SHOULD call swing stuff from the EDT. You should specifically NOT call it from any other place.
[23:47:50] <r0bby> read all of that
[23:48:17] *** Andrew`_ has quit IRC
[23:48:24] <r0bby> Zvpun: think about this the thread is tied up reading in a HUGE file, it can't do anything else til that's done... what happens to your GUI?
[23:48:36] <Sou|cutter> the EDT is the single most important concept to learn for Swing programming
[23:48:37] <xphillyx> If a date comes in the format MM-DD-YYYY is there an auto way to format it to YYYY-MM-DD using SimpleDateFormat, or something
[23:48:39] <marqueed> surial: so in getMethod() i have to specify the classes of the argument, how can I indicate ItemSearchRequest...?
[23:48:42] *** romanb has quit IRC
[23:48:50] <surial> marqueed: I just told you.
[23:49:00] <surial> Array.newInstance(ItemSearchRequest.class, 0).getClass()
[23:49:02] <Zvpun> Stephmw: I dont understand b)
[23:49:07] <Sou|cutter> xphillyx: I'd just split it and rearrange the parts
[23:49:29] <r0bby> ~~ Zvpun edt
[23:49:29] <javabot> Zvpun, edt is Event Dispatch Thread, the thread that drives the awt/swing gui. See http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html for a tutorial on Swing and threads, and note http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#1
[23:49:30] <xphillyx> soulcuttter: but it might come in various formats
[23:49:30] <marqueed> surial: i don't think i need the .class though, right?
[23:49:32] <r0bby> once again read that
[23:49:41] <r0bby> xphillyx: use the locale then
[23:49:45] <Sou|cutter> xphillyx: Oh, in that case yeah, use SimpleDateFormat to parse it into a date
[23:49:46] <Stephmw> Zvpun: you'll sometimes find the need to use SwingUtilities.invokeLater() for some UI updates - the runnable passed in still runs in the EDT
[23:49:57] <Sou|cutter> and a different SimpleDateFormat to format it into a String
[23:49:58] <surial> marqueed: Of course you do.
[23:50:02] *** Vantaa has quit IRC
[23:50:11] *** n3llyb0y has left ##java
[23:50:13] <Stephmw> Sou|cutter: any less awful ways of dealing with SwingUtilities these days in 1.6?
[23:50:17] <surial> marqueed: In this case you actually need an empty array too, if you plan to call it with no arguments for the varargs.
[23:50:29] <Sou|cutter> Stephmw: not that I know of
[23:50:31] <surial> marqueed: pass classes to the getMethod() call. Pass instances to the invoke() call. Also, why the fuck are you using reflection for this?
[23:50:32] *** olavgg has quit IRC
[23:51:14] <Sou|cutter> surial: haha, great answer
[23:51:18] <Zvpun> Stephmw: okay I was just confused by the way you put b) but that meight just be me.
[23:51:23] <xphillyx> That's what I was thinking, but I wasn't sure. Thanks.
[23:51:47] <Sou|cutter> xphillyx: I always have to bring this up when talking about handling dates... you should use Joda Time
[23:51:56] <Stephmw> Zvpun: it's cool - getting late here, not necessarily thinking straight :)
[23:51:59] <Sou|cutter> it's a far better date library than what comes with java
[23:52:03] *** ahughes has joined ##java
[23:52:13] <Sou|cutter> At least until java7
[23:52:24] <surial> ~jsr310
[23:52:25] <javabot> surial, I have no idea what jsr310 is.
[23:52:27] <surial> ~jsr 310
[23:52:28] <javabot> 'JSR 310: Date and Time API' can be found at http://www.jcp.org/en/jsr/detail?id=310
[23:52:30] <Sou|cutter> ~~ xphillyx jodatime
[23:52:30] <javabot> xphillyx, joda time is an excellent date/time implementation for Java - http://joda-time.sourceforge.net - and also the basis for the new date/time system in Java 7 - http://jcp.org/en/jsr/detail?id=310
[23:52:31] <cheeser> fingers crossed
[23:52:41] <Sou|cutter> cheeser: seriously
[23:52:41] <surial> damn. that factoid totally wins.
[23:52:49] <Zvpun> r0bby: you meight consider the fact that a new user actually read that and still asks to make sure he got it right. After all its difficult to some of us the see the complete picture.
[23:52:54] <surial> Sou|cutter: Yes - apparently stephen doesn't have the time to finish it.
[23:53:15] <r0bby> Zvpun: that's where google comes into play
[23:53:19] <Sou|cutter> surial: surely he could call in some reinforcements
[23:53:25] <r0bby> tutorials, api, google
[23:53:34] <Drone> See marqueed's post at http://rifers.org/paste/show/8839
[23:53:37] <marqueed> surial: take a look at that?
[23:53:41] <Zvpun> r0bby: I am surprised your answer wasnt edt and no google is not very helpful for that.
[23:53:46] <Sou|cutter> surial: so long as it's not the guys who wrote the original api ;)
[23:53:58] <r0bby> word your phrase right and it is
[23:54:07] <marqueed> surial: as for why reflection: i'm not sure if this library will be present (at all) on the system i'm running on, so i'd like to fail gracefully and not use it
[23:54:10] <surial> Sou|cutter: I could be mistaken, but I believe they have been captured and put down for their crimes against humanity.
[23:54:15] <Zvpun> r0bby: as I just learned the book I learned from (and its top hit on google) doesnt use EDT and is wrong (that is what i was told here)
[23:54:17] <xphillyx> Soulcutter: Why is Joda Time so much better?
[23:54:19] <svm_invictvs> yay for rolling your own String.split()
[23:54:20] <surial> marqueed: That's not how you do that.
[23:54:34] <r0bby> yeh most swing tutorials don't use the edt
[23:54:47] <marqueed> surial: i'm doing which part the wrong way?
[23:54:53] <Sou|cutter> xphillyx: the API is easier to use, more threadsafe (SDF is not threadsafe, for example)
[23:55:07] <surial> marqueed: Create another class that implements an interface that contains the relevant code. Then, if the class you need isn't there (using a Class.forName() check most likely), load something else, but if it is, new up your special class. Java won't actually load a class (and thereby blow up if a dependency isn't there) until you really use it.
[23:55:08] <cheeser> Sou|cutter: stephen did ask for help.
[23:55:12] *** marvi has quit IRC
[23:55:21] <Stephmw> Zvpun: don't mind r0bby he's just constipated from an overabundance of eating the JVM spec
[23:55:23] <cheeser> Sou|cutter: he's been pretty busy with fan lately
[23:55:24] <Sou|cutter> cheeser: I hope he gets it!
[23:55:25] <cheeser> P^)=
[23:55:33] <Sou|cutter> grrrr fan
[23:55:44] * r0bby is getting that much needed help of the mental nature
[23:55:49] <r0bby> too bad it's not working
[23:56:20] <cheeser> you can't get blood from a turnip
[23:57:22] <surial> marqueed: e.g: if ( classExists("com.amazon.Whatever")) myItemSearchWrapper = new WrapAroundA2S(); else myItemSearchWrapper = new DummyWrapperThatJustThrowsExceptions();
[23:57:25] <xphillyx> if I don;t need to worry about thread safety, should this suffice? its for a large piece of software, but it is truly just a simple timestamp.
[23:57:39] <surial> fill in the various parts yourself, and you've got a working solution to run one thing if a certain library is in the class path, and another if it isn't.
[23:58:03] <surial> whatever you do, don't, ever, under any circumstance, use reflection to look up static stuff. That's never the right answer.
[23:58:59] <svm_invictvs> Why am i writing my own String.split()
[23:59:01] <svm_invictvs> Fuck my life.
[23:59:39] <surial> svm_invictvs: Hey, if you writing your own String.join(), that'd make more sense :)
[23:59:43] *** amitev has quit IRC
[23:59:52] * surial has only written that some 58-odd times by now.
top

   February 24, 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 | >