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


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:00:31] *** gregor_k has quit IRC
[00:00:43] *** gregor_k has joined ##java
[00:01:01] *** JordanG has left ##java
[00:01:19] *** marvi has quit IRC
[00:01:38] <_josh> benJIman: how do I initialize the comparator to POS.prob?
[00:03:01] <reverend> you implement it.
[00:03:49] *** JordanG has joined ##java
[00:04:10] *** casmo has quit IRC
[00:04:17] *** nor3 has quit IRC
[00:04:44] *** dvayanu has quit IRC
[00:05:41] *** J0bk has quit IRC
[00:06:13] *** epoxy has joined ##java
[00:06:16] *** amz has joined ##java
[00:09:10] *** Tasyne has joined ##java
[00:09:15] <epoxy> can someone point me towards a method i can use to view a PPM on a component? I just realized the ImageIO doesnt like it
[00:09:24] *** FireSlash has quit IRC
[00:10:03] *** jex_ has quit IRC
[00:10:53] *** vonZeppelin has quit IRC
[00:12:19] *** phyburn has quit IRC
[00:12:23] <stringCheese> how would you pass a collections array list to a method?
[00:12:39] <benJIman> stringCheese: I'm not sure what you mean, can you give an example?
[00:12:47] *** twolf has quit IRC
[00:13:39] <stringCheese> basically i have an arraylist populated with elements
[00:13:48] <stringCheese> and i want to pass that array list to another method
[00:14:10] <benJIman> public void foo(List<Something> list) ?
[00:14:27] <stringCheese> hmm
[00:14:28] *** nmatrix9 has quit IRC
[00:14:50] <Tasyne> I'm trying to convert chars to some kind of KeyEvent constant (for an app involving the Robot class, to mimic keyboard input) the JavaDocs imply that KeyEvent.VK_A thru VK_Z correspond to their typical ascii values, but my robot.keyPress(char...) just ends up printing... numbers, and I think it might also be holding down the ctrl-key, because it does some crazy stuff before printing those numbers
[00:15:13] *** pilkarn has joined ##java
[00:15:18] <pilkarn> is there a Java binding to R?
[00:15:53] <Tasyne> umm, VK_R ?
[00:16:23] <Tasyne> (no clue)
[00:16:26] <AMcBain> R is a programming language.
[00:17:45] <freeone3000> What isn't.
[00:18:18] <AMcBain> pilkarn: I'd search Google (honestly) because I'm going to guess that most here wouldn't be able to point you in a good direction, and because 1 character factoids are still broken in Javabot, so we can't ask him.
[00:18:19] <AMcBain> ~R
[00:18:52] *** tilerendering has quit IRC
[00:20:38] *** delskorch has quit IRC
[00:21:32] *** svm_invictvs has quit IRC
[00:22:17] *** riotz has quit IRC
[00:23:02] <Tasyne> so... is there no way to get from a char to some kind of KeyEvent value equivalent?
[00:23:43] *** zophy has quit IRC
[00:24:19] *** buntfalke has quit IRC
[00:24:23] *** Badas has joined ##java
[00:24:44] *** dk_schrute has joined ##java
[00:24:48] <woogley> well, most KeyEvent codes are just the ascii value of the upper case char
[00:24:54] *** BlackHound has joined ##java
[00:24:57] <woogley> e.g., ascii of A is 65, KeyEvent.VK_A is also 65
[00:26:08] <Tasyne> right, but something must be different
[00:26:15] <Tasyne> when I have robot.keyPress(KeyEvent.VK_N); it prints an 'n'
[00:26:22] <Nebulam> What's wrong with JTextField txt; .... method(){construct JFrame and add txt;} anotherMethod(){String s = txt.getText();} ?
[00:26:33] <Tasyne> but when I use robot.keyPress((n's ascii value)); it doesn't...
[00:27:06] *** tamgo has joined ##java
[00:27:22] <Tasyne> well, actually
[00:27:30] <Tasyne> it works if I just supply an int
[00:27:39] <woogley> ..
[00:27:49] <Tasyne> such as an ascii value. It -doesn't- work, when I give it a char, or even a typecasted char (int)char
[00:27:55] <woogley> robot.keyPress((char)'N') should be printing a capital N
[00:27:56] <tamgo> When invoking Enum.valueOf(Class, String) I am getting an error due to a bound mismatch of generic type. Is there any way to do the same thing (runtime inference of enum value)?
[00:28:00] <woogley> if its not, have robot press shift first
[00:29:38] <BlackHound> can I ask you guys a non-Java question?
[00:29:38] <Nebulam> These java runtime errors are exactly 0 help: such as fireActionPerformed(Uknown Source) if you don't know the source how are you firing the event lol
[00:30:29] <woogley> source, in that context, is the java source code with debug info
[00:30:36] <woogley> not the source of the event
[00:30:42] <Nebulam> ok
[00:31:04] *** dmlloyd has joined ##java
[00:31:14] *** Badas has quit IRC
[00:33:15] <r0bby> Nebulam: they're useful
[00:33:25] <r0bby> just look for the first place in your code where the error occured.
[00:33:32] <r0bby> places where it references your code
[00:33:46] <Nebulam> I'm getting a null pointer exception, but i know my ArrayList is not null because I just created it.
[00:33:56] <r0bby> oh
[00:33:57] <r0bby> diuh
[00:34:02] <r0bby> instantiate the JtextField
[00:34:11] <Nebulam> I did
[00:34:24] *** UK-sHaDoW has quit IRC
[00:34:28] <r0bby> did you do JTextField ... = new JTextField
[00:34:30] <Nebulam> I only call that 2nd method if the textfield and frame have been created
[00:34:33] <Nebulam> yes
[00:34:34] <r0bby> or txt = new JTextField()
[00:34:45] <r0bby> if you did the first... then you just left your field null.
[00:34:57] *** Bonix has joined ##java
[00:35:01] <r0bby> the 2nd is what you should do
[00:35:24] <Nebulam> no in my second method i call txt.getText()
[00:35:28] <Nebulam> the textfield is already created
[00:35:32] *** gregor_k has quit IRC
[00:35:33] <r0bby> Nebulam: are you sure?
[00:35:41] <Nebulam> let me paste the code
[00:35:47] *** tamgo has quit IRC
[00:36:02] <r0bby> JtextField txt; // declares -- it does not create the instance.
[00:36:12] <Nebulam> txtName = new JTextField(50);
[00:36:20] <r0bby> okay.
[00:36:25] *** TranceControl has quit IRC
[00:36:29] <r0bby> what line is it pointing to?
[00:36:43] <Nebulam> let me have a look hold on.
[00:36:49] <r0bby> ~npe
[00:36:50] <javabot> NullPointerExceptions are easy to spot and deal with. For some tips on dealing with them, please see http://is.gd/ha7A
[00:36:55] <r0bby> read that
[00:37:00] <Nebulam> yes just as i thought. the line when i add to my arraylist
[00:37:02] <r0bby> but i'll continue to help you
[00:37:05] <Nebulam> which is not null
[00:37:06] *** EdSquareCat has joined ##java
[00:37:07] <r0bby> ah
[00:37:15] <dk_schrute> ~ping
[00:37:16] <javabot> pong. Pong. PONG Already! What do you people want?! What will it take to finally get some peace and quiet around here!?!
[00:37:17] <r0bby> are you sure the ArrayList isn't shadowed?
[00:37:17] <dk_schrute> hm
[00:37:22] *** dk_schrute is now known as svm_invictvs
[00:37:31] <Nebulam> Yes
[00:37:48] <r0bby> pastebin a test case
[00:37:52] <r0bby> ~~ Nebulam test case
[00:37:52] <javabot> Provide complete, compilable Java source code for a SINGLE class that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)
[00:38:02] <r0bby> or your code
[00:38:05] <Nebulam> alright hold on
[00:38:16] <r0bby> which is causing the problem -- no snippets please
[00:39:20] *** phix has quit IRC
[00:40:39] *** kane77 has quit IRC
[00:41:36] <Tarantulafudge> reisi: hey sorry I missed your message, you still there?
[00:41:57] <Nebulam> alright http://pastebin.com/m5cd7f2ca
[00:43:10] <Nebulam> getting the exception at line 86 when trying to add to customers
[00:43:26] *** blankthemuffin has joined ##java
[00:43:53] <Tasyne> woogley robot.keyPress((char)'N'); works like you said, but it doesn't want to work when I supply a value from a char array, robot.keyPress(cArray[i]); instead, it hits a button corresponding to F5 or F3 (etc)
[00:44:19] <cher> I don't see a "customers = " initializing that field.
[00:44:22] <Tasyne> and nothing but lowercase ascii values are in the array...
[00:44:29] <woogley> i assume you mean robot.keyPress((int)cArray[i])
[00:44:42] <Nebulam> i pass customers as local variable arrayList
[00:45:05] <Tasyne> no... I haven't tried that code.
[00:45:22] <Tasyne> Why would passing a char value from an array be any different from passing one not in an array?
[00:45:33] <woogley> ((char)'N') <- what is the point of that?
[00:45:36] <cher> Nebulam: Java deals with references but physically is by value. customers never is assigned. When you pass customers, you pass null. Then you assign to auto variable arrayList, but never to customers.
[00:45:39] <woogley> 'N' is already a char :P
[00:45:44] *** lvh has quit IRC
[00:45:46] *** Zvpun has left ##java
[00:45:50] <Nebulam> wild..
[00:45:54] <Nebulam> alright thanks for your help
[00:46:48] <r0bby> Nebulam: instantiate it in your field
[00:46:52] <r0bby> ~~ Nebulam pbv
[00:46:53] <javabot> Java only supports pass by value, *NOT* pass by reference. (References to objects are passed by value). For more information please see the following link: http://javachannel.net/wiki/pmwiki.php/FAQ/PassingVariables
[00:47:00] <Tasyne> woogley: yes, but I'm getting desperate here, I don't see why it isn't working, so I was trying everything :P
[00:47:09] <Nebulam> Yes I understand now
[00:47:18] * r0bby hugs Nebulam
[00:47:20] <r0bby> g'luck :)
[00:47:28] <Nebulam> i didn't know java didn't support passing by refrence for objects
[00:47:33] <Nebulam> that's much different than c#
[00:47:50] <woogley> robot's keyPress only allows for ints to be passed as parameters
[00:48:03] <Nebulam> Thanks a lot!
[00:48:04] <woogley> so if you're going to bother casting anything, cast to (int)
[00:48:13] <benJIman> Nebulam: Not that you need it.
[00:48:20] <Tasyne> robot.keyPress((int)cArray[i]); gives the same output (it seems like it's pressing F3/F5)
[00:48:34] <Tasyne> might it be ecause cArray[i] is all lowercase chars?
[00:48:39] <woogley> yes
[00:48:39] <benJIman> Nebulam: And c# ends up with people returning values through parameters and returning a status code 1970s style. Because "exceptions are slow" in .net
[00:48:40] <woogley> it is
[00:49:01] <woogley> (int)Charcter.toUpperCase(cArray[i]) <- great success
[00:49:10] <woogley> Character*
[00:49:24] *** ries has quit IRC
[00:49:36] <Tasyne> aha!
[00:49:42] <Tasyne> Thanks woogley, for the great success :D
[00:49:47] <Tasyne> it works now.
[00:49:50] <woogley> np Tasyne ;)
[00:50:04] *** LouisJB has quit IRC
[00:50:13] <stringCheese> what's the correct way of comparing string elements to see if they are duplicated between two array lists?
[00:50:15] <Tasyne> any idea why it only works with upper case letters?
[00:50:25] <stringCheese> duplicated==duplicate
[00:50:27] <woogley> like i said before, that is how the KeyEvent API is set up
[00:50:33] <woogley> VK_A = 65 = capital A
[00:50:35] *** _josh has quit IRC
[00:50:40] <woogley> impossible to have a constant with two values
[00:50:42] <woogley> so they picked upper case
[00:50:44] *** ries has joined ##java
[00:50:50] <Tasyne> hmm
[00:50:57] <Tasyne> thanks again :)
[00:50:59] <woogley> np
[00:51:00] *** timte has quit IRC
[00:51:14] *** flb has quit IRC
[00:51:26] <cher> Nebulam: Besides, in your code you compare Strings with "==". That is dangerous. It probably only works by luck for your code. == is not overloaded, it physically compares the reference values, so it checks for identity, not equality.
[00:51:47] *** fridim_ has quit IRC
[00:52:11] *** fridim_ has joined ##java
[00:52:46] <cher> Nebulam: It probably works in your case because both Strings are interned and such have the same reference value. But as long as you do not really know if that is the case, and in the case of actionCommand I wouldn't rely on that, you might refactor your code and then no longer have an interned String, I'd really rather use .equals().
[00:53:09] <r0bby> cher: String literals are interned, but don't always count on that
[00:53:14] *** LouisJB has joined ##java
[00:53:20] <r0bby> it's why people are advised to use .equals()
[00:53:26] *** dvayanu has joined ##java
[00:54:11] <reverend> you can go ahead and count o String literals being iterned, but it's not just 'advised' to use equals, it's how you compare the equality of two Strings (period)
[00:54:29] <cher> r0bby: Exactly that's what I meant. The constant is interned, but can he be sure that the String returned by getActionCommand() still is interned when he refactored the invocation of setActionCommand() to use a String which is not interned?
[00:56:17] * cher wonders why people still use actionCommand these days anyway...
[00:56:18] *** eduardopl has joined ##java
[00:56:27] <r0bby> I'd use anonymous classes for my event listeners
[00:56:33] *** Yustme has quit IRC
[00:57:27] <r0bby> reverend: what i meant is: String str= new String("hey"); String str = "hey"; how do you know which was used if you don't see the code?
[00:57:45] <cher> I woudln't use anonymous classes. For a large app I've saved ~15 MB memory consumption by replacing anonymous classes with ReflectionAction from JAPI.
[00:57:45] <r0bby> but yeh .equals() ise used to compare equality of two strngs yeh :)
[00:57:46] <reverend> you do't, but "hey" is always interned
[00:57:55] <Nebulam> back.. Yes I know about == comparing the objects but I found out late and it works. This code is just for class anyway.
[00:57:58] *** firen has quit IRC
[00:58:02] *** eidolon has joined ##java
[00:58:10] <reverend> Nebulam: it does't work
[00:58:16] <reverend> it appears to
[00:58:35] *** firen has joined ##java
[00:58:37] <Nebulam> It does work becuase In these cases only 1 object ever has that same value
[00:58:44] <Nebulam> I understand that won't always be true
[00:58:48] <Nebulam> but it is here
[00:58:58] <cher> == does not work for comparing objects. == checks for identity (same, not equals). == is identity, equals() is equality, compare() is comparison.
[00:59:19] <monestri> what's the problem?
[00:59:28] <cher> "x" == new String("x") is false, not true.
[00:59:48] <Nebulam> but "x" == "x" is true :)
[00:59:57] <bobbytek2> typically, wouldn't the jvm produce true for that?
[01:00:01] <reverend> no.
[01:00:09] *** robin_sz has joined ##java
[01:00:22] <bobbytek2> I thought it cached cetain string constants
[01:00:41] <Nebulam> It does, there is only one object for any given string value in most cases
[01:00:47] <reverend> it interns all String constants
[01:00:47] <Nebulam> that's why it doesn't matter for me in this case
[01:00:53] *** mixster has joined ##java
[01:01:03] <bobbytek2> so why is "x" == new String("x") is false
[01:01:07] <cher> Nebulam: How do you know that getActionCommand() returns your String? That's not within the contract of getActionCommand(), that's programming by coincidence. getActionCommand() might return new String(actionCommand) and still would behave correctly regarding its contract.
[01:01:19] <robin_sz> Hi, im trying to use keytool and jarsigner on debian etch, keytool seems to use the gkr style of keystore .. jarsigner doesnt seem to recognise it .. any clues?
[01:01:20] <reverend> because new String("x") isn't a literal, it's a new object.
[01:01:28] <monestri> because one is a literal and one is an object
[01:01:32] <bobbytek2> oh, gotcha
[01:01:48] <bobbytek2> I thought string literals were purely syntactical
[01:01:49] <Nebulam> Cher thank you. I understand. But as I said this isn't production code and coming from c# i didn't know that when I wrote most of it.
[01:01:55] <Nebulam> And it works for me here
[01:02:29] * robin_sz sighs
[01:02:32] <monestri> Nebulam, that's great, we heard you the last 3 times.
[01:02:37] <reverend> it's wonderful that it appears to work, but it's still absolutely wrong.
[01:02:40] <Nebulam> Yes but he keeps saying the same thing
[01:02:41] <cher> Nebulam: It works fine until you update your JDK and the new version of getActionCommand() doesn't remove the identical String, just an equal String. Will you then still remember what's the problem?
[01:02:48] *** AhtiK has quit IRC
[01:02:52] <reverend> and expect any clued up professor to agree with us
[01:02:54] *** morkar-- has quit IRC
[01:03:00] *** twolf has joined ##java
[01:03:04] <Nebulam> ok
[01:03:15] <cher> s/remove/return/
[01:03:43] *** Bonix has quit IRC
[01:03:51] *** BlackHound has quit IRC
[01:04:12] <svm_invictvs> hm
[01:04:19] <svm_invictvs> Who has ever been fired...
[01:04:27] *** lollan has quit IRC
[01:04:38] <Nebulam> not me, but I haven't work in 3 years does that count :)
[01:04:45] <Nebulam> 'worked
[01:04:51] <svm_invictvs> Is it okay to ask to have somebody erase any/all personal information off of your former workstation before you leave an employer?
[01:05:05] <svm_invictvs> (eg, if you have a personal email password or something stored on the computer)
[01:05:07] <r0bby> i guess
[01:05:12] <r0bby> yeh
[01:05:12] <svm_invictvs> (SSH keys, personal passwords)
[01:05:16] <r0bby> I wouldn't save passwords
[01:05:17] <reverend> you can ask but you're not entitled to it
[01:05:32] <reverend> you shouldn't have put non-work related things on there in the first place
[01:05:42] <svm_invictvs> Yeah.
[01:06:04] <cher> I think it depends on the it policy. If you were allowed to user your workstation for personal usage, you should be allowed to request your personal information being erased. If you weren't allowed to use your workstation for personal usage...
[01:06:20] *** vijay_ has joined ##java
[01:06:24] <svm_invictvs> However, even if they didn't let you erase it. They could still face consequences if they misued anything left behind.
[01:06:24] *** pilkarn has left ##java
[01:06:44] <reverend> of course
[01:06:46] <r0bby> if they got caught
[01:07:06] <r0bby1> Usually I backup everything on a regular basis on usb and never use personal stuff at work(keyloggers, etc.)
[01:07:10] <r0bby> okay
[01:07:24] <cher> Oh yes, I agree with that. Whether or not you were allowed to store personal information is irrelevant for the fact that personal information must be protected, treated accordingly and not be misused.
[01:07:25] <r0bby> disclaimer here: r0bby1 is mr_ank
[01:07:26] <svm_invictvs> cher: I think you make a good point. If policy doesn't forbid personal use.
[01:07:31] *** teralaser has quit IRC
[01:07:39] <r0bby> ank: change your nick back please?
[01:07:48] *** r0bby1 is now known as The_Birdman
[01:07:54] <The_Birdman> :-)
[01:07:54] <r0bby> or birdy
[01:07:57] <r0bby> one of them
[01:08:11] <r0bby> not sure why you'd wanna be me anyways
[01:08:17] <r0bby> how's it goin
[01:08:18] <svm_invictvs> It's also not beyond the realm of possiblity to use personal resources for work related things.
[01:08:24] <The_Birdman> I didn't even talk sex, so I'm probably not mr_ank
[01:08:26] <svm_invictvs> (eg, if you have to send a test email to yourself)
[01:08:32] <r0bby> heh true
[01:08:34] <r0bby> ank is a perv
[01:08:40] <r0bby> this is ##java -- not jerky
[01:08:58] <svm_invictvs> heh
[01:09:05] <r0bby> svm_invictvs: do not ask
[01:09:20] <reverend> svm_invictvs: even if your workplace allows 'personal use', it's unlikely that it gives you any rights to what is essentially your employer's property after they've terminated your employment
[01:09:31] <bobbytek2> r0bby: you seem grumpier than usual today
[01:09:39] <bobbytek2> Why so glum chum?
[01:09:48] <r0bby> bobbytek2: i'm not grumpy
[01:09:52] <r0bby> I like mr_ank and The_Birdman
[01:09:55] *** ycy has quit IRC
[01:10:07] <r0bby> I speak to them on a regular basis
[01:10:09] *** teralaser has joined ##java
[01:10:29] <r0bby> bobbytek2: I'm happy today, wanna fight?
[01:10:36] <bobbytek2> yes!
[01:10:40] <bobbytek2> lets get it on son!
[01:10:41] <r0bby> hot.
[01:10:49] *** genesiss has quit IRC
[01:11:08] <svm_invictvs> reverend: true. But, you dont' have to erase it. The company can provide a staff member to erase it.
[01:11:29] <svm_invictvs> I mean, most workplaces completely wipe a workstation clean once soembody leaves anyhow.
[01:11:30] <reverend> doubtful they'd be compelled to do that
[01:11:51] <r0bby> svm_invictvs: I'd create new ssh keys and change passwords
[01:11:52] <svm_invictvs> Lat place they sent a guy to do just that.
[01:12:10] <svm_invictvs> He was like, "Is tehre anything you want me to clean off your computer."
[01:13:14] <reverend> you seem to get fired a lot
[01:13:20] *** smoog has quit IRC
[01:13:25] <svm_invictvs> I was laid off the last time.
[01:13:27] *** Vantaa has quit IRC
[01:13:50] *** smoog has joined ##java
[01:15:03] <bobbytek2> is there a site where one can run java code snippets?
[01:15:09] <bobbytek2> interactively
[01:15:28] <svm_invictvs> I wrote a bot to do it, but then he quit working.
[01:16:00] <bobbytek2> the closest thing I could find is http://www.beanshell.org/jbshdemo.html
[01:17:06] *** epoxy has quit IRC
[01:18:06] *** blankthemuffin has quit IRC
[01:18:29] *** blankthemuffin has joined ##java
[01:18:47] *** ankylose has quit IRC
[01:19:11] <r0bby> bobbytek2: just download beanshell
[01:19:57] <bobbytek2> print("x" == new String("x")); produces false, yay!
[01:21:01] <r0bby> yes.
[01:21:11] <r0bby> you just proved something that is well known
[01:21:31] <r0bby> "x" == new String("x").intern(); // true
[01:22:02] <bobbytek2> yep :)
[01:22:14] <cher> String a, b; a.equals(b) --> a.intern() == b.intern();
[01:22:18] <woogley> http://codepad.org/ <- seemingly everything but java. hrm.
[01:22:40] <bobbytek2> wow, that's cool though
[01:22:43] <bobbytek2> c even
[01:22:46] <r0bby> cher: NPE
[01:22:52] <bobbytek2> wonder why no java
[01:23:14] <r0bby> cher: .equals() actually looks at the String char by char.
[01:23:39] *** mixster has left ##java
[01:24:11] <woogley> bobbytek2: there is 1 at javabat.com
[01:24:19] <woogley> its not meant for testing tho, but you could use it that way
[01:24:21] <r0bby> just use beanshell
[01:24:37] <r0bby> it's amazing for testing regexps
[01:24:39] <woogley> beanshell is great when you're at your own computer, sure
[01:24:40] <cher> r0bby: So what's wrong with my statement? I mean, if a == null then of course a. --> NPE. I've just omitted the == true which I always do for boolean exprs ;-)
[01:24:52] <r0bby> a and b are null :)
[01:24:53] *** KingBilly has joined ##java
[01:25:02] <r0bby> you de-reference them
[01:25:53] <cher> r0bby: If you are nit-picking by that, not guessing that between declaration and usage there must be some form of assignment, I nit-pick this: a and b are undefined because following your conclusion and assumption they are unassigned but auto-variables.
[01:26:04] <cher> ;-P
[01:26:41] <KingBilly> hey, i was wondering how do i go about compiling a java project?
[01:26:43] <r0bby> bah if you're gonna write examples write complete!
[01:26:50] <r0bby> ~~ KingBilly firstcup
[01:26:51] <javabot> KingBilly, firstcup is a beginner's tutorial for getting started with Java available at http://java.sun.com/tutorial/getStarted/cupojava
[01:27:33] *** blankthemuffin has quit IRC
[01:27:54] <cher> r0bby: I thought it was pretty obvious that above was just pseudo code. "String a, b" means a and b are both Strings. "x --> y" means statement y can be concluded if statement x is true. I thought it's not unusual to write like that ;-)
[01:28:15] <bobbytek2> wonder if I can do something malicious on codepad
[01:29:57] <KingBilly> thank you r0bby
[01:30:02] *** systat has quit IRC
[01:30:14] <KingBilly> although im using eclipse not netbeans :)
[01:30:25] <reverend> ~newbie ide
[01:30:25] <javabot> Newbies shouldn't start with IDEs. It's important to learn the environment and fundamentals of a language before offloading those to an IDE. Learn about packages and imports and classpaths. Learn how to compile and use the JDK tools. Get some basic grasp of the API layout. Learn how to do things then switch to an IDE to do them faster. See http://tinyurl.com/yvks48 and and http://tinyurl.com/2cpn6o for more info.
[01:30:41] *** blankthemuffin has joined ##java
[01:31:26] <r0bby> KingBilly: stop using the ide.
[01:31:33] <r0bby> you should know how to use the command line
[01:31:39] <KingBilly> :s
[01:31:43] <KingBilly> im pretty new to java
[01:31:45] <r0bby> so?
[01:31:53] <r0bby> All the more reason to learn the tools
[01:32:20] *** phyburn has joined ##java
[01:32:56] * cher thinks it's impossible to be a good java developer without knowing how to use the command line well enough to not just start required commands but also to automate things with tools like shell scripts, ant and maven.
[01:32:58] *** EdSquareCat has left ##java
[01:33:13] <Nebulam> So since Java doesn't pass by reference I refactored several methods to use enums to select the appropriate object to work with. Is that pretty common practice among java programmers?
[01:33:41] <cher> And it's gonna be damned hard to understand build problems which you face in the IDE if you do not know how Java actually works, and that you're only gonna learn if you invoke javac and java from the command line.
[01:34:47] <cher> Nebulam: If you put it like that, I'd say no, that's not a common practice among any oo language. Instead I'd use an interface and classes or resemble delegates with method objects.
[01:35:27] <Nebulam> ok
[01:36:38] <cher> Nebulam: But without knowing what exactly you want to "select" it's hard to give a really good advice.
[01:37:39] <benJIman> Nebulam: Can you give an example of what you're actually trying to achieve?
[01:38:04] <Tarantulafudge> reisi: you there? I'd really like to talk to you :)
[01:39:05] <Nebulam> i'm trying to achive inititializeMyObject(myObj); but I can't do that in java
[01:39:15] <Nebulam> Which I think is crazy, but don't get me started
[01:40:04] <benJIman> Nebulam: Why can't you do that?
[01:40:18] <Nebulam> Becauase I'm not returning the object.
[01:40:34] <benJIman> So?
[01:40:39] * squiddle thinks Nebulam has a crazy pass-by-copy Java
[01:40:41] <Nebulam> It's a class level variable but I want to return something else after it's initialized
[01:40:56] <Nebulam> And it's being passed by value
[01:41:00] <Nebulam> So it's a no god
[01:41:01] <Nebulam> go'
[01:41:08] <benJIman> The reference is passed by value.
[01:42:32] *** BigAllan has quit IRC
[01:43:01] <cher> Nebulam: I think you're trying too much procedural programming in an oo language like Java. There are two ways of having initializeMyObject(myObj) in Java: One is having myObj implement a method like initialize and then use myObj.initialiize(); The other is simply construct the variable outside initialize(): MyObj obj = new MyObj(); initialize(obj);
[01:43:02] *** meanburrito920_ has joined ##java
[01:43:51] <cher> Nebulam: A third possibility is: myObj = initializeMyObject();
[01:43:54] <Nebulam> I'm listening but Don't tell me what I wanted to do wasn't object oriented because it works fine if you can pass by referencec
[01:44:17] <benJIman> Nebulam: Can you give pseudocode for what you're trying to do? Because it sounds like what you're trying to do works fine.
[01:44:19] <cher> Nebulam: If you're that smart then why do you have this problem ;-P
[01:44:34] <Nebulam> Because I'm been programming in java for 5 weeks
[01:44:47] <benJIman> Nebulam: http://java.pastebin.com/m6210db77 <- It sounds to me like you're just trying to do that
[01:44:54] <Nebulam> let me take al ook
[01:44:55] <Nebulam> brb
[01:46:06] *** arpu has quit IRC
[01:46:20] *** Copter has quit IRC
[01:46:55] *** mele- has quit IRC
[01:46:59] *** dinguva has quit IRC
[01:47:00] <Nebulam> not exactly because I'm instantiting the object in the initialize method
[01:47:05] *** sanity has joined ##java
[01:47:40] <sanity> having some long GC times using UseConcMarkSweepGC, details here : http://budurl.com/d2hp - would appreciate any advice
[01:47:51] <cher> Nebulam: Then just return the object from the initialize method.
[01:47:51] <Gambaroni> How can I fix outofmemory exceptions in J2ME?
[01:48:02] <reverend> stop using all of your memory
[01:48:03] <Nebulam> I guess i'm going to have to
[01:48:04] <cher> Lol, consume less memory.
[01:48:25] <Gambaroni> But how do I find out what is using all the memory.
[01:49:10] <cher> Run the j2me app in the simulator and use a profiler (try java -X).
[01:49:11] *** ankylose has joined ##java
[01:49:28] *** DavidCraft has joined ##java
[01:49:58] <Gambaroni> I've checked the profiler and what I can see most of the memory is used for char[].
[01:50:16] <DavidCraft> in there a java package out there to parse out other source code?
[01:50:37] <cher> Gambaroni: Do many of these char[] have the same content? Or is it one single very large char[]?
[01:51:24] <benJIman> Nebulam: If you need to do that you can do http://java.pastebin.com/m498ca9e1
[01:51:31] <benJIman> But it sounds like you're probably designing it wrong :p
[01:52:21] <cher> Gambaroni: Remove all String constructors which construct Strings from Strings. No new String("..."). Replace consecutive String concatenations that use "+" with a single StringBuffer / StringBuilder (dunno if StringBuilder already is available in J2ME). If that's still not enough, try making smart use of String.intern().
[01:53:18] *** riotz has joined ##java
[01:54:19] *** Woflborg has quit IRC
[01:54:33] *** blankthemuffin has quit IRC
[01:54:49] *** blankthemuffin has joined ##java
[01:54:57] <cher> Gambaroni: Another good idea is to use a tool that finds poor coding style regarding memory consumption, like the inspections from IntelliJ IDEA, and have that find memory leaks and redundant objects.
[01:55:00] <Nebulam> benJIman I already pasted the code but if you want to look here it is
[01:55:03] <Nebulam> http://pastebin.com/m5cd7f2ca
[01:55:30] *** ankylose has quit IRC
[01:55:40] <Nebulam> Anwyay I'll just overload the method to return my ArrayList
[01:55:44] *** ankylose has joined ##java
[01:55:45] <Nebulam> it's not a big deal
[01:55:52] <benJIman> You can't overload by return type only.
[01:55:57] <Nebulam> yes i know
[01:56:08] <benJIman> Nebulam: Did you see my second example?
[01:56:18] <Nebulam> I glanced
[01:56:45] <benJIman> I don't see what you're trying to do in your example paste as it's not a very good testcase.
[01:57:01] <benJIman> Is it the initArray(customers) ?
[01:57:07] <Nebulam> yes
[01:57:18] <Nebulam> You see i just wanted to pass my ArrayList as a reference
[01:57:31] <Gambaroni> cher: how do I check if it's one or many chars?
[01:57:46] *** bhz- has joined ##java
[01:58:04] <benJIman> Nebulam: It looks to me like you need to rethink your design just by looking at the number of ifs and lines of code in your snippet.
[01:58:05] *** sidelil has quit IRC
[01:58:29] <Nebulam> noted
[01:58:30] <cher> Gambaroni: Well, have your profiler dump that information.
[01:58:36] *** FireSlash has joined ##java
[01:58:57] <benJIman> Nebulam: Also I think you're confused about the parameter passing.
[01:59:02] <benJIman> The /references/ are passed by value.
[01:59:09] <benJIman> The arraylist is not copied when passed to the method.
[01:59:13] <Nebulam> lol, that's what we have been talking about
[01:59:19] <Nebulam> I think you missed out somewhere
[01:59:39] *** blankthemuffin has quit IRC
[01:59:40] <Nebulam> That was the problem with this code snippet
[01:59:45] <benJIman> So your only real problem there is trying to construct it in the method.
[01:59:57] <Nebulam> right
[01:59:57] *** nmatrix9 has joined ##java
[02:00:02] <Gambaroni> cher: I use the profiler in the emulator
[02:00:04] *** blankthemuffin has joined ##java
[02:00:22] <cher> Gambaroni: I haven't used that, can't tell you how to dump information there.
[02:00:25] <benJIman> Nebulam: Also why is that method returning a string?
[02:00:33] <Nebulam> Because it's used elsewhere
[02:00:41] <benJIman> What does the string represent?
[02:00:43] <Nebulam> In the example I showed I ddin't need the return
[02:00:51] <benJIman> Generally functions return the result of their operation.
[02:00:57] <Nebulam> It's just going to be printed out in another method
[02:01:14] <Gambaroni> cher: does that optimizing program work good?
[02:01:21] <benJIman> Nebulam: I hope it's not a status code.
[02:01:23] *** zophy has joined ##java
[02:01:42] <Nebulam> it's not lol. If you look at it it says person.getName() person.getAddress() etc.
[02:01:47] <Nebulam> it's just a long string with all the info
[02:01:51] <benJIman> Oh dear.
[02:01:57] <Nebulam> that was the requirement
[02:02:06] <benJIman> Nebulam: Why don't you create an object that represents the data?
[02:02:14] <Nebulam> I have an object Person
[02:02:18] <Nebulam> did you even look at the code
[02:02:23] *** zophy has quit IRC
[02:02:26] <benJIman> I'm talking about initarray.
[02:02:29] <cher> Gambaroni: You mean IntelliJ IDEA? Well, it doesn't do the job for you, it just tells you where it thinks you have potential for optimizing your memory where that is easy to find out by static analysis.
[02:02:47] *** zophy has joined ##java
[02:03:33] <Nebulam> Look I have to get to work, I don't know what you mean if you aren't talking about just printing the string out. yes I know i just concatenated all the attributes into a string to be printed because that was the requirement
[02:03:43] *** zophy has quit IRC
[02:04:16] *** Rounin has left ##java
[02:04:26] <cher> I'd rather concatenate them in toString() if the object needs to be dumped.
[02:04:31] *** eyeris has joined ##java
[02:04:45] <freeone3000> I like how he's using == with objects.
[02:04:48] *** eyeris has left ##java
[02:04:49] <benJIman> Nebulam: The initArray method is doing two entirely unrelated tasks?
[02:05:00] <cher> Or even better have a separate method for returning a String representation if the String representation for the user differs from the String representation for the developer / debugging.
[02:05:02] <benJIman> cher: Hardly the biggest issue there
[02:05:06] <Gambaroni> cher: maybe worth a try
[02:05:19] *** zophy has joined ##java
[02:05:36] <cher> benJIman: We've been talking about some other issues already 1-2 hours ago, like the == comparison of Strings or the by value / by reference issues.
[02:06:07] <benJIman> cher: I was here then, forgot to look at the channel for a while.
[02:06:14] *** squiddle has quit IRC
[02:06:39] <Gambaroni> So tired that the emulator hangs ALL the time when using the profiler
[02:06:51] <cher> benJIman: I guess it is normal to not look at more than a few lines, np.
[02:07:04] <Gambaroni> That makes it impossible to debug and find out what's eating memory
[02:07:06] *** shadewind has quit IRC
[02:07:07] <cher> Gambaroni: Which emulator do you use?
[02:07:08] <benJIman> I'm in far too many channels.
[02:07:27] <Gambaroni> cher: wtk
[02:08:07] <svm_invictvs> The profiler will make the emulator hang...
[02:08:21] <Gambaroni> Why? =/
[02:08:28] <svm_invictvs> hm
[02:08:38] *** ankylose has quit IRC
[02:09:50] <cher> Gambaroni: wtk? I thought that's a simulator, not an emulator?
[02:10:04] <svm_invictvs> cher: no
[02:10:08] <svm_invictvs> cher: It's an emulator
[02:10:38] <svm_invictvs> It's actually the KVM reference implementation.
[02:11:12] <cher> Thinking about it, something that uses the same VM as the one that runs on a mobile, yes, must be an emulator, not a simulator.
[02:11:38] <Gambaroni> Hehe
[02:11:45] <Gambaroni> svm_invictvs: why shall it hang? =/
[02:11:52] <svm_invictvs> I dont' know. What's your problem?
[02:12:10] <Gambaroni> I get outofmemory exceptions
[02:12:15] <svm_invictvs> yeah...
[02:12:16] *** amz has quit IRC
[02:12:20] <svm_invictvs> That will happen with j2me
[02:12:28] *** amz has joined ##java
[02:12:37] *** codethief has quit IRC
[02:12:39] <svm_invictvs> What are you trying to do, and how much are you loading?
[02:13:05] <Gambaroni> A chatclient
[02:13:18] *** woogley has quit IRC
[02:13:18] <svm_invictvs> Shouldn't use too much memory...
[02:13:28] <Gambaroni> Not that much I would say, but I'm not used to j2me so actually don't know
[02:13:35] <Gambaroni> That's what I would say too
[02:13:56] <svm_invictvs> well, with j2me you've gotta be very judicious as to how you use memory.
[02:15:09] *** ankylose has joined ##java
[02:15:32] <Gambaroni> Ah.. But no idea why the emulator hangs when using the profiler? :P
[02:15:48] <svm_invictvs> I have no idea
[02:15:55] <svm_invictvs> Is it causing you problems?
[02:16:34] <Gambaroni> Yeah
[02:16:44] <Gambaroni> I cannot use the chatclient to login and so on
[02:17:03] <Gambaroni> And then I cannot find out what's using memory
[02:17:47] <svm_invictvs> How long does it hang?
[02:18:01] <Gambaroni> Forever
[02:18:06] <svm_invictvs> oh.
[02:18:08] <Gambaroni> Till I restart it.. :P
[02:18:12] <svm_invictvs> I see.
[02:19:35] <svm_invictvs> Is there a network setting you can enable/disable?
[02:19:44] <svm_invictvs> Do you open large images?
[02:19:50] <svm_invictvs> Or frequently use operator new?
[02:20:00] *** Daniel_H has quit IRC
[02:20:09] <Gambaroni> use new a lot yea
[02:20:13] *** ankylose has quit IRC
[02:20:13] <Gambaroni> open one image.
[02:20:21] <Gambaroni> I'll check the size
[02:20:26] <svm_invictvs> How often to you use new?
[02:20:53] <Gambaroni> Hm
[02:21:20] <Gambaroni> For example when using the hashtable, new Integer(int)
[02:21:25] *** Ven]n has quit IRC
[02:21:47] <svm_invictvs> How many entries are in the hash table?
[02:21:54] <nmatrix9> anyone know how to set the damn basePath in jsf jspx document?
[02:22:14] <Gambaroni> 1 right now
[02:22:17] *** CaptainMorgan has joined ##Java
[02:22:30] <Gambaroni> How many could it take?
[02:22:32] *** ankylose has joined ##java
[02:22:34] * r0bby kicks nmatrix9
[02:22:35] <r0bby> google
[02:22:56] <Gambaroni> svm_invictvs: image 11kB
[02:23:10] <nmatrix9> r0bby, never thought of doing that
[02:23:15] *** zophy has quit IRC
[02:23:15] * nmatrix9 kicks r0bby
[02:23:16] <r0bby> ~google set base path jsp
[02:23:16] <javabot> http://letmegooglethatforyou.com/?q=set+base+path+jsp
[02:23:22] <svm_invictvs> You opened up a 11k PNG image, how large is it?
[02:23:22] <r0bby> it gives you info
[02:23:33] <nmatrix9> jspx
[02:24:01] <eidolon> i love that site.
[02:24:05] <Gambaroni> svm_invictvs: 11,5kB jpg.
[02:24:13] <Gambaroni> 40x40 px
[02:24:43] <repnop> yeah that site is great
[02:24:54] <TheiPirate> is there a way in java to create a control flow graph?
[02:25:07] *** The_Birdman has quit IRC
[02:25:27] <svm_invictvs> Gambaroni: That doesnt' make sense
[02:25:35] <svm_invictvs> Gambaroni: Is that its size uncompressed?
[02:26:14] <Gambaroni> svm_invictvs: hm, how do I check its size uncompressed?
[02:26:14] <repnop> 11KB @ 40x40 pixel?
[02:26:23] <repnop> 8 byte per pixel or what ;)
[02:26:59] <svm_invictvs> There's no hard and fast rule, but most J2me implementations are usually WxHx4
[02:27:17] <repnop> yeah just saying uncompressed it'd only be 6KB
[02:27:21] <svm_invictvs> because they store the uncompressed image in an int[] array with ARGB values
[02:29:17] *** teralaser has quit IRC
[02:29:34] *** TooAngel has joined ##java
[02:29:59] *** nocture has quit IRC
[02:30:06] *** shadewind has joined ##java
[02:31:38] *** mele- has joined ##java
[02:32:07] *** pist0l-fish has joined ##java
[02:32:16] <Gambaroni> svm_invictvs: is just hangs almost every time :S
[02:33:01] <svm_invictvs> I really don't know.
[02:33:09] <svm_invictvs> WIthout really seeing your code.
[02:33:47] <pist0l-fish> hello all. I want to use String.split to split a string into an array according to whitespace, but not whitespace that occurs between two quotation marks. I can't think of a way of doing this with split; am I missing something?
[02:33:51] <Gambaroni> svm_invictvs: I could publish it ;D hehe
[02:34:21] *** Razec has joined ##java
[02:34:36] <svm_invictvs> pist0l-fish: String.Split takes a regular expression, no?
[02:34:39] <pstickne> pist0l-fish: there is no standard/easy way of doing this in Java, you could use Scanner
[02:34:56] *** malim_ has joined ##java
[02:34:57] <svm_invictvs> you could come up with a regex to do it, but I think that would be really tricky
[02:34:57] <pstickne> svm_invictvs: but this can not be done in a Java regexp
[02:35:08] <svm_invictvs> really?
[02:35:18] <Gambaroni> svm_invictvs: if you would like to :)
[02:35:24] <pstickne> pist0l-fish: or, a better option may be to google search for a "java shell parser" or something
[02:35:50] <pstickne> svm_invictvs: "foo" "bar\" world"
[02:36:13] <pstickne> svm_invictvs: granted, I added another complication :)
[02:36:15] <svm_invictvs> pstickne: Implementing a simple parser would not be diffult using a few Patterns and a Matcher.
[02:36:25] <pstickne> svm_invictvs: and using Scanner...
[02:36:38] <svm_invictvs> yeah
[02:36:54] *** orgy` has quit IRC
[02:37:10] <cher> I think it is possible with a regex that uses look-behind. Lemme try. That's a very interesting task.
[02:37:24] <pist0l-fish> what if I trim the string first and then use something like: [^\s']+\s[^\s']+
[02:37:30] <pstickne> cher: Java does not have such re's :-)
[02:38:13] <svm_invictvs> pist0l-fish: Give it a try
[02:38:31] <pstickne> cher: but perl re's are not regular and can handle situations like this
[02:38:33] <pist0l-fish> oh wait, haah
[02:38:38] <pist0l-fish> >_<
[02:38:44] <pstickne> pist0l-fish: it won't work.
[02:38:48] <pstickne> pist0l-fish: see Scanner
[02:38:51] <pist0l-fish> that was perhaps the most stupid thing I've said all day
[02:39:15] <pist0l-fish> pstickne: okay
[02:39:17] <svm_invictvs> pstickne, pist0l-fish: I dont' know enough about rexexp
[02:39:18] <cher> pstickne: Java has look-behind.
[02:39:43] <pstickne> cher: really? :( man, I must be out of it...
[02:39:50] <pstickne> *sigh*
[02:40:08] <malim_> Java regexps have positive and negative lookahead and lookbehind
[02:40:11] <svm_invictvs> I sort of feel like regexps can be misused and overused
[02:40:15] <cher> pstickne: http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html
[02:40:26] <pist0l-fish> ah well then i shall just use lookbehind! i guess we're all out of it, pstickne
[02:40:35] <pist0l-fish> ...except for everyone other than you and I :D
[02:40:50] <pstickne> malim_, cher: thanks for the correction
[02:41:05] <pstickne> pist0l-fish: it still won't work with String.split
[02:41:21] <pstickne> (I think)
[02:42:42] <pist0l-fish> i think (in plain english) it has to be: match a \s that is after 0 or 2 quotations
[02:42:46] <svm_invictvs> What's look behind?
[02:43:31] <pist0l-fish> svm_invictvs: matches a set of characters iff another set of characters occurs (or doesn't occur) before it
[02:43:36] *** IppatsuMan has quit IRC
[02:43:45] *** taraskostiak has joined ##java
[02:45:06] *** amz has quit IRC
[02:45:27] <cher> Gah look behind in Java doesn't like a*b*.
[02:45:54] *** cyzie has joined ##java
[02:46:01] <AMcBain> .replace(/,(?![^,])/g,", ").match(/(?:"[^"]*"|[^,]+)+|\s,/g); // this works for CSV data ... but you'll have to pad the beginning of a string with a space if the cell is empty.
[02:46:10] <AMcBain> (well, and convert the // to real Java regex)
[02:47:02] <AMcBain> (I post this because it could maybe be modified to help the current question)
[02:47:11] <pist0l-fish> thanks AMcBain
[02:47:50] <AMcBain> to make it java regex, you'll just have to make all " into \\" and replace the / with "
[02:47:54] *** christo_m has left ##java
[02:47:59] <cher> Because look behind in Java doesn't like a*b* I'm not able to come up with a solution that works with String.split().
[02:48:01] <AMcBain> (and remove the "g")
[02:48:05] *** [[thufir]] has joined ##java
[02:48:33] * whaley gouges eyes out
[02:48:47] * pr3d4t0r eyes AMcBain.
[02:48:47] <AMcBain> what, the regex?
[02:48:55] <svm_invictvs> hm...
[02:48:58] * pist0l-fish is also having trouble :(
[02:49:00] <pr3d4t0r> AMcBain: Using Java for something where awk would've made more sense?
[02:49:12] <pr3d4t0r> AMcBain: I had a classroom example of that yesterday :)
[02:49:12] <pist0l-fish> pr3d4t0r: precisely
[02:49:30] <AMcBain> er ... wait, the match won't quite work ... need a matcher instead :-/
[02:49:50] <AMcBain> gah, needs a bit more translation from JS->Java than I was quick to think of ...
[02:49:53] <AMcBain> :-/
[02:50:13] <pr3d4t0r> Overengineered and overcomplicated text operations: Use Java(tm).
[02:50:18] <pist0l-fish> i think it'll just be easiest if I scan through character by character...
[02:50:19] <svm_invictvs> heh
[02:50:29] *** Noya has quit IRC
[02:50:33] <pist0l-fish> with a boolean flag for being inside or outside quotations
[02:50:45] * pr3d4t0r ponders blogging about that early next week, and post the sample code.
[02:50:46] * pist0l-fish n00bs it ftw
[02:51:12] *** KingBilly has quit IRC
[02:51:51] <svm_invictvs> pr3d4t0r: Hey, what's up.
[02:53:02] *** meanburrito920_ has quit IRC
[02:53:38] *** arpu has joined ##java
[02:54:22] <svm_invictvs> So could you maybe tell me more about that game publisher you had mentioned earlier?
[02:54:38] *** rajesh has quit IRC
[02:57:57] *** eidolon has quit IRC
[02:58:57] *** eidolon has joined ##java
[03:00:24] *** LordMetroid has quit IRC
[03:00:48] <svm_invictvs> hm
[03:00:54] *** Serva has joined ##java
[03:01:28] *** EspenG has quit IRC
[03:01:35] *** dvayanu has quit IRC
[03:02:13] <Serva> Hi. I have installed apache 2.2 and tomcat 4.1 .. I am looking for a tutorial to configure mod_jk for them.
[03:02:34] <svm_invictvs> ~google configure mod_jk apache
[03:02:34] <javabot> http://letmegooglethatforyou.com/?q=configure+mod_jk+apache
[03:02:35] <r0bby> ~~ Serva google mod_jk apache
[03:02:35] <javabot> http://letmegooglethatforyou.com/?q=mod_jk+apache
[03:02:42] <svm_invictvs> lol r0bby
[03:02:48] <r0bby> learn how to google Serva
[03:02:51] * svm_invictvs high fives r0bby
[03:03:06] <r0bby> svm_invictvs: masochistic minds think alike O:-)
[03:03:38] <Serva> r0bby, not calling you a dick or whatever - all of the tutorials are there for apache 1.x ... and all of them are outdated
[03:04:24] <r0bby> http://tomcat.apache.org/connectors-doc
[03:04:25] <Serva> I have completed the config for tomcat .. but apache service is still not getting started
[03:04:28] <r0bby> that outdated too?
[03:04:45] <r0bby> perhaps you should ask in the right channel as this has ZILCH to do w/ java
[03:05:08] <Serva> r0bby, perhaps you could have said that in the first statement then!
[03:05:15] <svm_invictvs> Serva: perhaps it would be better if you had described your problem a little more than just, "How do I configure mod_jk"
[03:05:22] *** Niike has quit IRC
[03:05:30] *** Niike has joined ##java
[03:05:32] <r0bby> Serva: we did
[03:05:46] <r0bby> googling was a big hint -- but you'd be told the same thing in the other chans
[03:06:33] <Serva> svm_insvictvs: do you use mod_jk? I can explain what I have tried so far
[03:06:46] *** blbrown has joined ##java
[03:06:50] *** garotosopa has quit IRC
[03:07:14] <blbrown> with jfreechart, anyone know how to change the renderer. http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/ChartFactory.html For example, how to change a timeseries chart from XYLineRender to XYRenderer
[03:07:31] *** jbalint has quit IRC
[03:07:56] *** eduardopl has quit IRC
[03:09:16] <pist0l-fish> here is the n00b solution: http://pastebin.ca/1344083
[03:09:57] * AMcBain frowns upon the choice of pastebin.
[03:10:08] * pist0l-fish is sorry
[03:10:11] * pist0l-fish knows
[03:10:34] <pstickne> pastebin.* sites are so lame :-/
[03:11:32] <AMcBain> pastbin.stonekeep.com? :P
[03:11:47] <pist0l-fish> http://codepad.org/KHoTeox7
[03:11:53] *** blbrown has left ##java
[03:11:54] <pist0l-fish> bettrrr?
[03:12:09] <AMcBain> pstickne: pastebin[^.]*
[03:12:21] <AMcBain> err, I mean, pastebin.[^.]*
[03:12:36] <pstickne> meh :p
[03:12:36] <AMcBain> or rather ... damnit. I give in (forgot to escape the .)
[03:12:39] <r0bby> ~literal pastebin
[03:12:40] <javabot> <reply>(http://eugeneciurana.com/pastebin|http://rifers.org/paste|http://pastebin.stonekeep.com|http://www.papernapkin.org/pastebin) Paste the final url after you've pasted your stuff there.
[03:13:22] <AMcBain> there we go: pastebin\.[^.]+
[03:13:40] *** staykov has quit IRC
[03:14:12] <stringCheese> question, how would i check if i reached the end of an ArrayList?
[03:14:13] <pist0l-fish> what if I make a pastebin subdomain on my domain that points to pastebin.ca?
[03:14:25] <AMcBain> then we dislike you?
[03:14:30] * pist0l-fish cries
[03:15:27] <AMcBain> I actually tried writing my own pastebin once ... never quite finished it. I was doing it just for the idea/fun of it rather than for a largely practical pastebin (given that there are so many different pastebin scripts out there already)
[03:17:04] *** Serva has quit IRC
[03:17:07] *** FireSlash has quit IRC
[03:17:23] <pist0l-fish> AMcBain: you'd *have* to use someone else's syntax highlighter
[03:17:31] <pist0l-fish> otherwise you'd have yourself quite a bit of work
[03:18:11] <AMcBain> originally I wasn't going to have any. I don't really see a need for it. but, I think, I made a small provision to eventually detect GeSHi given a proper path to it.
[03:18:35] <pist0l-fish> okay cool
[03:18:56] <freeone3000> stringCheese: size() gets the length. the iterator returns false when you call .hasNext(). A foreach iterates over all elements, stopping when done.
[03:19:00] <pist0l-fish> you should upload your project to sourceforge or something. No use having your effort go to waste
[03:19:02] *** whaley has quit IRC
[03:19:11] <stringCheese> thanks
[03:20:02] <AMcBain> pist0l-fish: eh ... as I said, I never quite finished it, and there are already tons of pastebin scripts out there. no need for one more. plus, there are loads of people who'd raise a stink over the language I wrote it in (PHP outputting XHTML)
[03:20:04] *** epoxy has joined ##java
[03:20:05] *** DragonLord- has quit IRC
[03:20:20] <pist0l-fish> AMcBain: fair enough
[03:20:54] <AMcBain> I can link you to the bits I did finish, if you really care to look, though.
[03:21:12] <pist0l-fish> stringCheese: efficient implementation: int x = list.size() - 1; for(int i=0;i<x;i++) { doStuff(list.get(i)); } doStuff(list.get(x));
[03:21:19] <pist0l-fish> AMcBain: sure
[03:21:41] *** nmatrix9 has quit IRC
[03:21:43] <Tarantulafudge> reisi: hey!
[03:21:47] <pist0l-fish> stringCheese: of course your second doStuff method would be different if you explicitly wanted to check the last element
[03:22:03] *** doc`` has quit IRC
[03:22:18] * pist0l-fish might be wrong about this being efficient depending on how much optimization your compiler does
[03:24:38] <pist0l-fish> cool. nice markup other than the table in the form
[03:25:19] <AMcBain> I give on up forms, and usually use a table there. I'd rather not attempt to make CSS do what it can't to get them to line up.
[03:25:38] <pist0l-fish> haha yeah CSS eats goats sometimes
[03:26:00] <ezeki3l> what's the simplest way to find the size of an array?
[03:26:06] <pist0l-fish> array.length
[03:26:15] <ezeki3l> thanks
[03:26:17] <freeone3000> Fairly sure it's the fault of the browser. In opera and safari, everything works great and well.
[03:27:34] <pist0l-fish> wait i take that back, this is better: int i; try { for(i=0;;i++) { array[i]=array[i]; } } catch(IndexOutOfBoundsException e) { System.out.println(i); // found it! }
[03:27:52] *** GodTodd has joined ##java
[03:27:54] <pist0l-fish> freeone3000: it works perfectly, we were just talking about markup
[03:28:25] <AMcBain> CSS does what it is supposed to. It's just that everyone wants the "and then some" out of it.
[03:28:50] *** swans20 has quit IRC
[03:29:01] <pist0l-fish> yeah but i'd disagree. Element order is so key, but CSS doesn't provide anything to order elements (maybe css3 does, but I haven't looked into it)
[03:29:30] <freeone3000> You can do it with positioning. CSS3 adds :before and :after pseudoclasses.
[03:30:06] <AMcBain> damn. no wonder those never worked for me ... (I still use Fx2 on my main box :P)
[03:30:06] <pist0l-fish> freeone3000: awesome. Now to wait until IE supports it...
[03:30:09] <freeone3000> (To clarify, they allow for adding specific bits of *text content* (based on attributes of the tag, or a static string) before or after a class, respectively.)
[03:30:32] <pist0l-fish> freeone3000: oh wait no, that's not what I meant by element ordering
[03:30:50] *** ikarius has joined ##java
[03:31:07] <pist0l-fish> I meant if you had two <ul> elements and you wanted one to be displayed before the other, you just can't do it (without some messy positioning)
[03:31:40] <pist0l-fish> and negative margins count as messy positioning
[03:31:56] * AMcBain heads out to go do something before it gets too late.
[03:32:07] <ikarius> There's apparently something I simply don't get in java syntax
[03:32:09] <freeone3000> Kay. I'll dispute the 'messy', but it's hard to do right.
[03:32:13] *** Tarantulafudge has quit IRC
[03:32:24] <ikarius> I'm trying to initialize an array, then pull an arraylist view of it
[03:32:51] <pist0l-fish> ikarius: explain 'pull an arraylist view'
[03:33:01] <ikarius> .asList of an array
[03:33:08] <ikarius> String[ ] TmpArr = new String[ ] { "one", "two" };
[03:33:08] <ikarius> ArrayList MyArr = Arrays.asList( TmpArr );
[03:33:40] *** Ivellina has quit IRC
[03:33:44] <ikarius> comes back and tells me that an array is required, but an arraylist is found... and I'm completely mystified
[03:34:33] <ikarius> I've also tried TmpArr.asList()
[03:35:39] <benJIman> ikarius: You want "List<String> myArr = Arrays.asList( TmpArr);"
[03:36:25] <r0bby> ikarius: ALWAYS ALWAYS ALWAYS use List, Set, Map
[03:36:25] <ikarius> ben- I specifically want an arrayList form of the array. am I trying to use the wrong conversion method?
[03:36:36] <benJIman> ikarius: Or if you really want ArrayList "ArrayList<String> myArr = new ArrayList(Arrays.asList(TmpArr));
[03:36:50] <benJIman> Though usually you don't want ArrayList you want List.
[03:36:54] <ikarius> I see
[03:37:02] <benJIman> Unless you need to be able to .remove.
[03:37:08] <benJIman> The list Arrays.asList returns doesn't allow that iirc.
[03:37:10] *** pist0l-fish has quit IRC
[03:37:35] <r0bby> Arrays.asList is immutable.
[03:37:51] <benJIman> Yeah.
[03:38:03] *** Tarantulafudge has joined ##java
[03:38:19] <Tarantulafudge> reisi: did I miss anything? my irc client exploded..
[03:38:19] <ikarius> if I assign it into a new can I get a mutable version?
[03:38:32] <benJIman> new ArrayList(Arrays.asList(TmpArr)); yes
[03:39:01] <r0bby> ikarius: List<String> myList = new ArrayList<String>(Arrays.asList(new String[] { "one","two" }));
[03:39:04] *** psypointer has joined ##java
[03:39:05] <psypointer> hi
[03:39:28] <psypointer> i'm currently working under unix. System.getProperty("line.seperator") returns null instead of \n - is that a correct behaviour??!
[03:40:08] <_W_> yes
[03:40:20] <_W_> it tells you that there is no system property with the name "line.seperator" set
[03:40:20] <psypointer> why?
[03:40:29] <_W_> because there is no such property?
[03:40:29] <psypointer> yes, but shouldn't it be set?
[03:40:32] <_W_> no
[03:40:41] <_W_> where did you find a property with that spelling?
[03:40:58] *** ankylose has quit IRC
[03:41:08] <psypointer> api doc: "This set of system properties always includes values for the following keys: ..." "line.seperator Line seperator ("\n" on UNIX)"
[03:41:18] <_W_> (neatly illustrating why untyped key/value pairs are bad)
[03:41:26] <psypointer> http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html
[03:41:29] <_W_> psypointer, that's not what it says
[03:41:38] <_W_> you paraphrased, and in so doing, made an error
[03:41:54] <ikarius> ahh, thank you
[03:42:10] <ikarius> sorry, I'm used to C/C++ where I can tell what's a pointer and a reference
[03:42:11] <psypointer> _W_: i cant follow you :S
[03:42:41] <_W_> psypointer, what is the name of the property as the docs say?
[03:42:48] <psypointer> the line seperator on unix / linux is \n - and system.getProperties contains a key line.seperator which is null - and thats what i'm not understnading
[03:42:58] <psypointer> the api doc says that the key name is line.separator
[03:43:09] <_W_> and what was the name of the property you used?
[03:43:26] <psypointer> argh
[03:43:31] <psypointer> oh damn, i'm to tired
[03:43:35] <_W_> :p
[03:43:37] <psypointer> (shot a bug in the jdk about 3 hours)
[03:43:45] <psypointer> currently writing the junit test for the bugtracker..
[03:43:58] <_W_> that's hillarious
[03:44:07] <psypointer> thanks for the help _W_
[03:44:20] <_W_> happy to be of assistence :)
[03:44:24] <psypointer> ^^
[03:44:29] *** doc`` has joined ##java
[03:44:36] <psypointer> (it's almost 4 am here)
[03:44:48] <psypointer> started debugging yesterday 11:45 pm
[03:44:56] <psypointer> strange line separator on windows..
[03:49:21] *** meanburrito920_ has joined ##java
[03:50:01] *** fgmmgf has joined ##java
[03:50:47] *** CodeWar has joined ##java
[03:50:56] *** ankylose has joined ##java
[03:51:21] *** ankylose has quit IRC
[03:52:04] *** ankylose has joined ##java
[03:55:24] *** ankylose has quit IRC
[03:57:25] *** deca has joined ##java
[03:58:11] <freeone3000> You know, Wikipedia has a great article about that.
[03:59:27] *** shadewind has quit IRC
[03:59:33] *** deca has quit IRC
[04:00:30] *** gbv22 has joined ##java
[04:01:39] <_W_> about misspellings in code that compilers can't check for?
[04:01:58] <gbv22> I am trying to write a java program that can read the output from stdin in this manner 'cat filename | myjavaprogram'. Basically i want to pipe the output of somethign to my java program. it should then read each line and store it in a vector. any ideas how i can read in this way?
[04:02:03] <psypointer> _W_: hehe nope
[04:02:12] <psypointer> string escaping is broken in a swing component
[04:02:19] <psypointer> it converts \r\n to \r\r\n
[04:02:37] <_W_> (then again, I shouldn't glorify automated code checking too much - I am maintaining a program at work with a lot of methods ending in Choise
[04:03:01] *** grey has joined ##java
[04:03:10] <grey> java generics make me want to die.
[04:03:22] <_W_> ~~gbv22 javadoc System
[04:03:23] <javabot> gbv22: http://is.gd/iN33 [java.lang.System]
[04:03:51] <freeone3000> gbv22: Wrap System.in in some sort of reader, and then append each line to a vector.
[04:03:57] <_W_> ~~grey troll
[04:03:57] <javabot> Please go away.
[04:04:02] <grey> ;_;
[04:04:19] <_W_> freeone3000, please don't give horrible advice
[04:04:28] <grey> I'm trying to figure out how to phrase my question
[04:04:28] <freeone3000> He's the one who wanted a vector.
[04:04:42] <grey> but in the meantime, thought I would mention, that generics make me want to die.
[04:04:44] <_W_> that's no reason to give bad advice
[04:04:57] <_W_> grey, how useful
[04:04:59] *** cher has quit IRC
[04:05:43] <gbv22> _W_, freeone3000 : ok guys im confused. is there somethign blatantly wrong in reading from stdin that way?
[04:05:55] <_W_> gbv22, don't store piped input in an internal data structure, it defeats the purpose of piping
[04:06:11] <_W_> process it as you get it, and produce output as you go
[04:06:45] <psypointer> _W_: are you working on a windows platform?
[04:06:52] <gbv22> _W_: unfortunately what I am trying to do is sort the strings. so in order to do that i need all the lines before I can continue
[04:06:55] <_W_> also, when you do use data structures, don't use Vector
[04:07:00] *** woogley has joined ##java
[04:07:36] <_W_> gbv22, instead of doing cat filename | java yourprogram, do sort < filename
[04:08:31] <gbv22> _W_: I am required to implement something like 'sort' in java
[04:08:55] <psypointer> someone running a windows platform who can run my junit4 test?
[04:09:01] <psypointer> (which should fail on windows)
[04:09:03] <_W_> no you're not, there are plenty of tools that can do that already
[04:09:26] <_W_> psypointer, get an amazon ec2 account :p
[04:09:41] <ikarius> teriffic! my comparator function works... thanks for the syntax help- I was now able to actually test it :)
[04:09:44] <psypointer> never Oo
[04:09:57] <waz> ec2 rocks
[04:10:03] <_W_> well, then you wouldn't have to poll people on IRC for operating systems
[04:10:08] <psypointer> hm, i think i'll have to setup a virtual box :)
[04:10:13] <psypointer> hrhr
[04:10:20] *** ikarius has left ##java
[04:10:20] <psypointer> yeah sure, i'm really sorry ^^
[04:10:38] <_W_> virtualization is a solution as well of course
[04:10:48] *** Gevaudan82 has joined ##java
[04:11:05] <gbv22> _W_: I understand. This is for a project that I have to do so I cant use code/tools not written by me. Could you tell me what I should check for as the termination character for the stdin?
[04:11:26] <_W_> gbv22, but you don't have to do such projects
[04:11:27] <grey> ok here we go,
[04:11:37] <_W_> just use the sensible solution :)
[04:11:44] <Gevaudan82> Hello all...is there a common JDBC abstraction that all db drivers use to fetch resultsets? Is it safe to say that under the covers, Spring's JdbcTemplate and other abstractions use Sun's JDBC ResultSet class?
[04:11:45] *** _acid__ has quit IRC
[04:11:52] *** eyeris has joined ##java
[04:12:04] <_W_> ~why no homework
[04:12:04] <javabot> We don't answer homework questions because 1) Usually you don't comprehend the answer and we get stuck in an endless loop of 'why'. This is not a class. 2) If you do understand, often you'll retort with 'but my professor doesn't want me to do it this way'. This is completely irrelevant for us, and 3) homework questions are really boring questions. We don't get paid here. Your professor does.
[04:12:05] <waz> _W_: stop being an ass
[04:12:11] <eyeris> Is there a set of Java bindings for the OpenSSL API that is kept current?
[04:12:57] <eyeris> I don't need a socket class. I only need to check if a private key has a password.
[04:12:58] <gbv22> _W_: all I asked is how to read from stdin in a certain way. I have been looking for a while. I am not asking you to do my homework.
[04:13:25] <waz> ~~ eyeris google java openssl
[04:13:25] <javabot> http://letmegooglethatforyou.com/?q=java+openssl
[04:13:40] <_W_> gbv22, no, you didn't actually ask that. And I pointed you at System, which holds System.in, the input stream representing stdin or the piped input to the program
[04:13:45] <r0bby> Scanner BufferedReader both can do stdin.
[04:14:02] <ezeki3l> how can a build ArrayList<String> from a array of strings?
[04:14:03] <_W_> ~io
[04:14:03] <javabot> _W_, io is http://java.sun.com/tutorial/essential/io
[04:14:06] <r0bby> Scanner s = new Scanner(System.in); String str = s.nextLine();
[04:14:07] <gbv22> _W_: thanks
[04:14:08] <_W_> read that gbv22
[04:14:12] <r0bby> BAM
[04:14:18] <eyeris> waz I have. No current results on the first 3 pages.
[04:14:52] <_W_> Scanner is probably what he wants, but I prefer to lead him to water rather than put the hose in his mouth
[04:15:04] <r0bby> gbv22: take the code i gave you
[04:15:09] <r0bby> familiarize yourself w/
[04:15:12] <r0bby> ~javadoc Scanner
[04:15:14] <javabot> r0bby: http://is.gd/izIT [java.util.Scanner]
[04:15:15] <gbv22> r0bby: ok
[04:15:17] <r0bby> that.
[04:15:22] <r0bby> UNDERSTAND IT.
[04:15:39] <gbv22> r0bby: thanks. trying
[04:15:56] <r0bby> no trying, it works.
[04:16:00] <Gevaudan82> ezeki31: List<String> result = new ArrayList<String>(Arrays.asList(new String[] { "string1", "string2" }));
[04:16:10] <gbv22> r0bby: trying to understand it
[04:16:34] <ezeki3l> ah, thanks
[04:16:42] * AMcBain hand's r0bby some ice.
[04:16:44] <AMcBain> cool down
[04:16:56] * r0bby puts it down gbv22's pants
[04:17:05] <r0bby> more please?
[04:17:12] <AMcBain> This is only text, nothing to get terribly incensed over.
[04:17:26] <r0bby> AMcBain: need more ice, i accidentally dropped it
[04:17:32] <AMcBain> I've learned long ago, it's hard to get stabbed over the internet and bleed to death.
[04:17:43] <AMcBain> no, I know exactly where you put it ... you don't need any more.
[04:17:58] <r0bby> it dropped i swear!
[04:18:29] <_W_> knky
[04:18:46] * _W_ peers sideways at his keyboard
[04:18:53] <waz> ~interesting
[04:18:53] <javabot> this is all very interesting (not really) but please take it somewhere else.
[04:19:02] <AMcBain> I wish more forums were like Vanilla and made all new registered accounts wait until they are manually approved by a person.
[04:19:10] <r0bby> waz: you mean talk about where I did or didn't put the ice isn't interesting?
[04:19:22] *** waz sets mode: +b *!*@guifications/user/r0bby
[04:19:24] <AMcBain> forum software*
[04:19:34] *** Angel-SL has joined ##java
[04:19:47] <AMcBain> waz: nice ...
[04:19:48] *** waz sets mode: -b *!*@guifications/user/r0bby
[04:19:51] *** fridim_ has quit IRC
[04:20:01] *** The_Birdman has joined ##java
[04:20:03] * r0bby learned to not back talk..
[04:20:09] <r0bby> or act like a dolt
[04:20:18] <AMcBain> ? I dispute that last one
[04:20:21] * waz doubts it!
[04:20:30] <waz> ~ AMcBain++
[04:20:30] <javabot> amcbain has a karma level of 30, waz
[04:20:51] <The_Birdman> ~karma waz
[04:20:51] <javabot> waz has a karma level of 184, The_Birdman
[04:20:51] <r0bby> I think if i stopped acting like a dolt something would blow up
[04:20:57] <The_Birdman> ~waz--
[04:20:57] <javabot> waz has a karma level of 183, The_Birdman
[04:21:13] <waz> ?
[04:21:38] <The_Birdman> just for fun :-)
[04:21:57] <r0bby> careful cheeks
[04:22:16] *** The_Birdman was kicked by waz (just joining in the fun!)
[04:22:32] <r0bby> he's good people waz for the most part
[04:22:39] <r0bby> swing guru of sorts
[04:23:08] <waz> it was just a kick!
[04:23:10] <_W_> I just realized how ugly the character primitive really is, checking the Character methods, most of which revolve around the impedance between codepoints and characters
[04:23:12] *** eyeris has quit IRC
[04:23:34] <_W_> are there any plans for fixing it?
[04:24:34] *** nvictor has joined ##java
[04:25:02] <AMcBain> seems to me a Google of 'JSR, Character' returns people looking for Unicode Supplementary Support ... so considering that's probably not quite what you mean, then I'd say no, not really.
[04:25:16] *** DavidCraft has quit IRC
[04:25:20] <nvictor> hello all
[04:25:22] <nvictor> anyone online?
[04:25:23] <AMcBain> hi
[04:25:24] <nvictor> ah ok
[04:25:26] <nvictor> I'm having trouble with java runtime env
[04:25:31] <r0bby> ok?
[04:25:37] <nvictor> r0bby: =]
[04:25:45] <nvictor> r0bby: how you been? =]
[04:25:55] *** The_Birdman has joined ##java
[04:25:58] <r0bby> evil, bitchy, and stupid so same ol
[04:26:15] <nvictor> =]
[04:26:29] *** PhyloGenesis has joined ##java
[04:26:37] <_W_> AMcBain, well, it would have to break backwards compatibility, but I mean, there's no plan for a far-distant future version of Java where they break compatibility, remove all the deprecated stuff, etc? I guess one can live in hope
[04:26:39] <r0bby> nvictor: ask
[04:26:56] <nvictor> ok. I know I'm gonna get bashed for that one too. my browsers cannot detect my java runtime env
[04:27:00] <AMcBain> _W_: I wouldn't know ... I'm the wrong person to ask, sorry.
[04:27:11] <r0bby> nvictor: install the plugin
[04:27:14] <nvictor> but it came with the jdk. so I don't want to install another one separately
[04:27:23] *** factor has joined ##java
[04:27:33] <r0bby> firefox no?
[04:27:49] <nvictor> r0bby: yes
[04:27:50] *** javabot has quit IRC
[04:27:51] <r0bby> ~google firefox java plugin
[04:27:54] <epoxy> nvictor, what os
[04:27:58] <nvictor> winxp
[04:28:04] <AMcBain> just as I asked something of him in private too :-/
[04:28:18] <nvictor> I don't understand why I should have two runtimes on my machine =[
[04:28:23] <r0bby> nvictor: it worked fine for me
[04:28:29] <nvictor> oh
[04:28:35] <nvictor> you only have the jdk?
[04:28:42] <r0bby> the JDK comes w/ a JRE.
[04:28:47] <nvictor> yes
[04:28:51] <r0bby> so yes.
[04:29:00] <nvictor> hmm =[
[04:29:07] <r0bby> works both for IE and firefox.
[04:29:18] <AMcBain> yup. and on Windows (at least) the old versions are never uninstalled. So you can have more than one per OS.
[04:29:40] <nvictor> ok, ok I give up
[04:29:46] <nvictor> I will install the plugin
[04:30:03] *** CodeWar has quit IRC
[04:30:09] <AMcBain> hmm ... that comment would have been more applicable a few lines up ... if I hadn't thought about it too long.
[04:30:12] <r0bby> nvictor: it's easy.
[04:30:29] *** Razec has quit IRC
[04:31:07] *** alek_b has quit IRC
[04:31:08] *** kater_ has joined ##java
[04:32:38] *** kater has quit IRC
[04:33:26] *** alek_b has joined ##java
[04:34:31] <nvictor> =[
[04:34:36] <nvictor> installation failed
[04:35:51] *** rdancer has quit IRC
[04:37:10] *** jabalsad has quit IRC
[04:37:28] *** jabalsad has joined ##java
[04:39:34] *** malim_ has left ##java
[04:41:18] *** andrewkasper has quit IRC
[04:44:48] *** nvictor has left ##java
[04:45:35] *** ries has quit IRC
[04:49:21] *** FireSlash has joined ##java
[04:51:26] *** amz has joined ##java
[04:53:03] *** kavon has joined ##java
[04:53:05] *** phyburn has quit IRC
[04:54:01] <kavon> Can someone point me to the right direction in opening a "Browse..." window. I remember there being a pre-made one that will open a generic "Browse to Directory" window or something
[04:55:23] <The_Birdman> kavon: what are you talking about? do you wonder how to open a file dialog?
[04:55:29] *** Inhuman has quit IRC
[04:55:30] <kavon> yes
[04:55:37] <The_Birdman> ~JFileChooser
[04:55:48] <kavon> thanks
[04:55:49] <The_Birdman> see javax.swing.JFileChooser
[05:00:44] <Gevaudan82> if I wanted to target a resultset abstraction to read/write resultsets to xml for unit testing is there a good class/method to target? I'm looking for something that is db driver agnostic and db framework agnostic...something in javax.sql I would think
[05:01:44] *** resmo_ has joined ##java
[05:02:22] *** resmo has quit IRC
[05:04:22] *** bitshuffler has joined ##java
[05:08:05] *** PhyloGenesis has quit IRC
[05:09:38] *** ttmrichter has quit IRC
[05:11:26] *** heyqule has quit IRC
[05:12:19] *** FireSlash has quit IRC
[05:15:18] *** zophy has joined ##java
[05:16:33] *** zophy has quit IRC
[05:16:55] *** zophy has joined ##java
[05:18:21] *** daxton has quit IRC
[05:20:58] *** ttmrichter has joined ##java
[05:21:02] *** wangyuan270 has joined ##java
[05:21:33] *** wangyuan270 has quit IRC
[05:22:57] *** tag has quit IRC
[05:23:08] *** Kwitschibo has quit IRC
[05:24:19] *** McBainas has joined ##java
[05:24:40] *** AMcBain has quit IRC
[05:24:42] *** McBainas is now known as AMcBain
[05:24:44] *** The_Birdman has quit IRC
[05:29:24] *** sammcd has joined ##java
[05:30:56] *** fgmmgf has quit IRC
[05:31:17] <sammcd> What is the proper path to go, to get a JLabel to do something on a mouse click. I made a subclass that implemented MouseListener but the mouse listener functions don't seem to be working. Pointing me at some good documentation would be great.
[05:31:34] <r0bby> sammcd: attach a listener to the JLabel?
[05:32:56] <sammcd> ahh, I think I see my problem. I am a little stupid.
[05:33:34] <[[thufir]]> err, how do you find the online javadoc for jakarta ecs package?
[05:33:55] <r0bby> [[thufir]]: using google
[05:34:03] <kavon> r0bby: the google
[05:34:19] <r0bby> it cures all
[05:35:06] *** pilkarn has joined ##java
[05:35:17] <pilkarn> how do I return Matrix or False? Object?
[05:35:49] <kavon> pilkarn: you could do return Matrix, or return null
[05:35:52] <repnop> return null for the equiv of false?
[05:36:10] <sammcd> r0bby: Thanks. I had added it as a listener, just in the wrong place. Thanks.
[05:36:21] <r0bby> :)
[05:36:29] <r0bby> add it to the JLabel
[05:36:53] <kavon> pilkarn: compare what should be Matrix to null, if it is true then there you go, if not you've got a proper return (aka true)
[05:37:08] <[[thufir]]> just strange that I couldn't find it at apache, went to http://www.docjar.com/docs/api/org/apache/ecs/Document.html
[05:37:36] <kavon> heh I think its funny how I've got a keylistener on a JPasswordField
[05:37:53] *** linear` has joined ##java
[05:37:59] <kavon> (its so a user can hit enter and log in without clicking the button)
[05:38:13] *** mattorantimatt has joined ##java
[05:38:13] <AMcBain> more ironic things have been done here :P
[05:38:24] <AMcBain> (and moronic, too)
[05:39:01] *** bhz- has quit IRC
[05:39:02] <linear`> whats the difference between 'public int foo' and just 'int foo' as instance variables
[05:39:34] <kavon> AMcBain: such an easy spot for a malicious person to edit my source and log people's passwords without a major difference in file size. :o
[05:39:51] <kavon> AMcBain: now I see why MD5 hashes are important to include
[05:40:09] *** PhyloGenesis has joined ##java
[05:40:20] <repnop> kavon: if they're in such a position they can already get the password anyways :p
[05:40:39] <kavon> repnop: well i meant as in they edit it, and host it on their "free downloads" website
[05:40:51] <AMcBain> linear`: http://mindprod.com/jgloss/packagescope.html
[05:41:13] <AMcBain> that's what "default" scope is, when you don't define any explicit scoping.
[05:41:26] <AMcBain> check out the others for more details on public, etc.
[05:41:28] <linear`> k thanks ill read up on that
[05:41:33] <repnop> kavon: yeah but if they're running it off a random site... (i dont know exactly what your software does however)
[05:41:34] <kavon> repnop: well then if I take out the keylistener it wouldn't matter, a person could do that anyway.
[05:41:36] <linear`> ive never seen this explained
[05:41:40] <linear`> in my books
[05:41:42] <repnop> indeed
[05:42:00] <pilkarn> m[0],m[1] = m[1],m[0] <- can java do that? and swithc the places?
[05:42:12] <r0bby> no
[05:42:14] <kavon> repnop: can't do anything about it, they ran an infected version of the program
[05:42:26] <repnop> yeah no control over that situation.
[05:42:27] <r0bby> pilkarn: you have to do the swap manually
[05:42:33] <pilkarn> kavon: but how do I declare the type?
[05:42:54] *** kshepherd has quit IRC
[05:43:32] <kavon> public Matrix generateMatrix(); Matrix returnVal = generateMatrix(); if(returnVal == null) { } else { }
[05:43:37] *** The_Birdman has joined ##java
[05:43:41] *** vinse has quit IRC
[05:44:45] <kavon> pilkarn: with that, return null when you want to indicate "false" or something didn't work right. otherwise everything is fine and you've got a Matrix
[05:46:56] <r0bby> pilkarn: /jerk
[05:46:58] <r0bby> er crap
[05:47:02] <r0bby> ignore that pilkarn
[05:47:07] <kavon> lol
[05:47:51] *** tag has joined ##java
[05:47:52] <_W_> oh my god, you have a /jerk command?
[05:48:01] *** cactaur has joined ##java
[05:48:02] <kavon> brb
[05:48:05] <kavon> /fap
[05:48:50] <_W_> also, don't return magic values for abnormal situations, use an exception :)
[05:49:26] *** tomvolek has joined ##java
[05:50:00] *** SystemWizard has joined ##java
[05:53:34] *** grey has left ##java
[05:54:24] *** JordanG has quit IRC
[05:55:09] *** amz has quit IRC
[05:56:37] *** wangyuan270 has joined ##java
[06:05:19] *** pilkarn has quit IRC
[06:11:41] *** Gevaudan82 has quit IRC
[06:12:14] *** waz has quit IRC
[06:15:37] *** tomvolek has quit IRC
[06:16:54] *** cactaur has quit IRC
[06:19:08] *** wangyuan270 has joined ##java
[06:19:43] <wangyuan270> hi,hello
[06:20:55] *** flippo has joined ##java
[06:21:36] <Tarantulafudge> /join #cisco
[06:22:23] *** bashoh has joined ##java
[06:23:17] *** wangyuan270 is now known as wushan
[06:25:29] <Tarantulafudge> reisi: anyone home?
[06:26:44] <azathoth99> I need to workout more to get ripped
[06:26:48] *** pilkarn has joined ##java
[06:26:55] <pilkarn> what does NaN mean?
[06:27:07] <landonf> not a number
[06:27:36] <_W_> ~nan
[06:28:05] * _W_ peers at javabot
[06:28:30] <Wicked> hello all. im currently using a properties file for storing some configurations for my program. but i now want to keep a list of words in the properties file and load it as a string array. but it looks like properties cant do this. any suggestions on what i might want to use?
[06:28:43] <pilkarn> so hwo could I get it, i got NaN from a long algorithm i dont know why
[06:28:47] <pilkarn> 1 / 0?
[06:29:25] <_W_> Wicked, a properties file with one of the values being a list of words
[06:29:44] <_W_> 1/0 is definitely not a number
[06:30:22] *** blankthemuffin has quit IRC
[06:30:38] <Wicked> _W_, hmm i thought i read it wouldnt work....so id just have to store the list of words?....i mean is there a proper syntax? word1,word2?...
[06:31:41] <_W_> Wicked, use whatever syntax comes natural
[06:31:54] <_W_> if these are real words, a space separated list seems natural
[06:32:22] <_W_> of course, if you really want more complex data structures, my advice is irrelevant
[06:32:31] *** blankthemuffin has joined ##java
[06:32:37] <Wicked> hmm ok. some of the things i want to store are actuall 2 words like "blah blah"
[06:32:52] <Wicked> im just trying to get something to work at this point.
[06:33:24] <_W_> what are you really storing?
[06:33:26] <Wicked> its for a irc spambot..and i want to be able to easliy add words to a list of spam words......
[06:33:33] *** flippo has quit IRC
[06:33:37] *** wushan has quit IRC
[06:33:38] <r0bby> cute
[06:33:43] *** riotz has quit IRC
[06:33:45] <r0bby> you just admitted to writing a spambot?
[06:33:52] <Wicked> right now the wordlist is a string array and i have to recompile each time
[06:33:57] <_W_> I think Wicked might not mean it in the traditional sense
[06:33:59] <Wicked> anti spam bot
[06:34:28] *** wangyuan270 has joined ##java
[06:34:53] *** meanburrito920_ has quit IRC
[06:34:56] <r0bby> ah
[06:35:05] <Wicked> no. some ahole is spamming a ircnetwork i hang on....and i wrote a bot that listens for a list of words...if someone repeats any of the words more then 2 times in 10 seconds it glines the user from the network
[06:35:37] <r0bby> Wicked: use xstream
[06:35:41] <r0bby> make a container class
[06:36:09] <r0bby> striek that but
[06:36:16] <Wicked> hmm i have never used xstream before. is it easy to implement?
[06:36:24] <r0bby> piss easy hold
[06:36:30] <Wicked> hehe
[06:36:45] <r0bby> http://xstream.codehaus.org/
[06:37:24] <r0bby> http://dev.openmrs.org/browser/openmrs-modules/groovyforms/src/org/openmrs/module/groovyforms/util/GroovyFormsUtil.groovy#L141
[06:37:27] *** Junior has joined ##java
[06:37:46] <Junior> yello ;)
[06:37:50] <Wicked> oh hmm its a external library. i cant figure out how to get netbeans to include external jar libraries
[06:38:19] <AMcBain> You can always cl compile :)
[06:38:26] <AMcBain> (or switch IDEs)
[06:38:28] <Wicked> well include them in the build jar netbeans creates
[06:38:48] <AMcBain> putting a JAR inside a JAR is generally not a good idea.
[06:38:49] <Wicked> netbeans is my first real ide ive used. kinda like it now
[06:39:17] *** amz has joined ##java
[06:39:18] <Wicked> AMcBain, yea? i just wanted to easily distribute my bot(written using pircbot ;) )
[06:39:43] <AMcBain> I've done that before, and I usually put the JAR alongside mine, and link it in via the command I give java.
[06:39:50] <Wicked> and thought having one jar to hand out was more elegant then including a lib dir too
[06:39:51] *** senxhnsshp has joined ##java
[06:40:03] <senxhnsshp> double[] temp = mtrx[y];
[06:40:03] *** pilkarn has quit IRC
[06:40:03] <senxhnsshp> mtrx[y] = mtrx[maxrow];
[06:40:03] <senxhnsshp> mtrx[maxrow] = temp; thats fine right? switches values as expected?
[06:40:06] <Wicked> ah well thats true. i could just make a simple start script
[06:40:22] <AMcBain> JARs inside JARs don't work at all like they do separately.
[06:40:34] <Wicked> ah. did not know that. :)
[06:40:37] *** Tarantulafudge has quit IRC
[06:41:22] <AMcBain> basically you end up importing all their packages into your project to make it work as you expect here ... that's messy. If you link to it frrom the outside, you can always upgrade to a later version when distributing, if you choose :)
[06:41:46] *** bitshuffler_ has joined ##java
[06:41:57] <Wicked> ah thats also a good point
[06:42:07] <r0bby> ~~ senxhnsshp tias
[06:42:41] <AMcBain> and some don't like this, but a start script can be easily crafted for both Linux and Windows ... they will differ only by using ":" instead of ";" to separate things and you put Linux's in a sh file and Windows in a .bat
[06:42:43] <r0bby> Wicked: your other option is reading in a text file
[06:42:52] <r0bby> where each line is a bad word
[06:43:27] <r0bby> if you add a word using the bot it's as simple as writing that word to a new line in the file/ \
[06:43:48] <Wicked> ah i was hoping to keep one main config file to nick,server,port,channels...and stuff like that
[06:43:59] *** wangyuan270 has quit IRC
[06:44:35] <AMcBain> "java -cp mine.jar;pircbot.jar package.path.to.Main" (Windows, use : instead of ; on Linux)
[06:44:36] <senxhnsshp> ~ r0bby tias
[06:44:37] <epoxy> i have some ppm data read into a byte array (finally heh) ... how would i go about putting the bytes together for an image on say.. a jpanel or something? each byte a jpanel with the respective RGB value of the byte?
[06:44:45] <r0bby> senxhnsshp: this is YOUR WORK
[06:44:48] <r0bby> i dont give a fuck
[06:45:13] <Wicked> lol
[06:45:21] <senxhnsshp> tias =?
[06:45:25] <AMcBain> try it and see
[06:45:27] <r0bby> try it and see.
[06:46:59] <AMcBain> Wicked: I wrote a framework in JS that builds upon PircBot and it uses Rhino to run the JS. So that's how I know how to do the ext Jars ... I use the cp command to link Rhino with PircBot ... the only bad thing being that with -cp I have to specify the path to the main class, but that's not so bad.
[06:47:32] <AMcBain> (package path, I mean)
[06:47:33] *** Frostix has quit IRC
[06:48:08] <Wicked> ah
[06:48:18] *** inktri has joined ##java
[06:48:20] *** inktri has left ##java
[06:48:23] *** inktri has joined ##java
[06:49:32] *** senxhnsshp has left ##java
[06:50:06] <AMcBain> there is a program called "fat jar" and another called "jarjar" which allows you to put JARs inside others for distribution, but I would assume all they do is just unpack all the JARs and put them back together again using your (the JAR you'd normally start up) JAR's manifest. I think I still prefer having separate JARs even if one JAR seems nice and can be automated.
[06:50:11] <r0bby> ~jarjar
[06:50:17] <r0bby> ~fatjar
[06:50:19] <r0bby> ~ping
[06:50:20] <AMcBain> r0bby: the bot is gone.
[06:50:26] <r0bby> who killed it?
[06:50:31] <AMcBain> remote
[06:51:02] <r0bby> http://code.google.com/p/jarjar
[06:51:08] <r0bby> http://fatjar.sf.net
[06:51:17] <AMcBain> anyways ... those are your options :)
[06:51:37] <r0bby> Wicked: you can still have one config file
[06:51:45] <r0bby> First line is the config options
[06:51:51] <r0bby> delimited by ':'
[06:52:03] <r0bby> the rest are bad words one per line
[06:52:14] *** wangyuan270 has joined ##java
[06:52:29] <AMcBain> ew. just use as much as is necessary ... if you need a separate file for the word list, go for it. then the badword list is independent of the config and can be replaced at any time.
[06:52:38] <Wicked> ah. ok im reading up on that xstream...seems like it could be usefull for a lot of stuff
[06:52:50] <repnop> weird without javabot here
[06:52:50] <AMcBain> you could even pack it in the bot's JAR so that if it is deleted it is reunpacked.
[06:52:51] <r0bby> Wicked: yeh
[06:53:09] <r0bby> Wicked: dont use xstream
[06:53:25] <r0bby> the you already dislike that extra dep
[06:53:28] <AMcBain> you don't really need XML for a straight list of words.
[06:53:43] <r0bby> This is pretty easy
[06:53:53] <Wicked> i could also just do a config file and a badwords file. that wouldnt be too bad
[06:54:14] <r0bby> r0bby:irc.freenode.org:6667:#foobar
[06:54:24] <r0bby> the rest of that file would be the badwords
[06:54:31] <r0bby> one file
[06:57:00] <Wicked> ah...this is 1st real usefull thing ive written lol
[06:57:04] *** inktri has quit IRC
[06:57:11] <Wicked> other stuff has just been for shits and giggles.
[06:58:35] <AMcBain> r0bby: ? that's not really all that readable, and he has at least one benefit if he uses separate fiels.
[06:58:37] <AMcBain> files*
[06:58:46] <r0bby> AMcBain: it is :)
[06:58:55] <r0bby> nick:server:port:channelname
[06:58:55] *** bitshuffler has quit IRC
[06:59:24] <r0bby> and yeh seperate files are good
[06:59:49] <AMcBain> technically, yes, but it those not familiar with this might not know, or might mix them up and not know, and that format has no provisions for having settings which may not need a default value.
[07:00:15] <AMcBain> like a password for protected nicks
[07:00:52] <AMcBain> anyways, Wicked can figure this all out himself now. I think we've given him enough stuff to work with.
[07:00:58] *** CrypticSquared has joined ##java
[07:01:34] <Wicked> yea. thanks guys i think i can manage :)
[07:01:37] <r0bby> isp's pop3 server is acting up
[07:01:43] <r0bby> my isp's*
[07:02:20] *** cybereal has joined ##java
[07:02:24] <AMcBain> r0bby: also, it's not hard to write a simple snippet of code that reads in name=value property-like files and put them into maps :)
[07:03:37] * AMcBain rethinks his position on placeUserMove and decides if it was tryPlaceUserMove he should return a boolean, but given his original wording should throw an Exception
[07:04:28] <r0bby> properties yeh
[07:04:36] *** woogley has quit IRC
[07:05:04] *** wangyuan270 has quit IRC
[07:05:22] *** wangyuan270 has joined ##java
[07:06:03] *** wangyuan270 has quit IRC
[07:06:25] *** ffgeek200b has quit IRC
[07:07:13] *** phix has joined ##java
[07:07:55] *** wangyuan270_ has joined ##java
[07:11:17] *** amz has quit IRC
[07:11:33] *** wangyuan270_ has quit IRC
[07:12:46] *** wangyuan270 has joined ##java
[07:13:00] *** wangyuan270 has joined ##java
[07:18:13] *** bitshuffler has joined ##java
[07:20:21] *** kavon has quit IRC
[07:21:02] *** squi has joined ##java
[07:21:46] * r0bby sighs
[07:23:43] *** bitshuffler has quit IRC
[07:24:55] *** freeone3000 has quit IRC
[07:28:01] *** bitcrave has quit IRC
[07:28:34] *** blankthemuffin has quit IRC
[07:29:00] *** blankthemuffin has joined ##java
[07:30:44] *** _bugz_ has joined ##java
[07:31:12] <r0bby> cute
[07:31:21] <r0bby> on Object: @author unascribed
[07:34:21] * pr3d4t0r spanks r0bby.
[07:34:49] *** CodeWar has joined ##java
[07:35:01] *** bitshuffler_ has quit IRC
[07:37:15] *** djp[mbp] has quit IRC
[07:38:29] *** stringCheese has quit IRC
[07:41:08] *** strategy has quit IRC
[07:41:55] <AMcBain> r0bby: Ms. Una Scribed :)
[07:43:24] <r0bby> pr3d4t0r: I'm gonna regret this: HARDER!
[07:43:49] * r0bby bends over for the impending kick
[07:44:12] <AMcBain> see ya on the moon
[07:45:43] * r0bby sighs
[07:47:01] <r0bby> ugh
[07:51:13] <CodeWar> sigh! I spent a lot of time with Guice its good since it explained DI had never heard of it before but its also pretty restrictive and messy...trying out PicoContainer now
[07:52:05] <PhyloGenesis> is there an off-topic channel for Java?
[07:52:40] <CodeWar> wonder what we would be discussing there
[07:53:35] *** wangyuan270 has quit IRC
[07:53:41] <PhyloGenesis> CodeWar: it would be a good place for people to chat about whatever they'd like but to do it with people they know and talk to already in this channel
[07:53:52] <PhyloGenesis> such as ##C++-social
[07:54:16] *** wangyuan270 has joined ##java
[07:54:21] <PhyloGenesis> it also serves as a place to send people when they are off topic
[07:54:39] <CodeWar> sounds like a good place
[07:55:04] <PhyloGenesis> for instance, I could ask about programming stuff that doesn't involve Java exclusively
[07:55:14] <joed> PhyloGenesis: you could try ##politics
[07:55:40] <PhyloGenesis> joed: an idea, but I'm hoping for something still programming oriented
[07:55:59] <PhyloGenesis> well, no it isn't as what I want to discuss isn't political :-/
[07:56:20] <PhyloGenesis> (it's basically about programming projects in general/not tied to any language)
[07:56:46] <PhyloGenesis> lol, I could swear I've tried #programming before
[07:56:57] <CodeWar> PhyloGenesis, if I was you I d just discuss that right here until I get booted out
[07:57:36] *** strategy has joined ##java
[07:57:46] <PhyloGenesis> only if I can't get any help in ##programming :-)
[08:01:44] *** mengu has joined ##java
[08:06:09] *** ojacobson has quit IRC
[08:07:56] *** wangyuan270 has quit IRC
[08:08:13] *** doc`` has quit IRC
[08:09:06] *** wangyuan270 has joined ##java
[08:10:07] *** wangyuan270 has quit IRC
[08:12:51] *** CodeWar has quit IRC
[08:14:22] <pr3d4t0r> Sleep well, everyone.
[08:14:29] *** BlindHunter has joined ##java
[08:21:28] *** [[thufir]] has left ##java
[08:21:52] *** daxton has joined ##java
[08:28:53] <pstickne> pr3d4t0r: \o/
[08:31:31] *** asap18 has quit IRC
[08:35:10] <epoxy> if i have an image i need to scribble a line of color on, is there a method related to this or should i just implement something that listens for holding the mouse and change colors respective to cursor x y?
[08:35:21] *** SystemWizard has quit IRC
[08:45:45] *** jabalsad has quit IRC
[08:51:05] *** azathoth99 has quit IRC
[08:52:03] *** [[thufir]] has joined ##java
[08:54:11] <[[thufir]]> the details have faded, but I read about a technique for passing String arrays to a constructor. ring any bells?
[08:54:47] *** azathoth99 has joined ##java
[08:55:53] *** Aquanox has joined ##java
[08:58:11] *** blankthemuffin has quit IRC
[08:58:24] *** blankthemuffin has joined ##java
[09:00:36] *** [[thufir]] has left ##java
[09:02:19] <AMcBain> [[thufir]]: are you thinking of varargs?
[09:02:27] *** dorito has joined ##java
[09:02:47] <dorito> Hello is there anyone who speaks french here?
[09:03:17] *** pierrep has joined ##java
[09:03:49] *** boringwall has quit IRC
[09:03:51] <epoxy> hmm.. any pointers on while (mouse button down) { do something; } ? cant seem to get it
[09:04:20] <AMcBain> you seem to speak English well enough. I think most are forgiving if you're good enough. I say this because with the general activity level, right now, you're probably not going to get a French speaker ...
[09:04:30] <AMcBain> ^ dorito
[09:04:42] <AMcBain> epoxy: what are you trying to do?
[09:04:59] *** CodeWar has joined ##java
[09:05:05] *** kercyr has joined ##java
[09:05:38] <dorito> alright i keep getting an error while i compile my java code
[09:05:42] <dorito> illegal start of expression
[09:05:45] <epoxy> AMcBain, i have a ppm image i loaded into a jpanel.. i want to change the jpanels (pixels) under the mouse (x,y) to a certain color. implementing a crayon/paint brush type thing
[09:05:46] <dorito> I am pretty noobish at this so bare with me
[09:05:59] *** mattorantimatt has quit IRC
[09:06:02] <dorito> the line is : if( AGE => "16" && AGE <= "100" ) {
[09:06:11] *** stevenhong has joined ##java
[09:06:22] <epoxy> dorito, type with out the quotes
[09:06:25] <epoxy> *try
[09:06:32] <dorito> epoxy i did it without the quotes it didnt work
[09:06:38] <AMcBain> two things ... it should be >= and what type is AGE?
[09:06:55] <dorito> int
[09:07:05] <dorito> the age should be strictly between 16 and 100
[09:07:15] <epoxy> he's right.. try >=
[09:07:22] <AMcBain> yes, you need to drop the quotes and change => to be >=
[09:07:26] <dorito> ah
[09:07:32] <dorito> kk let me give that a try
[09:07:32] <pierrep> yep
[09:07:47] *** Kwitschibo has joined ##java
[09:07:50] <AMcBain> epoxy: do you want to paint the original image or just paint on the graphics on top of the image (meaning you drew the image to the graphics first)?
[09:07:54] <dorito> still same error
[09:07:58] <dorito> :<
[09:08:01] * dorito cries
[09:08:21] <AMcBain> are you sure that's it? can you paste the line with the changes you tried?
[09:08:34] <dorito> if( AGE >= 16 && AGE =< 100 ) {
[09:08:53] <dorito> I think it has to do with braces
[09:08:56] <AMcBain> AGE >= 16 && AGE <= 100
[09:09:18] <AMcBain> the < and > always come first, the = always second.
[09:09:21] <dorito> yay it worked
[09:09:28] <dorito> thank you AMcBain youre a life saver
[09:09:36] <pierrep> :)
[09:10:15] <CodeWar> OT: I have 3 components A B C: B => C A => B and A => C ( where this means A uses C ). Each component has several interfaces and possible implementations to choose from a binding b/w interfaces to implementations is called a binder.
[09:10:16] *** JohnSourcer has joined ##java
[09:10:21] <CodeWar> the problem I m trying to solve is let A use a different binding of C than the one B uses. Guice does not allow this.. is this possible with the other DI frameworks.. I read Spring and my head stopped working too much XML
[09:10:36] *** JohnSourcer has left ##java
[09:10:59] <epoxy> AMcBain, hm. not sure what you mean in my situation. i loaded a ppm byte by byte into a JPanel[][] (1 pixel wide/height) and added those elements to a parent JPanel. so there isn't really an "image"... just a bunch of mini jpanels.
[09:11:23] <AMcBain> ! ... yikes.
[09:11:53] <epoxy> but i want to change the cololr of the mini jpanel under the mouse.. which i can do.. but i just cant seem to figure out how to tell it to keep painting while the mouse is down.
[09:12:24] <AMcBain> well, use a MouseListener and implement the mouseMove method.
[09:12:32] <epoxy> setting mouseIsUp=true in MouseClicked and mouseIsUp=false in MouseReleased to stop a while loop isnt working :-/
[09:12:40] *** BrokenClockwork has joined ##java
[09:12:43] <AMcBain> ew.
[09:12:54] <epoxy> ah ok.. i tried that, too. i'll try again :)
[09:12:59] <dorito> AMcBain I am gonna be annoying and ask for some more help
[09:13:03] <dorito> is that ok?
[09:13:05] <AMcBain> sure
[09:13:24] *** stevenhong has left ##java
[09:13:32] <dorito> okay I want the user to get an error message if the number isnt between 16 and 100
[09:13:35] <dorito> while (SEXE!>= 16 && SEXE!<= 100){
[09:13:49] <dorito> System.out.print("error blablabla :");
[09:14:01] <BrokenClockwork> hey, could someone explain me, what data type double until +/- 1,7E308 (= +/- 1,7 * 10^308 ?) is about big floating numbers?
[09:14:10] <dorito> I get an error at the while line saying ')' expected
[09:14:24] *** stevenhong has joined ##java
[09:14:36] <dorito> oh poop its AGE not SEXE lol nevermind
[09:14:45] <BrokenClockwork> when I multiply the 10^308 it's a huge number, but with no more floating decimal as the ,7
[09:14:58] <dorito> but I still get the ')' expected error
[09:15:00] <AMcBain> dorito: ah, just encase the whole thing in a parentheses and not it, like so: !(AGE >= 16 && AGE <= 100) ... OR, you can just change the conditions such that it loops when the number is between 16 and 100
[09:15:02] *** adi112358 has joined ##java
[09:15:10] <AMcBain> while(!(...)) {
[09:15:19] <dorito> ah
[09:15:33] *** adi112358 has quit IRC
[09:15:43] <dorito> so its while (!(AGE>= 16 && AGE<= 100)){
[09:15:44] <AMcBain> (but don't change the conditions AND not it, that will have it loop when the number is correct :P)
[09:15:54] <AMcBain> yes
[09:16:06] <dorito> nice youre a dude
[09:16:49] <epoxy> AMcBain, ah thanks. MouseMotionListener is perfect
[09:16:53] <AMcBain> np.
[09:17:00] * AMcBain just lost to his tic-tac-toe AI because he wasn't paying attention. :P
[09:17:48] *** trustin has quit IRC
[09:22:27] *** spathi has quit IRC
[09:23:45] <AMcBain> How would we know? We might like you, but that gives us no indication of how good your IRC client is :P
[09:24:05] <AMcBain> (quit message)
[09:26:57] *** CodeWar has quit IRC
[09:28:08] *** BrokenClockwork has left ##java
[09:29:12] <AMcBain> I must be too much of a programmer ... I hate it when I see newsapapers put an apostrophe inside of a single quoted headline ...
[09:29:45] <AMcBain> (not that they should escape it, double quotes would do just fine ^^ )
[09:30:57] *** TheCastor has quit IRC
[09:31:36] *** gfather has joined ##java
[09:31:43] <gfather> good morning guys
[09:31:54] <gfather> lets study java :)
[09:32:16] <dorito> java is no fun :(
[09:32:34] <AMcBain> aww, what?
[09:32:37] <AMcBain> Java is very fun.
[09:32:52] <dorito> i beg to differ :p
[09:32:54] <gfather> yes when u complete learning it , ull have fun
[09:33:03] <dorito> eating icecream is fun
[09:33:05] <dorito> java isnt.
[09:33:16] <AMcBain> "ull"? man, and I thought just "u" was bad enoughQ
[09:33:37] <gfather> well im just happy that ill be able to do applications for multi platform , and mobile stuff
[09:33:55] <AMcBain> icecream is good, I'll admit, but I don't think it quite compares to creating something awesome (no matter what it is) and knowing that *you* did it.
[09:34:15] <gfather> AMcBain u dont need to know how messed up languages are in my head
[09:34:18] <AMcBain> there's also a "high" that can start as you approach finishing such a program too :)
[09:34:29] <AMcBain> (hmm, I'm self drugging? whoo!)
[09:34:30] *** gregor_k has joined ##java
[09:34:56] <gfather> other than that , im still drunk from yesterday birthday
[09:34:57] <AMcBain> gfather: can you please spell out the word "you"? It's only 2 more characters.
[09:35:09] <gfather> its heavy :)
[09:35:16] <gfather> youuuu
[09:35:26] <dorito> (03:35:05) (AMcBain): icecream is good, I'll admit, but I don't think it quite compares to creating something awesome (no matter what it is) and knowing that *you* did it. <-- making a baby?
[09:35:28] * AMcBain wonders why people join IRC when they're drunk.
[09:35:41] <dorito> that sure is more fun than java :D
[09:35:43] <AMcBain> dorito: ... not quite what I meant, but hey, whatever.
[09:35:47] <dorito> haha
[09:35:49] <gfather> AMcBain because its a nice place
[09:36:48] <AMcBain> dorito: to paraphrase coding horror: children are like spawning a new process :D
[09:38:05] *** landonf has quit IRC
[09:38:13] *** taraskostiak has quit IRC
[09:38:56] *** AhtiK has joined ##java
[09:40:43] <dorito> AMcBain thats why im never having them
[09:41:09] <AMcBain> they require lots of memory and processing power out of the parent :P
[09:41:19] <dorito> they suck the life out of you
[09:42:04] <AMcBain> yeah, but eventually they get old enough they start to take more care of themselves. I don't know for sure yet (I'm only in college!) but I think maybe someday it'd be a worthwhile prospect.
[09:45:46] <r0bby> plus you're shaping a human being into something productive
[09:45:51] *** cher has joined ##java
[09:46:29] *** staykov has joined ##java
[09:46:52] *** webus has joined ##java
[09:46:54] *** staykov has joined ##java
[09:46:55] <ldam> my old teacher had these wise words about having babies: "Making software is like making babies: it is not the result that is interesting, but the process"
[09:47:16] *** Tasyne has quit IRC
[09:47:28] <AMcBain> damn. there is no color that works well with pure plue, pure red and almost black.
[09:48:15] *** robin_sz has quit IRC
[09:48:17] <AMcBain> no matter what I try gives my eyes spots, and I don't even have to start at it long.
[09:50:49] <azathoth99> hello can java be used liek perl for text parsing with regexes?
[09:50:55] *** Techdeck has joined ##java
[09:50:56] <azathoth99> and what is the easiest way to learn java
[09:51:09] <azathoth99> I want to do web sites with java eventually
[09:51:13] <cybereal> it can be used for text processing but perl's more directly appropriate to the task
[09:51:19] <azathoth99> I saw some books on servlets at the library
[09:51:20] <cybereal> ~first cup
[09:51:37] <cybereal> oh bot's MIA... oh well
[09:51:43] <azathoth99> www.prevayler.org in particualr interests me
[09:51:58] <cybereal> azathoth99: sun's tutorials on their website, java.sun.com are the best place to start
[09:52:04] <azathoth99> ok
[09:52:09] <azathoth99> am I crazy?
[09:52:15] <azathoth99> can one learn jaav on ones own
[09:52:20] <cybereal> why not?
[09:52:21] <cher> ldam: I use a similar metaphor: Software development is like pregnancy. If it takes 9 months for a woman to bear a child, how many women do you need to get the job done in 1 month?
[09:52:21] <azathoth99> and do nice professional websites?
[09:52:24] *** LostMonarch has joined ##java
[09:52:33] <cybereal> and prevayler is stupid, it can't scale worth a damn
[09:52:34] <azathoth99> I also saw the apache wicket framework
[09:52:36] <azathoth99> looks nice
[09:52:53] <azathoth99> isn't prevayler point that only logic is in ram
[09:53:01] <azathoth99> all big stuff like videos are on filer?
[09:53:09] <azathoth99> liek the control is in ram?
[09:53:51] <cybereal> azathoth99: no, it's basically the opposite of that
[09:54:04] <cybereal> it's the idea of keeping all of your data in memory and just writing changes to it over time, as a journal
[09:54:18] <cybereal> which means you can't have more data than you can fit into your heap
[09:54:27] <ldam> azathoth99, it's not very usefull if you are going to serve so many users that you have to add an extra server; then you are fucked
[09:55:10] <azathoth99> well I think its performance for small sites is fast
[09:55:17] <azathoth99> I dnno maybe Im a dupe
[09:55:41] <azathoth99> I just heorized that at some places I work the entire db is liek 200M in mysql for the ticketing system
[09:55:53] <azathoth99> and all the excel spreadsheets n stuff are in an attachments folder
[09:56:06] <azathoth99> so 200m ram easy to find
[09:56:24] <cybereal> that's fine but you have a limited growth potential
[09:56:41] <azathoth99> see the 500G ram machine in the hardware section?
[09:57:09] <azathoth99> I have so much to learn about web
[09:57:16] <azathoth99> but it is intriguing
[10:00:31] <azathoth99> postgresql is also suposed to be nice, now I am curious about the keep session in db vs in an appserver , especially since phil greespun wrote that 2 tier is all you need unless you support legacy
[10:00:34] *** Techdeck has quit IRC
[10:00:50] <azathoth99> someone had told me that keeping session data in the db is slow
[10:02:14] *** chyea has joined ##java
[10:03:53] <chyea> hey all. i'm not too educated on the whole voice chat client thing, but i'm trying to write one using Speex for fun. is there a java library that kind of makes capturing input from a microphone easier?
[10:04:14] <chyea> i assume i have to capture this input and pass the data to the codex to encode it, then send it over the wire.
[10:05:03] *** elindio has joined ##java
[10:05:16] <azathoth99> what would be sick is if you could pipe it
[10:05:48] <azathoth99> what is a huge website done in java
[10:05:56] <azathoth99> that had massive scaling engineering?
[10:06:02] <cybereal> ebat
[10:06:04] <cybereal> er ebay
[10:07:33] <azathoth99> oh no kidding ebay is java?
[10:08:03] <cybereal> it's advertised all over their site
[10:08:11] <cybereal> azathoth99: basically, the internet is built on java
[10:08:28] *** mele- has quit IRC
[10:08:28] <cybereal> the most common application of java is servers and the #1 technology for large scale web development is java
[10:08:40] <gfather> yes
[10:08:42] <cybereal> so you can kinda troll around any of the more serious sites and not be surprised if it's java
[10:08:56] <cybereal> azathoth99: even facebook uses it for part of their system. php, java, and erlang...
[10:09:14] <gfather> used for most enterprise applications and enterprise web applications like erps and crm
[10:09:34] <selckin> google adwords runs on java
[10:09:44] <gfather> i run on java :)
[10:09:57] <selckin> i just sleep on it
[10:10:02] *** supersako has joined ##java
[10:10:42] <supersako> hey all, what version of eclipse is good to get? I want to use it for java development, C++ dev, and other plugins
[10:10:46] <supersako> would classic be the right one?
[10:11:42] <cybereal> yeah that's a good point, google basically uses two languages, Java, and Python, for almost everything
[10:12:08] <chyea> hrm. i'm debating moving to java now for my server. i've been writing it in python because of twisted. does java have anything like twisted that makes writing an echo server really easy?
[10:12:19] <cybereal> azathoth99: anyway point is it's common, just not so much in amateur hour, php-range work
[10:12:28] <cybereal> chyea: a few yeah
[10:12:40] <cybereal> mina comes to mind first but there was a more recent one if I can remember the name...
[10:13:16] *** lianimator has joined ##java
[10:13:56] <lianimator> Hi.. does primitive types extend Object?
[10:14:04] <cybereal> no they aren't classes
[10:14:37] <chyea> ok, i'll look into mina for now then.
[10:14:46] *** NiallC has quit IRC
[10:15:11] <lianimator> but I'm able to pass int, char, float.. into a method that expects Object.
[10:15:34] <cybereal> lianimator: yeah, thanks to a questionable feature called autboxing
[10:15:40] <cybereal> autoboxing even, google it
[10:15:44] <azathoth99> mina
[10:15:50] <azathoth99> I think mina is liek twisted
[10:15:50] <lianimator> thanks :)
[10:16:23] <chyea> nice.
[10:16:47] <azathoth99> they did a webserver called asyncweb from mina but it wasn't great I think.
[10:16:49] <cybereal> chyea: ah, Netty was another
[10:16:51] <cybereal> ~netty
[10:16:58] <cybereal> ah forgot the bot is missing
[10:19:13] <chyea> nice.
[10:19:37] *** CrypticSquared has quit IRC
[10:19:48] <azathoth99> http://www.jboss.org/netty/
[10:20:05] <chyea> at first glance i kind of put the Mina on a higher level of quality because it's Apache.
[10:20:18] <chyea> the intro paragraphs of netty sound great too, though :P
[10:20:45] <chyea> Netty sounds really active, too. which is a huge plus.
[10:21:54] *** mgenov has joined ##java
[10:22:05] <cybereal> chyea: netty's a product of a major mina committer abandoning mina because the project was going downhill
[10:22:15] *** Yustme has joined ##java
[10:22:16] <cybereal> chyea: so there's a good chance netty's worth looking at
[10:22:23] <azathoth99> wow
[10:22:36] <azathoth99> it seem in java to use something there are 4 more things to learn
[10:23:28] <azathoth99> nety is a framework from which one builds http server, not an http server it seems...I guess other protocalls can be used....but why reimplement these protocalls?
[10:24:10] <azathoth99> because nio allows them to be non blocking?
[10:24:15] <azathoth99> and allow many users?
[10:24:17] <azathoth99> is that it?
[10:24:35] *** gdoko has joined ##java
[10:26:14] <chyea> there's a lot of things that come with writing network related servers or clients.
[10:26:36] <chyea> it's nice to have somebody that knows what they're doing write most of that stuff because chances are it'll be 10x better than what i could come up with.
[10:27:26] <azathoth99> wow it seems there is a ton of java code to be used out there
[10:27:34] <chyea> so, a nice framework that kind of seperates the actual data, protocols, whatever, from the underlying socket-related stuff, is useful
[10:27:42] <azathoth99> http://java-source.net/open-source/network-servers/quickserver
[10:27:44] *** gfather has quit IRC
[10:27:59] <azathoth99> so from netty you build what?
[10:28:22] <chyea> if it's what i think it is, netty would let you build whatever type of server you want to build.
[10:28:40] <chyea> you deal with the protocols on your own if they're something specific.
[10:29:16] *** pstickne has quit IRC
[10:29:43] <chyea> for examples: an irc server, a web server, IM server
[10:32:06] <chyea> i'll probably go with netty over mina. having a current and active project is pretty important to me.
[10:32:59] <ernimril> there is also grizzly, may be worth looking at
[10:34:58] *** jabalsad has joined ##java
[10:36:23] <lianimator> how do I compile a file with javac, when the file is not .java?
[10:36:55] <ernimril> lianimator: why is the file not .java?
[10:37:11] <lianimator> it's .pizza (I'm doing a report on the pizza language)
[10:37:25] <azathoth99> mmm pizza
[10:38:04] <ernimril> lianimator: why do you think that javac can handle .pizza?
[10:38:12] <AMcBain> .pizza was the language that helped introduce generics to Java (and one other thing, I forget)
[10:38:15] <AMcBain> s/.//
[10:38:34] <lianimator> ernimril: because it's just java code inside..
[10:38:41] <cybereal> I had anchovies on my pizza for the first time yesterday
[10:38:52] <lianimator> but I don't want to rename to .java, since I'll be adding some non-java code later
[10:38:56] <AMcBain> :s
[10:39:05] <AMcBain> (the anchovies)
[10:39:13] <cybereal> they were good I was surprised
[10:39:25] <lianimator> AMcBain: one other thing, is it function pointers?
[10:39:45] <AMcBain> lianimator: Java has function pointers? hahahahahaha
[10:39:49] <cybereal> strange, since I'm not used to fish on pizza :) but yeah, their oils and the cheese mix together and create this kinda of salty almost buttery creamy result
[10:39:49] <lianimator> is there a way to force javac to to compile the file?
[10:39:50] <cybereal> good stuff
[10:40:20] <lianimator> AMcBain: well, I don't know.. pizza has generics, function pointers, and pattern matching
[10:41:02] <azathoth99> anchovies? wow I never had them
[10:41:22] <AMcBain> ah, nevermind. the remaining Pizza features turned into Scala.
[10:42:07] <AMcBain> lianimator: http://pizzacompiler.sourceforge.net/
[10:42:42] <AMcBain> I would guess you can only use features supported by the Java version out at the time and whatever Pizza supported.
[10:43:08] *** LordMetroid has joined ##Java
[10:43:38] *** TheCastor has joined ##java
[10:44:40] *** Techdeck has joined ##java
[10:48:01] *** stevenhong has left ##java
[10:49:19] *** EspenG has joined ##java
[10:53:53] *** Resistance has quit IRC
[10:57:25] *** pandora-- has joined ##java
[10:59:49] *** lianimator has quit IRC
[11:01:47] *** lianimator has joined ##java
[11:02:11] *** giaco has quit IRC
[11:04:56] *** azathoth99 has quit IRC
[11:05:12] *** ankylose has joined ##java
[11:07:32] *** BSWolf has quit IRC
[11:07:37] *** BSWolf2 has joined ##java
[11:08:15] *** elindio has quit IRC
[11:08:30] *** BSWolf2 is now known as BSWolf
[11:08:38] *** TheCastor has quit IRC
[11:16:31] *** shadewind has joined ##java
[11:17:14] *** buntfalke has joined ##java
[11:18:29] *** chyea has quit IRC
[11:21:51] *** lianimator has left ##java
[11:24:19] *** bas-i has joined ##java
[11:25:38] *** sphenxes has joined ##java
[11:25:42] *** giaco has joined ##java
[11:29:08] *** pandora-- has quit IRC
[11:30:55] *** jabalsad has quit IRC
[11:31:13] *** jabalsad has joined ##java
[11:31:54] *** PhyloGenesis has quit IRC
[11:32:02] *** ankylose has quit IRC
[11:33:15] *** kane77 has joined ##java
[11:35:16] <r0bby> gah
[11:35:17] *** skoskav has quit IRC
[11:36:17] *** convivial has quit IRC
[11:37:17] *** BlindHunter has quit IRC
[11:38:13] *** webczat has joined ##java
[11:38:20] <webczat> Hey.
[11:38:26] <webczat> What is javax swink?
[11:38:32] *** gbv22 has quit IRC
[11:39:14] *** Woflborg has joined ##java
[11:39:26] <cybereal> webczat: Swing?
[11:39:38] <webczat> cybereal: sorry. yes.
[11:39:54] <cybereal> the standard lightweight GUI library for java
[11:40:00] <cybereal> google it, Java Swing
[11:40:19] <webczat> cybereal: i mean, what is the difference between swing and awt?
[11:40:31] <cybereal> why didn't you ask that in the first place?
[11:41:08] <webczat> cybereal: i'm installing java access bridge and i want to know if orca works with java awt.
[11:41:20] <cybereal> awt is a fairly low level windowing toolkit that uses the native libraries to draw controls ... natively, it doesn't do the drawing of say, buttons itself. Swing is built on top of awt, but, instead of telling the underlying system to draw the components, java draws them itself with canvas objects or what have you
[11:41:31] <cybereal> i have no idea
[11:41:38] <cybereal> and you change your question every time you send a message so I'm done
[11:42:20] <webczat> Is java awt using gtk or what lib?
[11:44:21] *** armyriad has quit IRC
[11:44:58] *** Greeny_ has joined ##java
[11:47:34] *** mbroeker has joined ##java
[11:49:22] <ernimril> webczat: no, java uses x
[11:49:38] *** staar2 has joined ##java
[11:49:48] <staar2> hi
[11:51:03] <staar2> i dont get the api example working System.out.format("Cost is only $ %(,.2f", b); should return something like this $ (6,217.58)", but returns $ 20 320,98
[11:51:40] *** bashoh has quit IRC
[11:51:55] <staar2> or it depends of regional and language settings ?
[11:53:09] *** Resistance has joined ##java
[11:55:58] <ernimril> staar2: too little information, what example?
[11:56:35] *** mattorantimatt has joined ##java
[11:56:47] <staar2> formatter.format("Amount gained or lost since last statement: $ %(,.2f", balanceDelta);
[11:56:49] *** musically_ut has joined ##java
[11:56:58] <staar2> at System.out.format api
[11:57:14] <staar2> http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html#format(java.lang.String,%20java.lang.Object...)
[11:59:30] <ernimril> staar2: there is no code in the api for that method
[12:01:02] *** arpu has quit IRC
[12:01:51] *** cyzie has quit IRC
[12:02:04] *** pierrep has quit IRC
[12:05:24] *** webczat has left ##java
[12:06:24] * r0bby sighs
[12:07:28] *** genesiss has joined ##java
[12:08:17] *** cyzie has joined ##java
[12:09:16] *** tilerendering has joined ##java
[12:09:46] *** mattorantimatt has quit IRC
[12:10:42] <r0bby> ugh
[12:10:44] <r0bby> i hate this
[12:11:05] <r0bby> night
[12:11:19] *** Vantaa has joined ##java
[12:14:22] *** rainmann has joined ##java
[12:14:33] *** systat has joined ##java
[12:15:34] *** dv_ has joined ##java
[12:18:41] *** ycy has joined ##java
[12:18:51] *** GodTodd has quit IRC
[12:18:51] *** blankthemuffin has quit IRC
[12:21:47] *** blankthemuffin has joined ##java
[12:24:32] *** igordcard has joined ##java
[12:26:58] <pusling> is there any "maven2ant" build scripts ?
[12:27:22] *** taraskostiak has joined ##java
[12:30:48] *** blankthemuffin has quit IRC
[12:32:32] *** TooAngel has joined ##java
[12:33:03] *** TooAngel has left ##java
[12:33:04] *** supersako has quit IRC
[12:34:03] *** Bonix has joined ##java
[12:38:29] *** dv_ has quit IRC
[12:40:35] *** sanity has quit IRC
[12:46:47] *** pierrep has joined ##java
[12:48:43] *** Gunirus has joined ##java
[12:50:38] *** cybereal has quit IRC
[12:50:59] *** claudio_ch has joined ##java
[12:51:32] *** acuster has joined ##java
[12:52:22] *** rosh_ has joined ##java
[12:52:54] *** Bonix has quit IRC
[13:01:37] *** Copter has joined ##java
[13:01:59] *** flb has joined ##java
[13:02:42] *** spacepup has quit IRC
[13:04:41] *** Bonix has joined ##java
[13:05:19] *** mengu has quit IRC
[13:05:48] *** webus has quit IRC
[13:06:41] *** systat is now known as OxDEADED
[13:07:23] *** ankylose has joined ##java
[13:10:00] *** Ivellina has joined ##java
[13:12:26] *** nocture has joined ##java
[13:12:37] *** josemoreira has quit IRC
[13:14:46] *** morkar- has joined ##java
[13:22:56] *** jabalsad has quit IRC
[13:23:36] *** timte has joined ##java
[13:25:26] *** Bollinger has joined ##java
[13:26:29] *** DragonLord- has joined ##java
[13:27:24] *** claudio_ch has quit IRC
[13:31:56] *** [[thufir]] has joined ##java
[13:32:08] *** [[thufir]] has quit IRC
[13:35:26] *** aksn has joined ##java
[13:35:35] *** riotz has joined ##java
[13:37:50] *** systat has joined ##java
[13:37:51] * jottinger yawns
[13:42:21] *** foo-nix has joined ##java
[13:43:06] *** foo-nix has quit IRC
[13:43:53] *** foo-nix has joined ##java
[13:43:58] <buntfalke> What is the maximum amount of memory one 32bit process can allocate when called with java -Xmx2000m? it can't grow over 4GB in total, right?
[13:44:18] * buntfalke is converting street maps and wonders wether he might run out of memory
[13:44:28] <ernimril> buntfalke: Xmx sets the java heap, it does not include the native parts of the process
[13:44:48] <buntfalke> so it is 4GB+heap = 6gb?
[13:44:53] <ernimril> buntfalke: if you use graphics memory you may have a lot of memory that is native (the video memory)
[13:45:00] <ernimril> buntfalke: no...
[13:45:15] <buntfalke> it's a simple stupid terminal application, no graphics or so
[13:45:17] <ernimril> buntfalke: Xmx2000m means that java may use 2GB for the java heap
[13:45:34] <ernimril> buntfalke: "converting street maps" sounds like graphics
[13:46:05] <ernimril> buntfalke: the jvm itself takes up some memory, the jvm typically mmap:s rt.jar and uses a few native .so/.dll (mmap:s as well)
[13:46:10] <buntfalke> no, it's like converting movies, images, sound files: you transcode from one format to another, no graphics involved. just tons of vector data
[13:46:44] <buntfalke> well...i just wonder wether it might get more than 6gb, cause i'd get into trouble in that case...
[13:47:01] <ernimril> buntfalke: why do you need 2GB in the first place?
[13:47:08] <ernimril> buntfalke: have you tried any memory profiler?
[13:47:10] <buntfalke> a few megs plus minus for some libs doesnt really matter
[13:47:57] <ernimril> buntfalke: rt.jar is not a few megs, it is more like 50+ MB and it may be mmap:ed multiple times which means that some systems will report it many times in the memory usage
[13:48:45] *** sphenxes has quit IRC
[13:49:43] *** sphenxes has joined ##java
[13:49:44] <buntfalke> the apps use quite alot of heap space for whatever reason. didnt code them, so i dunno why.
[13:50:18] <buntfalke> Not just this one behaves this way though, i guess the task makes it either simple to code or logical to do it like that...dont ask me :-)
[13:50:25] <ernimril> buntfalke: ok, for an app with 2GB of heap I would expect top/ps to show up to about 2.5GB without being worried about it
[13:50:25] *** elindio has joined ##java
[13:50:42] *** Carnage\ has joined ##java
[13:51:06] <buntfalke> ernimril: weeeell...it's more like 3.5gb now :-)
[13:51:07] <ernimril> buntfalke: if it starts to take more I would start to look closer and see if there is any resource leak in the applicaiton
[13:51:42] <ernimril> buntfalke: but if you are not the author then you probably want to ask the authors about it
[13:52:42] *** fridim_ has joined ##java
[13:53:01] <buntfalke> http://www.mkgmap.org.uk/page/tile-splitter the authers seem to be quite aware of it's memory usage :-)
[13:53:09] *** OxDEADED has quit IRC
[13:54:20] <buntfalke> Oh well...if it fails i'll just try find a workaround, and if that fails too, i'll use a cluster node. 16gb of ram should be enough...
[13:54:54] <ernimril> buntfalke: there is high memory use and there is high memory use...
[13:55:09] <buntfalke> hehe
[13:55:31] <ernimril> buntfalke: but if you are not the author and do not plan on profiling and possibly fixing the problems then you will most probably not find any more help in this channel
[13:55:52] <buntfalke> Well, given it's a one time task for me to do, i wont investigate that much further as long as i get it calculated somehow...
[13:55:57] <tazle> ernimril: most likely the problem is nto fixable without a lot of work - the planet file is indeed rather big
[13:56:19] <tazle> ernimril: a lot of work i.e. doing the processing without loading the whole file into memory
[13:56:21] <ernimril> tazle: yes, and I guess that openstreetmap has grown a lot in the last year
[13:56:26] *** mthx has joined ##java
[13:56:33] <buntfalke> ernimril: i didnt ask for help on fixing it - i just wondered how much memory the jvm may allocate in total
[13:56:45] <tazle> buntfalke: as much as any process on your OS
[13:56:46] <ernimril> buntfalke: yes and I tried to tell you
[13:56:58] <buntfalke> thanks :-)
[13:57:17] <ernimril> buntfalke: but there are no strict rules so we can not say exactly, just give a few hints
[13:57:51] <buntfalke> yes, i understand
[13:58:08] <ernimril> buntfalke: many people seem to think that the -Xmx flag will limit the process size (which it will not), not sure if the manual page is badly worded or if people in general can not read ;-)
[14:00:19] <ernimril> tazle: splitting database spatial data to tile-files on disk can be interesting, we do it for our data when the customers want to have offline clients, most of them just have parts of sweden in their maps, but even then we have had to think about memory usage and number of open files and how to tile the data. Quite a lot of work indeed
[14:00:46] <ernimril> tazle: now it runs fast both when creating the files and when loading data from them :-)
[14:01:07] <ernimril> tazle: (as well as using moderate amounts of memory)
[14:01:38] *** waz has joined ##java
[14:02:37] *** garotosopa has joined ##java
[14:02:45] <buntfalke> tazle: fyi, i only try to convert europe.osm to a garmin .img-file, not the whole planet (i claim that would be pretty much impossible with the current app code and machines)
[14:03:08] <tazle> ernimril: yes
[14:04:55] *** savage- has joined ##java
[14:06:49] *** tilerendering has quit IRC
[14:07:23] *** bungrudi has joined ##java
[14:07:33] *** igordcard has quit IRC
[14:08:55] *** foo-nix has quit IRC
[14:09:21] *** BlindHunter has joined ##java
[14:09:37] *** NiSoOo has joined ##java
[14:16:30] *** savage- has quit IRC
[14:18:17] *** gfather has joined ##java
[14:18:29] <gfather> guys what does java 2.0 stands for ?
[14:19:19] <gfather> java 2.0 j2se 5.0
[14:19:23] <ernimril> gfather: not much, it was java/1.2 that introduced the java 2.0 = jdk version 1.2 ...
[14:19:50] <ernimril> gfather: sun has dropped the 2 from java 5 and java 6, so nowdays it is just java 5 and java 6
[14:19:54] <jottinger> gfather: one is the revision of the LANGUAGE, the other is the revision of the tools
[14:20:10] <ernimril> gfather: the jdk versions are still 1.5 and 1.6 respectivly
[14:20:28] <jottinger> so it's java 6, with the sun jvm and tools being at revision 1.6
[14:20:31] <jottinger> (for example)
[14:20:35] <gfather> so when a book or something say java 2 they dont mean the old java
[14:20:56] <gfather> yes jottinger i know what you mean
[14:20:57] <ernimril> gfather: if they say java 2 version 5 then they mean java 5
[14:21:07] <jottinger> no, they don't. They're referring to java after swing was added, in some form
[14:21:18] <gfather> but they just keep putting java 2 j2se 5 or 6
[14:21:39] <jottinger> the 5 or the 6 is what you're looking for
[14:22:46] <gfather> yes ,
[14:28:47] *** Gunirus has quit IRC
[14:31:55] *** cybereal has joined ##java
[14:34:06] *** HideousNashimoto has joined ##java
[14:36:57] *** aksn has quit IRC
[14:37:08] *** stillRise has joined ##java
[14:37:57] *** bitshuffler has joined ##java
[14:39:07] *** psypointer has left ##java
[14:39:46] *** foo-nix has joined ##java
[14:40:38] *** foo-nix has quit IRC
[14:41:09] *** foo-nix has joined ##java
[14:42:23] *** Daniel_H has joined ##java
[14:44:57] *** bitcrave has joined ##java
[14:49:15] *** tilerendering has joined ##java
[14:49:43] *** henn1nk has joined ##java
[14:49:44] *** aksn has joined ##java
[14:50:20] *** henn1nk has left ##java
[14:50:49] *** systat has quit IRC
[14:51:41] *** HideousNashimoto is now known as systat
[14:54:13] *** acuster has quit IRC
[14:56:33] *** marvi has joined ##java
[14:57:18] *** tilerendering has quit IRC
[14:58:39] *** foo-nix has quit IRC
[15:00:01] *** Frostix has joined ##java
[15:06:50] *** HideousNashimoto has joined ##java
[15:08:42] *** ries has joined ##java
[15:10:25] *** mengu has joined ##java
[15:10:25] *** systat has quit IRC
[15:18:21] *** peyman_t has quit IRC
[15:19:10] *** Frostix has quit IRC
[15:19:10] *** peyman_t has joined ##java
[15:22:01] *** gfather has quit IRC
[15:22:01] *** factor has quit IRC
[15:23:12] *** Absolute0 has joined ##java
[15:25:08] <Absolute0> Is it possible to stretch each column in a JTable to the width of the maximum cell in that column?
[15:25:43] <Absolute0> JTable.AUTO_RESIZE_ALL_COLUMNS just effects what happens during resizing columns.
[15:34:52] *** orgy` has joined ##java
[15:37:03] *** The_Birdman has quit IRC
[15:38:45] *** andrewkasper has joined ##java
[15:40:50] *** The_Birdman has joined ##java
[15:41:04] *** riotz has quit IRC
[15:45:49] *** monil has joined ##java
[15:46:53] <monil> i have a class for a circles, where the x,y co-ords and radius are the variables for it
[15:47:21] *** dos000 has joined ##java
[15:47:34] <ernimril> monil: good for you
[15:47:34] <monil> im trying to figure out a way to check if any two instances of a circle are disjoint, touch, overlap or identical
[15:47:49] <monil> mathematically i think that this can be done using equations
[15:47:58] <ernimril> monil: very easily so, yes
[15:48:00] <monil> anyone have any tips for java?
[15:48:10] <ernimril> monil: it is just math
[15:48:30] <ernimril> monil: do you know the equations for circles?
[15:48:42] <dos000> how can i make a task that will tick me for a precissed amount of ticks per seconds ?
[15:49:19] <monil> ernimril: yes
[15:49:19] <ernimril> dos000: there are several Timer:s available in the standard api
[15:49:22] <monil> i am maths undergrad
[15:49:33] <Absolute0> Is it possible to stretch each column in a JTable to the width of the maximum cell in that column? JTable.AUTO_RESIZE_ALL_COLUMNS just effects what happens during resizing columns.
[15:49:39] <dos000> ernimril: which one would you recomend ?
[15:49:40] *** Noya has joined ##java
[15:49:47] <monil> ill go think about it some more and come back
[15:49:52] <dos000> ernimril: i am hesitating going native so far
[15:50:11] <ernimril> dos000: since I do not know exactly what you are trying to do it is hard to say
[15:50:30] <ernimril> dos000: it looks like you want a timer, but that can be both right or wrong depending on your case
[15:50:40] <ernimril> Absolute0: yes, it is possible
[15:50:43] <ernimril> ~~Absolute0 repeat
[15:50:48] <ernimril> hmmm, no bot?
[15:51:02] <peyman_t> bot sleep!
[15:51:19] <ernimril> peyman_t: not sleeping, not on irc
[15:51:20] <Absolute0> ernimril: nobody answered for about 20 minutes, and the question wasn't visible anymore
[15:51:36] <ernimril> Absolute0: it was for me
[15:51:40] <Absolute0> and i have tiny font with my window maximized
[15:51:41] <Absolute0> :)
[15:51:58] <peyman_t> ernimril: it does man! i'm telling you. these bots are lazy. god bless the old bot!
[15:52:16] <Absolute0> ernimril: possible without doing it manually?
[15:52:24] <dos000> ernimril: i have to generate a precise amount of traffic per second for this test app
[15:52:37] <ernimril> Absolute0: you have to do some work, not hard though
[15:52:45] <Absolute0> ok then
[15:52:58] <Absolute0> i guss i will just find the max and set the width to that
[15:53:16] <ernimril> Absolute0: most tables do not behave that way, but most table have some sort of keyboard accellerator to give it to you (C-+ typically)
[15:53:51] *** mengu has quit IRC
[15:53:52] <ernimril> Absolute0: also think about table headers, do you want to care about them or not? sometimes the headers are wide and the values are not
[15:54:22] *** tilerendering has joined ##java
[15:54:28] <Absolute0> ernimril: in my case the values will be larger
[15:54:42] <Absolute0> i can include the header in the max search..
[15:54:47] <Absolute0> just to make sure
[15:54:57] <ernimril> dos000: well, you can always do something like "get startTime, send the data you want to send, get endTime, sleep for whatever amount is left then loop"
[15:56:35] <Techdeck> how do I cast an integer to a String? tried String.valueOf() and (String) but no go obviously
[15:57:05] <ernimril> Techdeck: a cast does _never_ change the type of the value, so what you ask for is not possible in java
[15:57:29] <ernimril> Techdeck: but calling "String s = yourInteger.toString();" will give you a string with a nice value
[15:57:54] <Techdeck> thank you :)
[15:58:15] <ernimril> Techdeck: if you did not know about toString you really need to study the standard api a bit more
[15:58:33] <Techdeck> I did know about it, but it didn't appear in my auto completion, so I was retarded
[15:58:37] <Techdeck> and actually it still doesn't work
[15:58:40] <ernimril> Techdeck: you really want to _read_ the api for all classes in the java.lang package (not including "sub"-packages)
[15:58:53] <Techdeck> maybe because it's int and not Integer
[15:59:04] <ernimril> Techdeck: yes, an int has no methods
[15:59:08] *** bungrudi has quit IRC
[15:59:18] *** m4rtijn has joined ##java
[15:59:20] <m4rtijn> hi all
[15:59:27] <ernimril> Techdeck: but you can still find easy ways to do it, look at the api for Integer and String
[15:59:27] <Techdeck> thank you ernimril
[15:59:36] <Techdeck> I will
[16:00:33] *** Angel-SL has quit IRC
[16:00:48] <m4rtijn> does anyone know some comprehensive thread tutorial / doc
[16:00:49] <dos000> ernimril: which api were you referring to regarding the precision timers ?
[16:01:41] <ernimril> m4rtijn: http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html
[16:01:57] <m4rtijn> thanks ernimril
[16:02:09] <ernimril> dos000: java.util.Timer works for most simple things. My other example was just using a Runnable/Thread and sleep
[16:02:47] <ernimril> m4rtijn: if you want to do multi threaded apps with java then consider buying Java Concurrency in Practice
[16:03:02] <ernimril> m4rtijn: http://jcip.net/
[16:07:44] *** zoke has joined ##java
[16:08:02] <m4rtijn> in a general case.. would it be very difficult to alter a single-threaded app into multi-thread after its finished ?
[16:08:22] <The_Birdman> I wouldn't do that m4rtijn
[16:08:26] <zoke> What is the easiest way to read data from a file that "Name Age" each line ?
[16:08:34] <ernimril> m4rtijn: yes
[16:08:39] <m4rtijn> okay..
[16:09:05] <m4rtijn> so even if my app isnt very cpu intensive.. yet.. it'd be better to do multithreads
[16:09:13] <m4rtijn> in case it will expand later
[16:09:25] *** Carnage\ has quit IRC
[16:09:40] *** bas-i has quit IRC
[16:09:42] <ernimril> m4rtijn: that depends very much on what your app does
[16:10:15] <ernimril> m4rtijn: but doing something that can scale up by using several threads is very hard, do you really need the added complexity?
[16:10:23] <Absolute0> ~REST
[16:10:44] <The_Birdman> REST is rest in peace Absolute0
[16:10:58] <Absolute0> :)
[16:10:58] *** bas-i has joined ##java
[16:11:00] <The_Birdman> Looks like the bot is on holidays
[16:11:12] <m4rtijn> hmm, its a apache derby app..
[16:11:32] <Absolute0> Are recommendation letters a good thing to have for programming job interviews?
[16:11:53] <m4rtijn> mostly listing queries
[16:11:54] <waz> yep
[16:12:15] <Absolute0> waz where do you work?
[16:12:16] <Absolute0> :)
[16:12:24] <m4rtijn> planning on using SWING.. I also read that SWING isnt really thread secure..
[16:12:27] <waz> I'm unemployed
[16:12:29] <waz> :)
[16:12:33] <The_Birdman> :-)
[16:12:37] <Absolute0> damn economy :(
[16:12:45] <waz> nah, I quit :)
[16:12:48] <The_Birdman> May I offer you a job waz, you look cool
[16:12:49] <m4rtijn> so.. I guess its "safer" to stay with single threads?
[16:12:55] *** Dewio has joined ##java
[16:12:59] <waz> www.interactions.net
[16:13:08] <waz> still has me in the exec bios
[16:13:44] <Absolute0> I was thinking of getting a domain name with my full name, but that seems sort of dangerous.
[16:13:52] <waz> how?
[16:14:04] <Absolute0> a simple white pages search and my address is revealed
[16:14:08] *** djp[mbp] has joined ##java
[16:14:15] <Absolute0> and whois
[16:14:37] <Absolute0> is it safe?
[16:14:39] <tazle> Absolute0: why does that seem dangerous to you?
[16:14:39] <Absolute0> nowadays
[16:14:42] *** CrypticSquared has joined ##java
[16:15:00] <tazle> Absolute0: i.e. are you expecting a hitman or something?
[16:15:05] <zoke> could some one explain to me on how I can read values from a file where each line is "Name Age" ?
[16:15:07] <Absolute0> :)
[16:15:11] *** Razec has joined ##java
[16:15:17] *** Carnage\ has joined ##java
[16:15:33] <zoke> I know how I can read each line, but is there away to read a string until it reaches a space on a line ?
[16:15:33] *** bhz- has joined ##java
[16:15:51] <m4rtijn> zoke: yes
[16:16:17] <zoke> m4rtijn how so ?
[16:16:46] <m4rtijn> http://www.java2s.com/Code/Java/Regular-Expressions/String-Operation.htm
[16:17:14] <m4rtijn> tokenizer
[16:17:22] <m4rtijn> or spli
[16:17:23] <m4rtijn> t
[16:17:29] <djp[mbp]> String line = "Derek 22";
[16:17:41] <djp[mbp]> String split = line.Split(" ");
[16:17:48] <djp[mbp]> split[0] = Derek
[16:17:53] <djp[mbp]> split[1] = 22
[16:18:45] <zoke> ok, thanks guys
[16:18:50] <zoke> StringTokenizer looks really useful
[16:19:11] <m4rtijn> bit overkill if u only want to split a string
[16:19:24] <m4rtijn> but its usefull, yes
[16:21:50] *** DjZemich has joined ##java
[16:24:05] *** bas-i has quit IRC
[16:24:10] *** pantcho has quit IRC
[16:24:27] *** UK-sHaDoW has joined ##java
[16:25:25] *** mbroeker has quit IRC
[16:25:49] *** Dewi has quit IRC
[16:29:31] *** moradan has joined ##java
[16:29:50] *** factor has joined ##java
[16:30:14] *** bas-i has joined ##java
[16:32:48] *** TryNiX has joined ##java
[16:32:57] <TryNiX> Hi all. I have made these functions for finding minimum and maximum depths of a quad tree (where a node is a leaf node if singleColor is true) : http://pastebin.com/d621f349d
[16:33:02] <TryNiX> I quite don't like the way I ended up using alot of copy-paste variabels in the recursive functions, but I'm not sure how to handle it otherwise. Would highly appreciate any input
[16:35:16] <m4rtijn> homework?
[16:35:33] <m4rtijn> your url isnt working TryNiX
[16:35:56] <TryNiX> its working here. weird, i'll post it again
[16:36:00] <eidolon> ~tell TryNiX about homework
[16:36:06] <ernimril> no bot
[16:36:10] <eidolon> huh!
[16:36:11] <The_Birdman> hehe
[16:36:12] * eidolon sads.
[16:36:56] <TryNiX> This is an unassessed homework that I'm trying to do better
[16:37:05] <TryNiX> http://pastebin.com/d4df27be0
[16:37:29] <m4rtijn> TryNiX: - doesnt change the fact that its homework :p
[16:38:01] <TryNiX> You don't have to give me a direct answer =p I finished the functions and they work fine in finding the depths, just tryin to know if it can be done better
[16:38:08] *** Absolute0 has left ##java
[16:39:34] <m4rtijn> how many nodes do you have to traverse to find the max depth with your algorithm?
[16:39:50] <m4rtijn> in worst case
[16:40:09] *** php-coder has joined ##java
[16:40:18] <php-coder> hello
[16:41:22] <TryNiX> m4rtijn: 65536 nodes in total
[16:41:44] <m4rtijn> hehe..
[16:41:52] <m4rtijn> I meant mathematically speaking
[16:42:02] <m4rtijn> not in numbers
[16:42:20] <php-coder> can you help me to connect to MySQL database? I run javac and javac with -cp /usr/share/java/mysql-connector-java.jar but exception ClassNotFoundException raised =((
[16:42:21] <m4rtijn> .. if "N" is a set of all nodes
[16:42:45] *** convivial has joined ##java
[16:43:46] <TryNiX> m4rtijn: all of them? :o
[16:44:47] <ernimril> php-coder: pastebin your java command with full output
[16:44:51] <m4rtijn> then u can optimize it
[16:45:02] <ernimril> m4rtijn: "you", not "u"
[16:45:22] <m4rtijn> .. i forgot
[16:46:02] <TryNiX> sms habits always kick in don't they :P
[16:46:15] *** popcornPanic has joined ##java
[16:46:47] <bobbytek2> "do not" not "don't"
[16:47:10] <m4rtijn> hehe
[16:47:41] <TryNiX> bobbytek2: no you.
[16:47:49] *** examancer has joined ##java
[16:48:35] *** ScottG489 has quit IRC
[16:48:48] *** CrypticSquared has quit IRC
[16:48:49] <php-coder> ernimril: http://pastebin.ubuntu.com/121448/
[16:48:51] <m4rtijn> TryNiX: im not fammiliar with quad-trees but I'm quite sire there are some charasteristics of that tree which YOU can exploit in order to get the max and min height without travering the whole tree
[16:48:57] <m4rtijn> sure*
[16:49:50] *** eidolon has left ##java
[16:49:51] <m4rtijn> of course it also depends on how you store the information in there.. if you store them semantically, you can use that
[16:50:13] *** sammcd has left ##java
[16:50:56] <php-coder> ernimril: i check rights for file: it's exists and allow for reading, I also try download more recent version of driver, but nothing helps(((
[16:50:56] <TryNiX> m4rtijn: if I modify the tree, and add 2 static variables with minimum and maximum depth, it should do. But I'm not sure if that's a good way to go about =p
[16:51:01] *** FireSlash has joined ##java
[16:51:26] <m4rtijn> I dont think so
[16:52:07] <m4rtijn> cause then you'd have to alter those on every update
[16:52:26] <m4rtijn> hmm.. im not sure.. like I said im not fammiliar with that kind of tree
[16:53:30] <ernimril> php-coder: classpath go before the class you run
[16:53:50] *** hyppias has joined ##java
[16:53:54] <ernimril> php-coder: "java <jvm arguments> ClassToRun <arguments to ClassToRun>"
[16:53:56] *** dev-bin has joined ##java
[16:54:28] <m4rtijn> TryNiX: you could hold a variable with the last completed row.. if such a thing exists in that tree
[16:54:30] <ernimril> php-coder: -classpath/-cp is a jvm argument
[16:54:50] <m4rtijn> then you'd only have to traverse that row
[16:54:53] *** Techdeck has quit IRC
[16:54:58] <TryNiX> hmm
[16:55:05] <TryNiX> true, will try that. Thanks!
[16:55:20] <php-coder> ernimril: I alredy tried it before... not works(
[16:55:50] *** ScottG489 has joined ##java
[16:55:54] <dev-bin> Hi, I'm a quite new to java. I'm working on something where I need to apply a mouse listener to each component in my gui (swing). I have code I expect should work but it doesn't. Where should I start?
[16:55:54] <jottinger> php-coder: then something else is wrong
[16:56:37] <ernimril> php-coder: so show us the correct version with full output
[16:56:46] *** zoke has left ##java
[16:57:16] *** HideousNashimoto is now known as systat
[16:57:49] <m4rtijn> dev-bin: the same function for every component?
[16:58:16] <dev-bin> yes, its a recursive thing.
[16:58:53] <dev-bin> to put it simply it will display a popup menu allowing you to change the color of that component
[16:59:25] <dev-bin> yes - its a school assignment. that being said I don't want it done for me, I've just been tripping on this one part for a long time
[16:59:32] <php-coder> ernimril: http://pastebin.ubuntu.com/121450/ Looks like now it can't find FilmsManager class...
[16:59:39] <m4rtijn> .. hmm if you want for example a global rightclick you could use "glass pane"
[16:59:59] <ernimril> php-coder: and that is something very different...
[16:59:59] <letfunbegin> php-coder: include "." in the class path
[17:00:22] <ernimril> php-coder: when you set the classpath you have to give it _all_ places you want java to look in
[17:00:28] *** CrypticSquared has joined ##java
[17:00:33] <dev-bin> m4rtijn I'm not sure if this makes sense, but it has to be awt.swing
[17:00:38] <php-coder> WOW!
[17:00:47] <m4rtijn> dev-bin: it is
[17:01:15] <php-coder> letfunbegin: ernimril: Thanks!!! -cp '.:/usr/share/java/mysql-connector-java.jar' for both (java and javac) works!
[17:01:16] <monil> ok so i have an object which is a circle, params are x,y co-ords of center and the radius
[17:01:29] <m4rtijn> dev-bin: but if its for a homework assignment then its porbably meant to be done recursively
[17:01:30] <monil> i am writing a method to check if two circles touch
[17:01:42] <dev-bin> m4rtijn I don't think its global though bc the right...... yes it must be recursive.
[17:01:46] <m4rtijn> dev-bin: glass pane would be a shortvut
[17:01:50] <monil> can anyone give me tips?
[17:01:57] *** CrypticSquared has quit IRC
[17:01:58] <monil> i've written it out mathematically, to me best way is to use parameterisation of a circle
[17:01:59] *** bas-i has quit IRC
[17:02:08] <monil> but to get that to any good accuracy we're talking billions of iterations
[17:02:14] <dev-bin> I'm able to recurse the components - tried and tested. the problem is applying the mouselistener/adapter
[17:02:18] <monil> and i'm guessing that may take a while..
[17:02:20] *** CrypticSquared has joined ##java
[17:02:27] <ernimril> monil: http://mathworld.wolfram.com/Circle-CircleIntersection.html
[17:03:11] *** arpu has joined ##java
[17:03:45] <ernimril> monil: it is just basic math
[17:03:56] <m4rtijn> dev-bin: why is that a problem?
[17:04:25] <dev-bin> syntax. can I paste my code up so you can see?
[17:04:39] <ravv> monil sqrt[(x1-x2)^2+(y1-y2)^2] and then compare it to r1+r2
[17:05:10] <ravv> Doesnt that check if the circles intersect=
[17:05:12] <ravv> ?
[17:05:52] <m4rtijn> .. dev-bin: sorry but I wont put much time into helping with homework..
[17:06:35] <dev-bin> I understand
[17:06:57] <dev-bin> thanks anyway
[17:07:03] <m4rtijn> no problem
[17:07:36] <m4rtijn> just use the same datastructure for the listeners as the datastructure for the components
[17:08:04] *** lewellyn has joined ##java
[17:08:11] *** lewellyn has left ##java
[17:08:15] <m4rtijn> for example: if all components are stored in a 2-dimensional array, then I would put the listeners in a similar 2-dimensional array
[17:09:43] *** DjZemich has quit IRC
[17:09:48] <m4rtijn> .. I'm not sure if that makes sense though.. my java has become very, very rusty
[17:10:52] *** elindio has quit IRC
[17:11:09] <m4rtijn> but it seems obvious to me
[17:11:46] *** ScottG489 has quit IRC
[17:11:56] *** ScottG489 has joined ##java
[17:15:34] *** Frostix has joined ##java
[17:17:05] *** claudio_ch has joined ##java
[17:18:35] *** Bonix has quit IRC
[17:19:34] *** Trowalts has joined ##java
[17:21:38] *** asap18 has joined ##java
[17:24:15] *** rosh_ has quit IRC
[17:24:22] <Trowalts> can someone point me towards what I need to read up on if I'm working with threads and dont want my program to contue until each thread has reached a certain point in its code?
[17:25:01] <The_Birdman> ~threads
[17:25:06] <The_Birdman> ah
[17:25:15] <Trowalts> anything more specific :)
[17:25:21] <_W_> Trowalts, you /don't want/ your program to continue? you want to call System.exit()?
[17:26:00] <Trowalts> no I just want it to wait untill all the threads have done there job
[17:26:18] <_W_> then check out the java.util.concurrent package
[17:26:33] *** bas-i has joined ##java
[17:26:36] <Trowalts> sounds promising, ty
[17:26:38] <_W_> actually, you might just want Thread.join()
[17:26:46] <letfunbegin> I figure too ^
[17:27:14] <ernimril> Trowalts: Thread.join or a CountDownLatch
[17:28:03] <Trowalts> kk, I'm reading up, will get back to you guys if I cant get it sorted, shotto
[17:28:41] *** dev-bin has quit IRC
[17:33:04] *** MokonaSan has joined ##java
[17:33:22] <MokonaSan> Hi I have a question. I had a mySQL database that I connected to in a Java program and it worked just fine Recently, though, I exported the whole database to a new machine and I can no longer connect to it through the Java program. Any ideas here?
[17:33:29] *** EspenG has quit IRC
[17:33:41] *** bravestar has joined ##java
[17:34:17] <garotosopa> MokonaSan, perhaps the user doesn't exist there.
[17:34:39] *** strategy has quit IRC
[17:36:34] *** magcius has quit IRC
[17:36:54] *** genesiss has quit IRC
[17:36:55] <MokonaSan> garotosopa: I thought that might be the problem, too, but I just re-added all the users
[17:36:56] <waz> MokonaSan: what happens when you try to connect?
[17:37:11] *** strategy has joined ##java
[17:39:38] <MokonaSan> ok, i got the same error when trying to connect via a .NET server, so it would appear that mySQL is not able to be seen by the outside world
[17:40:04] <MokonaSan> I forwarded the port. It's 3306, right?
[17:41:25] <ravv> is the server listening to anything else than localhost?
[17:42:05] *** tom17bombadil_ has joined ##java
[17:42:14] *** Tac has quit IRC
[17:44:10] <moradan> Is there a copyleft sign in UTF-8?
[17:44:26] <MokonaSan> ravv: How can I check that
[17:44:44] <_W_> moradan, UTF-8 is just an encoding of unicode
[17:45:20] *** bas-i has quit IRC
[17:45:30] <moradan> _W_, is there a copyleft sign in unicode then&
[17:45:32] <moradan> ?
[17:46:16] <_W_> the first hit on google had the answer to that
[17:46:22] *** ricky_clarkson has joined ##java
[17:46:43] <ricky_clarkson> How can I call sun.misc.Unsafe.getUnsafe() without getting a SecurityException?
[17:47:58] <MokonaSan> ravv: Here is the output of netstat: tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
[17:49:16] <_W_> ricky_clarkson, security exceptions are only thrown when you are using a security manager
[17:49:30] <_W_> remove the manager, or grant the relevant permission in it, and you won't get it any more
[17:50:01] <ricky_clarkson> _W_: System.setSecurityManager(null) doesn't change it.
[17:50:33] *** bas-i has joined ##java
[17:50:50] <ricky_clarkson> This looks like a solution: http://www.oreillynet.com/onjava/blog/2004/09/avoiding_checked_exceptions.html
[17:50:58] <_W_> manipulating security managers is usually done outside the jvm
[17:51:28] <ricky_clarkson> That article suggests that manipulation won't help.
[17:51:30] <_W_> no, that is totally unrelated
[17:52:37] <_W_> hmm, that's really wierd
[17:52:46] <_W_> also, why on earth do you want to use a proprietary class like that?
[17:52:56] *** igordcard has joined ##java
[17:53:09] <ricky_clarkson> Because it's better than the alternative, which is writing a native method just to check whether something is 0.
[17:53:21] *** LostMonarch has quit IRC
[17:53:51] <ricky_clarkson> This is code for debugging, not for production.
[17:53:51] *** php-coder has quit IRC
[17:54:09] <_W_> doesn't matter
[17:54:13] <ricky_clarkson> Yes it does.
[17:54:25] <_W_> you can check whether something is 0 in java, just do thing==0
[17:54:26] <ricky_clarkson> I'm debugging on one machine, one JVM, and this code won't be checked in.
[17:54:35] <ricky_clarkson> Yes, but that thing is not accessible from Java.
[17:54:44] <ricky_clarkson> without Unsafe.
[17:54:51] <_W_> what?
[17:54:55] <_W_> that makes no sense at all
[17:55:29] <ricky_clarkson> It makes lots of sense. You surely know the C technique of having struct pointers lie about their type and then be cast to the correct type.
[17:55:31] *** TranceControl has joined ##java
[17:55:35] <_W_> perhaps you better explain your /real/ problem, instead of the ones that crop up when you try a poor solution to it
[17:55:40] <ricky_clarkson> Ok.
[17:55:42] *** Inc` has quit IRC
[17:55:49] *** dos000 has quit IRC
[17:55:51] <ricky_clarkson> Some code that uses FFmpeg crashes in FFmpeg.
[17:55:51] <selckin> http://www.google.com/codesearch/p?hl=en#-WpwJU0UKqQ/test/sun/misc/Safe.java&q=Unsafe.getUnsafe()
[17:55:53] <selckin> awesome comment
[17:56:12] <ricky_clarkson> I added printfs to the native code and found a pointer that was 0 (NULL) that shouldn't be.
[17:56:34] *** Inc` has joined ##java
[17:56:44] <ricky_clarkson> I am now trying to find out when it became NULL and why.
[17:57:05] <_W_> ricky_clarkson, why are you using Java for that if the problem is in native code?
[17:57:07] <ricky_clarkson> That pointer is not exposed to the Java code by the JNI wrappers.
[17:57:23] <ricky_clarkson> Because Java calls that code, and that code is known to work if you do things correctly.
[17:58:00] <_W_> so the error is in the java code, by your statement, and the 0 value is just a sumptom then?
[17:58:04] <_W_> *symptom
[17:58:10] <selckin> seems like you just need to make it a static final variable to get an instnace of it
[17:58:11] <ricky_clarkson> I believe so, yes.
[17:58:25] <ricky_clarkson> selckin: public static final Unsafe unsafe = what?
[17:58:33] <_W_> so then you can just do your debugging in Java, using a java debugger, and not worry about Unsafe
[17:58:39] <selckin> tatic final Unsafe unsafe = Unsafe.getUnsafe();
[17:58:43] <ricky_clarkson> Java debuggers will not see that value.
[17:58:54] <_W_> no, but it will see the value that causes the error
[17:58:58] <ricky_clarkson> The wrappers to let Java see the C struct don't expose that value, because it's not on that struct.
[17:58:58] *** Tac has joined ##java
[17:58:59] * selckin has no clue really, just from these code examples and the javadoc on it
[17:59:08] <ricky_clarkson> Java debuggers don't let you explore raw memory, afaik.
[17:59:11] <ricky_clarkson> C debuggers do.
[17:59:13] <_W_> as you said, the error is in java, thus it can be found by normally debugging java
[17:59:18] <ricky_clarkson> gdb crashes when I debug this.
[17:59:43] <ricky_clarkson> The error is caused by me doing something wrong on the Java side, but the NULL does not directly come from the Java code.
[17:59:58] *** waz has quit IRC
[18:00:00] <_W_> so don't use gdb
[18:00:21] <ricky_clarkson> Yes, I am not using gdb.
[18:00:42] *** lolsuper_ has joined ##java
[18:01:03] <_W_> I still fail to see where Unsafe comes into the picture
[18:01:27] *** waz has joined ##java
[18:01:32] <ricky_clarkson> Native code does something like ((OtherType *)foo)->data[0]
[18:01:40] <_W_> (and what you can do with it, that you can't do with a debugger)
[18:02:00] <ricky_clarkson> data is NULL. data is not exposed to the Java code, because OtherType is not the type the Java code sees.
[18:02:02] <tazle> _W_: get the same information as with gdb without crashing the program?
[18:02:14] <_W_> but Unsafe won't help with that
[18:02:15] <ricky_clarkson> Oh goody, somebody understands me.
[18:02:26] <tazle> _W_: doesn't it let you read arbitrary memory?
[18:02:28] <ricky_clarkson> _W_: Sure it will, I can find out when the NULL arrived.
[18:02:40] <ricky_clarkson> Did it arrive at creation, or after 10 method calls?
[18:03:31] <_W_> tazle, arbitrary /java/ memory, sure?
[18:03:39] <ricky_clarkson> No, arbitrary memory.
[18:03:46] <ricky_clarkson> That's why it's called Unsafe, not PerfectlySafe.
[18:04:23] *** Bonix has joined ##java
[18:04:44] <tazle> _W_: how would it limit you to reading java memory? there are no memory bounds inside a process
[18:05:18] <_W_> nevermind, I missunderstood how it worked
[18:06:11] *** jyoti has joined ##java
[18:06:16] *** amz has joined ##java
[18:06:26] <jyoti> any one to help me
[18:06:27] <_W_> so what you're essentially doing, ricky_clarkson, is writing a (very specialized) native code debugger, in java
[18:06:48] *** vix85 has joined ##java
[18:06:51] <_W_> using a class that sun has done their absolute best at ensuring you don't have access to
[18:07:27] <jyoti> what is the simplest way to code java msg generater?
[18:07:36] *** monil has quit IRC
[18:07:47] <_W_> jyoti, you will have to be a lot more specific than that
[18:09:28] <jyoti> the thing is for making this jmg which algo v can use..(automatic msg should be sent topeople who has regisered in my site )
[18:10:31] <_W_> jmg? algo v? are these api-specific things?
[18:10:37] <_W_> (which api?)
[18:10:52] *** CrypticSquared has quit IRC
[18:10:58] <_W_> also, is there a reason why you are writing "msg" rather than "message"?
[18:11:09] <ricky_clarkson> _W_: Yes, exactly.
[18:11:43] <ricky_clarkson> _W_: What would you suggest instead?
[18:11:52] <Trowalts> kk the advice about the threads helped and it would stop the rest of my program from executing untill all the threads are done, but I dont want to lock them into finishing one at a time since one thread might take allot longer than another, and it would just be inefficient to have to wait for the "slow" ones to finish before the others can continue
[18:11:59] <_W_> ricky_clarkson, well, it seems that's a really really bad hack from Sun, and they hid it /really well/ using other hacks. You will have to get your debugger loaded with the bootstrap class loader somehow
[18:12:20] <_W_> Trowalts, that's not how Thread.join works
[18:12:23] *** MokonaSan has quit IRC
[18:12:52] <ricky_clarkson> _W_: It seems unlikely that I'll be able to do that quicker than getting Unsafe to tell me the one value I need to know.
[18:12:56] <_W_> ricky_clarkson, I suggest you use a different native code debugger that doesn't crash, until you've traced the problem beyond the bountary from java code
[18:13:04] <Trowalts> but thats what it did when I tested it, it ran the thread I joined until it was done
[18:13:10] <Trowalts> and none of the others on the stack
[18:13:17] <_W_> ricky_clarkson, err, you have to do what I said to do what you said
[18:13:31] <ricky_clarkson> Eh?
[18:13:51] *** waz has quit IRC
[18:14:26] <_W_> Unsafe has checks that calling code that requests an instance is loaded from the bootstrap class loader
[18:14:41] <ricky_clarkson> That article details a workaround.
[18:14:49] <Trowalts> I just want my group of threads to execute but I dont want the rest of my program going on until they are all done
[18:14:50] <_W_> does it work?
[18:14:58] *** prgrmr has quit IRC
[18:15:02] *** waz has joined ##java
[18:15:11] <ricky_clarkson> Yes, it just finally worked now.
[18:15:13] <_W_> Trowalts, by "the rest of my program" do you mean the main thread, or multiple other threads?
[18:15:35] <ricky_clarkson> (I was redundantly building all the code, native and Java, so it took a while)
[18:15:37] *** resmo_ is now known as resmo
[18:15:40] <Trowalts> the main thread
[18:15:48] <_W_> then that's how Thread.join works
[18:15:53] <_W_> do a loop, .join all the threads
[18:15:58] <_W_> then continue processing
[18:16:07] <Trowalts> 2mins
[18:16:23] <_W_> all the threads except the main thread will continue processing in parallel with only the main thread sleeping
[18:17:35] *** claudio_ch has quit IRC
[18:17:44] *** mthx has left ##java
[18:18:07] <Trowalts> yes thats what I initialy though it would do when you told me about it, but the api says that join() waits for the thread to die
[18:18:32] <_W_> yes, that's what I mean by "sleeping"
[18:18:32] *** [S^K] has joined ##java
[18:18:52] <_W_> the main thread waits for the joined thread to complete (or die)
[18:19:15] <_W_> since you have a loop, the main thread will not continue until all the other threads are completed
[18:20:02] <Trowalts> yes that is what it does, but the joined threads also wait for each other to die, which casuses them to run in series
[18:20:27] *** riotz has joined ##java
[18:21:04] <_W_> so why are you using threads if all you want is serial processing?
[18:21:56] <ricky_clarkson> Waiting for threads to die is not the same as serial processing.
[18:22:09] <_W_> no, but that's not all he said
[18:22:13] <Trowalts> no but I dont want serial proccessing, I want the threads I created to run in parralel and then after them the rest of my program should execute
[18:22:37] <ricky_clarkson> The rest of what he said hasn't implied serial processing.
[18:22:38] <_W_> Trowalts, and you accomplish that by having your main thread call join on each of the other threads!
[18:22:42] <_W_> how hard can this be?
[18:23:13] <_W_> the threads themselves don't have to call join, and if they do, that is irrelevant to the main thread's processing of join
[18:23:28] *** magcius has joined ##java
[18:24:25] <Trowalts> for(MyThread t : myTreads) { t.start(); t.join()} System.out.println("This msg should not show until all threads ^^ are done")}
[18:24:41] <_W_> why are you calling start in a loop?
[18:24:52] <_W_> or rather, why are you calling it in the same loop as the joining?
[18:25:02] <ricky_clarkson> Trowalts: You probably want to start all the threads, then join them all.
[18:25:08] <_W_> of course that will do serial processing; you are waiting for each thread to die right after you start it
[18:25:08] <ricky_clarkson> Not start then join one at a time.
[18:25:18] <Trowalts> shit
[18:25:22] <Trowalts> your right
[18:25:27] <Trowalts> arg, 2mins
[18:25:40] <ricky_clarkson> My right?
[18:25:45] * m4rtijn stops all hes doing and starts waiting 2 minutes
[18:25:50] <_W_> we're both right as we said the same thing
[18:26:18] *** marvi has quit IRC
[18:26:19] *** prgrmr has joined ##java
[18:28:07] <Trowalts> sorry I just got back from a 2month holiday in which I did very little coding, thanks for the help, now if you would excuse me I'd like to go and sit in a corner for a while
[18:28:33] <ravv> monasan if you are still here. the netstat doesnt show the sql server listening to anything else than local ie you can only connect to it from the computer running it
[18:30:07] *** jyoti has quit IRC
[18:30:14] <ricky_clarkson> Trowalts: Holidays are the best time to code. :)
[18:30:28] <Trowalts> amen
[18:31:10] <Levia> ricky_clarkson: hence I'm going to fill my holiday with code. :D
[18:31:41] <ricky_clarkson> I filled my paternity leave with coding.
[18:32:14] <Levia> ricky_clarkson: ... lol
[18:33:52] <Trowalts> there is however one more thing I would like to know, so the joins work, and they make sure all the threads are done executing before the rest of my program continues, but would there be a way to allow this once my threads have reached a certain part of there code, for example each has to connect to a server, authenticate and once that is done the rest of my program is allowed to contue
[18:34:16] <Trowalts> now in parralel with the threads while they finish off one or two more arbitrary finctions
[18:34:28] *** Andrew`_ has joined ##java
[18:34:53] <_W_> Trowalts, now is the time to check the concurrent package
[18:34:56] <ricky_clarkson> Trowalts: You would need to send a message to the parent process for that, or at the end of each thread start a new one that does the background parts.
[18:35:27] <ricky_clarkson> parent thread, not process.
[18:35:35] <m4rtijn> http://java.sun.com/docs/books/tutorial/essential/concurrency/
[18:35:36] <_W_> seems like a couple of latches should solve this easilly enough (if ricky_clarkson's suggestion doesn't fit your code)
[18:35:53] <Andrew`_> I have a JTable inside a JScrollPane, I want to set the color of the border of the header row's individual cells to nothing. How do I do this?
[18:36:07] <Andrew`_> getTableHeader().setBorder(new EmptyBorder(0,0,0,0)); doesn't seem to do what I want it to do
[18:36:30] <Trowalts> concurrency here I come
[18:37:00] <ricky_clarkson> _W_: Latches as in java.util.concurrency.Semaphore?
[18:37:38] <_W_> Semaphore isn't one of the classes with "latch" in the name, no
[18:37:48] <_W_> though a semaphore might be right as well, it all depends on his code layout
[18:38:36] *** Razec has quit IRC
[18:42:34] <bravestar> I'm wondering why GraphicsDevice.getDisplayModes gives me 75Hz modes for my LCDs (and the OSD actually says it's running at 75hz) when no control panel in windows offers anything but 60
[18:42:42] *** nmatrix9 has joined ##java
[18:43:01] *** LostMonarch has joined ##java
[18:43:05] <bravestar> is there a way to determine if the monitor is an lcd (and hence 60 hz is fine) or a crt?
[18:44:48] *** FireSlash has quit IRC
[18:47:03] *** monestri has quit IRC
[18:48:32] *** r0bby_ has joined ##java
[18:49:20] *** pierrep has quit IRC
[18:49:20] *** shadewind has quit IRC
[18:49:20] *** kater_ has quit IRC
[18:49:20] *** LouisJB has quit IRC
[18:49:20] *** ricky_clarkson has quit IRC
[18:49:20] *** jkriesten has quit IRC
[18:49:20] *** r0bby has quit IRC
[18:49:20] *** Gracenotes has quit IRC
[18:49:20] *** SinnerG has quit IRC
[18:49:20] *** Dzarg has quit IRC
[18:49:20] *** Xianny has quit IRC
[18:49:20] *** _Maru_ has quit IRC
[18:49:28] *** nmatrix9 has quit IRC
[18:50:32] *** squiddle has joined ##java
[18:50:41] *** ricky_clarkson has joined ##java
[18:50:41] *** pierrep has joined ##java
[18:50:41] *** shadewind has joined ##java
[18:50:41] *** kater_ has joined ##java
[18:50:41] *** LouisJB has joined ##java
[18:50:41] *** SinnerG has joined ##java
[18:50:41] *** jkriesten has joined ##java
[18:50:41] *** Gracenotes has joined ##java
[18:50:41] *** Xianny has joined ##java
[18:50:41] *** Dzarg has joined ##java
[18:50:41] *** _Maru_ has joined ##java
[18:51:12] *** aksn has quit IRC
[18:51:54] *** LouisJB has left ##java
[18:52:28] *** monestri has joined ##java
[18:52:47] *** monestri has quit IRC
[18:52:52] *** monestri has joined ##java
[18:53:03] *** monestri has quit IRC
[18:53:14] *** monestri has joined ##java
[18:55:09] *** Bonix has quit IRC
[18:56:28] *** Trowalts has quit IRC
[18:56:51] *** Trowalts has joined ##java
[18:58:13] *** E-XtraCt has joined ##java
[19:00:59] *** igordcard has quit IRC
[19:01:40] *** ricky_clarkson has left ##java
[19:01:54] <E-XtraCt> I get the following error: http://pastebin.com/d27d2f3f6 , how can I fix this error ?
[19:02:09] *** semanticpc has joined ##java
[19:02:12] <TryNiX> Hmmm. What's would be the best way to store an array of objects and a # related to that objected, with ability to sort the objects based on that number?
[19:02:36] <semanticpc> how do i remove the whitespaces in a string ??
[19:03:09] <_W_> TryNiX, not enough info; might be a SortedMap
[19:03:25] <_W_> semanticpc, try one of the String methods
[19:03:30] *** gdoko has quit IRC
[19:03:36] *** Frostix has quit IRC
[19:03:37] <_W_> I'm sure there's one that can help you do that
[19:04:17] *** Frostix has joined ##java
[19:04:19] *** igordcard has joined ##java
[19:04:56] <semanticpc> _W_: i hsven't done which of string processing in java ........ is there any thing equivalent to s/<(.+?)>/ $1 ...... $1 has the value of (.+?)
[19:05:55] <_W_> semanticpc, you can find out by reading the documentation
[19:06:16] <_W_> that will help you get up to speed on string processing in java much faster than me just handing you the answer
[19:06:38] <semanticpc> documentation for regex or string classes ?
[19:06:51] *** teralaser has joined ##java
[19:07:09] <_W_> well, I've already suggested String, but if you want to look elsewhere, you can do that too
[19:07:35] <ernimril> semanticpc: Pattern and Matcher will help you
[19:07:48] <ernimril> semanticpc: and the javadocs for String will as well
[19:08:43] *** Tatsh has joined ##java
[19:09:07] <Tatsh> i have a folder named .antbuild (i modified some source); it has a bunch of .class files; how do i make an executable jar?
[19:09:26] <The_Birdman> you would use the jar command
[19:09:41] *** SinnerG has quit IRC
[19:10:23] <Tatsh> yes i imagine
[19:10:26] <Tatsh> what's weird is this to me
[19:10:28] *** _bugz_ has quit IRC
[19:10:46] *** mattorantimatt has joined ##java
[19:10:54] <Tatsh> the folder layout is like org/catacombae/dmgextractor
[19:10:58] <TryNiX> _W_: sorry about lack of info. let me explain more, basically I have a quadtree, and my plan is to remove 25% of the nodes based a calculation between the nodes. So as I traverse through the tree, I want to store the nodes and the value of the calculation, then sort them out based on this calculation, and remove 25% of them
[19:11:04] <Tatsh> the folder layout is like org/catacombae/dmgextractor/DMGExtractor.class is the where the main class is
[19:11:11] <Tatsh> so how do i write a manifest file?
[19:12:07] <_W_> TryNiX, then it's better to keep a tree of 25% of the values
[19:12:18] <_W_> a TreeSet I mean
[19:12:58] <_W_> it's sorted, and once you calculate a value that makes the set go beyond 25%, you can just delete the most extreme elements until it goes down to 25%
[19:13:23] <_W_> oh, and nevermind, since you do need to know the nodes as well, TreeMap is the right answer
[19:13:39] <_W_> (you can still do the "keep it down to 25%" strategy to limit space use)
[19:14:41] *** prgrmr has quit IRC
[19:16:44] *** DjZemich has joined ##java
[19:16:59] *** mele- has joined ##java
[19:18:05] *** LouisJB has joined ##java
[19:18:15] *** amz has quit IRC
[19:18:25] *** Agamemnus has joined ##java
[19:19:41] <Agamemnus> True or false? "<A5c11Char5et> Java's okay - in a psychotic kind of a way"
[19:21:34] <waz> True - A5c11 is an idiot
[19:25:32] *** Frostix has quit IRC
[19:26:24] <repnop> he must be trapped in the mid 90s ;)
[19:26:33] <Agamemnus> well
[19:26:42] <Agamemnus> I'm pretty sure this was true in 2005
[19:26:43] *** E-XtraCt has quit IRC
[19:26:46] <Agamemnus> so that's mid 200s
[19:26:49] <Agamemnus> 2000s*
[19:26:59] <Agamemnus> so.... trapped in mid 2000s
[19:27:02] <Agamemnus> :P
[19:27:04] <repnop> hardly
[19:27:08] <Agamemnus> always
[19:27:23] * Agamemnus runs
[19:27:24] <repnop> 1.5 was already out...
[19:28:22] *** c369 has joined ##java
[19:28:59] <Agamemnus> java is to me like arsenic is to humans
[19:29:20] <Agamemnus> so you will never convince me, or any of us "dissenters"!
[19:29:24] * Agamemnus runs
[19:29:26] *** Agamemnus has left ##java
[19:31:17] *** rajesh has joined ##java
[19:35:30] *** prgrmr has joined ##java
[19:36:09] *** waz has quit IRC
[19:37:33] *** Helios has quit IRC
[19:38:24] *** daxton has quit IRC
[19:38:28] *** Andrew`_ has quit IRC
[19:38:32] *** ravv has quit IRC
[19:39:00] *** Epcylon has quit IRC
[19:39:51] <examancer> funny troll :-)
[19:40:04] *** ancientscin has joined ##java
[19:40:12] <ancientscin> hi all
[19:40:45] *** bravestar has quit IRC
[19:40:58] <ancientscin> how to kill the task on java API?
[19:42:08] *** AhtiK has quit IRC
[19:43:22] *** mbroeker has joined ##java
[19:43:51] *** c369 has quit IRC
[19:43:52] *** cambazz has joined ##java
[19:44:07] <cambazz> hello. how do I tell if i have a 64bit vm or a 32bit vm
[19:44:19] <The_Birdman> java -version
[19:44:46] <cambazz> I installed opensolaris, and although not amd, this is a 64bit intel, but for some reason it installed with 32bit java i think
[19:44:55] *** waz has joined ##java
[19:45:32] <cambazz> The_Birdman: it will not say if it is the 64bit or the 32bit vm
[19:45:51] <cambazz> java version 1.6.0_10 it will say
[19:46:24] *** Greyhound- has joined ##java
[19:47:22] *** bravestar has joined ##java
[19:50:05] *** nytejade has quit IRC
[19:50:10] *** DjZemich has quit IRC
[19:50:17] *** cambazz has quit IRC
[19:51:16] *** Woflborg has quit IRC
[19:54:14] *** ancientscin has left ##java
[19:55:17] *** convivial has quit IRC
[19:58:25] *** kane77 has quit IRC
[19:58:42] *** Sikul has quit IRC
[19:59:02] *** m4rtijn has quit IRC
[19:59:05] *** Lethalman has joined ##java
[19:59:09] <Lethalman> hello
[19:59:20] <Lethalman> I'm not able to use any video with jmf
[19:59:35] <Lethalman> it always says "Unable to handle format: XXX" for all kind of formats
[19:59:58] *** convivial has joined ##java
[20:02:50] *** The_Birdman has left ##java
[20:04:25] *** genesiss has joined ##java
[20:05:19] *** UK-sHaDoW has quit IRC
[20:08:37] *** romanb has joined ##java
[20:08:42] *** squi has quit IRC
[20:10:43] <cybereal> Lethalman: that's because it handles almost nothing by default
[20:12:48] <waz> jmf in general is a royal pain
[20:13:06] *** c369 has joined ##java
[20:13:14] *** elindio has joined ##java
[20:13:17] *** Dr_Link has joined ##java
[20:14:25] *** Tatsh has left ##java
[20:15:24] <Lethalman> cybereal: I've found jffmpeg
[20:15:29] <Lethalman> anybody tried it already?
[20:16:33] <cybereal> not me, I'd have to have my arm twisted to be using java for this kind of application
[20:17:15] *** landonf has joined ##java
[20:19:41] *** musically_ut has quit IRC
[20:20:20] *** igordcard has quit IRC
[20:20:23] *** amz has joined ##java
[20:20:35] *** igordcard has joined ##java
[20:23:00] *** meanburrito920_ has joined ##java
[20:24:18] *** DjZemich has joined ##java
[20:24:38] *** DjZemich has quit IRC
[20:25:30] *** mattorantimatt has quit IRC
[20:29:50] *** ScottG489 has quit IRC
[20:31:02] *** Goundy has joined ##java
[20:32:32] *** asap18 has quit IRC
[20:33:37] *** Niike has quit IRC
[20:36:40] *** [S^K] has quit IRC
[20:38:06] *** ScottG489 has joined ##java
[20:39:15] *** asap18 has joined ##java
[20:41:53] *** BlindHunter has quit IRC
[20:42:45] *** igordcard has quit IRC
[20:44:18] *** asap18 has quit IRC
[20:45:06] *** nocture has quit IRC
[20:45:59] *** gigo has joined ##java
[20:46:07] <gigo> why is Java considered type unsafe language?
[20:46:13] <gigo> can someone give examples of its type unsafety?
[20:46:42] <Lethalman> solved
[20:46:51] *** Lethalman has left ##java
[20:47:12] *** Junior has quit IRC
[20:47:18] <aceofspades19> gigo: can you explain what you mean by type unsafe?
[20:47:25] *** jabalsad has joined ##java
[20:47:46] <Nebulam> Are you talking about javascript?
[20:49:01] <Nebulam> java is strictly typed
[20:49:09] <Nebulam> I think you need #javascript
[20:50:05] <aceofspades19> I curse the people at netscape that decided to call it javascript
[20:50:17] <Nebulam> haha no doubt
[20:50:42] <Nebulam> we should start calling it ecma script since that is what it really is
[20:51:08] <aceofspades19> we would be a lot better off if it didn't exist at all
[20:51:34] <aceofspades19> Nebulam: good luck getting everyone to call it that ;)
[20:51:41] <Nebulam> :/
[20:52:19] *** marvi has joined ##java
[20:52:32] <Nebulam> Now GIGO is in c# asking about mono :)
[20:52:38] <aceofspades19> lol
[20:52:41] <Nebulam> hehe
[20:52:52] <aceofspades19> it wouldn't suprise me if he was a bot
[20:52:56] <Nebulam> lol
[20:53:10] <gigo> oops. sorry. I went back to my book. didn't see the discussion here.
[20:53:42] <aceofspades19> gigo: so are you talking about java or javascript?
[20:53:57] <gigo> i was talking about java.
[20:54:11] <Nebulam> java is strongly typed like c#
[20:54:16] <gigo> actually, I found this in wikipedia: http://en.wikipedia.org/wiki/Type_safety#Type-safe_and_type-unsafe_languages
[20:54:25] <gigo> "On the other hand, some languages, like Java, have been proved to not meet this definition of type safety"
[20:54:37] <gigo> is this true? it doesn't cite any example of its type unsafety.
[20:54:47] <aceofspades19> I think it is wrong
[20:54:52] <Nebulam> probably true, but in practice it's a type safe language
[20:54:57] <Nebulam> so does it really matter
[20:55:06] <aceofspades19> you can't even cast a bool to an int
[20:55:37] *** EspenG has joined ##java
[20:56:49] <aceofspades19> this looks interesting http://www.cis.upenn.edu/~bcpierce/courses/629/papers/Saraswat-javabug.html
[20:57:20] *** semanticpc has left ##java
[20:57:29] <Nebulam> yeah i think i won't read all that :)
[20:57:34] *** JohnBat26 has joined ##java
[20:58:55] *** Epcylon has joined ##java
[21:00:28] *** BeholdMyGlory has joined ##java
[21:00:31] <aceofspades19> I think the person that wrote that had too much time on his hands
[21:00:58] <Nebulam> That's precisley what I as thinkging
[21:01:27] <aceofspades19> and it covers java 1.1.3
[21:01:46] *** elementz has joined ##java
[21:01:47] <aceofspades19> so there is a good chance that stuff has changed by now
[21:03:20] <BeholdMyGlory> if I the letters a, b, c, d, e and f, what is the best way to find all possible combinations if there can only be one occurence of each letter in every combination?
[21:03:50] <Nebulam> permutations?
[21:03:54] <BeholdMyGlory> yes
[21:04:10] <Nebulam> You'll want to use recursion :)
[21:04:13] <Nebulam> Fun stuff
[21:04:47] *** Frostix has joined ##java
[21:04:52] *** LouisJB has quit IRC
[21:04:59] *** radixor_ has joined ##java
[21:05:24] <BeholdMyGlory> that sounds bad. especially in java, what with the limited memory and all.
[21:05:51] <Nebulam> Well it's the only way
[21:06:03] <marvi> Yes, you should never use recursion in Java. :-)
[21:06:11] *** elementz has joined ##java
[21:06:17] *** push[EAX] has joined ##java
[21:06:39] <push[EAX]> how do I make a JPanel take up all the size it needs programatically ?
[21:06:51] *** romanb has quit IRC
[21:06:59] *** Woflborg has joined ##java
[21:07:07] <Nebulam> They do automatically
[21:07:19] <push[EAX]> The contents of my JPanel change size (an image mostly) and do not resize properly unless I click the window's edge
[21:07:43] <push[EAX]> (The JPanel is inside a JScrollPane)
[21:08:01] <BeholdMyGlory> have you tried validate()?
[21:08:13] <marvi> (Irony. Of course you can use recursion. Limited memory? In what environment is there no memory limits?)
[21:08:17] <push[EAX]> So it uses the scroll to cover the whole thing, but when i click the window's edge, the scroll gets resized properly
[21:08:22] <push[EAX]> nop, haven't tried that
[21:09:13] *** UK-sHaDoW has joined ##java
[21:10:11] <push[EAX]> adding a validate just after the image change doest resize it properly either :/
[21:10:14] *** TheiPirate has quit IRC
[21:10:48] <push[EAX]> I get resized the very milisecond I click the window frame so I guess there's a callback involved here
[21:10:51] <push[EAX]> it*
[21:11:17] <push[EAX]> i just need to force a call to it...
[21:11:22] *** resmo has quit IRC
[21:11:24] <BeholdMyGlory> push[EAX]: you'll want to be sure that you use validate on the right component. you might have to use it on the scrollpanes viewport (scrollpane.getViewPort().validate())
[21:11:37] <push[EAX]> oh
[21:12:25] *** LouisJB has joined ##java
[21:12:43] <push[EAX]> No :(
[21:13:34] <push[EAX]> maybe if I setSized to the preferred size...
[21:14:12] <push[EAX]> preferredsize is computed internally on a jpanel right ?
[21:14:13] *** SystemWizard has joined ##java
[21:14:15] *** andrewkasper has quit IRC
[21:14:37] *** BlindHunter has joined ##java
[21:14:39] <BeholdMyGlory> hm. well, then I don't know... i guess you could try it on the scrollbars...
[21:15:06] *** alg0rithm has joined ##java
[21:16:01] *** Copter has quit IRC
[21:16:16] *** elementz has joined ##java
[21:16:39] *** elementz has quit IRC
[21:17:32] *** NiallC has joined ##java
[21:18:27] *** vix85 has quit IRC
[21:18:52] *** Nebulam has quit IRC
[21:18:58] *** ankylose has quit IRC
[21:19:44] *** elementz has joined ##java
[21:19:45] *** jabalsad has quit IRC
[21:19:52] *** radixor has quit IRC
[21:19:54] *** elementz has quit IRC
[21:19:59] *** jabalsad has joined ##java
[21:20:06] *** BlindHunter has quit IRC
[21:21:46] *** ankylose has joined ##java
[21:21:52] *** viperhr has joined ##java
[21:22:45] *** radixor_ has quit IRC
[21:27:26] *** criminy is now known as criminy[pocky-ru
[21:27:32] *** criminy[pocky-ru is now known as criminy|pockyrun
[21:27:40] *** aksn has joined ##java
[21:27:43] *** ankylose has quit IRC
[21:27:58] *** kane77 has joined ##java
[21:28:13] <push[EAX]> :DDD
[21:28:38] <push[EAX]> BeholdMyGlory, works #1 when doing validate on the master panel (who contains a lot of other little panels, including the problematic one)
[21:29:33] *** examancer has quit IRC
[21:31:35] *** waz is now known as Guest99865
[21:32:11] *** waz has joined ##java
[21:32:46] <BeholdMyGlory> push[EAX]: good for you :)
[21:33:18] *** asap18 has joined ##java
[21:34:17] *** landonf has quit IRC
[21:35:53] *** aweber has joined ##java
[21:37:26] *** daxton has joined ##java
[21:42:55] *** Nebulam has joined ##java
[21:43:51] *** Trowalts has quit IRC
[21:44:29] *** TrentCreek has joined ##java
[21:46:11] *** repnop has quit IRC
[21:46:37] *** morkar- has quit IRC
[21:47:08] *** Guest99865 has quit IRC
[21:47:37] *** ipsnap has joined ##java
[21:47:41] <ipsnap> hello
[21:48:13] *** hyppias has quit IRC
[21:48:15] <ipsnap> I am using JAXB with spring framework... how do i enable schema validation?
[21:49:44] *** morkar- has joined ##java
[21:49:56] *** tote has joined ##java
[21:51:11] *** Bollinger has quit IRC
[21:53:09] <tote> whats the big-o for ceiling() in TreeSet ?
[21:55:01] *** epoxy has quit IRC
[21:59:40] *** TooAngel has joined ##java
[22:00:54] *** tomvolek has joined ##java
[22:01:17] *** tilerendering has quit IRC
[22:04:37] <dangertools> tote: there is no TreeSet.ceiling()
[22:05:33] *** pierrep has quit IRC
[22:05:55] *** senxhnsshp has joined ##java
[22:06:11] <senxhnsshp> what do you get from a JFileChooser if the user presses cancel?
[22:06:27] <ernimril> senxhnsshp: what happen when you try it?
[22:06:28] <_W_> try it and see
[22:06:33] <tote> dangertools: http://java.sun.com/javase/6/docs/api/java/util/TreeSet.html#ceiling(E) ?
[22:06:55] <_W_> tote, if you know that TreeSet is a balanced tree, what do you think the big-o is?
[22:07:10] <tote> logn
[22:07:27] <dangertools> tote: ah, that's new since java6, i looked at java5's api
[22:07:38] <_W_> tote, so why ask if you know the answer?
[22:08:03] <tote> because im not sure, and i need to be, and why is it true that ceiling is logn?
[22:08:07] <_W_> hell, the docs almost straight out states it
[22:08:28] <_W_> contains is logn, so it stands to reason ceiling would be as well, as it follows the same algorithm
[22:08:37] <tote> oh
[22:09:16] <tote> thanks _W_
[22:11:09] *** Nebulam has quit IRC
[22:15:47] <r0bby_> tote: why not ask your professor/ta?
[22:16:12] <tote> r0bby_: its sunday :)
[22:16:17] <r0bby_> email.
[22:16:28] <r0bby_> or el google.
[22:16:42] <r0bby_> oh right it's sunday... google doesn't work on sunday
[22:16:51] <tote> :P
[22:17:09] *** TooAngel has quit IRC
[22:17:16] <staar2> wow
[22:18:56] *** dorito has quit IRC
[22:18:59] *** strategy has left ##java
[22:19:06] *** strategy has joined ##java
[22:19:26] *** Ven]n has joined ##java
[22:20:13] *** BigAllan has joined ##java
[22:20:21] *** ChanServ sets mode: +o JavaGeek
[22:20:25] *** Inc` has quit IRC
[22:21:19] *** Inc` has joined ##java
[22:21:37] *** ChanServ has quit IRC
[22:22:14] *** gigo has quit IRC
[22:22:20] <senxhnsshp> public File getSelectedFile() <- can such a method return null?
[22:23:01] <JavaGeek> senxhnsshp: any method returning an object can (potentially) return null...
[22:23:52] *** buntfalke has quit IRC
[22:28:04] *** Daniel_G has quit IRC
[22:28:41] *** ChanServ has joined ##java
[22:28:41] *** irc.freenode.net sets mode: +o ChanServ
[22:29:18] *** thunderbolt has joined ##java
[22:29:56] *** tom17bombadil_ has quit IRC
[22:30:16] *** andrewkasper has joined ##java
[22:31:57] *** abruptus has joined ##java
[22:33:09] *** phyburn has joined ##java
[22:33:21] *** mattorantimatt has joined ##java
[22:34:42] *** ankylose has joined ##java
[22:35:07] <senxhnsshp> null sucks
[22:35:35] *** flippo has joined ##java
[22:36:45] *** Daniel_G has joined ##java
[22:37:18] <teralaser> Null exceptions suck more
[22:37:50] <JavaGeek> null brainmatter is the ubersuck...
[22:38:15] <teralaser> not really, ask Britney
[22:38:36] *** isoieci has joined ##java
[22:38:50] *** Daniel_G has quit IRC
[22:38:51] <JavaGeek> teralaser: well, there are different levels of suckage... :)
[22:39:55] <isoieci> other than restricting the frame size, is there another way to restrict the size of a JButton? setPreferredSize seems ineffective because if the frame can be resized then the button scales in relation to the frame
[22:40:03] *** tomvolek has quit IRC
[22:40:14] *** tomvolek has joined ##java
[22:40:27] <teralaser> isoieci : there are max and min size
[22:40:28] *** Daniel_G has joined ##java
[22:40:40] <teralaser> but your problem is probably with the layoutmanager
[22:41:02] *** meanburrito920_ has quit IRC
[22:41:04] <isoieci> it's actually JButtons in a panel contained in a frame
[22:41:10] <isoieci> the JPanel uses GridLayout
[22:41:35] <teralaser> yeah, that's ugly :)
[22:42:04] <isoieci> teralaser: what would be preferred?
[22:42:07] <teralaser> how about using matisse (the netbeans gui helper) or gridbaglayout ?
[22:42:18] <teralaser> ~gbl
[22:42:34] <teralaser> hm, no bot...
[22:42:47] <JavaGeek> javabot is dead...
[22:43:25] *** sfragis has quit IRC
[22:43:31] <teralaser> another technique is to use panels in panels ... but it gets messy :-)
[22:45:49] *** staar2 has quit IRC
[22:45:59] *** Yustme has quit IRC
[22:46:39] <isoieci> I would use netbeans but this is for class and I'm restricted to use Border, Flow, and Grid layout. Anyway, I learned about two methods to set a min and max size for a JComponent but I'll just restrict the frame from being resized for simplicity.
[22:46:43] <isoieci> teralaser: thanks
[22:47:04] <teralaser> ;)
[22:47:05] *** Mkop2 has joined ##java
[22:48:34] *** criminy|pockyrun is now known as criminy
[22:48:55] *** Donyc has joined ##java
[22:54:32] *** timte has quit IRC
[22:54:33] <senxhnsshp> is it normal for just simple GUIs to take sveral hundred lines of code? i made na mp3player using JLayers decoder so I did just the GUI myself(in swing). it has play, stop, shuffle, and some playlist-functions. it is about 400 lines of code...seems a lot althought everything seems necessary
[22:56:00] *** strategy is now known as tactics
[22:56:37] <flippo> senxhnsshp, I always count semicolons
[22:57:28] *** Mkop2 has quit IRC
[22:59:27] *** Daniel_G has quit IRC
[23:00:00] <Tenac> If I have class A that created instances of class B, can class B in any way find what class created itself, in this case class A created them?
[23:00:34] *** senxhnsshp has quit IRC
[23:01:43] * teralaser reread that senxhnsshp many times and kept reading the wrong thing.
[23:01:45] <teralaser> :|
[23:01:54] <teralaser> that nick even
[23:02:40] *** JohnBat26 has quit IRC
[23:04:48] *** Dandre has joined ##java
[23:08:38] *** pilkarn has joined ##java
[23:08:48] *** aslag has joined ##java
[23:08:51] *** Aquanox has quit IRC
[23:09:00] <pilkarn> flippo: why?
[23:09:07] <pilkarn> how many methods are reasonable then?
[23:09:08] <Dandre> hello,
[23:09:53] *** ahughes has joined ##java
[23:09:58] *** kavon has joined ##java
[23:10:01] <Dandre> How can I know which EOL terminator is used within a FileReader object?
[23:10:12] *** Dr_Link has quit IRC
[23:10:16] *** Dr_Link has joined ##java
[23:10:26] <kavon> Hi, is this a good way to make sure only people with a later version of Java uses my program? http://pastebin.com/d7502bf30
[23:10:35] *** pilkarn has quit IRC
[23:10:41] <kavon> or is the comparison flawed (aka IcedTea might have diffrent versioning)
[23:11:41] *** criminy is now known as criminy|food
[23:13:34] *** sebr has joined ##java
[23:15:23] *** kane77 has quit IRC
[23:17:03] *** juc0 has joined ##java
[23:18:19] *** pilkarn has joined ##java
[23:18:37] <pilkarn> isnt it possible to use skins/bitmaps for Java Swing GUIs?
[23:18:50] *** deadbeef has joined ##java
[23:19:12] <deadbeef> hi dear friends, excuseme: how do i specify the -Djava.build.path for a project under eclipse?
[23:19:38] <r0bby_> I believe in the Run dialog somewhere
[23:19:54] <r0bby_> ask in #eclipse
[23:19:58] <deadbeef> thanks a lot
[23:20:03] <aslag> does anyone else find the vim plugin for eclipse totally laggy and retarded? is there any known alternative?
[23:20:11] <aslag> (of course besides using vim or vi itself)
[23:20:21] <r0bby_> aslag: IntelliJ IDEA O:-)
[23:20:41] <gjvc> 8.1 is good
[23:21:06] <linear`> aslag i tried it and it wouldnt work if i had two files open
[23:21:22] <aslag> maybe that's the problem
[23:21:33] <cybereal> aslag: that plugin is wretched
[23:21:35] <aslag> I don't use proprietary software so idea is right out
[23:21:40] <cybereal> aslag: google for eclim
[23:21:51] <flippo> I think there's a proprietary vi plugin for eclipse. %¬]
[23:22:14] <cybereal> flippo: I thought that's all there was (and it's the one I say is crap)
[23:22:15] *** Bonix has joined ##java
[23:22:16] <aslag> I've looked at eclim
[23:22:24] <aslag> has anyone used it?
[23:22:32] <flippo> cybereal, evidently aslag isn't using it though
[23:23:00] <Dandre> is there a simple way to know the end of line convention used by a text file?
[23:23:12] <flippo> (Maybe someone is ignoring the licensing terms.)
[23:23:24] <cybereal> Dandre: how would you figure it out as a human with any inspection tools at your beck and call?
[23:23:45] <aslag> maybe someone bends a bit for a plugin written by one dude; a whole damned proprietary ide is right out
[23:23:47] *** pilkarn has quit IRC
[23:23:51] <flippo> Dandre, grep?
[23:23:52] <aslag> :)
[23:24:08] <cybereal> aslag: your ideals are seriously misplaced
[23:24:14] <Dandre> I read it with a BufferReader
[23:24:14] <flippo> aslag, you don't like paying, I think. %¬]
[23:24:26] <cybereal> I mean, chances are, you're doing everything computing-wise right now on proprietary hardware
[23:25:04] *** taraskostiak has quit IRC
[23:25:12] <cybereal> patented designs, copyrighted secret proprietary microcode
[23:25:19] <aslag> induldge me; show me the contradiction of values here if I use intel processors and believe in free software
[23:25:26] <cybereal> you better go hide in a hut in the forest to be sure to avoid proprietary anything!
[23:25:29] *** moradan has quit IRC
[23:25:39] <Dandre> I am thinking in testing the 2 last character of the fisrt line but if there is some standard clas that provide this info it is better
[23:25:45] *** Goundy has quit IRC
[23:26:02] <r0bby_> Dandre: what are you trying to do?
[23:26:04] <cybereal> aslag: you just demonstrated the contradiction! that cpu design isn't free
[23:26:07] <cybereal> or open
[23:26:17] *** Vantaa has quit IRC
[23:26:26] <cybereal> hehe gotta love freetards
[23:26:55] <aslag> hmm, so if I claim to support open-source software and want to not use proprietary software, I need to not use any proprietary hardware?
[23:27:00] <Dandre> I have a test file and I want to know weather it is in UNIX, DOS or MAR format
[23:27:01] <aslag> should I also design my own car?
[23:27:03] <Dandre> MAC
[23:27:05] <cybereal> exactly
[23:27:06] <aslag> washing machine?
[23:27:11] *** heyqule has joined ##java
[23:27:33] <aslag> open source biscuits?
[23:27:39] <cybereal> aslag: you're hypocritical seeing as any of the even most remotely sane reasoning behinds such stances apply equally to hardware, especially CPUs, BIOS's, etc. as they do to software
[23:27:49] <aslag> (if the chef won't give me the recipe, I shouldn't eat it, right?)
[23:27:59] <cybereal> hey you're the freetard, you tell me
[23:28:01] <r0bby_> aslag: yup!
[23:28:07] *** flippo has quit IRC
[23:28:26] <r0bby_> aslag: do you use an nvidia graphics card? I'm not sure if their driver is open
[23:28:47] <r0bby_> last i checked it wasn't though (i may be wrong on this)
[23:28:56] * r0bby_ withdraws from the bashing
[23:29:08] <cybereal> r0bby_: that was feeble
[23:29:20] <aslag> you can't see relevant differences between hardware and software such that I can abstain from proprietary software and not proprietary hardware?
[23:29:46] <aslag> one relevant difference is distribution (since software is an idea)
[23:29:55] *** heyqule has quit IRC
[23:29:59] <cybereal> no, I can't see why you could possibly idealise "free" software and be okay with proprietary ... anything else really
[23:30:20] <cybereal> software's not an idea, that's a load of shit, software's a well defined system of instructions
[23:30:20] <aslag> it's valuable to be able to fix and distribute software, maybe even audit it for security; I can't do this with hardware
[23:30:23] *** DragonLord- has quit IRC
[23:30:34] <cybereal> just because you can't you don't think it's good to be able to?
[23:30:49] <aslag> well those are two different things
[23:30:55] <cybereal> well if that isn't a classic case of philosophical projectionism...
[23:30:58] <aslag> and by an "idea" I mean it has no physical manifestation
[23:31:01] <aslag> ha!
[23:31:05] <aslag> and what is that, exactly ?
[23:31:13] <aslag> (I have a degree in logic and philosophy, btw)
[23:31:25] <cybereal> my ass it has no physical manifestation, it's not magic, the physical medium on which it's stored is altered in order to represent the instructions, which the cpu follows
[23:31:35] <aslag> I was going to explain to you how your argument is fallacious, but you're moving too fast with this ill-reasoning for me to keep-up :)
[23:31:49] <aslag> hmm
[23:31:50] <aslag> ok
[23:31:54] <cybereal> aslag: you applying idealistic philosophy based solely around your personal interests or capabilities
[23:32:01] *** bas-i has quit IRC
[23:32:14] *** tomvolek has quit IRC
[23:32:15] <aslag> idealistic philosophy, what is that?
[23:32:25] <cybereal> get a fucking dictionary
[23:32:46] <aslag> (it sounds like you don't know what you're talking about ... are you talking about some sort of metaphysical idealism?
[23:33:04] <aslag> let's go this route ..
[23:33:05] <cybereal> no, I'm talking about what I said, so quit babying around and admit you're a freetard
[23:33:20] <aslag> software is held on a medium, right?
[23:33:35] <aslag> lasers alter optical discs, magnets alter hd platters
[23:33:41] <aslag> the data is stored someplace
[23:33:53] <aslag> (also in your mind)
[23:34:12] <aslag> but the program itself (instructions, etc.) are medium-independent
[23:34:42] <cybereal> no, they are really only useful in a very small subset of medium designed specifically for the purpose of carrying such data
[23:35:11] <aslag> and the interpreter that runs the program is program itself, so it has the same media restrictions
[23:35:54] <aslag> but the program itself (instructions as you say) has no physical manifestations
[23:36:02] <aslag> *manifestation
[23:36:20] <aslag> it is an idea, just as the content of your mind only has medium, not manifestation
[23:36:24] <cybereal> no, we already covered this, they are very physical, as physical as anything else in the computer
[23:36:33] <aslag> so where is the program?
[23:36:38] <cybereal> that's also bullshit, the medium is the manifestation
[23:36:43] <aslag> just as I may ask where is the idea in your mind?
[23:37:00] <cybereal> aslag: you already know the answers to your dumb ass questions
[23:37:33] <aslag> (I ask because YOU are confused about it, not because I think your answers are right and want to know them )
[23:37:33] <cybereal> for someone who supposedly has a degree in logic and philosophy you're doing a pretty piss-poor job at arguing
[23:37:44] <aslag> hmm
[23:37:48] <aslag> why is that?
[23:38:04] *** doc`` has joined ##java
[23:38:09] <cybereal> you're worse than a politician, you're trying dirty argument avoidance tactics but you're failing at all of them
[23:38:11] <cybereal> cute those
[23:38:31] <cybereal> s/those/though
[23:38:34] <tactics> These nicks really are annoying.
[23:38:43] <aslag> that's your third fallacy, actually
[23:38:51] <aslag> the first was a false analogy (hardware and software)
[23:38:56] <aslag> the second was a slippery slope
[23:39:22] <aslag> the third, now, is ad hominem
[23:39:23] <cybereal> aslag: only in your deranged imagination, surely the same place where you think the ideal of only using proprietary software makes any sense
[23:39:43] <tactics> How would using only proprietary software make any sense?
[23:40:23] <cybereal> hah sorry meant non-proprietary
[23:40:28] <tactics> :o
[23:40:31] <cybereal> tactics: an ideal for either one makes no sense
[23:40:36] <tactics> i agree.
[23:40:47] *** criminy|food is now known as criminy
[23:40:51] <tactics> aslag, no, obviously inscructions are not physical elements, but they obviously exist in a semi-tangible form.
[23:40:52] *** bravestar has quit IRC
[23:40:53] <cybereal> but especially being against proprietary software due to the proprietary nature of every other piece of the computing system, networks, etc. that are in use
[23:41:02] <aslag> it's probably time for us to quit and for me to get back to my program, seeing as how not much can come of this; I'm not THAT good, I'm certainly no socrates you know :)
[23:41:06] <tactics> aslag, the text i wrote is not physics, but it's tangible.
[23:41:22] <tactics> physical*
[23:41:51] <aslag> (you're kind of like euthyphro, actually
[23:42:06] <aslag> are you familiar with that diaglogue?
[23:42:12] <aslag> I'd start there if I were you
[23:42:23] <tactics> are you talking to me or cybereal?
[23:42:36] <cybereal> tactics: philosophers only talk to themselves
[23:42:41] <tactics> :o
[23:42:42] <aslag> cybereal
[23:43:14] <marvi> This Java related discussion is really interesting.
[23:43:16] <aslag> tactics ok, I'll bite
[23:43:31] <aslag> what is the difference between something physical and something "tangible"
[23:43:32] <aslag> ?
[23:43:48] <tactics> marvi, i think the factioid is like !interesting or something.. maybe !offtopic
[23:43:54] <tactics> aslag, idk i'm not an english professor
[23:43:58] <tactics> think about it
[23:44:02] <tactics> you can see and use my text
[23:44:04] <tactics> but can you touch it?
[23:44:06] <tactics> not really.
[23:44:45] <aslag> sure, I'll agree with that proposition
[23:44:49] *** garotosopa has left ##java
[23:44:56] <aslag> and how does this relate to software?
[23:44:56] <cybereal> tactics: it's touching you
[23:44:57] *** TryNiX has quit IRC
[23:45:02] <tactics> o.O
[23:45:22] <cybereal> tactics: the photons, arranged so delicately by the system, including the monitor, are hitting your eyes
[23:45:27] <cybereal> it's *VERY* physical
[23:45:44] <tactics> actually i'm reading, and typing, this conversation telepathically
[23:45:51] <tactics> i'm far away from my computer ^^
[23:45:52] <cybereal> heh
[23:45:58] <aslag> cybereal is right, something is physical in the process, but what?
[23:46:07] <aslag> there is some phenomenon there
[23:46:26] * tactics walks off and mumbles something about cybereal being too damn smart
[23:46:26] *** elindio has quit IRC
[23:46:26] *** zed_DX has joined ##java
[23:46:30] <cybereal> everything is physical, even ideas, as they are merely a function of a physical device, a brain
[23:46:42] *** pilkarn has joined ##java
[23:46:46] <tactics> heh
[23:46:50] <aslag> so ideas are physical too, being a function of something physical?
[23:47:02] <cybereal> constant reconfiguration of electrical and chemical particles... how can you not see that the distinguishing of physical things and ideas is a meaningless effort?
[23:47:03] <aslag> so if something is a function of something physical, it to is physical?
[23:47:12] * r0bby_ gets popcorn
[23:47:51] * tactics stares at r0bby_, who took tactics's popcorn!
[23:47:57] <cybereal> switches, energy organization, reactions, all very basic physical properties of matter being manipulated by other matter
[23:48:04] <aslag> sure
[23:48:05] * tactics kicks r0bby_ and takes his popcorn back
[23:48:10] <cybereal> aslag: so yes, it's all physical
[23:48:14] <aslag> so consciousness is "physical" in this sense?
[23:48:19] <cybereal> indeed
[23:48:27] <marvi> Let's all get physical.
[23:48:32] *** Ivellina has quit IRC
[23:48:36] <aslag> and not "brought about" by something physical, but "physical" itself
[23:48:37] <tactics> however, aslag's brain is not physical, as it can't be since it does not exist.
[23:48:39] <cybereal> you'll need something more meaningful if you're really going to try and differentiate the value of proprietary hardware vs. software
[23:48:55] <cybereal> r0bby_: hey what's up with javabot?
[23:49:10] <aslag> and do all things in the "physical world" operate according to physical laws?
[23:49:34] <r0bby_> cybereal: Do I LOOK like cheeser?
[23:49:38] <aslag> (btw, we're pretty deep into metaphysical claims by now, it's going to get bad really fast)
[23:49:46] <r0bby_> chances are i do not.
[23:49:55] <cybereal> I suppose that depends on whether you're being serious asking that scientifically or if you're going to apply a subjective nonsensical philosophical spin on the word 'law' :)
[23:49:55] <tactics> r0bby_, you do kind of look like cheese.
[23:49:57] <aslag> if my ideas are physical, why are they not bound by the laws of physics or something?
[23:49:59] <tactics> :p
[23:50:02] <aslag> and that doesn't even seem to make sense
[23:50:03] <cybereal> aslag: they are
[23:50:05] <r0bby_> tactics: so do you
[23:50:08] <tactics> :(
[23:50:19] <aslag> so gravity for example
[23:50:27] <aslag> how does that bind my ideas?
[23:50:34] <aslag> (which are physical, according to you)
[23:50:43] <cybereal> it keeps them from floating away from the planet of course :)
[23:50:50] <cybereal> it also breaks them all if you fall too far :)
[23:51:15] *** poseidon has joined ##java
[23:51:16] *** zrunn has joined ##Java
[23:51:26] <cybereal> really, I think you have to be some kinda of churchy to think there even is a "metaphysical"
[23:51:28] <aslag> what about other "physical" things like, say, numbers
[23:51:37] <poseidon> How much do you think out your program before beginning to code, and how do you do it?
[23:51:43] <aslag> they are ideas, which according to you, are physical
[23:51:46] *** bas-i has joined ##java
[23:51:47] <aslag> where are numbers?
[23:51:51] *** Dewio is now known as Dewi
[23:51:52] <aslag> how can I get at them?
[23:51:52] <cybereal> poseidon: that's a pretty giant question
[23:52:00] <aslag> does natural selection bind them?
[23:52:18] <aslag> you see, this "everything is physical because it comes from something physical" argument of yours is ludicrous
[23:52:21] <poseidon> cybereal, in general for a descent size program
[23:52:44] <aslag> (and there is nothing "religious" about the study of metaphysics :) )
[23:52:56] <cybereal> aslag: just because I don't want to sit and spend the time to tediously recognize every tiny physical process involved in going from a lump of jelly to a human who recognizes a concept of numbering doesn't mean it's not physical and certainly doesn't mean it's ludicrous
[23:53:09] <cybereal> poseidon: there's no in general
[23:53:20] <aslag> so via reductio ad absurdum, your argument is proven false
[23:53:20] <cybereal> poseidon: it depends on what you've got what you need who's doing the work, etc. etc.
[23:53:26] *** t3mp3st has joined ##java
[23:53:41] <aslag> ideas, knowledge are not physical
[23:53:43] <cybereal> aslag: except that by simple observation of your surroundings you'll see that it's proven true
[23:53:49] <cybereal> yes, they are
[23:53:58] <cybereal> do you have even the most elementary idea of how a brain works?
[23:53:59] *** push[EAX] has quit IRC
[23:54:05] <aslag> actually, yes :)
[23:54:15] <cybereal> then you'll know there's no magic here, it's all physical
[23:54:15] <t3mp3st> any time I'm interacting with a remote object accessed via RMI, I want to be using the remote interface, and not the implementation class, right? i.e., if a method accepts a remote argument, that argument's type should be the interface and not the impl? I'm just ever so slightly mixed up :)
[23:54:29] *** mosno has joined ##java
[23:54:45] <cybereal> it's a pretty impressive process and phenomenon but it's not metaphysical or really that special, it's just complex
[23:54:48] <t3mp3st> its only okay to use the Impl class if I'm interacting with a remote object on the same jvm as is hosting it, correct?
[23:54:48] <aslag> to say that not everything is physical doesn't imply mysticism
[23:55:17] <linear`> elimcd is pretty good and works
[23:55:18] <aslag> cybereal: it's starting to look like you don't know what the words "physical" and "metaphysical" mean
[23:55:19] <linear`> yay
[23:55:38] <aslag> I'm not given you a mind - body distinction argument here
[23:55:41] <aslag> in fact, I'm a naturalist
[23:55:49] *** flb has quit IRC
[23:55:50] *** Carnage\ has quit IRC
[23:55:53] <aslag> so there is no special "thinking substance" or res cogitans
[23:56:00] *** poseidon has quit IRC
[23:56:04] <marvi> t3mp3st: for the service you interact with the interface, but you can have other objects that you send the implementation of as parameters or return values.
[23:56:07] <aslag> do you understand?
[23:56:09] <cybereal> aslag: I know what they mean, and if you weren't trying to make such an absurd point with them, they are potentially useful to classify scientific domains but ultimately when it comes down to it, the metaphysical is still physical, as is everything that exists
[23:56:31] <pilkarn> i try setIconImage for my JFrame but Image doesn't have something you can pass ot it in the constructor(and not im methods either). it is not ossibel to set it via a methiod either. is it not for using bitmaps/jpegs?
[23:56:36] <aslag> cybereal: "the metaphysical
[23:56:37] <aslag> +is still physical, as is everything that exists"
[23:56:38] *** BeholdMyGlory has quit IRC
[23:56:38] <cybereal> aslag: I never said there was any special anything, enough with the strawman
[23:56:52] <aslag> what does "metaphysical" mean?
[23:57:04] <aslag> (it's pretty clear that you don't know :) )
[23:57:18] <cybereal> I do believe the opposite is true
[23:57:23] <cybereal> it's YOU who doesn't know
[23:57:42] *** Dandre has left ##java
[23:57:49] <aslag> offer a definition, please
[23:58:01] <dmlloyd> "something that is discussed elsewhere than ##java"
[23:58:02] <aslag> .. that is consistent with your use of the term
[23:58:03] <t3mp3st> marvi: can you explain to me when its okay to use the implementation class as params or return values, please?
[23:58:11] *** Donyc has quit IRC
[23:58:11] <t3mp3st> (or point me to a resource)
[23:58:13] <dmlloyd> I think my definition works for any usage
[23:58:18] <aslag> dmlloyd is right, this is ludicrous
[23:58:33] <aslag> stick to writing your "physical" programs
[23:58:40] <aslag> and I'll stick to writing my "logical" ones
[23:58:58] <aslag> yours will still work even though you don't know what they are
[23:59:13] <aslag> isn't that convenient?
[23:59:29] *** teralaser has quit IRC
[23:59:43] *** teralaser has joined ##java
[23:59:45] <cybereal> what's "convenient" is the silly idea that somehow anything you do or create isn't physical, like as a human you're somehow exempt from the facts of the universe in which you exist
top

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