Switch to DuckDuckGo Search
   February 21, 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:26] *** UK-sHaDoW has joined ##java
[00:02:23] *** systat has quit IRC
[00:02:40] *** systat has joined ##java
[00:03:19] *** AskHL has quit IRC
[00:03:28] <lvh> How do I multiply a BigInteger and a float (rounding the result up to the next biggest BigInteger)?
[00:04:30] *** Carnage\ has quit IRC
[00:05:04] *** tilerendering has joined ##java
[00:05:06] *** putnam has joined ##java
[00:05:11] *** shadewind has joined ##java
[00:05:30] <cheeser> ~javadoc BigInteger
[00:05:30] <javabot> cheeser: http://is.gd/iFPj [java.math.BigInteger]
[00:07:50] <lvh> cheeser: Found that, but the best I could come up with is using doubleValue/floatValue and multiplying.
[00:08:09] *** Carnage\ has joined ##java
[00:08:49] <lvh> Perhaps it would be better to do something with the float first (convert it to an integer?). That way I'm sure I end up back in BigInteger ranges.
[00:09:04] *** systat has quit IRC
[00:09:13] <dmlloyd> lvh, your best bet is probably to multiply the float by 2 N times, where N = however many times it takes before the float has no fraction remaining, cast that to long, multiply it by the BigInteger, then shift the result right N times
[00:09:48] *** EspenG has quit IRC
[00:10:18] <dmlloyd> lvh: maybe Math.scalb() can help you there
[00:10:23] <ernimril> lvh: or you can create two BigDecimal:s and multiply them
[00:10:30] <dmlloyd> lvh: and Math.getExponent()
[00:11:50] *** kane77 has quit IRC
[00:12:10] <cheeser> or convert to BigDecimal, multiply, convert back
[00:12:24] *** peyman_t has quit IRC
[00:12:28] *** bravestar has joined ##java
[00:15:41] *** bitcrave has quit IRC
[00:19:48] *** riotz_ has joined ##java
[00:19:54] *** Ricket has quit IRC
[00:20:52] *** Copter has joined ##java
[00:24:36] <lvh> Thanks guys :-)
[00:24:45] * lvh is off to bed
[00:24:46] *** lvh has quit IRC
[00:26:41] *** sidelil has quit IRC
[00:27:27] *** Daniel_H has quit IRC
[00:28:33] *** claudio_ch has joined ##java
[00:29:17] *** bas-i has joined ##java
[00:30:08] *** cernui has joined ##java
[00:30:28] <cernui> Hi! I'm looking for a good web services framewerk, and I've seen Axis2 and CFX, am I missing an important one?
[00:30:33] *** bas-i has quit IRC
[00:31:21] *** nytejade has quit IRC
[00:31:57] *** nytejade has joined ##java
[00:36:13] <cheeser> ~metro
[00:36:13] <javabot> cheeser, I have no idea what metro is.
[00:36:16] <cheeser> ~jersey
[00:36:16] <javabot> cheeser, I have no idea what jersey is.
[00:36:20] <cheeser> javabot: you suck
[00:36:20] <javabot> A tool is only as good as its user. Tool.
[00:36:41] <cheeser> https://metro.dev.java.net/
[00:37:30] <cheeser> ~Metro is a high-performance, extensible, easy-to-use web service stack. It can be found at https://metro.dev.java.net/
[00:37:31] <javabot> Okay, cheeser.
[00:38:15] <cheeser> Jersey is the open source (under dual CDDL+GPL license), production quality, JAX-RS (JSR 311) Reference Implementation for building RESTful Web services. It can be found at https://jersey.dev.java.net/
[00:38:28] <cheeser> ~Jersey is the open source (under dual CDDL+GPL license), production quality, JAX-RS (JSR 311) Reference Implementation for building RESTful Web services. It can be found at https://jersey.dev.java.net/
[00:38:28] <javabot> Okay, cheeser.
[00:39:52] *** UK-sHaDoW has quit IRC
[00:39:58] *** le_biloute has joined ##java
[00:42:25] *** le_biloute has quit IRC
[00:42:31] *** Epitaph64 has joined ##java
[00:42:38] *** le_biloute has joined ##java
[00:42:38] *** UK-sHaDoW has joined ##java
[00:42:53] <Epitaph64> Can anyone help me with a seemingly simple issue?
[00:43:49] <waz> how would we know?
[00:44:30] <Infinito> don't ask to ask, just ask.
[00:45:28] <Epitaph64> ok, basically, I am trying to reference files within a jar file, and I verify the file is in the jar file, but it still says the file doesn't exist
[00:45:32] <Epitaph64> here's the path
[00:45:33] *** cher has quit IRC
[00:45:36] <Epitaph64> file:/C:/Documents%20and%20Settings/Epitaph/Desktop/Epi1949.jar!/sounds/explode1.wav
[00:45:51] <waz> pastebin the code
[00:46:20] <r0bby> ~~ Epitaph64 javadoc Class.getResourceAsStream(*)
[00:46:22] <javabot> Epitaph64: http://is.gd/jeu4 [java.lang.Class.getResourceAsStream(String)]
[00:46:26] <r0bby> use that Epitaph64
[00:46:29] <jottinger> why are you trying to access it like that?
[00:46:31] <Epitaph64> well it's somewhat lengthy and most is irrelevant
[00:46:44] <waz> what is?
[00:46:47] <jottinger> if it's in the jar, access it through a resource stream, located at /souunds/explode1.wav
[00:46:52] *** The_Birdman has joined ##java
[00:46:53] <jottinger> waz: his problem
[00:47:04] *** bitcrave has joined ##java
[00:47:05] *** prgrmr has quit IRC
[00:47:08] <r0bby> Epitaph64: there ya go :) getResourceAsStream() voila you're done :-)
[00:47:09] *** staykov has quit IRC
[00:47:10] <r0bby> ~next
[00:47:11] <javabot> Another satisfied customer. Next!
[00:47:18] *** kab has quit IRC
[00:47:35] <Epitaph64> ah I'll read about that
[00:47:37] <Epitaph64> thanks
[00:48:45] <r0bby> ~getresourceasstream
[00:48:45] <javabot> r0bby, getresourceasstream is http://mindprod.com/jgloss/getresourceasstream.html
[00:48:46] *** staykov has joined ##java
[00:48:50] <r0bby> there's a link about it
[00:50:13] *** cyth has quit IRC
[00:52:18] *** tilerendering has quit IRC
[00:53:59] *** Yustme has quit IRC
[00:55:10] *** cernui has quit IRC
[00:55:31] *** rollins has quit IRC
[00:55:42] <Zvpun> http://pastebin.com/d459ef7ff I was searching the web on howto auto scroll a JScrollPane but it does not scroll when I add text to the underlying JTextArea, whats wrong with it?
[00:56:56] <Epitaph64> as far as getResourceAsStream works, can I return a string with the path included, or can I use .toString()?
[00:57:17] <The_Birdman> Zvpun: override the append method in the jtextarea and set the caret position to the document length after appending text(super.append)
[00:57:39] *** korney has quit IRC
[00:57:40] *** tilerendering has joined ##java
[00:58:35] *** radixor has joined ##java
[00:59:48] *** deepjoy has quit IRC
[01:01:37] <Zvpun> The_Birdman: that would also scroll if the scrollbar is not at the bottom
[01:02:30] <Zvpun> What's the flaw in the way I did it?
[01:03:11] *** amnesiac has quit IRC
[01:03:56] <Epitaph64> Ok I figured it out, I needed my method to accept an URL instead of a String :P
[01:04:54] <cheeser> or createa URL in your method
[01:05:36] <selocol> If I create an array in a conditional loop, how do I do stuff with it outside the loop?
[01:05:40] *** spathi^ has joined ##java
[01:06:25] *** Ivellina has quit IRC
[01:07:01] <Epitaph64> ok nice it all works now :)
[01:07:23] <Epitaph64> now the /sounds/ folder is stored inside the jar instead of outside it
[01:10:14] <criminy> I'm reading about groovy. Where would you apply that in a web app? Service layer? Scripting business rules?
[01:10:25] <criminy> an existing java web app.
[01:10:35] *** vix85 has joined ##java
[01:10:45] <reverend> wherever you want
[01:11:14] *** dvayanu has quit IRC
[01:11:30] <Epitaph64> hmm, whenever I run this program my cpu usage goes to 100% but my computer runs things normally...
[01:11:32] <criminy> I see. Looking at springs support for different scripting languages.
[01:11:34] <reverend> most people just use it for all the server side stuff
[01:11:46] <reverend> those who use it
[01:12:04] *** dvayanu has joined ##java
[01:12:08] <criminy> hrm. thanks.
[01:12:15] <cheeser> criminy: ##groovy could help
[01:12:35] *** dvayanu has quit IRC
[01:12:40] <criminy> I'm having to rewrite a good bit of a current application and I'm just looking at new tech, since my manager wants to us spring this go-around.
[01:12:47] <criminy> use*
[01:12:52] *** gregor_k has quit IRC
[01:13:11] *** MrSmiley909 has joined ##java
[01:13:24] <cheeser> fandev.org!
[01:13:24] <cheeser> 8^)=
[01:13:27] <cheeser> ahem.
[01:13:36] <The_Birdman> spring is not bad compared to struts imho
[01:13:37] *** dvayanu has joined ##java
[01:13:43] <criminy> reverend: but I know I can't get everyone to consider groovy for the server side on everything.
[01:13:50] *** dvayanu has quit IRC
[01:13:51] <cheeser> The_Birdman: spring isn't bad compared to bowling balls, either
[01:14:06] * reverend wonders when 'spring' started generally meaning 'spring mvc/webflow' rather than 'spring ioc'
[01:14:08] <The_Birdman> right cheeser
[01:14:25] <MrSmiley909> Should the ceiling of 5 / 2 equal 3?
[01:14:26] *** radixor_ has quit IRC
[01:14:36] * cheeser eyes MrSmiley909
[01:14:45] <criminy> MrSmiley909: gatech?
[01:15:02] <criminy> MrSmiley909: got a resume? =)
[01:15:28] <cheeser> you'd want to hire him after *that* question?
[01:15:29] <reverend> that's an interesting follow up to his question
[01:15:32] <reverend> haha
[01:15:53] <criminy> I wasn't paying attention x.x
[01:15:53] *** sphenxes has quit IRC
[01:16:11] *** Goosemoose has quit IRC
[01:16:16] <selocol> hey guys, if i make an array inside a if statement, how do i access that array outside of the loop? it seems to be stuck inside of it
[01:16:18] <criminy> we need people, and at the moment the uppers are only interested in college-aged part timers.
[01:16:28] <cheeser> ~~ selocol scope
[01:16:28] <javabot> "A variable's scope is the region of a program within which the variable can be referred to by its simple name" - http://bioportal.weizmann.ac.il/course/prog2/tutorial/java/nutsandbolts/scope.html Also see http://mindprod.com/jgloss/scope.html
[01:16:35] <reverend> 'my hammer is bad at screwing things' - 'say, you ever consider a job in engineering?'
[01:16:37] *** monil has joined ##java
[01:16:37] *** waz has quit IRC
[01:17:31] <selocol> cheeser: thanks
[01:17:55] <reverend> tf am i going to eat tonight
[01:18:41] <cheeser> whatever i'm gonna eat is going to involve at least 2 bottles of red wine.
[01:19:10] <reverend> working on my first right now
[01:19:22] *** Angel-SL has joined ##java
[01:21:34] *** bigjocker has joined ##java
[01:22:02] *** garotosopa has quit IRC
[01:22:32] *** wushan has joined ##java
[01:22:42] <Stephmw> reverend: anything that doesn't move quickly enough?
[01:22:58] <reverend> if i don't move quickly enough i'll miss some good restaurants
[01:23:24] *** putnam has quit IRC
[01:24:06] *** mele- has joined ##java
[01:24:08] *** Rafa_el has joined ##java
[01:24:51] *** Carnage\ has quit IRC
[01:24:58] *** wushan has left ##java
[01:28:23] <MrSmiley909> Why does System.out.println((double)(5 / 2)) print 2?
[01:28:40] <bravestar> because 5/2 does integer division
[01:28:58] <bravestar> casting to to double after the face doesnt change the value from 2
[01:29:02] <nor3> ~jms
[01:29:02] <javabot> nor3, jms is Java Message Service and is found at http://java.sun.com/products/jms/ See also the JMS section in the J2EE tutorial at http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMS.html There are various implementations including the horribly slow J2EE reference implementation, several free ones and poverty-inducing commercial ones
[01:29:07] <bravestar> try 5 / (double)2
[01:29:37] <cheeser> 5/2.0
[01:31:15] *** pantcho has joined ##java
[01:31:39] <pantcho> Hello, anyone here have experience of client/server methdology?
[01:32:01] <cheeser> ~nayone
[01:32:01] <javabot> cheeser, I have no idea what nayone is.
[01:32:03] <cheeser> dammit
[01:32:05] *** wushan has joined ##java
[01:32:05] <cheeser> 8^)=
[01:32:08] <cheeser> typed that twice
[01:32:41] <pantcho> cheeser it seems you don't have experience with the bot ;)
[01:32:43] <pantcho> ~anyone
[01:32:43] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[01:32:45] *** wushan has left ##java
[01:33:15] <cheeser> pantcho: you think so? http://kenai.com/projects/javabot
[01:33:24] *** MrSmiley909 has quit IRC
[01:33:26] <cheeser> specifically, http://kenai.com/projects/javabot/members
[01:33:27] <cheeser> 8^)=
[01:33:35] <pantcho> hehe
[01:33:44] *** wushan has joined ##java
[01:33:50] *** wushan has left ##java
[01:34:08] *** defenderBG has joined ##java
[01:34:17] <defenderBG> hi everyone
[01:34:26] <Ven]n> I have a JLabel showing time played of my movie and duration.. but in seconds.. is there something premade that can show it in hh:tt:ss ?
[01:35:02] *** OsAC has quit IRC
[01:35:16] <nor3> *sigh*
[01:35:29] <cheeser> Ven]n: yes
[01:35:50] <cheeser> ~~ Ven]n google java time format
[01:35:50] <javabot> http://letmegooglethatforyou.com/?q=java+time+format
[01:37:12] <pantcho> My questions is regarding sockets and client/server methdology. i need to make a game server where each client that connects it opens a socket for him and launch a new thread. in the thread i need to know if the user wants to create a room (with #player and more info) OR join an existing room. my question is lets say the user creates a room and another user connects and join the room, my problem is how to manage both threads together to play.
[01:37:49] <Ven]n> cheeser, thank you
[01:37:50] <cheeser> thread/connection won't scale
[01:38:17] <pantcho> cheeser: what do you mean won't scale?
[01:38:41] <cheeser> as the number of users goes up, performance will crater
[01:39:47] *** putnam has joined ##java
[01:39:47] *** fridim_ has joined ##java
[01:39:56] <pantcho> cheeser: thing is that i think that when the user will join a room i will assign his socket to the ROOM which was opened by the user who opned the room, and the thread of the user that opened the room will control the 2 users sockets
[01:40:09] *** Vantaa has quit IRC
[01:40:13] <cheeser> that might work
[01:40:27] <pantcho> and killing the thread of the user that joined
[01:40:38] *** systat has joined ##java
[01:41:08] <pantcho> but problem is that i use strings to communicate between client and server and sending msgs to max 4 users that are allowed in the game and if one is not responding could be very slow
[01:41:52] <Ven]n> cheeser, is SimpleDateFormat a good choice?
[01:41:58] *** spathi has quit IRC
[01:41:58] *** spathi^ is now known as spathi
[01:42:15] <pantcho> so i tought about leaving the threads as they are and make a structure in the ROOM of each user InputBuffer OutBuffer that each thread is adding OR requested to get info
[01:42:19] <cheeser> Ven]n: have you tried it?
[01:42:35] <Ven]n> cheeser, guess :)
[01:42:56] <pantcho> so the ROOM do not use threads but communicating with the threads in order not to get stack itself... is that good thinking?
[01:43:00] <cheeser> Ven]n: i know the answer.
[01:44:22] <Ven]n> cheeser, :)
[01:44:22] <r0bby> Ven]n: This is a thing where google would have helped you...
[01:44:29] <ankylose> spring rox
[01:44:36] *** Techdeck has joined ##java
[01:44:39] <Techdeck> any guru axis2 users?
[01:44:47] <reverend> see, i never know wtf people are saying when they say 'spring' now
[01:45:02] <ankylose> spring is a season
[01:45:07] <Ven]n> r0bby, I did some googling but didnt do it properly
[01:45:08] <reverend> and there are vast swaths of spring components that are poo
[01:45:14] *** Meddi has joined ##java
[01:45:35] <ankylose> reverend: i use spring for IoC
[01:45:49] <reverend> okay, great, then we're on the same page
[01:46:00] <reverend> indeed, it's nice
[01:46:07] <cheeser> anyone that uses it to refer to Spring MVC should be banned from computers
[01:46:08] <ankylose> for a swing application
[01:46:09] *** fridim_ has quit IRC
[01:46:24] <reverend> spring mvc is poo
[01:46:29] *** thorat has quit IRC
[01:46:42] <reverend> well, mvc isn't that bad i guess, but webflow is horrible poo
[01:46:50] <ankylose> it's great for bean relation
[01:47:09] <Meddi> hi guys. i've got a java class which extends Thread and implements run. it also has another synchronized method which returns a boolean. a call to the contructor of that class makes a call to start() and then to some algorithms (which might take 5 minutes to finish). An object of this class is created within another class. the only thing is that, even if it runs as a different thread, still, my program's main JFrame freezes. Why's that?
[01:47:09] <ankylose> i don't develop web applicatoin
[01:47:17] <ankylose> i write only swing application
[01:47:18] <reverend> Meddi: don't extend Thread
[01:47:20] <reverend> that's silly
[01:47:25] * Techdeck dies
[01:47:31] <reverend> and it's even more silly to then go ahead and implement Runnable on top of that
[01:47:33] *** acidfingers has joined ##java
[01:47:35] <Techdeck> axis2 is a horrible, horrible technology
[01:47:48] <Meddi> reverend: do you reckon then implementing runnable only will do the trick?
[01:47:55] *** pantcho has quit IRC
[01:47:59] <reverend> i dunno, i didn't bother reading your question
[01:48:14] <reverend> but extending Thread is pretty much guaranteed to be wrong
[01:48:26] <Meddi> ok let me try to implement runnable and see how it goes
[01:48:50] <cheeser> ~~ Meddi threads
[01:48:50] <javabot> Meddi, threads is http://java.sun.com/tutorial/essential/threads
[01:49:40] <reverend> i took way too much of a nap today
[01:49:55] *** waz has joined ##java
[01:50:06] <reverend> i was so drained after like the 30th conference call of the week i basically fell asleep with my computer on my chest
[01:50:12] <reverend> woke up 3 hours later
[01:50:17] *** amz has joined ##java
[01:50:17] <reverend> definitely gonna pay for that
[01:50:26] <reverend> and... queue the ~interesting factoid from cheeser
[01:50:34] <reverend> cue*
[01:50:46] <reverend> queue the cue
[01:50:49] <cheeser> 8^)=
[01:51:31] <Meddi> 30th conference? wow
[01:51:34] *** kingsilly has joined ##java
[01:51:35] <Meddi> lots :-)
[01:52:49] <kingsilly> hey, im looking to use java to log in to a website i use, where would i start?
[01:53:13] *** kingsilly is now known as KingBilly
[01:53:21] *** AhtiK has quit IRC
[01:54:40] *** wushan has joined ##java
[01:54:46] *** UK-sHaDoW has quit IRC
[01:55:01] <acidfingers> Wow I never knew you could have an entire working install of a jdk and eclipse on a single thumb drive
[01:55:04] <acidfingers> this is awesome
[01:55:11] *** UK-sHaDoW has joined ##java
[01:55:17] <nor3> does anyone know how to deactivate org.apache.commons.logging?
[01:55:20] <acidfingers> anyone here done this before?
[01:57:06] *** bas-i has joined ##java
[01:57:25] *** fridim_ has joined ##java
[01:57:46] *** tamgo has joined ##java
[01:58:16] <tamgo> When creating a custom Annotation with properties, how does one query does annotations at runtime? Can't find it anywhere.
[01:58:34] <The_Birdman> ~annotations
[01:58:35] <javabot> The_Birdman, annotations is http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html
[01:58:45] <The_Birdman> ~reflection
[01:58:46] <javabot> The_Birdman, reflection is http://java.sun.com/tutorial/reflect
[01:59:24] *** shadewind has quit IRC
[02:00:41] *** bas-i has quit IRC
[02:02:49] *** bigjocker has quit IRC
[02:03:05] *** wushan has left ##java
[02:03:55] <svm_invictvs> h
[02:03:56] <Meddi> http://eugeneciurana.com/pastebin/pastebin.php?show=40634 <---- The code at the end makes a call to the class at the beginning. Why does this call though causes the main frame to freeze?
[02:04:08] <svm_invictvs> Does an operation in Javabot receive every message in the channel?
[02:04:09] *** vezzoni has quit IRC
[02:04:16] <svm_invictvs> or just those messages addressed to it?
[02:05:16] *** claudio_ch has quit IRC
[02:05:55] *** selocol has quit IRC
[02:08:17] <tamgo> @The_Birdman I looked in both those places before I came here, none of them specified exactly what to do
[02:08:19] <nor3> ~logfactory
[02:08:19] <javabot> nor3, I have no idea what logfactory is.
[02:08:27] <nor3> ~logging
[02:08:27] <javabot> nor3, logging is the recording of various events that happen in an application. The Java API supports logging since version 1.4 (see java.util.logging.Logger), and there are various other libraries, see ~log4j, ~slf4j and ~commons-logging
[02:08:38] <tamgo> @The_Birdman, but I found it, all I really need was to make a fool of myself in IRC, things usually show up after that, thanks for offering help
[02:08:40] <nor3> ~commons-logging
[02:08:41] <javabot> nor3, commons-logging is a Jakarta project that tried to be a facade for different logging systems. Thankfully, SLF4J has a facade for this logging system, so you can have a facade for the facade. What a charade! See http://jakarta.apache.org/commons/logging for more reason to hate clogging.
[02:08:58] *** tamgo has quit IRC
[02:09:07] <nor3> org.apache.commons.logging.LogFactory.HashtableImpl <-- how the hell do i deactivate this
[02:09:10] <nor3> *sigh*
[02:09:21] <pfn> what do you mean by "deactivate"
[02:09:25] *** popcornPanic has joined ##java
[02:09:38] <pfn> you would do well to read the commons-logging documentation
[02:10:05] *** vix85 has quit IRC
[02:10:18] <nor3> i can't use the http commons httpclient because the stupid thing has a filesystem based logging thing on by default
[02:11:07] <pfn> never seem to have that problem before...
[02:12:05] <nor3> pfn: yes, well, that's because i want to use the http commons httpclient in an applet
[02:12:06] <nor3> :D
[02:12:15] *** putnam has quit IRC
[02:12:16] <nor3> and apparently people aren't fond of applets around here
[02:12:28] *** heyqule has joined ##java
[02:12:44] <nor3> but it's FRAKING rediculous that the http commons httpclient depends on this stupid logger by default
[02:12:45] <pfn> nor3, so why is this a problem? are you getting a security exception?
[02:12:56] <nor3> yes
[02:13:08] <nor3> Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.commons.logging.LogFactory.HashtableImpl read)
[02:13:09] *** Meddi has quit IRC
[02:13:11] *** bhz- has quit IRC
[02:13:38] *** b3nn3tt has quit IRC
[02:14:16] *** bhz- has joined ##java
[02:14:30] <Epitaph64> anyone know how to 1. play ogg files in java 2. loop them? :D
[02:15:11] <nor3> i just want to disable all commons logging
[02:15:38] <waz> logging is for weak coders
[02:15:46] <The_Birdman> hehe
[02:15:54] <Epitaph64> here's my work in progress game to learn java :D http://www.filedropper.com/epi1949
[02:16:30] <The_Birdman> a new virus breed :-)
[02:16:31] <Epitaph64> also controls, WASD for movement, left arrow - shoot, right arrow - burst charge
[02:16:44] <nor3> maybe this is what i need: org.apache.commons.logging.Log = org.apache.commons.logging.impl.NoOpLog
[02:17:48] *** KingBilly has quit IRC
[02:18:12] *** elementz has quit IRC
[02:18:24] *** wangyuan270 has joined ##java
[02:18:38] *** wangyuan270 has left ##java
[02:19:37] <Epitaph64> if you don't trust my jar file, http://pastebin.com/f565a7eca
[02:19:41] <Epitaph64> here's the full script :)
[02:20:09] <jottinger> nor3: just use a category that has no output
[02:20:17] <Epitaph64> slightly over 1000 lines now :O I probably am doing something the hard way hehe
[02:21:23] *** Woflborg has quit IRC
[02:21:29] <Epitaph64> I am probably going to work on a variety of enemies soon, but first I NEED background music haha
[02:21:31] *** surial has joined ##java
[02:21:36] <Epitaph64> since I am a very auditory person >:D
[02:22:00] <pfn> nor3, you're screwed, you can't disable that--you can't use it in an applet, not without signing
[02:22:08] <pfn> nor3, your option is to sign or not use commons-httpclient
[02:22:21] <pfn> what's wrong with HttpURLConnection
[02:23:40] <nor3> i need to upload binary data
[02:23:46] <pfn> so?
[02:24:00] <nor3> i dunno, it was "obvious" how to do it with this apache shit
[02:24:01] *** schasi has quit IRC
[02:24:15] <nor3> what the fuck apache? why the hell would they make something this simple DEPEND on filesystem access?
[02:24:30] *** exbio has quit IRC
[02:24:57] <Zvpun> is there anything wrong with: "Pattern p = Pattern.compile("ar2a"); Matcher m = p.matcher("ar2a"); String cardStr = m.group(0);"?
[02:24:58] <pfn> it doesn't
[02:25:02] <pfn> it depends on commons
[02:25:04] <pfn> commons-logging
[02:25:10] <pfn> commons-logging depends on its own crap
[02:25:17] <pfn> and it's not filesystem access
[02:25:28] *** popcornPanic has quit IRC
[02:25:29] <nor3> commons logging is also "by" apache
[02:25:34] <nor3> what is it then?
[02:26:02] <pfn> it's one of many permissions denied applets that are unsigned
[02:26:24] <nor3> and why the hell does http commons depend on logging?
[02:26:41] <pfn> because it logs
[02:26:42] <pfn> duh
[02:27:14] <surial> anyone have some experience with htmlunit? I'm trying to do some basic scraping on an ajaxy beast of a site. Their login form uses some ajaxy callback voodoo, instead of a plain form submit; the button is not a type="submit" but a type="button" that fires off a bunch of javascript.
[02:27:19] <nor3> yes, but why can't i deactivate that?
[02:27:24] *** systat has quit IRC
[02:27:27] <Epitaph64> hmm can you write a file to a jar?
[02:27:30] <nor3> so that i can use it in an applet.
[02:27:31] <surial> ... I want to get the HtmlPage object that represents the page that is loaded when you click that thing.
[02:27:34] <pfn> nor3, 'cuz you can't
[02:27:36] <Epitaph64> like somejar.jar/newfile.txt
[02:27:39] <pfn> nor3, *sign* your applet
[02:27:42] <pfn> nor3, or use HttpURLConnection
[02:27:43] <nor3> no
[02:27:44] <pfn> take your pick
[02:27:49] <surial> Epitaph64: Yes. see java.util.jar
[02:27:52] <nor3> yeah, i'll use httpurlconnection
[02:27:52] <pfn> those are your options, period
[02:28:08] <surial> Zvpun: just eyeballing it, no.
[02:28:10] <pfn> because the code isn't intended to be run from applets
[02:28:14] <Epitaph64> surial: thanks, I am just curious, since I am trying to keep the inner workings of this game inside the jar for convenience
[02:28:18] <pfn> and for those that do--they know to sign their applet
[02:28:19] <surial> Zvpun: er, yes.
[02:28:22] <surial> Zvpun: you need to match first.
[02:28:39] <surial> Zvpun: call m.match() or find() or search() or whatever it's called. Most other matcher methods aren't valid until you do a search.
[02:28:42] * pfn signs all of his applets--trusted ca be damned
[02:28:56] <surial> Epitaph64: oh, you mean, like, store datafiles inside your own app's jar? That's a bad idea.
[02:28:57] <nor3> that's not viable for my project
[02:29:30] *** riotz_ has quit IRC
[02:29:31] <Epitaph64> ah, because I want a save file to be stored inside it, so if anyone moves the jar, the save will go along with it
[02:29:37] *** ankylose has quit IRC
[02:29:46] <Epitaph64> pretty much a "highscore" board type of thing
[02:29:52] *** sileni has joined ##java
[02:29:54] <surial> Epitaph64: The notion that a java app consists of just one jar that is all-encompassing is broken.
[02:30:09] <surial> Epitaph64: But I -think- java has a properties API that will use the registry on windows, ~/.foobar on posixy things.
[02:30:22] <surial> Epitaph64: I don't remember what its called though (it's not java.util.Properties)
[02:30:44] <Epitaph64> ah, but I don't want to be dependant on windows for saving files
[02:30:55] <surial> Epitaph64: Also, IIRC, the java.util.jar can't change a jar. It can just write a new one with some changes in it. You could overwrite your own jar, but you would be rewriting the entire thing.
[02:31:01] <pfn> surial, Preferences
[02:31:08] <pfn> ~~surial javadoc Preferences
[02:31:09] <javabot> surial: http://is.gd/kiXM [java.util.prefs.Preferences]
[02:31:16] <surial> Epitaph64: You won't be - on linux it would use ~/.foobar. You know - what every other application does.
[02:31:18] <surial> ~pfn++
[02:31:18] <javabot> pfn has a karma level of 75, surial
[02:31:27] <surial> Epitaph64: what pfn said.
[02:31:33] <Epitaph64> oh I see
[02:31:47] <Epitaph64> Is using the registry for save files very efficient? I guess if that's the best way
[02:32:12] <surial> You just said 'highscore'.
[02:32:34] <surial> If you're going to have megabytes of blob data, not sure. Hell, everyone else tosses all sorts of crap in there with total abandon. What the hell.
[02:32:37] <Epitaph64> well, that's what I am doing now, but I just want to know for future reference
[02:32:43] *** staykov has quit IRC
[02:32:51] <pfn> it's for preferences
[02:32:51] <surial> You shouldn't assume that your own app is writable.
[02:32:53] <pfn> not large files
[02:33:04] <surial> You don't see linux programs (or windows programs for that matter) rewrite their own .EXE file, now, do you?
[02:33:24] <Epitaph64> I may just externalize a txt file and encrypt it
[02:33:39] <Epitaph64> not that many people would be stopped since they just could just look at the jar file, but most people wouldn't bother
[02:33:44] <surial> You want to encrypt a text file, while the key is in your java code?
[02:33:53] <surial> Uh, okay. That's not going to stop a slightly determined user though.
[02:34:17] <Epitaph64> Well, if someone wants to hack their local save files that's fine, but I just mean, to stop most people from bothering
[02:34:22] *** jex_ has joined ##java
[02:34:29] <The_Birdman> Epitaph64: If someone wants to crack your code, he'll succeed probably without much effort with determintation
[02:34:33] *** xapcgkeu has joined ##java
[02:35:29] <Epitaph64> I know, I'm just saying, minor encryption would stop someone from seeing save.txt and just editing all the data inside so easily
[02:35:48] <Epitaph64> and because having the data so blatantly presented is kind of lame in my opinion
[02:36:04] <Zvpun> surial: thank you you helped me alot. I didnt know that you have to match first and I didnt find it in the doc but on the other hand I am maybe way too tired and frustrated, so thanks alot!
[02:36:17] <surial> ~next
[02:36:17] <javabot> Another satisfied customer. Next!
[02:36:18] *** tranceNRG has quit IRC
[02:36:20] *** TheCastor has quit IRC
[02:37:49] *** wng_z3r0 has joined ##java
[02:38:07] <surial> Just read an intriguing article about SSL security. The skinny of it: everybody (no, really) gets to an https page via http, be it google, be it just typing 'mybank.com' and getting redirected. A man in the middle can rewrite the Location: header or the <a href=""> link from https://paypal.com/ to: https://paypal.com/?session-like-id=asdfklajsflkajflaskfjaslkdfjaslkfjslkfjaslfkajlkfjaf.hacker.cn. The / and question mark and = sign are actually unicode charact
[02:38:37] <surial> and browsers do not warn when domains like .cn use unicode in their domain names. End result: Unless you physically click on your browsers 'show me the cert chain' and check it by hand, carefully, you don't know it's not the site you think it is.
[02:39:29] <surial> Seems sufficiently well thought out and sufficiently impossible to protect against that from now on, I consider SSL no protection of any sort against anyone capable of on-the-fly modifying the traffic. And keeping an eavesdropper out is a lot easier than SSL.
[02:39:31] <surial> FYI.
[02:40:00] *** examancer has quit IRC
[02:41:27] <wng_z3r0> I'm doing some recursion, and I'm running out of stack space. How do I increase the stack size? java -Xss doesn't seem to work. No matter what number I use, it gives me Invalid thread stack size: -Xss
[02:41:43] <pfn> huh? dns names and urls aren't utf-8 yet
[02:41:44] <pfn> or unicode
[02:41:47] *** Hink has quit IRC
[02:42:03] <surial> pfn: Yes they are. IDN.
[02:42:08] <r0bby> wng_z3r0: StackOverflowException?
[02:42:19] <The_Birdman> RobbyException
[02:42:25] <surial> wng_z3r0: try -Xss64m
[02:42:27] <pfn> wng_z3r0, -Xss30m
[02:42:33] <wng_z3r0> oh no space
[02:42:43] <r0bby> reading the docs++
[02:42:49] <The_Birdman> ~patpat r0bby
[02:42:50] <javabot> The_Birdman, I have no idea what patpat r0bby is.
[02:42:54] <wng_z3r0> sweet
[02:42:57] <wng_z3r0> that worked :)
[02:43:06] <surial> ~next
[02:43:06] <javabot> Another satisfied customer. Next!
[02:43:29] <pfn> surial, that's bullshit, and a proper "web of trust" protects against it
[02:43:35] *** Zvpun has quit IRC
[02:43:53] <pfn> of course, this built-in CA bullshit is pretty bogus
[02:44:08] <surial> pfn: That isn't bullshit, and a proper web of trust does jack shit. '*.hacker.cn' is a legit cert acquired by the hacker, and it is used to authenticate requests to *.hacker.cn, which is what they are supposed to do.
[02:44:08] *** dmlloyd_ has joined ##java
[02:44:25] <pfn> surial, the current CA arrangement is broken
[02:44:45] <surial> pfn: So, you DO agree that SSL is fundamentally broken and in no way or form protects against MITM.
[02:44:45] *** orgy` has quit IRC
[02:44:50] <surial> and is therefore fucking pointless.
[02:44:53] <pfn> no
[02:45:03] <pfn> I agree that the current CA trust model is broken
[02:45:05] *** fridim_ has quit IRC
[02:45:06] <pfn> ssl itself is not
[02:45:15] <surial> Okay, so, which part of what I just explained is bullshit according to you?
[02:45:22] *** BrutusUnix has quit IRC
[02:45:46] <surial> Unicode in domain names? http://en.wikipedia.org/wiki/Internationalized_domain_name
[02:46:45] <surial> works and is available in all browsers. To protect against homoiconic jokery, any IDN .com, .net, .org, .uk, .nl, etcetera (countries hwere it'd be weird) get flagged appropriately, but for .cn or any other place where its likely, they are rendered as is.
[02:47:11] <surial> So, the security measure as designed is pointless and no browser has fixed it or has acknowledged that they will.
[02:47:27] *** wangyuan270 has joined ##java
[02:47:33] <wangyuan270> hello
[02:47:33] <nor3> has anyone here implemented an http post file uploader using urlconnection?
[02:47:40] <ravv> Yeah swedish urls can have our special characters in em. Been that way for a year maybe a bit longer
[02:47:44] *** wangyuan270 is now known as wushan
[02:48:03] <ravv> Probably longer, time flies :)
[02:48:49] <wushan> where is qq jabber service?
[02:48:50] <surial> ravv: Yup, sweden and germany are in the list of 'don't flip the fuck out when you encounter an IDN with that TLD'. I just picked .cn because I'm guessing its more familiar.
[02:49:02] <The_Birdman> nor3, probably someone, probably
[02:49:18] <pfn> probably wrote something a long time ago
[02:49:23] <pfn> it's just a POST op, trivial
[02:49:55] <ravv> lack of åäö used to be really annoying for some municipals/companies.
[02:49:58] <pfn> if you don't need to work with a browser type="file", then it's even easier
[02:50:07] *** wushan has left ##java
[02:50:09] <nor3> yeah, its so trivial it should be easy to find an existing implementation
[02:50:21] <nor3> instead i'm going to waste an hour getting this shit to work myself
[02:50:42] <surial> ravv: Yes, but, as many security experts predicted back then, the already shaky foundation of SSL would not survive IDNs. And it turns out it mostly hasn't (though even without IDNs, you can pretty much MITM your way around any SSL).
[02:50:51] *** mk has quit IRC
[02:50:52] <surial> It's just even more impossible to notice by using IDNs.
[02:50:56] <pfn> surial, sounds like firefox and ie7 already handle this IDN problem
[02:51:03] <surial> pfn: No, they don't.
[02:51:04] <pfn> surial, according to link you pasted
[02:51:18] *** xapcgkeu has quit IRC
[02:51:52] <surial> pfn: They only 'handle' IDNs in domain areas where they aren't expected. like .com. But if you looked closely, the TLD in https://paypal.com/?sessionid=29848123048210492834.hacker.cn is china's ccTLD. Where firefox, IE, etc, don't give a peep when an IDN is used.
[02:51:58] <ravv> What would be the easiest way to send someone to a page with some stuff in "POST"? (local files doesnt work that good with IE7)
[02:52:11] <pfn> surial, perhaps so, have an example link?
[02:52:48] <surial> Hmm.. I can easily craft one without a fake slash or a question mark. I guarantee you alternative glyphs for slash and question mark exist, but I'm not going to look for em.
[02:52:58] *** parkemon is now known as smax
[02:53:02] <pfn> it needs to look somewhat authentic
[02:53:17] <surial> pfn: Start firefox.
[02:53:20] <surial> Then try:
[02:53:21] <surial> http://www.foöbar.com/
[02:53:25] <surial> And then try: http://www.foöbar.cn/
[02:53:45] <surial> note how firefox will rewrite the .com to punycode, but it'll leave the cn alone, because it thinks .cn IDNs are perfectly legit.
[02:53:58] <surial> and they won't look 'somewhat authentic'. They look indistinguishable.
[02:53:59] *** riotz has joined ##java
[02:54:14] <pfn> I suppose, but that doesn't break ssl still
[02:54:21] <pfn> it breaks the transition from http to https
[02:55:06] <surial> http://www.pаypal.cn/
[02:55:09] <surial> That first a is not an a.
[02:55:12] <surial> do you see the difference?
[02:55:18] <pfn> doesn't show up as an 'a' to me
[02:55:18] <jottinger> nor does it look like one in irssi
[02:55:24] <pfn> ditto jottinger
[02:55:24] <surial> copy/paste it, replace .cn with .com, and load it in firefox. Note how it gets rewritten
[02:55:41] <surial> It looks like an exact a in colloquy, which is Unicode capable. So is firefox. So is safari. So is IE>
[02:55:56] <pfn> indeed, it does look like an 'a' in firefox
[02:56:16] <jottinger> well, that's proof that unicode is for evil people.
[02:56:16] <pfn> so I'll agree what you describe to be a problem, but it isn't a "the sky is falling, ssl is completely useless" problem
[02:56:31] <pfn> SSL is still completely secure
[02:56:35] <surial> pfn: Why not? You can automate the entire process. Anyone with MITM capability can break any SSL site, period.
[02:56:37] <pfn> certain use cases can invalidate its security
[02:57:05] <surial> SSL is still completely secure against eavesdroppers, but that really wasn't the point of the SSL exercise. There are easier ways to do it, and it can be done 100% perfectly without any SSL, just with fancy javascript.
[02:57:38] <ravv> surial: But you´re not fooling my irc client. it doesnt care about unicode when mayching urls :)
[02:58:06] <surial> ravv: If only everybody pasted their URLs in their IRC client first before browsing to them...
[02:58:13] <pfn> surial, mitm won't catch a fully ssl session, not *every* session begins in http
[02:58:51] *** dmlloyd has quit IRC
[02:58:54] <surial> http://paypal.com∕foo.cn
[02:58:59] <surial> paste that in firefox.
[02:59:05] <surial> The slash between .com and foo.cn isn't a slash.
[02:59:11] <surial> There is zero noticable difference.
[02:59:21] <pfn> http://paypal.xn--comfoo-re3c.cn/?4285004276=1899963315
[02:59:23] <pfn> that's what I see
[02:59:33] <surial> so that will go to the domain http://paypal.xn--comfoo-re3c.cn/
[03:00:13] <surial> Then there's something going on with paste, I don't get a punycode rewrite.
[03:00:18] <pfn> this still doesn't break a session that starts in SSL
[03:00:33] <pfn> e.g. if you go to https://www.paypal.com/
[03:00:44] <surial> Huh, but safari DOES rewrite.
[03:00:54] <pfn> or if browsers made it the default mode first and fallback to http
[03:01:06] <surial> pfn: Who goes there? Nobody ever types that in their browser. ever. they go 'paypal.com', which redirects. Which a MITM can redirect to something else.
[03:01:12] <pfn> mitm can't break a session that starts as ssl
[03:01:15] <surial> pfn: That would be a good start to solve this problem.
[03:01:16] <pfn> surial, bookmarks
[03:01:48] <surial> pfn: Again, nobody, -NOBODY-, does that. Bookmarks is the only exception. How many Joe Q. Users do you know that use bookmarks? They just tpye 'paypal' someplace and our fancy new browsers will google and domain-search their way to the site.
[03:01:51] *** Rafa_el has quit IRC
[03:02:09] <pfn> Online Payment, Merchant Account - PayPal
[03:02:09] <pfn> PayPal is the safer, easier way to make an online payment or set up a merchant account.
[03:02:12] <pfn> https://www.paypal.com/ - 21k - Cached - Similar pages -
[03:02:15] <pfn> number one hit from google/paypal
[03:02:18] <pfn> notice it's https ;-)
[03:02:23] <pfn> er
[03:02:23] <pfn> nevermind
[03:02:28] <pfn> me being stupid, that didn't help
[03:02:33] *** wng_z3r0 has quit IRC
[03:02:50] <surial> yeah, that's not relevant. Unless you're on https://google.com/ :)
[03:02:59] <surial> which is also a good idea.
[03:03:47] <surial> a third really good idea would be if there was a way to say: I don't need it encrypted, but I do need it signed, to be sure nobody screwed with the data in transit. Feel free to cache this where-ever, just ensure it's authentic.
[03:03:57] <surial> Would ease google's server load and would make caches work properly.
[03:04:28] *** popcornPanic has joined ##java
[03:04:31] <surial> pfn: But I'm glad you questioned this. I assumed all browsers silently accepted fake slashes in .cn, but that's not true.
[03:07:11] *** Seldon75 has joined ##java
[03:08:37] *** dmlloyd_ is now known as dmlloyd
[03:09:03] <Seldon75> hmm
[03:09:33] <Seldon75> String fileName = Thread.currentThread().getContextClassLoader().getResource("config.xml").getFile(); is failing to locate config.xml in the running directory - anything I can try?
[03:09:37] *** Agrajag- has quit IRC
[03:09:45] <jottinger> Seldon75: chain methods much?
[03:09:55] <Seldon75> yeah I hate line count ;)
[03:10:12] <Seldon75> i know it's ok as far as the class loader
[03:10:25] <Seldon75> but the URL returned from getResource() is null
[03:10:51] <jottinger> where isthe resource in relation to the classpath
[03:11:22] <Seldon75> im running from /blah, classes are in /blah/bin
[03:11:38] <Seldon75> is that what you meant
[03:11:49] <Seldon75> isnt '.' on the classpath automatically?
[03:12:00] <Seldon75> file is /blah/config.xml
[03:12:13] *** Razec has joined ##java
[03:13:07] <Seldon75> aah
[03:13:09] <Seldon75> i see
[03:13:15] <Seldon75> '.' is not on the classpath
[03:13:29] <Seldon75> got it now
[03:13:34] <Seldon75> thanks for prodding
[03:13:40] <jottinger> any time
[03:13:51] <Seldon75> just dont prod me with a halberd
[03:15:21] *** bravestar has quit IRC
[03:17:16] *** delskorch has joined ##java
[03:18:49] <monil> hi, i've just written a class but i'm getting errors when i compile, was wondering if anyone can help me debug as i'm having no luck: http://pastebin.com/m27a12a63
[03:19:03] *** wushan has joined ##java
[03:19:39] <monil> (the errors are shown at the bottom)
[03:20:01] *** wushan has left ##java
[03:20:12] *** wushan has joined ##java
[03:20:24] *** mohax has quit IRC
[03:20:31] <The_Birdman> remove the public in the main
[03:20:41] <The_Birdman> and drink a first cup of java too
[03:20:53] <The_Birdman> ~~monil firstcup
[03:20:53] <javabot> monil, firstcup is a beginner's tutorial for getting started with Java available at http://java.sun.com/tutorial/getStarted/cupojava
[03:22:00] *** wushan has left ##java
[03:22:14] *** jex_ has left ##java
[03:24:15] *** tilerendering has quit IRC
[03:27:47] *** androoid has quit IRC
[03:28:33] *** Ven]n has quit IRC
[03:29:40] <monil> thanks The_Birdman, i've already done that tutorial, is my java that bad?
[03:30:39] <monil> my main needs to be public so I can use MaInput
[03:32:58] *** pandora-- has quit IRC
[03:35:31] *** teralaser has quit IRC
[03:35:50] <The_Birdman> monil: no it's not that bad as you don't seem to be doing lots of java. I still happen to read the basic tutorials time to time, the first cup once in a while too.
[03:36:09] *** monestri has quit IRC
[03:37:06] <Wyzard> The_Birdman: It's the "public int circleCounter" that needs to have the "public" keyword removed
[03:37:20] *** waz has quit IRC
[03:37:22] *** riotz has quit IRC
[03:37:39] <Wyzard> Local variables within a method are always isolated to the method and can't be declared public/private/protected
[03:38:18] *** Dr_Link has quit IRC
[03:38:23] <Wyzard> The compiler sees "public" and thinks you're trying to declare another member variable but forgot to write the } to end the main() method after the new MaInput line
[03:38:55] <Wyzard> and then complains about the while loop because it thinks it's compiling member variables, not part of a method
[03:40:40] *** wushan has joined ##java
[03:40:50] *** aknm is now known as benz1ne
[03:40:59] <The_Birdman> Wyzard: Thanks :-)
[03:41:06] *** bbq^ has joined ##java
[03:41:11] * The_Birdman eyes Wyzard
[03:41:23] <The_Birdman> Can you teach me java, I wonder :-)
[03:41:48] <Wyzard> Probably, but it'd take much more time than I have
[03:41:54] <Wyzard> I'm not a professor :-P
[03:42:01] <The_Birdman> :-)
[03:42:38] *** wushan has left ##java
[03:42:39] * The_Birdman eyes Wyzard, you must be confused, it's monil who's got issues with modifiers, not me
[03:43:02] <The_Birdman> ddd
[03:43:04] <Wyzard> oops, sorry
[03:43:14] <The_Birdman> np, it happens
[03:43:28] <Wyzard> monil: see above regarding your error, if you haven't already
[03:43:38] *** sileni has quit IRC
[03:44:05] <monil> thank you :)
[03:46:40] *** svm_invictvs has quit IRC
[03:48:41] <monil> hm
[03:48:44] <monil> wonderful new problem now
[03:48:46] <monil> :|
[03:48:55] *** pattwo has joined ##java
[03:48:55] <monil> Exception in thread "main" java.lang.NoClassDefFoundError: Project1/java (java not working properly on the server?)
[03:49:16] *** meanburrito920_ has joined ##java
[03:49:46] <reverend> you execute classes, and compiled ones at that, not files.
[03:50:24] <monil> oops-i still get Exception in thread "main" java.lang.NoClassDefFoundError: Project1/class
[03:50:38] <reverend> you need to read the first cup tutorial.
[03:50:48] <reverend> and then keep reading through the really big index
[03:50:51] <reverend> until you die
[03:51:58] <The_Birdman> But really, monil, he's right, you want to read it again
[03:52:31] <monil> ok
[03:52:39] <monil> i think i'll leave it till the morning now, thanks for all your help
[03:52:43] * monil sleepy
[03:52:44] <monil> night
[03:57:23] *** Epitaph64 has quit IRC
[03:58:47] *** userek has quit IRC
[04:01:00] *** Ricket has joined ##java
[04:03:25] *** FireSlash has joined ##java
[04:04:48] <Ricket> i'm on ubuntu, java 1.6, and my program won't recognize the tab key. all three keylistener methods don't even run when i press tab, despite running with any other key (except global hotkeys) and the tab works in every other program on here.
[04:05:17] *** monestri has joined ##java
[04:06:02] *** spiderbyte has quit IRC
[04:06:13] *** ScottG489 has quit IRC
[04:07:28] <Ricket> ah shoot.
[04:07:41] <Ricket> "No Tab key-pressed or key-released events are received by the key event listener. This is because the focus subsystem consumes focus traversal keys, such as Tab and Shift Tab."
[04:07:53] <Ricket> interesting bit of trivia, and it was really hard to find with google.
[04:08:25] *** smax has quit IRC
[04:09:21] *** Razec has quit IRC
[04:09:52] *** ScottG489 has joined ##java
[04:10:45] *** mistik1 has quit IRC
[04:11:24] *** _acid__ has quit IRC
[04:13:13] *** waz has joined ##java
[04:14:29] *** eidolon has joined ##java
[04:15:31] *** monil has quit IRC
[04:16:29] *** MIR100 has joined ##java
[04:17:25] *** surial has quit IRC
[04:18:35] *** lresende has quit IRC
[04:19:12] *** Bonix has joined ##java
[04:19:25] *** swans20 has joined ##java
[04:21:36] *** pattwo has quit IRC
[04:21:50] *** MIR100 has quit IRC
[04:22:02] *** riotz has joined ##java
[04:22:29] *** LordMetroid has quit IRC
[04:27:51] *** mistik1 has joined ##java
[04:28:35] *** poseidon has joined ##java
[04:28:53] *** wushan has joined ##java
[04:29:07] *** wushan has left ##java
[04:30:06] <poseidon> I'm making a calculator, and I want the input to be either floating point or not. What would be the best way for me to create a wrapper class that contains one of the two (or is there a better way of going about it)?
[04:30:33] <jottinger> use a Number.
[04:33:19] *** kater has joined ##java
[04:33:28] <poseidon> jottinger, thanks
[04:34:37] *** asap18 has quit IRC
[04:34:52] *** kater_ has quit IRC
[04:38:03] *** Nebulam has joined ##java
[04:40:53] *** le_biloute has quit IRC
[04:44:39] *** wushan has joined ##java
[04:44:58] *** UK-sHaDoW has quit IRC
[04:45:49] <wushan> can you tell me where can download sunonestdio?
[04:46:02] *** wushan has left ##java
[04:48:52] <poseidon> jottinger, how do I multiply/devide/etc. two numbers though?
[04:49:49] <r0bby> poseidon: first i'd check the data
[04:50:13] <poseidon> r0bby, how can I tell if the number is a int or double?
[04:50:25] <r0bby> poseidon: it'd be Integer or Double
[04:50:42] <r0bby> ~~ poseidon instanceof
[04:50:43] <javabot> poseidon, instanceof is a way for checking if a given object is of a certain type. See http://mindprod.com/jgloss/instanceof.html for examples.
[04:50:47] <poseidon> o, does Double and Integer extend Number?
[04:50:53] <r0bby> yup!
[04:50:57] <r0bby> ~javadoc Number
[04:50:58] <javabot> r0bby: http://is.gd/kjt8 [java.lang.Number]
[04:51:02] <poseidon> k, makes since now :)
[04:55:46] *** taxon has quit IRC
[04:55:56] *** taxon has joined ##java
[04:57:17] *** godling has joined ##java
[04:58:07] *** poseidon has quit IRC
[05:02:07] *** SniperFodder has quit IRC
[05:02:44] *** SniperFodder has joined ##java
[05:07:13] *** whaley has quit IRC
[05:07:53] *** M[]ssad has joined ##java
[05:09:26] *** wushan has joined ##java
[05:09:32] <wushan> hi
[05:09:44] *** wushan has left ##java
[05:10:02] *** ries has quit IRC
[05:10:46] *** Serva has joined ##java
[05:11:13] *** spacepup has joined ##java
[05:11:24] <Serva> Hi. How does one argue whether WebLogic or WebSphere is a better J2EE Vendor?
[05:12:10] *** jawnsy has left ##java
[05:14:37] *** Seldon75 has quit IRC
[05:14:54] *** cyzie has left ##java
[05:18:50] <Wyzard> Serva: by pointing out strengths and weaknesses of each product, I guess
[05:18:54] <The_Birdman> you just start telling people that it sucks naturally without providing any arguments, price comparison, usability, features, etc.
[05:19:17] <Wyzard> though you'd have a hard time winning that argument either way since WebLogic and WebSphere are not vendors (BEA and IBM are)
[05:20:12] <Techdeck> Oracle and IBM *cough cough*
[05:20:12] <Techdeck> :P
[05:21:34] <Wyzard> hmm, I hadn't noticed
[05:21:45] <Wyzard> My only use of WebLogic has been porting an application from it to JBoss
[05:22:19] <Techdeck> it happened around the area Sun bought MySQL
[05:23:06] *** mengu has joined ##java
[05:23:07] <Wyzard> I do remember hearing something about that, now that you mention it
[05:23:10] * Wyzard shrugs
[05:23:44] <Techdeck> can't blame oracle really, oracle's application server sucked ass
[05:24:09] *** Ricket has quit IRC
[05:24:22] *** Kwitschibo has quit IRC
[05:24:31] *** spiderbyte has joined ##java
[05:24:39] *** ezeki3l has joined ##java
[05:24:50] <ezeki3l> how do i include a local file?
[05:25:12] <ezeki3l> import MyLocalClassFile; // doesn't work
[05:25:45] <waz> ~~ ezeki3l classpath
[05:25:46] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://is.gd/j4gM [sun.com] for more info.
[05:25:56] <ezeki3l> ah right
[05:26:02] <ezeki3l> classpath, now i remember
[05:27:25] <Techdeck> waz++
[05:27:53] *** amz has quit IRC
[05:27:58] <ezeki3l> now i need to join #eclipse to figure out how to set class path in there
[05:28:21] <waz> ~~ ezeki3l newbie ide
[05:28:22] <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.
[05:28:53] <ezeki3l> eh
[05:30:03] <ezeki3l> it's embarassing but i'm a CS masters student who is done a substatial amount of coding in java, like 2 years ago and haven't touched java since :(
[05:31:43] *** Angel-SL has quit IRC
[05:34:01] *** wangyuan270 has joined ##java
[05:34:44] *** wangyuan270 is now known as wushan
[05:37:43] *** smackdab has joined ##java
[05:37:48] *** wushan has left ##java
[05:38:18] *** squi has joined ##java
[05:41:15] *** Ricket has joined ##java
[05:42:25] *** gdoko has joined ##java
[05:43:33] *** Serva has quit IRC
[05:43:55] *** dayzman has joined ##java
[05:43:56] <dayzman> hi
[05:44:12] <dayzman> if i want to send several messages to a server, can i send them to the same socket?
[05:44:20] <dayzman> or do i have to recreate it for each message?
[05:47:09] *** jonh has joined ##java
[05:47:13] <waz> yes
[05:47:42] *** riotz has quit IRC
[05:49:59] *** thunderbolt has joined ##java
[05:53:00] *** jyoti has joined ##java
[05:53:38] *** Junior has joined ##java
[05:54:04] <Junior> good morning
[05:54:50] *** vijay_ has joined ##java
[05:55:12] <The_Birdman> ~~junior welcome
[05:55:12] <javabot> http://eugeneciurana.com/galereya/view_photo.php?set_albumName=Humor&id=welcome
[05:55:30] <The_Birdman> ~info welcome
[05:55:31] <javabot> welcome was added by: pr3d4t0r on 05-03-2007 at 6:42 PM, EDT and has a literal value of: <reply>http://eugeneciurana.com/galereya/view_photo.php?set_albumName=Humor&id=welcome
[05:55:47] <Junior> :)
[05:55:51] *** waz has quit IRC
[05:55:58] *** jyoti has quit IRC
[05:57:05] *** jyoti has joined ##java
[05:57:48] <jyoti> Can someone tell me where to look for the latest download of jmf.
[05:57:56] <Techdeck> jyoti, google?
[05:58:50] <jyoti> :) ok
[05:59:17] <Techdeck> ~~ jyoti jmf
[05:59:17] <r0bby> ~~ jyoti jmf download
[05:59:17] <javabot> jyoti, I have no idea what jmf download is.
[05:59:24] <r0bby> ~~ jyoti google jmf download
[05:59:24] <javabot> http://letmegooglethatforyou.com/?q=jmf+download
[05:59:25] <javabot> jyoti, jmf is Java Media Framework. You can find more information at: http://java.sun.com/products/java-media/jmf/index.jsp
[05:59:28] <r0bby> have fun.
[05:59:32] <r0bby> :)
[05:59:35] <Techdeck> :)
[05:59:41] <Techdeck> it's like the first result, too
[05:59:44] <r0bby> letmegooglethatforyou is an awesome site :)
[06:00:06] <Techdeck> haha nice one
[06:03:10] *** Gevaudan82 has joined ##java
[06:05:39] *** heyqule has quit IRC
[06:06:17] *** jyoti has quit IRC
[06:07:27] *** godling has left ##java
[06:07:55] *** jyoti has joined ##java
[06:08:23] *** jyoti has quit IRC
[06:09:16] *** cactaur has joined ##java
[06:13:02] *** popcornPanic has quit IRC
[06:13:39] *** delskorch has quit IRC
[06:26:18] *** popcornPanic has joined ##java
[06:27:50] *** werdan7 has quit IRC
[06:29:07] *** werdan7 has joined ##java
[06:30:27] *** noobraska has quit IRC
[06:31:38] *** bitcrave has quit IRC
[06:31:42] *** FireSlash has quit IRC
[06:35:23] *** jkriesten has joined ##java
[06:38:28] *** thunderbolt has quit IRC
[06:40:36] *** mengu has quit IRC
[06:40:45] *** mengu has joined ##java
[06:44:13] *** bashoh has joined ##java
[06:47:56] *** Ricket has left ##java
[06:51:52] *** blankthemuffin has joined ##java
[06:53:59] *** daleks_ has quit IRC
[06:55:34] *** nytejade has quit IRC
[06:55:52] *** popcornPanic has quit IRC
[06:55:54] *** tbr has joined ##java
[06:56:02] *** blankthemuffin has quit IRC
[06:56:12] *** tbr has left ##java
[06:56:13] *** nytejade has joined ##java
[06:56:23] *** nytejade has quit IRC
[06:57:01] *** nytejade has joined ##java
[06:57:37] *** asap18 has joined ##java
[06:58:04] *** L-----D has joined ##java
[06:58:08] *** senxhnsshp has joined ##java
[06:58:14] <senxhnsshp> private float[] model = new float[1]; whats wrong with that?
[06:58:20] <senxhnsshp> expected { after token. why?
[06:58:23] *** nytejade has quit IRC
[06:59:01] *** nytejade has joined ##java
[06:59:18] *** nytejade has quit IRC
[06:59:55] *** nytejade has joined ##java
[07:01:03] *** cybereal has joined ##java
[07:01:25] *** wangyuan270 has joined ##java
[07:01:35] *** wangyuan270 has left ##java
[07:03:03] *** The_Birdman has quit IRC
[07:04:46] *** wangyuan270 has joined ##java
[07:06:12] *** wangyuan270 has left ##java
[07:06:15] *** da_shadow has joined ##java
[07:07:19] <senxhnsshp> what does it mean for a method to be accessed in a static way?
[07:07:53] *** blankthemuffin has joined ##java
[07:08:32] *** swans20 has quit IRC
[07:08:33] *** phenom9600 has quit IRC
[07:08:45] *** HockeyInJune has quit IRC
[07:08:50] *** mele- has quit IRC
[07:09:11] *** phenom9600 has joined ##java
[07:09:13] *** HockeyInJune has joined ##java
[07:09:22] *** mele- has joined ##java
[07:09:34] <da_shadow> senxhnsshp: When you deal with a static method, you'll Go ClassName.method() instead of instanceOfClass.method()
[07:12:51] *** wangyuan270 has joined ##java
[07:13:04] <wangyuan270> hello
[07:13:40] *** convivial has quit IRC
[07:15:06] *** L-----D has quit IRC
[07:15:30] *** L-----D has joined ##java
[07:16:05] *** wangyuan270 has left ##java
[07:16:29] <senxhnsshp> i see
[07:18:06] *** senxhnsshp has left ##java
[07:19:06] *** L-----D has quit IRC
[07:20:51] *** blankthemuffin has quit IRC
[07:21:05] *** blankthemuffin has joined ##java
[07:22:29] *** dk_schrute has joined ##java
[07:25:51] *** smackdab has quit IRC
[07:27:42] *** mele- has quit IRC
[07:30:28] *** blankthemuffin has quit IRC
[07:30:50] *** blankthemuffin has joined ##java
[07:36:21] *** josemoreira has quit IRC
[07:37:34] *** blankthemuffin has quit IRC
[07:37:39] *** Nebulam has quit IRC
[07:37:51] *** blankthemuffin has joined ##java
[07:39:04] *** Thorn has joined ##java
[07:43:35] *** Nebulam has joined ##java
[07:44:36] *** wangyuan270 has joined ##java
[07:45:17] *** wangyuan270 is now known as wushan
[07:45:39] <wushan> are there any body?
[07:45:55] <da_shadow> I'm just a head
[07:46:33] *** asap18 has quit IRC
[07:47:01] *** Inc` has quit IRC
[07:47:13] <wushan> what meaing?
[07:47:47] <da_shadow> I'm just having a bit of a laugh at the question...
[07:49:10] *** cactaur has quit IRC
[07:49:45] <wushan> my english is poor
[07:50:22] <wushan> are you chinese?
[07:50:37] <da_shadow> Australian
[07:51:00] *** blankthemuffin has quit IRC
[07:51:21] *** blankthemuffin has joined ##java
[07:52:22] <nor3> java.lang.ClassFormatError: Truncated class file <- wtf
[07:52:24] <nor3> lol
[07:52:41] <wushan> are you java Programmer?
[07:53:10] *** wushan has left ##java
[07:54:13] <da_shadow> wushan: Me, yes
[07:54:32] <da_shadow> nor3: Um, is this on startup of an applet?
[07:54:35] <nor3> wushan: i'm more of a joke than a java programmer
[07:54:44] <da_shadow> nor3: LOL
[07:54:59] <nor3> da_shadow: :D
[07:55:06] *** blankthemuffin has quit IRC
[07:55:12] <nor3> da_shadow: it's on trying to load a class using urlclassloader
[07:55:18] <nor3> i guess the data is corrupted
[07:55:20] <nor3> but
[07:55:27] <nor3> it works fine when not run as an applet
[07:56:02] *** christo_m has joined ##java
[07:57:00] <nor3> da_shadow: does that ring a bell? :P
[07:59:49] <pr3d4t0r> nor3: Class loader issues thanks to security manager would be my guess.
[08:00:07] <pr3d4t0r> nor3: The class that you are importing *must* be in the same .jar as the rest of your code.
[08:00:16] <pr3d4t0r> nor3: But please stop the applet discussion here :)
[08:00:42] <nor3> :D
[08:00:48] <nor3> no one's talking about anything else
[08:01:20] <nor3> and what i'm doing with applets is actually AWESOME. or it will be, if it works
[08:01:23] <nor3> *sigh*
[08:01:25] *** Bonix has quit IRC
[08:01:55] <pr3d4t0r> nor3: Use Flash if you want stable applet behaviour. Anyway, 'nuff said.
[08:03:30] *** blankthemuffin has joined ##java
[08:06:36] *** blankthemuffin has quit IRC
[08:07:01] *** blankthemuffin has joined ##java
[08:09:36] *** yobo2 has joined ##java
[08:10:36] <yobo2> in hibernate, when would i ever want to use the "property" access type instead of "field"? property is the default and uses getters/setters, field accesses the fields directly with reflection.
[08:10:59] <yobo2> but if i do parameter validation in the setters, and assume everything in the database is valid, it seems like it doesn't make sense to use the "property" access type.
[08:11:29] *** popcornPanic has joined ##java
[08:13:10] *** gdoko has quit IRC
[08:14:44] *** Kwitschibo has joined ##java
[08:20:27] *** KristopherWindso has joined ##java
[08:27:12] *** FMJaguar has quit IRC
[08:28:45] *** meanburrito920_ has quit IRC
[08:29:57] *** JordanG has joined ##java
[08:30:09] <KristopherWindso> hi. what's the difference between java and javafx? i use java but i just heard about javafx, and it's new
[08:30:19] <KristopherWindso> ( http://en.wikipedia.org/wiki/JavaFX )
[08:30:44] *** tom17bombadil_ has joined ##java
[08:31:05] <cybereal> it's tools library and script language on top of java for rich GUI development
[08:31:16] <cybereal> it's not "instead of" it's "in addition to"
[08:31:28] <cybereal> ~javafx
[08:31:28] <javabot> JavaFX (http://sun.com/javafx) is a scripting language from Sun, designed to use declarative syntax to create GUIs, primarily. You can find a tutorial at http://java.sun.com/javafx/1/tutorials/ui/
[08:36:05] <KristopherWindso> is the scripting language interpreted by a running java program? it doesn't appear to be a normal java library
[08:37:30] *** acidfingers has left ##java
[08:38:41] *** Epitaph64 has joined ##java
[08:39:26] <Epitaph64> hey, anyone want to test my game? only have tested it on two computers so far
[08:40:01] *** pattwo has joined ##java
[08:41:49] *** TheiPirate has joined ##java
[08:41:53] *** toader has joined ##java
[08:41:55] <toader> Hi, could anybody help me this problem? http://paste.pocoo.org/show/104744/
[08:42:48] *** flb has quit IRC
[08:43:52] <TheiPirate> Anyone know much about bytecode? I'm trying to figure out how to get the target of an instruction
[08:46:11] *** christo_m has quit IRC
[08:47:55] *** pattwo has quit IRC
[08:51:14] *** pilkarn has joined ##java
[08:51:26] <da_shadow> Epitaph64: I'm willing to test a game
[08:51:30] <pilkarn> extends is subclass right?
[08:51:54] *** gladideg has quit IRC
[08:52:35] <da_shadow> TheiPirate: Looks like your connection is being closed due to inactivity
[08:53:38] <TheiPirate> ?
[08:54:25] <toader> Hi, could anybody help me this problem? http://paste.pocoo.org/show/104744/
[08:55:24] *** arpu has quit IRC
[08:55:49] <da_shadow> TheiPirate: oops, copied the wrong name
[08:56:22] <da_shadow> toader: Looks like a closed connection
[08:57:23] <toader> da_shadow: not really, as in that table there is 100M records
[08:57:41] *** Nebulam has quit IRC
[08:57:46] <toader> so, when select and wait a long time no responese
[08:58:11] *** josemoreira has joined ##java
[09:00:14] *** hypervise has quit IRC
[09:00:23] <Epitaph64> well here's the download link in case anyone is interested then: http://www.filedropper.com/epi1949_3
[09:01:10] *** casmo has joined ##java
[09:02:04] <Epitaph64> I reworked the basic engine so I could have the enemies shoot back :D haha
[09:02:30] <Epitaph64> had to make an actor class that all the game objects descend from, and then it was much easier to implement
[09:02:47] <Epitaph64> Then I wrote a couple of short loops and added ogg background music >:D
[09:04:10] <da_shadow> toader: mysqlPool.closeAllConnections(); looks an odd call. You shouldn't be closing the connections the pool has until the main loop has finished (maybe)
[09:04:57] *** sphenxes has joined ##java
[09:05:14] *** doc`` has quit IRC
[09:05:26] *** tretle has quit IRC
[09:06:37] *** staar2 has joined ##java
[09:06:42] <staar2> hi
[09:07:04] *** landonf has joined ##java
[09:07:13] <staar2> any umlet users here ?
[09:07:38] *** christo_m has joined ##java
[09:09:08] <TheiPirate> Nobody knows about bytecode?
[09:09:17] <da_shadow> Epitaph64: Is this a in progress game?
[09:09:43] <Epitaph64> yeah it is >:D
[09:09:52] <landonf> Howdy. Anyone run across an easy method/tool for auto-restarting maven exec:java (or some other plugin that will run arbitrary java) based on scanning for changes in the class path?
[09:10:03] <Epitaph64> very in progress actually, is why I want some feedback hehe
[09:10:50] *** KristopherWindso has left ##java
[09:11:19] <da_shadow> Epitaph64: When you die, you have to close the game to restart. Cannot click on the close to quit. It doesn't seem as fun as a traditional invaders game
[09:11:31] <pilkarn> and implements does what ? implements an interface? how is that different from subclassing?
[09:11:55] <Epitaph64> sadly it's not very difficult
[09:12:55] <Epitaph64> yeah, I mainly am making it just to learn some java "techniques" I suppose
[09:13:20] <Epitaph64> and then I wanted to make a couple short loops to go with it lol
[09:15:18] <da_shadow> Epitaph64: W00t, exception: http://rafb.net/p/h6bAET98.html I was just holding down the space bar. Also, there seems to be a drawing bug. You shoot only a single square, but it looks like there is a line of them. Also, you can shoot enemy bullets (but that might be intentional)
[09:15:49] <Epitaph64> ah I forgot to remove the space bar functionality from earlier hehe
[09:16:14] <Epitaph64> the shooting of enemy bullets is intentional, since the enemy currently in the game is just a weak drone
[09:17:51] <Epitaph64> for this: Also, there seems to be a drawing bug. You shoot only a single square, but it looks like there is a line of them. could you give a screenshot?
[09:17:58] <Epitaph64> I'm not sure how that occured :D
[09:19:57] <Epitaph64> left arrow key is shoot, and right arrow key is to charge a burst fire clump hehe
[09:20:06] <Epitaph64> later it will be a laser or homing missles or something more fun
[09:21:03] <da_shadow> Epitaph64: Cannot grab a screent shot. Might be an lcd update thing
[09:21:36] <Epitaph64> ah it may just be because they move so fast perhaps hmm
[09:22:00] <Epitaph64> they look a little blurred on mine, but I like the effect haha
[09:22:51] *** mepholic has quit IRC
[09:22:53] <Epitaph64> I'll have to look into that array overflow though, as the main problem so far
[09:23:33] <Epitaph64> well time for sleep, thx for the comments
[09:23:35] <Epitaph64> later all
[09:23:40] *** Epitaph64 has quit IRC
[09:30:04] *** gregor_k has joined ##java
[09:31:37] *** bhz- has quit IRC
[09:35:43] *** manunderground has joined ##java
[09:35:55] <manunderground> does anyone know of a good disassembler/decompiler for Java?
[09:36:04] *** bashoh has quit IRC
[09:36:04] <manunderground> I am currently using JT-Gui which is OK
[09:36:16] <manunderground> but it'd be nice to have something like .net reflector
[09:39:08] <da_shadow> I used to use http://members.fortunecity.com/neshkov/dj.html DJDecompiler. I don't play with those sorts of things anymore though
[09:39:35] *** jcp has joined ##java
[09:40:02] *** pilkarn has quit IRC
[09:43:16] *** tomvolek has quit IRC
[09:44:33] *** freeone3000 has joined ##java
[09:45:35] *** bas-i has joined ##java
[09:46:46] *** dogmeat has quit IRC
[09:51:42] *** M[]ssad has quit IRC
[09:53:04] *** exbio has joined ##java
[09:53:10] *** casmo has quit IRC
[09:53:13] *** casmo has joined ##java
[09:54:30] *** zophy has joined ##java
[09:55:16] *** zophy has quit IRC
[09:56:17] *** zophy has joined ##java
[09:57:19] *** zophy has quit IRC
[09:57:34] *** gdoko has joined ##java
[09:57:41] *** zophy has joined ##java
[09:58:13] *** casmo has quit IRC
[09:58:33] *** zophy has quit IRC
[09:58:46] *** Archon has joined ##java
[09:58:54] *** zophy has joined ##java
[09:59:07] <Archon> Does the SwingWorker method "done()" get called even after an exception has been raised in doInBackground()?
[09:59:23] *** LostMonarch has joined ##java
[10:01:40] *** popcornPanic has quit IRC
[10:06:05] *** TheCastor has joined ##java
[10:06:20] *** Junior has quit IRC
[10:07:10] *** jcp has quit IRC
[10:07:44] <cybereal> ~javadoc SwingWorker
[10:07:48] <javabot> cybereal: http://is.gd/kkmr [javax.swing.SwingWorker]
[10:10:06] <cybereal> Archon: doesn't seem clear but various indicators exist to suggest that it will be
[10:16:56] *** Yustme has joined ##java
[10:22:01] *** EspenG has joined ##java
[10:24:13] *** manunderground has quit IRC
[10:26:31] *** neural has joined ##java
[10:26:56] <Archon> Thanks cybereal.
[10:27:02] <neural> Are there any pointers/tips/hints for speeding up the drawing/render speed of JInternalFrame's?
[10:27:42] *** morkar- has joined ##java
[10:27:42] <ernimril> neural: why do you think that drawing them is slow?
[10:28:30] <ernimril> neural: (personally I do not use them, I think MDI works very bad, but I think they would use the standard java2d drawing)
[10:29:38] <neural> I use Apache Batik for SVG in JInternalFrames, the speed is fine on Windows, but not on MacOSX and *NIX.
[10:29:54] <neural> I also tried just Jframes, same problem.
[10:30:07] <ernimril> neural: so the problem is not JInternalFrame, but batik then
[10:30:53] <ernimril> neural: you can try to use the java2d-openGL renderer or you can trace the java2d calls and see what calls uses hardware and what does not
[10:30:58] <ernimril> ~java2d
[10:30:58] <javabot> see http://java.sun.com/products/java-media/2D/ and for a tutorial see http://java.sun.com/docs/books/tutorial/2d/
[10:31:26] <neural> The problem is not only Batik, because Java2D gives me the same trouble.
[10:31:58] <ernimril> neural: what type of speed do you expect to get? how often do you do full repaints?
[10:32:00] *** LostMonarch has quit IRC
[10:32:12] <ernimril> neural: how complex are your drawings?
[10:33:00] <neural> Syntax trees.
[10:33:11] <neural> Lot of text though :(
[10:33:13] <ernimril> neural: did you try to run the SwingSet2 demo application (part of the jdk), it has a few quite complex drawings that are animated
[10:33:23] <neural> let me try that
[10:34:15] *** morkar-- has joined ##java
[10:34:17] *** morkar- has quit IRC
[10:34:38] <neural> ah; the fonts seems to be the problem...
[10:35:50] <ernimril> neural: font drawing can be heavy, try to turn off anti aliasing for them
[10:40:32] *** zophy has quit IRC
[10:42:18] *** bbq^ has quit IRC
[10:43:46] *** zophy has joined ##java
[10:44:02] *** TooAngel has joined ##java
[10:44:06] *** neural has quit IRC
[10:44:55] *** yobo2 has quit IRC
[10:45:07] *** zophy has quit IRC
[10:47:01] *** zophy has joined ##java
[10:49:42] *** TooAngel has left ##java
[10:51:55] <staar2> realization in UML is classes which implement from interface ?
[10:52:54] *** zophy has quit IRC
[10:58:39] *** dvayanu has joined ##java
[10:59:52] *** sfragis has joined ##java
[11:00:05] *** arpu has joined ##java
[11:00:34] *** sphenxes has quit IRC
[11:01:45] *** lvh has joined ##java
[11:01:50] <lvh> hey
[11:02:14] <lvh> I'm looking at BigInteger's javadoc, and I can't find constructors for ints and longs. Could anyone explain how I should go about that?
[11:02:22] *** juc0 has quit IRC
[11:03:05] <lvh> (Context: I have a sequence (=array) of integer numbers that can grow stupidly large and is recursively defined. The seed value is pretty small (more than small enough to fit into an int).)
[11:03:48] <lvh> Or, to rephrase: how do I make a BigInteger from a literal int/long?
[11:06:06] *** pstickne has joined ##java
[11:06:24] <pstickne> one line
[11:06:27] <pstickne> two lines
[11:06:31] <pstickne> three lines \o/
[11:06:45] <pstickne> grr :p
[11:07:18] <lvh> I suppose casting to Integer and then toString and using BigInteger's String-arg constructor would work, but that seems like a really stupid way of doing things. (Going from an integer value to a string value to get an integer value? What?)
[11:07:38] <pstickne> lvh: guess what BigInteger takes as input!
[11:07:48] <pstickne> but why case to Integer?
[11:07:50] <pstickne> *cast
[11:08:08] <pstickne> new BigInteger("" + silly_java);
[11:08:19] *** riotz has joined ##java
[11:08:20] <pstickne> \o/
[11:08:21] *** BlindHunter has joined ##java
[11:08:43] <lvh> I'm looking at the constructors here: http://java.sun.com/javase/6/docs/api/java/math/BigInteger.html
[11:08:47] <pstickne> (Yes, BigInteger is a trivialized case of why Java is not my favorite language :-)
[11:09:17] <lvh> I don't like Java either, but I'd love getting a degree, which unfortunately involves me learning Java :-p
[11:09:33] <tieTYT3> i wish testng has junit-like assert methods
[11:09:34] <pstickne> lvh: unfortunately; anyway, what is the type of "" + x?
[11:09:39] <tieTYT3> assertEquals is very cool in junit
[11:09:52] <lvh> pstickne: "" + 10000 gets me a String '10000'?
[11:09:53] <tieTYT3> although it's probably braindead to create those yourself
[11:09:59] <pstickne> lvh: tias
[11:10:55] <lvh> Well, it doesn't make eclipse complain
[11:11:03] <pstickne> tieTYT3: testng is a unit-test framework without helper asserts?
[11:11:07] <pstickne> lvh: :-)
[11:11:34] <pstickne> lvh: + is overloaded on /strings/ in Java
[11:11:39] <lvh> pstickne: Which reduces the options to
[11:11:40] <tieTYT3> pstickne: maybe it does have them... but at work we just use assert
[11:11:43] <lvh> pstickne: dear god man
[11:11:44] <tieTYT3> the keyword
[11:11:44] <pstickne> lvh: the rhs can be any value (including null, btw)
[11:12:05] <pstickne> tieTYT3: read the testng docs/API?
[11:12:34] <lvh> pstickne: Well, i've narrowed it down to byte[], int, and String. int would make no sense, char[], well, I suppose -- but I sure as hell hope not, because that would mean my '1' is interpreted as a byte which is a two's complement repr of a number
[11:12:42] <lvh> pstickne: But judging from your answer that's not the case. Thanks!
[11:12:48] <cybereal> when either side of + is a string the other side is passed to String.valueOf() and the result is appended/prepended
[11:13:25] <pstickne> lvh: BigBlahBlah(string_in_base_10_integer_notation) will DoTheRightThing
[11:13:27] <cybereal> which is why "blah" + null is not a problem
[11:13:47] *** Taggnostr has quit IRC
[11:13:51] *** elementz has joined ##java
[11:14:03] <pstickne> cybereal: nifty, didn't realize it was either side :p
[11:14:48] *** bitshuffler has joined ##java
[11:15:04] *** systat has joined ##java
[11:15:13] *** mengu has quit IRC
[11:16:25] <lvh> pstickne: I suppose '10000' is slightly less unsightly than ''
[11:16:28] <lvh> pstickne: +10000
[11:16:37] *** armyriad has quit IRC
[11:16:50] <pstickne> lvh: depends if you start with a constant or not
[11:17:44] <lvh> pstickne: This is the definition of that symbolic constant, so I suppose not :-)
[11:18:06] <lvh> pstickne: Anyway, thanks a lot!
[11:18:27] <cybereal> lvh: note, single quotes are char literals, they aren't interchangeable for strings
[11:21:44] <pstickne> lvh: you're welcome. and heed cybereal
[11:23:18] <lvh> Doh, almost burned myself on that one!
[11:27:44] *** christo_m has quit IRC
[11:29:25] *** elementz has quit IRC
[11:30:23] *** zophy has joined ##java
[11:33:57] <TheiPirate> If i have a hashmap { < newNode, {nNode} > } and I want to call on the nodes in nNode set, how can i do this?
[11:36:18] <mirari> TheiPirate: No sure what you mean, do you want to get the values of the hashmap?
[11:36:50] <TheiPirate> let me post an example one sec
[11:37:15] *** marvi has joined ##java
[11:38:02] <pstickne> HashMap<KeyType,ValueType>
[11:38:12] <pstickne> HashMap.get(KeyType) => ValueType
[11:38:27] <pstickne> next :-)
[11:38:55] <TheiPirate> http://pastebin.com/d485b7893
[11:40:14] <pstickne> TheiPirate: so see previous lines
[11:40:24] <pstickne> or google: "java 6 hashmap"
[11:40:28] <TheiPirate> what is =>
[11:40:42] <dangertools> an arrow
[11:45:13] *** bas-i has quit IRC
[11:46:54] *** doc`` has joined ##java
[11:47:16] <ycy> http://img6.imageshack.us/img6/4523/fbcaptchabd1.jpg
[11:49:03] <da_shadow> ycy: Awesome, do you enter 5/8 or the special character for 5/8ths?
[11:49:28] <ycy> da_shadow: dunno
[11:50:31] <TheiPirate> pstickne i still dont get it
[11:51:04] <TheiPirate> i want to access nNode set and look at each element and check x.p
[11:51:34] <cybereal> TheiPirate: that's not a function of a map, getting the set is, that's all, then you've got a set to work with, now go read the api for set
[11:51:41] <cybereal> sets aren't indexable btw
[11:51:48] <cybereal> hence being sets
[11:51:52] <pstickne> cybereal: what? no order? :(
[11:52:04] <pstickne> cybereal: next you're going to tell me the don't contain duplicates...
[11:54:14] *** garotosopa has joined ##java
[11:55:18] *** vix85 has joined ##java
[11:55:37] *** AskHL has joined ##java
[11:55:42] <cybereal> 40⅝
[11:58:55] *** Ivellina has joined ##java
[12:01:27] <tieTYT3> cybereal: do you write unit tests?
[12:02:04] <cybereal> tieTYT3: no, but probably not for the reasons you'd assume
[12:02:12] <tieTYT3> what reasons?
[12:02:57] <pstickne> (he's lazy ;-)
[12:03:09] <selckin> someone else does
[12:03:19] <cybereal> I work on an ancient codebase which never had a single test of any variety created for it before I started, the release cycles are packed to the brim and mostly I'm alone in getting shit done. So the fact that legacy shit-code is not conducive to directly unit testing, and I don't have time to refactor the entire system to make tests, I don't write them.
[12:03:20] <pstickne> selckin: stop taking all the fun out of it :-/
[12:03:20] <cybereal> SOmeday
[12:03:27] <cybereal> Someday we'll have tests :)
[12:03:36] *** Carnage\ has joined ##java
[12:03:56] <tieTYT3> cybereal: so you don't work on side projects?
[12:04:00] <cybereal> I do have some integration tests though now, which is a lot better than the nothing we started with
[12:04:03] *** defenderBG has quit IRC
[12:04:04] <tieTYT3> you got a kid, so that's understandable
[12:04:05] <da_shadow> ah, where would we be without legacy systems...
[12:04:17] <cybereal> tieTYT3: not really, I never had much motivation to finish any of my own projects
[12:04:26] <cybereal> tieTYT3: what I do on the side is more akin to research than real projects
[12:04:31] <tieTYT3> i see
[12:04:35] <tieTYT3> well fyi
[12:04:45] <tieTYT3> there's a book dedicated to testing legacy systems without tests
[12:05:05] <tieTYT3> it's on deck for me
[12:05:09] <lvh> Does the compiler optimize private static finals just like it does public static finals?
[12:05:16] <cybereal> that'd be great, if I had a free second to breathe let alone read a book
[12:05:36] <letfunbegin> lvh: I guess that depends on which compiler you're using :)
[12:05:50] <TheiPirate> so there isnt a way to get p1 from a node in the set?
[12:05:53] <cybereal> tieTYT3: anyway I'm not going to spend one moment trying to test old broken shitty code I already know is shitty, instead, I'm going to replace it with modular code that's easily tested
[12:06:09] <tieTYT3> i see
[12:06:15] <tieTYT3> this guy named uncle bob
[12:06:19] <tieTYT3> he's my new heart throb
[12:06:34] <tieTYT3> anyway, he wrote a blog article that you shouldn't restart from scratch
[12:06:40] <tieTYT3> but if you're working on it alone
[12:06:44] <tieTYT3> most of his points don't matter
[12:07:06] <cybereal> eh 1) I never said I'm starting from scratch, that's impossible anyway
[12:07:20] <cybereal> and 2) I don't care about some blogger's opinions, I have enough of my own :)
[12:07:51] <tieTYT3> so, you're done with advice?
[12:07:58] *** RamboZa has joined ##java
[12:08:00] <tieTYT3> full, or something?
[12:08:17] <cybereal> just blanket advice, it's got to be far more specific to make it anywhere in this neural net
[12:09:00] *** BW^- has joined ##java
[12:09:22] <BW^-> anyone knows how to make a string consisting of digits, a dot, and more digits, of a double
[12:09:23] <BW^-> ?
[12:09:31] <BW^-> and throw exception if the double can't be contained in that format.
[12:10:00] <tieTYT3> well here's the article if you want to read the specifics: http://blog.objectmentor.com/articles/2009/01/09/the-big-redesign-in-the-sky
[12:10:11] <tieTYT3> i was just summarizing
[12:10:28] <da_shadow> BW^-: Do you mean like Double.parseDouble?
[12:11:05] <BW^-> i have a double value, and want to make a string of it, max 10 chars in length.
[12:11:06] <cybereal> tieTYT3: the thing about "starting over" is ... well there's a few things. One, you have to have had a start in the first place and when code is so .. "undesigned" that it's impossible to change one thing without changing everything... you never started.
[12:11:13] <BW^-> http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html maybe describes how to do this
[12:11:25] <cybereal> tieTYT3: the other thing is, once you understand what is there, you can never go back and start over mentally, everything new you do will have been shaped by the original
[12:11:39] <tieTYT3> yep
[12:11:39] <BW^-> DecimalFormat myFormatter = new DecimalFormat("########.########").substring(0,10); would work
[12:11:42] <cybereal> so I wouldn't worry about the idea of starting over :)
[12:11:47] <BW^-> da_show: would work?
[12:11:57] <BW^-> perhaps not super-pretty though
[12:12:19] <BW^-> wops
[12:12:29] <tieTYT3> i see your point of view
[12:12:31] <BW^-> DecimalFormat myFormatter = new DecimalFormat("########.########"); myFormatter.format(value).substring(0,10);
[12:12:37] <tieTYT3> and i've been in a position i felt was similar to yours
[12:12:49] <tieTYT3> does your app use threading... incorrectly?
[12:13:19] <cybereal> tieTYT3: of course, but that's basically the majority of all java apps isn't it? heh
[12:13:30] <tieTYT3> when swing is used, for sure
[12:14:04] <cybereal> if you think of a random concurrency no-no this code base probably had it or still has it
[12:14:35] <tieTYT3> you must get great benefits
[12:14:46] <cybereal> it started as a grab-bag of stupid and over time as I've had to implement features and fix bugs it's been refactored little by little, definitely not starting over here
[12:14:52] <cybereal> heh
[12:15:03] <cybereal> well I have good working terms despite the shoddy codebase
[12:15:13] <tieTYT3> that's how my last job was
[12:15:17] <tieTYT3> and then they fired the ceo
[12:15:27] <cybereal> and this one particular... "thorn" of a person is just about to exit the company entirely
[12:15:39] <tieTYT3> i constantly bitched here about the code quality, but i really enjoyed the environment except for that
[12:15:55] <cybereal> which will bring an end to the last force for stupidity in development so I think in the next year we'll see some leaps and bounds for quality in this and other products
[12:16:04] <tieTYT3> nice
[12:16:17] <cybereal> yeah well at least in my case, the people who are my bosses, and my peers, we all basically agree on the quality issues
[12:16:24] <tieTYT3> so why does that person refuse to write better code?
[12:16:27] <cybereal> I don't know
[12:17:00] <cybereal> you ever met someone who... everyone you seem to believe should be respected thinks they're great, shows respect for their skills and opinions, but after some time you start to wonder why the hell they do?
[12:17:20] <cybereal> It becomes painfully apparent that this person is basically wrongfully admired
[12:17:29] <cybereal> by people who wouldn't know any better anyway
[12:17:51] <cybereal> and because of this person's position in the company and its history, nobody questions him
[12:18:12] *** da_shadow has left ##java
[12:18:14] <cybereal> so there's never any way for the managerial staff to realize he's a liability
[12:18:35] <cybereal> tieTYT3: but fortunately for us, he wants to get on with his life, take his big swath of the company value and go do something else lmao
[12:18:59] <cybereal> (We were recently bought by a larger company so all of his investments were rewarded)
[12:19:13] <tieTYT3> i see
[12:19:34] <cybereal> anyway he's a good guy, nice, it's just like his skill set is stuck 10-15 years back behind everyone else
[12:19:50] <cybereal> and from a world of software developmet where planning was entirely unnecessary
[12:20:01] *** Daniel_H has joined ##java
[12:20:19] <cybereal> but our market's grown considerably and ... grown up as well, so our ability to quickly adapt to client needs is vital, and also AWOL
[12:20:20] <tieTYT3> that was my boss
[12:20:27] <tieTYT3> everyone non-technical thought he was brilliant
[12:20:31] <tieTYT3> but he wrote the worst code i've seen
[12:22:03] *** DjZemich has joined ##java
[12:22:09] <cybereal> so at any rate, when he's not involved there's a set of people who are actually pretty good at programming and software design who sorta blossom and show their real strengths, and to have that going full time will be nice
[12:22:32] *** HideousNashimoto has joined ##java
[12:22:36] <cybereal> and to get rid of someone questioning strategies they don't even understand will be nice too (This is part of why I finally got to implement OSGi)
[12:23:14] *** elementz has joined ##java
[12:23:28] *** systat has quit IRC
[12:23:38] <tieTYT3> i worry in that situation that once the reality of the shitty code base becomes evident to upper management
[12:23:47] *** Carnage\ has quit IRC
[12:23:47] <tieTYT3> that your team at the time will be thrown under the bus
[12:24:11] <cybereal> tieTYT3: we've been pretty careful to avoid that scenario
[12:24:19] <cybereal> first scapegoat: the original product was purchased
[12:24:45] <cybereal> *WE* didn't write it (even though before I got there, two pre-existing programmers, the one leaving included, added tons of what makes up the codebase as it is now)
[12:25:36] <cybereal> anyway we're well past the stage where that would happen
[12:25:39] <tieTYT3> cybereal: you don't really know me but, do you think if i were to interview this guy, i could tell there's something wrong with him?
[12:26:15] <cybereal> tieTYT3: if you asked him for code samples I think you'd wonder if he still compiles with jdk 1.1
[12:26:30] <tieTYT3> ha, i don't usually do that
[12:26:38] <tieTYT3> maybe i should
[12:26:43] <tieTYT3> i wish i could do that when i take interviews
[12:27:05] <cybereal> I get the impression that at one point he was a good coder but lost interest in maintaining his skills, but, to his credit he is good at other aspects of the company
[12:27:31] <cybereal> just wish he would've stepped aside from the development group instead of constantly meddling at his random convenience
[12:28:14] *** DjZemich has quit IRC
[12:28:18] <tieTYT3> yeah i hate guys like that
[12:28:24] <tieTYT3> that think they're "done" when it comes to learning about SE
[12:28:39] <cybereal> he gets the customer base, the overarching value we offer, how to sell it technically, and a generally accurate idea of what's feasible, technically, as well as basic ideas on how to go about implementing them, but that's probably where it ends
[12:28:40] <tieTYT3> and still involve themselves
[12:29:17] <lvh> Please tell me there's a better way to do this: private static final BigDecimal DEFAULT_DEATH_RATE = (new BigDecimal(5)).divide(new BigDecimal(100)); // 5%
[12:29:44] <lvh> It's ugly as hell.
[12:30:04] <cybereal> tieTYT3: here's a fun example, his idea for modularizing message handling was to make several message handler classes, named after the message type, and load them reflectively and instantiate them and call a method on them, for every message that ever comes through the system
[12:30:24] <cybereal> tieTYT3: but that's not the fun part, the real fun part is that each of these handlers is about 1200 lines long, in a single method, and they are entirely stateless
[12:30:44] <cybereal> tieTYT3: so, a new instance is created every single time a message comes through for no reason, and maintaining any of this code is an exercise in self-torture
[12:30:46] <mirari> cybereal: heh
[12:31:10] *** hultqvist has joined ##java
[12:31:12] *** teralaser has joined ##java
[12:31:33] *** BlindHunter has quit IRC
[12:31:45] <tieTYT3> so what would you have done/
[12:31:51] <tieTYT3> in my server
[12:31:58] <tieTYT3> i reuse the handlers and they're stateless
[12:32:08] <tieTYT3> and there is a class for each, but they're about 150 lines at most
[12:32:28] *** hultqvist has left ##java
[12:33:03] <cybereal> tieTYT3: what I'm going to do is implement the message handling dataflow style, with an emphasis on concurrency and clustering for scalability
[12:33:22] <cybereal> tieTYT3: every one of those handlers do so many of the same things
[12:33:32] <cybereal> but they usually do them in slightly differing orders
[12:33:43] <mirari> cybereal: reuse through copy-paste? :)
[12:33:55] <tieTYT3> i see
[12:34:04] <tieTYT3> well that's another reason it varies from mine
[12:34:17] <cybereal> mirari: heh maybe at some point it was, but over time changes got made so even the same actual operations were different sorts of code patterns and styles
[12:35:06] <tieTYT3> here's what my code looks like
[12:35:09] *** tilerendering has joined ##java
[12:35:39] <tieTYT3> http://pastebin.com/d414c2345
[12:35:44] <tieTYT3> does this seems just as stupid?
[12:36:59] <tieTYT3> sorry to turn this into a personal issue
[12:38:05] <cybereal> tieTYT3: it's hard to say, I think the basic model (besides the obvious wrongness) of *my* project's code was probably ok at one point, ignoring any foresight of eventual increase in functionality
[12:38:24] <tieTYT3> i see
[12:38:26] <cybereal> but at this point, we wan tto be able to do so many things, and the protocol changes with new features, changed features, etc. 2-3 times a year
[12:38:43] <cybereal> it's impossible to maintain this kinda of messaging handler in 10-12 monolithic methods
[12:39:11] <cybereal> what you've got, well the basic idea of it is going to be done, one way or another
[12:39:20] *** elindio has joined ##java
[12:39:35] <tieTYT3> ok cool :)
[12:39:37] <tieTYT3> just making sure
[12:39:45] <tieTYT3> cause your description of what he did didn't seem that far off from mine
[12:39:58] <tieTYT3> of course, partially thanks to you, i do consider concurrency
[12:40:08] <cybereal> in my case, with dataflow as the basic strategy, the message would come in raw, get persisted and the mechanism to associate metadata with it would be made available immediately, and then the iterative process starts where the system finds the first processor that "matches" it in that state, and executes it against the data
[12:40:12] <tieTYT3> everything goes into that inbound queue and is processed in order
[12:40:37] <cybereal> so this step you're doing here, one of the first few processors would do that but instead of delegating out to a specific class, it'd describe the data and just be done
[12:41:20] <cybereal> and since the "IP" (Information Packet) is still in the system (or in our design, reentered into the queue) then the runtime will look for another processor that matches the new, broader data
[12:41:28] <cybereal> and execute that
[12:41:33] <cybereal> this is actually what drools uses rete for, btw
[12:41:41] <cybereal> this matching process
[12:42:42] <tieTYT3> i don't understand this comment: <cybereal> so this step you're doing here, one of the first few processors would do that but instead of delegating out to a specific class, it'd describe the data and just be done
[12:42:47] <tieTYT3> how would it just be done?
[12:42:50] <cybereal> tieTYT3: the cool thing about this is that each iteration is independent from the last, code-wise, since anything that might be in the state of code is represented by the added or changed metadata on the IP, you can concurrently process this data arbitrarily
[12:43:05] <cybereal> tieTYT3: the processor would've tagged the IP with the message/command type
[12:43:12] <cybereal> and then returned
[12:43:20] <tieTYT3> and then the next step figures out what to do with it?
[12:43:25] <cybereal> the next iteration, a more specific processor would be matched instead
[12:43:31] <cybereal> essentially
[12:43:35] <tieTYT3> ah gotcha
[12:43:43] <tieTYT3> yeah i *feel* like i don't need that yet
[12:43:49] <cybereal> this lets you insert processing behaviors anywhere, all you need to do is setup a more/less specific match
[12:43:52] <tieTYT3> this code doesn't change very often
[12:44:23] <cybereal> tieTYT3: I wouldn't have even considered something this level until we got the requirement to add a ton of user customizable message processing rules and workflows
[12:44:27] <toader> Hi, I do the upgrade Mysql 5.0 to 5.1, but failed. Could anybody help me? http://paste.pocoo.org/show/104761/
[12:44:42] <cybereal> so yeah, if the system was still very static and simple I probably would've just cleaned up the strategy pattern into a few more layers and let it be at that
[12:45:25] *** foo-nix has joined ##java
[12:45:27] <tieTYT3> ok cool
[12:45:38] <tieTYT3> well let me know how rete works for you
[12:45:44] <cybereal> but now, an admin could setup a few, seemingly innocuous rules that result in a bunch of xslt and routing changes based on a number of arbitrary matching rules and such, suddenly processing a message becomes potentially very expensive and time consumer and here we are with absolutely no scaling strategy at all... oy
[12:45:55] <tieTYT3> would you use drools directly or just the algorithm?
[12:46:03] <cybereal> tieTYT3: I'm still evaluating that
[12:46:07] <marvi> toader: This is #java...
[12:46:11] *** foo-nix has quit IRC
[12:46:28] <cybereal> tieTYT3: I might just implement this myself, especially if drools does anything to make working with terracotta hard
[12:46:48] <tieTYT3> i see
[12:47:11] <tieTYT3> it might be worth ripping out the guts of drools to get just the part you want
[12:47:12] <cybereal> part of the common aspect of this system is parsing xml and to do things entirely disconnected between nodes in the cluster you'd have to reparse the message one way or another each iteration and I'd like to avoid that so I think we're going to use terracotta to share dom instances
[12:47:15] <tieTYT3> i donno how clean it's written
[12:47:19] <cybereal> tieTYT3: indeed, it might be
[12:47:31] <cybereal> and it might be that it can be used partially for the matching implementation
[12:47:43] <cybereal> or it might be that the DSL stuff is worth the effort in making it work heh
[12:47:53] <cybereal> I won't actually be doing any of this til june anyway
[12:47:59] <tieTYT3> i see
[12:48:02] <tieTYT3> it sounds fun :)
[12:48:23] <tieTYT3> fitting it into the app may not be
[12:48:27] <tieTYT3> but at least you get to learn this stuff
[12:48:29] <cybereal> it is, this year is going to be awesome so far as getting to flex my ... creative problem solving muscles :)
[12:48:37] <cybereal> yeah and it's funny and ironic that you say that
[12:48:48] <tieTYT3> why ironic?
[12:48:54] <cybereal> the whole reason I took this job in the first place was because I thought I'd get to learn new and more advanced things vs. the web developer job I had before
[12:49:19] <cybereal> and even though for like... a month I was exposed to new things, they all turned out to sound more interesting and advanced than they were, then I got assigned to this code...
[12:49:29] <cybereal> and only now, four years later, am I finally doing new and more interesting shit
[12:50:42] <tieTYT3> ha, cool
[12:51:21] <tieTYT3> i have an unrelated question for you (or anyone)
[12:51:24] <tieTYT3> it's about my game
[12:51:38] <tieTYT3> i've got a MapPlayer, and a MapPlayerSprite
[12:51:50] <tieTYT3> the MapPlayer gets messages from the server (indirectly) that tells it's coordinates
[12:52:02] <tieTYT3> setting that, the mapPlayer tells it's listeners
[12:52:09] <tieTYT3> the MapPlayerSprite
[12:52:18] <tieTYT3> that it moved from 1,1 to 1,2
[12:52:41] <tieTYT3> and the mapPlayerSprite knows to render itself gradually to that
[12:52:54] <tieTYT3> but of course, 1,1 is actually like 300,300 in pixels
[12:53:16] <tieTYT3> i'm thinking of letting the MapPlayer be responsible for mapping 1,1 to 300,300 in pixles
[12:53:20] <tieTYT3> and it HAS-A sprite
[12:53:30] *** systat has joined ##java
[12:53:34] <tieTYT3> does that sound wrong?
[12:53:44] <tieTYT3> i'm not sure if i'm violating or following MVC either way
[12:54:42] <cybereal> 1,1 to 1,2 refers to moving tiles and that 300,300 is the actual screen location?
[12:54:51] <tieTYT3> yes
[12:55:09] <tieTYT3> this is 100% client side
[12:55:18] <tieTYT3> these classes i'm discussing
[12:55:50] <cybereal> MapPlayerSprite knows it's rendering itself across a tilemap, it's fair to expect MapPlayerSPrite to figure out where it should draw itself, it's also fair for the map to provide a way to query the real and virtual pixel locations related to tiles
[12:56:35] <cybereal> so I'd say you're probably on the right track, my instinct would be for the map to provide a method for the sprite to consume for the sprite to make its drawing decisions
[12:57:04] <cybereal> but the inverse could be ok too, I guess, I think it's probably more a matter of how you are doing all the rest of your rendering... as far as MVC goes though it seems ok, (well, SoC anyway)
[12:57:17] <tieTYT3> what's SoC?
[12:57:29] <cybereal> MVC extends SoC heh
[12:57:33] <cybereal> separation of concerns
[12:57:36] <tieTYT3> oh right
[12:57:46] <tieTYT3> i plan on having a MapPlayer
[12:57:54] <tieTYT3> and it has a MapPlayerRenderer
[12:58:02] <tieTYT3> stuff like that
[12:58:16] <tieTYT3> the thing is, up to this point, I considered my Sprite to be part of the view
[12:58:33] <tieTYT3> and i kinda feel like that's a gray area now
[12:58:38] <cybereal> well it is
[12:58:42] <cybereal> and MVC is full of them
[12:58:48] <cybereal> because a very simplistic three part system is rare
[12:58:55] <cybereal> especially in client/server
[12:59:05] <tieTYT3> i see
[12:59:08] <cybereal> in client/server you almost *always* have an "MMVC" from the client's perspective
[12:59:11] <tieTYT3> all i know is I want this to be easier to test
[12:59:28] <tieTYT3> what's that mean?
[12:59:33] <cybereal> more than one model
[12:59:34] <tieTYT3> i haven't heard of that
[12:59:36] <tieTYT3> oh
[12:59:54] <tieTYT3> i have this situation very similar to this
[12:59:56] <cybereal> client's local model, as well as the remote one most likely managed by some proxy locally as well, etc.
[12:59:56] <tieTYT3> for the battle scene
[13:00:00] <tieTYT3> and in almost all situations
[13:00:11] <cybereal> yeah it's just par for the course with a rich client
[13:00:11] <tieTYT3> the BattleCharacterSprite needs to know its BattleCharacter to do shit
[13:00:23] <tieTYT3> so i figure one should reference the other somehow
[13:00:44] <tieTYT3> instead of these stupid external maps I'm using where they share the same Id and you say get(id) and get the BattleCharacter out
[13:00:57] <tieTYT3> in other words, it feels like the observer pattern is making my life harder
[13:01:11] <cybereal> so the oft overlooked thing, i think is that in any MVC, any part could be structured in itself the same or similar way, though most often it's the View that is... like swing has its own MVC you know, the model is the objects in the component hierarchy and their properties
[13:01:56] <cybereal> tieTYT3: well if it's making things harder in a non-clerical way it's usually a good idea to try something else or at least think real hard about alternatives :)
[13:02:14] <tieTYT3> yes like for a JLabel, the string would be the model, the listeners would be the C and the V would be well... the view
[13:02:32] <tieTYT3> yeah i'll go with it and see how it turns out
[13:02:37] <tieTYT3> first i think i'll add unit tests though
[13:02:46] <tieTYT3> i'm super addicted to unit tests right now
[13:03:04] *** Tankado has joined ##java
[13:03:13] <cybereal> they can be really helpful especially when you want to try refactoring pieces like this
[13:03:14] <tieTYT3> it's so nice to confidently change parts of the system and feel pretty confident it still works
[13:03:19] * cybereal nods
[13:03:20] <tieTYT3> yep
[13:03:30] *** fridim_ has joined ##java
[13:03:54] <tieTYT3> i've got a perfect little example of that in my own app
[13:03:59] <tieTYT3> my server has 80% coverage
[13:04:03] <tieTYT3> my client has 6%
[13:04:09] <tieTYT3> my server... super nice to work with
[13:04:12] <tieTYT3> rarely get bugs
[13:04:20] <tieTYT3> every bug i get is one i haven't seen before
[13:04:22] <tieTYT3> yet with the client
[13:04:31] *** monil has joined ##java
[13:04:35] <tieTYT3> i've had to fix this bug where a guy logs out but he doesn't disappear from your screen
[13:04:40] <tieTYT3> i've had to fix that bug 3 times
[13:04:41] <Tankado> is there a happy end for this story?
[13:04:56] <tieTYT3> when i write the unit tests for the client there will be
[13:05:06] <monil> hi, i have a class i wrote on http://pastebin.com/m3fcdd0aa, the error i get when trying to run it is shown at the top. is there anything im doing wrong in the code or is this a problem with my java setup like google suggests?
[13:06:13] *** vigge_sWe has joined ##java
[13:06:15] *** Goundy has joined ##java
[13:06:19] <vigge_sWe> hai
[13:06:53] <vigge_sWe> I am trying to send a array from one PHP script to a java script, but I am getting NullPointExceptions
[13:06:57] *** nijm has joined ##java
[13:06:59] <vigge_sWe> I'll post code in a min
[13:07:10] <vigge_sWe> http://forums.x10hosting.com/programming-help/95290-nullpointexception.html#post523655
[13:07:16] <cybereal> ~class
[13:07:17] <javabot> To run a java class simply give the class name: java com.foo.bar.OmgPonies, not java com.foo.bar.OmgPonies.class
[13:07:25] <cybereal> ~~ monil class
[13:07:25] <javabot> To run a java class simply give the class name: java com.foo.bar.OmgPonies, not java com.foo.bar.OmgPonies.class
[13:07:28] <cybereal> heh
[13:07:32] <cybereal> monil: that is for you
[13:07:34] <monil> oh
[13:07:35] <monil> OH!
[13:07:39] <monil> wow that's rookie
[13:07:46] <monil> i completely missed that in the cup of java thing aswell
[13:07:51] <selckin> should should be static too
[13:07:58] <monil> gave me problems when compiling
[13:08:30] <cybereal> monil: common misunderstanding, people don't always realize that in java you don't run files, java doesn't care about the files directly, you run classes, but you tell the jvm where to find them (classpath) ... so yeah. Hell years later I still do it though it's usually because I'm a tab-complete junky :)
[13:09:06] <selckin> fix your tabcompletion to not include the class
[13:09:42] <monil> cybereal: i get an error involving my variable circleCounter when i put the static in
[13:09:43] <tieTYT3> java is compiled into byte code and then interpreted right?
[13:09:47] *** HideousNashimoto has quit IRC
[13:09:50] <tieTYT3> i told my coworker there and he didn't believe me
[13:09:57] <tieTYT3> he was pretty sure
[13:09:59] <cybereal> yes, and then further compiled possibly
[13:10:01] <monil> i want to set the value of circleCounter in my method and i want the variable to be public
[13:10:03] *** shadewind has joined ##java
[13:10:26] <vigge_sWe> anyone checking my n00b issue?
[13:10:30] <cybereal> the JIT might compile the bytecode into native code but you can tell the Sun vm, at least, not to if you want to be absolutely sure of what's happening step by step
[13:10:53] <tieTYT3> i knew it
[13:10:55] <tieTYT3> ok thanks
[13:11:05] *** genesiss has joined ##java
[13:11:25] *** blankthemuffin has quit IRC
[13:11:42] *** blankthemuffin has joined ##java
[13:12:04] <cybereal> monil: I can't really help you if you don't tell me the error :) I'm too tired to manually mentally compile your code
[13:12:26] <monil> hehe oops
[13:12:43] <BW^-> i have a string "A=B&C=D&E=F", how do i separate out B, D, F?
[13:12:48] <monil> java ReadReadData.java:36: Can't make a static reference to nonstatic variable circleCounter in class ReadData.
[13:12:53] <monil> circleCounter = points;
[13:12:56] <monil> cybereal: ^
[13:13:44] <cybereal> monil: that's because you reference circleCounter, which is an instance field, from a static method which well is static :) in a static method, the immediate scope is of course static so the variable would also have to be static for that to work
[13:14:06] <cybereal> however it's usually better practice for your main method to create/invoke instanced code as soon as possible rather than do too much statically
[13:14:13] <mirari> BW^-: Use a StringTokenizer with "&" as the split param, next parse the pairs and get the last component.
[13:14:50] <cybereal> monil: simplest fix should be setting circleCounter as static
[13:15:32] <vigge_sWe> what's wrong with:
[13:15:33] <vigge_sWe> String[] nicks = (String[]) client.execute("users", params);
[13:15:33] <vigge_sWe> for(int i = 0; i < nicks.length;i++){
[13:15:33] <vigge_sWe> nicks1[i] = nicks[i];
[13:16:05] <vigge_sWe> it doesen't do the array I want
[13:16:22] <vigge_sWe> the server returns the array to nicks, I belive it should
[13:16:28] <ernimril> vigge_sWe: do not paste in the channel
[13:16:31] <mirari> vigge_sWe: Please read the channel rules.. The code looks fine, maybe one of the variables is null.
[13:16:32] *** doc`` has quit IRC
[13:16:36] *** Goundy has quit IRC
[13:16:38] <ernimril> vigge_sWe: pastebin the code and the full error
[13:16:52] <vigge_sWe> http://forums.x10hosting.com/programming-help/95290-nullpointexception.html#post523655
[13:16:58] <vigge_sWe> I wrote all code and info there
[13:18:01] *** ries has joined ##java
[13:18:03] <ernimril> vigge_sWe: what good do you think the stack trace does us when we do not get to see the line numbers or class names?
[13:18:19] *** bas-i has joined ##java
[13:18:49] <ernimril> ~~vigge_sWe npe
[13:18:50] <javabot> NullPointerExceptions are easy to spot and deal with. For some tips on dealing with them, please see http://is.gd/ha7A
[13:18:54] <jottinger> ernimril: your ESP doesn't work?
[13:19:07] <vigge_sWe> java client: http://pastebin.com/f6c413e52, server: http://pastebin.com/d4f0a21fa
[13:19:27] <jottinger> I mean, REALLY... good programmers should be able to infer code structure froma stack tace, IMO
[13:20:58] <tieTYT3> jottinger: good hackers, at least
[13:21:02] <vigge_sWe> I have the server info and nick and things set up in another file, and it is working, it is the array nicks and nicks1 that is weird
[13:21:33] <tazle> vigge_sWe: obviously nicks1 is null
[13:21:50] <vigge_sWe> well, why?
[13:22:09] <ernimril> jottinger: I try to keep my esp low, I would go mad otherwise
[13:22:14] *** eduardoboss has quit IRC
[13:22:18] <tazle> vigge_sWe: you never initialize it
[13:22:29] <jottinger> ernimril: I find that mostly it's a static hum
[13:22:36] <jottinger> people don't actually think all that much :)
[13:22:46] <vigge_sWe> you mean like private static String[] nicks1; ?
[13:22:52] <jottinger> turn it up all the way and mostly what you get is a chorus of "duhhhhhh"
[13:23:53] <tazle> vigge_sWe: no
[13:23:57] <jottinger> vigge_sWe: where, BTW, do you actually create the nicks1 array?
[13:24:24] <vigge_sWe> line 205
[13:24:35] <jottinger> no
[13:24:37] <Tankado> that was a thinking question
[13:24:44] <jottinger> where do you actually create the nicks1 array?
[13:24:51] <jottinger> That's where you FILL the array, dumbass
[13:25:26] <ernimril> jottinger: any updates on the xml/memory article?
[13:25:41] <jottinger> ernimril: it's in the queue
[13:25:48] <ernimril> jottinger: I go on holliday on tuesday so I will not be online much for like 2 weeks :-)
[13:25:56] <mirari> What article?
[13:26:24] <ernimril> jottinger: so if you want me to do anything in the near time, now would be a good time to tell me
[13:26:26] <jottinger> ernimril: It may get published in that time - i don't know the schedule. I'll ask on Monday.
[13:26:37] <ernimril> jottinger: ok
[13:26:42] <jottinger> I think it's okay, although it might be good to send me a bio
[13:26:58] <ernimril> mirari: guess you have to wait a few days before you find out
[13:27:05] <jottinger> mirari: it's an article ernimril wrote on memory and XML parsing
[13:27:08] <jottinger> .... oops
[13:27:51] *** xxxxshame has joined ##java
[13:27:52] <tieTYT3> any of you eclipse users out there. I'm curious if eclipse can do this (yes or no question): show you the last person to modify each line in a file based on the svn meta data
[13:27:52] <mirari> ernimril: Is it a scientific article?
[13:28:09] <jottinger> mirari: scientific, no; technical, tes
[13:28:12] <jottinger> yes
[13:28:19] <tieTYT3> jottinger: to me?
[13:28:27] <jottinger> tieTYT3: no
[13:28:31] <raboof> tieTYT3: haven't seen it in eclipse, but search for 'svn blame' i guess...
[13:28:33] <tazle> tieTYT3: yes
[13:28:35] <jottinger> tieTYT3: I don't know your answer
[13:28:45] <tieTYT3> tazle: cool
[13:28:48] <xxxxshame> hallo is it possible giv servlet,jsp engine into apache webserver ? Because we have apache web server with php ,mysql...
[13:29:17] <ernimril> xxxxshame: apache httpd is not a servlet container, so no...
[13:29:18] <RamboZa> mod_jk
[13:29:26] <mirari> xxxxshame: You need a servlet container to run servlets. Apache could be used as a proxy for a servlet container though.
[13:29:28] <tieTYT3> i haven't used any ide except for intellij for so long that I don't know what to be impressed by when I learn new things that it can do
[13:29:28] <jottinger> xxxxshame: yes, and it's done the exact same way
[13:29:35] <ernimril> xxxxshame: you can easily chain it to tomcat/jboss/glassfish/jetty/...
[13:29:40] <cybereal> xxxxshame: no, however, it is possible to get apache to act as a proxy to tomcat for similar functionality
[13:29:41] <Logi> xxxxshame: you'dnrun a separate servlet container (tomcat? jetty?) and have apache forward requests (mod_jk)
[13:29:51] *** garotosopa has quit IRC
[13:30:05] <ernimril> hmm, seems like there a bit of an echo in here
[13:30:06] <Logi> xxxxshame: you now have a lot of fodder for your google query :)
[13:33:25] <tazle> tieTYT3: well, I thought I had done tht anyway - can't find it now
[13:33:53] <tieTYT3> in intellij, you right click by the line numbers and say, "show annotations"
[13:34:04] *** tissue has joined ##java
[13:34:23] <Logi> btw, intellij 8.1 is The Shit. I felt that intellij 8.0.1 was just plain Shit
[13:35:03] <xxxxshame> thants all :)
[13:36:15] <tieTYT3> Logi: 8.1 breaks the intellistripes plugin :(
[13:36:33] <tieTYT3> but either way, i don't notice much difference
[13:36:38] <tieTYT3> it seems to start faster
[13:36:45] <tieTYT3> also i like how it compiles in bg by default now
[13:37:05] <raboof> tieTYT3: are you using subversive, subclipse or neither?
[13:37:12] <tieTYT3> raboof: neither
[13:37:17] <tieTYT3> i'm using intellij's plugin
[13:37:18] <Logi> tieTYT3: 8.0.1 limbed like a shot dog for me
[13:37:29] <Logi> *limped
[13:37:44] <raboof> tieTYT3: in eclipse i mean
[13:37:45] <tieTYT3> hrm i should upgrade at work then
[13:37:52] <tieTYT3> raboof: i don't use eclipse
[13:39:25] <raboof> tieTYT3: ow, misinterpreted your question about eclipse then :) - yes, eclipse can do 'svn blame' with a plugin (at least with subversive and probably with subclipse)
[13:39:39] *** orgy` has joined ##java
[13:40:42] *** vigge_sWe has left ##java
[13:41:02] <tieTYT3> i see
[13:41:09] <tieTYT3> i need a list to show me why i'm still paying for intellij..
[13:43:20] *** garotosopa has joined ##java
[13:43:26] *** elementz has quit IRC
[13:43:28] *** Goundy has joined ##java
[13:43:36] *** elementz has joined ##java
[13:49:37] *** foo-nix has joined ##java
[13:49:41] *** deeflex has joined ##java
[13:50:44] *** foo-nix has quit IRC
[13:51:17] *** foo-nix has joined ##java
[13:54:59] *** acuster has joined ##java
[13:57:19] *** cybereal has quit IRC
[13:58:13] <jottinger> tieTYT3: do you LIKE intellij?
[13:58:20] <jottinger> does it feel right when you use it?
[13:58:38] <jottinger> more importantly, does it feel better than the alternatives when you use intellij?
[13:58:45] <jottinger> If so, buy it. If not... don't.
[13:59:25] <tieTYT3> jottinger: i haven't tried alternatives in a long time
[13:59:28] <tieTYT3> but at the time, yes
[14:00:40] * jottinger shrugs. If you were asking ME - and you probably shouldn't - I'd say IDEA's worth it
[14:00:44] <jottinger> bu YMMV
[14:01:20] <Tankado> IDE that costs money what kind of a twisted idea is that
[14:01:27] <Tankado> IDEA
[14:02:50] *** LordMetroid has joined ##Java
[14:02:58] *** garotosopa has quit IRC
[14:03:05] *** garotosopa has joined ##java
[14:03:29] *** whaley has joined ##java
[14:05:48] *** moss23 has joined ##java
[14:06:19] <moss23> hi, what is the easier way for viewing jars in shell ?
[14:06:32] <moss23> *est
[14:06:32] <ernimril> moss23: define: viewing
[14:06:59] <moss23> ernimril, see the content of the packed file
[14:07:12] <ernimril> moss23: "unzip -l foo.jar"?
[14:08:45] <moss23> thank you ernimril
[14:09:03] <tazle> or just jar tf <jarfile>
[14:09:18] *** delirium- has joined ##java
[14:12:04] *** timte has joined ##java
[14:15:35] *** dayzman is now known as mun
[14:16:01] <moss23> tazle, could you write the exact command ?
[14:16:18] <moss23> u mean "java -jar .... " ?
[14:16:21] <moss23> or what
[14:17:07] <tazle> moss23: no, "jar tf foo.jar" would be the equivalent of ernimril's command
[14:17:33] *** foo-nix has quit IRC
[14:17:55] <moss23> tazle, and where is the "jar" file from
[14:18:21] <moss23> the executable / script which u use for it
[14:20:03] <tazle> moss23: it comes with jdk
[14:20:14] <moss23> ok, thanks
[14:20:42] <ernimril> the reasons I prefer unzip is that 1) it is faster and 2) it is available even if you do not have the jdk installed
[14:21:40] *** pantcho has joined ##java
[14:22:17] *** Tankado has quit IRC
[14:22:21] <tazle> ernimril: OTOH jar may be available even if yu do not have unzip installed :)
[14:22:29] *** deeflex has quit IRC
[14:22:37] *** bas-i has quit IRC
[14:23:53] *** acuster is now known as flood
[14:24:02] *** flood is now known as acuster
[14:24:27] <pantcho> Hello, i need advice regarding Server/Client plan, any dude here with good networking experience?
[14:24:35] <ernimril> ~networking
[14:24:36] <javabot> ernimril, networking is http://java.sun.com/tutorial/networking
[14:24:55] <ernimril> pantcho: read the tutorial and ask your questions and find out
[14:25:20] *** casmo has joined ##java
[14:28:03] <monil> if i am referencing to an instance of an object C, and i want to get say A.getX from C, would this be C.A.getX ?
[14:28:17] *** lollan has joined ##java
[14:29:13] *** Razec has joined ##java
[14:29:16] *** garotosopa has quit IRC
[14:30:27] *** garotosopa has joined ##java
[14:30:39] *** bitcrave has joined ##java
[14:32:41] *** waz has joined ##java
[14:34:18] *** blankthemuffin has quit IRC
[14:36:55] <pantcho> ernimril: hello again
[14:37:01] <pantcho> i do not need help with programming
[14:37:39] <pantcho> i need advice on building the server and usage of threads regarding methdology, what is good to do and what is not based on experienced java users that make usage of networking.
[14:37:53] *** Bonix has joined ##java
[14:37:57] <pantcho> and you have lack of network experience so thats does not refer to you.
[14:38:29] *** blankthemuffin has joined ##java
[14:38:52] <ernimril> pantcho: how would you know what I know and what I do not know?
[14:40:22] <lollan> lol ernimril
[14:40:36] <pantcho> because last time
[14:40:39] <lvh> Hey.
[14:40:42] <pantcho> you could not tell me the simple answear
[14:40:55] <pantcho> instead were smart enough to figure out i am a noob and send me to javaDocs
[14:40:59] *** elindio has quit IRC
[14:41:03] <pantcho> instead of writeChars
[14:41:10] <pantcho> i am using writeBytes
[14:41:13] <pantcho> and it works like i wanted
[14:41:16] <lvh> I've found BigDecimal's toBigInteger method, but how do I tell it to round upwards when converting?
[14:41:43] <pantcho> simple command change and you got waste of my time trying to educate me on this on that change my lecturer commands saying they are wrong.
[14:41:56] *** LostMonarch has joined ##java
[14:42:05] <ernimril> pantcho: so you are using a binary protocol, not a text based one then. Sure if you change what you want to do there are other ways to do it then the one I tried to help you with
[14:42:40] <lvh> Is the correct way to do that to make the decimal nonfractional first, and then convert?
[14:42:48] <pantcho> you should have been smart enough to know that if it works for binary i can for simple ascii
[14:42:55] <ernimril> lvh: round up first, then get the BigInteger
[14:42:58] <pantcho> just admit networking is not your expertise
[14:43:38] <ernimril> pantcho: just go away, if you do not like what I say you can use "/ignore ernimril"
[14:43:53] <lollan> lol
[14:44:21] <pantcho> i wont go away
[14:44:22] <moss23> is this installator jdk-6u12-linux-i586-rpm.bin for distros with rpm pacakge management ?
[14:44:26] <pantcho> i am just stating the facts.
[14:44:35] <moss23> and jdk-6u12-linux-i586.bin for the rest ?
[14:44:38] <ernimril> moss23: there are rpm and rpm...
[14:44:53] <ernimril> moss23: depending on what linux distribution you run...
[14:44:58] <moss23> slackware
[14:45:06] <lvh> moss23: Use the bin
[14:45:07] <ernimril> moss23: slackware does not use rpm
[14:46:01] <lvh> moss23: Unless slackware has cool pacman packages for you to use. Debian, for example, has those. You might still need to download the necessary files yourself due to licensing issues.
[14:46:32] <BW^-> guys, i need to make my java app software visit a web page (in a way invisilble to the user). the web page will forward to another web page in one or two iterations.
[14:46:40] <BW^-> i want to pick out some variables from javascript on the last page. how do i do this?
[14:47:19] <ernimril> BW^-: 1) URL/URLConnection to get the page, 2) find some parser to get the content you want
[14:47:24] *** xxxxshame has left ##java
[14:47:25] <ernimril> ~~BW^- htmlparser
[14:47:25] <javabot> BW^-, htmlparser is http://htmlparser.sf.net - it parses HTML.
[14:47:54] <moss23> lvh, there is a package for slackware, but how knows what's better
[14:47:58] <lvh> ernimril: I don't understand how BigInteger's round() works. It takes a MathContext, that in its turn takes a precision. I just want to round to the nearest integer :-)
[14:48:04] <BW^-> ernimril: i need an embedded web browser i think.
[14:48:08] <BW^-> ernimril: like Lobo or sometihng
[14:48:17] <ernimril> BW^-: Why?
[14:48:18] <lvh> moss23: If the package is recent, your package maintainers most likely know better.
[14:48:22] *** blankthemuffin has quit IRC
[14:48:40] <moss23> lvh, ok, thank you
[14:48:42] <lvh> moss23: Also depends if it's an official or unofficial package. If it's recent and official, use the slackware package.
[14:49:09] <BW^-> ernimril: because the HTML response contains javascript and forms
[14:49:35] <ernimril> BW^-: that may or may not be a problem, depending on what the javascript is used for
[14:49:42] <BW^-> ernimril: so what i do is i launc an URL, and i know that eventually it will forward to a javascript that i have written, that contains variables i want. otherwise than that i must just have a web browser environment up.
[14:49:47] <lvh> Could anyone explain how BigDecimal rounding works? I know it has a round method, but that has a MathContext argument, which takes a precision argument. I want to round upwards to the nearest BigInteger :-(
[14:50:57] <BW^-> ernimril: the javascript should just pick up some variables it got HTTP POST:ed to it, and pass them to Java. that's it,.
[14:51:31] <ernimril> lvh: try using precision=0, mode=UP (or whatever the name is)
[14:51:38] <BW^-> ernimril: it's about interfacing a credit card debiting provider that requires this HTML/Javascript from us.
[14:51:46] <BW^-> although they allow us to do processing in the backend.
[14:52:15] *** blankthemuffin has joined ##java
[14:53:00] <ernimril> BW^-: you still provide way too little information for me to give any more help.
[14:53:00] *** ttmrichter_ has quit IRC
[14:53:55] <ernimril> BW^-: I have written a few html spiders/screen scrapers, typically I can find the form and the fields with quite simple code and then post the form back without problems. Just using normal tools
[14:54:09] <BW^-> ernimril: i'm not sure how i can express myself clearer. i'll describe what it is exactly that i need.
[14:54:17] <ernimril> BW^-: but if you have to get a page that does a lot of javascript then that may not be easy
[14:54:24] <BW^-> ernimril: i launch an url https://paymentprovider/path?debitinginfo
[14:54:49] <BW^-> they answer with HTML with FORM and javascript in it. their code forwards to one or two other pages, and eventually they forward to an URL that contains content i have control over.
[14:54:56] <BW^-> ..the last thing they do with a HTTP POST.
[14:55:05] *** buntfalke has joined ##java
[14:55:34] <ernimril> BW^-: "their code"? are you talking about a page you get or are you talking about something that happen on the server side?
[14:55:44] <BW^-> ernimril: shouldn't my backend java app be able to spawn a BrowserPanel class instance as of www.lobobrowser.org ?
[14:56:07] *** gdoko has quit IRC
[14:56:10] <ernimril> BW^-: I have never used lobobrowser, but if it looks like it will help you, then sure try it
[14:56:32] <BW^-> ernimril: so the alternative would be to write an own parser that eats their particular return data, right?
[14:56:34] <mirari> BW^-: Maybe you could ask the provider to provide something easier to interface with, perhaps as a webservice
[14:56:55] <BW^-> mirari: i've spent too much time on finding a debiting provider.
[14:56:56] <ernimril> BW^-: have you asked them about some easier way to talk, html screen scraping is likely to break when the pages you use gets updated
[14:57:00] <BW^-> for US-based companies this is easy.
[14:57:05] <BW^-> the EU-based ones are expensive.
[14:57:08] <BW^-> this one is malaysia-based. :)
[14:57:53] <mirari> BW^-: yes, but still, it will be a compability nightmare when they change something in the future. Just my two cents.
[14:58:00] <BW^-> ernimril: i'm not proposing screen scrapping, i'm proposing listening for hooking the beforeNavigate mathod of a NavigationAdapter and put it onto the browser.
[14:58:42] <BW^-> mirari: as long as the Lobo browser supports it, it won't. :) i mean, as long as i pick exactly the data that their specification documents say they will feed my callback URL with.
[14:59:02] <BW^-> ernimril: and what i pick out there is the HTTP POST data.
[14:59:51] <BW^-> are there ever problems running graphical panels such as a Lobo browser panel in a backend that has no graphics support?
[15:00:29] <ernimril> BW^-: yes, there is. Make sure you have either a xvfb running or try to use headless mode
[15:00:41] <mirari> BW^-: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/ might be of help
[15:00:43] <BW^-> ernimril: how do i activate headless mode?
[15:00:50] <ernimril> ~headless
[15:00:50] <javabot> Set -Djava.awt.headless=true as a JVM parameter to allow you to use graphical-based classes on a server without a display.
[15:00:55] <bindaas> Ivh: new BigDecimal(double).setScale(5,BigDecimal.ROUND_HALF_UP).toBigInteger()
[15:00:56] <BW^-> hmm. i'll run tihs in a tomcat instance.
[15:02:09] <ernimril> BW^-: I still think it looks like you are trying to use the wrong tools to solve your problem, but you seem very set on it and you have provided no real details ("html and javascript and forms" is not enough details). Go and try to use lobobrowser and see if you can make it work
[15:03:18] <BW^-> ernimril: i can pass a copy of the HTTP responses they give?
[15:04:00] <ernimril> BW^-: pastebin it
[15:04:10] <BW^-> ok
[15:04:31] *** Vantaa has joined ##java
[15:07:56] *** musically_ut has quit IRC
[15:08:10] *** ttmrichter has joined ##java
[15:10:46] *** codethief has joined ##java
[15:10:58] *** musically_ut has joined ##java
[15:11:30] <BW^-> ernimril,mirari: http://paste.lisp.org/display/75906
[15:12:08] <BW^-> here we see how they toss me around in three iterations before passing me the HTTP POST contents i want
[15:12:55] *** LostMonarch has quit IRC
[15:13:09] <ernimril> BW^-: ok, not much javascript there...
[15:13:26] <ernimril> BW^-: why not just read the html and parse the form and post it back
[15:13:33] <BW^-> ernimril: to first request, <body onLoad="document.SendToMer.submit()">
[15:13:48] <ernimril> BW^-: yes, I see that and you have it in the next one as well
[15:13:59] <BW^-> ernimril: i like the idea, but wouldn't that require me to write a lot of code?
[15:14:12] <ernimril> BW^-: not lots, but a little, yes
[15:14:14] <nor3> can i "enable" the jvm sandbox for applications run locally (using the java command)?
[15:14:19] <BW^-> how would it look?
[15:14:30] <BW^-> would i need to write a html parser?
[15:14:31] <ernimril> ~~BW^- htmlparser
[15:14:31] <javabot> BW^-, htmlparser is http://htmlparser.sf.net - it parses HTML.
[15:14:47] <ernimril> BW^-: go check their documentation
[15:15:00] <BW^-> hmm
[15:15:01] <BW^-> cool
[15:15:25] <ernimril> ~jvm options
[15:15:25] <javabot> ernimril, jvm options is http://blogs.sun.com/roller/resources/watt/jvm-options-list.html
[15:17:07] <ernimril> nor3: I no of no such switch to the jvm, but you can easily write your own launcher that installs a security manager or you can try to use a security policy
[15:17:30] <nor3> i see
[15:17:57] <nor3> thanks
[15:19:28] *** rajesh has joined ##java
[15:23:49] <BW^-> ernimril: i think going with Lobo should be easier programmaticaly,
[15:24:04] <BW^-> i'll just create a Lobo browser instance, and wait for the handler to trig.
[15:24:31] <ernimril> BW^-: sure, try it and see if it works
[15:24:33] <BW^-> using htmlparser, i'd need to copy form contents, action, referer and recurse.
[15:24:48] <BW^-> perhaps the htmlparser solution would be cleaner though. hmhm.
[15:26:22] *** garotosopa has quit IRC
[15:28:46] *** pstickne has quit IRC
[15:28:50] *** Gambaroni has joined ##java
[15:29:00] <Gambaroni> Hi
[15:29:42] <Gambaroni> How do I attach a profiler to a J2ME app? I cannot find anything on google.
[15:32:53] *** dv_ has joined ##java
[15:32:55] <BW^-> does Java have anything like a thread-safe mutex or lock, that i can use to wait for X seconds for thread A to release a resource, and know if it succeeded or not?
[15:33:00] *** bas-i has joined ##java
[15:33:27] <ernimril> BW^-: yes, a lot of things, depending on what exactly you want
[15:33:41] *** aksn has joined ##java
[15:33:42] <BW^-> i'll create a separate Thread for the Lobo work.
[15:34:10] <BW^-> the calling thread will wait for X seconds, and either be successful and get result data, or fail and kill the thread
[15:34:42] *** blankthemuffin has quit IRC
[15:34:58] <BW^-> what's the best way?
[15:35:04] *** garotosopa has joined ##java
[15:35:28] *** waz has quit IRC
[15:35:54] <ernimril> BW^-: there are no good ways to kill other threads with java
[15:36:57] *** waz has joined ##java
[15:36:58] <BW^-> ernimril: hm right, all they can be is interrupted.
[15:37:09] <BW^-> however, how do i get this mutex kind of functionality?
[15:37:22] <ernimril> ~~BW^- jcip
[15:37:22] <javabot> BW^-, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[15:37:23] <BW^-> a thread-safe resource lock object, something like that
[15:37:33] *** roxlu_ has joined ##java
[15:37:33] *** claudio_ch has joined ##java
[15:37:37] <roxlu_> hi
[15:37:40] <ernimril> ~concurrent
[15:37:40] <javabot> ernimril, I have no idea what concurrent is.
[15:37:51] <ernimril> ~concurrency
[15:37:52] <javabot> Java has a sophisticated concurrency package that you can view at http://java.sun.com/javase/6/docs/technotes/guides/concurrency/index.html
[15:38:34] <ernimril> BW^-: a boolean set/looked at under synchronization? any of the java.util.concurrent things?
[15:38:46] <roxlu_> Someone here who programmed neural networks? I'm reading a book about it where it states that the 'output of the layers are passed through a activiation function", but I'm wondering is this done 'per neuron' or is the complete sum of the layer used?
[15:43:44] *** CD1 has joined ##java
[15:44:15] *** lleksah has joined ##java
[15:44:58] *** blankthemuffin has joined ##java
[15:45:21] <BW^-> roxlu_: go to #ai
[15:45:27] <roxlu_> ah okay
[15:47:29] *** ffgeek200b has joined ##java
[15:47:29] *** ffgeek200 has quit IRC
[15:47:43] <BW^-> java.util.concurrent.locks.ReentrantLock
[15:48:54] <moss23> ten konec :)
[15:49:50] *** BlindHunter has joined ##java
[15:54:54] *** RamboZa has quit IRC
[16:00:34] <nor3> ~jxxload_help
[16:00:34] <javabot> nor3, I have no idea what jxxload_help is.
[16:00:38] <nor3> ~jxxload
[16:00:38] <javabot> nor3, I have no idea what jxxload is.
[16:00:43] <nor3> ~jxx
[16:00:43] <javabot> nor3, I have no idea what jxx is.
[16:01:06] <ernimril> nor3: you can do "/msg javabot jxx" if you do not want to spam the channel
[16:03:36] *** convivial has joined ##java
[16:04:06] *** flb has joined ##java
[16:04:14] <waz> wanting to spam or not has nothing to do with it
[16:04:38] <waz> nor3: if you want to stay in the channel prvmsg the bot
[16:05:06] *** resmo has joined ##java
[16:06:23] *** peyman_t has joined ##java
[16:08:45] *** The_Birdman has joined ##java
[16:10:18] *** Frostix has joined ##java
[16:12:09] *** NiallC has joined ##java
[16:16:43] *** J0bk has quit IRC
[16:18:54] *** blankthemuffin has quit IRC
[16:22:02] <staar2> what does the / char mean in UML
[16:22:34] <staar2> when its at field + / time: TIme like this ?
[16:23:07] *** CD1 has quit IRC
[16:25:51] *** Ven]n has joined ##java
[16:26:05] <Ven]n> is there a way to find the source code for getControlPanelComponent in JMF? :p
[16:26:22] *** asap18 has joined ##java
[16:27:17] <Ven]n> it has a nice option showing media information of files..
[16:27:23] <Ven]n> which I want to use :)
[16:27:58] *** sidelil has joined ##java
[16:30:46] <sidelil> Hi everybody. I'm trying to change the default font size for JLabels. I get it working with the default metal look and feel but i dont with the OS look and feel. Can anyone help about what should I change?
[16:30:59] <sidelil> That's the way I do it: UIManager.getLookAndFeelDefaults().put("Label.font",new FontUIResource("Serif",Font.ITALIC,25));
[16:32:01] *** bhz- has joined ##java
[16:32:31] *** CaptainMorgan has quit IRC
[16:32:52] *** ankylose has joined ##java
[16:33:53] *** Bonix has quit IRC
[16:34:05] <BW^-> ernimril: thank you for the feedback!
[16:34:11] <BW^-> written test with lobo here, check if works
[16:34:11] <BW^-> &help
[16:37:49] *** Similian has joined ##java
[16:37:50] *** delskorch has joined ##java
[16:37:53] <Similian> hi
[16:38:30] <Similian> i am using one of my java classes in jsp
[16:38:45] <Similian> how can i transport the system.outs into the web (jsp)
[16:38:55] <Similian> i thought of a debug stream
[16:39:08] <Similian> which i read later on my jsp
[16:39:32] <Similian> what stream should i use for this sort of stuff?
[16:39:51] *** zophy has quit IRC
[16:41:53] *** ScottG489 has quit IRC
[16:42:22] *** ScottG489 has joined ##java
[16:45:43] *** nytejade has quit IRC
[16:46:12] *** Copter has quit IRC
[16:46:22] *** delirium- has quit IRC
[16:46:29] *** Copter has joined ##java
[16:47:54] *** bas-i has quit IRC
[16:47:54] *** bobbytek2 has joined ##java
[16:48:49] <bobbytek2> Jasper Reports vs. FOP : which one makes more sense for PDF report rendering in a java app?
[16:51:57] *** Daniel_G has joined ##java
[16:52:20] <The_Birdman> Usually I see people use Jasper Reports
[16:52:43] *** Daniel_G has quit IRC
[16:53:00] *** Daniel_G has joined ##java
[16:53:14] <bobbytek2> There is a nice jasper reports plugin for eclipse which is nice
[16:53:57] <bobbytek2> oh cool: http://www.netuality.ro/comparing-fop-and-jasperreports/tools/20040525
[16:54:27] *** nytejade has joined ##java
[16:56:04] *** nytejade has quit IRC
[16:56:36] *** kane77 has joined ##java
[16:57:33] *** nytejade has joined ##java
[16:57:37] *** nytejade has quit IRC
[16:57:52] *** nytejade has joined ##java
[17:03:32] *** Thorn has quit IRC
[17:06:14] *** FireSlash has joined ##java
[17:06:40] *** swans20 has joined ##java
[17:09:58] *** Techdeck has quit IRC
[17:14:01] <ernimril> bobbytek2: fop usually means you have to convert your data to xml then run some xslt to get it to fop-xml then run fop on that, you will end up with a huge memory problem...
[17:15:23] *** nytejade has quit IRC
[17:16:40] *** nytejade has joined ##java
[17:17:43] *** NiallC has quit IRC
[17:17:52] *** NiallC has joined ##java
[17:19:31] *** NiallC has quit IRC
[17:20:34] *** NiallC has joined ##java
[17:22:28] *** nytejade has quit IRC
[17:22:41] *** nytejade has joined ##java
[17:22:47] <bobbytek2> ernimril: Ya, reading that article basically said the same thing
[17:23:02] <bobbytek2> Plus a lot of extra work to get features I won't even need
[17:23:14] <bobbytek2> I've used both in the past, and I think jasper reports makes the most sense here
[17:23:22] <bobbytek2> But what is iText?
[17:23:35] <ernimril> bobbytek2: iText is a low level library, that can be nice for some things
[17:23:37] <bobbytek2> Does jasper use that under the covers?
[17:23:43] <ernimril> bobbytek2: I am not sure
[17:23:58] *** lleksah has quit IRC
[17:24:02] <bobbytek2> it's a dom like api for pdf reporting in java?
[17:24:09] <ernimril> bobbytek2: iText provides a code interface to making pdf:s, it does not come with a template system
[17:24:17] *** ridoo has joined ##java
[17:24:32] <ernimril> bobbytek2: iText also provides a Graphics2D if you want to do java2d to pdf
[17:25:10] <bobbytek2> hmm, I think a templated approach makes most sense in general for simple reports
[17:25:44] <ernimril> bobbytek2: if you want to do long tables or such, then probably...
[17:26:04] <ernimril> bobbytek2: but please note that in quite many cases you have the template inside your own model-objects
[17:26:26] <ernimril> bobbytek2: but jasper seems quite ok, it seems to handle things a lot nicer than fop
[17:26:44] <bobbytek2> I want to avoid as much accidental complexity as possible
[17:26:55] *** adi112358 has joined ##java
[17:26:58] <bobbytek2> I am willing to give up flexibility for this in my report layouts
[17:27:11] <bobbytek2> subreports looks like a powerful feature in JR
[17:27:56] <ernimril> bobbytek2: I can not really give you very good advice here, I have only used iText myself (and mostly for Graphics2D things). I have seen fop fail due to OOME with smallish reports, I have seen jasper do a few reports without too much memory usage
[17:28:09] *** adi112358 has quit IRC
[17:28:13] *** nijm has quit IRC
[17:28:42] <ernimril> bobbytek2: avoiding fop seems like a good plan, but other than that it depends on what you want to generate and what data you have
[17:28:44] <bobbytek2> ernimril: I appreciate your input, thanks
[17:28:56] <ernimril> ~itext
[17:28:57] <javabot> ernimril, itext is a library for creating pdfs. It is available under either the GPL or the MPL. For more information see: http://www.lowagie.com/iText/
[17:29:09] <bobbytek2> mostly pojos, and mostly tabular data with a few images
[17:29:16] *** Goundy has quit IRC
[17:29:36] <bobbytek2> jpa / hibernate pojos really (not that that matters)
[17:30:25] <ernimril> bobbytek2: if you know jasper then that is probably ok, but you can go read a few tutorials on iText if you want to look at it
[17:30:51] <bobbytek2> ya, it looks similiar to the w3c dom api
[17:31:07] *** musically_ut has quit IRC
[17:31:09] <bobbytek2> I will give it a read
[17:31:29] <bobbytek2> last time I did something with jasper was 2006
[17:31:29] *** Thorn has joined ##java
[17:31:39] <bobbytek2> I just used FOP a few weeks ago
[17:32:10] <bobbytek2> just trying to see if anything has changed in JR (new features, etc) since it's pretty active
[17:33:00] <systat> Hey, I need help with g.setColor(Color.decode()); I want to change a color from orange, to dark orange, red
[17:33:08] *** Similian has quit IRC
[17:33:17] <systat> Do you guys know what I need to do, I know that yellow/orange color in hex if 0xffff00
[17:33:27] <systat> But I don't know how to increase tone of it
[17:33:49] <ernimril> systat: try working with HSV instead of RGB
[17:35:15] <systat> ernimril, can I store hex in integer variable?
[17:35:34] <ernimril> systat: your question does not make sense...
[17:35:35] <systat> Integer.ToString to use later
[17:35:43] <systat> ahh
[17:35:57] <ernimril> systat: "hex" is a way to display an integer value, it is not an integer value
[17:36:07] <systat> It's okay :)
[17:36:15] <ernimril> systat: "int i = 0xffff00;"
[17:36:23] <systat> Thx ;)
[17:36:36] <ernimril> systat: 0x is the start of a hex literal
[17:36:40] *** srepfler has joined ##java
[17:36:46] *** srepfler has left ##java
[17:36:47] <ernimril> ~thx
[17:36:47] <javabot> http://www.thx.com/
[17:37:08] *** moss23 has quit IRC
[17:37:22] *** djp[mbp] has joined ##java
[17:38:16] <ernimril> systat: rgb is usually quite hard to work with, when you want to tweak colors
[17:38:56] <systat> ernimril, it's fine, I managed to figure everything out, thanks, for the int i tip :
[17:38:57] <systat> =
[17:38:58] <systat> :)
[17:40:24] *** elindio has joined ##java
[17:42:01] *** TranceControl has joined ##java
[17:47:27] *** bas-i has joined ##java
[17:49:09] <sidelil> Hi everybody. I'm trying to change the default font size for JLabels. I get it working with the default metal look and feel but i dont with the OS look and feel. Can anyone help about what should I change?
[17:49:12] <sidelil> That's the way I do it: UIManager.getLookAndFeelDefaults().put("Label.font",new FontUIResource("Serif",Font.ITALIC,25));
[17:51:04] *** cher has joined ##java
[17:51:33] <bobbytek2> ernimril: Ever used BIRT?
[17:51:47] <bobbytek2> Is that possible outside of an eclipse env?
[17:52:34] *** zupaxx has joined ##java
[17:52:45] <zupaxx> hi what is the good web service technology
[17:52:54] <ernimril> bobbytek2: no
[17:53:00] <zupaxx> hi what is the best java web service technology
[17:53:02] *** AhtiK has joined ##java
[17:53:28] <bobbytek2> best across which dimensions?
[17:53:52] <bobbytek2> personally, I like CXF + Spring
[17:54:26] *** Inhuman has joined ##java
[17:54:54] <bobbytek2> In particular, if you are doing a very simple WS, checkout http://cwiki.apache.org/CXF20DOC/simple-frontend.html
[17:56:22] *** bindaas has quit IRC
[17:58:09] *** eidolon has quit IRC
[17:59:43] *** fez has joined ##java
[18:00:54] *** toader has quit IRC
[18:01:17] *** ridoo has quit IRC
[18:01:44] *** d3vdil has joined ##java
[18:04:30] *** romanb has joined ##java
[18:09:21] *** |sanchez| has joined ##java
[18:10:00] *** IppatsuMan has joined ##java
[18:18:07] *** mele- has joined ##java
[18:20:59] *** aryeskan has joined ##java
[18:21:02] *** NiSoOo has quit IRC
[18:26:31] *** GodTodd_ has quit IRC
[18:26:39] *** GodTodd has joined ##java
[18:28:33] *** garotosopa has quit IRC
[18:30:00] *** skypce has joined ##java
[18:32:33] *** d3vdil has quit IRC
[18:32:47] *** elementz has quit IRC
[18:35:41] *** skypce has quit IRC
[18:36:07] <zupaxx> hi is it good to always do catch(Exception e)
[18:36:17] <zupaxx> to catch all exceptions
[18:36:29] <zupaxx> i use this often and i find this more helpful
[18:36:37] *** stringCheese has joined ##java
[18:36:55] <zupaxx> than catching a specific exception only
[18:37:04] *** aryeskan has left ##java
[18:37:09] <stringCheese> question, how would i go about selecting words from a string?
[18:37:11] <ernimril> zupaxx: no, it is not good
[18:37:12] <zupaxx> what is recommended thanks.
[18:37:19] <zupaxx> ernimril:why?
[18:37:23] <ernimril> zupaxx: most people would consider it very bad
[18:37:38] <zupaxx> it will halt the execution?
[18:37:42] <ernimril> zupaxx: because you are trying to handle exceptions that you do not have enough information to handle in any good way
[18:37:52] *** nmatrix9 has joined ##java
[18:38:07] <ernimril> ~~stringCheese javadoc String.split(*)
[18:38:08] <javabot> stringCheese: http://is.gd/eOPq [java.lang.String.split(String)]; http://is.gd/eOPr [java.lang.String.split(String,int)]
[18:38:10] *** GodTodd has quit IRC
[18:38:12] <zupaxx> i see thanks
[18:38:41] <stringCheese> thanks
[18:39:24] <zupaxx> u got the point
[18:40:02] <zupaxx> i will only use Exception if i want to do only printStackTrace i think most will agree.
[18:43:09] *** heyqule has joined ##java
[18:43:14] *** woogley has joined ##java
[18:46:18] *** DragonLord- has quit IRC
[18:46:42] *** DragonLord- has joined ##java
[18:47:28] *** Serva has joined ##java
[18:47:40] *** Razec has quit IRC
[18:47:44] <Serva> Has anyone used Rational Clearcase here ?
[18:47:50] *** prgrmr has joined ##java
[18:48:05] <The_Birdman> ~tell Serva about anyone
[18:48:05] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[18:48:21] *** tom17bombadil_ has quit IRC
[18:48:48] *** The_Birdman is now known as mr_ank1
[18:48:58] *** mr_ank1 is now known as r0bby1
[18:48:59] *** zophy has joined ##java
[18:49:11] <Serva> I want to learn Clearcase on my own, how should I install it on my local workstation? Is there such an option?
[18:49:37] <r0bby1> there must be a website about it right?
[18:50:17] <Serva> Yes, IBM Rational website but it doesn't say much about installing CC on Win Xp
[18:50:37] <Serva> they do however .. for Win NT
[18:51:59] *** NiSoOo has joined ##java
[18:53:33] *** Serva has quit IRC
[18:56:03] *** zupaxx has quit IRC
[18:56:28] *** Inc` has joined ##java
[19:02:33] *** waz is now known as Guest42251
[19:02:51] *** waz has joined ##java
[19:02:59] *** yobo2 has joined ##java
[19:04:21] <yobo2> in a business application, esp a business web app, is there some framework or typical design pattern that can help me out with user authorization? my last web app used a rights-based system to allow users to perform certain actions and access data, but it was all hand-implemented and really a pain in the ass to deal with.
[19:05:24] *** cmccormick has joined ##java
[19:05:31] *** swans20 has quit IRC
[19:06:38] *** mele- has quit IRC
[19:07:05] *** dv_ has quit IRC
[19:07:43] *** exbio has quit IRC
[19:08:45] *** majyk has joined ##java
[19:08:51] *** Rounin has joined ##java
[19:09:22] <Rounin> Hello! I'm parsing a regexp where I need to refer to the end of a string, but $ doesn't match and \z, \Z, \\Z and \\z give me error messages... What do I do?
[19:09:39] *** _acid__ has joined ##java
[19:09:45] *** exbio has joined ##java
[19:09:51] <bobbytek2> yobo2: acegi / spring security comes to mind
[19:10:03] *** RLa has joined ##java
[19:11:55] <yobo2> bobbytek2: thanks for the suggestion; i've never actually used spring yet, been meaning to check it out. looks like it even supports openid, that's pretty sweet.
[19:15:01] *** elindio has quit IRC
[19:18:41] <yobo2> "Most Java applications require a persistent class representing felines."
[19:18:46] <yobo2> that's according to section 4.1 of the hibernate docs.
[19:19:07] <bobbytek2> that's almost always true
[19:22:25] *** vijay_ has quit IRC
[19:22:31] *** Guest42251 has quit IRC
[19:27:08] *** Mortomes has quit IRC
[19:28:37] <BW^-> anyone has experiences of using the lobo web browser?
[19:30:56] *** romanb has quit IRC
[19:32:54] *** gjvc has joined ##java
[19:33:29] <waz> ~anyone
[19:33:30] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[19:35:44] *** Gevaudan82 has quit IRC
[19:38:30] <bobbytek2> ~noone
[19:38:31] *** svm_invictvs has joined ##java
[19:38:31] <BW^-> ok
[19:38:37] <BW^-> i want to run Lobo in headless mode
[19:38:41] <svm_invictvs> Lobo?
[19:38:54] <BW^-> a Java-based web browser
[19:39:00] <BW^-> i just got Exception in thread "main" java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159) at java.awt.Window.<init>(Window.java:318)
[19:39:09] <BW^-> perhaps i should try to mount the Lobo instance in something else than a JFrame.
[19:39:22] <svm_invictvs> oh...
[19:39:27] <svm_invictvs> Sheriff Lobo
[19:39:27] <BW^-> (i should solve this myself.)
[19:39:57] <svm_invictvs> Hot Java?
[19:40:25] *** dk_schrute has quit IRC
[19:40:27] <BW^-> no
[19:40:29] <BW^-> lobobrowser.org
[19:40:35] <svm_invictvs> heh
[19:44:33] <BW^-> what's a container i can run headless? JComponent?
[19:46:08] *** NiSoOo has quit IRC
[19:47:56] *** FireSlash has quit IRC
[19:49:24] <AMcBain> BW^-: "When Java is implemented on a very small device mouse or AWT graphics support may not be available. You will get a HeadlessException if you try to instantiate one of the AWT classes." this is from mindprod. So, to answer your question, there is no GUI component (based on AWT) that you can create under headless mode.
[19:49:59] <BW^-> amcbain: how about swing?
[19:50:20] <AMcBain> uh ... you obviously don't know how Swing works ... it eventually boils down to AWT.
[19:51:05] <AMcBain> JFrame is built upon Frame, and so on.
[19:51:19] *** fryderyk has joined ##java
[19:52:48] <AMcBain> This all says to me that Java takes some effort to say "you shouldn't be creating gui stuff under headless mode" ... so why are you insistent on doing so?
[19:56:25] <_W_> BW^-, does lobobrowser itself support running headless?
[19:56:40] <gjvc> <3 idea 8.1
[19:57:00] * AMcBain heads out, having given his 2 cent google search.
[19:58:58] <BW^-> _w_: i don't know, i think so.
[19:59:32] <BW^-> google seems to say so
[19:59:52] *** victori has joined ##java
[20:00:14] <victori> anyone know off hand if ehcache will expire older elements if heap size is about to hit the wall? or will it throw an OOM?
[20:01:38] *** garotosopa has joined ##java
[20:02:48] *** Archon has quit IRC
[20:02:55] <claudio_ch> BW^-: On http://lobobrowser.org/cobra/java-html-parser.jsp it says that the html parser can run headless. But that's only the parseer, not the whole browser.
[20:03:32] <BW^-> claudio_c: hmhm. so perhaps i'll need to run an xvfb?
[20:03:38] *** bhz- has quit IRC
[20:04:08] *** stringCheese has quit IRC
[20:04:39] <claudio_ch> yes... or try to ask in the lobo forum: http://sourceforge.net/forum/forum.php?forum_id=467020
[20:04:41] <victori> i guess i will just test it
[20:09:04] <lvh> Could anyone explain why I can't use setters in a constructor? Is it because the object doesn't really exist yet or something?
[20:09:37] <claudio_ch> BW^-: By the way http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/ tells you under "Operating in Headless Mode" what you can use and what not.
[20:10:45] *** delskorch has quit IRC
[20:12:39] <claudio_ch> BW^-: And it gives a good hint, to detect yourself what you cannot use: Just look in the API if it can throw a Headless Exception, e.g. public JFrame() throws HeadlessException <- thus JFrame is a bad choice.
[20:13:34] <BW^-> hmm
[20:13:39] *** armyriad has joined ##java
[20:13:41] <yobo2> if i want to handle a NumberFormatException thrown when a jsp:setProperty tag tries to parse a parameter to a bean property, is the only option to put a try...catch around the jsp:setProperty tag?
[20:16:21] <freeone3000> lvh: Nothing prevents you from calling setters in a constructor. They're just not needed.
[20:20:22] <roxlu_> how can I calculate the crossproduct when I've got two points (x/y) ?
[20:21:07] <roxlu_> is it simply: point_a.x1 * pointb.y2 + point_a.x2 * point_b.y1 ?
[20:22:24] <staar2> would it be possible to but swing application always on top of other apps ?
[20:22:40] <ernimril> staar2: why would you want to do that?
[20:22:55] <ernimril> staar2: why do you think that you know better than the user of your app?
[20:22:57] <staar2> it would show me graph
[20:23:12] <ernimril> staar2: it is possible, but it is almost always a very bad choice to make
[20:23:32] <staar2> JNI ?
[20:23:42] <ernimril> staar2: no, a standard method
[20:23:48] <ernimril> staar2: what would you name the method?
[20:23:59] <ernimril> staar2: did you look in the api index for such a method?
[20:24:05] <staar2> nop
[20:24:31] <ernimril> staar2: "nop" is normally the short for "No Operation"
[20:24:38] <ernimril> staar2: now go and try the api index
[20:24:42] <freeone3000> ernimril: Because on Windows, "Always on Top" functionality has to be accessed through the program, not the OS.
[20:25:01] <ernimril> freeone3000: what?
[20:25:19] <freeone3000> In response to "Why would you want to do that?".
[20:26:02] *** djp[mbp] has quit IRC
[20:26:05] <ernimril> freeone3000: I do not consider the window manager part of the OS
[20:27:57] <lvh> freeone3000: I see. They make it a lot easier to prove that I always satisfy class invariants though.
[20:28:33] <lvh> freeone3000: (all changes happen through this mutator) && (this mutator can never violate the invariants)
[20:28:34] <staar2> one more thing, can i make shortcut keys to swing app, like when i press ctrl + l then it shows me messagebox ?
[20:28:48] <ernimril> staar2: yes you can
[20:29:03] <staar2> like i mean i got focus of my swing app
[20:29:07] <staar2> off
[20:29:08] <ernimril> staar2: go and try the swing tutorials, they will tell you a lot faster than irc will
[20:29:40] <staar2> yea i certainly do but first i ask would it be possible
[20:29:55] <freeone3000> Everything is possible.
[20:31:31] *** illbeatu has joined ##java
[20:31:38] <illbeatu> what's the difference between class.forname and new?
[20:33:57] *** mun has quit IRC
[20:34:28] <marvi> illbeatu: forName doesn't return an instance. It justs loads the class.
[20:34:46] <illbeatu> ok.
[20:35:20] <illbeatu> any way to instantiate a new object based off what a string is?
[20:36:31] *** boringwall has joined ##java
[20:36:36] <marvi> Use a factory class maybe?
[20:37:41] <illbeatu> factory class?
[20:38:01] <freeone3000> ~factory
[20:38:01] <javabot> Please see http://en.wikipedia.org/wiki/Factory_method_pattern
[20:38:06] <marvi> Or use IoC and configure what implementation of an interface to use in the config.
[20:40:17] *** josemoreira has quit IRC
[20:40:22] *** squi has quit IRC
[20:41:59] <illbeatu> hrm. i'm wondering if all the switch and if /else statements will bog me down
[20:42:28] <illbeatu> say i have thousands of clients sending different requests.. they all have to go through some switch else statement to get the correct object
[20:42:49] <illbeatu> switch case*
[20:42:52] <illbeatu> or if else
[20:43:16] <illbeatu> no way to map directly from string name?
[20:44:41] <marvi> What are you trying to do?
[20:44:51] *** pstickne has joined ##java
[20:44:55] *** christo_m has joined ##java
[20:45:03] *** josemoreira has joined ##java
[20:45:47] <freeone3000> Class.forName().createInstance() may help, but I'm not sure if that's better.
[20:46:05] <pstickne> fail
[20:46:10] <pstickne> :)
[20:46:30] <illbeatu> marvi, i've tried ejb, spring, struts, and all they want is for you to pay $$$ or read through shit documentation
[20:46:45] <pstickne> use a simpler framework :p
[20:46:55] <illbeatu> so. i'm reinventing the wheel. just like the hundreds or so people out there who hate using someone els'es code that has little explanation
[20:47:02] <yobo2> is there a code (non jsp-tag) equivalent of <jsp:setProperty ... property="*">?
[20:47:14] <pstickne> illbeatu: there isn't just a /better solution/ with /better documentation/ out there? :(
[20:47:33] <pstickne> illbeatu: granted you threw out some big names, but I'd be shocked if what you are doing hasn't been done already :p
[20:47:36] <illbeatu> there's hundreds and hundreds of frameworks. It points at a huge problem of "I don't know what hte fuk this guy is doing with his maven shit or his xml tags or his funny api"
[20:47:47] <illbeatu> "so i'm gonna do my own"
[20:47:56] <pstickne> illbeatu: so choose a simpler one. not a complicated beast. but, it's all your choice in the end )
[20:48:02] <svm_invictvs> *yawn*
[20:48:21] * pstickne pokes svm_invictvs
[20:48:24] <svm_invictvs> anybody need a recently unemployed java coder?
[20:48:24] <svm_invictvs> lol
[20:48:32] * svm_invictvs giggles
[20:48:32] <yobo2> heh
[20:48:34] <pstickne> illbeatu: just curious, what kind of framework are you looking for?
[20:48:36] <marvi> illbeatu: Do you even need a "framework"? Why not stick with Servlets and JSP until you know what you are doing?
[20:48:44] <illbeatu> i have done servlets and jsp
[20:48:55] <illbeatu> i'd like to control things a little better
[20:49:01] <pstickne> marvi: in theory they should make life simpler ;-)
[20:50:37] <marvi> illbeatu: My advice: keep using JSP and Servlets. If you have reached their limit you will grasp what problems the frameworks are trying to solve and you will get them. If you are new to Java, they will make you feel like you do now.
[20:50:52] <illbeatu> i have done jsp and servlets ..
[20:51:01] <illbeatu> and i'm getting a lot of classes and jsps
[20:51:06] <illbeatu> and it's more than i can handel at the moment.
[20:51:31] <illbeatu> "so this request goes here which goes here which goes here ok. wait what?"
[20:52:13] <marvi> illbeatu: then I don't understand why you have a hard time grasping Spring or Struts2. Never heard that reaction before, even from junior programmers.
[20:52:33] <illbeatu> marvi, i'm learning it allll by myself
[20:52:38] <illbeatu> from the shitty docs i can google
[20:53:21] <illbeatu> or was trying to. i was ok with IOC but then they started throwing funny simplehandlerbarbeque applicationcontextlistener and properties and keys and all that crap and it was so hard figuring out what all those api keywords were doing
[20:53:50] *** exbio has quit IRC
[20:53:52] <illbeatu> no one is really teaching me.
[20:53:55] <marvi> illbeatu: I learnt Spring by myself from the Spring Reference guide and some sample projects.
[20:54:19] <illbeatu> spring mvc?
[20:54:49] <marvi> First I used Spring in a standalone app. Then MVC.
[20:55:12] <illbeatu> i'm through with spring and all those open shit software
[20:55:39] <illbeatu> oh well i'll figure out my own.
[20:55:44] <marvi> illbeatu: you attitude is so warm and friendly. :-)
[20:55:47] *** darkshine has joined ##java
[20:56:03] <pstickne> marvi: he just called my software poo :(
[20:56:25] <illbeatu> you work with spring/struts?
[20:56:30] <illbeatu> developing spring/struts?
[20:56:35] <bobbytek2> I do
[20:56:35] <illbeatu> where do you live?
[20:56:38] <bobbytek2> i like
[20:56:45] *** W_ has joined ##java
[20:56:55] <darkshine> ~pastebin
[20:56:55] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[20:57:15] <pstickne> illbeatu: I don't use fugly/fubar libraries :-)
[20:57:15] *** W_ has left ##java
[20:57:26] <svm_invictvs> fugly?
[20:57:30] <bobbytek2> spring if fubar?
[20:57:33] <bobbytek2> *is
[20:58:05] <svm_invictvs> Fugly?
[20:58:07] <marvi> illbeatu: Are you sure you are not a Java newbie who heard that "frameworks are cool" and are trying to master them before knowing the foundation?
[20:58:17] *** victori has left ##java
[20:58:20] *** delskorch has joined ##java
[20:58:20] <illbeatu> i have deployed a web application before :/
[20:58:30] <illbeatu> using flash javascript servlets jsp.
[20:58:31] *** bas-i has quit IRC
[20:58:46] <pstickne> bobbytek2: if it doesn't have a nice concise explanation of what it is .. :)
[20:58:59] <illbeatu> i wrote a simple security thing that creates sessions after verifying in realm etc.
[20:59:08] <svm_invictvs> pstickne: The fugliest API I ever worked with was the Xbox360 API
[20:59:19] <pstickne> svm_invictvs: pfft. don't hate MS!
[20:59:24] <bobbytek2> for me, msxml api
[20:59:30] <svm_invictvs> The API is really fugly.
[20:59:40] <marvi> All of MFC.
[20:59:41] <bobbytek2> anything mfc
[20:59:42] <svm_invictvs> Its' a gimpy version of WinAPI
[20:59:42] <bobbytek2> hehe
[20:59:46] <marvi> bobbytek2: :-)
[20:59:47] <illbeatu> marvi why do you keep insisting i have never done these things? ad hominems and circumstantial fallacies aren't going to make spring better for me.
[20:59:48] <bobbytek2> or atl
[20:59:55] <bobbytek2> com, etc.
[21:00:01] <bobbytek2> FUGLY!
[21:00:27] <bobbytek2> illbeatu, prehaps your problem is with java then
[21:00:34] <bobbytek2> ever consider ror?
[21:01:22] <illbeatu> heh i did a small tutorial once
[21:01:29] <marvi> illbeatu: Because you feel that Java web frameworks are SO complicated and hard to learn. I find that strange. And the amount of free information about them is huge.
[21:01:35] *** UK-sHaDoW has joined ##java
[21:01:38] <systat> Hey, sorry for this noob question but how to generate some random number in java from range let's say 5-100
[21:01:40] <illbeatu> marvi. quality is an issue.
[21:01:53] <illbeatu> documentation ranges from 2.5 to 3.whatever
[21:02:47] <illbeatu> again. there is a reason hundreds of people write their own.
[21:03:05] <bobbytek2> systat: http://tinyurl.com/bnbl8z
[21:03:35] <marvi> Spring has kept compatibility pretty well between versions. So an old tutorial should work.
[21:04:22] <illbeatu> an old tutorial that tells me to use properties files?
[21:04:27] *** Nebulam has joined ##java
[21:04:28] *** JohnBat26 has joined ##java
[21:04:29] <illbeatu> by thomas risberg
[21:04:36] <svm_invictvs> ~csi
[21:04:36] <javabot> svm_invictvs, I have no idea what csi is.
[21:04:37] <svm_invictvs> heh
[21:04:42] <bobbytek2> who / what told you to use properties files?
[21:04:43] <marvi> What's wrong with a property file?
[21:04:50] <illbeatu> thomas risberg
[21:04:52] <illbeatu> spring tutorial.
[21:04:53] <bobbytek2> spring has always given the developer many options
[21:05:11] <illbeatu> marvi you seem set that spring is easy to learn from documenation. what's your agenda?
[21:05:21] <bobbytek2> it doesn't really prescribe a single method of development
[21:05:27] <bobbytek2> other than loosely coupled
[21:05:35] <illbeatu> not one of my classmates amonst 256 in undergrad picked up spring. ever.
[21:05:41] <Infinito> illbeatu, try books then
[21:05:46] <svm_invictvs> Does anybody watch CSI?
[21:05:48] <Infinito> lots of books about spring out there
[21:06:04] <bobbytek2> spring isn't really for undergrad projects... it's for real life development
[21:06:09] <svm_invictvs> I swear. They make it so dramatic when they say things like, "Rotate. Enhance. Rotate. Magnify. Enhance."
[21:06:31] <bobbytek2> how does enhance work anyways?
[21:06:40] <bobbytek2> seems to be undeterministic
[21:06:52] <bobbytek2> information just comes from the ether into the image?
[21:07:00] <bobbytek2> wtf is that
[21:07:40] <illbeatu> whatever i'm gonna roll my own. i'm pretty sure the # of people who role their own is in the thousands. the hundreds of frameworks out there are verifiably published on sourceforge
[21:07:46] <pstickne> bobbytek2: nooo!
[21:08:32] <waz> lots of verifiable idiots
[21:08:35] <bobbytek2> illbeatu: what features will your framework / library have?
[21:08:35] <svm_invictvs> bobbytek2: You can shapren images. But you can't just magically produce the image you want, right?
[21:08:46] <illbeatu> understandability. for myself. alone.
[21:08:51] <freeone3000> bobbytek2: It's called photoshop. It's magic.
[21:09:04] <waz> ahh, you'll be a gem of an employee for someone
[21:09:14] <bobbytek2> I thought you meant the type of enhance whereby resolution is added to an image magically
[21:09:22] <svm_invictvs> waz: who?
[21:09:22] <freeone3000> You mean like hardware upscaling?
[21:09:23] <bobbytek2> I have yet to see that happen in the real world
[21:09:37] <freeone3000> Like Blu-Ray players do to DVDs?
[21:09:38] <waz> svm_invictvs: illbeatu
[21:09:44] <pstickne> bobbytek2: you may like mathcs.emory.edu/~pwendyk/research/publications/emerson08.pdf
[21:09:57] <illbeatu> waz, if they have a question they can ask. it's not like i'm able to ask Rod Johnson what's going on in his mind
[21:09:58] <pstickne> bobbytek2: it seems like /some/ of that could be possible
[21:10:08] <bobbytek2> illbeatu: I have the perfect wikipedia entry for you http://en.wikipedia.org/wiki/Not_Invented_Here
[21:10:11] <marvi> illbeatu: What do you expect from documentation? Someone coming to your place holding your hand?
[21:10:16] <illbeatu> and have a convo with him. without paying 2490$ "professional spring training"
[21:10:24] <pstickne> bobbytek2: granted it /is/ a TV show and from experience with just about any other TV show and/or movie that has technology in it ... :)
[21:10:35] <waz> spring is dead simple
[21:10:46] <illbeatu> clear explanation. don't assume you know what's going on. the whole reference is buzzwords.. like Tiger and IBatis and other things
[21:10:46] <waz> seriously if you have issues with it you're in the wrong field
[21:10:55] <pstickne> waz: XML is scary...
[21:11:02] <waz> and ugly!
[21:11:27] <marvi> pstickne: you can use annotations instead. But I kind of like the XML. I like having config stuff outside of code.
[21:11:28] <svm_invictvs> What's wrong with Spring now?
[21:11:33] <pstickne> waz: I can get around all that; I just hate when XML is used to make static typing un-static :(
[21:11:45] <illbeatu> dead simple for those who know it already right? i bet if you give it to a thousand undergrads just out of school only a few 1-5 would know how to use it after a month.
[21:11:52] <illbeatu> how is that simple?
[21:12:06] <illbeatu> no training either. they just read docs and experiment.
[21:12:07] <pstickne> illbeatu: I bet I could learn it in a month. so yeah... simple :)
[21:12:12] <bobbytek2> it's pretty simple in my opnion
[21:12:13] <marvi> pstickne: And with modern Spring IDE:s the XML is really part of the source code. Command completion and such.
[21:12:16] <waz> I'll take that bet!
[21:12:18] <bobbytek2> especially IoC
[21:12:20] <svm_invictvs> illbeatu: That' sthe stupidest thing I've ever heard.
[21:12:37] <pstickne> waz: I never said become an expert ;-) but /this/ month is LiftWeb + MPEG4 month! :p
[21:13:01] <freeone3000> Why MPEG4?
[21:13:06] *** OsAC has joined ##java
[21:13:11] <svm_invictvs> illbeatu: It doesn't take a month to become competent enought to sovle a problem with Spring.
[21:13:18] <pstickne> freeone3000: video playback
[21:13:28] <freeone3000> Mm. Fun.
[21:13:35] <svm_invictvs> It may take longer to truly master it, but no way it takes a month to sit down an figure out how to solve a problem with it.
[21:13:42] <waz> svm_invictvs: I think it'd take him years even with Johnson holding his hand
[21:13:56] <pstickne> freeone3000: thankfully most of the decoder was already written (or rather, ripped from the mpeg4 reference implementation circa 1994 :-)
[21:14:04] <svm_invictvs> waz: Just him, or in general?
[21:14:13] <waz> heh
[21:14:15] <waz> him
[21:14:18] <svm_invictvs> oh
[21:14:21] <bobbytek2> Just read a book, look at the sample apps, etc. not hard really
[21:14:26] <waz> not sure why he chose java
[21:14:30] <pstickne> freeone3000: I've just been optimizing it -- I can get 320x200x12fps+MP3 audio at 1280xsomething with ~20% CPU usage ;-)
[21:14:32] <illbeatu> so explain to me why thousands of people are writing their own. rather than adopting a current one
[21:14:41] <waz> cause Gosling isn't like ready to answer his questions when he gets stuck
[21:14:43] <illbeatu> elephant in the room guys. come on i'm not gonna listen to "yea it's easy"
[21:14:46] <marvi> illbeatu: I've seen ten Sri Lankans, directly from college, getting productive with Spring in two weeks.
[21:14:50] <waz> illbeatu: I already did
[21:15:01] <pstickne> freeone3000: VLC can do it in about 5%, but considering the initial version would run at > 80% CPU under this case and run very unsmooth :p
[21:15:04] <freeone3000> illbeatu: Because the first response is to write something themselves.
[21:15:10] <bobbytek2> because they are impatient, non-resourceful and don't have maintainability in the fore of their mind?
[21:15:20] <pstickne> freeone3000: which is kind of fun, if you have the time :)
[21:15:21] <freeone3000> pstickne: Nice.
[21:15:51] <bobbytek2> and also NIH
[21:15:52] <pstickne> marvi: but you're forgetting they just dive into it instead of bickering ;-)
[21:16:26] <marvi> illbeatu: writing your own framework can teach you a lot. Nothing wrong with that. But you lack humility when you think that your inablity to learn Spring is because of Spring and not you.
[21:16:34] <pstickne> okay, okay, off to get some work done...
[21:16:38] *** pstickne has left ##java
[21:16:51] <svm_invictvs> What is pstickne's deal?
[21:16:57] <waz> or if you think that you can come anywhere close to writing a spring equivalent
[21:17:04] <illbeatu> marvi. you have ten lockers. you need to secure those lockers. I give you 10 combo locks all in locked position. secure those lockers.
[21:17:21] <svm_invictvs> ~dictionary Hubris
[21:17:21] <javabot> svm_invictvs, dictionary Hubris is http://dictionary.reference.com/search?q=Hubris
[21:17:41] *** Ben_Cs has joined ##java
[21:17:45] <Ben_Cs> hello
[21:18:15] <waz> hey!
[21:18:35] <bobbytek2> at the end of the day, the ability to research and evaluate frameworks in particular and alternatives in general is going to pay any developer dividends over the course of there career. I think this is the lesson to be learned here.
[21:18:36] <Ben_Cs> if i create a Thread and call start() for it. what happens after run() finishes, and i call start() again for the same Thread reference?
[21:18:58] <bobbytek2> *their
[21:19:19] <bobbytek2> So if spring doesn't make sense illbeatu, roll your own, but most likely it does :)
[21:20:29] <waz> I think he's mad that the documentation wasn't for the trade school code flunky but for a professional.
[21:20:47] <bobbytek2> What in particular about spring seems illogical to you?
[21:21:11] *** majyk has quit IRC
[21:21:13] <waz> besides Rod!
[21:22:18] *** taxon has quit IRC
[21:22:19] <illbeatu> funny api calls context listener xml tags with no explanation.
[21:22:23] <illbeatu> etc.
[21:23:02] <bobbytek2> give me an example of the first and the last
[21:23:09] <svm_invictvs> I think there's pleanty of valid criticism for Spring
[21:23:14] <bobbytek2> context listener is just the servlet api hook
[21:23:27] <waz> No explanation
[21:23:54] <illbeatu> org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
[21:24:16] <bobbytek2> okay, so your gripes are mainly with spring mvc then?
[21:24:19] <illbeatu> org.springframework.web.servlet.view.InternalResourceViewResolver
[21:24:26] <waz> ~google org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
[21:24:26] <javabot> http://letmegooglethatforyou.com/?q=org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
[21:24:37] <waz> wow, look at all the relevant hits!
[21:24:39] <waz> weirdness
[21:24:59] <bobbytek2> I think he just though these apis were weird
[21:25:08] <waz> how will Rod ever make any money?
[21:25:12] <illbeatu> 2.0 is 3.0 right?
[21:25:21] *** ChanServ sets mode: +o waz
[21:25:23] <svm_invictvs> Could it also be possible that Spring is overkill for your particular application?
[21:25:34] <svm_invictvs> waz: Who's Rod?
[21:25:37] *** waz sets mode: +b *!*@c-71-202-178-158.hsd1.ca.comcast.net
[21:25:57] <waz> tired of the trolling
[21:26:12] <waz> Rod Johnson
[21:26:16] <bobbytek2> @MVC is a lot simpler in my opinion
[21:27:04] <pr3d4t0r> waz: Let him have it!
[21:27:11] <waz> heh
[21:27:12] *** doubleagent has joined ##java
[21:27:15] <svm_invictvs> Rod Johnson?
[21:27:28] *** acuster has quit IRC
[21:27:52] <svm_invictvs> I like how both of his names a euphamisms for "penis"
[21:28:22] <pr3d4t0r> svm_invictvs: He's kind of a dick, actually.
[21:28:32] <whaley> svm_invictvs: lol!
[21:28:34] <svm_invictvs> Is his middle name Richard?
[21:30:40] <doubleagent> Is there a way I can explicitly use the JVM boolean parser in my code, if I have a String that looks like this: "foo>3 && (bar<4 || stuffs!=null)"?
[21:31:07] <svm_invictvs> ~~ doubleagent javadoc Boolean.parseBoolean(*)
[21:31:08] <javabot> doubleagent: http://is.gd/kngG [java.lang.Boolean.parseBoolean(String)]
[21:31:50] *** aleksei has joined ##java
[21:32:10] *** waz sets mode: -b *!*@c-71-202-178-158.hsd1.ca.comcast.net
[21:32:28] <doubleagent> No, that's not quite what I need
[21:32:56] <bobbytek2> beanshell?
[21:33:00] <doubleagent> That just checks if the string is non-null or equal to "true", ignoring case
[21:33:07] <doubleagent> beanshell?
[21:33:11] <doubleagent> I'll look at it
[21:33:27] <svm_invictvs> Beanshell is probably a little excessive.
[21:33:35] <bobbytek2> script api?
[21:33:51] *** nocture has joined ##java
[21:33:58] *** riotz has quit IRC
[21:34:00] <svm_invictvs> actaully, no, Beanshell is probably what you could use.
[21:34:10] <bobbytek2> javax.script ?
[21:34:26] *** mele- has joined ##java
[21:34:34] <svm_invictvs> bobbytek2: Another thing you could do is look at Compiler ;)
[21:34:34] <svm_invictvs> hehe
[21:35:46] <svm_invictvs> I didn't realize Beanshell was in J2SE
[21:35:51] *** roxlu_ has left ##java
[21:37:21] *** monil has quit IRC
[21:37:33] <Ben_Cs> no one want to help me?
[21:37:52] <aleksei> svm_invictvs: is it part of the standard J2SE now? how do you invoke it there?
[21:39:37] *** Ben_Cs has quit IRC
[21:39:56] *** musically_ut has joined ##java
[21:40:05] *** Lethalman has joined ##java
[21:40:08] <Lethalman> hello
[21:40:16] <Lethalman> I'm having serious problems reproducing videos with JMF
[21:40:18] *** SinnerG has joined ##java
[21:40:43] <Lethalman> I've tried searching for errors over internet but I couldn't resolve the problem
[21:41:03] <Lethalman> I always get a console error (no an exception) from the JMF saying it can't handle MPEG format
[21:41:05] <Lethalman> of any types
[21:41:28] <Lethalman> I've tried with .flv, .mp4 and so on and converted them to avi, mpg, mp2, yuv, ecc.
[21:41:39] <Lethalman> any hints on playing a video? also without the audio
[21:41:52] <Lethalman> I'm using ffmpeg to do video conversion
[21:43:03] *** djp[mbp] has joined ##java
[21:43:56] *** cmccormick has quit IRC
[21:46:03] *** BW^- has quit IRC
[21:49:22] <svm_invictvs> aleksei: JSR 254 I think?
[21:49:32] <svm_invictvs> 274
[21:49:36] <bobbytek2> JSR-233 even
[21:49:40] <svm_invictvs> pr3d4t0r: Hey, is LeapFrog hiring?
[21:49:44] <svm_invictvs> heh
[21:49:50] <pr3d4t0r> svm_invictvs: Check the web site.
[21:49:56] <pr3d4t0r> svm_invictvs: http://www.leapfrog.com
[21:49:56] <bobbytek2> er, scratch that
[21:50:00] <pr3d4t0r> svm_invictvs: Where are you located?
[21:50:05] <svm_invictvs> SD
[21:50:10] <svm_invictvs> San Diego
[21:50:25] <pr3d4t0r> svm_invictvs: Check the web site.
[21:50:36] <pr3d4t0r> svm_invictvs: I know a company in NYC that's hiring too.
[21:50:56] <svm_invictvs> cheeser's company?
[21:51:02] <svm_invictvs> gigaspaces?
[21:51:02] * r0bby sighs
[21:51:11] <svm_invictvs> er, no cheeser works for sun
[21:51:16] <svm_invictvs> r0bby what's up?
[21:51:20] <r0bby> the sky
[21:51:29] <svm_invictvs> Stiff dicks and aeroplanes?
[21:51:35] <pr3d4t0r> svm_invictvs: It's a game company.
[21:51:44] <svm_invictvs> hm
[21:51:44] <pr3d4t0r> svm_invictvs: I'm going to consult for them on how to scale their stuff.
[21:51:55] <svm_invictvs> What kind of games?
[21:52:08] <pr3d4t0r> svm_invictvs: They have tons of .Net shit that they need to migrate and scale.
[21:52:12] <pr3d4t0r> svm_invictvs: Educational games.
[21:52:19] <svm_invictvs> heh
[21:52:44] <pr3d4t0r> svm_invictvs: Think of a cross between Doom and Learning Rabbit.
[21:52:50] <svm_invictvs> heh
[21:53:10] <svm_invictvs> Got the hookup from them through LeapFrog?
[21:53:23] <svm_invictvs> ~literal wrong
[21:53:23] <javabot> <see>doing it wrong
[21:53:24] *** illbeatu has quit IRC
[21:53:31] <svm_invictvs> ~literal doing it wrong
[21:53:31] <javabot> <reply>No, you're doing it wrong! See http://www.doingitwrong.com/wrong/wrong(3|5|6|9|12|18|21|22|23|26|27|28).jpg
[21:54:27] *** doubleagent has quit IRC
[21:55:58] <lvh> Why does BigInteger's pow method only take ints?
[21:56:14] <svm_invictvs> pr3d4t0r: Is this for their web stuff or their actual game servers?
[21:56:32] <pr3d4t0r> svm_invictvs: Everything.
[21:56:36] <svm_invictvs> ah
[21:56:43] <pr3d4t0r> svm_invictvs: That's why we're talking.
[21:56:47] <svm_invictvs> console, pc?
[21:56:54] <pr3d4t0r> svm_invictvs: And no, this has nothing to do with LeapFrog.
[21:56:58] <pr3d4t0r> svm_invictvs: Yes.
[21:57:10] <pr3d4t0r> svm_invictvs: Wherever the Torq engine works, this will work. iPhone even.
[21:57:37] <svm_invictvs> Oh, I know torque...it's a bit of a pain. I think it's gotten better.
[21:57:50] <svm_invictvs> Torque runs on Wii, Xbox and PC, iirc
[21:58:10] <pr3d4t0r> ~tell svm_invictvs about mono triste.
[21:58:10] <javabot> svm_invictvs, I have no idea what mono triste is.
[21:58:15] <pr3d4t0r> :S
[21:58:19] *** Lethalman has left ##java
[21:58:33] *** phyburn has joined ##java
[21:58:36] *** danking has joined ##java
[21:58:41] *** phyburn has quit IRC
[21:58:49] *** bas-i has joined ##java
[21:59:55] <danking> Why can I not do this: ArrayList<Class> al = new ArrayList<SubClass>(); // Where SubClass extends Class?
[21:59:58] <AMcBain> hey, pr3d4t0r, how's your JTouch coming along?
[22:00:27] <AMcBain> danking: you want <? extends Class>
[22:00:36] *** illbeatu has joined ##java
[22:00:43] <svm_invictvs> pr3d4t0r: So If I'm understanding it right, they started and grew too fast for their infrastructure.
[22:00:54] <illbeatu> well. i figured out how to instantiate on the fly with reflection so my framework is well on its way.
[22:01:00] *** OsAC has quit IRC
[22:01:24] <waz> to obscurity, bugs and general idiocy
[22:02:06] <danking> AMcBain: I'm sorry I'm unfamiliar with the ? symbol. Is that some type of short hand for Type Paramaterization?
[22:02:19] <pr3d4t0r> AMcBain: It's all done :D
[22:02:22] <AMcBain> cool
[22:02:27] <illbeatu> you don't have to care it's not for you waz.
[22:02:58] <waz> how horrible
[22:02:59] <AMcBain> danking: it means, in this case, that anything will work (the rest ensures it is a subset of anything that is a subclass or implementation of Class)
[22:03:11] <waz> you don't have to brag when you learn some new basic thing
[22:03:13] <pr3d4t0r> AMcBain: http://is.gd/jJxJ - I discovered that Apple in its infinite wisdom stubbed the DnD API altogether instead of providing support for it.
[22:03:14] *** woogley has quit IRC
[22:03:16] *** ChanServ sets mode: +o pr3d4t0r
[22:03:19] *** illbeatu was kicked by pr3d4t0r (pr3d4t0r)
[22:03:22] <danking> AMcBain: Interesting... I'll give that a try, thanks
[22:03:22] *** ChanServ sets mode: -o pr3d4t0r
[22:03:41] <AMcBain> (in generics, "extends" refers to subclasses and interfaces)
[22:03:42] <pr3d4t0r> AMcBain: You can download the sources, etc. there. The packages are Mac-, Linux-, Windows-ready.
[22:03:52] <pr3d4t0r> svm_invictvs: Yeah.
[22:03:57] <pr3d4t0r> svm_invictvs: It's even better than that.
[22:04:11] <pr3d4t0r> svm_invictvs: These guys figured out their business model and they're making money, but they have no tech chops.
[22:04:20] *** dinguva has joined ##java
[22:04:34] *** taruti has joined ##java
[22:04:38] <svm_invictvs> So they develop the games in house, or they farm them out?
[22:04:39] *** doc`` has joined ##java
[22:04:47] *** zophy has quit IRC
[22:05:01] <mele-> re
[22:05:16] *** phyburn has joined ##java
[22:05:18] <Nebulam> I'm trying to clone an object of a class that implements the clone interface but I'm getting an error that says clone() has protected access. What's my problem?
[22:05:39] *** zophy has joined ##java
[22:06:06] *** woogley has joined ##java
[22:06:25] <marvi> Nebulam: have you implemented clone?
[22:06:38] <Nebulam> no it's a swing component which implements it
[22:06:43] *** zophy has quit IRC
[22:07:05] *** zophy has joined ##java
[22:07:28] <marvi> It is not enought to implement clonable. You have to override it with public modifier.
[22:07:29] <pr3d4t0r> svm_invictvs: They farmed out quite a bit of the development.
[22:07:47] <svm_invictvs> They a publisher?
[22:07:52] <pr3d4t0r> svm_invictvs: The cool thing is that they figured the business out.
[22:07:54] <pr3d4t0r> svm_invictvs: Yes.
[22:07:56] <svm_invictvs> Yeah
[22:08:02] *** prgrmr has quit IRC
[22:08:12] <taruti> How does one use a "for-each" loop when given an iterator? i.e. what is the most elegant way of saying: for(MyClass obj : someIterator) { ... } ? Just use old-style for-loops?
[22:08:28] *** prgrmr has joined ##java
[22:08:43] <svm_invictvs> taruti: You can use the foreach loop with an iterable, not an iterator
[22:08:48] <Nebulam> But i'm just trying to clone a component that implements the interface already. Are you really saying I have to create an object that derives from this component and make the clone methods public just to use clone()
[22:08:50] <Nebulam> that doesn't make sense
[22:09:11] * AMcBain finds his password strength checker he found once (it has variable weights so that it isn't fixed how it evaluates things) but it is in JS :-/
[22:09:23] *** zophy has quit IRC
[22:09:24] <marvi> Nebulam: The component has a protected clone, right? Then they don't wan't you to clone it.
[22:09:35] <taruti> svm_invictvs: I know. I don't know why Iterators are not Iterable (should be simple enough to wrap). And not sure what the most elegant solution is.
[22:09:37] <Nebulam> ok
[22:10:12] *** pilkarn has joined ##java
[22:10:14] *** zophy has joined ##java
[22:10:41] <cher> taruti: There is a class IteratorIterable which performs such a wrapping. http://japi.svn.sourceforge.net/viewvc/japi/libs/util/trunk/src/prj/net/sf/japi/util/IteratorIterable.java?revision=824&view=markup
[22:11:06] <pilkarn> does import something.*; mean your program will use more memory when runthan import the one class you need? or will the compiler optimize that away?
[22:11:18] <pr3d4t0r> taruti: You may only use an extended 'for' statement if you have an array or things or if the collection-like object implements Iterable.
[22:11:18] <AMcBain> pr3d4t0r, I saw the "upcoming" tool in the sidebar, if I converted it to Java (not that hard, unless you wanted it straight) would you be interested in a weight-based password strength generator I stumbled upon once? I know the original author and have the original source, but not where it came from.
[22:11:21] *** zophy has quit IRC
[22:11:34] <cher> taruti: for (final MyClass obj : new IteratorIterable<MyClasss>(someIterator))
[22:11:37] <pr3d4t0r> AMcBain: Nah.
[22:11:41] <AMcBain> okay
[22:11:51] <pr3d4t0r> AMcBain: GenPasswd is part of my book on App Engine.
[22:12:04] <AMcBain> ah
[22:12:05] <taruti> cher: thanks. that looks nicer than doing explicit iteration.
[22:12:20] <pr3d4t0r> AMcBain: It's my signature greeting program. It's a bit less trivial than a "Hello, World" and it actually does something useful.
[22:12:30] <AMcBain> yeah
[22:12:30] <pr3d4t0r> AMcBain: I have several versions out there littering the Internet :)
[22:12:33] <AMcBain> heh
[22:12:35] *** squiddle has joined ##java
[22:13:16] *** riotz has joined ##java
[22:13:23] <pilkarn> does import something.*; mean your program will use more memory when runthan import the one class you need? or will the compiler optimize that away?
[22:13:42] <r0bby> pilkarn: no
[22:13:42] <pr3d4t0r> OKi, nap time. See you guys later.
[22:14:00] *** BlindHunter has quit IRC
[22:14:04] <r0bby> doing import java.util.List makes it so that List maps to java.util.List
[22:14:08] <pilkarn> r0bby: no to the first or second?
[22:14:09] <r0bby> it's compile time only
[22:14:17] <pilkarn> ok
[22:14:18] *** aksn has quit IRC
[22:14:28] <r0bby> ~~ pilkarn star imports
[22:14:29] <javabot> pilkarn, star imports is http://en.wikibooks.org/wiki/Java_Programming/StarImports
[22:14:30] *** danking has left ##java
[22:15:01] *** bas-i has quit IRC
[22:15:54] <svm_invictvs> taruti: Dont' use fhe foreach loop
[22:16:00] * r0bby kicks svm_invictvs
[22:16:02] <svm_invictvs> pr3d4t0r: hey, ping me when you get back.
[22:16:09] *** zophy has joined ##java
[22:16:11] <r0bby> foreach is just fine to use
[22:16:11] <svm_invictvs> Or I'll ping you
[22:16:16] <taruti> svm_invictvs: hmm? why?
[22:16:31] <r0bby> er wait
[22:16:33] <r0bby> i should read
[22:16:45] *** ganymede has joined ##java
[22:16:47] <svm_invictvs> because you ahve an iterator
[22:16:47] <woogley> there is so much wrong with that wiki
[22:16:53] <r0bby> taruti: foreach uses an iterator behind the scenes
[22:16:53] <svm_invictvs> and you dont' need to use a foreach loop
[22:17:06] <svm_invictvs> just while (itr.hasNext()) { Element el = itr.next() ; }
[22:17:14] *** zophy has quit IRC
[22:17:33] <svm_invictvs> taruti: You could do something like....
[22:17:40] *** zophy has joined ##java
[22:17:49] <taruti> r0bby: yes, I know that is possible.
[22:18:06] <r0bby> what are you tring to do
[22:18:16] <taruti> write idiomatic java.
[22:18:25] <r0bby> Okay
[22:18:28] <svm_invictvs> final Iterator<Element> itr = getIterator(); for (Element el : new Iterable<Element>() { public Iterator<Element> iterator() { return itr; } })
[22:18:30] <svm_invictvs> but why bother?
[22:18:33] *** swans20 has joined ##java
[22:18:36] *** zophy has quit IRC
[22:19:01] *** zophy has joined ##java
[22:19:12] *** pilkarn has left ##java
[22:19:19] <ganymede> hello, i have a subclass that i declared like this: public class ListSet extends ImmutableList implements Set. now i'd like to write the primary constructor for ListSet, which takes no arguments, but with the constructor prototyped like this: public ListSet(), i get the eclipse error: Implicit superconstructor ImmutableList() is not visible. Must explicitly invoke another constructor. But all of ImmutableList's constructors are private. what ca
[22:19:19] <ganymede> n i do?
[22:19:23] <taruti> I know *how* to solve things, just that I mostly use different languages and my Java skills are mostly pre 1.5, and thus I was not sure how to elegantly do it with the current features.
[22:19:51] *** zophy has quit IRC
[22:20:18] *** zophy has joined ##java
[22:20:28] <r0bby> taruti: are you using a List?
[22:20:55] <r0bby> if you're using arrays you can do for(String s : strArray) { ... }
[22:21:03] <r0bby> same thing for Lists
[22:21:14] <taruti> r0bby: refactoring code that previously used List to use Iterator instead (need it to be lazy).
[22:21:16] <r0bby> Sets as well; Maps you can't do it
[22:21:31] *** pstickne has joined ##java
[22:21:47] <pstickne> 'static' is one of the stupidest things in Java :(
[22:21:48] <cher> ganymede: A subclass constructor always invokes an iterator of a superclass.
[22:22:05] <r0bby> cher: what
[22:22:11] <r0bby> oh
[22:22:13] <pstickne> r0bby: AN ITERATOR!
[22:22:39] <cher> ganymede: s/iterator/constructor/ (*ouch*)
[22:22:45] *** fridim_ has quit IRC
[22:22:58] <r0bby> you got your wirtes crossed
[22:23:07] * r0bby hugs cher
[22:23:08] <cher> Yep I got :(
[22:23:22] * r0bby resists the cher joke
[22:23:22] *** fridim_ has joined ##java
[22:23:31] <r0bby> I know it's old and used...kinda liek cher :(
[22:23:46] <nmatrix9> anyone know the technique of declaring base href value with basePath in a jspx document or know of a example?
[22:24:48] <cher> r0bby: Ha, yep. Even botox, plastic and silicon can't cover everything.
[22:26:05] <cher> taruti: If you got an iterator and want to iterate, you might try to get an iterable instead. That's nicer than using that IteratorIterable. The IteratorIterable basically is only a workaround for situations where an Iterable is not available in the first place.
[22:27:39] <ganymede> cher, so if there are no non-private constructors, i can't subclass it?
[22:27:53] *** RLa has quit IRC
[22:28:06] <cher> ganymede: Yes, your conclusion is correct :)
[22:28:31] <taruti> hmm. I can wrap the iterator where it is generated and then just pass the Iterable around. That looks like a good solution.
[22:29:36] <cher> taruti: If the iterator is generated in your code on an instance, it would be best to make the class implement Iterable and rename the method that returns the iterator, then you can iterate over the instance directly.
[22:29:43] *** Copter has quit IRC
[22:30:27] <cher> taruti: Like class MyClass implements Iterable { public Iterator iterator() { return theIterator; }} (creating theIterator there, iterator() should be invokable multiple times, thus create a new Iterator on each invocation).
[22:31:34] <taruti> it is generated by third-party code, so I need to perform the wrapping. But I can limit it to just one place.
[22:31:52] <lvh> Is setting something to a default value considered acceptable for a setter if you pass it null? Obviously this would be documented.
[22:31:58] *** tieTYT3 has quit IRC
[22:32:31] <lvh> It sounds like a bad idea, but otoh it makes a lot of code nice, since it means you can pass nulls to my constructor and you still get a sensible object out of it.
[22:32:34] <r0bby> lvh: I'd throw an IllegalArgumentException
[22:34:15] <cher> lvh: I'd throw an IllegalArgumentException or a NullPointerException, depending on what fits the situation better. Imo lenient usage and passing around of null is very error prone and thus deprecated. Thus I try to avoid null if possible, only use it where it really makes sense and the semantics of null are what really is desired in the particular use case.
[22:36:16] <taruti> thanks for all the help.
[22:38:15] *** nmatrix9 has quit IRC
[22:38:59] <svm_invictvs> ~csi is <reply>(Rotate.|Enhance.|Magnify.)
[22:39:00] <javabot> Okay, svm_invictvs.
[22:39:02] <svm_invictvs> ~csi
[22:39:02] <javabot> Magnify.
[22:39:04] <svm_invictvs> ~csi
[22:39:04] <javabot> Rotate.
[22:39:07] <svm_invictvs> lol
[22:40:34] <svm_invictvs> imo, I think NullPointerExceptions should only be thrown the JVM
[22:42:48] *** Inc` has quit IRC
[22:43:06] *** vix85 has quit IRC
[22:43:09] *** aleksei has quit IRC
[22:43:34] *** BigAllan has joined ##java
[22:44:25] *** vix85 has joined ##java
[22:45:59] *** Sikul has joined ##java
[22:46:32] *** ganymede has quit IRC
[22:47:39] *** taruti has left ##java
[22:47:53] *** Inc` has joined ##java
[22:53:27] *** zophy has quit IRC
[22:54:43] *** staar2 has quit IRC
[22:54:48] *** Zvpun has joined ##java
[22:56:46] *** zophy has joined ##java
[22:57:47] <Zvpun> I have a sequence of actions to performe, in the middle of which I want the user to double click. I am not sure whats the proper way to do that. action1(); waitForDClick(); action2(); How can I wait for the double click? I dont want to add action2() to the event handling of doubleClick unless you are realy sure thats the right way to do. I need some experience please.
[22:58:07] *** musically_ut has quit IRC
[22:58:50] <r0bby> Zvpun: implement a wizard like system.
[22:58:59] <r0bby> it's not entirely impossible.
[22:59:24] *** IppatsuMan has quit IRC
[22:59:29] <Zvpun> r0bby: wizard?
[22:59:33] *** azathoth99 has joined ##java
[22:59:38] <azathoth99> hi
[22:59:52] <ldam> Zvpun, use some kind of state where in the process the user is. In state X only accept actions for state X; in action x, set next state y. whatever
[23:00:20] <azathoth99> hi guys what are some good online resources for learning java?
[23:00:22] *** IppatsuMan has joined ##java
[23:00:27] *** J0bk has joined ##java
[23:00:29] <Zvpun> ldam: yes I was thinking about states but that would put action2 into the event handler which I want to avoid (imho)
[23:00:47] <Zvpun> azathoth99: pick a set of programming task/challenges and try to solve them
[23:01:04] <Zvpun> azathoth99: reading a book helps but solving problems helps much more.
[23:02:30] <azathoth99> ok I would like to implement a site using www.prevayler.org
[23:02:38] *** hyppias has joined ##java
[23:02:43] <azathoth99> randomly picked site theme: dating
[23:02:56] <azathoth99> I know linux
[23:03:02] <azathoth99> I dont know programming beyond bash
[23:03:51] *** jex_ has joined ##java
[23:04:55] <mirari> azathoth99: You should also look into the basic principles behind object oriented programming
[23:07:41] *** JohnBat26 has quit IRC
[23:09:53] *** zophy has quit IRC
[23:11:08] *** Nikty has joined ##java
[23:11:16] *** zophy has joined ##java
[23:11:22] *** dmlloyd_ has joined ##java
[23:11:31] *** Nikty has left ##java
[23:13:49] *** Woflborg has joined ##java
[23:15:03] *** vix85 has quit IRC
[23:16:18] *** daxton has joined ##java
[23:20:14] *** staykov has joined ##java
[23:23:10] *** FireSlash has joined ##java
[23:26:02] *** hyppias has quit IRC
[23:26:20] *** dmlloyd has quit IRC
[23:29:12] *** stringCheese has joined ##java
[23:30:07] <stringCheese> Is there any way to pass an args[] arguement arrays to a method?
[23:30:39] <r0bby> yes
[23:30:41] <svm_invictvs> Zvpun: I believe there's a safe way to make a blocking call from within an event handler.
[23:30:55] <r0bby> pass a String[] in your main method.
[23:31:08] *** dmlloyd_ has quit IRC
[23:31:09] *** nmatrix9 has joined ##java
[23:31:19] <r0bby> stringCheese: you'd pass along the args array from main()
[23:31:36] <r0bby> optionally you can use varargs
[23:31:38] <r0bby> ~varargs
[23:31:39] <javabot> r0bby, varargs is http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html
[23:31:40] <stringCheese> r0bby: wouldn't that make a copy of the arry?
[23:31:53] *** claudio_ch has quit IRC
[23:31:54] <r0bby> why does this matter?
[23:32:06] <stringCheese> just trying to be as efficient as possible
[23:32:10] <r0bby> stop
[23:32:25] <r0bby> if problems come up, use a profiler
[23:32:39] <r0bby> profilers are a lot better than you are
[23:33:03] <r0bby> what you're doing is called premature optimization and it's a bad thing unless you know what you're doing.
[23:33:19] <stringCheese> alright thanks, we'll see how this goes
[23:34:30] <Tarantulafudge> Anyone here have any experience setting up SMS/MMS messaging systems?
[23:36:18] *** Copter has joined ##java
[23:40:28] <pstickne> r0bby: but profiling can be the win! :p
[23:41:10] <pstickne> stringCheese: very premature optimization too, that's not even at the algo level :(
[23:45:31] *** bitshuffler has quit IRC
[23:47:05] <reisi> Tarantulafudge: i've got some experience
[23:48:47] <reisi> Tarantulafudge: like 20k lines :)
[23:54:53] <systat> lol
[23:54:56] <systat> 20K
[23:55:02] <systat> What was that?
[23:57:26] *** _josh has joined ##java
[23:58:00] *** vonZeppelin has joined ##java
[23:58:12] <_josh> Is there a way to sort a Java list by a different key than the default? It's doable in Python: sorted(list, key=some_other_key)
[23:59:10] <benJIman> _josh: What do you mean by the key? A field on the objects contained in the list?
[23:59:13] <_josh> I would like to sort a list by two different ways in two different cases.
[23:59:17] <_josh> benJIman: yes
[23:59:21] <reisi> systat: 00:35 < Tarantulafudge> Anyone here have any experience setting up SMS/MMS messaging systems?
[23:59:26] <benJIman> You can use Collections.sort(collection,new Comparator<T>() { ...
[23:59:42] <systat> reisi???
top

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