NOTICE: This channel is no longer actively logged.
[00:01:55] <Olathe> How do I pass a Class to a method ? When I try, Java thinks the variable holding the Class is an instance or static variable.[00:03:36] *** Clackwell has quit IRC[00:04:15] <bpalmer> Olathe: what do you mean?[00:04:35] <Stork> i don't understand[00:04:57] *** Blackwell is now known as Clackwell[00:05:22] <Olathe> One sec[00:05:44] <ernimril> Olathe: someMethod (String.class)[00:06:28] <Olathe> http://rafb.net/paste/results/xq314U72.nln.html[00:06:59] <Olathe> ernimril : OK, I'll try that. Thanks.[00:07:07] <bpalmer> oh, you can't do "instanceof expectedClass"[00:07:19] *** dingo001 has left ##java[00:07:35] <Olathe> I'll probably just take a String and use a HashMap<String, Class>[00:07:39] <bpalmer> use expectedClass.instanceOf[00:07:49] <bpalmer> sorry, isInstance[00:08:05] <Olathe> Otherwise, the code gets like ClassOne.Subclass.class[00:09:09] *** rogue-kun{B} is now known as rogue-kun{B}|Awa[00:09:25] <Olathe> That or constants.[00:09:32] <DemisM> should one write specifications for constructors?[00:09:51] <snooplsm> i tested my applet on a pc and it worked[00:09:59] <snooplsm> but it doesn't work on a mac in the same browser[00:10:19] <Olathe> snooplsm : Unless they've updates, Macs don't generally have Java 1.5.[00:10:23] <Olathe> updated*[00:10:29] *** Stork has quit IRC[00:10:53] *** Mactabilis has joined ##java[00:16:54] *** joaopaulo has joined ##java[00:17:23] *** {darktux} has quit IRC[00:18:15] <_56k> yeah, i had to update to 1.5[00:18:15] <snooplsm> ahh[00:20:58] <snooplsm> hmm, i better make sure i compiled in 1.5 then[00:21:10] <snooplsm> the applet ran but gave me a head error or something[00:21:11] <snooplsm> in awt[00:25:53] <Trixsey|Laptop> http://www.animania.nu/uml_test.jpg[00:25:55] <Trixsey|Laptop> Is this UML ok?[00:26:50] *** Esaj has quit IRC[00:31:18] *** Stork has joined ##java[00:31:37] <snooplsm> i'm on my third week writing this program, is that a long time?[00:32:15] <ernimril> snooplsm: no...[00:32:54] <ernimril> snooplsm: I am currently working on a hobby program, Started it 1998. It is version 3.0 that I am working on now..[00:34:08] *** tiglionabbit has joined ##java[00:35:28] <tiglionabbit> I'm trying to help someone with their java assignment. Their teacher has this in the code though: "class linkedlist<item_t> implements list<item_t> {" What do the <>s mean in that?[00:35:40] <snooplsm> ernimril, is it commercial or free[00:36:06] <ernimril> ~tell snooplsm about rabbit[00:36:06] <javabot> snooplsm, rabbit is a web proxy used to speed up slow connections. For more information see: http://www.khelekore.org/rabbit/[00:36:26] <snooplsm> tiglionabbit, i'd have to think it deals with the typecast[00:36:30] <ernimril> ~tell tiglionabbit about generics[00:36:31] <javabot> tiglionabbit, generics is http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html[00:37:05] <ernimril> snooplsm: it is free as in BSD styled licence[00:37:16] *** Kane_Hart has joined ##java[00:37:43] <Kane_Hart> anyone know a .jar file I can test underlinux to see if it works fine[00:37:54] <Kane_Hart> actualy it is bsd[00:39:14] *** Mactabilis has quit IRC[00:39:17] <snooplsm> i'm working on a project now, i don't know weather I should use advertisements, or make it 100% free.[00:40:53] <snooplsm> man i hate this.. when you write your own project independent from your studies, you feel guilty when you ask for help.[00:41:10] <Garibaldi> make it free[00:41:15] <Garibaldi> nobody likes advertisements[00:41:38] <snooplsm> ok, but what does making a free program offer me? besides the joy of sharing it with others.[00:41:51] <Garibaldi> a soft taco[00:41:54] <znoG> nothing wrong with saying "donate, if you can"[00:42:03] *** Ulgar has quit IRC[00:42:23] <znoG> if you created something useful that lots of people find useful, just put a non-intrusive "donate, if you can" button and that's it.[00:42:25] *** rogue-kun{B}|Awa is now known as rogue-kun{B}[00:42:49] <snooplsm> i have no problem with making it free as long as it doesn't cost me money.[00:42:51] <tiglionabbit> but don't be nagware =[[00:42:58] <bpalmer> or make it postcard-ware, or charityware ("Donate to the Red Cross/Democratic Party/Emacs Evangelicals if you enjoy this program")[00:43:20] <cybereal> snooplsm: go with some non-intrusive adverts[00:43:28] <snooplsm> well, believe it or not, my program is for anyone who has a problem with anything on their computer.[00:43:41] <tiglionabbit> vim: Help poor children in Uganda[00:43:44] <Garibaldi> Help poor children in Uganda![00:43:59] <snooplsm> i can't do google ads because people may very well upload porn and i have no way of preventing that.[00:44:13] <tiglionabbit> hm?[00:44:17] <znoG> a program that fixes all problems in a computer?[00:44:23] <snooplsm> znoG, no[00:44:40] <znoG> is it one of those "don't worry, be happy" programs?[00:44:43] <tiglionabbit> sounds impossible, or like Norton Systemworks for Windows. Which is quite imperfect[00:44:50] <snooplsm> no no...[00:45:13] <cybereal> I don't think he said it fixes anything[00:45:22] <snooplsm> i don't want to tell you what it is exactly, but i'm sure you wished there was an easy way to do somethign before, and this is that easy easy way.[00:45:40] <tiglionabbit> snooplsm: the easy way to do something is to install Ubuntu Linux[00:45:43] <Garibaldi> this is for windoze?[00:45:57] <snooplsm> its for windows, mac, and linux(if possible)[00:46:14] <snooplsm> hmm, is anyone on linu now?[00:46:17] <ernimril> snooplsm: but you know that only stupid people have problems with their computers... ;-)[00:46:18] <tiglionabbit> me[00:46:30] <Garibaldi> snooplsm: of course :-)[00:46:30] * ernimril raises a hand[00:46:34] <snooplsm> ernimril, its for any problem of your computer.[00:46:35] <bpalmer> ernimril: that's tautological. Only stupid people use computers[00:46:39] <tiglionabbit> ernimril: I'm not stupid, but I had a lot of problems with windows[00:46:59] <snooplsm> target audience: retards[00:47:27] <snooplsm> let me rephrase that..[00:47:33] <Garibaldi> yeah, windows woudln't let me resize the bloody console window[00:47:39] <Garibaldi> :-P[00:47:42] <znoG> snooplsm: so is it a program to keep track of the problems you've had? is it a program you type a question into and brings up answers based on a smart search system? may as well tell us in general what its about so we can either go "woaaah" or "haha"[00:47:43] <tiglionabbit> bpalmer: you must be using a computer right now, in order to say that. Do you include yourself in the set of "retards"?[00:47:56] <bpalmer> tiglionabbit: I never mentioned the set of "retards"[00:47:58] <Clackwell> Garibaldi: "know how"[00:48:04] *** Amnesiac has joined ##java[00:48:14] <tiglionabbit> okay, stupid people[00:48:16] <tiglionabbit> sorry[00:48:17] <snooplsm> its no cure for cancer..[00:48:17] <Garibaldi> Clackwell: hum?[00:48:31] <bpalmer> tiglionabbit: why do you think I'm using a computer right now?[00:48:32] <snooplsm> its just something, you, i, and the girl next door can use.[00:48:32] <znoG> snooplsm: chances are, there is software out there that does what you are designing :)[00:48:40] <snooplsm> znoG, yes there is.[00:48:45] <tiglionabbit> bpalmer: because you're typing that message. What else could you be using[00:48:47] <Clackwell> Garibaldi: see system menu of the console window[00:49:02] <Garibaldi> Clackwell: yeah, I want to click and drag and it do the right (tm) thing.[00:49:07] <bpalmer> tiglionabbit: you couldn't possibly be aware of whether I'm typing a message or not as we speak[00:49:12] <Garibaldi> I don't want to go to some menu and fiddle with some static setting[00:49:23] <Clackwell> Garibaldi: that's not the same as "windows won't let me resize the console" though.[00:49:28] <znoG> snooplsm: it's some remote PC management tool isn't it[00:49:31] <tiglionabbit> bpalmer: why is that? I see the results of it[00:49:48] <snooplsm> znoG, no.[00:50:03] <znoG> snooplsm: ok, good luck with it anyhow. I'm outta here[00:50:04] <Garibaldi> Clackwell: heh, I didn't realize I was participating is some serious discussion where every word I was saying was being parsed for total correctness.[00:50:07] <bpalmer> tiglionabbit: perhaps your imagination is limited. You're unfamiliar with the concept of voice recognition?[00:50:14] <bpalmer> of tablets and handwriting recognition?[00:50:22] <tiglionabbit> bpalmer: those are also computers[00:50:24] <Garibaldi> Clackwell: I would have thought people would understand the point I was making, my mistake.[00:50:33] <znoG> snooplsm: btw, if you don't tell anyone at least what it's about, you are risking writing something nobody uses as you didn't allow for criticism before starting.[00:50:36] *** delvinj has quit IRC[00:50:41] <tiglionabbit> bpalmer: I happen to own a tablet that has voice and handwriting recognition. It is still a computer[00:50:42] <bpalmer> tiglionabbit: no they aren't, but more immediately, they don't involve typing[00:50:48] <snooplsm> i've told people what its about.[00:51:01] <Clackwell> Garibaldi: bash windows where it deserves it, keep the cheap shots for...uhm...bsd. ;)[00:51:14] <tiglionabbit> bpalmer: you could be using a Danger Hiptop for all I care. It is still a kind of computer[00:51:36] <bpalmer> nope. I use an Electronic Abacus, no computers here[00:51:45] <snooplsm> i've stated that imageshack.us already has it.[00:51:45] *** OleMoudi has quit IRC[00:51:52] <Garibaldi> Clackwell: eh, I think enought people habe bashed windows on this issue as they're support to fix my complaint in Longhorn[00:52:06] <Garibaldi> of course, they're supposed to fix *everyone*'s complaint in Longhorn[00:52:11] <snooplsm> if you want to know what it is, just msg me and i'll show you what i have done so far..[00:52:17] <Clackwell> Garibaldi: huh=[00:52:19] <Clackwell> ?[00:52:33] <tiglionabbit> bpalmer: I think you will find that an abacus is also designed for computing[00:52:42] <Clackwell> if the lack of direct resizing support of the console in windows is your biggest complaint about windows, i'd say it must be a kick ass OS.[00:53:02] <Garibaldi> I don't remember saying it was my biggest complaint?[00:53:20] * Garibaldi shakes his head[00:53:28] <Clackwell> i don't remember me saying that you said it was.[00:54:54] *** djib has quit IRC[00:55:38] *** shad0wcat has quit IRC[00:56:55] *** Mazon is now known as mazon[00:58:21] *** hAt0ff has quit IRC[01:19:52] *** Coffman has quit IRC[01:20:08] *** Gavrila has quit IRC[01:20:59] <Stork> i'm confused about getting an image from my .jar archive and painting it on to my graphics pallete[01:21:29] <Stork> confused meaning i don't have a clue[01:21:52] <Stork> i'm checking the docs and thew appropriate methods[01:22:37] *** ijoyce has joined ##java[01:23:43] *** kaka has quit IRC[01:25:46] *** The_Vulture has joined ##java[01:28:28] *** bpalmer has quit IRC[01:31:34] *** MindZEye has quit IRC[01:32:50] <Clackwell> Stork: possibly related: http://www.google.com/search?complete=1&hl=en&q=getting+an+image+from+my+.jar+archive&btnG=Google+Search[01:33:07] *** Job1 has quit IRC[01:33:36] <Stork> thanks[01:33:43] <Stork> while you're here[01:34:01] <Stork> how can i check the length/height of an image?[01:34:10] <Stork> and/or centre it in my graphics pallete[01:34:59] <Clackwell> Stork: i don't know what a "graphics pallete" is. see api docs of the respective image class. if that yields no relevant information, google for it[01:35:12] <Stork> alright, thanks[01:35:18] <Clackwell> "TheImageClass height width image" or something like that.[01:35:36] *** Tartaros has quit IRC[01:37:14] <Clackwell> bye bye[01:37:18] *** orthogonal has joined ##java[01:37:18] <Stork> bye[01:37:42] <Stork> i suppose i'll have to write a method that figures out where my image will have to be in order for it to be in the centre of my applet[01:37:50] <orthogonal> Is there a simple way to get core:forEach to sort the items its iterating over?[01:38:10] *** ractrev has joined ##java[01:38:44] *** ractrev has quit IRC[01:39:06] <Honk^away> just sort the stuff you iterate over :)[01:39:43] <orthogonal> then I ghave to embed code in the jsp[01:39:59] *** fuso has joined ##java[01:41:54] *** forsaken has joined ##java[01:42:02] <forsaken> can you inherit from more than one class?[01:42:11] <The_Vulture> forsaken: in Java, no.[01:42:15] <forsaken> thats what i thought[01:42:23] <orthogonal> forsaken: but you can implement many interfaces[01:42:25] <forsaken> aye[01:42:27] <The_Vulture> what orthogonal said[01:42:30] <forsaken> i think my teacher is a moron[01:42:45] <forsaken> wait...i know she is :)[01:44:01] <The_Vulture> forsaken: what exactly did she say, and in what context?[01:44:15] <Amnesiac> Because...[01:45:16] <forsaken> "please implement the class x which inherits from the classes x y and z, obviously she meant interfaces, but in the problem before (which this one references) she made us write them as abstract classes, and this was on a test[01:45:41] <forsaken> and i asked her and she said she meant the classes and not interfaces[01:46:07] <forsaken> doesn't matter now, i was just double checking to make sure i was right[01:46:39] *** jdhutchin1 has joined ##java[01:46:46] <Honk^away> well.. you might inherit from x, which inherits from y, which inherits from z :)[01:46:51] <Amnesiac> exactly[01:47:01] <Amnesiac> Multiple levels of inheritance[01:47:02] <cybereal> you wouildn't say it like the problem statement though[01:47:09] *** MarkT has joined ##java[01:47:16] <Honk^away> heh, i wouldnt either ;)[01:47:25] <cybereal> teacher probably just doesn't know java[01:47:25] <Honk^away> but he said his teacher is a moron.. so maybe she would =)[01:47:31] <cybereal> it's probably some C++ teacher forced to do java[01:47:40] <The_Vulture> possibly[01:47:58] <forsaken> yea[01:47:59] <forsaken> probably[01:48:01] <cybereal> head of the dept. probably thinks java = c++ so they figured there wasn't a need for further training :)[01:48:20] <forsaken> she words all her stuff really weirdly, so it's incredibly hard to understand what she wants[01:48:21] <pr3d4t0r> The_Vulture![01:48:24] *** christo has joined ##java[01:48:25] * pr3d4t0r runs for cover[01:48:25] <The_Vulture> pr3d4t0r! :)[01:48:30] *** christo has quit IRC[01:48:30] * The_Vulture throws plush toys[01:48:34] <Stork> hi predator[01:48:37] <Stork> how was the sleep :)[01:48:39] <pr3d4t0r> The_Vulture: Dude.[01:48:42] <cybereal> forsaken: some people are not stupid per se, but are very poor communicators[01:48:42] <pr3d4t0r> The_Vulture: That's disturbing.[01:48:45] *** teralaser has quit IRC[01:49:19] <The_Vulture> hehe, why thank you *tips hat* (I don't actually have a hat.. I should get one)[01:49:20] * pr3d4t0r checks Google Groups to see if the_vulture@ips.au is a regular in alt.sex.plushies[01:49:35] <forsaken> cybereal, this is true, but i'm rather sure she is, i have her for class 3 hours a week :)[01:49:38] <The_Vulture> hehe - won't find me there, but a few of my favourites on DeviantArt are Anthro[01:49:46] <pr3d4t0r> The_Vulture: w00t[01:49:47] <pr3d4t0r> ![01:50:08] <The_Vulture> indeed :)[01:50:12] <The_Vulture> how's things?[01:50:23] <Stork> could anyone give me some mathmatical help? i'm trying to write a method which will tell me where to place my images so they're in the center of my graphics canvas. i know the size of the image and the size of the canvas.[01:50:48] <pr3d4t0r> Stork: Dude.[01:50:52] <Garibaldi> lol[01:50:55] <Stork> hm?[01:50:59] <pr3d4t0r> Stork: If you can't figure that one out, you shouldn't be programming.[01:51:06] * pr3d4t0r aims his gun at Stork[01:51:07] <cybereal> Stork: pr3d4t0r has a point[01:51:11] <cybereal> Stork: it's pretty easy[01:51:15] <pr3d4t0r> Stork: "Please step away from the computer, sir."[01:51:15] <Stork> yes, i suck at maths[01:51:22] *** Kane_Hart has left ##java[01:51:23] * Stork goes red[01:51:28] <cybereal> Stork: I suck at math too but I know it[01:51:36] <Stork> can i blame the time? it's 0048 here[01:51:40] <Garibaldi> no[01:51:46] <pr3d4t0r> Stork: I sucked so much at math that I went to get an engineering degree.[01:51:50] <Stork> and i've drunk a can of stella[01:51:52] <cybereal> It's only basic subtraction and division[01:51:52] <The_Vulture> Stork: no, get some sleep if that's a problem[01:52:02] <orthogonal> Stork; how would you do it if the canvass and the graphic were both paper cutouts, and yiu were arranging them by hand?[01:52:32] <pr3d4t0r> Stork: Do you start drawing your image from the top left corner?[01:52:36] <Stork> yes[01:52:49] <orthogonal> Stork: you might fold the canvass length-wise to find its center, right?[01:52:57] <Stork> yes[01:52:57] <pr3d4t0r> The_Vulture: Is the Java coordinate system first or fourth Cartesian quadrant? I forget.[01:53:07] <pr3d4t0r> orthogonal: Ah![01:53:09] <cybereal> x = ((canvaswidth - imagewidth) / 2), y = ((canvasheight - imageheight) / 2)[01:53:13] <pr3d4t0r> javabot: orthogonal++[01:53:14] <javabot> orthogonal has a karma level of 1, pr3d4t0r[01:53:16] *** Twiun has quit IRC[01:53:20] <The_Vulture> pr3d4t0r: 4th, I'm rather sure[01:53:25] <jdhutchin1> none[01:53:30] <pr3d4t0r> Stork: I'll let others more willing help you :)[01:53:33] <Garibaldi> pr3d4t0r: I would have said second[01:53:35] <jdhutchin1> because positive y in graphics coordinates is down instead of up[01:53:43] <Stork> thanks very much cybereal[01:53:46] <Garibaldi> err, no[01:53:49] <Garibaldi> I see what you're saying[01:53:50] <Garibaldi> nevermind :-)[01:53:54] <The_Vulture> ;)[01:53:59] <pr3d4t0r> Garibaldi: x-axis up, y-axis down? That's fourth.[01:54:15] <jdhutchin1> pr3d4t0r, yeah, but in the fourth quadrant, y is negative[01:54:15] <Garibaldi> yeah, I had the wrong picture in my head[01:54:16] * pr3d4t0r pets his Mac.[01:54:56] * MacIver purrs[01:54:57] <pr3d4t0r> jdhutchin1: Going "down" as you increase Y is 4th quadrant. Whether you make it positive or negative is up to you.[01:54:58] * Stork needs a large collection of "O RLY" owls[01:55:05] <pr3d4t0r> javabot: MacIver++[01:55:06] <javabot> maciver has a karma level of 4, pr3d4t0r[01:55:15] <pr3d4t0r> MacIver: Dude. People will talk :)[01:55:22] <MacIver> :-D[01:55:24] *** ramza3 has joined ##java[01:55:27] <MacIver> you started it ;)[01:55:38] *** Twiun has joined ##java[01:55:49] * pr3d4t0r pets his Mac because graphics (like under Presentation Manager) are drawn on the 1st, not the fourth quadrant.[01:56:09] <MacIver> nice :)[01:56:20] <The_Vulture> pr3d4t0r: yeah, that's happy[01:56:37] <pr3d4t0r> MacIver: Unless you're sitting on my desk and I get to plug peripheral devics and shove disks into your slot, I think I was talking about my Macintosh computer ;)[01:56:52] <MacIver> pr3d4t0r: wow, this is a family channel[01:56:57] <pr3d4t0r> Ironically, we have Apple to blame for 4th quadrant graphics.[01:57:29] <cybereal> pr3d4t0r: funny, I've always thought we had terminal emulators like WYSE to blame for that, since that's the quadrant they use[01:57:47] <pr3d4t0r> I believe the most successful "graphics" computer until the Apple ][ came up was the Commodore PET CBM.[01:58:19] <cybereal> I think it makes sense to do 4th, considering how most framebuffers work[01:58:21] <pr3d4t0r> cybereal: Tektronics graphics (vector) workstations (like the ones they used for rendering Tron) had 1st quadrant graphics too :)[01:58:32] <pr3d4t0r> cybereal: It's unnatural, but that's the reason.[01:58:47] <pr3d4t0r> cybereal: Woz and company figured it'd be cheaper to refresh down than up.[01:59:28] <pr3d4t0r> cybereal: Then Apple ][ became so insanely successful that TRS-80 and others began implementing graphics that way.[01:59:40] <The_Vulture> pr3d4t0r: how'd they figure that? (if you know)[01:59:47] <Stork> how can i get a list of all the files in a folder in my .jar file?[01:59:55] <cybereal> pr3d4t0r: first time I did graphics was in dos straight to the vga framebuffer, so the calculations were more natural that way imho[01:59:57] *** tag has joined ##java[01:59:58] <pr3d4t0r> cybereal: For a really fucked up graphics coding, try writing TRS-BASIC graphics for a TRS-80 model I or III.[02:00:07] <MacIver> StarScream: jar tvf file.jar ?[02:00:08] <pr3d4t0r> cybereal: Yup.[02:00:42] <pr3d4t0r> cybereal: That's because the frame boffer on a CGA/VGA adapter started at b800:0000 and as memory increased, you hit pixles going right and down.[02:00:58] <The_Vulture> Stork: perhaps using that JarFile class - what do you want to do that for though?[02:01:12] <pr3d4t0r> The_Vulture: Because of what I told cybereal; older systems had the video memory mapped (and handled) in the main bus.[02:01:21] <Stork> not sure really :p[02:01:27] <DemisM> why doesn't this line work when running the app? String[] testString = myString.split("+");[02:01:31] <Stork> seemed like a good idea at the time[02:01:47] <pr3d4t0r> The_Vulture: So what cybereal said makes sense (and it made sense to Woz): Pixel 0 is offset 0, pixel 1 is offset 1 and so on (oversimplified but you get the idea).[02:01:48] <The_Vulture> pr3d4t0r: still not sure why that'd make it cheaper to scan one way than the other..[02:01:48] <MacIver> DemisM: why are you doing that?[02:01:56] <The_Vulture> DemisM: RTFM for that split method you're calling[02:02:19] <pr3d4t0r> The_Vulture: The corollary is that CRTs scan also (from your POV) left-right, top-bottom.[02:02:22] <DemisM> The_Vulture: I did[02:02:30] <The_Vulture> DemisM: and what did it say about regular expressions?[02:03:00] <pr3d4t0r> The_Vulture: It was just convenient.[02:03:11] <MacIver> DemisM: /me whispers regex[02:03:20] <MacIver> doh[02:03:30] * pr3d4t0r eyes MacIver[02:03:40] * MacIver winks back at pr3d4t0r[02:03:51] * pr3d4t0r thinks that people doing regexp in Java need professional psychiatric help.[02:04:00] <MacIver> lol[02:04:02] <pr3d4t0r> Someone should tell those folks about "right tool, right job".[02:04:34] <MacIver> I've used it before...because the rest of the app was already Java[02:04:36] <pr3d4t0r> MacIver: We had a kid a few weeks ago trying to parse all kinds of weird shit with regexp in Java. A good 20 lines of Java code, pain in the arse to debug, etc.[02:04:39] <DemisM> I guess I don't know what legal regex's are[02:04:58] <cybereal> DemisM: it varies by implementation[02:05:08] <DemisM> ok I would like to split up my String wherever I have a +[02:05:12] <DemisM> how would I do this?[02:05:13] <pr3d4t0r> MacIver: Since the processing wasn't critical to his program, I handed him an awk script, one short line, that did the same thing. He'd instead call that prior to running his Java program and tutti contenti.[02:05:17] <cybereal> there is an RFC for regex's and all it does it point to about 50 different OTHER rfc's for regex implementations[02:05:31] <pr3d4t0r> cybereal: LOL -- yeah.[02:05:39] <pr3d4t0r> DemisM: Hello.[02:05:43] <cybereal> DemisM: "1 + 1 + 2 + 3 + 5 + 8".split("\\\\+");[02:05:47] <cybereal> er[02:05:48] <pr3d4t0r> DemisM: Do you absolutely need to do that in Java?[02:05:51] <cybereal> halve those slashes[02:05:56] <cybereal> DemisM: "1 + 1 + 2 + 3 + 5 + 8".split("\\+");[02:06:26] *** Heuristic has joined ##java[02:07:14] <pr3d4t0r> cybereal: echo $STRING | awk -var FS=+ '{ print $1 $2 ... $n }'[02:07:49] <DemisM> well I'm supposed to take in a string "-3 + 5x^2 - 6x^5" and then be able to tell if it is in canonical form lowest to highest degree, and I really just need to get the coeff and degress would there be an easier way?[02:07:50] <pr3d4t0r> cybereal: By the time you figure out how many slashes go where, I'll be done :)[02:08:07] <cybereal> pr3d4t0r: I already knew the awk way but this isn't #awk :P[02:08:13] <pr3d4t0r> cybereal: You need to write a parser.[02:08:22] <pr3d4t0r> s/cyberreal/DenisM/[02:08:36] <pr3d4t0r> DemisM: You need to write a parser; it'll be less painful than dicking with regexp.[02:08:41] <cybereal> isn't there a parser generator for java?[02:08:45] <The_Vulture> cybereal: several[02:08:51] <DemisM> how do I write a parser, lol?[02:08:52] <The_Vulture> I've used ANTLR with quite a bit of success[02:09:11] <pr3d4t0r> DemisM: In that expression, "-6x^5" is equivalent to "+ (-6)x^5".[02:09:25] <pr3d4t0r> DemisM: So now you need to worry about not only + but those conversions.[02:09:56] <pr3d4t0r> DemisM: May I ask what is this for?[02:10:00] <DemisM> homework[02:10:02] <pr3d4t0r> DemisM: What class in school?[02:10:06] * pr3d4t0r smacks DemisM[02:10:12] *** silasj has joined ##java[02:10:15] <pr3d4t0r> DemisM: Nah, really? Homework? I'd never guessed ;)[02:10:16] <DemisM> intro to comp sci[02:10:19] <pr3d4t0r> DemisM: OKi.[02:10:26] <The_Vulture> pr3d4t0r: Well he might not need to account for such conversions, depends on the format specified.. *shrugs*[02:10:28] <pr3d4t0r> DemisM: Hrm... this is a tough one.[02:10:33] <orthogonal> cybereal: I used th "java compiler compiler" -- it's pretty easy, just give it a bnf[02:10:35] <DemisM> http://www.cise.ufl.edu/~cis3020fa05/topics.html[02:10:43] <pr3d4t0r> The_Vulture: He needs to worry about more than just parsing "+" though.[02:10:48] <pr3d4t0r> DemisM: Let me look.[02:10:59] <The_Vulture> pr3d4t0r: sure[02:11:11] <pr3d4t0r> DemisM: Which lecture number?[02:11:16] <DemisM> 23[02:11:41] *** silasj has quit IRC[02:12:09] <DemisM> The constructor with String parameter is what is killing me[02:12:15] <pr3d4t0r> DemisM: OKi, this is easier than you think.[02:12:37] *** joaopaulo has quit IRC[02:12:37] <DemisM> really?[02:12:38] <pr3d4t0r> DemisM: You may want to consider writing this parser yourself instead of dicking with regexp. You'll be done faster.[02:12:42] <pr3d4t0r> DemisM: Yeah.[02:13:06] <pr3d4t0r> DemisM: Your polynomial terms are separated by = or - signs.[02:13:23] <DemisM> right[02:13:28] <pr3d4t0r> DemisM: So all you have to do is read this forward and keep a list of terms as you read them.[02:13:49] <DemisM> do I read it with charAt(i) or what?[02:13:55] <pr3d4t0r> DemisM: I'd use an ArrayList, a for statement, and the charAt(nPos); method for String.[02:13:59] <pr3d4t0r> DemisM: Yup.[02:14:15] <pr3d4t0r> DemisM: They aren't even asking you to parse the expression, just to build it and/or display it, right?[02:14:24] *** Wufei|food is now known as Wufei|TV[02:14:28] <DemisM> pr3d4t0r: right[02:14:39] <DemisM> but I'd assume I need to check if it is in canonical form or not[02:14:51] <pr3d4t0r> DemisM: Let me pseudo-code a partial solution in the pastebin to give you some ideas.[02:15:00] <pr3d4t0r> DemisM: I won't solve it for you but you'll see it's rather easy.[02:15:03] <pr3d4t0r> DemisM: Are you game for that?[02:15:08] <DemisM> sure[02:15:55] <The_Vulture> DemisM: you're told that the input will be in cannonical form already..[02:16:12] <DemisM> The_Vulture: so no check is needed?[02:16:38] <The_Vulture> Well you could write some really robust code with checking & all, but it doesn't seem to be required.[02:17:35] <DemisM> in my spec. I would say in the precondition: a polynomial in canonical form is provided. This would make the user of the class responsible no?[02:17:45] <DemisM> not me[02:18:04] <The_Vulture> sure[02:18:16] <DemisM> k :)[02:18:34] <The_Vulture> well the only thing stopping you from keeping the whole thing in one String is that the spec requires "discrete objects" - if the class actually provided useful operations on Polynomials it might actually be in interesting task[02:19:25] <DemisM> it's not hard then, I was just caught up if I had to check that it was in canonical form.[02:20:04] *** rogue-kun{B} is now known as rogue-kun{B}|Awa[02:24:33] *** grifis has joined ##java[02:24:41] <DemisM> why do they use size() as a method for vectors and ArrayLists; and length() for string?[02:24:54] <Drone> View pr3d4t0r's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8556[02:25:01] <The_Vulture> because it sounds cool..[02:25:05] <DemisM> lol[02:25:05] <pr3d4t0r> DemisM: I didn't even try to compile that but you'll get the idea.[02:25:32] <pr3d4t0r> DemisM: Because unlike what most Java pundits will try to make you believe, Java is a big kludge.[02:25:38] <The_Vulture> DemisM: well "length" on a vector could be somewhat misleading - confusing the ideas of a mathematical vector's length. As for why not use size on a string.. *shrugs*[02:25:40] <Honk^away> DemisM: texts dont have a size :p and containers dont have a length =)[02:26:05] <pr3d4t0r> DemisM: Languages such as Smalltalk, Ruby, Objective-C, etc. picked one and stuck to it :)[02:26:16] <The_Vulture> well that's also true - many containers aren't sequences, so the term "length" would be a misnomer - they are really just bags of things, so size makes more sense.[02:26:26] <The_Vulture> size is the more generally usable term[02:26:46] <pr3d4t0r> The_Vulture: If you take the high road, it doesn't matter. You can make the case for either. Consistency would've been preferred.[02:26:48] <The_Vulture> Interestingly enough C++'s std::string has both (size() and length(), they are synonymous).. (and it's containers have just size())[02:27:10] <pr3d4t0r> The_Vulture: In Smalltalk, size is the way to go because strings are collections of characters.[02:27:11] <grifis> why when doing in.read(buf,0,7) for recv only numbers...i received also next string sent by client ? for example '10rt' ... (rt is the second request)[02:27:16] <The_Vulture> pr3d4t0r: I think it'd be harder to make a case for length() as a general property of all containers (sets, bags, lists, maps, etc)[02:27:21] <The_Vulture> but yes, consistency is the real key[02:27:34] <pr3d4t0r> The_Vulture: Yeah. I'd hate to see length -- size is more like it.[02:27:49] <The_Vulture> pr3d4t0r: Yeah - that's true in C++ too, why length() got in there at all I'm not sure. Probably some poor attempt to make it consistent with other existing string types.[02:28:17] <The_Vulture> I should go back and check the minutes from some of the standards committee meetings one day, just for a laugh.[02:28:31] <The_Vulture> all of these trivial details were presumably given far too much thought[02:29:19] <pr3d4t0r> The_Vulture: That's because those languages are being designed by committee.[02:29:24] <DemisM> and cloneable mispelled :([02:29:31] <pr3d4t0r> DemisM: He, he, he...[02:29:42] <pr3d4t0r> DemisM: "Sir, please step away from the clonable()".[02:30:09] <pr3d4t0r> DemisM: The Java 1.0.x API had the only methods that were truly deprecated (physically purged).[02:30:49] <pr3d4t0r> DemisM: There were things like Colour() instead of Color(), and other typos. It was funny as hell reading the Java 1.1.0 spec.[02:31:23] <pr3d4t0r> DemisM: The problem was that some brits had worked on it so it wasn't consistent; either that or some class/method names had typos in them.[02:31:41] *** dewaard has left ##java[02:31:57] <The_Vulture> pr3d4t0r: Nice, actually i've been hacking some code recently that someone wrote which included the nice british spelling of Colour, damn it was annoying to see both spellings in the same source code (using the standard libraries)[02:32:02] <The_Vulture> *shakes fist*[02:32:59] <The_Vulture> My current fan cost 60 or 70 (with shipping mind you, and that was several years ago)[02:33:36] <DemisM> in a string "a + b" the spaces are seen if i do charAt(1) no?[02:33:48] *** daveStyle has joined ##java[02:33:49] <pr3d4t0r> DemisM: Spaces are seen.[02:34:03] <pr3d4t0r> DemisM: In my sample code, you could do: case ' ' : break;[02:34:09] <pr3d4t0r> DemisM: That'd ignore the space.[02:34:43] *** dingo001 has joined ##java[02:34:45] <pr3d4t0r> DemisM: Unless you're writing Python parsers, white space is always ignored ;)[02:35:10] <DemisM> neat, k thx, for all of your inputs, ##java > * :)[02:35:25] <daveStyle> i know this may be a little off the point but can anyone tell me what this error means. i get it when trying to start azureus." Exception in thread "main" java.lang.NoClassDefFoundError: org/gudy/azureus2/ui/swt/Main"[02:35:41] <pr3d4t0r> DemisM: May the Force be with you, young padawan.[02:36:06] <pr3d4t0r> daveStyle: How do you start Azureus?[02:36:10] <MacIver> daveStyle: it means hackers got into your computer[02:36:30] <daveStyle> pr3d4t0r: from console[02:36:35] * pr3d4t0r smacks daveStyle[02:36:41] <daveStyle> pr3d4t0r: azureus &[02:36:41] <pr3d4t0r> daveStyle: How exactly?[02:36:45] <pr3d4t0r> daveStyle: Ah.[02:37:05] <daveStyle> pr3d4t0r: any ideas, it was working fine[02:37:07] <pr3d4t0r> daveStyle: Hrm... that means that one of the libraries can't be found by the shell script.[02:37:25] <pr3d4t0r> daveStyle: Did you remove anything you shouldn't have, or move the file to a different directory?[02:37:58] <daveStyle> pr3d4t0r: i installed a plugin which broke it in first place but ive deleted everything and done a fresh install from scratch[02:38:01] <pr3d4t0r> daveStyle: Did you edit the azureus shell file to change any paths? Look for the arguments to -cp or -classpath[02:38:19] <daveStyle> pr3d4t0r: no, didnt touch a thing[02:38:21] <cybereal> pr3d4t0r: whitespace isn't ALWAYS ignored, for example: Objectx=newObject();[02:38:22] <pr3d4t0r> daveStyle: You probably nuked the SWT .jar -- we can't help you with that in this channel.[02:38:37] <pr3d4t0r> cybereal: It is for parser purposes.[02:38:43] *** Mc_Fly has joined ##java[02:38:43] <daveStyle> pr3d4t0r: i know, just thought you could explain the error is all[02:38:50] *** ramza3 has quit IRC[02:38:52] <pr3d4t0r> cybereal: The parser ignores it, not *you*.[02:38:57] <pr3d4t0r> daveStyle: Ah.[02:39:08] <cybereal> pr3d4t0r: It may be reduced to a single entity but it's no more ignored than a semi-colon[02:39:12] <pr3d4t0r> daveStyle: Find the SWT .jar, put it in the class path, and you should be fine.[02:39:26] <daveStyle> pr3d4t0r: cool, il give it a try[02:39:31] <pr3d4t0r> daveStyle: Ditto for the .jar that contains that gudy.org stuff.[02:40:20] <pr3d4t0r> cybereal: Dude, repeat after me: white space is ignore in Java and all C-hybrid languages, where WHITESPACE ::= \t | ' ' | \r | \n | COMMENT[02:40:29] <daveStyle> pr3d4t0r: oook, il give her a try[02:40:44] <pr3d4t0r> cybereal: And we could go into the BNF definition of COMMENT too.[02:41:03] <cybereal> pr3d4t0r: ignored but required? :) I think we have differing definitions of 'ignored' in this context[02:41:16] <pr3d4t0r> cybereal: That probably should read more like: WHITESPACE ::= TTY_CTRL_CHAR | COMMENT[02:41:41] <pr3d4t0r> cybereal: Go read about compilers and BNF and we'll both be talking about the same "ignore" definition.[02:42:12] <pr3d4t0r> cybereal: By ignored it means that x = 42; and x = 42; are the same.[02:42:36] <pr3d4t0r> cybereal: WHITESPACE carries no syntactic or semantic meaning.[02:42:39] <Mc_Fly> I have a thread running, and I need to stop the thred when the user presses a button and the resume after some objects have been altered. I found that to stop the thread I should set a varible false that the thread checks in the run method. The problem is that the while loop taken 1 second to complete, so setting a varible false will not work right away. How do I stop the thread instantly?[02:43:21] <pr3d4t0r> cybereal: The scanner will read all the characters but if it runs into white spaces, it'll ignore them and just pass the meaningful symbols to the parser.[02:43:46] <cybereal> pr3d4t0r: but without the spaces it won't know the difference between 'new Object()' and 'newObject()'[02:44:06] <pr3d4t0r> cybereal: Everything in a language definition is a symbol; you have language symbols and terminal symbols. Language symbols are those that can be defined in terms of other symbols.[02:44:27] * pr3d4t0r wants to smack cybereal[02:44:43] <pr3d4t0r> cybereal: Terminal symbols are those that can't be reduced to anything else.[02:45:01] <pr3d4t0r> cybereal: Anyway, your example with newObject() is validating 100% what I'm telling you.[02:45:10] <cybereal> pr3d4t0r: it's also validating that space isn't ignored[02:45:13] <pr3d4t0r> cybereal: In Java, that'd look like a method name.[02:45:30] <pr3d4t0r> cybereal: Dude, IT IS BEING IGNORED BY THE PARSER.[02:45:56] <pr3d4t0r> cybereal: new Object(); and new Object(); are THE SAME because the spaces are ignored by the parser.[02:46:08] <pr3d4t0r> cybereal: Your example is dicking with the SCANNER, not the PARSER.,[02:46:36] <cybereal> pr3d4t0r: omgwtfbbq! chillax[02:46:39] <Honk^away> pr3d4t0r: are you sure it's not the scanner that's skipping the whitespaces in the first place?[02:47:16] <Honk^away> why would the scanner even bother putting whitespaces into the data structures knowing that they'll be ignored?[02:47:19] <pr3d4t0r> Honk^away: Yes.[02:47:27] <pr3d4t0r> Honk^away: Exactly.[02:47:43] <Honk^away> well.. it's not ignored by the parser, the parser doesnt even get 'em :P[02:48:08] <pr3d4t0r> Honk^away: In the first example, the parser only sees NEW_STATEMENT SYMBOL_NAME[02:48:09] <cybereal> I'm sorry, I am not differentiating the scanner and parser[02:48:17] <Honk^away> pr3d4t0r: yeh i know :)[02:48:24] <pr3d4t0r> Honk^away: NEW_STATEMENT(new) SYMBOL_NAME(Object())[02:48:26] *** daveStyle has quit IRC[02:48:32] *** delvinj has joined ##java[02:48:33] *** sched has joined ##java[02:48:35] <Honk^away> yeah, it doesnt even get whitespaces :p[02:48:50] <pr3d4t0r> Honk^away: In the second one it sees SYMBOL_NAME(newObject())[02:48:59] <pr3d4t0r> Honk^away: I'm doing that for cybereal's benefit, by the way.[02:49:09] <Honk^away> pr3d4t0r: then stop saying Honk^away in front of each line :p[02:49:10] <pr3d4t0r> s/Hon/cyberreal/ :)[02:49:12] <Mc_Fly> How do I check if a thread is running?[02:49:27] <The_Vulture> Mc_Fly: RTFM for the Thread class..[02:49:35] * cybereal wonders why people put two 'r's in his name when they type it manually[02:49:38] <Honk^away> ~tell Mc_Fly about javadoc thread[02:49:38] <javabot> Mc_Fly, please see java.lang.Thread: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html[02:49:43] <Honk^away> wohow :)[02:49:55] <pr3d4t0r> cybereal: Because I'm Mexican. It doesn't sound right otherwise ;)[02:50:15] <cybereal> pr3d4t0r: heh, look up the word ethereal; it's based on that pronunciation[02:50:30] <pr3d4t0r> cybereal: Will do.[02:51:05] <pr3d4t0r> cybereal: So anyway, in the second case, if the scanner passes SYMBOL_NAME(newObject()) to the parser, the parser will look it up in its symbol table and throw an error if it isn't defined.[02:51:18] *** frivol has joined ##java[02:51:56] <pr3d4t0r> cheeser: :)[02:53:28] <cybereal> pr3d4t0r: if you used a parser generator would you have to scan out spaces before using the generated parser?[02:54:02] <pr3d4t0r> cybereal: Depends on what your syntax definition defines as a white space.[02:54:13] <pr3d4t0r> cybereal: "White space" is an arbitrary definition.[02:54:55] <pr3d4t0r> cybereal: For example, in the bash parser one of the definitions of white space is something like: SHARP ALPHANUM EOL[02:54:57] <cybereal> pr3d4t0r: also on the comment about 2 'r's in my nick; lots of english speakers do that too, I was just noticing the trend the other day[02:55:08] <pr3d4t0r> cybereal: He, he, he...[02:55:18] <pr3d4t0r> cybereal: I've been accused of speaking English too.[02:55:33] *** Stork has quit IRC[02:55:33] <cybereal> pr3d4t0r: sorry, I mean native english speakers :P[02:55:43] <pr3d4t0r> cybereal: Or rather, SHARP STRING EOL[02:56:03] <pr3d4t0r> cybereal: SHARP STRING EOL --> # This is a bash comment[02:56:33] <cybereal> pr3d4t0r: I guess my point is lost on all of this; the whitespace isn't always ignored in C like languages at some point, maybe the parser ignores it because it never gets it but whatever, it's semantics. You can't write all of java constructs without any whitespace.[02:56:39] <pr3d4t0r> cybereal: STRING ::= CHAR STRING | CHAR[02:57:02] <pr3d4t0r> cybereal: Dude, stop being stubborn and go read about compiler design.[02:57:51] <cybereal> I don't think I'm the one that is being stubborn :)[02:57:58] <pr3d4t0r> cybereal: It's not "semantics". There is 60 years of research defining all this stuff precisely. What you need to do is learn that terminology instead of arguing about whether your definition of white space matches what Aho, Kernighan, and co. said.[02:59:26] *** sched has quit IRC[02:59:28] <pr3d4t0r> cybereal: So yes, you're being stubborn because there is very precise terminology about what a parser, a grammar, a scanner, white space, etc. are or how to define them, and you're either chosing to ignore it or really not know it, yet you insist on creating an inaccurate interpretation of what they mean.[03:00:31] <cybereal> pr3d4t0r: i'm not saying you're wrong, I'm just saying you missed my point[03:00:39] <pr3d4t0r> cybereal: OKi.[03:00:41] <cybereal> pr3d4t0r: WHen you boil it all apart then definitely, there is lots more to it[03:00:55] <pr3d4t0r> cybereal: I like boiling it to that part ;)[03:01:09] <Honk^away> pr3d4t0r: not talking about compilers though, he's right :P[03:01:16] <Honk^away> whitespaces in java are not always ignored :)[03:01:26] <pr3d4t0r> cybereal: For example, in C/Java/C++, "The spaces here are meaningful" but not to the LANGUAGE. They're meaningful to the string definition.[03:01:38] <cybereal> pr3d4t0r: yeah, I get that[03:01:51] <Honk^away> maybe you should just stop now you've found a consense :p[03:02:02] * cybereal concurs[03:02:15] <pr3d4t0r> Honk^away: I'm just bitchy because I only slept three hours since Saturday at 0600.[03:03:09] <Honk^away> yeah, but seeing 2 ppl argue when they actually say the same thing is confusing =)[03:03:29] <pr3d4t0r> Honk^away: I'm not saying the same thing. Never did.[03:03:45] <Honk^away> cybereal's saying the same thing as you though[03:03:46] <Honk^away> now :)[03:03:55] <cybereal> Honk^away: we were talking about different things, without really specifying properly[03:04:06] <Honk^away> cybereal: "you were"[03:04:10] <cybereal> well whatever[03:04:15] <Honk^away> but now everyone has understood each other and you're still discussing :D[03:04:16] <pr3d4t0r> cybereal: The world should be glad we aren't talking about nuclear weapons reduction :)[03:04:23] <cybereal> heh[03:04:48] <cybereal> Honk^away: might I remind you that discussion is the very purpose of irc?[03:04:49] <pr3d4t0r> cybereal: "Let's eliminate these six missiles!" "No, let's eliminate a half dozen!"[03:04:56] <cybereal> Hehe[03:04:57] <Honk^away> discuss about the advantages of debian over gentoo *lol*[03:05:05] <pr3d4t0r> /kick Honk^away[03:05:06] * cybereal stabs Honk^away[03:05:34] <pr3d4t0r> Honk^away: Debian vs. Gentoo is like asking someone "do you want a shit sandwich or a shit taco"?[03:05:38] <Amnesiac> of course gentoo > debian[03:05:40] <Amnesiac> and freebsd > *[03:05:42] <Amnesiac> but ah well[03:05:47] <Amnesiac> world is never fair enough :)[03:05:51] <Twiun> Amnesiac: you've got the perfect nick[03:05:56] <pr3d4t0r> Amnesiac: And OS X > FreeBSD[03:05:56] <Honk^away> ^-- you can always find someone to discuss with :p[03:06:01] <Amnesiac> pr3d4t0r, hell no :)[03:06:13] *** pavlicek has joined ##java[03:06:17] <Amnesiac> OS X took the FreeBSD model :)[03:06:18] <pr3d4t0r> Amnesiac: Same infrastructure, plus a decent GUI.[03:06:20] * The_Vulture yawns and continues to use Debian Sid.[03:06:23] *** wonea has joined ##java[03:06:23] <cybereal> BSD zealots are the only people worse than debian zealots[03:06:25] <Mc_Fly> I have a thred that looks an a varible every now and then. And a userinput that sets this varible. Do I need synchronized keyword around the varible? I'm a bit confused as I only have 1 thread and the docs states that synchronized is needed when more threads access the same code at once[03:06:27] * Amnesiac sets The_Vulture on fire[03:06:32] <pr3d4t0r> The_Vulture: Ah, so shit sandwich then.[03:06:37] <Amnesiac> pr3d4t0r, decent GUI == twm[03:06:38] <Amnesiac> :P[03:07:01] <pr3d4t0r> Mc_Fly: What type is the variable?[03:07:10] <The_Vulture> pr3d4t0r: Working well at the moment, but who knows what tomorrow might bring.. (actually I've not had any severe failures in Sid in the 3 years or so I've been using it)[03:07:24] <Mc_Fly> pr3d4t0r: double[][03:07:29] <pr3d4t0r> Mc_Fly: If it's a primitive other than long or float, you don't need to worry about synchronization because updates to such variables are atomic.[03:07:33] <cybereal> hm I'd post the last 20 lines to bash.org but I doubt most people there would get the humor[03:07:43] <pr3d4t0r> Mc_Fly: OKi, you need to synchronize then.[03:07:52] <The_Vulture> Mc_Fly: and by "access" you mean read/write values in the double[], or change the value of the double[] itself (ie: make it refer to a different array)[03:08:13] *** wonea has left ##java[03:08:19] <pr3d4t0r> The_Vulture: Ah! Good question. I assumed RW.[03:08:32] * pr3d4t0r smacks himself in the head for assuming things.[03:08:51] <Amnesiac> Having a Collection.iterator() is there any safer way to modify the Collection while iterating over it? say another thread is adding elements to the Collection and another thread was iterating by using java.util.Iterator;[03:08:59] * Amnesiac assumes pr3d4t0r is chilango[03:08:59] <The_Vulture> pr3d4t0r: Yeah, I assumed read/write, I just wasn't sure if he was modifying the array reference, or the array members, or both. If he's only accessing the members he can lock on the array object, if he's modifying the reference he'll need to lock on something else[03:09:09] <The_Vulture> pr3d4t0r: depends on the kind of updates he wants to do.. (hmm.. is an increment atomic? what about += ?)[03:09:12] <Mc_Fly> pr3d4t0r: Thanks[03:09:15] <The_Vulture> that was out of order..[03:09:26] <pr3d4t0r> The_Vulture: I'd assume the array elements; modifying the reference is also atomic :)[03:09:53] <pr3d4t0r> The_Vulture: It'd be crazy, but it is atomic and doesn't need to be synchronized :)[03:09:56] <Mc_Fly> The_Vulture: I'm actually changing the object, as I'm initializing a new array.[03:10:04] * pr3d4t0r madrea a Amnesiac[03:10:09] <Amnesiac> heh[03:10:21] <Amnesiac> Yeah I know, being called a "chilango" is worse than a "mentada de madre"[03:10:24] <Honk^away> Mc_Fly: then synchronize on something :p[03:10:27] <pr3d4t0r> Amnesiac: Indeed.[03:10:34] <The_Vulture> pr3d4t0r: *nods*[03:10:38] <pr3d4t0r> Amnesiac: I'm poblano, raised celayense.[03:10:41] <Mc_Fly> Honk^away: ?[03:10:47] <The_Vulture> Mc_Fly: and what are you doing in different threads?[03:11:22] <Amnesiac> Having a Collection.iterator() is there any safer way to modify the Collection while iterating over it? say another thread is adding elements to the Collection and another thread was iterating by using java.util.Iterator;[03:11:36] <pr3d4t0r> Amnesiac: And you know what they say: Perro, perico y poblano - no lo cojas con la mano. Cógelo con un palito porque es animal maldio.[03:11:43] <The_Vulture> Amnesiac: lock on the container itself, or something else, keep the lock over the entire iteration[03:11:45] <Amnesiac> maldito* hahaha yeah[03:11:49] <The_Vulture> the docs explain this clearly[03:11:55] <Mc_Fly> The_Vulture: I have 1 thread and it reads from the double[]. The double[] is being reinitialiced by interaction[03:11:57] <Honk^away> Mc_Fly: maybe you should rad some tutorial on threading before actually using it =)[03:12:03] <Amnesiac> The_Vulture, I DO, but I still get ConcurrentModificationException[03:12:07] <Amnesiac> and I know the docs say about that[03:12:15] <Amnesiac> I'm synchronizing on the Collection itself[03:12:19] * pr3d4t0r checks the docs[03:12:25] <The_Vulture> Amnesiac: but do you actually lock in other places too.. and/or use a concurrent wrapper..[03:12:27] <pr3d4t0r> Amnesiac: Dude, the documentation says that you suck![03:12:34] <Mc_Fly> Honk^away: I did, but they all regard isues of more that one thread[03:12:37] <The_Vulture> pr3d4t0r: hehe :)[03:12:43] <Amnesiac> pr3d4t0r, I'm following that, I'm locking on the Collection[03:12:44] <Honk^away> Mc_Fly: you have more than one thread[03:12:46] <Honk^away> obviously[03:12:49] <MacIver> you are lucky you get that exception...in my day, we had to have erratic behavior if we did crap like that...and like it![03:12:57] <Honk^away> one that's reading and one that's writing on user input[03:12:58] <Honk^away> that's 2[03:12:58] <The_Vulture> Amnesiac: have you done this: List list = Collections.synchronizedList(new ArrayList(...));[03:13:07] <Amnesiac> The_Vulture, yes[03:13:10] *** octoberdan has joined ##java[03:13:11] <The_Vulture> Amnesiac then locked on the whole list for the length of the iteration?[03:13:26] <Mc_Fly> The_Vulture: Ok, so the UI has own thread?[03:13:30] <The_Vulture> synchronize (list) { for (Iterator<String> i = list.iterator(); i.hasNext(); ) { .. } }[03:13:31] <Amnesiac> yeah, I place the Iteration inside a synchronized block on the collection[03:13:35] <octoberdan> Has anyone here used Tomcat's Realm?[03:13:39] <Amnesiac> yeah The_Vulture that thing :)[03:13:47] <pr3d4t0r> frivol: I was successful last night.[03:13:50] <Mc_Fly> The_Vulture: me?[03:13:57] <MacIver> Amnesiac: and you do that where you modify it?[03:14:07] <MacIver> if you only lock in one place it won't help ;-)[03:14:13] <Amnesiac> I do that when I add to it and when I'm iterating over to it[03:14:18] <The_Vulture> Mc_Fly: Listeners and the like will be triggered in the event handling thread.[03:14:33] <The_Vulture> Amnesiac: when adding you don't need to - you've already wrapped it to make it thread safe.[03:14:34] <Mc_Fly> The_Vulture: ahh ok[03:14:48] <The_Vulture> Amnesiac: are you sure you aren't doing concurrent operations within your iteration in one thread?[03:14:53] <Amnesiac> The_Vulture, well I did that because I was checking if that was causing the exception[03:14:55] <The_Vulture> Amnesiac: pastebin the relevant code and the stack trace[03:15:17] <Amnesiac> The_Vulture, well while iterating I'm removing using iterator.remove()[03:15:27] <The_Vulture> MacIver: it will, because the synchronizedList is already providing synch for single operations[03:15:40] *** delvinj has left ##java[03:15:41] <DemisM> if i have int i = 1; and i do call(++i) is this equiv to call(2)?[03:15:47] <Honk^away> Amnesiac: you shouldnt do that :)[03:15:48] <MacIver> The_Vulture: yeah i realized that when you said it ;)[03:16:04] <DemisM> and for call(i++) i would get call(1) and then it increments?[03:16:27] <The_Vulture> DemisM: try it.[03:16:28] <MacIver> DemisM: not equiv to call(2)[03:16:42] <MacIver> becuase it modifies i, and call(2) does not ;)[03:17:02] <dingo001> how can i append the contents of one list to another?[03:17:12] <The_Vulture> dingo001: RTFM :)[03:17:12] <cheeser> javabot: tell dingo001 about javadoc List[03:17:12] <javabot> dingo001, please see java.awt.List: http://java.sun.com/j2se/1.5.0/docs/api/java/awt/List.html[03:17:13] *** fandeholly has quit IRC[03:17:14] <javabot> dingo001, please see java.util.List: http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html[03:17:35] <dingo001> addAll[03:17:42] <The_Vulture> amazing, you can read :)[03:17:47] *** amorph has joined ##java[03:17:56] <dingo001> The_Vulture: amazing you can be bitchy ;)[03:18:42] <The_Vulture> glad you noticed, I do try[03:18:46] <dingo001> :)[03:21:36] * Amnesiac smacks The_Vulture[03:24:22] * The_Vulture beats Amnesiac with a printed copy of the J2SE 1.5 documentation[03:24:45] *** MacIver has quit IRC[03:24:51] <Amnesiac> eerr stop that, I copied the old code[03:24:51] *** octoberdan has quit IRC[03:27:32] *** tempest1 is now known as PFOcount[03:27:41] *** PFOcount is now known as tempest[03:28:03] *** tempest is now known as tempest1[03:28:31] *** Mc_Fly has quit IRC[03:28:57] *** ACDCJunior has joined ##java[03:31:43] *** Aquila_Deus has joined ##java[03:32:52] *** kiwnix has quit IRC[03:35:29] <DemisM> if I have class Pair{ int x; int y; Pair(int x, int y) { this.x = x; this.y = y; } } and I have an ArrayList<Pair> cord; how do I add an x coord and a y coord seperately to the same object?[03:35:34] *** paulweb515_ has left ##java[03:36:08] <The_Vulture> DemisM: what what?[03:36:30] * The_Vulture throws something at Amnesiac - where's the rest of your code?[03:37:03] *** mohadib has joined ##java[03:37:32] *** MacIver has joined ##java[03:37:36] <DemisM> so i have a class Pair[03:37:44] <DemisM> the same as above[03:37:48] <DemisM> it's public[03:38:24] <DemisM> In some other class I have ArrayList<Pair> coord = new ArrayList<Pair>();[03:38:50] * mohadib just woke up from saturday night :\[03:39:49] <DemisM> I can do coord.add(new Pair(1,2)); but how can I add just to my x value like coord.add(Pair.x = 4, 0) and then coord.add(Pair.y = 2, 0)[03:40:27] <The_Vulture> that doesn't make a lot of sense..[03:40:50] <The_Vulture> a Pair contains two coordinates, you can't make a Pair that just "doesn't have" one part or another[03:40:52] <DemisM> 0 is my coord index[03:41:42] <DemisM> so how do I correctly add a pair?[03:42:09] <mohadib> cooed.add(new Pair(1,0));[03:42:28] <The_Vulture> coord.add(new Pair(1, 0), 0) I assume is what you want.. if you want to add Pairs at the begining of your List[03:42:50] <The_Vulture> I assume that's what you are trying to ask, though you seem to lack the ability to articulate your requirements.[03:43:02] <mohadib> hhehe[03:43:07] <mohadib> The_Vulture: long time no see[03:46:51] *** cored has joined ##java[03:49:25] <The_Vulture> Amnesiac: Oi - talk.[03:50:44] *** ACDCJunior has quit IRC[03:53:40] *** Kal-L has joined ##java[03:54:01] <Kal-L> do .jpg not show up in jar files?[03:54:06] *** rake has joined ##java[03:54:13] <mohadib> Kal-L: they do[03:54:25] <mohadib> getResource()[03:54:32] <Kal-L> i'm having a very hard time displaying one[03:54:52] <mohadib> this.getClass.getResource("/art/img.jpg");[03:55:05] <mohadib> dont forget its getClass()[03:55:22] <Kal-L> soo[03:55:25] <Kal-L> to implement it[03:55:50] <Kal-L> ImageIcon blah blah pic = this.getClass.getResource.....[03:55:55] <The_Vulture> no..[03:55:55] <tiglionabbit> I have a java assignment to write an ADT that has preconditions. I just made it throw regular exceptions if the preconditions are violated, and turned it in. And then my teacher took off a bunch of points because his testing code doesn't throw or catch exceptions. I have to use this same ADT in the next assignment. What do you recommend I do?[03:56:01] <mohadib> ImageIcon ico = this.getClass().getResource("/art/img.jpg");[03:56:05] <The_Vulture> getResource returns a URL, you need to use that URL to create an ImageIcon from it.[03:56:15] <The_Vulture> There are some simple methods in the API.. somewhere.. to do that.[03:56:17] <mohadib> nsorry[03:56:19] <cheeser> tiglionabbit: use assert[03:56:21] <Kal-L> yea, ur right[03:56:26] <tiglionabbit> cheeser: there's assert in java?[03:56:30] <mohadib> ImageIcon ico = new ImageIcon(this.getClass().getResource("/art/img.jpg"));[03:56:39] <cheeser> tiglionabbit: um. yes.[03:56:47] <tiglionabbit> oh. Where?[03:56:53] *** wig has quit IRC[03:57:04] <cheeser> in the language...[03:57:07] <cheeser> google[03:57:13] <tiglionabbit> the best thing would actually be to just print an error message and exit[03:57:21] <tiglionabbit> by where I meant in what object[03:57:33] <mohadib> JOptionPane?[03:57:38] <mohadib> System.out.println?[03:57:47] <cheeser> javabot: tell tiglionabbit about getstarted[03:57:47] <javabot> tiglionabbit, getstarted is http://java.sun.com/tutorial/getStarted[03:57:58] <pr3d4t0r> ~tell Kal-L about aolbonics[03:57:58] <javabot> Kal-L, aolbonics is talking using numbers, or using single letters for you, are, you are, you're, etc. Examples are: Hey evry1; howz it goin?; how r u; ur teh suckz. Talking like this is frowned upon in ##java, and may result in you being silenced. See this for more detail: http://ars.userfriendly.org/cartoons/?id=20041201[03:58:02] <tiglionabbit> =\[03:58:04] <pr3d4t0r> ~topicsmite Kal-L[03:58:04] <javabot> And the wrath of /TOPIC descended with terrible fury upon Kal-L. 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.[03:58:30] <tiglionabbit> ugh, every time I come in here someone sends me a hello world tutorial[03:58:34] <cheeser> let us prey.[03:58:39] <mohadib> hh[03:58:41] <The_Vulture> tiglionabbit: perhaps that should tell you something..[03:58:45] <cheeser> tiglionabbit: because you're asking very basic questions.[03:58:48] * pr3d4t0r hovers over cheeser, looking for prey.[03:58:58] <pr3d4t0r> cheeser: How d'you like the new /topic?[03:59:04] <jdhutchin1> tiglionabbit, maybe it's a sign[03:59:17] <cored> hi guys[03:59:19] <cored> lo The_Vulture[03:59:22] <cored> hey cheeser pr3d4t0r[03:59:28] <tiglionabbit> I know I suck at java. I hate java. I just have to appease my picky teacher and find some way to check preconditions[03:59:30] <cheeser> the aolbonics ir probably overkill but yeah.[03:59:40] <rake> http://pastebin.com/403619 <-- in that code, for some reason I get an error about return types not lining up: I think it has to do something with the catch statement at the very end. Can someone have a look at that and give me a pointer?[03:59:49] <mohadib> pr3d4t0r: most aolbonics users dont kknow how to read a topic[03:59:56] <tiglionabbit> like, how do I properly throw a runtime exception?[04:00:02] <tiglionabbit> preferably with a string[04:00:11] <The_Vulture> rake: a) too long b) you didn't provide the actual compiler output[04:00:19] <mohadib> throw new Exception("BAD!!");[04:00:19] <cheeser> javabot: tel tiglionabbit about exceptions[04:00:19] <javabot> Did you mean tell tiglionabbit about exceptions?[04:00:27] <pr3d4t0r> mohadib: Yeah, but now they can't complain that they haven't been warned.[04:00:29] <cheeser> bah![04:00:32] <The_Vulture> tiglionabbit: did you actually ask your teacher what they prefered?[04:00:33] <cheeser> javabot: tell tiglionabbit about exceptions[04:00:33] <javabot> tiglionabbit, exceptions is http://java.sun.com/tutorial/essential/exceptions[04:00:35] <mohadib> pr3d4t0r: ;)[04:01:08] <cheeser> pr3d4t0r: no one reads the topic anyway.[04:01:12] <pr3d4t0r> OKi, time to shower and go see Doom.[04:01:22] <cheeser> people get pretty pissy when I kickban them for flooding.[04:01:25] <pr3d4t0r> cheeser: IMTheNachoMan was nagging earlier that "it's not in the /topic" so I fixed that.[04:01:26] <The_Vulture> pr3d4t0r: enjoy, catch you later[04:01:37] <pr3d4t0r> The_Vulture: When is the interview?[04:02:04] <pr3d4t0r> Well, if it's tomorrow and I don't see you... Cheers and good luck.[04:02:23] <pr3d4t0r> cheeser: The Lord help us. The_Vulture is getting interviewed as a big banana for Microsoft.[04:02:25] <The_Vulture> pr3d4t0r: 4 hours from now[04:02:35] <pr3d4t0r> The_Vulture: Kick ass.[04:02:39] <The_Vulture> quite[04:02:40] <cheeser> pr3d4t0r: you should've just kicked IMTheNachoMan for being a wanker.[04:02:50] <pr3d4t0r> cheeser: Better.[04:02:50] <Kal-L> why does the pic appear when i compile it and run it but not in my .jar file[04:02:53] <Twiun> The_Vulture: g'luck :)[04:02:59] <pr3d4t0r> cheeser: I silenced him :)[04:03:01] <The_Vulture> Twiun: thanks[04:03:06] <cheeser> 8^)=[04:03:11] <The_Vulture> Kal-L: because you wrote bad code.. *shrugs* your question's too vague[04:03:21] <cored> ~javadoc BigInteger[04:03:21] <javabot> cored, please see java.math.BigInteger: http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html[04:04:09] <Kal-L> in other words, the pic is in the jar file with the rest of the needed files but it still doesn't display[04:04:14] <rake> The_Vulture, I simplified the code: http://pastebin.com/403622 , and eclipse won't compile it at all, because it says return type has to be the same[04:04:30] <cheeser> Kal-L: because you don't load files from jars with File[04:04:40] <cheeser> javabot: tell rake about newbie ide[04:04:40] <javabot> rake, newbies shouldn't use IDEs. read: http://qa.jtiger.org/GetQAndA.action?qids=52&showAnswers=true[04:04:53] <The_Vulture> rake: you could make it even simpler and still fail.. you said your function returns something, but there are paths through that function that don't have a return statement[04:05:05] <Kal-L> the .gif pics load fine[04:05:07] <The_Vulture> rake: and stop paraphrasing the compiler - copy/paste the actual compiler error next time[04:05:11] <The_Vulture> thanks cheeser[04:05:12] <Kal-L> and i'm not using File[04:05:18] <cheeser> The_Vulture: 8^)=[04:05:51] <The_Vulture> I said 4 hours.. I meant 2 - yeah, I can do basic arithmetic..[04:05:56] <The_Vulture> I should go photocopy some stuff..[04:06:03] <rake> "This method must return a result of type MDT Market.java" <-- error[04:06:24] <The_Vulture> rake: right.. now what value of type MDT is returned when an Exception is thrown (and caught)?[04:06:55] <Kal-L> got it..[04:06:57] <The_Vulture> control flow leaps from the point of failure, to the exception handler, then out to the end of the function, never hitting a return statement to return an MDT type..[04:07:20] <rake> The_Vulture, so I need to define a exception type for a MDT object, basically?[04:07:27] <The_Vulture> no..[04:07:37] *** Geren has joined ##java[04:07:38] <Geren> hi[04:07:39] <mohadib> heh[04:07:40] <The_Vulture> you need to make sure that every path through your function returns the type you declared it should[04:07:41] <Geren> a question[04:07:46] <The_Vulture> Geren: an answer.[04:07:56] <Geren> with a Hashtable, can i have two entries with the same key?[04:08:00] <Geren> like (a,1) (b,1)[04:08:03] <mohadib> no[04:08:07] <Geren> its not allowed???[04:08:11] <mohadib> no[04:08:22] <The_Vulture> Geren: they'll just overwrite one another..[04:08:30] <mohadib> how would it know what to give you when you ht.get("a");[04:08:33] <The_Vulture> perhaps you want a Map< ..., List<...> > instead..[04:08:38] <Geren> The_Vulture, well i'm trying to remove duplicates from an array[04:09:03] <Geren> and the way i do it is that i run through the array, and if the array's value already has a key in the Hashtable, i add 1 to the key[04:09:15] <Geren> if not, i create a key (1) for that value[04:09:25] <Geren> at the end, i run through my hashtable and pick out only those values iwth key 1[04:09:49] <The_Vulture> Geren: so what's the problem?..[04:10:03] <Geren> but you said i can't have values with the same key[04:10:06] <Geren> so if two values both appeared 2 times, what do i do?[04:10:06] <mohadib> yep[04:10:16] <Geren> i mean that means the Hashtable method does not work?[04:10:46] <rake> The_Vulture, I'm pretty sure it does: I mean, the whole method goes and fills up the MTD object with variables, then returns it to main[04:11:55] *** zackk has quit IRC[04:12:22] <rake> The only reason the try/catch is there is because the user needs to enter some values before they go into the MTD object.[04:12:36] <Geren> The_Vulture, i mean can do MyHashTable.put(value1, 1) and then do MyHashtable.put(value2.key)[04:12:40] <Geren> i mean*[04:12:47] <Geren> MyHashtable.put(value2.1)[04:12:49] <mohadib> map.put( key new Integer(Integer.intValue(((Integer)map.get(key)))++);[04:12:50] <mohadib> ;)[04:12:58] <Geren> huh?[04:13:02] <mohadib> heh[04:13:13] <Geren> if i can't have the same key, what am i supposed to do?[04:13:24] <mohadib> you dont need the same key[04:13:27] <mohadib> why would you[04:13:41] <mohadib> you are just takinging an existing key and ++ it's value[04:13:52] <Geren> mohadib, i use the key to determine how many times a number as appeared[04:14:01] <mohadib> why the key[04:14:06] <Geren> then what[04:14:07] <mohadib> the key should be the item[04:14:14] <mohadib> value should be how many times[04:14:15] <Geren> ok hold on[04:14:25] <Geren> when i do myHashTable.put(a,b)[04:14:27] <Geren> which one is the key,[04:14:29] <Geren> a or b?[04:14:33] <mohadib> b[04:14:34] <mohadib> er[04:14:38] <mohadib> a ist the key[04:14:40] <mohadib> b is the value[04:14:41] <Geren> a is the key?[04:14:42] <Geren> ok[04:14:52] <Geren> so value could be the same, but key must be unique[04:14:53] <Geren> right?[04:15:00] <mohadib> yep[04:16:24] <Geren> mohadib, so using hashtables to remove duplicate values is good?[04:16:38] *** dingo001 has left ##java[04:16:56] <mohadib> Geren: there are collexctions thwt will not allow duplicates[04:17:31] <The_Vulture> mohadib: it's not quite that[04:17:42] <The_Vulture> he wants to remove all instances of a value that appears more than once[04:17:51] <The_Vulture> so {1, 2, 3, 2} becomes {1, 3}[04:18:00] *** Dena|Lap has quit IRC[04:18:11] <The_Vulture> yes, a Map would be one simple way to do it, though it still sounds like you're not understanding how to use it effectively for this task[04:18:35] *** Onur_ has joined ##java[04:18:37] <Geren> mohadib, what are collections?[04:18:39] <Geren> The_Vulture, yes[04:20:10] <mohadib> then i would use contains() when making the list[04:20:29] <The_Vulture> mohadib: doesn't do what's necessary[04:20:45] <mohadib> i guess im not understanding his problem[04:20:52] <The_Vulture> you need to keep track of which elements you seen more than once, so you don't put them on output[04:21:05] <The_Vulture> mohadib: look at the example I gave, if two appears more than once on input, it doesn't appear _at all_ on output[04:21:43] <The_Vulture> If you say, only add an element once, and don't add it again if it's already there, then you still get it at least once on output[04:22:00] <The_Vulture> Alternatively if you remove an element when you see it a second time, then you still get it on output if you have an uneven number of duplicates[04:22:00] <mohadib> yes but you can remove the elament if iyt is contained[04:22:13] <The_Vulture> but then if there's a 3rd, your approarch breaks[04:22:22] <mohadib> if(l.contains(e){ l.remove(e)}[04:22:40] <The_Vulture> because you already removed the first when you saw the second, and so you add the 3rd because it doesn't appear in the list at all at that point[04:22:51] <mohadib> The_Vulture: good point[04:22:56] *** forsaken has quit IRC[04:23:03] <mohadib> so a map sems the best[04:23:11] <rake> The_Vulture, is it possible to use input from .io without implementing try and catch altogether?[04:23:25] <mohadib> throw?[04:23:35] <cheeser> javabot: tell rake about exceptions[04:23:35] <javabot> rake, exceptions is http://java.sun.com/tutorial/essential/exceptions[04:23:36] <The_Vulture> rake: standard input in Java's an unnecessarily complex task, so no - there's no real way to do it without some understanding of exception handling[04:23:54] <rake> Alright, thanks.[04:24:00] *** vinse has joined ##java[04:26:19] *** kasper has joined ##java[04:28:37] *** hobbsc has joined ##java[04:29:07] <hobbsc> if I use the final keyword, should I place it outside of my first class? I'd like to use a named constant in main[04:29:24] <hobbsc> that is, should it follow my import statements?[04:29:31] <The_Vulture> hobbsc: that doesn't make sense..[04:29:31] <Garibaldi> no[04:29:36] <Garibaldi> there are no global variables[04:29:37] <The_Vulture> you can't declare variables outside classes[04:29:49] <hobbsc> er[04:29:59] <hobbsc> I mean just outside of my main method, I got confused,[04:30:00] <hobbsc> sorry[04:30:13] <Garibaldi> anywhere in class scope[04:30:18] <hobbsc> ok, thank you[04:30:26] <The_Vulture> you could declare it there if you want. The general rule is that a variable should have the least scope necessary[04:30:37] <The_Vulture> so if you aren't using it outside main, you probably shouldn't declare it outside main[04:31:06] <hobbsc> that makes sense[04:31:35] <vinse> hobbsc: a common practice is to create a class called Consants where you declare the final variables as static ... you then improt that class where needed and use Constants.VARNAME[04:31:46] <hobbsc> I thought that named constants would be easier to use while I'm testing a program, as I can just change their values at the top of the file and not have to change multiple instances.[04:31:59] <hobbsc> that's a good idea, I'll keep that in mind[04:32:01] <hobbsc> thanks for the help![04:32:08] *** The_Vulture has quit IRC[04:33:37] *** hobbsc has quit IRC[04:48:34] <frivol> I thought the buzzard had given up java[04:48:52] *** alex_f has joined ##java[04:53:11] *** deedaw has joined ##java[04:55:19] *** slava has joined ##java[04:57:03] *** Azrael_- has quit IRC[04:57:59] *** Geren has quit IRC[04:59:47] *** dingo001 has joined ##java[04:59:50] *** stefan has quit IRC[05:00:00] *** stefan has joined ##java[05:00:13] <dingo001> how can i find out what the available heap size on a running instance of tomcat[05:00:32] <cybereal> Runtime maybe?[05:00:55] <dingo001> dont have access to anything running on tomcat[05:01:05] <dingo001> from outside the container[05:01:23] <cybereal> ~wayttd[05:01:23] <javabot> wayttd, cybereal wants to know what you are trying to do.[05:02:01] <cybereal> dingo001: that'[05:02:04] <cybereal> err damn[05:02:09] <cybereal> ~tell dingo001 about wayttd[05:02:09] <javabot> dingo001, wayttd, dingo001 wants to know what you are trying to do.[05:02:17] <cybereal> wow that factoid is screwed up[05:02:26] <cybereal> dingo001: wtf are you doing exactly?[05:03:03] <dingo001> well.. i am trying to set the heap size of -x512m, how do I know that it is actually giving it that much memory[05:03:15] <dingo001> %_EXECJAVA% %JAVA_OPTS% -Xmx512M.....[05:03:23] <cybereal> write a test case[05:03:32] <cybereal> a webapp that just prints its available mem[05:03:54] <MacIver> trusssst it[05:04:13] <Twiun> anybody remember what bitmap font formats support 8-bit fonts?[05:04:34] <cybereal> dingo001: honestly, the only way to really know if something is doing what you want is to test for it[05:07:41] *** kasper has quit IRC[05:09:13] *** Baloogan has quit IRC[05:10:55] <dingo001> cybereal: what do u do when you do not have access to running a program on the server[05:11:00] <dingo001> anything visual[05:11:01] <dingo001> ?[05:11:11] *** stedios has joined ##java[05:11:35] <stedios> How do i controlthe size of a pop up window? and have no back/forward button etc[05:11:56] *** stedios has left ##java[05:11:58] <tempest1> stedios, are you talking about Javascript?[05:12:00] <tempest1> yea, good man[05:12:34] <mohadib> ~topic smite stefan[05:12:36] <mohadib> fuck[05:12:44] <jdhutchin1> too late[05:12:59] <mohadib> stefan: read the /topic[05:13:34] <vinse> mohadib: (20:13:57) stedios left the room.[05:13:39] <mohadib> ah[05:13:45] <cheeser> mohadib: you suck at irc[05:13:48] <cheeser> 8^)=[05:13:50] <mohadib> its true[05:13:54] <vinse> cheeser[05:13:56] <cybereal> dingo001: I don't know, that depends on tomcat not java[05:14:04] <cybereal> dingo001: unless the vm is running with the debug server[05:14:05] <vinse> in french, would your name be "fromagier" ?[05:14:17] <dingo001> lol[05:14:22] <cheeser> oui![05:14:23] <cybereal> omelette au fromagier[05:14:27] <cheeser> claro![05:14:35] <cybereal> heheh[05:14:49] <cybereal> j'suis omelette au fromage[05:16:19] <mohadib>[05:19:56] *** snooplsm has quit IRC[05:20:44] *** rbd has joined ##java[05:21:09] <tag> anyone familiar with rhino?[05:21:50] <frivol> I had a pet horned frog once.[05:22:03] <mohadib> ~poll[05:22:03] <javabot> mohadib, poll is something lamers do, like this: "who uses XXX?". Instead, ask your question. 86.5% of polled users say that polling is annoying and useless.[05:22:11] <cybereal> few years back there was a C++ dev ide called rhino, meant to go well with djgpp (before it was part of gcc)[05:22:53] <rake> How do I make a catch exception in a method that will catch errors from a custom return type (an extra class) as well as a whole bunch of 'in's in the class itself[05:23:32] <rbd> hey guys, I'm using AudioSystem.getAudioInputStream (java 1.5.0_04) to open up a URL. the URL isn't actually to a file on a webserver, but instead it's to my application that will whip an audio file out on the fly. problem is, the java applet seems to make more then one (.e.g 3) seperate requests for the file, very quickly. it will end up getting the file on the 3rd request, but I'm wondering why it does this (timeout?, better through[05:23:32] <rbd> put, what?)[05:23:40] <cybereal> rake wtf?[05:23:56] <rake> Erm.[05:23:59] <rake> Messed up on that..[05:24:51] <rake> How do I make a catch exception in a method that will catch errors and exceptions if the method uses a custom return type (an extra class) as well as a whole bunch of 'in's (from io) in the method itself[05:28:14] <cheeser> eh?[05:28:38] <cybereal> rake: same way you always catch exceptions[05:28:44] <cybereal> rake: nothing you said sounds abnormal[05:28:52] <slava> i bet rake is betting a 'missing return statement' error[05:28:58] *** dingo001 has left ##java[05:29:00] <slava> with try { foo; return blah; } catch( .. ) { ... }[05:29:06] <slava> s/betting/getting[05:29:07] <mohadib> slava:![05:29:08] <cybereal> yeah[05:29:20] <slava> mohadib: can i floss my ice?[05:29:33] <mohadib> slava: it's all you mang[05:29:47] <slava> mohadib: i finally got freetype working with opengl, had to spend some time pouring over the sdl_ttf source[05:29:59] <slava> mohadib: http://factor.sf.net/opengl-5.png[05:30:34] <mohadib> slava: very nice![05:32:13] *** jdhutchin1 has quit IRC[05:32:17] <rake> slava: I am indeed.[05:32:29] <slava> rake: well, every path through a method has to return a value[05:33:31] <rake> Right.[05:33:54] <rake> Is that my error? because I don't see any way that it's not returning one..[05:34:43] <cybereal> rake: just put return null; as the last line :P[05:35:57] <rake> Then how do I return anything to main, heh[05:36:36] <cybereal> ~tell rake about testcase[05:36:36] <javabot> rake, testcase is a minimal independently runnable program, which demonstrates the problem; see http://www.physci.org/codes/sscce.jsp for details and a HOWTO[05:36:42] <cybereal> testcase or bust buddy[05:41:24] *** prolificgnosis has joined ##java[05:42:22] *** MarkT has quit IRC[05:43:05] <prolificgnosis> does anyone know where i can find information on how to code a pr quad tree?[05:44:14] <prolificgnosis> hello?[05:44:23] <ijoyce> yes?[05:44:29] <slava> how does a pr quad tree differ from a quad tree?[05:44:51] <prolificgnosis> its divided by regions[05:44:55] <ijoyce> prolificgnosis, that seems to be the kind of thing that google could answer for you[05:44:59] <slava> be more specific[05:45:35] <prolificgnosis> its divided by key space partitioning[05:46:00] <cheeser> http://www.google.com/search?q=java+pr+quad+tree&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official[05:46:05] <prolificgnosis> well i've been looking on google, but found only examples[05:46:21] <slava> prolificgnosis: coding a quad tree is general[05:46:25] <slava> s/general/trivial/[05:48:02] <prolificgnosis> what does that mean?[05:48:05] <prolificgnosis> s/general[05:49:02] <vinse> s/foo/bar means "replace occurences of 'foo' with 'bar'"[05:49:06] *** Amnesiac has quit IRC[05:52:41] <d03boy> would anyone be able to tell me why an ArrayList<String> would magically become a LOT faster calling the contains method once I have about 9000 objects in it?[05:53:02] <mohadib> d03boy: use a map[05:53:08] <mohadib> it's indexed[05:53:27] <d03boy> mohadib, im doing this to test these structs[05:53:32] <mohadib> ahh[05:53:43] <d03boy> and i noticed this wierd behavior and couldnt think of an explanation for it[05:53:45] <mohadib> d03boy: use a bianry search[05:53:53] *** MrPrimate has joined ##java[05:54:19] <d03boy> i'm testing a few things: Lookup (custom class), TreeSet, HashMap, and LinkedHashMap[05:55:06] <d03boy> i cant figure out why an ArrayList (from the Lookup class) is behaving like this though[05:55:17] <mohadib> LinkedHashMap are have constant time insetion , removell etc , but it also is fast to iterate and it reatins assertion order[05:55:39] *** Amnesiac has joined ##java[05:57:02] <d03boy> to run the contains method on ArrayList 100 times through a list with 8000 elements it takes nearly 200ms, but it only takes 35ms for 10000 elements[05:57:26] <slava> because hotspot compiles methods that are called frequently[05:57:40] <d03boy> slava, can you elaborate a little?[05:57:53] <d03boy> it stores the halfway point maybe?[05:58:01] *** Wufei|TV is now known as Chang_Wufei[05:58:02] <cheeser> d03boy: google for java hotspot[05:58:07] <d03boy> ok[05:58:18] <slava> d03boy: the first few times through your benchmark runs in the interpreter[05:58:27] *** Mactabilis has joined ##java[05:59:32] *** dibblego has joined ##java[06:00:25] *** blastnost has joined ##java[06:06:34] *** Amnesiac has quit IRC[06:07:48] *** Stigma has quit IRC[06:08:00] *** DemisM has quit IRC[06:13:32] *** MrPrimate has quit IRC[06:16:23] <d03boy> is it bad when all of my comparisons of arraylist, treemap, hashmap, linkedhashmap look almost exactly the same :|[06:16:42] <dibblego> eh?[06:16:57] <d03boy> i graphed their time complexities[06:17:58] <dibblego> please make sense[06:18:12] <Twiun> dibblego: in ##java? You're asking too much![06:18:14] <d03boy> nevermind[06:18:32] *** pulaski has joined ##java[06:19:34] <MacIver> d03boy: have you ever done algorithm analysis?[06:20:16] <d03boy> a little bit[06:20:17] <MacIver> O(1) != O(n) != O(n^2)[06:20:28] <d03boy> big-o notation, yes a little[06:21:02] <MacIver> so, what is the cost of a remove in arraylist?[06:21:06] <MacIver> in hashmap?[06:21:17] <d03boy> i'm not testing remove, i'm testing add() and contains()[06:21:28] <MacIver> ok, let's say contains[06:21:40] <d03boy> an ArrayList is random access if I remember correctly[06:21:42] <MacIver> what do you think it is for contains in an arraylist?[06:21:46] <MacIver> random?[06:21:52] <MacIver> it has to search through the list[06:22:02] <MacIver> so it's O(n) time[06:22:05] <dibblego> erm, no it doesn't[06:22:09] <dibblego> ArrayList is O(1) seek[06:22:13] <MacIver> dibblego: really?[06:22:15] <MacIver> how so?[06:22:17] <dibblego> truly[06:22:19] <dibblego> so so[06:22:25] <dibblego> LinkedList is O(n)[06:22:29] <slava> you guys are idiots[06:22:37] <MacIver> dibblego: how can it do that?[06:22:39] <slava> MacIver is talking about contains(), not get()[06:22:44] <dibblego> oh[06:22:48] <MacIver> exactly![06:22:52] <MacIver> bah[06:22:55] <dibblego> well shuddup then![06:22:57] <d03boy> it has to search through all of them :P[06:23:12] <dibblego> it's all slava's fault ultimately[06:24:24] <mohadib> i blame canada[06:25:13] <Twiun> dibblego: always[06:25:16] *** cored has quit IRC[06:26:43] *** prolificgnosis has quit IRC[06:29:05] <mohadib> slava: did you write a regex pkg for Factor?[06:29:29] <slava> somebody else is working on one[06:29:36] <mohadib> nice[06:34:14] *** mohadib has quit IRC[06:36:56] *** RaggedJack has quit IRC[06:37:05] *** Azrael_- has joined ##java[06:40:36] *** themime has joined ##java[06:41:02] <themime> whats the C style enum called in java 5?[06:41:25] <dibblego> ~tell themime about enum[06:41:25] <javabot> themime, enum is http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html[06:42:20] <themime> that didn't seem[06:42:22] <themime> well[06:42:24] <themime> i was there before[06:42:44] <themime> but...[06:45:10] <themime> ooook nevermind, i found a place that shows how to use it, good stuff, thanks[06:45:32] <vinse> seldom is so little said with so many words[06:45:39] <themime> amen[06:47:31] *** pavlicek has quit IRC[06:48:22] <dibblego> ~forget enum[06:48:24] <javabot> I forgot about enum, dibblego.[06:48:47] <dibblego> ~enum is http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html or http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.9 (JLS 3rd Edition 8.9)[06:48:47] <javabot> Okay, dibblego.[06:50:20] *** Tartaros has joined ##java[06:54:04] <themime> yep thats where i was dibble[06:54:15] *** fuso has quit IRC[06:54:43] <dibblego> if you've used an enum prior to 1.5, the new syntactic enums are quite trivial; there are texts on < 1.5 enums[06:55:12] *** slava has left ##java[06:57:46] <tag> I'm getting the error "A node is used in a different document than the one that created it"[06:57:53] <tag> but I'm find this less than trivial to resolve[06:59:08] <dibblego> error or exception?[06:59:17] *** stefan has quit IRC[06:59:20] <tag> Exception[06:59:27] <dibblego> what kind of exception?[06:59:33] *** stefan has joined ##java[06:59:39] * dibblego juices the required information for the channel[06:59:41] <tag> org.w3c.dom.DOMException[06:59:52] <dibblego> and the code that produces it is?[07:00:13] <Twiun> ... one character at a time, please![07:00:28] <tag> The whole lot of it?[07:00:34] <dibblego> no, a test cas[07:00:34] <dibblego> e[07:00:38] <dibblego> ~tell tag about test case[07:00:39] <javabot> tag, test case is a minimal independently runnable program, which demonstrates the problem; see http://www.physci.org/codes/sscce.jsp for details and a HOWTO[07:00:46] *** Beached has quit IRC[07:00:48] <dibblego> alternatively, post the stack trace to a relevant place[07:01:04] <dibblego> alternatively, because most people are too lazy/stupid to provide a test case, which is optimal[07:01:04] *** pavlicek has joined ##java[07:07:10] *** Bevin has joined ##java[07:07:46] *** themime is now known as themime|sleep[07:08:29] <Bevin> hi[07:16:41] <rake> What should I google to find out how to implement the concept of time in a java application?[07:16:51] <rake> ~tell rake about java time[07:16:51] <javabot> rake, I guess the factoid 'changing runtime classpath' might be appropriate:[07:16:53] <javabot> rake, changing runtime classpath is http://forum.java.sun.com/thread.jsp?forum=32&thread=300557&message=1961099[07:16:58] <rake> :/[07:16:59] <dibblego> ~javadoc Date[07:17:00] <javabot> dibblego, please see java.sql.Date: http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Date.html[07:17:02] <javabot> dibblego, please see java.util.Date: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html[07:17:09] <dibblego> ~javadoc System.currentTimeMillis()[07:17:09] <javabot> dibblego, please see java.lang.System.currentTimeMillis(): http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#currentTimeMillis()[07:17:18] <rake> Awesome, thanks! :)[07:20:38] *** Chang_Wufei is now known as Wufei|sleep[07:25:08] *** grifis has quit IRC[07:29:03] <NOthsouth> how can I make my .java cast O/S commands... I mean, if I system.out.println("date") it i`ll show me date, i want it show me the SYSTEM DATE(linux commandilne date....) ..[07:29:24] * dibblego adds that to javabash.org[07:32:00] <dibblego> you've got my colleagues in stitches at least :)[07:33:35] <vinse> ~javadoc Process[07:33:35] <javabot> vinse, please see java.lang.Process: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Process.html[07:33:43] <vinse> NOthsouth: check that link[07:33:50] <vinse> sorry to end your fun dibblego ;p[07:33:58] <dibblego> I don't think that's his intention[07:34:09] <vinse> i think it is[07:34:10] <dibblego> System.out.println(new Date());[07:34:35] <vinse> oh oh ... i thought he meant "emulate what date does on linux command line"[07:34:40] <vinse> i.e. run a command line process[07:35:03] <vinse> but you're probably right[07:35:09] <vinse> and plus your version is slightly funnier[07:35:15] <dibblego> yep :)[07:35:36] <dibblego> http://www.rafb.net/paste/results/CDP8U260.html[07:36:25] <vinse> dibblego: to be fair, no one ever calls you stupid[07:36:30] <vinse> mean-spirited[07:36:34] <vinse> but not stupid[07:36:41] <dibblego> sure they do[07:36:54] <dibblego> <slava> you guys are idiots[07:36:59] <dibblego> but that was idiotic :)[07:37:17] *** solus has left ##java[07:37:28] *** Kane_Hart has joined ##java[07:37:30] <Kane_Hart> hey[07:37:31] *** watzlaf has joined ##java[07:37:34] <vinse> hey![07:37:38] <Kane_Hart> in linux how do you run a jar file[07:37:45] <cybereal> dibblego: not like anything slava says matters ;)[07:37:49] <MacIver> java -jar file.jar[07:37:54] <Kane_Hart> hmm ok[07:38:47] <MacIver> no javabash.org :([07:38:58] <dibblego> no bash.org either[07:38:59] <pr3d4t0r> Howdy.[07:39:13] <dibblego> javabash.org is a mere text file on my disk at the moment[07:39:16] <dibblego> hello pr3d4t0r[07:39:31] * MacIver goes there and wastes a few more hours[07:39:45] <dibblego> oh it's back![07:39:59] <MacIver> didn't know it was gone[07:40:06] <dibblego> 'twas gone for days[07:42:23] *** Fry-kun has joined ##java[07:42:32] *** Fry-kun has left ##java[07:43:48] <NOthsouth> vinse, thx dude[07:45:22] <pr3d4t0r> dibblego: Greetings.[07:45:24] <pr3d4t0r> dibblego: http://www.qdb.us/49937[07:45:29] <pr3d4t0r> vinse: ^^^^[07:45:33] *** Siph0n_ has quit IRC[07:45:50] <dibblego> good one :)[07:45:59] <dibblego> the worst I've ever seen came from Taiwan[07:46:07] *** Gavrila has joined ##java[07:46:12] <vinse> i'm sure they exist equally in all populations[07:46:15] <pr3d4t0r> In case anyone cares: "Doom" is a good rental. If you want a good videogame movie, stick to "Resident Evil".[07:46:23] <dibblego> no sir, they do not; I assure you of this[07:46:32] <vinse> "good videogame movie" is an oxymoron imo[07:46:36] *** Onur_ has quit IRC[07:46:40] <dibblego> my observations are certainly not coincidental; they are the same observations of others[07:47:18] <dibblego> after Taiwan, comes India and the US on equal par[07:47:28] <dibblego> my observations only of course[07:48:01] <pr3d4t0r> frivol: I noticed.[07:48:46] <pr3d4t0r> dibblego: I noticed a pattern with Indians. When they're good, they 0wN and are a pleasure to work with.[07:48:59] <pr3d4t0r> dibblego: When they aren't, they really, really, really suck.[07:49:01] <dibblego> yep, I know a couple like that[07:49:33] <amorph> wb[07:50:12] <vinse> i love getting support requests from India[07:50:37] <pr3d4t0r> vinse: I love harassing dumb script readers from India when I have a support issue.[07:50:37] <vinse> my favorite part is the idiom "please to be doing the needful" that they use to close their emails[07:51:11] <pr3d4t0r> vinse: Did you read that article about people yelling at them for being incompetent? I did my part. I hope I sent one or two to the shrink.[07:51:29] <cybereal> vinse: hah I should use that[07:51:32] <pr3d4t0r> vinse: There was a /. article about it. Companies had to hire therapists for them.[07:51:32] <cybereal> vinse: in closing of emails[07:51:34] <vinse> i also enjoyed how, when they were under any type of time pressure, they would always include the phrase "urgent" in the title[07:51:35] <cybereal> vinse: to my girlfriend[07:51:53] <vinse> and bring up that it was "urgent" again in the body of the email[07:52:00] <vinse> so it seemed like they were out of their minds with panic[07:52:06] <pr3d4t0r> cybereal: Dude, it's "the nasty" when you're talking about your g/f. Not the "needful". That's when you're by yourself.[07:52:06] <vinse> cybereal: yeah, that's how it sounds to me too[07:52:16] <vinse> but to them it means "pls do whatever is necessary"[07:52:39] <vinse> but yeah, to americans it sounds like "doing the neeful all night long"[07:52:50] <vinse> s/neeful/needful[07:53:26] <cybereal> I was thinking my girlfriend ws needful... of sex of course[07:53:32] <pr3d4t0r> vinse: Do you have Indians around who shake their head side-to-side when they agree with what you're saying.[07:53:35] <pr3d4t0r> ?[07:53:44] <Garibaldi> lol[07:54:03] <pr3d4t0r> cybereal: I had a chick today offer to drive from St. Louis Missouri to Bentonville AR the next time I have a business trip.[07:54:04] <Garibaldi> my girlfriend is Indian. She says "uh-huh" meaning "no"[07:54:12] <pr3d4t0r> Garibaldi: He, he, he...[07:54:19] <vinse> pr3d4t0r: yeah i've noticed that ... it'd disconcerting[07:54:25] <pr3d4t0r> vinse: :)[07:54:29] <vinse> Garibaldi: oh yeah! that one perplexed me for a long time[07:54:44] <cybereal> My very first official programming job was fixing up a web app that an indian outsourcing firm totally f*ck*d up[07:54:46] <pr3d4t0r> cybereal: That's a five-hour drive.[07:55:03] *** watzlaf has quit IRC[07:55:04] <cybereal> pr3d4t0r: she must be lonely :)[07:55:45] <vinse> i've long maintained that the perfect woman lives 90 to 120 miles away[07:55:58] *** watzlaf has joined ##java[07:56:02] <pr3d4t0r> cybereal: She just separated.[07:56:19] <pr3d4t0r> cybereal: And we used to have great sex0r when we worked together in Richardson, TX.[07:56:36] <cybereal> ugh working for that client was horrible... their product was vbscript on top of vb com objects, and every single deployment had its own fork of the source from 1997[07:56:54] <cybereal> pr3d4t0r: Great sex is unfathomably underrated[07:57:05] <pr3d4t0r> cybereal: Indeed.[07:57:09] <pr3d4t0r> cybereal: I can't complain.[07:57:11] <cybereal> heh[07:57:30] <cybereal> I'm glad to have great sex with my girlfriend[07:57:30] *** watzlaf has quit IRC[07:57:32] <pr3d4t0r> cybereal: My appetites are large, my income is good, I'm single and 38, so finding chix0rs isn't a problem.[07:57:36] <cybereal> makes it easier to wake up in the morning[07:57:45] <pr3d4t0r> cybereal: And to avoid cold feet at night.[07:57:50] <cybereal> :)[07:58:02] <pr3d4t0r> cybereal: Blanket == OKi. Warm female human body next to you == better.[07:58:21] <Garibaldi> had to clarify the "human" part[07:58:22] <Garibaldi> heh[07:58:26] <cybereal> hahah[07:58:41] <ijoyce> had to clarify the "female" part[07:59:04] <pr3d4t0r> frivol: Nice -- http://billharlan.com/vacation2005b/1harlan-r6-036-16a.jpg[07:59:30] <pr3d4t0r> Garibaldi: If you get to know me better, you learn that I better clarify. My reputation is a bit spotty.[07:59:44] *** Gavrila has quit IRC[07:59:52] <Garibaldi> lol[08:00:10] <pr3d4t0r> Garibaldi: Rumours began since I told people that this is one of my favourite sites (semi-safe for work): http://www.girlsandcorpses.com[08:01:00] <Garibaldi> ah, hense the "warm" part of the clarification[08:01:06] <ijoyce> pr3d4t0r, that's disturbing[08:01:14] <pr3d4t0r> Garibaldi: Yeah.[08:01:34] <pr3d4t0r> Garibaldi: It's not a secret I dig girls. What's not clear is that I mostly like 'em warm.[08:01:47] <ijoyce> _mostly_[08:02:00] <Garibaldi> lol[08:02:31] <MacIver> mostly![08:03:02] <ijoyce> i hope that means a little chiily and not dead[08:03:03] <cybereal> I like having sex with a girl who is cold from just getting out of a swimming pool, or the rain ... that'd leave me in the "mostly" category[08:03:18] <ijoyce> i hope mostly doesn't mean recently killed[08:03:36] <pr3d4t0r> ijoyce: Dude, necrophilia is underrated.[08:03:47] <Garibaldi> hehehe[08:03:56] <pr3d4t0r> ijoyce: No nags. No bitching. No "I'm having my period".[08:03:58] <Garibaldi> our own little Poe[08:04:08] <ijoyce> pr3d4t0r, and i thought live girls were hard to meet[08:04:27] <ijoyce> i guess they're easy to talk to...[08:04:32] <pr3d4t0r> ijoyce: Yeah.[08:04:40] <NOthsouth> http://pastebin.com/403764 How can I resolv incompatible operand types String and char??[08:04:52] <pr3d4t0r> ijoyce: Just don't get caught in California. We passed a law earlier in the year against necrophiliacs.[08:05:07] <MacIver> NOthsouth: by converting to BCD[08:05:28] <pr3d4t0r> ijoyce: I say it should be all right to do the needful with my g/f even if she's dead if she already consented and is over 18![08:05:41] <vinse> yes![08:05:45] <ijoyce> pr3d4t0r, amen![08:05:50] <vinse> already "doing the needful" is adopted[08:05:51] <NOthsouth> MacIver, bcd?[08:05:52] <Garibaldi> NOthsouth: a is a String (and String is an Object)[08:06:02] <Garibaldi> 'e' is a char (and char is a primitive)[08:06:09] <Garibaldi> you don't compare apples and oranges[08:06:15] <NOthsouth> sorry but I`m a noob..[08:06:23] <vinse> NOthsouth: you seem to be at the point where you could benefit from a tutorial[08:06:24] <Garibaldi> maybe have a.equals("e")[08:06:48] <vinse> ~tell NOthsouth about first cup[08:06:49] <Garibaldi> but, given what you have, a is null[08:06:49] <javabot> NOthsouth, A friendly web page to get you started with Java programming: http://java.sun.com/docs/books/tutorial/getStarted/cupojava/[08:06:53] <Garibaldi> which will cause you bad times[08:06:56] <vinse> ~tell NOthsouth about really big index[08:06:57] <javabot> NOthsouth, really big index is http://java.sun.com/docs/books/tutorial/reallybigindex.html[08:07:05] <pr3d4t0r> Here's an extract from an interview of our governor talking about the necrophilia law: " But zen earlier zis veek, I did anozer zing, too – vich is vat President Boosh invited me here today to tell all ze people about. Yah, I signed ze new law zat makes it a crime to be fucking ze bitches who iz no longer breathing. Mainly because there iz no point in fucking ze bitches if they can no longer screamz, "No!" Und not just fucking zem in ze[08:07:21] <NOthsouth> HUUHUhu really thx guys.. i`ll read all[08:07:49] <MacIver> LOL[08:07:59] <vinse> NOthsouth: just ignore anything that's about applets[08:08:20] <vinse> wtf[08:08:40] <vinse> pr3d4t0r?[08:08:44] <vinse> what are you on about?[08:08:47] <pr3d4t0r> vinse?[08:09:09] <pr3d4t0r> vinse: That's an interview of Schwarzenegger after we passed the necrophilia law last... March, I think. Let me google it.[08:10:51] <vinse> he really said that?[08:10:54] <vinse> while in office?[08:10:57] <pr3d4t0r> vinse: http://www.zeppscommentaries.com/Sociology/necro.htm[08:10:59] <pr3d4t0r> vinse: No.[08:11:00] <vinse> that strains credibility[08:11:03] <vinse> ok[08:11:07] <pr3d4t0r> vinse: But that's pretty funny ;)[08:11:11] * MacIver spits on his keyboard[08:11:13] <pr3d4t0r> vinse: Hej, I love Arnold.[08:16:47] <pr3d4t0r> And people in the south wonder why the rest of the world makes fun of them: http://edition.cnn.com/2005/US/10/23/rice.straw.reut/index.html[08:18:47] <vinse> god[08:19:05] <vinse> pr3d4t0r: there's so much more than just southerners to make fun of in that article :/[08:19:24] <vinse> "Alabamans generally appeared bemused by the man from Blackburn, Lancashire."[08:19:27] <vinse> heh, bemused[08:20:06] <vinse> i remember i was eating sushi once in front of a woman from rural wisconsin[08:20:15] <vinse> and she called her husband over to look at the tuna[08:20:25] <vinse> "come look at this, it's red as watermelon!"[08:20:42] <vinse> "bemused" would be a good word for them too[08:22:01] <NOthsouth> why my while do not work? http://pastebin.com/403771[08:23:04] <NOthsouth> ok[08:23:08] <NOthsouth> i just figure out[08:23:11] <NOthsouth> DUh[08:23:39] <vinse> NOthsouth: everytime you get the urge to come in here and ask a question, remind yourself of this experience[08:23:48] <vinse> and take an extra few minutes to try to work it out ;)[08:25:54] <pr3d4t0r> OKi kids, have a wonderful night.[08:25:59] <pr3d4t0r> Sleep!!!!!!!!![08:26:38] <NOthsouth> vinse, Yeh.. I`ll really try it...[08:28:05] <vinse> NOthsouth: see, if more newbies had your attitude, we'd all be better off[08:32:07] *** Tirlasmisu is now known as Tirlas[08:34:00] *** Danielle has joined ##java[08:34:24] <NOthsouth> Is inelegant use break; ?[08:35:00] <cybereal> no[08:35:14] <cybereal> It is inelegant to use Java at all[08:36:06] <NOthsouth> =][08:36:10] <vinse> NOthsouth: worrying about elegance this early on is a waste of time imo[08:39:00] <KingNato> vinse: I often find that it doesn't matter how long I take to work it out, it's not until I ask someone that I realise just how stupid I am[08:39:26] <vinse> lol[08:39:48] <vinse> that should be Somebody's Law[08:39:55] *** noDLL has quit IRC[08:40:16] <vinse> "You never figure out anything obvious until you've made an idiot of yourself by asking"[08:40:27] <vinse> i guess we could make it KingNato's Law[08:45:05] <cybereal> that %10 was odd, are you chatting through cgi?[08:46:40] *** dibblego has quit IRC[08:47:50] *** debian-san has joined ##java[08:49:42] *** djib has joined ##java[08:50:52] *** Honk^away has quit IRC[08:52:52] *** Honk^away has joined ##java[08:54:10] *** vinse has quit IRC[08:54:55] *** vinse has joined ##java[08:55:00] *** Mactabilis has quit IRC[08:55:32] *** mazon is now known as Mazon[08:55:46] *** Job1 has joined ##java[09:04:15] <debian-san> I have a problem with Apache Axis's java2wsdl. When I generate the wsdl file, the attributes of my complex types are always in alphabetical order. Is it the expected behavior? Do I have to change the generated wsdl by hand, each time?[09:05:26] *** Tirlas is now known as Tirsleep[09:13:19] *** heanol has joined ##java[09:21:18] <pr3d4t0r> debian-san: Howdy.[09:21:55] <pr3d4t0r> debian-san: A word to the wise: it's a better idea to start with a WSDL/XSD file first and generate Java stubs from it, than the other way around.[09:22:04] <pr3d4t0r> ~tell debian-san about presentation[09:22:08] <javabot> debian-san, I guess the factoid 'axis presentation' might be appropriate:[09:22:11] <javabot> debian-san, http://eugeneciurana.com/musings/JavaInAction.html -- check this out.[09:22:41] *** rangerkevy has left ##java[09:23:04] <pr3d4t0r> debian-san: Regardless, assembling those attributes in alphabetical order shan't have any influence on how they're converted to Java objects by Axis, or to C# objects by .Net, or whatever.[09:23:16] *** djib has quit IRC[09:25:24] <debian-san> pr3d4t0r, Thanks for the info.[09:26:13] *** Lamex has joined ##java[09:31:33] *** leahpar_on has quit IRC[09:32:23] *** rake has quit IRC[09:35:08] *** delvinj has joined ##java[09:36:35] *** Esaj has joined ##java[09:45:56] *** orthogonal has quit IRC[09:50:15] *** teralaser has joined ##java[09:54:18] *** blastnost has quit IRC[10:04:24] *** vinse has left ##java[10:04:39] *** doc|work has joined ##java[10:04:45] *** Dewi has joined ##java[10:05:35] <Dewi> how do I tell which implementation of the java API I have installed? (fedora core 3)[10:05:49] <Honk^away> java -version[10:06:04] <Dewi> isn't that just the JVM?[10:06:24] <Honk^away> is there a difference? :P[10:06:33] <Dewi> with every non-sun implementation, yes[10:06:49] <pr3d4t0r> Dewi: What are you running?[10:06:59] <Dewi> on both these fedora core 3 machines, javac is from IBM[10:07:05] <Dewi> and java is gij[10:07:13] <Dewi> but I don't know what API (or "classpath") is on here[10:07:16] <pr3d4t0r> Dewi: Sun certified Java systems come hand-in-hand with the libraries, etc. at the same release level.[10:07:27] <Dewi> this isn't sun stuff[10:07:28] <StarScream> morn[10:07:35] <Honk^away> ibm's versioning is the same as suns, isnt it?[10:07:40] <Dewi> I don't think any linux ships with sun stuff by default[10:07:53] <pr3d4t0r> Dewi: Er... trash that GIJ stuff. Use either IBM's or Sun's.[10:08:00] <Dewi> yes.[10:08:04] <Dewi> I may well do that[10:08:11] <Dewi> but I need to be able to see what API it's using[10:08:12] <pr3d4t0r> Dewi: When you do, don't install from RPMs.[10:08:19] <Dewi> pr3d4t0r: why not?[10:08:42] <pr3d4t0r> Dewi: Because RPMs are screwy. Download the .bin file from Sun instead, chmod it to +x, then install that.[10:08:43] <Dewi> you want me to use the instructions and .bin file from sun? is that what you mean?[10:08:49] <pr3d4t0r> Dewi: Yes.[10:08:52] <pr3d4t0r> Dewi: Less pain.[10:08:59] <Dewi> except they are for "redhat"[10:09:02] <Dewi> I'm running fedora[10:09:02] <pr3d4t0r> Dewi: There are some queer RPM dependencies in the other one.[10:09:06] <Dewi> at home I run debian[10:09:07] <pr3d4t0r> Dewi: It doesn't matter.[10:09:24] <pr3d4t0r> Dewi: It'll work on Linux systems of reasonably recent ilk.[10:09:33] <Honk^away> gentoo's java-install stuff is pretty nice :)[10:09:33] <Dewi> so I usually do convert the sun download into a package for my system[10:09:36] <pr3d4t0r> Dewi: I just installed one on Mandrake.[10:09:41] <Dewi> also you kind of need to do that to satisfy dependancies[10:09:42] <pr3d4t0r> Dewi: Whatever works.[10:09:50] <Dewi> otherwise no package requring java will install, generally[10:09:51] *** d0gf has quit IRC[10:09:58] <pr3d4t0r> Dewi: That's the point; the .bin file works fine without mucking with RPM dependencies.[10:10:23] <Honk^away> pr3d4t0r: you may need java as dependency for other packages :)[10:10:32] <Honk^away> (rpm sucks nevertheless)[10:10:35] <pr3d4t0r> Dewi: Easiest install of them all. 1. run .bin file; 2. create symbolic links to the Java tools from /usr/local/bin or wherever; 3. ???; 4. profit![10:10:35] <Dewi> so how then do you install a java program shiipped as an RPM?[10:10:55] <pr3d4t0r> Honk^away: If you don't install Java from RPMs, there is no dependencies. Easy.[10:10:59] <Dewi> it'll go "you don't have java installed". that's my main concern[10:11:01] <pr3d4t0r> Dewi: I don't.[10:11:16] <pr3d4t0r> Dewi: I go find the same program as a .tar.gz or disk image or whatever and install that instead.[10:11:17] <Honk^away> pr3d4t0r: yeah, there's nothing to satisfy other dependencies either[10:11:27] <Honk^away> pr3d4t0r: that's a pretty bad approach[10:11:28] * Clackwell checks the air for linux newbies[10:11:33] <Clackwell> hallo everyone[10:11:34] <pr3d4t0r> Honk^away: No, it's not.[10:11:39] <Honk^away> rpm sucks, but its still better than using no package manager at all[10:11:40] <Honk^away> it is[10:11:43] <Clackwell> hey pred[10:11:45] <Dewi> for example I run azureus from a package, if I didn't package my java VM it would refuse to install[10:11:46] <pr3d4t0r> Honk^away: No, it's not.[10:11:49] <Honk^away> it is :)[10:12:08] <pr3d4t0r> Honk^away: No, it's not. I never had any Java software failed that was installed like that.[10:12:12] <Honk^away> Dewi: if you wanna do it right, get apt ;)[10:12:15] <Dewi> and sun doesn't distribute a package for a Free linux anyway[10:12:21] <Dewi> Honk^away: damn straight[10:12:26] <Honk^away> pr3d4t0r: so what?[10:12:28] <pr3d4t0r> Honk^away: And I have some pretty major Java stuff running on my Linux boxes.[10:12:29] <Clackwell> free linux?[10:12:36] <Honk^away> you had to download and install every single java program yourself[10:12:40] <Honk^away> including all dependencies[10:12:41] <Dewi> Clackwell: they do redhat only[10:12:47] <Honk^away> i just do emerge someprogram and it's there[10:12:48] <Dewi> Clackwell: don't they?[10:12:48] * Clackwell checks the air for linux newbies and linux zealots and free software delusionals[10:12:50] *** lms has quit IRC[10:12:51] <Honk^away> (after some waiting that is *g*)[10:12:54] * pr3d4t0r sighs[10:12:58] <pr3d4t0r> Honk^away: Whatever.[10:13:03] * pr3d4t0r goes to sleep.[10:13:04] <Clackwell> it smells in here today.[10:13:08] <Honk^away> pr3d4t0r: right, this is not the place to discuss it :)[10:13:11] <Clackwell> bye pred[10:13:27] <pr3d4t0r> Clackwell: If people want to make their life more complicated, more power to them. They must be billing their clients by the hour.[10:13:31] <pr3d4t0r> Clackwell: :*[10:13:36] <pr3d4t0r> . z Z z .[10:13:38] <Clackwell> pr3d4t0r: <nod>[10:13:47] *** tempest1 has quit IRC[10:13:53] <Clackwell> more money for people who go about it more pragmatically.[10:13:58] <Dewi> ...[10:14:02] <pr3d4t0r> Clackwell: Indeed.[10:14:09] <Honk^away> pr3d4t0r: you make your life more complicated ;)[10:14:11] <Dewi> my original pragmatic question was how to identify which API "java" will use[10:14:18] <Dewi> like is there some config file it checks[10:14:20] <Dewi> or some dir it looks in[10:14:26] <Honk^away> Dewi: java -version[10:14:29] <Clackwell> what does "which api java will use" mean?[10:14:30] <Dewi> or some environment variable I'm not currently aware of[10:14:33] <Honk^away> if it's a proper jvm[10:14:35] <pr3d4t0r> Honk^away: Let's put our success rate and pay cheques on the table and see who's getting more stuff done in less time, shall we?[10:14:42] <Dewi> the JVM is not the API[10:14:58] * pr3d4t0r is being a dick because he's tired.[10:15:00] <cybereal> Dewi: the standard library is linked to the java spec version that the jvm supports[10:15:03] <pr3d4t0r> /kick pr3d4t0r[10:15:05] <pr3d4t0r> Good night.[10:15:14] <Dewi> cybereal: I don't have the standard JVM. I keep saying that.[10:15:19] <Honk^away> Dewi: is there any jvm, that uses several java apis at once?[10:15:20] * Clackwell senses linux modularization desperation, "everything's a module, the jvm, the api, everything!"[10:15:25] <Honk^away> i dont think so[10:15:28] <Dewi> how can I remove something to replace it with sun's one, as you recommend, if I have no way of looking up what I currently have installed?[10:15:33] <Dewi> I don't even know its name to remove it![10:15:43] <Honk^away> Dewi: ibms jvm has proper versioning too[10:15:48] <Honk^away> same with blackdown[10:15:49] <Dewi> well this is gnu's[10:15:50] <Clackwell> Dewi: just have the sun "java" and "javac" executables first in your path.[10:15:52] <Dewi> at the moment[10:15:55] <Honk^away> Dewi: screw that[10:16:01] <Honk^away> it sucks[10:16:02] <Honk^away> bad :P[10:16:06] <Clackwell> while at it, consider an OS which you don't have to make guesses around when using.[10:16:25] <Dewi> Clackwell: what the fuck OS is that?![10:16:34] <cybereal> Dewi: gnu's jvm classpath is worthless, it's not even up to 1.1 spec[10:16:35] <Clackwell> starting several new things at once is a bit confusing, might make it more comlpicated than necessary.[10:16:44] <Dewi> the only OS one doesn't have to guess about is an OS whose source you've read start to finish :P[10:17:00] <Honk^away> and there's some stuff from higher java apis too[10:17:08] <Honk^away> so you cant tell, no matter how hard you try :P[10:17:09] <Clackwell> Dewi: windows for example. or any linux distro that doesn't install some fake "java" (like gcj, kaffe, etc.)[10:17:25] <Dewi> I'm developing in windows, but I'm planning to serve JSP pages from linux[10:17:37] <Clackwell> Dewi: i see[10:17:47] <Dewi> so the windows situation where my IDE lives is, as you say, nice and simple[10:17:53] <Honk^away> just dont use gcj ;)[10:18:13] <Dewi> unfortunately I have inherited this server[10:18:19] <Dewi> from an idiot[10:18:23] <cybereal> install a real jre[10:18:36] <Clackwell> Dewi: just have the sun "java" and "javac" executables first in your path. the respective jvm will automatically do the rest, use its own resources, api implementation, etc. (in case of sun java, anyway).[10:18:45] <Honk^away> Dewi: even if you didnt have root, you could still set up suns java without problems[10:18:56] <Dewi> Clackwell: I don't think that'll work unless the API implementation is in the location it expects[10:19:07] <Dewi> like how does it locate it?[10:19:33] <Clackwell> Dewi: you are wrong. it does work. i have used it many times. how does it locate where it itself is residing? ask sun that.[10:19:58] <Clackwell> there is some path traversing trickery, if i recall correctly, on linux.[10:20:04] <Honk^away> btw, Dewi: http://gcc.gnu.org/java/faq.html#2_1[10:20:05] <Honk^away> =)[10:20:19] <Clackwell> PATH traversing, rather.[10:20:32] <Dewi> so what you're saying is that if I install java on a network drive on the moon, as long as "java" and "javac" are in my path, it'll fly to the moon automatically or establish whatever link it needs to to find the API jar?[10:20:36] <Honk^away> Dewi: java can be installed wherever you want[10:20:36] <Dewi> (s)[10:20:45] <Honk^away> Dewi: yes[10:20:49] <Honk^away> absolutely right[10:20:55] <Clackwell> Dewi: as long as the moon is mapped into the filesystem, yes.[10:21:04] <Dewi> sounds like my hope of uninstalling GNU classpath is hopeless then[10:21:10] <Dewi> since it will seek it out across all time and space[10:21:16] <Dewi> what hope do I have of removing it?[10:21:22] <Clackwell> "oh, i got started. let me check the path to find my location in the filesystem. all my other files must be there, too."[10:21:30] <Honk^away> Dewi: suns jvm wont meddle with the gnu stuff at all[10:21:49] <Clackwell> Dewi: no need to uninstall GNU classpath.[10:21:56] <Dewi> software tends to get confused if more than one thing called "java" is in the path, in my limited experience[10:22:15] <cybereal> Dewi: first on on the path is used[10:22:19] <Honk^away> Dewi: that's not true[10:22:22] <Clackwell> Dewi: that may be true for fucked up java variants. sun's isn't fucked up.[10:22:30] <Honk^away> ibms isnt either[10:22:39] <Honk^away> gcc definitely is[10:22:45] <Dewi> I've had things pop up and ask me which implementation to use[10:23:01] <Clackwell> Dewi: that's due to your moronic linux distro probably.[10:23:01] <Dewi> so anyway, it's some relative path thing[10:23:07] <Dewi> Clackwell: nah this was in windows[10:23:16] <Dewi> didn't have any linux at that job[10:23:18] <cybereal> that's normal, if the applicatino supports checking for such things[10:23:24] <cybereal> jre[10:23:29] <Clackwell> Dewi: then it is PEBKAC or not plain java applications.[10:23:30] <cybereal> registers themselves in windoes registry[10:23:38] *** Down` has joined ##java[10:23:42] <cybereal> it's usually an installer[10:23:48] <cybereal> like tomcat installer or something[10:23:53] <Clackwell> cybereal: yeah[10:24:00] <Honk^away> that wont "fuck up" anything though[10:24:06] <Clackwell> not the "java" command bringing up any popups.[10:24:06] <Honk^away> it's actually pretty convenient[10:24:12] <Clackwell> it is useful to keep such things apart.[10:24:15] <cybereal> but it is irrelevant when java <args> is how you started your app[10:24:19] <Clackwell> so you can put blame more accurately.[10:24:39] <Honk^away> and dont mix linux with windows :P[10:24:59] <Dewi> Honk^away: I'm the worst kind of offender there[10:25:12] <Dewi> mmm batch scripts with perl one-liners[10:25:17] <Clackwell> Honk^away: mix, mix up or confuse with?[10:25:36] <Dewi> ... piped to unix textutils[10:25:52] <Dewi> anyway. I think I will uninstall all this non-sun java stuff[10:25:54] <cybereal> I hate batch files![10:26:08] <Down`> hello! How can i change pictures on page without reload?[10:26:33] <Dewi> should I, the newb JSP developer trying to escape the horrors of PHP, run tomcat or GPL resin?[10:26:33] <Clackwell> cybereal: me too, be it cmd.exe, command.com, bash, or any other shell, their script languages make me sick and puke.[10:26:54] <Clackwell> Down`: consider channels concerning themselves with web stuff.[10:26:56] <Dewi> Down`: read about javascript[10:27:01] <cybereal> bash is close to acceptable but, if ... fi? heheh[10:27:04] <Honk^away> Clackwell: any of 'em will do ;)[10:27:24] <Clackwell> Dewi: if you consider php horror, then yes, no need to torture yourself, unless you enjoy it.[10:27:46] *** grifis has joined ##java[10:27:46] <Dewi> Clackwell: so tomcat or resin? :P[10:28:01] <Clackwell> Dewi: don't expect the java web world to be any easier though. rather the opposite.[10:28:04] <Down`> Dewi thx ;> but I can't find a fine tutorial.[10:28:17] <Clackwell> Dewi: doesn't matter. tomcat is the typical choice by most people, as far as i know.[10:28:18] <grifis> how can i receive with in.read() only one request?[10:28:25] <Clackwell> "it is the standard, right?"[10:28:34] <Dewi> Clackwell: I don't expect easier, I expect tools that allow me to write good solutions instead of forcing me to write shite[10:28:35] <Clackwell> grifis: you do not receive requests.[10:29:02] <Dewi> Clackwell: I'm actually a .NET developer accustomed to using many tools ported from java, but I know little about actual java[10:29:07] <cybereal> Dewi: do your homework and you'll find those tools[10:29:31] <Clackwell> Dewi: developers sometimes have a disturbed sense of good and bad. assuming you are not one of them, sure, give the java web world a try. be prepared for having to wade through 1001 choices for every little piece you need.[10:29:48] <Dewi> I wrote web apps in a cocoon clone for 9 months, so now I want to try the real cocoon[10:29:58] <Clackwell> Dewi: any decent java/.net developer should cope well with .net/java in my opinion.[10:30:01] *** roots- has joined ##java[10:30:07] <Clackwell> if he doesn't, he sucks and should probably stick to what he knows already.[10:30:12] <Dewi> (becuase the aforementioned clone is closed source and unavailable anymore)[10:30:46] <roots-> Clackwell old house[10:31:03] <Clackwell> Dewi: you may not find many cocoon users here, not often asked for. might ahve to use their mailing list to get in touch with people using it, efficiently.[10:31:08] <Clackwell> hi roots-doods :)[10:31:23] <Clackwell> ah, just recalled, it's monday, right? :)[10:31:32] <roots-> the day i dont like[10:31:39] * Clackwell enjoys his first proper vacation since 1+ years[10:31:42] <grifis> Clackwell: i need to receive a variable number of bytes two times with in.read()... The first time i receive also a lot of bytes from the second's send[10:31:49] <roots-> Clackwell: i had 1 week in the summer[10:32:01] <roots-> still have 5 weeks plus 4 days left for this year to take[10:32:28] <roots-> Clackwell: but you work parttime right ?[10:32:31] <Clackwell> grifis: the bytes that you send are received as a stream, always. it is up to your code to keep them apart. nothing on the sending site will automatically do that for you.[10:32:40] <KingNato> Concurrency gives me headaches[10:32:54] <roots-> KingNato: stick to patterns that work[10:33:10] <Dewi> hmmm[10:33:15] <Dewi> looks like a storm is about to hit[10:33:15] <Clackwell> roots-: officially did, practically didn't for +1 years. now we switched the contract over to full time. so better pay for about the work on the bottom line.[10:33:18] <roots-> eg almost all of concurrent/multithreaded apps work based on an eventqueue with consumer/producer threads[10:33:21] <Dewi> I'm going idle to drive to another geographic location[10:33:23] <Dewi> thanks for the advice ghuys[10:33:26] <Dewi> much appreciated[10:33:39] <Clackwell> Dewi: good luck with tomcat and the java web world[10:33:52] <Dewi> thanks[10:34:00] <Clackwell> may the java gods not frustrate you too much with their usual wanking :)[10:34:01] <Dewi> bbl[10:34:06] <Dewi> hehe[10:34:10] *** chippy has joined ##java[10:35:10] <KingNato> roots-: Easier said than done when dealing with an existing codebase of several hundred thousand lines of code :([10:35:23] <roots-> indeed[10:36:42] <roots-> but its not that hard to get into other people's code as it seems when you first see it[10:36:48] * KingNato would like to try writing something major in Erlang at some point, to see how much it helps with cuncurrency[10:36:57] *** chippy has quit IRC[10:36:58] <roots-> take a while to get familiar with a program and some programs are so chaotic[10:37:27] <cybereal> KingNato: erlang's threads are not able to run in seperate processors are they?[10:37:56] <KingNato> cybereal: They aren't threads, but you can have processes on different CPUs or even machines[10:38:04] <Clackwell> roots-: however there will often be that sick feeling that the authors of the code did their best to favor indirect, obscure, complicated choices and design decision rather than the straightforward ones.[10:38:43] <roots-> Clackwell: hardly ever[10:38:53] <roots-> if you did that and have any decent skills it would indeed become impossible[10:39:08] * KingNato points everyone who doesn't know it already to http://thedailywtf.com/[10:39:11] <roots-> code looks like its been intentionally scrambled soon enough[10:39:14] <KingNato> It cheers me up immensely :)[10:39:30] <roots-> just by adding a few special cases and a few strange lines[10:39:41] <Clackwell> roots-: taking the most obvious turns requires yearas of training and a lot of feedback with other developers about great amounts of your code.[10:39:47] *** chippy has joined ##java[10:39:50] <roots-> if you really designed for no-maintenance it really becomes like thta too[10:40:05] <Clackwell> i doubt many people have that ability. so i expect every code to be fucked up.[10:40:07] <roots-> Clackwell: not true, just read "code complete"[10:40:37] <roots-> 2nd edition, its full of down-to-earth advises on how to make code readable[10:40:46] <Clackwell> roots-: yes, the problem is that the author hasn't read it...[10:40:47] <roots-> could even be extracted to a 3 page documented[10:41:02] *** dibblego has joined ##java[10:41:07] <Clackwell> so he will apply different thinking than you will (he will anyway, at least slightly).[10:41:32] <roots-> eg. favor the nominal case in conditionals, favor positive cases, avoid deep nesting, use standard naming, use standard idioms[10:41:50] <roots-> Clackwell: nope, i agree 100% with all that is written in code complete[10:41:55] <Clackwell> if you "normalize" every developer to sanity and proper design choices by reading a book, that would be great of course. but it sounds delusional.[10:42:03] <Clackwell> +can[10:42:22] <Clackwell> it defies human nature, doesn't take ego, playfulness, etc. pp. into account.[10:42:28] <roots-> it isn't, its just people don't realize the book exists and some thing the advice is trivial[10:42:34] <roots-> be that as it may, it is still correct[10:42:36] *** pulaski has quit IRC[10:42:49] <roots-> Clackwell: code complete touches these subjects as well[10:43:02] <roots-> psychocological soft factors[10:43:25] <Clackwell> i still doubt that by simply reading about things people will realize what the proper choices are.[10:43:43] *** christo has joined ##java[10:43:51] <roots-> not in every single aspect[10:43:56] <roots-> but overall ... yes[10:44:57] <Clackwell> everyone has read about speeding leading to accidents and deadly injuries, right? everyone knows that getting as close as a few meters behind another car on the autobahn at speed 160+ km/h is very dangerous, right?[10:45:07] <dibblego> no, this is false[10:45:18] <dibblego> reality is counter-intuitive[10:45:19] <Clackwell> i believe that it is human nature to make the wrong choices despite better knowing.[10:45:21] <Clackwell> hi dibble.[10:45:30] <dibblego> http://www.roadsense.com.au/ join the fight against the nonsense[10:45:32] <dibblego> hey mate[10:45:43] <roots-> Clackwell: yes, but that depends on nationality[10:45:51] <roots-> eg. dutch people can't drive :>[10:45:51] <Clackwell> roots-: oh? ;)[10:45:55] <Clackwell> haha :)[10:46:09] <roots-> portugese are the best driver by natural selection[10:46:21] <roots-> the not so good ones die :) (ever drove in portugal ?)[10:47:02] <roots-> i guess outside of europe like some dirt roads in nigeria or so have the real drivers[10:47:08] <roots-> on them[10:47:38] <Clackwell> bbl[10:49:29] <roots-> i want a cisco ip phone[10:49:33] *** Down` has left ##java[10:49:35] <roots-> or any kind of phone[10:49:36] <dibblego> I use one at work[10:49:37] *** debian-san has quit IRC[10:49:39] <roots-> not this agfeo piece of crap[10:50:13] <roots-> dibblego: they are decent imho[10:50:34] <dibblego> I don't know really; a phone is a phone afaic[10:50:41] <dibblego> some people care, but I don't[10:50:49] <roots-> this agfeo one is annoying with the basic stuff even[10:51:29] <roots-> programming the answering machine is above my head[10:51:39] <roots-> well i figured it out but it took many hours[10:52:01] <roots-> getting the call forwarding to work with exception-rules didnt work out though[10:52:31] <roots-> i was an A-Student in CS btw[10:52:42] <roots-> for this you have to be don knuth or guy stelle[10:52:45] <roots-> steele[10:54:48] *** sinister_ has joined ##java[10:55:07] <sinister_> Is there a base64Encoder class in java ?[10:55:15] <dibblego> no[10:55:24] <dibblego> there are third parties though[10:55:34] <dibblego> or you could spend 30 seconds writing it yourself :)[10:55:45] <roots-> it takes 5 minutes[10:55:47] <dibblego> I did, but it's proprietrary, sorry[10:55:55] <sinister_> :([10:55:58] <sinister_> thanks anyway[10:56:00] <roots-> i wrote it about 10 times[10:57:04] <dibblego> you were bored the other 9?[10:57:59] <dibblego> the anaesthetic is wearing off on my toe[10:58:09] <roots-> c and c++ and over and over again[10:58:31] <roots-> anyhow for java you can find non accessible impl. in the core lib[10:58:45] <roots-> sinister_: do you use eclipse ?[10:58:57] <sinister_> No[10:58:57] <dibblego> yes, you usually can for the Sun and IBM implementations[10:59:00] <sinister_> I use pico[10:59:17] <roots-> bleeding edge[10:59:23] <dibblego> better to use a third party than to tie to an implementation though[10:59:35] <roots-> just saying for "inspiration"[10:59:38] <dibblego> must go deal with pain, later[10:59:41] *** dibblego has quit IRC[11:00:02] *** zz_ has joined ##java[11:00:28] <zz_> can i use ANT to change all my files from character encoding latin2 to utf-8?[11:00:34] *** Cutt has joined ##java[11:00:38] <Cutt> hi to all[11:01:01] <zz_> i have about a thousand files in my project and i need to change encodings in the quickest way possible[11:01:06] <BULLE> zz_: why do you want to use ANT to do it ?[11:01:20] <Honk^away> zz_: use iconv or whatever tool there is for your system[11:01:25] <zz_> BULLE: well, that just popped into my mind. is there another way to do it?[11:01:26] <BULLE> Honk^away: indeed[11:01:41] <BULLE> zz_: Honk^away speaks with a tounge of truth[11:01:43] <zz_> BULLE: im on a windows box[11:01:47] <BULLE> oh[11:01:48] <roots-> so what ?[11:01:49] <Cutt> I'm looking for someone that had experience with jspWiki (exchanging infos)[11:01:52] <roots-> i am on a windows box too[11:01:56] <BULLE> i bet there is something similar for windows[11:01:57] <roots-> i have iconv, recode[11:02:05] <BULLE> roots-: but you are leet =)[11:02:13] <BULLE> roots-: i bet you are using cygwin or similar ?[11:02:24] <roots-> BULLE: cygwin yes[11:02:33] <Honk^away> zz_: that's what the "or whatever tool there is for your system" was talking about[11:02:35] <roots-> but everyone uses it[11:02:38] <Honk^away> just search some tool that does it for ya[11:02:43] <Honk^away> or install one :)[11:02:56] <zz_> iconv in cygwin will work u think?[11:03:02] <Honk^away> sure[11:03:03] <roots-> zz_: yes it will[11:03:13] <zz_> sweet[11:03:25] <roots-> its a frontend for libc's iconv function[11:03:47] <roots-> glibc[11:04:11] <Honk^away> iconv sucks though :P[11:04:28] <zz_> as long as my project won't be stuffed up... else my neck's on the chopping block[11:05:11] *** Aquila_Deus has quit IRC[11:05:17] <Honk^away> use cp?[11:05:20] <roots-> well you want to make a backup first[11:05:23] <roots-> so much is for certain[11:06:01] <Honk^away> iconv needs a switch to replace the original file :p[11:06:13] <roots-> is that good or bad ?[11:06:14] *** pavlicek has quit IRC[11:06:20] <roots-> in zz_'s case it might be good[11:06:31] <Honk^away> iconv needs a switch to write to some file at least[11:06:44] <Honk^away> or to write a copy to some directory you specify[11:06:58] <Honk^away> stdout always requires some extra work from the user :p[11:07:50] <zz_> Honk^away: what do u mean by switch?[11:07:56] <Honk^away> commandline switch[11:08:16] <zz_> what's that>/[11:08:17] <zz_> ?[11:08:31] <Honk^away> foo -bar[11:09:26] <Honk^away> to make iconv write to files, one always has to pull tricks like using find+a 1 line shell script ;)[11:09:46] <Honk^away> having some cmdline switch would be more convenient[11:09:50] <zz_> i'm completely confused[11:10:19] <Honk^away> then just ignore me ;)[11:10:23] *** fergie has joined ##java[11:10:34] <Honk^away> although you'll have no fun with iconv as typical windows user :)[11:10:43] <zz_> :/[11:10:49] *** Vspirit has joined ##java[11:12:17] <roots-> find . -type f -name "*.java" | while read a; do mv "$a" "$a.bak"; iconv -fISO8859-1 -tUTF-8 "$a.bak" "$a"; done[11:12:21] <Vspirit> hey, now jdk15 is running fine on 6.0RC1 here so far, but when installing exlipse it depends on older jdk, any chance to get around this?[11:12:22] <roots-> something like that will do[11:12:35] <roots-> well not quite[11:12:40] <roots-> find . -type f -name "*.java" | while read a; do mv "$a" "$a.bak"; iconv -fISO8859-1 -tUTF-8 "$a.bak" > "$a"; done[11:13:35] <Honk^away> roots-: yeah, like that :9[11:13:54] <Honk^away> i'd write to some subfolder though..[11:13:58] <Honk^away> and prolly use finds -exec[11:14:14] <Honk^away> who cares :)[11:14:14] <roots-> rename 1000 files, launch 1000 shells ?[11:14:24] <Honk^away> a shell doesnt exactly take long to start[11:14:27] <roots-> ok on linux, big no on slowaris[11:15:13] <roots-> dunno on windows, i never use -exec[11:15:24] <roots-> infact i advocate against it since many years :)[11:15:36] <Honk^away> 4 seconds for 3k shells :)[11:15:41] <Honk^away> that's pretty oko ;)[11:15:44] <roots-> on windows ?[11:15:49] <Honk^away> linux[11:16:04] <Honk^away> urrh[11:16:28] <Honk^away> nah wait, if -exec launches a shell, -exec sh -c "" launches 2[11:16:42] <roots-> how did you test time for i in `seq 1 3000`; do sh -c "true"; done[11:16:44] <roots-> hah[11:16:45] *** tiglionabbit has quit IRC[11:16:55] <roots-> i was just gonna say that forks 2 times[11:17:01] <roots-> i shell, one fork for the true[11:17:39] <roots-> s/^i/1/[11:17:49] <roots-> anyhow i dont run linux anymore on my desktops since quite a few years[11:18:00] *** gilead has joined ##java[11:18:16] <roots-> win xp is pretty nice, nicer than any linux based desktop[11:18:27] <roots-> and with cygwin why run linux , linux is a monolithic kernel anyhow[11:18:35] <Honk^away> honk@honk ~ $ time for i in `seq 1 3000`; do sh -c "true"; done[11:18:35] <Honk^away> real 0m5.589s[11:18:37] <roots-> only thing i miss is fvwm2[11:18:50] <roots-> cheap indeed[11:19:41] <Honk^away> roots-: well.. linux is pretty ok on desktops nowadays[11:19:59] <Honk^away> but there's nothing wrong with using windows either =)[11:20:02] <Honk^away> i just dont like it..[11:20:07] <Clackwell> ~ridicule Honk^away[11:20:07] * javabot points at Honk^away and laughs.[11:20:09] <zz_> bah, i just installed cygwin but i can't see my win folders in it...[11:20:09] <roots-> cygwin is ok these days[11:20:23] <roots-> zz_: cd /cygdrive/c/[11:20:32] <Honk^away> cygwin is odd ;)[11:20:35] <cybereal> stupid invisible /cygdrive but find finds it[11:20:42] <Honk^away> mkdir /cygdrive[11:20:46] <Honk^away> that'll help .p[11:20:47] <zz_> lol[11:20:54] <roots-> its hacked into open(2)[11:21:10] <Honk^away> yeah, but making the dir enables you to see it ;)[11:21:15] <zz_> why can;t i c the cygwin file? lol[11:21:20] <Honk^away> you can still cd into /cygdrive/c :p[11:21:25] <zz_> i mean cygdrive[11:21:30] <zz_> yea, im in[11:21:32] <Honk^away> zz_: cuz it's not there[11:21:41] <zz_> as if that doens't confuse every first time user[11:21:51] <Honk^away> well, i got past it too[11:21:56] <Honk^away> last time i used cygwin :)[11:24:30] <zz_> bah, u can't even copy and paste into cygwin[11:24:49] *** Stork has joined ##java[11:24:49] <roots-> sure you can[11:25:02] <roots-> you wanna use rxvt though instead of the damn win console[11:25:23] <cybereal> rxvt = awesome, happy they added that. it makes cygwin barely usable[11:25:33] <cybereal> but damnit, the stupid terminal locks up when ocaml exits... so annoying[11:28:19] *** gilead has quit IRC[11:29:25] *** christo has left ##java[11:41:06] <roots-> tried Ctrl + q, ctrl + shift + q ?[11:41:07] *** eythian has joined ##java[11:42:13] <cybereal> yes I've tried all the tricks[11:42:19] <cybereal> it's simply a hard lock, have to terminate it[11:42:36] *** Kallistor has joined ##java[11:45:17] <eythian> Anyone know a good way of detecting if another copy of a program is running, and pass data to it? Like Azureus does if you give it command line args when there is already a copy running.[11:45:46] *** sinister_ has left ##java[11:46:01] <roots-> eythian: server socket[11:46:21] <roots-> eythian: first instance opens it, second one just passes in the args[] and the first one reacts[11:46:29] <eythian> roots-: yeah. thought of that. But it doesn't seem nice for some reason.[11:47:02] <roots-> "some reason"[11:47:04] <eythian> But you're the second person to recommend it, so maybe I'll just go with it :)[11:47:08] <roots-> is that a valid point ?[11:47:31] <eythian> roots-: I think it should be a valid point :) The same reason some code can just 'look wrong'[11:48:18] <eythian> roots-: besides, it would get confusing if two people ran the same program on the one computer.[11:48:26] <eythian> maybe that was why I didn't like it.[11:50:57] *** manulite has joined ##java[11:51:59] <roots-> indeed[11:52:07] <roots-> that is a valid point :)[11:53:20] *** omry has joined ##java[11:54:38] *** The_Vulture has joined ##java[11:55:12] <eythian> If I can get my head around FileLock and FileChannel, I could create a .lock in the apps settings dir, and check: if a program is holding a lock on that file then put data into a drop directory that is monitored by the main process. Hopefully that'll work.[11:55:40] <roots-> that sucks more[11:55:47] <roots-> trust me, file locking on shared drives etc is trouble[11:55:50] <roots-> at least with NFS[11:56:16] <eythian> hmm[11:56:33] <eythian> harder and harder.[11:57:02] <eythian> I suppose I could just give in and read the Azureus source.[11:57:05] <eythian> see how they do it[11:57:18] <roots-> most apps use sockets[11:57:21] <roots-> eg emacs[11:58:27] <eythian> hmm. I suppose it could drop a file containing the port number once it finds a valid one.[11:59:31] *** Vspirit has quit IRC[12:02:27] *** cybereal has quit IRC[12:03:49] *** NOthsouth has quit IRC[12:08:05] <zz_> Honk^away: it works but because i use international symbols in my files, i can't open them anymore in my IDE. why might that be so? They're all in utf-8 format now...[12:11:05] <roots-> zz: what is your ide ?[12:11:10] <zz_> jedit[12:11:12] <roots-> ed ? emacs ? eclipse ?[12:13:16] *** skeffen has joined ##java[12:13:18] <zz_> only the files that have international symbols cannot be opened. all the others open fine in utf-8 format[12:14:18] <horros> sounds to me that they aren't in utf-8 format, but you just try to open them in utf-8. alternatively, you're using a non-utf-8 font.[12:17:28] *** fergie has quit IRC[12:17:47] <zz_> horros: i am pening them up in utf format. i can't see how i can be using a non utf8 font?[12:17:49] <zz_> *opening[12:18:38] <horros> are you sure that the files you're trying to open are in utf-8 format? they might very well be saved as ISO-8859-1(5) or something similar too.[12:18:51] <horros> and of course you can be using a non-utf8 font.[12:19:10] <zz_> how can i check if im not using utf8 font?[12:19:33] <zz_> and yes, the files are in utf8 format. i manually change the format via my ide and i get the same error messages[12:20:39] <zz_> this prolly has nothing to do with it, but i can open the files up in notepad and eveyrthing looks fine...[12:23:45] <zz_> how can i check if im not using utf8 font?[12:27:41] *** Ulgar has joined ##java[12:38:04] *** doc|work has quit IRC[12:38:57] *** Bevin has quit IRC[12:39:17] *** Bevin has joined ##java[12:42:15] *** skeffen has quit IRC[12:42:48] *** AlphaOmega has quit IRC[12:45:06] *** doc|work has joined ##java[12:46:06] <zz_> this is driving me insane. why doesn't it want to work?[12:49:11] <Epesh> morning[12:56:43] *** vezzoni has joined ##java[12:59:55] *** ulver has joined ##java[13:01:31] *** jake has joined ##java[13:11:41] *** Wufei|sleep is now known as Wufei|school[13:16:50] *** paulweb515 has joined ##java[13:18:00] *** Scorpmoon has joined ##java[13:18:12] *** terence_ has joined ##java[13:18:14] <Scorpmoon> how do I make sure jakarta produces a new .war once i request an altered file?[13:18:32] <terence_> hi[13:19:04] <paulweb515> terence_: hi[13:19:09] <terence_> howto get the index of an position an iter points at the moment?[13:22:33] *** ulver is now known as ulver|afk[13:22:36] *** ulver|afk is now known as ulver[13:23:23] <paulweb515> I don't think you can ... unless you have an iterator to a List[13:23:24] <terence_> how to build an own comperator at sortedset?[13:23:51] <terence_> how shall i do that at a list?[13:25:19] <terence_> paulweb515: how?[13:25:33] <paulweb515> Implement Comparator#compare(Object o1, Object o2) ...[13:26:42] <paulweb515> A set is not a list[13:27:31] <paulweb515> You can sort an array (like String[]) using java.util.Arrays ... check it out[13:28:21] <terence_> more easy paul, just for loop from 0 to site of list[13:28:27] <terence_> ^size[13:29:32] <terence_> Implement Comparator#compare(Object o1, Object o2) ...? how to set the new compertor class at set interface?[13:31:16] <terence_> ahh the items have to implement comparable..[13:33:26] <paulweb515> Not really, then you can call Arrays.sort(Object[], Comparable) ... the compare() method takes 2 objects, and has to decide which is "less"[13:36:01] *** bowyakka has joined ##java[13:38:58] <terence_> is there an overview which basic typ need how mich byte in mem ?[13:40:03] <Epesh> terence_: yes. It's called the language specification.[13:40:32] *** ijoyce has quit IRC[13:40:58] <terence_> oh man, don't give to clever answers, i mean the http for that of course[13:41:17] <terence_> can't find the information ..[13:41:22] <Epesh> ~jls[13:41:22] <javabot> Epesh, jls is The Java Language Specification: http://java.sun.com/docs/books/jls/[13:41:30] <Epesh> there, not http but a url[13:42:30] *** agnul has joined ##java[13:44:06] <Clackwell> terence_: i can write you a jvm which requires 100 mb of memory for a single int variable. so it depends on the implementation.[13:44:08] <Clackwell> hi pesh[13:45:05] <Clackwell> terence_: possibly you meant something else, in that case google for "java data types" or so[13:45:28] <terence_> yep, already found it ..[13:54:40] *** FaeLLe has quit IRC[13:59:14] *** zz_ has quit IRC[13:59:16] *** snodnipper has joined ##java[14:03:03] *** pchapman has joined ##java[14:03:56] *** aktinos has joined ##java[14:04:53] *** AlphaOmega_wrk has quit IRC[14:11:55] *** zz_ has joined ##java[14:13:19] *** Kal-L has quit IRC[14:14:06] *** deedaw has quit IRC[14:14:28] *** Aquila_Deus has joined ##java[14:15:37] *** swperman has joined ##java[14:18:09] <swperman> I am trying to parse a xml (dom) document, and i get this error: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed. Can anyone help?[14:18:22] <BULLE> swperman: your document is not well formed[14:18:33] <swperman> yes... but what does this mean ?![14:18:35] <BULLE> swperman: thats what the error tells you, so, i bet, that your document is not wellformed[14:18:46] <BULLE> swperman: that you are feeding it something that isnt proper xml[14:20:30] <Drone> View swperman's post at: http://www.eugeneciurana.com/pastebin/pastebin.php?show=8563[14:20:43] <Cutt> a dopo[14:20:52] *** Cutt has left ##java[14:21:11] <Epesh> swperman: right, not well formed[14:21:22] *** npmccallum-work has quit IRC[14:21:22] *** jor has joined ##java[14:21:29] <swperman> how come[14:21:35] <Epesh> because it's not well formed[14:21:53] <swperman> is it supposed to have a root node ?[14:21:57] <Epesh> XML documents look like this: <?xml version="1.0"?> <root></root>[14:22:03] <swperman> aaaahh[14:22:05] <Epesh> you have multiple top level nodes[14:22:09] <Epesh> i.e., invalid xml[14:22:11] * Clackwell looks around and thinks "xml by guessing"?[14:22:13] <swperman> ok[14:22:24] <swperman> thanks[14:22:48] <BULLE> swperman :http://www.stg.brown.edu/service/xmlvalid/[14:26:42] <agnul> hoi BIGLETTER :)[14:26:52] <BULLE> hoi agnul[14:27:09] <BULLE> agnul: hows life ?[14:27:17] <roots-> minix3 is out[14:27:31] <BULLE> roots-: as in the operating system minix ?[14:27:35] <roots-> yeah[14:27:51] <agnul> BULLE: everything's fine. back to writing some code instead of idling all day in irc :D[14:28:04] <BULLE> i see, sounds good[14:28:31] *** [algo] has joined ##java[14:28:34] <[algo]> How to get Exception stack in Apache XML-RPC calls ?[14:28:34] *** littlezoper has joined ##java[14:29:21] <[algo]> any XML-RPC users ?[14:30:47] *** hatOFF has joined ##java[14:30:50] <Clackwell> [algo]: what is an exception stack?[14:31:16] <Clackwell> [algo]: if in doubt, create an Exception and use it's methods, etc. pp., details at api docs[14:31:27] <[algo]> hmm how ?[14:31:32] <[algo]> I'm making XML-RPC request[14:31:36] <[algo]> from non-java server[14:31:40] <[algo]> to java-machine[14:31:45] <Clackwell> ~enter[14:31:46] <javabot> Don't press return until you've finished typing your question, it's annoying to see multiple lines for one question, and hard to follow.[14:32:24] <[algo]> I'm making XML-RPC request from non-java server to java-machine. In the case of exception, only its Message is returned, but I'd like to see the whole stack: what happened.[14:32:59] <Epesh> [algo]: the server doesn't know?[14:32:59] <Clackwell> [algo]: no clue what you mean. if in a piece of code of mine i want a stacktrace, i create an exception and use its methods to get the stack elements, etc. pp. or, in case i caught an exception, i use that instead.[14:33:36] *** heanol has quit IRC[14:34:17] <Clackwell> [algo]: you want the complete details of an exception that occurred on the server-side available on the client?[14:34:33] <Epesh> Clackwell: ... that he server doesn't expose...[14:34:58] <[algo]> Clackwell: a nicer way would be to store erroneous request/response pair at server error log[14:35:18] *** heanol has joined ##java[14:35:19] <Clackwell> [algo]: and it doesn't? why did you write it so that it doesn't log the error completely?[14:36:57] * Clackwell notes that [algo] has trouble answering all these questions[14:37:20] <[algo]> ClackWell: Does it log it somewhere ?[14:37:26] <[algo]> Clackwell: I'm using Apache XML-RPC[14:37:27] <Clackwell> [algo]: it doesn't?[14:37:32] <[algo]> Clackwell: couldn't find[14:37:51] <Clackwell> [algo]: apache xml-rpc is an xml-rpc server? i assumed it was a client lib.[14:38:07] <Clackwell> [algo]: i would use the apache xml-rpc mailing list.[14:38:18] <Epesh> Clackwell: yes, it's a server lib too[14:38:29] <Clackwell> Epesh: i see[14:38:31] <[algo]> Clackwell: it is both client and server[14:39:01] <Clackwell> [algo]: catch, log and throw on the error inside your own server code that you add to apache xml-rpc?[14:39:53] <[algo]> well, I'll dig into xml-rpc now and try to override what I need[14:40:07] <Clackwell> override?[14:40:21] <[algo]> catching occurs inside xml-rpc code[14:40:28] <[algo]> written by apache[14:40:38] <Clackwell> [algo]: why rely on that? catch in your own code[14:40:40] <[algo]> (or whomever ;) )[14:41:28] <[algo]> Clackwell: thanks, I'll look into it[14:41:33] <Clackwell> ... myXMLRPCMethodCalledByServer() { try { ... } catch (ExceptionOrWhateverElse e) { logException(e); e.printStacktrace(); throw e; } ...[14:41:34] *** wms has joined ##java[14:41:39] <Clackwell> or something to that extent.[14:41:41] *** maroffo has joined ##Java[14:42:21] *** makii has joined ##java[14:42:58] *** maroffo has quit IRC[14:44:22] <Clackwell> bbl[14:45:14] *** maroffo has joined ##Java[14:46:35] <Goc> Is it possible to get a list of all the available printers in Java?[14:46:35] <Goc> I've searched Google for it, but this question always goes unanswered in the different forums.[14:47:41] <cheeser> yes, it's possible[14:47:58] <cheeser> i don't have my source handy, atm, though.[14:53:08] *** bubblenut has joined ##java[14:54:02] <bubblenut> Is there a way I can get just the class name rather than it's fully qualified name, which is what's returned by this.getClass().getName() ?[14:54:37] *** Aquila_Deus has quit IRC[14:54:44] <Epesh> just look for the last token as separated by .[14:57:57] <bubblenut> OK, but no v quick way of doing it? It's for debugging so I'm going to be using it all over the place and I don't want to have to do it over and over[14:58:01] <bubblenut> ?[14:58:27] <Epesh> bubblenut: for debugging you actually want the FQCN[14:59:58] <Epesh> nothing quite so fun as seeing "String" and not knowing it's "com.sun.xml.something.String" instead of java.lang.String[15:00:00] *** bov has joined ##java[15:00:10] <Epesh> and that sort of thing happens a depressing amount of the time[15:01:25] *** terence_ has quit IRC[15:01:31] <bov> will DefaultCellEditor support JPasswordField?[15:04:00] *** lorentey has joined ##java[15:05:31] *** Razscout has joined ##java[15:07:46] <Razscout> can anybody here help me to get JAI to work at my computer?[15:08:31] *** Razscout has left ##java[15:08:53] *** Razscout has joined ##java[15:11:11] *** themime|sleep has quit IRC[15:11:52] <roots-> bov: yes[15:11:59] <roots-> JPasswordField is a JTextField after all[15:12:03] *** maroffo has left ##Java[15:12:08] <roots-> so according to liskhov it is supported[15:12:17] <roots-> i'd supose so too[15:12:23] * cheeser 's mouth starts watering.[15:12:26] *** ramza3 has joined ##java[15:12:30] <cheeser> oh. lishkov. not pavlov.[15:12:36] <Twiun> cheeser: someone rang your bell again?[15:12:53] <roots-> hah :)[15:12:55] *** KingB has quit IRC[15:12:55] <roots-> or liskov[15:13:02] <roots-> i can never ever remember that name[15:13:21] *** [algo] has quit IRC[15:13:24] <roots-> not that swing pays attention to liskov much at all[15:13:34] <roots-> it is liskov ...[15:15:18] <Razscout> where can I get help with JAI?[15:15:59] <roots-> #jai ?[15:16:15] <roots-> also jai may have a forum, mailing list[15:17:15] <Razscout> ok , I will check[15:17:59] <roots-> i doubt #jai exists[15:18:02] *** sfb has quit IRC[15:18:36] <Razscout> the problem is I hope/think that I have installed it correct but when I shall start uDig it sais that JAI doesn't exist[15:18:39] <Razscout> :-([15:20:12] <roots-> whatfor are you using jai ?[15:20:46] <Razscout> uDig needs it to render maps I suppose[15:22:18] *** Tartaros has quit IRC[15:23:33] *** darkersatanic has joined ##java[15:27:51] *** kanopa has joined ##java[15:28:04] *** kanopa has quit IRC[15:28:33] *** IseeIsee has joined ##java[15:28:52] <IseeIsee> is it possible to draw something on a JPanel from another object ?[15:29:05] *** delvinj has quit IRC[15:29:21] <IseeIsee> if the JPanel is passed into the other object through the object constructor, will it be possible for that object to draw on that JPanel[15:29:22] <IseeIsee> ?[15:29:47] <agnul> why not?[15:30:08] <agnul> just do a getGraphics on the passed panel and start drawing[15:30:35] <agnul> (if getGraphics returns a non null object)[15:30:59] *** djib has joined ##java[15:31:47] *** GedasRx has quit IRC[15:31:48] *** npmccallum-work has joined ##java[15:31:51] *** GedasRx has joined ##java[15:32:07] <IseeIsee> ok let me try[15:32:58] <agnul> of course as soon as the system redraws the panel your drawings will be lost :)[15:33:37] <roots-> dont use getGraphics()[15:34:08] <roots-> for many reasons, for a JPanel override paintComponent to do your drawing[15:34:11] <roots-> ~draw[15:34:12] <javabot> roots-, I have no idea what draw is.[15:34:47] <IseeIsee> ~font[15:34:48] <javabot> I guess the factoid 'fonts' might be appropriate:[15:34:50] <javabot> information on fonts in java can be found at http://java.sun.com/j2se/1.5.0/docs/guide/intl/font.html[15:36:30] *** Mell has joined ##java[15:36:39] *** IseeIsee has quit IRC[15:39:23] *** snodnipper has quit IRC[15:39:46] *** horros has quit IRC[15:40:08] *** berzerka has joined ##java[15:40:18] <berzerka> hello guys.[15:41:21] <berzerka> i have two Calendar objects with different dates. How can i compute how many days the span between them contains (including themselves)?[15:43:31] <berzerka> (end.getTimeMillis() - begin.getTimeMillis)/1000/60/60/24 ?[15:44:02] <berzerka> not a nice solution i think... is there no library function that does this job?[15:44:20] <bov> is there a way to change the DefaultCellEditor for just one cell in a JTable?[15:46:50] <roots-> bov: yes[15:47:14] <roots-> override getCellEditor(int,int)[15:47:26] <roots-> return super.getCellEditor or your own[15:47:39] <bov> roots-: great, thank you![15:48:23] <roots-> berzerka: this is how i would do it[15:49:13] <berzerka> roots-: well, then ;)[15:49:17] <berzerka> roots-: thanks.[15:51:17] <bov> roots-: how is setCellEditor() set for an individual cell?[15:53:05] *** Paks has joined ##java[15:53:18] <roots-> bov: for an individual override the method[15:54:14] <roots-> JTable t = new JTable() { public TableCellEditor getCellEditor(int row, int column) { return row==myrow && column==mycolumn ? myCellEditor : super.getCellEditor(row,column); };[15:57:44] *** Dena|Lap has joined ##java[15:58:03] <Scorpmoon> puuuhlease tell me how I tickle a war into being generated[15:58:13] <Scorpmoon> I thought a war is made aslong as you request a file that has changed?[15:59:04] *** diro has joined ##java[16:00:11] <roots-> war ? what is it good for ? absolutely nothing! (c) edwin starr[16:00:41] <Scorpmoon> m'kay..[16:00:44] <littlezoper> tickle a war into being generated>[16:02:07] <roots-> sorry that just had to come out[16:02:32] <littlezoper> roots-: i've barely managed to suppress the same urge for some time now :)[16:02:54] <Scorpmoon> ill try jar command :)[16:02:55] <littlezoper> though I would have sung it in my head with Jackie Chan's voice[16:03:09] <littlezoper> Scorpmoon: using ant? there's a war task[16:03:18] <roots-> littlezoper: hah, trrue :)[16:03:20] <Scorpmoon> nop :/[16:03:20] <roots-> littlezoper++[16:03:24] <littlezoper> :)[16:06:45] *** diro has quit IRC[16:06:55] <roots-> littlezoper++[16:06:58] <roots-> no karma for you[16:07:41] <littlezoper> use the ~ :)[16:09:21] <roots-> ~littlezoper++[16:09:22] <javabot> littlezoper has a karma level of 20, roots-[16:09:28] <roots-> oh irssi isnt showing the ~[16:10:41] <littlezoper> there we go! :P[16:11:50] *** ramza3 has quit IRC[16:12:53] *** Scorpmoon has quit IRC[16:13:24] *** IseeIsee has joined ##java[16:13:41] <IseeIsee> is it possible for a thread to know when the stop function has been called on it ?[16:14:03] <Garibaldi> the stop method should never be called on a thread[16:14:14] <BULLE> IseeIsee: stop is not something you should be calling in the first place[16:15:06] <cheeser> like the docs say.[16:15:10] <BULLE> ye[16:15:15] <BULLE> but reading javadocs is scary[16:15:18] <IseeIsee> why ?[16:15:30] <BULLE> IseeIsee: read the javadoc, it has a nice explanation on why the stop method is deprecated[16:15:40] <BULLE> javabot: tell IseeIsee about Thread[16:15:41] <javabot> IseeIsee, Thread is http://java.sun.com/tutorial/essential/threads[16:15:45] <BULLE> argh[16:15:48] <BULLE> wrong thing[16:16:03] <BULLE> IseeIsee: just read the Thread javadoc, and check the stop() method[16:18:51] *** dmlloyd|work has quit IRC[16:19:12] <IseeIsee> ok thanks[16:24:43] <roots-> as a sidenode[16:24:51] <roots-> sometimes you still call stop () : )[16:25:03] <BULLE> roots-: when ?[16:25:06] <BULLE> if you say A you have to say B[16:26:12] <roots-> try it :)[16:26:14] * Garibaldi has never had to call stop :-)[16:26:28] <roots-> BULLE: try it :)[16:26:37] <BULLE> roots-: try to call stop() ?[16:26:42] <roots-> no say "A"[16:26:46] <BULLE> ah,[16:26:47] <BULLE> A[16:26:50] <roots-> B[16:26:54] <BULLE> ARGH![16:26:54] <roots-> shoot, you are right[16:26:57] <roots-> i have to :)[16:27:01] *** darkersatanic has left ##java[16:27:11] <BULLE> roots-: =) now please tell me when i still call stop()[16:27:48] <roots-> if you have 3rd part threads you want to get rid of[16:27:49] <Twiun> please note the stop() method for thread doesn't have to be supported :)[16:27:57] <roots-> stuff that doesnt coorperate[16:31:15] *** lpiasecki has joined ##java[16:32:59] <eythian> roots-: just so you know, I ended up going with the socket method for detecting another instance, but with additional things: it drops a file with the port number in a user-specific place, and an instance starting up reads that and tries to connect. If it fails, it finds a free port, starts a server itself, and writes out a file with the port number. It seems to work pretty well.[16:33:34] <roots-> its a common approach afaik[16:34:18] *** Mazon is now known as mazon[16:34:35] <eythian> yeah. I talked to someone else, and dug through the Azureus code, and they all said the same thing (although Az just has one port number, which isn't so nice)[16:35:00] <roots-> that is better if you ask me :)[16:35:09] <roots-> but hey, lets not discuss it:)[16:35:34] <eythian> hehe :) I was just not wanting to have it fail if the port was already in use by something else.[16:35:43] <roots-> chances are low[16:36:14] <roots-> you could even establish a sequence of lets say 5 ports to try[16:36:16] <eythian> sure, I like to hedge my bets however :)[16:36:19] <roots-> anyhow :)[16:36:31] <roots-> i have a headache, i need some more tea[16:36:35] <roots-> and fresh air[16:36:45] <eythian> fair enough. I think I need to go to bed. It's almost 4am. again.[16:39:41] <Garibaldi> yum, tea masala[16:40:10] *** Tirsleep is now known as TirClass[16:44:43] *** eythian has quit IRC[16:44:47] *** hatOFF has quit IRC[16:45:20] *** Razscout has left ##java[16:48:18] <IseeIsee> cls[16:48:34] <IseeIsee> sorry, I was suppose to write cls in my dos window & I wrote it here :)[16:48:53] <IseeIsee> this shows that my brains out of order right now[16:49:50] *** soulkiller has joined ##java[16:50:27] <bov> roots-: if I want to change the default for String/Object in the JTable for one cell to a JPasswordField would I want to override the DefaultTableCell Renderer or Editor?[16:51:16] <roots-> bov: ?[16:51:18] <roots-> default what ?[16:51:21] <roots-> renderer or editor ?[16:51:39] <roots-> per field renderers/editors are set by subclassing JTable[16:51:44] <bov> roots-: I have a JTable one acouple of the fields are for password entry I want want to use JPasswordField[16:51:46] <roots-> i gave you some sample code[16:51:57] *** swperman has quit IRC[16:52:02] <roots-> JPasswordField works with DefaultCellEdtitor so use that one[16:52:17] <roots-> for Renderer the DefaultCellRenderer will do, just extend it[16:52:45] <bov> thats what I have rightnow a class extending DefaultCellRenderer[16:52:59] <bov> and I overrode getTableCellRendererComponent[16:53:11] <roots-> ok so call super.getTable....nent() first[16:53:25] <roots-> then cast to JLabel and set the text to ****[16:53:29] *** soulkiller has left ##java[16:53:40] <roots-> sounds odd, but it is making sense[16:53:54] <bov> I'm not worried about the JLable because the password in a hash[16:53:56] *** joaopaulo has joined ##java[16:54:03] <bov> Im worried about when the user enters a new password[16:54:26] <bov> that would be the Editor correct?[16:56:24] *** joev has joined ##java[16:56:31] <bov> sorry my swing book is messing me up because it only shows changing the editor for the full table[16:57:59] <bov> oh, now your code makes sense...[16:58:21] *** joaopaulo has quit IRC[17:00:54] <BULLE> bov: dont be sorry, its nice you have a book and is reading it[17:01:51] *** mazon is now known as Mazon[17:03:53] <pr3d4t0r> Good morning.[17:03:58] *** CrewdenX has quit IRC[17:05:25] *** joaopaulo has joined ##java[17:05:44] *** HelloWorld82 has joined ##java[17:05:55] <paulweb515> pr3d4t0r: Olla[17:07:14] *** geli has joined ##java[17:07:54] <pr3d4t0r> paulweb515: Kettle?[17:07:57] <pr3d4t0r> paulweb515: WTF?[17:08:16] *** zz_ has quit IRC[17:08:32] <paulweb515> I got it off a piece of paper they gave tourists that showed up in Cancun[17:08:36] * pr3d4t0r figures that a guy with a surname like Weber isn't a native Spanish speaker.[17:08:42] *** horros has joined ##java[17:08:43] <pr3d4t0r> paulweb515: Ah![17:08:51] <paulweb515> Olla, miho, commo est-a?[17:08:53] <pr3d4t0r> paulweb515: Piece of paper: "Run for the shelter!"[17:09:00] <pr3d4t0r> LOL[17:09:11] <paulweb515> I hope not ... I assumed it meant how's it going? :-)[17:09:13] <pr3d4t0r> paulweb515: "Hola, m'hijo" :)[17:09:38] <pr3d4t0r> paulweb515: Yeah, it's sort of "Hello, kid. How are you?"[17:09:55] <pr3d4t0r> paulweb515: m'hijo --> literally, contraction of "my son".[17:10:35] <paulweb515> I guess too many apostrophes confuse the tourists ...[17:11:23] * Cow_woC wishes he could find Remy of Tomcat somewhere on IRC so he could kick some sense into him[17:11:25] <pr3d4t0r> paulweb515: He, he, he...[17:11:35] <pr3d4t0r> paulweb515: M'hijo --> mi hijo --> my son.[17:12:12] <roots-> /join #java.de[17:14:28] *** djib has quit IRC[17:14:47] *** berzerka has quit IRC[17:16:25] *** censored has joined ##java[17:24:12] *** gelignite has quit IRC[17:25:42] *** kkaisare has joined ##java[17:28:42] *** lorentey has quit IRC[17:29:57] *** teralaser has quit IRC[17:31:11] *** mmr has joined ##java[17:31:30] <mmr> hey there[17:33:45] <mmr> any SCWCD around could shed some light about what books should i read to get certified?[17:33:53] *** blackfalcon has joined ##java[17:34:50] <roots-> i am SCJP[17:34:59] <roots-> for that i didnt need a book[17:35:11] <roots-> isnt that prerequisite for SCWCP ?[17:35:18] *** heanol has quit IRC[17:36:15] *** eidolon has joined ##java[17:36:25] <mmr> i am SCJP also.[17:36:26] <eidolon> mornin folks.[17:36:40] <mmr> SCWCD seems a lot tougher than SCJP exam.[17:36:58] <roots-> well SCJP was a damn joke[17:37:12] <roots-> it made me laugh[17:37:30] <roots-> spend 20 minutes on it, they were asking the most trivial easiest stuff you could possibly come up with[17:37:53] *** Onur_ has joined ##java[17:37:59] <mmr> right...[17:38:06] <mmr> anyway, can someone help me about SCWCD?[17:38:33] *** agnul has quit IRC[17:39:13] *** kiwnix has joined ##java[17:42:13] <mmr> http://www.sun.com/training/certification/java/java_web.html[17:42:21] <mmr> erm... :([17:43:04] <roots-> i would take it[17:43:13] <roots-> but no money right now to spare[17:43:17] <roots-> i was gonna do the developer[17:43:17] * eidolon wimpers.[17:43:26] <eidolon> XStream is making my head hurt.[17:43:34] <roots-> but then again, developer is a bigger joke than programmer[17:43:40] <roots-> why would i need to write a toy app ?[17:43:42] <mmr> roots-: the company will pay if i pass[17:43:57] <roots-> i have production code running in places like SAP xi, Cisco, Ford, HP[17:43:58] <roots-> whatnot[17:44:09] <roots-> why would i write a toy app for the damn developer exam[17:44:16] <roots-> as soon as i can spare the money i will do it though[17:44:19] <mmr> roots-: well, dont do it then.[17:44:32] <roots-> nah i will still do it[17:44:33] <roots-> nice to have[17:44:34] *** synic has joined ##java[17:44:51] <mmr> roots-: hope you pass.[17:45:05] <roots-> the developer ?[17:45:13] <mmr> whatever you take.[17:45:13] <roots-> you can bet all your money on that :)[17:45:14] <eidolon> hey synic, what's the good word?[17:45:23] <roots-> wont tak the web cd[17:45:29] <roots-> since i havent dont web since 1999 or so[17:45:51] <mmr> i see..[17:45:51] <synic> eidolon: I wish I knew. It would be super if I could reproduce it.[17:45:59] <eidolon> *nodnod* i hear ya, man... :([17:46:01] <kkaisare> Has anyone tries out the JDS system? I hear its closely bound to GNOME ?[17:46:09] <eidolon> i wish i could reproduce it consistently.[17:46:13] <eidolon> gotta find a swing guru.[17:46:15] <eidolon> like roots- :)[17:46:33] <roots-> eidolon: i am not a swing guru, but whats the question anyhow ?[17:46:36] <mmr> roots-: you should go for the SCEA exam.[17:47:10] <roots-> thats the top one right ?[17:47:14] <eidolon> heh. synic's app is doing something odd - every once in a while the JTextArea will stop updating completely... no exceptions thrown, no nothing. just no text sent to it appears.[17:47:16] <roots-> that would cost a fortune man[17:47:32] <HelloWorld82> and SCEA is also very hard.[17:47:39] <roots-> that could be caused by a lot of things[17:47:39] <eidolon> but i seem to be the only one experiencing it :)[17:48:01] <mmr> roots-: you should be able to afford it[17:48:14] <eidolon> i've had had it happen in the middle of conversations - text is updating fine, then i notice nothing has appeared ofr a while.[17:48:14] <mmr> java programmers are known to be well paid[17:48:18] <eidolon> (jabber client)[17:48:21] <roots-> mmr: are they ?[17:48:41] <mmr> roots-: above the average, yes[17:48:43] <HelloWorld82> at least better as PERl/CGI programmer :)[17:49:24] <KingNato> I'm certainly making more money now writing Java than I did five years ago writing PHP :)[17:49:27] <mmr> roots-: you probably can make your company pay the exam for you (if you pass, of course)[17:49:39] <roots-> mmr: i doubt it[17:49:43] <roots-> then again, its step by step[17:49:47] <HelloWorld82> and it is not soooo expensive I think[17:49:52] <roots-> i first need to take the developer, wouldnt i ?[17:50:01] <mmr> roots-: no[17:50:10] <roots-> or SCWCD[17:50:18] <mmr> roots-: theres no pre-requisite to SCEA[17:51:46] <roots-> hmm just reading the objectives[17:51:53] <bov> does setDefaultEditor() need to be to my Class before the user selects a cell from the table? Rightnow I have it set after they have selected a Cell[17:52:15] <mmr> its just me or the entire website went down?[17:52:17] <roots-> bov: what are you doing there ?[17:52:17] <mmr> http://www.sun.com/[17:52:24] *** kiwnix has quit IRC[17:52:30] <roots-> bov: trying to set/unset it for getting it to work on a single cell only ?[17:53:01] *** Tux_Paranoid has joined ##java[17:53:06] <mmr> weird..[17:53:13] <bov> roots-: my Class overrides getTableCellEditorComponent and returns a new DefaultCellEditor(new JPasswordField())[17:53:58] <Tux_Paranoid> Hi, I want to install Java under Mandriva 2005 LE, could anyone help[17:54:27] <bov> roots-: trying to set it for single cell only depending on what column 0's value was set to[17:54:33] *** jenner has joined ##java[17:54:46] <jenner> heya[17:54:54] *** arnon has joined ##java[17:55:05] <nmx> Tux_Paranoid: do you want to install the runtime environment or the development kit?[17:55:09] <bov> my debug is not showing MyClass.getTableCellEditorComponent being called though...[17:55:29] * mmr reading about SCJA[17:55:45] <Tux_Paranoid> nmx: I'm not sure, I'm new at it, what I want is to run my .java files[17:55:51] <mmr> Sun Certified Java Associate, eh?[17:55:53] <roots-> ok that is not really supported as a concept[17:56:01] <jenner> Guys, does anyone know if it's possible to "inject" properties from a .properties file as JVM parameters (so foo=bar will become -Dfoo=bar) into a ant junit task?[17:56:06] <roots-> bov: i recommend you handle that inside your editor[17:56:13] *** Lamex has quit IRC[17:56:30] <roots-> jenner: xml system entity inclusion works with ant[17:56:33] <roots-> since its xml[17:56:37] <nmx> Tux_Paranoid: go to http://java.sun.com, download the JDK and follow the installation instructions[17:56:51] <arnon> is there a way for an java applet to open a web browser ?[17:57:22] <roots-> arnon: AppletContext.showDocument[17:57:36] <bov> roots-: do you know what method from DefaultCellEditor is being called to return JTextField or JComboBox?[17:57:45] <arnon> roots-, thank you[17:59:33] *** djib has joined ##java[17:59:46] <roots-> bov: the one defined in TableCellEditor[17:59:57] <roots-> getTableCellEditorComponent or such[18:00:12] <arnon> roots-, is there a way to make a jsp page can only be opened from the applet? so that nobody can access that jsp page except via the applet ?[18:00:43] <Tux_Paranoid> nmx: I can't find it as JDK[18:01:18] <roots-> arnon: you could just use the access control of the webserver you are using[18:01:22] <roots-> eg allow only access from localhost[18:01:35] <roots-> since you control the host it would be sufficient[18:02:46] <Tux_Paranoid> nmx: could J2SE 5 be the same?[18:03:00] *** TirClass is now known as Tirlas[18:05:55] *** dmlloyd|work has joined ##java[18:06:00] *** Danielle has quit IRC[18:07:23] *** kiwnix has joined ##java[18:10:32] *** Coffman has joined ##java[18:10:43] *** FreemaniaX has joined ##java[18:11:29] *** Tux_Paranoid has quit IRC[18:11:49] *** omry has quit IRC[18:12:24] *** arnon has quit IRC[18:12:35] <bov> table.setDefaultEditor(javax.swing.DefaultCellEditor.class, new DefaultCellEditor(new JPasswordField())); I can't get default to take JPasswordField[18:17:55] *** Onur_ has quit IRC[18:18:11] *** doc|work has quit IRC[18:19:10] *** jenner has left ##java[18:19:28] *** Gavrila has joined ##java[18:19:50] *** octoberdan has joined ##java[18:20:00] <octoberdan> Is it possible to treive the cotext root from a servlet?[18:20:04] <octoberdan> 8Retreive[18:20:14] <octoberdan> *Retreive[18:20:27] <cheeser> yes[18:20:42] <cheeser> look at the API for the request[18:21:54] *** censored has quit IRC[18:24:48] <octoberdan> Well I found getContextPath, but that's not quite what I'm looking for[18:25:35] <octoberdan> since sometimes it'll be foo.com/whatever and some times it will be foo.com/bar/whatever[18:25:36] *** Geren has joined ##java[18:26:03] *** netseeker has joined ##java[18:26:13] <octoberdan> oh[18:26:16] <octoberdan> I mean basepath[18:26:21] <Geren> what happens if i declare a variable inside a methd to be static?[18:26:21] <octoberdan> doh... was calling it the wrong thing[18:26:30] <Geren> like i have public MyMethod(){static int a=1;}[18:26:41] *** netseeker has quit IRC[18:27:24] <Epesh> Geren: try it[18:27:47] <eidolon> epesh![18:29:01] <Geren> illegal start of expression[18:29:01] <Geren> : static int a=1;[18:29:03] <octoberdan> How do I get the basepath within a servlet?[18:29:08] <Geren> ok, but i don't understand why it's illegal[18:30:06] <Epesh> because java isn't C[18:30:31] <Geren> Epesh, ok , i dont quite understand the meaning of declaring a variable to be static[18:31:59] *** nater has joined ##java[18:32:40] <nater> does anybody know of a swing component that basically amounts to a jtextarea that can't be editied by the user?[18:32:59] <octoberdan> cheeser: Do you know how to get the basepath within a servlet? That's really what I was looking for...[18:33:29] *** kkaisare has left ##java[18:34:39] <Geren> anyone/.[18:34:41] <Geren> ?[18:35:23] <Twiun> nater: looked at the javadoc for JComponent?[18:37:22] *** joaopaulo has quit IRC[18:37:32] *** joaopaulo has joined ##java[18:38:01] *** hd420 has joined ##java[18:38:23] <hd420> Is there any way to determine which codec is used for the audio in an avi?[18:38:30] <joaopaulo> i'm having a newbie problem, somebody can take a look ? http://pastebin.com/404168[18:38:32] *** octoberdan has quit IRC[18:38:47] *** auv has joined ##java[18:39:12] <Epesh> Geren: it means an instance of the variable is going to exist as long as that classloader contais a ref to that class[18:39:33] <Geren> Epesh, so why can't i declare it to be static in my method?[18:39:59] <Epesh> because methods aren't class-level constructs. Declare it OUTSIDE of the method.[18:40:12] <hd420> joaopaulo: private static ArrayConsulta arrayConsulta outside the method, but in the class[18:41:17] <Geren> Epesh, so if i declare a variable outside of my method, do i need to declare it as static or not?[18:41:50] *** tazle has joined ##java[18:42:03] <Epesh> if you need it static, yes, you do.[18:42:13] <Geren> Epesh, what is a rule of thumb if i need somethin ot be static or not[18:42:24] *** Sancezz has joined ##java[18:42:26] <Geren> Epesh, and i'm not talking about a class , but about my main program[18:42:37] <joaopaulo> hd420, i dont have the ArrayConsulta type, im getting some erros trying to use private static String[] ArrayConsulta=null;[18:42:43] <auv> hi, is it possible to retrieve classpath by it's id and modify it on runtime calling ant from java code?[18:42:49] <chippy> is there a smaller sourceforge website around for small one-person opensource projects?[18:43:39] <hd420> joaopaulo: Java will automatically nullify all new objects[18:43:45] <Epesh> Geren: learn java[18:43:50] <Geren> i did[18:43:56] <Epesh> apparently not[18:44:09] <Geren> whenever i read about static, it always talk about classes and methods[18:44:18] <Geren> but i am only doing main programs, no classes1[18:44:23] *** arnon has joined ##java[18:44:37] <Epesh> heh[18:44:43] <Epesh> i.e., you don't know java[18:44:50] <Epesh> because java doesn't have any programs outside of classes[18:44:52] <Epesh> try again.[18:44:54] <Geren> Epesh, can u explain to me briefly?[18:45:02] <Epesh> no.[18:45:24] <eidolon> theres no such thing as a java program that's not a class.[18:45:33] <eidolon> java is classes. go to java.sun.com and start the java tutorial.[18:45:57] *** mmr has quit IRC[18:46:02] <Geren> right i realize that[18:46:10] <Geren> so what i i declare a variable as static in my main class[18:46:34] <Epesh> heh[18:46:37] <Epesh> learn java[18:46:39] <Epesh> really[18:48:54] <dmlloyd|work> anyone know of any good discussion about object-passing IPC versus remote-procedure/method-call IPC?[18:49:34] <dmlloyd|work> I've come to the conclusion that CORBA, RMI, etc are fundamentally broken, and I'm curious if anyone else has.[18:49:57] *** vincenz has joined ##java[18:50:52] <dmlloyd|work> and that includes J2EE.[18:51:05] <dmlloyd|work> hmm, nobody rising to the bait today I guess[18:51:50] <eidolon> heh.[18:52:07] <Kane_Hart> What happens when moveDown is invoked 2/3 times; makeInvisible twice[18:52:07] <Kane_Hart> Answer[18:52:09] <eidolon> i abandoned RMI from client <-> server stuff... though i'm still using it internally insdide jboss (servlet -> sessionbean)[18:52:19] <eidolon> i went webservices for client-> server stuff (SOAP)[18:52:22] *** Wack has joined ##java[18:52:22] *** auv has left ##java[18:52:34] <Kane_Hart> gotta lova java homework lol[18:52:57] <Kane_Hart> I don't get his question though :([18:52:58] <Kane_Hart> What happens when moveDown is invoked 2/3 times;[18:53:20] *** Tux_Paranoid has joined ##java[18:54:10] *** Geren has quit IRC[18:54:28] *** Manny has joined ##java[18:54:32] <Tux_Paranoid> Hi, I just installed the JDK, but I can't run my .java files and I don't have the 'java' or 'javac' command[18:54:36] <Tux_Paranoid> could anyone help me, pleas[18:55:36] <IseeIsee> I'm running a thread[18:55:52] <IseeIsee> after a certain condition inside the thread I want it to stop working, what should I do ?[18:55:59] <IseeIsee> I mean to say the thread should exit itself[18:57:03] <cheeser> Tux_Paranoid: add the bin dir of the JDK to your path[18:58:27] <littlezoper> Tux_Paranoid: and you don't "run" .java files :)[18:58:56] <Tux_Paranoid> what would that dir be? I don't find anything "java-related" under my bin dir[18:58:58] *** bubblenut has left ##java[18:59:53] <Tux_Paranoid> littlezoper: I know that .java is just the source, but how should I say it?[19:00:08] <littlezoper> Tux_Paranoid: "I can't compile my java source files"?[19:00:35] <Tux_Paranoid> heh, good, I'll keep that in mind[19:00:43] <littlezoper> :)[19:00:52] <littlezoper> just to make sure we're all on the same page :)[19:02:24] *** teralaser has joined ##java[19:02:48] *** nater has quit IRC[19:03:07] <Tux_Paranoid> the thing is that I have no commands to compile them[19:03:23] <littlezoper> what OS?[19:03:28] <Tux_Paranoid> and I don't find any jdk dir under /bin or /usr/bin[19:03:33] <Tux_Paranoid> Mandriva 2005[19:03:35] <littlezoper> ok[19:03:52] *** cm_patric has joined ##java[19:04:21] <littlezoper> on my linux box, javac is under /usr/lib/jvm/java-1.5.0-sun/bin/[19:05:00] <follower> /opt/jdk1.5.0_04/bin/ is another example[19:05:31] <littlezoper> if you have to brute force it, find / -name javac[19:05:31] <littlezoper> :)[19:06:24] <Tux_Paranoid> I found a jdk-1.4.2_07 dir under /usr/lib, but I just installed jdk-1_5_0[19:06:43] *** sloshytiger has joined ##java[19:06:53] *** sloshytiger has left ##java[19:06:56] <Tux_Paranoid> I have nothing under /opt[19:06:56] <littlezoper> Tux_Paranoid: run find[19:06:58] <littlezoper> <shrug/>[19:07:14] <Tux_Paranoid> 0k, running[19:08:00] *** manulite has quit IRC[19:08:10] *** manulite has joined ##java[19:12:39] <Tux_Paranoid> I got an error while running: Automatically turning on find's -noleaf option.[19:12:54] <littlezoper> that's probably ok[19:13:09] <littlezoper> if you wanted to be nicer to your system, you might do find /usr -name javac[19:13:27] <Clackwell> do all linux newbies start learning java at the same time?[19:13:33] <Tux_Paranoid> it found something, seems useful: /usr/java/jdk1.5.0_05/bin/javac[19:13:47] <nmx> bingo[19:13:53] <Clackwell> Tux_Paranoid: that's the one you should have in PATH prior to any other "javac".[19:14:04] <Clackwell> ("what's PATH?")[19:14:08] <dmlloyd|work> it's a good idea to know what you're installing when you're installing it[19:14:14] <dmlloyd|work> and that includes where it puts things[19:14:27] <dmlloyd|work> if you don't do that, you've got no business running linux imo[19:14:42] <dmlloyd|work> or rather, the distro that you're choosing to run[19:14:58] <Clackwell> Tux_Paranoid: http://javafaq.mine.nu/lookup?67[19:14:59] <Drone> That URL gave the following error code: 404 Object Not Found[19:15:59] <Tux_Paranoid> I'm installing Java cause I need it, that's why I'm being so persistant, sorry[19:16:45] <Tux_Paranoid> I like it, but now I'm in a hurry and I need it[19:17:11] *** mrsolo has joined ##java[19:17:24] <littlezoper> Tux_Paranoid: don't sweat it. you have to learn sometime...[19:18:20] *** hd420 has left ##java[19:21:14] <Tux_Paranoid> I've got it running!!![19:21:17] <Tux_Paranoid> THANKS EVERYONE[19:21:25] <littlezoper> np[19:21:46] <littlezoper> just leave your postal address so we'll know where to send the invoice :)[19:21:51] <Tux_Paranoid> thanks for your patience[19:21:59] *** Tartaros has joined ##java[19:22:17] <Tux_Paranoid> hehehe[19:24:16] <littlezoper> :)[19:27:10] *** pandora-- has joined ##java[19:27:19] *** tag has quit IRC[19:27:37] *** tag has joined ##java[19:27:59] *** Wack has quit IRC[19:28:04] <Terr1> Anyone know a channel where you can ASK XP related questions?[19:29:58] <Kallistor> #windows would be the first place to try i guess[19:30:18] <cyclone> actually.. there is a ##windows[19:30:22] <dmlloyd|work> windows xp or "extreme programming"?[19:32:05] <Terr1> extreme programming 8)[19:32:30] <dmlloyd|work> aha[19:32:32] <cyclone> Oh.. then you will not want ##windows then[19:32:40] <cyclone> They will just be ALL sorts of confused.[19:32:41] * cyclone ducks[19:32:49] <Terr1> hehe 8)[19:33:27] <Terr1> cant find any channels in this network for discussing developement methods[19:36:40] *** kinabalu has joined ##java[19:37:45] *** mohadib has joined ##java[19:37:57] <Kallistor> you could try searching for a channel on searchirc.com[19:38:10] * mohadib hates PHBs[19:38:13] <Kallistor> search engine for irc channels[19:38:34] <Clackwell> futile[19:39:06] *** kiwnix has quit IRC[19:39:44] <nmx> PHBs make life more interesting[19:40:09] <Clackwell> if irc, be a regular. you'll find out who you can talk to about such stuff that way, and can do it on channel. if all you do is come in for a quick chat when you need it, it is a very single sided relationship.[19:40:32] *** Tirlas is now known as TirClass[19:40:43] <mohadib> nmx: PHBs make me want to puke , they think they have such good ideas , in real life they are fucking lamer morons that i hope get hit by a bus![19:41:18] <Clackwell> mohadib: PHBs have no monopoly for moronicity. :)[19:41:23] <mohadib> heh[19:41:26] *** Tux_Paranoid has quit IRC[19:41:51] <mohadib> Clackwell: the phbs are killing my spirit and love for java[19:41:59] <Clackwell> mohadib: how that?[19:42:09] <mohadib> Clackwell: Imy eye twitched when i see them[19:42:49] <mohadib> just making lots of changes , throwing away the really good and creative shit , and replacing it with fucking shit a 6 yr old could have come up with[19:43:11] <mohadib> </rant>[19:43:12] <mohadib> sorry[19:43:13] <Clackwell> mohadib: how is your eye twitching related to java though? :) our chief programmer is a PHBs, he kicks ass and runs circles around every single one of us - at the same time.[19:43:30] <mohadib> well , he is not a PHB[19:43:49] <mohadib> in my mind PHB is reserverd to clueless people who dont realize they are clueless[19:44:03] <Clackwell> mohadib: not only is he several times as productive as we are, everything he does makes sense. 90%+ rate of sanity. the average joe programmer gets close to 50% sanity, in my experience. :)[19:44:16] <mohadib> well not my phb[19:44:22] <mohadib> my phb only knows yabasic[19:44:23] <Clackwell> mohadib: sucks to be you then. ;)[19:44:40] <mohadib> we have ported his code to perl , we reduced one fucmtiopn for 600 lines to 3[19:44:56] <mohadib> Clackwell: i would walk out today if i could[19:45:06] <mohadib> after i told the owner what a fucking nub he is[19:45:40] <mohadib> it would be a little differient if i heard "Good Job" or some such occaisonly[19:45:41] <mohadib> but no[19:45:47] <mohadib> sorry </rant>[19:46:21] <dmlloyd|work> welcome to the world[19:47:00] <dmlloyd|work> and PHB definitely means a clueless boss[19:47:04] <dmlloyd|work> which is 90% of them out there[19:47:17] <dmlloyd|work> if you're lucky enough to have a good boss, hold on to that[19:47:29] <mohadib> dmlloyd|work: how can anyone deal with this all day[19:47:47] <mohadib> at least when i was an electrican i could go home with the satisfaction of a job well done[19:47:54] <dmlloyd|work> I dunno[19:48:00] <dmlloyd|work> just keep thinking about the paycheck[19:48:04] <dmlloyd|work> maybe you'll hate yourself less[19:48:09] <mohadib> no such luck here , my boss is a fucking bastard , i hope ..... well , i wont mention it[19:48:29] <mohadib> dmlloyd|work: good point , i'll live for everyother friday[19:48:42] <mohadib> and in the mean time write stupid code and never grow[19:48:44] <mohadib> :\[19:49:04] <dmlloyd|work> if I didn't have a family to support, I'd probably just do contracting when I felt like it and otherwise just be a musician or something[19:49:13] <mohadib> nice[19:49:14] *** IceD^ has joined ##java[19:49:33] *** vinse has joined ##java[19:49:37] <mohadib> if i didnt have food habbit ... well , things would be differient :p[19:49:49] <vinse> what's a food hobbit?[19:50:03] <mohadib> a little guy who likes food?[19:50:17] <vinse> oh habbit[19:50:24] <vinse> *habit[19:50:27] *** IceD^ has left ##java[19:50:31] *** Varjat_by has joined ##java[19:50:48] * mohadib starts his 5th re-write of the scheduling module[19:51:15] <mohadib> AOP is fucking lame if you dont have at least a small plan[19:51:53] <mohadib> and it really sucks when you are forced to do AOP but are givien lots of flack everytime something has to be changed because the boss cant communicate[19:52:17] <mohadib> anyway....[19:52:25] <mohadib> How dod i set my classpath in Linux?[19:52:27] <mohadib> ;)[19:52:48] *** FaeLLe has joined ##java[19:53:09] <dmlloyd|work> AOP, ah the buzzword of the year[19:53:12] <dmlloyd|work> so tell me[19:53:27] <dmlloyd|work> do you like factoring out your cross-cutting concerns?[19:53:33] <Bevin> naaa, it was last year's ;-)[19:53:46] *** jsn has joined ##java[19:54:44] *** censored has joined ##java[19:54:47] <mohadib> dmlloyd|work: -> http://www2.parc.com/csl/projects/aop/ was that from here?[19:55:17] *** Ulgar has quit IRC[19:55:18] <dmlloyd|work> no idea[19:55:40] <mohadib> you mentiond crosscutting , so i thought you where quoteing that site[19:55:46] <dmlloyd|work> I just stuck together a cuople of the more irritating buzzwords I've heard surrounding AOP[19:55:53] <mohadib> lol[19:56:08] <mohadib> i like working and showing the cutsomer as your going[19:56:24] <dmlloyd|work> then you should be a carpenter :)[19:56:26] <mohadib> but if they dont tell you its wrong till months after you have finished a moduel...[19:56:29] <mohadib> well[19:56:41] <dmlloyd|work> I've thought about being a tradesman[19:56:50] <dmlloyd|work> it's very appealing[19:56:52] <mohadib> i was an electrician for 5 years[19:57:01] <mohadib> it was fun , i made the same money[19:57:05] <dmlloyd|work> and you gave it up?[19:57:08] <dmlloyd|work> you're nuts[19:57:19] <mohadib> and in construction there are far less douche bags[19:57:28] <dmlloyd|work> btw, wanna come rewire my house?[19:57:29] <mohadib> dmlloyd|work: it got boring[19:57:36] <mohadib> you never get to use any theory[19:57:37] <dmlloyd|work> I'll give you all the beer you can drink[19:57:47] <mohadib> you just use the code book and monkey it all together[19:57:54] <dmlloyd|work> mmm, code book[19:57:59] <dmlloyd|work> I don't bother with that[19:57:59] <mohadib> dmlloyd|work: ;) no thanks :)[19:58:04] <mohadib> dmlloyd|work: lol[19:58:16] <IseeIsee> if I want a JFrame to always open centered on the screen, what should I do ?[19:58:20] <IseeIsee> ~frame[19:58:20] <javabot> I guess the factoid 'how to use internal frames' might be appropriate:[19:58:23] <javabot> IseeIsee, how to use internal frames is http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html[19:58:32] <dmlloyd|work> I may have done some questionable wiring in my time, but it's nowhere near as bad as what was there when I moved in[19:58:40] <mohadib> IseeIsee: setLocationRelativeTo(null)[19:59:07] <mohadib> dmlloyd|work: if you ever have any questions i can help with let me know[19:59:11] <dmlloyd|work> rock[19:59:18] <dmlloyd|work> ~mohadib++[19:59:19] <javabot> mohadib has a karma level of 52, dmlloyd|work[20:00:08] <mohadib> ;)[20:01:49] *** Mot has quit IRC[20:02:13] <IseeIsee> no mohadib setLocationRelativeTo(null) does not makes the screen display as centered[20:02:16] *** everwicked has joined ##java[20:02:22] <IseeIsee> its moving my JFrame more towards the bottom right corner[20:02:47] <everwicked> does anyone know how to set the default date format conversion in WW2?[20:03:29] *** Varjat_by has quit IRC[20:04:04] <IseeIsee> can I get the resolution of my monitor through Java ?[20:04:59] <mohadib> IseeIsee: yes it does[20:05:22] <mohadib> IseeIsee: you can[20:05:39] <ernimril> IseeIsee: Toolkit or GraphicsDevice[20:06:33] <IseeIsee> ok[20:08:24] <IseeIsee> how can I make the java class file an executable file ?[20:08:39] <mohadib> IseeIsee: you ever use google?[20:08:43] <mohadib> maybe give it a try[20:08:57] <everwicked> yeah, you should help me that I've tried Google already :P[20:08:59] * dmlloyd|work puts on google goggles[20:09:19] <ernimril> IseeIsee: you can not, nor do you want to[20:09:36] <FaeLLe> IseeIsee: make it a JAR[20:09:54] <mohadib> that wont make it executable[20:09:59] <mohadib> not that alone[20:10:18] <IseeIsee> ok[20:10:29] <IseeIsee> is'nt it possible to use 2 JButton on 2 different JFrames[20:10:37] <FaeLLe> IseeIsee: check out http://www.ej-technologies.com/products/install4j/overview.html[20:10:39] <IseeIsee> I'm trying to do it but its giving me some problems[20:11:17] <mohadib> IseeIsee: a swing component can only be displayed on one container iirc[20:11:28] <IseeIsee> iirc ?[20:11:41] <mohadib> if if recall correctly[20:11:45] <mohadib> if I[20:12:57] <IseeIsee> ok[20:13:08] <IseeIsee> I think your are recalling it correct :)[20:13:22] <IseeIsee> your nick seems to be an Urdu word[20:13:29] <IseeIsee> where are you from ?[20:13:55] <mohadib> New Mexico is where i currently hang my hat ;)[20:14:31] <cyclone> mohadib: Is it currently Hot as HELL in New Mexico?[20:14:48] <cyclone> cause it is in Utah.[20:19:54] *** {aaron} has joined ##java[20:20:30] <{aaron}> can anybody give me a hand with jstl/expression language/beans? I'm new to this, but I just want to define a bean (in request scope) that I can call/use in a c:forEach[20:21:01] <{aaron}> i have to use c:set i think[20:21:14] *** jsn has quit IRC[20:21:19] *** kasper has joined ##java[20:21:25] <mohadib> cyclone: it's about 70 today , very nice[20:21:55] *** mheath has quit IRC[20:22:11] <ernimril> mohadib: its about 3(C, => 37F) here ...[20:22:34] <mohadib> ernimril: thats flipping cold , where are you at?[20:22:46] <ernimril> mohadib: Stockholm in Sweden[20:23:00] <cyclone> ernimril: WOW[20:23:02] <mohadib> nice , you a skier?[20:23:05] <ernimril> mohadib: that is not very cold, it is autum now... :-)[20:23:10] <mohadib> hehe[20:23:20] <ernimril> mohadib: not really, cross country is nice, but not downhill[20:23:31] <cyclone> mohadib: Are you a skier?[20:23:41] *** everwicked has quit IRC[20:23:42] <ernimril> mohadib: we do not have snow yet and we will not get it for some time...[20:23:54] <mohadib> cyclone: yes , we have a ski mountain about 30 minutes from my house[20:24:00] <nmx> mohadib: not really, downhill is nice, but not cross country[20:24:02] <nmx> (fixed)[20:24:03] <cheeser> {aaron}: <c:var> or <c:useBean> I think.[20:24:09] <mohadib> ernimril: i expect snow here within a month[20:24:18] <cyclone> mohadib: If you are ever in the Northern utah area.. Should let me know.[20:24:33] <mohadib> cyclone: I will :) and you do the same should you make it to NM[20:24:48] <cyclone> I've done some Back Packing in the NM area.[20:25:07] <mohadib> cyclone: yes , we have some nice trails and state parks[20:26:00] * mohadib goes back to re-write a 5th time[20:26:15] <{aaron}> cheeser: thanks. is it possible to invoke a method in EL or do I have to do that in a scriptlet or <%= %>? e.g. <c:set var="foo" value="<%= utilityclass.invokeStaticMethod %>"/>[20:26:28] <IseeIsee> if I want to make a decision based on the selection inside a JComboBox, should I implement an ActionListener for it or an ItemListener ?[20:26:41] <mohadib> ActionListener is better imho[20:26:56] <mohadib> item listener will send you deselect events and select events[20:26:57] <ernimril> IseeIsee: does not really matter, ActionListener is easier to implement[20:27:04] <mohadib> so if you dont need deselect events...[20:27:29] <IseeIsee> OK[20:28:00] *** franl has joined ##java[20:29:37] <cheeser> {aaron}: afaik, EL syntax works with bean properties.[20:29:46] <cheeser> let me look up how we do it though...[20:30:06] *** jaramillo has joined ##java[20:30:13] <{aaron}> cheeser: ok, i think i can change my method from something like listAllFooBars to getAllFooBars[20:30:27] <{aaron}> i hope it works on static methods too[20:31:14] <cheeser> i'm opening up that project now. i can tell you in just a sec[20:31:43] <IseeIsee> if I have an actionlistener which listens both for a JButton and ComboBox[20:32:11] <IseeIsee> now if the button would perform an action based on what was in selected in the combo[20:32:14] <mohadib> thats ok[20:32:17] <IseeIsee> how can they two work together then ?[20:32:25] <mohadib> e.getSource == ComboBox[20:32:35] <mohadib> or e.getSource == myButton[20:32:53] <IseeIsee> ahan[20:33:08] *** hashman has joined ##java[20:36:30] <IseeIsee> ahan[20:37:10] *** Dewi has quit IRC[20:40:58] <cheeser> {aaron}: we actually use a couple of custom tags to do that as it turns out[20:41:02] * pandora-- waves[20:41:07] <pandora--> g'day all[20:41:12] <pandora--> happy munday n stuff.[20:41:12] <IseeIsee> no mohadib this is not what I mean[20:41:32] <IseeIsee> first I select an item from the Combobox, when I select the item an actionevent would be generated[20:41:59] <IseeIsee> after that I click the JButton, and the JButton would make decision based on what I just selected before clicking the JButton[20:42:15] *** jaramillo has quit IRC[20:42:44] *** solus has joined ##java[20:43:04] *** Dakrone has joined ##java[20:43:13] *** asac_ has joined ##java[20:43:28] <Dakrone> how do you limit the outputed precision of a double to 2 decimals?[20:43:46] <{aaron}> cheeser: ok. I think I will have to rely on some scriptlets anyway for some small things I don't want to spend inordinate amount of time codifying as tags[20:43:46] <IseeIsee> ok I get it, I was creating new listerner everytime so the results were not getting stord[20:44:05] <eidolon> if I have a JFrame that i want to close / destroy itself, do i just do 'this.destroy()' ? (i'm thinking an ActionPerformed listener attached to a 'Close' button)[20:44:14] <eidolon> actually7, this is a JInternalFrame(),but same thing.[20:45:00] <ernimril> eidolon: for a frame you call dispose()[20:45:16] <eidolon> okay, thanks.[20:46:19] *** Lars_G has joined ##java[20:46:39] *** Dakrone has quit IRC[20:46:50] *** sh4dowcat has joined ##java[20:46:52] <mohadib> howdy Lars_G[20:47:49] <Lars_G> Hey mohadib, howdy?[20:47:53] <Lars_G> mohadib: I'm a year older now[20:48:01] <Lars_G> mohadib: So now everybody needs to call me sir....[20:48:07] * Lars_G laughs himself to tears[20:48:09] <Lars_G> yeah, right.[20:48:25] <Kane_Hart> what would be a parameters on this ""public Book(String title, double price)"" the sting and double??[20:48:33] <Kane_Hart> string*[20:48:35] <cheeser> yes[20:48:43] <Kane_Hart> ok thanks I thought so hehe[20:48:45] <mohadib> Lars_G: nice , happy birthday[20:48:50] <Kane_Hart> just learning java :)[20:48:55] <Lars_G> mohadib: Thanks[20:49:03] <cheeser> Lars_G: have fun. 14 years old can be a very big year.[20:49:11] <mohadib> Lars_G: /msg jwormy , he will give you a birthday spanking[20:49:15] <mohadib> javabot: cheeser++[20:49:16] <javabot> cheeser has a karma level of 149, mohadib[20:49:40] * Lars_G beats cheeser with a bat[20:49:41] <Lars_G> :)[20:49:45] <Lars_G> mohadib: Don't encourage him[20:49:53] <mohadib> ;)[20:49:54] *** yi has joined ##java[20:50:07] <Lars_G> mohadib: And btw, jwormy doesn't needs any excuses for a good spanking[20:51:07] <mohadib> hehe[20:51:08] <degWORK> if you wish to have a "File|Exit" menu item in an applet, and since you cannot use System.exit() for applets, what is a good method for effectively killing or stopping the applet[20:51:28] <degWORK> believe it or not the java tutorial didnt help much other than to say that you cannot use System.exit()[20:51:33] <ernimril> degWORK: 1) you do not want to have a menu inside an applet[20:51:35] <Epesh> uh.. what would file/exit do in an APLET?[20:51:47] <mohadib> call stop() ?[20:51:47] <ernimril> degWORK: the browser already have a menu[20:52:11] <Lars_G> degWORK: Make a link outside the applet, in the html to go to another page??[20:52:35] <degWORK> hrm[20:52:54] <degWORK> well my applet needs to spawn an external window[20:52:56] <degWORK> and does[20:53:05] *** lilalinux has joined ##java[20:53:12] <degWORK> and i would like users to be able to close that window and think they have effectively closed the application[20:53:21] <degWORK> it would be nice to catch this signal in other words[20:53:32] <degWORK> and have some exit strategy[20:53:50] <Lars_G> it's easy, your window should have a little "x" to the top right.....[20:53:51] <degWORK> like displaying "Done." in the browser applet pane[20:54:12] <degWORK> but I am already using menu items for printing and help features[20:54:21] <degWORK> might as well just have an "exit"[20:54:32] <Lars_G> Ok, then?[20:54:43] <Lars_G> you do not System.exit() you only need to close the window.[20:54:51] <ernimril> degWORK: "this already sucks, so might as well make it worse!" ?[20:55:13] *** asac has quit IRC[20:55:14] *** asac_ is now known as asac[20:55:18] *** OleMoudi has joined ##java[20:55:26] <ernimril> degWORK: users are confused by one menu, adding one inside your applet is not a good idea.[20:55:50] <degWORK> hrmm[20:55:57] <Lars_G> ernimril: Users are confused by theyr ability to breathe[20:56:20] <{aaron}> what about a link in the page that just does window.close()[20:56:24] <degWORK> dispose() worked ok[20:56:28] <degWORK> but i wasnt sure what i was doing[20:56:33] <{aaron}> that's generally how popups are handled[20:59:54] *** Syloq has joined ##java[20:59:54] *** shredstar has joined ##java[21:00:04] <shredstar> hello[21:00:30] *** vezzoni has quit IRC[21:00:58] *** Mot has joined ##java[21:02:49] <shredstar> How do you print out the class name of an "Object o" ?[21:03:10] <shredstar> System.out.println(""+o.class.toString()) doesn't work how i want it to.[21:03:27] <nmx> shredstar: how do you want it to work?[21:03:34] <Epesh> shredstar: o.getClass().getName()[21:03:38] <shredstar> That doesn't compile.[21:03:44] <cheeser> javabot: be api barbie[21:03:45] <javabot> Javadoc is *hard*![21:04:15] <Cow_woC> cheeser: I'm screwed, yet again[21:04:16] <Cow_woC> :)[21:04:20] <Cow_woC> cheeser: I need some DAO advice[21:04:22] <shredstar> no trolls on monday.[21:04:37] <Cow_woC> ugh, don't remind me it's Monday :)[21:05:12] <cheeser> what's up?[21:05:29] <Cow_woC> cheeser: I wanted to add DAO.valueOf(property1, property2) to construct new objects like say ImageDAO.valueOf() returns an Image. If the Image already exists in the DB, it returns the canonical instance, otherwise it returns a new instance[21:05:44] <Epesh> haha[21:05:47] <cheeser> that's not what a DAO should be doing, but ok. 8^)=[21:05:50] <Cow_woC> cheeser: first, I was told this is good design for canonicalization...[21:05:56] <Epesh> Cow_woC: why not use a repository for that?[21:05:58] <Cow_woC> was the guy wrong? is there a better way?[21:06:03] <Cow_woC> Epesh: what do you mean?[21:06:09] <cheeser> i'd put that logic in the manager/home layer.[21:06:20] <Epesh> I'd not bother. I'd use JCR.[21:06:22] <Cow_woC> what is the manager/home layer (I've asked this before but I forget)[21:06:23] <Cow_woC> ?[21:06:30] <Cow_woC> Epesh: what is JCR?[21:06:32] <cheeser> get(); if(null) { create(); save(); } return;[21:06:44] <Epesh> cheeser: transactionally?[21:06:52] <cheeser> Epesh: sure[21:06:53] <Cow_woC> cheeser: right, that's basically what I have, but in my DAO[21:07:11] <cheeser> Cow_woC: yeah. the DAO should only be used for the get()/save() bits[21:07:22] <Cow_woC> cheeser: what's wrong with putting this in the DAO?[21:07:44] <Cow_woC> I am using the DAO for all methods related to X (such as Theme, Image) that require the use of Session[21:07:51] <cheeser> Cow_woC: well, the DAO is meant to access the datastore layer.[21:07:59] <Cow_woC> cheeser: yes, but this is related ot the database[21:08:16] <cheeser> only peripherally[21:08:24] <Cow_woC> get() in your example is actually a Query[21:08:29] <IseeIsee> if I want to forcebally exit a thread, what can I do ?[21:08:29] <cheeser> i know it is.[21:08:38] <cheeser> IseeIsee: terminate the run()[21:08:39] <Cow_woC> well anyway, the problem is this...[21:09:00] <IseeIsee> how can I terminate the run ?[21:09:18] <cheeser> IseeIsee: stop doing work in it.[21:09:20] <Cow_woC> cheeser: In my old code, I have lazy image rescaling, so if you invoke image.getScaledImage(newDimensions) it'll return Image2. Image2's data is only scaled when it's absolutely required[21:09:21] <cheeser> terminate the loop.[21:09:55] <Cow_woC> cheeser: because "data" makes up the canonical part of the Image in the DB, this means that the Image object changes after being constructed, which is bad because canonicalization goes out the window[21:09:57] <Cow_woC> cheeser: ideas?[21:10:22] <shredstar> Epesh: well, duh. thx, i should have known that.[21:11:11] *** joered has joined ##java[21:11:53] <shredstar> Im using the ktable.sourceforge.net project to add a table to my SWT app. Its pretty cool - and very fast. Smart guys.[21:11:54] <Cow_woC> cheeser: the lazy scaling method seems to be incompatible with the getCanonicalInstance() pattern[21:11:55] <{aaron}> Cow_woC: is it scaled on-demand, or by some background thread/process?[21:12:01] <Cow_woC> {aaron}: scaled on demand[21:12:24] <Cow_woC> {aaron}: getScaledImage() returns an image that is theoretically scaled but it will only get scaled when getData() is invoked[21:12:48] <{aaron}> and you don't want two threads callign getScaledImage, and having the processing occur twice, right?[21:13:21] <{aaron}> i think you just need to use a lock on the scaling process for a given image to ensure another caller gets the "canonical" scaled image[21:13:23] <Cow_woC> not exactly. I don't want image.getScaledImage() invoked, then the data never used but an expensive scaling occurs[21:13:32] *** ocx32 has joined ##java[21:13:39] <{aaron}> why would getScaledImage get invoked if the data is not used?[21:13:48] <Cow_woC> {aaron}: <shrug> it happens[21:14:06] <Cow_woC> at least from memory it did[21:14:09] <{aaron}> by the way, the way I implemented this is that the scaled image is simply a field on an object, requesting it queues an *asynchronous* scaling operation[21:14:10] *** putzel has joined ##java[21:14:14] <Cow_woC> when I added lazy scaling my performance shot way up[21:14:16] <{aaron}> when the scaling operation is complete it /resets/ the field[21:14:16] <yi> if your input doubles and the time to process that doubles as well[21:14:22] <yi> your complexity is linear right?[21:14:30] <Stork> is it possible to make a class that extends bufferedwriter?[21:14:31] *** wig has joined ##java[21:14:33] <{aaron}> instead of lazy-on-demand you want lazy-asynchronous[21:14:34] *** jeukku has joined ##java[21:14:37] <Cow_woC> yi: yes[21:14:38] <Stork> stupid question :\[21:14:46] <wig> Can I store colors in an array and use them in a loop to randomly pick a color?[21:14:47] <Cow_woC> yi: I think :)[21:14:50] <Stork> is it possible to make a class that extends bufferedwriter, that would encrypt the data that it writes?[21:14:52] <yi> Cow_woC: hehe[21:15:09] <ocx32> hi guys, i have 2 classes that extend jframe ( they have gui interfaces) i am trying to create an instance of each of these classes in a main program ( a third file) in order to display the 2 frames at the same time. i am not able to see anything inside the frames when called. just empty frames[21:15:12] <Stork> i have the encryption methods[21:15:15] <Cow_woC> yi: the way you phrased it is confusing[21:15:21] <{aaron}> Stork, Cow_woC, yi: well, if the time to process is a *constant* (regardless of whether it is "double"), then it's linear[21:15:32] <Cow_woC> yi: the way I'd phrase it is: if the number of inputs doubles, the amount of time spent processing them doubles too[21:15:36] <Cow_woC> complexity remains the same[21:15:50] <jcscoobyrs> wig: Yes you can.[21:15:50] <ocx32> i am including getContentpane(panel) in each of these files but not in the main one[21:15:57] <{aaron}> or rather, if the time is some constant factor of the input[21:16:24] *** joaopaulo has quit IRC[21:16:29] *** _daniel_ has joined ##java[21:16:39] *** _daniel_ has quit IRC[21:16:40] <wig> jcscoobyrs, thanks[21:16:58] <yi> {aaron}: if it was constant it be O(1)[21:17:00] <ocx32> how can i display 2 frames at the same time?[21:17:09] <{aaron}> yi: i corrected myself. constant factor of input[21:17:11] <ocx32> 2 different files[21:17:28] <yi> {aaron}: so, if I input (2n) and time goes up by 2[21:17:32] <yi> {aaron}: that's linear no?[21:17:52] <Cow_woC> yes[21:17:55] *** chaitat has joined ##java[21:17:56] <{aaron}> yi: n -> xn[21:17:58] *** Mc_Fly has joined ##java[21:18:02] <Cow_woC> and also this has the complexity O(2n)[21:18:03] <Cow_woC> oops[21:18:06] <yi> that's what i thought[21:18:06] <Cow_woC> O(n) rather[21:18:09] <yi> yeah[21:18:20] <yi> so i was right to begin with, thanks ;)[21:18:26] <Cow_woC> usually O(n) contains a hidden constant, we don't care what that constant is[21:18:29] <Cow_woC> np[21:18:38] <yi> yeah i know[21:19:01] *** veleno has joined ##java[21:19:45] <Mc_Fly> Why does this equal 0 and not 0.005? double temp = (double)(1 / 200); ?[21:20:06] <ernimril> Mc_Fly: integer division[21:20:12] <veleno> in my webapp I include xerces, I deploy it into Jetty, and i get this exception: http://veleno.pastebin.com/404339[21:20:28] <veleno> i don't get it if i deploy the webapp in tomcat[21:20:58] *** nater has joined ##java[21:21:19] <{aaron}> does jetty have the concept of "endorsed" libs dir?[21:21:23] <Cow_woC> Mc_Fly: you're applying the double after the division, not before[21:21:34] <Cow_woC> Mc_Fly: double temp = (double) 1 / 200 will work[21:21:49] <Cow_woC> because the (double) is attached to the 1[21:21:53] <{aaron}> veleno: try relying only on the jdk xerces, or move the xerces into the jetty endorsed libs dir, or jvm endorsed libs dir[21:22:03] *** sh4dowcat has quit IRC[21:22:06] <Mc_Fly> Cow_woC: why not the 200?[21:23:10] <ernimril> Mc_Fly: if either of the values is a double the other is converted to double automatially[21:23:20] * mohadib stabs self with dull #2 pencil[21:23:26] <Cow_woC> :)[21:23:53] *** ocx32 has quit IRC[21:24:02] <chaitat> hi guys, are there any other implementations of message queue than 'SwiftMQ: http://www.swiftmq.com'? I am finding a free implementation of message queue that can be used with 'resin: http://www.caucho.com'. Thank you very much~*[21:24:03] <Drone> That URL gave the following error: java.net.UnknownHostException, www.swiftmq.com'[21:24:13] <veleno> i don't know about jetty endorsed libs, i don't know either the concept of "endorsed". does it mean that xerces classes are included into jetty jar files?[21:24:17] <jcscoobyrs> Anyone know the differences between Jetty 4.x and 5.x?[21:24:24] <jcscoobyrs> Website isn't too informative...[21:24:39] <mohadib> ~tell jcscoobyrs about jwormy[21:24:40] <javabot> jcscoobyrs, jwormy is my favorite asshat[21:24:44] <chaitat> Drone: ?_?[21:24:57] <mohadib> chaitat: drone picked up the trailing '[21:25:25] <chaitat> mohadib, oh oh i see but...[21:25:28] <chaitat> :> ...[21:25:47] <mohadib> chaitat: drone is still beta :p[21:26:06] <chaitat> mohadib, he is an IRC-bot?[21:26:09] <mohadib> yes[21:26:10] <chaitat> hello Drone :D[21:26:14] *** _daniel_ has joined ##java[21:26:17] <jcscoobyrs> No good answer?[21:26:25] <mohadib> s/hello/hellno/[21:26:40] <mohadib> er , drone was replacing stuff too for a while[21:26:50] <{aaron}> veleno: "endorsed" mechanism was introduced so that "standard" jvm package implementation could be overridden with different libraries at runtime. among those are corba, and xml parsers[21:27:03] *** _daniel_ has quit IRC[21:27:35] <hashman> pr3d4t0r, can I query you?[21:27:59] <mohadib> pr3d4t0r.query("but why male models");[21:29:07] *** MindZEye has joined ##java[21:30:25] <Lars_G> pr3d4t0r: You're building a following I see[21:30:35] *** shad0wcat has joined ##java[21:31:06] <chaitat> T_T ... what about my question?[21:32:04] *** Manny has quit IRC[21:33:33] <HelloWorld82> did someone already tried accessing Uno object, by using java ?[21:33:57] <Lars_G> Uno object?[21:34:12] <HelloWorld82> "openoffice uno"[21:34:21] <Lars_G> Ahh ok.. not me[21:34:29] <HelloWorld82> ok ... :-([21:34:35] <Lars_G> But... there is somethign you might ind itneresting... wait[21:34:37] <Epesh> does openoffice dos count?[21:35:01] <HelloWorld82> dos ?[21:35:02] <veleno> {aaron}: thanks for your clarification. i didn't get the workaround you suggested...could you be more explicit ?[21:35:08] <Epesh> yeah, openoffice 2 came out[21:35:08] <HelloWorld82> what is that ?[21:35:26] <HelloWorld82> ah. yes. It counts. I'm using ooo2[21:35:51] <chaitat> havent used linux for a long, long time~[21:35:56] <Lars_G> HelloWorld82: You might find some hints on the source code of this project: http://ubion.ion.ag/plonesoftwarecenter/003officeintegrationeditor[21:35:59] <HelloWorld82> I have problems, then creating contextmenus inside openoffice with java[21:36:19] <HelloWorld82> Lars_G : ahh ... wait, I check that. thanks ![21:36:21] <Lars_G> chaitat: What do you use now?[21:36:32] * Lars_G slaps Epesh[21:36:36] <Lars_G> Epesh: How do you do dude?[21:37:00] <HelloWorld82> ah, ok. I already check that Lars_G. It's to late for me, to use an other (wrapping) library, since I already created one.[21:37:14] <Lars_G> Epesh: So it remains on record before someone else tells you or you see it in the logs, when pr3d showed me the photo of the Java meeting, I said you were the one I'd run from at night.[21:37:27] *** Bevin has quit IRC[21:37:35] <Epesh> and?[21:37:45] <Lars_G> HelloWorld82: I don't say for you to use it, but since it's OSS you can see theyr source to see how they did stuff. I am unsure though if they use Uno or not. sorry[21:38:32] <Lars_G> Epesh: And nothing, I just wanted to tell it myself so you don't think I'm talking behind your back.[21:38:35] <HelloWorld82> yes, they use uno :) . But they don't create context menus ! I also saw today that this librarys was made opensource (thanks to heise.de)[21:38:37] <Lars_G> Epesh: Doing well?[21:38:51] * Epesh doesn't know whether to be insulted or not[21:38:53] <Epesh> so decides not[21:39:15] <{aaron}> veleno: 1) try removing all your xerces jars (depends on whether your jvm has xml parsing support >1.4 should 2) try placing the xerces jars in either 2.a) jetty endorsed dir 2.b) jvm jre/lib/endorsed[21:39:19] <Lars_G> Epesh: Thanks :)[21:39:31] <shredstar> What's a clever way to convert a boolean to an int (0 or 1) ?[21:39:35] <Lars_G> Epesh: Wasn't said with the intention to insult, you're a person I appreciate.[21:39:43] <Epesh> shredstar: if(boolValue?1:0)[21:39:46] <chaitat> shredstar, uses C[21:39:47] <Epesh> erm[21:39:52] <Epesh> boolValue?1:0[21:39:53] <Epesh> sorry[21:40:05] <Epesh> Lars_G: I hated being in that stupid picture[21:40:14] <Epesh> If Bruce hadn't been holding me in place, I'd have moved[21:40:36] <Lars_G> Epesh: Why?[21:40:40] <Epesh> I hate pictures[21:40:43] <Lars_G> ok[21:41:21] <IseeIsee> if I want to disable the close button on the JFrame[21:41:23] <IseeIsee> what can I do ?[21:41:28] <shredstar> ?1:0 is good.[21:41:32] <Epesh> I was originally not in it, but Bruce went out and forced me into it[21:41:56] <Stork> if i'm writing an extended class of bufferedwriter, how do i make the write methods?[21:42:17] <hashman> IseeIsee, change the DEFAULT_CLOSE_OPERATION flag[21:43:15] <veleno> {aaron}: tip n.1 you mean to remove it from those included in my WAR file, right?[21:43:23] <{aaron}> yeah[21:43:29] <Stork> anyone?[21:43:30] <{aaron}> web-inf/lib i suppose[21:43:46] <hashman> IseeIsee, http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JFrame.html#setDefaultCloseOperation(int)[21:43:50] <veleno> {aaron}: yes[21:44:04] <Stork> nevermind, got it :D[21:44:06] *** kiwnix has joined ##java[21:45:07] *** Bevin has joined ##java[21:46:18] <Stork> what's the easiest way to turn a char into a string?[21:46:44] <cheeser> javabot: tel Stork about type conversion[21:46:45] <javabot> Did you mean tell Stork about type conversion?[21:46:50] <cheeser> javabot: tell Stork about type conversion[21:46:50] <javabot> Stork, when trying to convert from one type to another, you should start by checking the docs for the two endpoints. If an endpoint (or both) is a primitive, you'll have to look at the wrapper class's docs.[21:47:22] <mohadib> valueOf[21:47:23] <Stork> or i'll just do new String(new char[]{myChar})[21:47:26] <Stork> or that[21:47:28] <chaitat> hi guys, anyone here using resin?[21:47:30] <mohadib> no[21:47:36] <mohadib> Stork: look st the String api[21:47:41] <mohadib> at[21:47:43] <Stork> thanks for saving me from some horrible code[21:47:46] <Stork> i am now[21:47:50] *** ExtremeCode has joined ##java[21:47:57] <Stork> static String valueOf(char c[21:48:01] <Stork> awesome, thanks[21:48:04] <mohadib> ;)[21:49:32] *** fuso has joined ##java[21:49:39] *** fuso has quit IRC[21:49:52] <cheeser> javabot: be api barbie[21:49:52] <javabot> Javadoc is *hard*![21:49:55] <mohadib> YAY[21:50:07] <mohadib> javabot: be api Ken[21:50:07] <javabot> I guess the factoid 'be api barbie' might be appropriate:[21:50:09] <javabot> Javadoc is *hard*![21:50:58] *** fuso has joined ##java[21:51:03] <mohadib> javadoc ken should say "read the api beyatch!!"[21:51:39] <Lars_G> mohadib: No it should say "I have no time to read the api, I must go shopping with my boyfriend"[21:51:45] <veleno> {aaron}: thanks, it worked ![21:52:15] <mohadib> Lars_G: LOL[21:52:36] <veleno> one more question: i need to pass to variables from command line to ant, like -Duser=username -Dpassword=pwd ...i tried this way but didn't get it[21:52:47] <mohadib> i have sirnamed my boss "Fucko"[21:53:18] *** {aaron} has quit IRC[21:54:59] *** [bono] has joined ##java[21:55:12] <[bono]> ClassFormatError: com/mysql/jdbc/util/LRUCache (Illegal constant pool[21:57:40] <[bono]> Tomcat Question: When booting tomcat, i get a "java.lang.ClassFormatError: com/mysql/jdbc/util/LRUCache (Illegal constant pool index)". Any idea?[21:58:34] *** pavlicek has joined ##java[21:59:11] *** agnul has joined ##java[21:59:21] *** Mell has quit IRC[22:00:27] <IseeIsee> if a class implements the Serializable Interface[22:00:37] <IseeIsee> and there are object encapsulated in that class[22:00:46] <IseeIsee> do we need to implement Serializable for those objects too ?[22:00:57] <cheeser> those objects must be serializable.[22:01:07] *** wms has quit IRC[22:01:09] <cheeser> or marked transient[22:01:56] <IseeIsee> ahan[22:02:30] <IseeIsee> those objects must be serializable means that those objects should also have implemented the Serializable Interface[22:02:37] *** ocx32 has joined ##java[22:02:53] <IseeIsee> is it true that an int[][] array would not be written using serializable ?[22:03:06] <ocx32> i am trying to create a listener between 2 classes, can someone assist me? i created an interfance so far but i dont see the concept clear[22:03:13] <ernimril> IseeIsee: primitives and arrays are serializable[22:03:25] <ernimril> IseeIsee: array content may or may not be serializable[22:03:56] <ocx32> actually i have 2 frames, i want to create a listener on frame1 so that when i click on some buttons in frame1, the output is displayed in frame 2[22:04:09] <cheeser> javabot: tell ocx32 about events[22:04:09] <javabot> ocx32, events is http://java.sun.com/docs/books/tutorial/uiswing/events/index.html[22:04:42] <ocx32> cheeser: i know how to implement that but only within one class, in my scenario i want to have 2 frames communicate with each others[22:05:06] <IseeIsee> primitives are serializable by default ?[22:05:28] *** ciaron has joined ##java[22:05:41] <ocx32> so in the actionperformed of button1 in frame 1 what should i put in order to send the trigger to frame2[22:05:53] <Lars_G> pr3d4t0r: Just found this, think you might find it usefull one day: http://www.collaboration-world.com/cgi-bin/project/index.cgi?pid=3/[22:05:58] <ocx32> i was thinking about implementing an interfnace[22:07:28] <ocx32> any idea? cheeser[22:07:28] *** tommy_h has joined ##java[22:09:06] *** Wufei|school is now known as Chang_Wufei[22:10:48] *** chaitat has quit IRC[22:11:58] <IseeIsee> primitives are serializable by default ?[22:12:08] <cheeser> in the method called by the listener, you update frame2[22:12:12] <cheeser> IseeIsee: yes.[22:12:17] <cheeser> javabot: tell IseeIsee about serialization[22:12:17] <javabot> IseeIsee, see http://java.sun.com/docs/books/tutorial/essential/io/serialization.html and http://www.antwerkz.com/antwerkz/articles/serialization/index.jsp[22:12:56] <ocx32> cheeser: can u please explain to me the concept?[22:13:50] <ocx32> i am really confused, i am seeing an example in which frame 1 implements an interfance ListenerTest() and frame 2 calls that listener in the actionperformed[22:14:00] <ocx32> i didnt understand the concept[22:14:38] <Lars_G> ocx32: Basically, implementing an interface, means you will provide the methods required by that interface's design.[22:14:41] <ocx32> frame 2 is creating an instance of the interface and calling the method[22:14:52] <ocx32> but method is only defined, no body[22:15:09] <Lars_G> ocx32: You do not apply an interface to use it yourself (normally) but to let classes who use these interface methods know you can handle them, and serve theyr calls.[22:15:14] <IseeIsee> ocx32: you may not get clear understanding of interface by reading 2 or 3 lines here, you'll need to go through a tutorial[22:15:30] *** javageek has joined ##java[22:15:35] <javageek> greetings, bytecodes!(tm)[22:15:37] <Lars_G> ocx32: You're free to implement an empty method, though it's most normally bad code.[22:15:47] <Lars_G> javageek: Were you called? I was just saying I was worried about you[22:15:51] <cheeser> javabot: tell ocx32 aobut interfaces[22:15:51] <javabot> The syntax is: tell nick about factoid - you missed out the 'about', cheeser[22:15:57] <cheeser> javabot: tell ocx32 about interfaces[22:15:57] <javabot> ocx32, interfaces is http://java.sun.com/docs/books/tutorial/java/interpack/createinterface.html[22:16:04] <cheeser> i cna't tpye todya[22:16:10] <Stork> lols[22:16:11] <Lars_G> cheeser: I ese[22:16:22] <javageek> cheeser: tell me something new :)[22:16:23] <HelloWorld82> so, I have an other problem now ... (This one is a little bit easy, but My Java is still not good enought, so ... I hope someone gently will help me :) )[22:16:23] <Lars_G> cheeser: Was that a macro too?[22:16:39] <Lars_G> mmmmm tea[22:16:49] <Lars_G> ricky_clarkson: You brought tea back to me, thank you so much[22:17:20] <ernimril> HelloWorld82: ask your question and find out if anyone want to help you[22:17:35] <HelloWorld82> I have a JPanel, in which I allows several pluggins to draw. From a combobox, I can select which pluggins will draw now. For example : First, I select plugginA, and plugginA draws. Then I select Plugginb, PlugginA stops drawing, and PlugginB draws .[22:17:36] *** npmccallum-work has quit IRC[22:18:07] <HelloWorld82> and alle pluggins are also Subtypes of JPanel[22:18:19] <HelloWorld82> I implemented it as follow, but it doesn't work :[22:18:34] <HelloWorld82> ViewerPanel.remove(plugginA);[22:18:34] <HelloWorld82> ViewerPanel.add(plugginB);[22:18:46] <HelloWorld82> yes ... I think, I made something bad :)[22:19:17] <ocx32> http://pastebin.com/404463[22:19:24] <HelloWorld82> Then I select an other pluggins some part of the main panel (The viewer Panel) are not visible anymore.[22:19:31] <ocx32> the thing i am not understanding in the file4[22:19:52] <ocx32> whats the use of setListener([22:19:57] *** Mot has quit IRC[22:21:35] <cheeser> javabot: tell HelloWorld82 about jpf[22:21:36] <javabot> HelloWorld82, jpf is the java plugin framework. It aims to simplify plugin based systems and can be found at http://jpf.sourceforge.net/.[22:23:03] <ulver> jpf is very cool[22:23:18] <ocx32> <cheeser> can you please take a look at http://pastebin.com/404463 and tell me whats the use of setListener( in file4? i read the tutorial and i understood the concept but still i am confused by that example[22:23:20] <HelloWorld82> sorry, I cannot swith to jpf now. It's to late, I have to finish my project at the end of the week[22:24:04] <Lars_G> Hmmm jpf sounds interesting[22:24:19] <HelloWorld82> and ... its not my problem. loading pluggins, with the name and class of the pluggin stored in a property file works nice (I will investigate jpf later) . My problem is a swing problem I believe[22:24:23] <FaeLLe> yea it does[22:26:30] *** Tubbi3 has joined ##java[22:27:18] *** MrPrimate has joined ##java[22:27:40] *** Tubbi3 has quit IRC[22:28:19] <IseeIsee> I think BufferedImage does not implements the Serializable Interface ?[22:28:40] *** Tubbi3 has joined ##java[22:29:05] <cheeser> IseeIsee: rtfm and see[22:29:41] <IseeIsee> rtfm ?[22:29:44] *** ulver has quit IRC[22:29:49] <HelloWorld82> haha :)[22:29:50] <littlezoper> ~rtfm[22:29:50] <javabot> littlezoper, rtfm is Read The Fine/Fucking Manual[22:30:26] <IseeIsee> well I've tried write it and check the docs too[22:30:33] <IseeIsee> it does'nt seems like it does[22:30:38] <IseeIsee> thats why I'm confirming here ?[22:30:44] <IseeIsee> may be I'm doing something wrong[22:31:08] *** talin has joined ##java[22:31:32] <cheeser> reading the javadocs makes it clear whether or not it implements that interface[22:31:34] *** bov has quit IRC[22:31:58] <Mc_Fly> How do I create a tone of a specific Frequency in an array?[22:32:04] <IseeIsee> then how would I write BufferedImages to file[22:32:08] <IseeIsee> I've used them all in my application[22:32:25] <cheeser> just write the image data.[22:32:32] <ernimril> IseeIsee: ImageIO.write ?[22:33:28] *** mheath has joined ##java[22:33:34] <talin> if i do: Process p = new Process(); is there a way to take that p as an argument to a method and then retrieve the instance's name inside the method? because now, i have initProcess(Process p, String name) ... and then i have to call initProcess(proc0, proc0);[22:34:15] *** sloshytiger has joined ##java[22:34:56] <talin> ehm, initProcess(proc0, "proc0") actually[22:35:10] *** sloshytiger has left ##java[22:38:40] *** Mot has joined ##java[22:39:15] *** Kane_Hart has quit IRC[22:42:21] *** shingoki has joined ##java[22:42:21] *** Stork has quit IRC[22:43:11] *** Stork has joined ##java[22:43:37] <Stork> does anyone know of any simple file encryption/decryption examples written in java?[22:43:52] <mohadib> Stork: rot13 :p[22:44:03] <Stork> doesn't work for files though, does it?[22:44:14] <Stork> i've got a rot13 algorithm for strings[22:44:23] <jcscoobyrs> Stork: Look up "Java AES" on google and you'll find a Sun Developer Network doc. It's simple.[22:44:33] <Stork> alright, i'll try that[22:44:46] <vinse> jcscoobyrs: you did that wrong[22:45:13] *** shad0wcat has quit IRC[22:45:15] <vinse> jcscoobyrs: you're supposed to look up the link yourself, and then lambast the person who asked by saying "first result from google"[22:45:18] <vinse> or something like that[22:45:24] <jcscoobyrs> lol[22:45:31] <vinse> it's ok[22:45:33] <vinse> next time[22:45:55] *** zdogde has joined ##java[22:46:16] <Stork> ideally i wanted to write my own[22:46:31] <vinse> wouldnt everyone ideally?[22:46:33] <jcscoobyrs> Your own encryption algorithm?[22:46:49] *** joered has quit IRC[22:46:56] <Stork> not algorithm, but code[22:47:00] <jcscoobyrs> Oh.[22:47:05] <jcscoobyrs> The code is so simple you'll laugh.[22:47:20] <Stork> my idea is thus: a fileinputstream & and a fileoutputstream[22:47:27] <jcscoobyrs> You'll see that you'll follow basically the same approach regardless of algorithm or need.[22:47:31] <jcscoobyrs> Easy.[22:47:34] <Stork> then while reading the bytes, offset them by (byte)x[22:47:34] <jcscoobyrs> It's in the document.[22:48:07] <IseeIsee> I want to disable the close button on a JFrame[22:48:09] <IseeIsee> how to do it[22:48:23] <hashman> IseeIsee, did you read what I put?[22:48:27] <IseeIsee> I've tried the setDefaultCloseBehaviour() it does not works[22:48:54] <IseeIsee> I've tried the setDefaultCloseOperation() it does not works[22:48:59] <hashman> hashman IseeIsee, http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JFrame.html#setDefaultCloseOperation(int)[22:49:42] <IseeIsee> yes I read it from this link[22:50:24] <IseeIsee> this function is not about disabling the close button, its about what to do on when close button is clicked[22:51:12] <mohadib> IseeIsee: you cant iirc[22:51:23] <IseeIsee> iirc ?[22:51:25] <mohadib> set the frame undecorated[22:51:42] <mohadib> ~iirc[22:51:42] <javabot> mohadib, iirc is If I Recall Correctly[22:53:14] <Stork> how do i change a byte?[22:53:29] <Stork> if i wanted to add a value to a byte :\[22:53:32] *** javageek is now known as JavaGeek[22:53:36] <IseeIsee> mohadib, but I still wan't to move the window[22:53:45] <IseeIsee> this function has simple made the window static[22:54:08] *** Lars_G has left ##java[22:54:44] <mohadib> IseeIsee: why do you not want the user to close the window?[22:54:51] <mohadib> not close[22:55:25] <mohadib> you can add a window listener to open a new one :p[22:55:32] *** ulver has joined ##java[22:55:49] <hashman> IseeIsee, I think that the best solution is to use setDefaultCloseOperation, the button is still there ok, but it's totally useless[22:55:52] <ulver> wella all![22:56:00] <Stork> anyone :\ ?[22:56:07] <nmx> yes, wella everyone![22:56:29] <ulver> :D[22:57:02] <mohadib> yes , listen to hashman frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);[22:57:05] <mohadib> works ^[22:57:22] *** agnul has quit IRC[22:57:23] *** The_Vulture has quit IRC[22:57:28] <Stork> mohadib do you have any idea?[22:57:37] <mohadib> how to change a byte?[22:57:56] <mohadib> give me an example of what you are trying to do[22:58:05] <Stork> if i wanted to "add" a value to a byte[22:58:26] <cheeser> you want to add two numbers that are bytes?[22:58:57] <Stork> my goal is to make an EncryptedFileInput/OutputStream[22:59:23] <Stork> my idea was to get every byte and offset it by (byte)x[22:59:37] <Stork> essentially, one time padding[22:59:48] <vinse> that's not encryption[22:59:58] <vinse> well, maybe technically[22:59:59] <Stork> it's not?[23:00:30] <IseeIsee> I have about 5 classes[23:00:34] *** Jax has joined ##java[23:00:36] <Jax> hi[23:00:42] <hashman> IseeIsee, maybe you will have more chances if you use a Frame by SWT[23:00:48] <IseeIsee> and each of the classes have different objects and swing components in it[23:00:57] <Stork> vinse: how not?[23:01:07] <IseeIsee> hashman: I figured that out, thankyou very much[23:01:07] <mohadib> byte b = 4; b++ Stork[23:01:13] <Stork> it's that simple?[23:01:16] <Jax> hey guys... i know C++, and some scripting languages... can anybody give me a primer on Java? will be writing something in Java soon and need to get familiar with it[23:01:27] <Jax> (a link that is, not a primer here ;)[23:01:29] <Stork> so if i had a byte array, i could do byte[1] += 8; ?[23:01:32] <mohadib> ~tell javabot about tij[23:01:32] <javabot> javabot, tij is http://www.mindview.net/Books/TIJ/[23:01:35] <Jax> thanks[23:01:38] <mohadib> np[23:01:43] <vinse> Stork: well, technically it is, but when i think of encryption i think of strong encryption ... your scheme is weak[23:01:54] <IseeIsee> now neither of my classes has a BufferredImage data member, but when I write the main class which has all the other classes encapsulated in it, I get an expcetion that bufferredimage not serializable[23:02:02] <mohadib> it's like the secret decoder ring that comes in ceral boxes[23:02:20] <hashman> Jax, read the java tutorial by sun[23:02:23] <IseeIsee> I'm using bufferedImage in the methods of the classes but non of my data member has a BufferedImage[23:02:29] * cheeser reminds mohadib to drink his ovaltine.[23:02:36] <IseeIsee> what can be the problem ?[23:02:41] <hashman> Jax, and if you have used C++, I think you will have no so much problems when trying to learn java[23:02:55] <Jax> ok, that's good news[23:03:02] <mohadib> cheeser: HAHAHHA , i swear i was just thinking about that[23:03:05] <mohadib> javabot: cheeser++[23:03:06] <javabot> cheeser has a karma level of 150, mohadib[23:03:13] <cheeser> 8^)=[23:03:14] *** franl has quit IRC[23:03:19] * mohadib is as pissed as Ralphy[23:03:42] <Stork> how is it weak?[23:03:42] <Stork> if i use a different byte for each offset, and have a long key...[23:04:00] <hashman> Jax, think that you will have no destructors, every class extends of Object, you will have simple extends, not multiple[23:04:10] <hashman> ...[23:04:43] <mohadib> and interfaces[23:04:45] <mohadib> yaya[23:04:54] <mohadib> and forget about pass by refrence[23:05:08] * mohadib waits for the flame war[23:05:27] <IseeIsee> please read my Question above, I'm dying to get its solution[23:06:42] <Jax> ok, so an interface is basically the span of methods of an object?[23:07:20] <mohadib> ~tell Jax about interfaces[23:07:21] <javabot> Jax, interfaces is http://java.sun.com/docs/books/tutorial/java/interpack/createinterface.html[23:07:53] <Jax> so yes[23:07:58] <hashman> Jax, remember, you can use an interface as a type[23:08:07] <hashman> this is the power of the interfaces[23:08:09] * Jax ponders that statement for a moment[23:08:29] <Jax> so the object will inherit all the methods of that interface?[23:08:44] <hashman> Jax, implement[23:08:48] <hashman> not inherit[23:08:50] <mohadib> interfaces give you something akin to multiple inherityance and they assist with polymorphisim[23:08:50] <Jax> ah yes[23:08:54] <Jax> Java terminology ;)[23:09:09] <Jax> i'll just have to hack away a bit..[23:09:09] <hashman> Jax, an interface gives your object a way of how it must work[23:09:17] <Jax> interesting concept.[23:09:42] <Jax> i.e you can define an array of methods (an interface), and have multiple objects implement these[23:09:47] <mohadib> Jax: i see it as a way to meet a contract with out forcing an unatural relationship[23:11:04] <hashman> Jax, you can have an interface that will tell your object how to obtaint the number of objects, how to obtaint the first object, the last object...[23:11:15] <hashman> this interface will be implemented by a Vector and a List[23:11:37] <hashman> both Vector and List will have that methods, but the implementation will be totally different[23:11:38] <hashman> BUT[23:12:03] <hashman> we can make a method, in where we can send a type that it's the interface itselft[23:12:10] <hashman> and we can send there both the Vector and the List[23:12:17] <hashman> cause the interfaces can be used as types[23:12:26] *** ExtremeCode has quit IRC[23:12:37] *** Tubbi3 has quit IRC[23:12:43] *** Tubbi3 has joined ##java[23:13:00] <hashman> Jax, in fact, JDBC are mostly a group of interfaces that defiles how JDBC will work[23:13:21] <hashman> each company implements it at their own way[23:13:24] <Jax> hm[23:13:28] <Jax> what's JDBC[23:13:35] <hashman> Java Data Base Connectivity[23:13:35] <Jax> java database controller ?[23:13:37] <Jax> ah ok[23:13:52] <ernimril> ~jdbc[23:13:52] <javabot> ernimril, jdbc is Java DataBase Connection, the standard java API for communicating with databases using embedded SQL commands. See http://java.sun.com/tutorial/jdbc[23:14:08] <hashman> this will allow the people to only learn how JDBC works, despite the Oracle or Postgresql implementation[23:14:15] <Jax> ok let me try to understand that interface bit[23:14:18] *** Amnesiac has joined ##java[23:14:38] <Jax> you said "you can have an interface that will tell your object, how to obtain the number of objects..."[23:15:08] <hashman> Jax, IMHO interfaces and generics are very very powerfull and one of the best and powerfull tools of java[23:15:10] <Jax> you mean you have a parent object, and you are initializing child objects of this parent object, via the interface?[23:16:00] <ocx32> can i have an interfANCE instance in the argument of a method?!!?!!?![23:16:03] <hashman> Jax, there is no parent and childrens with interfaces, you just implements interfaces[23:16:05] <ocx32> interface[23:16:56] <ernimril> ocx32: "public void someMethod(SomeInterface sif) {...}" yes that is valid[23:17:03] <shingoki> ocx32, an interface is a type, use it where you have any type[23:17:29] <shingoki> there's a certain argument that any parameter of a method should ALWAYS be an interface[23:17:42] <shingoki> except where Sun have already mucked it up for you by having no interface[23:17:53] <shingoki> or primitives, obviously :)[23:18:18] <hashman> shingoki ocx32, an interface is a type, use it where you have any type <= this is the power of interfaces, they can be used as types[23:18:43] <ocx32> but[23:19:03] <ocx32> the problem is how can i create an instance of an interface to call that method?[23:19:20] <shingoki> ocx32, you create an instance of something that implements the interface[23:19:44] <shingoki> "class A implements B" means that an instance of A can be used as a parameter of type B[23:19:50] <hashman> ocx32, you don't need to create an instance[23:19:58] *** gungnir has quit IRC[23:20:18] <hashman> ocx32, this is, you don't need to do new MyInterface()[23:20:20] *** csrmit has quit IRC[23:20:23] <hashman> moreover, interfaces has no constructors[23:20:29] <hashman> and you cannot do the code I wrote[23:20:53] *** elirips has joined ##java[23:21:06] *** manulite has quit IRC[23:21:09] <mohadib> you can put enums in interfaces[23:21:15] * mohadib thinks that is cool[23:21:20] *** manulite has joined ##java[23:21:21] <ocx32> http://pastebin.com/404463[23:21:24] <ocx32> can you please at this code[23:21:32] <ocx32> in file 4 i am really confused[23:21:33] *** rogue-kun{B}|Awa is now known as rogue-kun{B}[23:21:38] <ocx32> hoe can i use setListener[23:21:55] * mohadib slaps his hoes[23:22:02] <elirips> hello. can someone give me a hint how to do that in an easy was: i have an array like int[9][9], and i would like to split it up into 9 different arrays, each in the form int[3][3], representing 3x3-boxes of the original array.[23:22:40] <FaeLLe> use the enhanced for loop and store each one into a big 1d array and then split them into a 3x3 ?[23:23:55] <elirips> FaeLLe: i just thought that that looks somehow "nasty".. maybe there is a "nicer" way?[23:25:31] <ocx32> ok guys its woring[23:25:31] <FaeLLe> put them into a collections list then like a List then split it[23:25:32] <ocx32> thank u[23:25:44] <ocx32> new concept introduced... the interface in the arguments[23:25:45] <ocx32> i like it[23:26:00] <ernimril> ~tell ocx32 about aolbonics[23:26:00] <javabot> ocx32, aolbonics is talking using numbers, or using single letters for you, are, you are, you're, etc. Examples are: Hey evry1; howz it goin?; how r u; ur teh suckz. Talking like this is frowned upon in ##java, and may result in you being silenced. See this for more detail: http://ars.userfriendly.org/cartoons/?id=20041201[23:26:14] <mohadib> ~irc HY ernimril[23:26:14] <javabot> jaja HY ernimril lol[23:26:19] <mohadib> ;)[23:26:25] <talin> i have an instance of a DataInputStream... how can i check the amount of lines in it? because want to put each line in a String[]... so i need to know how big i have to make the string after i've read the file[23:26:30] <veleno> thx everyone[23:26:33] *** veleno has quit IRC[23:26:40] <elirips> FaeLLe: thanks, i'll have a look at it.[23:26:48] <mohadib> talin: you cant tell iirc[23:26:57] <talin> mohadib: ah, hmmm[23:27:00] <ernimril> talin: you can not, read the lines and put them in an List[23:27:09] <talin> ernimril: ah, okay.[23:27:09] <mohadib> talin: use a buffered reader if you like[23:27:10] <talin> thanks[23:27:17] <talin> mohadib: i am using a buffered reader[23:27:31] <talin> mohadib: but i need to store each line in an array[23:27:39] <mohadib> well , as ernimril said , use a list , it can grow[23:27:57] <mohadib> then to can make it an array later[23:27:58] <talin> ah, what kind of list do you recommend? i haven't used collections a lot[23:28:05] <cheeser> ArrayList[23:28:06] <mohadib> ArrayList[23:28:10] <talin> okay, thanks[23:28:12] <rogue-kun{B}> talin: and even if you really must move it into an array, List has a toArray fuction 8)[23:28:12] <Stork> hey guys, what's the best way to read a (small) file into a byte[] ?[23:28:13] <Amnesiac> hey mohadib, cheeser[23:28:13] <mohadib> ~tell talin about collections[23:28:13] <javabot> talin, collections is http://java.sun.com/tutorial/collections[23:28:17] *** ocx32 has quit IRC[23:28:20] <talin> ah, great[23:28:25] <mohadib> Stork: FileReader[23:28:31] <Stork> cool, thanks[23:28:57] <FaeLLe> talin: good luck :) its pretty simple tbh[23:28:57] <mohadib> jhowdy Amnesiac :)[23:29:04] <cheeser> hey Amnesiac[23:29:09] <mohadib> FaeLLe: tbh?[23:29:12] <Amnesiac> at work, eating some "borrachitos"[23:29:20] <cheeser> Stork: ByteArrayOutputStream[23:29:28] <FaeLLe> mohadib: to be honest[23:29:32] <mohadib> ahh[23:29:33] <mohadib> ty[23:29:40] <cheeser> ty?[23:29:41] <cheeser> 8^)=[23:29:43] <mohadib> heh[23:29:44] <FaeLLe> anytime mate :)[23:30:01] <rogue-kun{B}> cheeser ty = thank you[23:30:01] <Stork> cheeser: i said to read a small file :\[23:30:05] <shingoki> ArrayList might not be best for reading lines[23:30:13] <shingoki> but it probably doesn't really matter :)[23:30:16] <Amnesiac> Stork, what's wrong with BAOS to read small files?[23:30:24] <Stork> it's an outputstream :\[23:30:29] <shingoki> heh heh[23:30:43] <mohadib> Stork: lol[23:30:43] <Amnesiac> well to read just change the Out part to In[23:30:49] <Stork> fair enough[23:30:53] <Amnesiac> :/[23:31:49] *** Tubbi3 has quit IRC[23:31:59] * rogue-kun{B} ponders if ther is any Output clases with out a matching Input class in java[23:32:29] <cheeser> javabot: tell rogue-kun{B} about sarcasm[23:32:29] <javabot> rogue-kun{B}, I have *no* idea what sarcasm is. I've *never* heard of it, because *I'm* just a stupid bot, aren't I.[23:32:37] <Stork> what should i use as the buffer :|[23:32:48] <mohadib> Stork: its that or arrayCopy[23:32:51] <cheeser> Amnesiac: no.[23:32:58] <mohadib> or you can get the length of the file and make a huge array[23:32:59] <cheeser> Stork: read from file, output to BAOS[23:33:08] <cheeser> when you're done, call toByteArray()[23:33:10] <Stork> how do i read from file :o[23:33:15] <mohadib> lol[23:33:18] <cheeser> javabot: tell Stork about io[23:33:18] <javabot> Stork, io is http://java.sun.com/tutorial/essential/io[23:33:19] <mohadib> Stork:GOOGLE[23:33:34] <Stork> BAIS ?[23:33:54] <Amnesiac> heh[23:34:03] <Stork> i know, i'm a noob[23:34:34] <mohadib> ~ridicule Stork[23:34:35] * javabot points at Stork and laughs.[23:34:37] <mohadib> ;)[23:34:42] * Stork dies[23:34:57] * mohadib watches slava give Stork ass to mouth[23:35:20] <Stork> hmm[23:35:39] <Stork> the number of bytes i'd be reading is file.length(), right ?[23:35:45] <mohadib> yes[23:35:48] <mohadib> but read()[23:35:55] <Stork> read() ?[23:35:56] <mohadib> is flakey ime[23:36:13] <mohadib> it does not quarante to read all at one time[23:36:23] <mohadib> thats why read() returns the number it actually read[23:36:31] <mohadib> cause you cant depend on it[23:36:37] <Stork> so, which class would you recommend[23:36:40] <shingoki> that's one way of putting it[23:36:43] *** tezem has joined ##java[23:36:51] <shingoki> its fairly standard for read and write methods to work that way[23:36:52] <mohadib> shingoki: how would you put it?[23:36:56] <Stork> at the moment, methinks fileinputstream ? except what you said about the read method..[23:37:21] *** ulver has quit IRC[23:37:41] * mohadib hates his job this week[23:38:07] <tezem> anybody here who can say me the proper java regex for removing html tags? I have "<.*?>" but this doesn't remove tags which go over more than one line.[23:38:25] * rogue-kun{B} gives mohadib a garfield I hate mondays sign[23:38:36] <ernimril> tezem: it is still better to use a html parser[23:38:44] <tezem> ernimril: ;-)[23:39:05] <ernimril> tezem: do you use Pattern and Matcher or do you use String?[23:39:20] <tezem> ernimril: Is a parser in the Java Standard API?[23:39:24] <talin> hmm, i'm trying to use a Queue and it says "cannot find symbol".. i import java.util.* and i'm using 5.0[23:39:26] <Clackwell> ~htmlparser[23:39:26] <javabot> Clackwell, htmlparser is http://htmlparser.sf.net - it parses HTML.[23:39:27] <tezem> ernimril: String[23:39:38] <Clackwell> HTMLPARSER HTML Parsers (possibly handling dirty HTML): http://httpunit.sourceforge.net/ http://jwebunit.sourceforge.net/ http://htmlparser.sourceforge.net/[23:39:54] <ernimril> tezem: I told you some time ago to use Pattern and Matcher if you use the regexp method[23:39:55] <mohadib> Clackwell: hmmm dirty ay ... like from a cx or xxx domain?[23:40:14] <Clackwell> mohadib: why, looking for ways to extract those images?[23:40:26] <Clackwell> in fact - that would rock. :)[23:40:43] <Stork> mohadib: is this right: http://rafb.net/paste/results/cqWlmn42.html[23:41:14] <mohadib> Stork: not exactly[23:41:19] <Stork> oh[23:41:27] <Clackwell> Stork: http://javafaq.mine.nu/lookup?70[23:41:54] <mohadib> Stork: use while() and look for -1[23:42:00] <Stork> alright[23:42:09] <Stork> but still use the read() method?[23:42:09] <mohadib> and use the return from read() to know how much to write[23:42:20] <Drone> That URL gave the following error code: 404 Object Not Found[23:42:31] <Stork> what?[23:42:48] <mohadib> Stork: yep while((i = read(array , offset , len) != -1)[23:43:04] <cheeser> or just rtflink that Clackwell posted[23:43:06] <mohadib> the write i amount of bytes to BAOS[23:43:11] <mohadib> yes[23:43:18] <mohadib> ~tell me about spoonfedding[23:43:18] <tezem> ernimril: but if I would use the Pattern and the Matcher I still don't know the proper pattern or do you mean that it doesn't work because it's a string regex?[23:43:19] <javabot> mohadib, I have no idea what spoonfedding is.[23:43:26] <mohadib> ;)[23:43:26] <cheeser> javabot: tell mohadib about typing[23:43:27] <javabot> mohadib, typing is smotheing i dno't konw how to do porprley[23:43:29] <cheeser> 8^)=[23:43:38] <mohadib> :([23:43:42] <mohadib> ;)[23:43:50] *** manulite has quit IRC[23:43:57] * Amnesiac yawns[23:44:25] <mohadib> Amnesiac: you forgot to pay me that five bucks i loaned you![23:45:02] <talin> Queue<String> data = new ArrayList<String>(); gives me a bunch of "cannot find symbol"[23:45:11] <talin> i have imported java.utils.*;[23:45:42] <cheeser> talin: don't use * imports.[23:45:46] <cheeser> and it's java.util[23:45:56] <cheeser> the compiler told you java.utils.* doesn't exist.[23:46:00] <cheeser> just read the compiler errors.[23:46:06] <Amnesiac> mohadib, which ones? :O[23:46:20] *** joev has quit IRC[23:46:27] <talin> cheeser: ah, ehm. i had java.io.*;[23:46:27] <mohadib> Amnesiac: i would never take advantage of a guy with a memory propblem[23:46:33] * talin hangs his head in shame[23:46:37] <Amnesiac> hahahaha[23:46:40] <mohadib> Amnesiac: you ever see Momento?[23:46:42] *** hashman has quit IRC[23:46:44] <Amnesiac> yep, good movie[23:46:50] <Amnesiac> isn't it Memento?[23:46:51] <cheeser> talin: if you don't use * imports you won't have problems like that.[23:46:56] <cheeser> Amnesiac: yes[23:46:58] <Stork> thanks mohadib[23:47:00] <mohadib> Amnesiac: yes :) i like the guy who rented him two hotel romms :p[23:47:02] <Stork> you're too good to me[23:47:03] <mohadib> rooms[23:47:13] <mohadib> Amnesiac: icant spell :p[23:47:22] <mohadib> Stork: ;)[23:47:26] <Amnesiac> well, my english is fucking bad, but ah well, I can live :P[23:47:26] <Stork> <3[23:47:46] <vinse> mohadib: wasnt that the same guy who played ralphie on the sopranos?[23:47:47] <mohadib> Amnesiac: it's my first language and i still suck at it[23:47:54] *** tag has quit IRC[23:48:06] <vinse> mohadib: and um, the traitor guy in matrix[23:48:09] <mohadib> vinse: not sure , i ripped it from a David Lynch movie[23:48:24] <mohadib> vinse: what are you talking about[23:48:33] <vinse> memento[23:48:33] <mohadib> it's monday , my brain is still in netural[23:48:37] <mohadib> ahh[23:48:44] <mohadib> vinse: yep he was in the matrix too[23:49:02] <vinse> and he was ralphie ciferetto (sp?) on the sopranos[23:49:16] <vinse> the one who bought the horse and was sleeping with tony's sister[23:49:21] <mohadib> lol[23:49:25] <littlezoper> joe pantoliano?[23:49:27] <mohadib> i dunno , i dont have a tv[23:49:32] <vinse> littlezoper: yes![23:49:33] <mohadib> javabot: littlezoper++[23:49:35] <javabot> littlezoper has a karma level of 21, mohadib[23:49:36] <littlezoper> hehe[23:49:47] <vinse> mohadib: i dont watch tv, but sopranos is on dvd[23:49:52] <mohadib> nice[23:49:56] <vinse> it's well worth it imo[23:50:16] <mohadib> vinse: i had one , but my neighboor/friend would come over and watch cops on it all the time[23:50:19] <mohadib> so i got rid of it[23:50:26] <vinse> lol[23:50:28] <mohadib> i *HATE* the cops tv show[23:50:35] *** paulweb515_ has joined ##java[23:51:02] <mohadib> for that matter.... i could have left off "tv show"[23:51:07] *** jor has quit IRC[23:51:08] <mohadib> but thats for another channel :p[23:52:45] *** OleMoudi has quit IRC[23:58:28] *** Jax has quit IRC