logs | stats
   March 4, 2010  
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 | 29 | 30 | 31

[00:01:01] <sebrock> Got a question here: I have a HashMap<Long, String> from which I create a Set like so: Set<Map.Entry<Long, String>>  e = m.entrySet(). Now "e" will be something that implements both Set and Map.Entry. But exactly what? Where are the methods assigned to e implemented?
[00:02:06] *** olabaz has joined ##java
[00:03:11] * b0r3d 's mind crashes
[00:03:41] *** Rayne has quit IRC
[00:03:43] <olabaz> hey, I was reading this: http://www.yoda.arachsys.com/java/passing.html about passing by reference and value in java, and it says objects are not passed at all but a reference to the object. what is a reference to an object?
[00:03:59] *** marcosRz has quit IRC
[00:04:25] <b0r3d> probably its jvm address?
[00:04:42] <cheeser> sort of, yeah.
[00:04:52] <olabaz> so like a pointer?
[00:05:11] <Hyppias> olabaz: Like if you want to have a friend stay at your house, you don't give him your house, but only tell him where the house is
[00:05:24] <cheeser> it's a value in memory that stores the location of the actual object.  so you have multiple references (each with their own memory usage) pointing at one object.
[00:05:57] *** Tac has joined ##java
[00:06:32] *** faffi has joined ##java
[00:06:33] <olabaz> I thought there were no pointers in java
[00:06:53] <faffi> can you have a buttongorup of buttongroups..? I have 2 checkboxes and a radio button which are mutually exclusive to each other
[00:07:07] <hiredman> that sounds like form fail
[00:07:22] <hiredman> olabaz: "like a pointer"
[00:07:24] <Hyppias> olabaz: there are no pointers like in c: you can do no arithemetic with refs
[00:07:35] <faffi> I dont think the question is phrased the correct way but I need either/both checkbox to be selected or the radio button
[00:07:35] *** Superbest has quit IRC
[00:07:54] *** exbio has joined ##java
[00:08:34] <hiredman> faffi: really it sounds like a horrible thing to inflict on the people who will be filling it out
[00:08:52] <faffi> haha
[00:08:54] <olabaz> ok, thanks
[00:09:21] *** amacleod has quit IRC
[00:09:50] *** Hyppias has quit IRC
[00:11:52] *** marcosRz has joined ##java
[00:11:57] *** sebrock has left ##java
[00:12:17] *** adaro has quit IRC
[00:12:36] *** albacker has quit IRC
[00:13:01] *** ojacobson has joined ##java
[00:14:08] <b0r3d> olabaz, iirc, a pointer is a memory value where the value is equal to a memory address ..
[00:14:16] *** alkos333 has joined ##java
[00:14:53] <mapreduce> Conceptually, yes.  Practically, it identifies a memory address.
[00:14:54] *** sebersole has quit IRC
[00:15:45] *** Deeewayne has quit IRC
[00:16:21] <b0r3d> mapreduce, isn't it the same?
[00:16:43] <b0r3d> a pointer points to a memory address ~
[00:16:59] <Will123456> hey guys. i'm writing a simple-ish 2D physics engine, nothing fancy. should my object's x and y coords be stored as floats or doubles? is the increased accuracy of the double *really* that much more useful for the application?
[00:17:25] <ojacobson> Will123456: wrong question
[00:17:25] <mapreduce> b0r3d: No, a pointer identifies a memory address.
[00:17:33] <ojacobson> Is the *reduced* precision of a float going to win you anything?
[00:17:44] <mapreduce> b0r3d: E.g., virtual memory prevents it from being a 'real' RAM address.
[00:18:05] <Will123456> ojacobson: only if it's faster. i'm looking up some speed comparisons but er
[00:18:12] <mapreduce> b0r3d: There are compressed references for 64-bit machines too, etc.
[00:18:14] <ojacobson> Will123456: consider that the x87 FPU uses basically the same hardware either way.
[00:18:25] <Will123456> ojacobson: so it doesn't make a difference?
[00:18:44] <ojacobson> For the vast majority of apps, no, it just gets you bigger error bars.
[00:18:49] <ojacobson> Measure and see, obviously.
[00:18:58] <Will123456> yeah.
[00:19:20] <ojacobson> In particular measure the ops your simulation actually performs, not the ones some guy on the internet microbenchmarked. Then at least they're *your* lies. :)
[00:19:22] *** ninan has quit IRC
[00:19:48] <Will123456> the only other pro for using floats is if i were to use openCL (not necessarily a pipedream in this instance), floats might be easier. er, although i haven't checked to see if openCL/GPU handles doubles just as well
[00:20:06] <b0r3d> mapreduce, ok .. it identifies not points to if you say so
[00:20:32] <b0r3d> mapreduce, but it'd still have a virtual memory address no?
[00:20:39] <Will123456> thanks for your advice ojacobson: i'll go with doubles then downgrade if necessary :P
[00:20:49] *** Mavrik- has quit IRC
[00:21:08] *** chaz has quit IRC
[00:21:46] *** josemoreira has quit IRC
[00:22:29] <b0r3d> "<@cheeser> it's a value in memory that stores the location of the actual object." <-- is it jvm address?
[00:22:37] *** outoftime has quit IRC
[00:23:05] <b0r3d> and jvm address != virtual memory address != physical address ?
[00:23:33] <ojacobson> b0r3d: the contents of a Java reference value are completely undefined anywhere.
[00:23:40] <ojacobson> Other than inside the VM source code, obviously.
[00:23:43] *** okae has quit IRC
[00:23:52] *** milosz_ has quit IRC
[00:23:55] <ojacobson> Nothing stops a VM from implementing them as C-language pointers.
[00:24:08] <ojacobson> Or indexes into a lookup table.
[00:24:14] <b0r3d> but hashCode would still give you that address no?
[00:24:17] <ojacobson> no.
[00:24:23] <SeriousWorm> or white sheep arranged in a special way on a plain? :D
[00:24:23] <b0r3d> ok ~
[00:24:51] <ojacobson> The relationship between what hashCode and identityHashCode return and an object's physical location and the actual implementation of java references is ALSO undefined
[00:25:01] *** geri has quit IRC
[00:25:02] *** maxorator has joined ##java
[00:25:09] <ojacobson> and should be treated as purely coincidental
[00:25:20] *** rdg has quit IRC
[00:25:49] *** marcosRz has quit IRC
[00:26:13] <dmlloyd> b0r3d: consider a 64-bit VM.  Pointers to objects are normally 64 bits in this case.  But hashCode is only 32-bit.  So..............
[00:26:17] <dmlloyd> (draw the conclusion)
[00:26:51] <bobbytek2> so what happens!
[00:26:59] <bobbytek2> to be continued...
[00:27:53] *** genesiss has quit IRC
[00:27:58] <Will123456> is java3D some sort of seperate "implementation" other than the core java-ness? and is support by various VMs spotty? or was that just the case in 2000 (where i'm getting this info from)
[00:28:33] <ojacobson> Ew, don't use Java3D, it's too high-level to be useful unless your app happens to exactly fit its world view
[00:28:47] *** SJrX has joined ##java
[00:29:04] <ojacobson> (It's not just a 3D library, it's a full blown scene graph and event handling lib on par with Swing but built on OpenGL instead of a 2D framework.)
[00:29:53] <Will123456> ojacobson: all i want it for is the vecmath classes, namely vector2D and point2D. the less of that stuff i have to deal with the better :P
[00:30:16] *** Athenon has quit IRC
[00:30:31] <ojacobson> Well, you'll still end up needing to distribute java3d's native half with your app even if you only use those
[00:30:32] *** v0n has quit IRC
[00:30:45] *** Gracenotes has quit IRC
[00:31:12] *** jivedude has quit IRC
[00:31:39] <Will123456> really? that doesn't sound good
[00:32:22] <Will123456> the only reason i wanted it was to avoid all the vector dot product stuff. maybe i can just extract the relevent code i need
[00:32:41] *** tolland has joined ##java
[00:32:45] <ojacobson> dot product is a two-line loop. :)
[00:33:17] <Will123456> i'm looking at the function now and it seems pretty simple, yeah
[00:33:18] *** getBoa has joined ##java
[00:33:33] <Will123456> funnily enough the 2D physics websites never ever seem to mention that :P
[00:33:37] <ojacobson> Any intro linalg course will cover dot and cross products and vector normalization in the first month
[00:33:43] <Will123456> why sum it up in a line of code when you could use 10 complex equations :P
[00:34:36] <ojacobson> You can't write proofs about code as easily
[00:34:37] <Will123456> ojacobson: yeah, it looks like i might have to get my hands dirty and actually learn it
[00:34:52] *** psst has quit IRC
[00:34:57] <ojacobson> also, va dot vb = cos(theta) * |va| * |vb| is really not that hard
[00:35:37] <SeriousWorm> also you can express cos as a taylor line
[00:35:41] <ojacobson> there's a proof around that that boils down to va dot vb = sigma (va_i * vb_i)
[00:35:43] <b0r3d> i dont seem to remember any of this anymore
[00:35:43] <b0r3d> hehe
[00:35:54] <SeriousWorm> taylor series*
[00:36:04] *** tauren has quit IRC
[00:36:12] <Will123456> you lost me at "cos" :P i pretty much had to wing my maths GCSE due to an unfortunately terrifying maths class and a very diminutive teacher
[00:36:13] <b0r3d> taylor series estimates tan(x)
[00:36:15] *** Razec has joined ##java
[00:36:17] <ojacobson> !
[00:36:18] <ojacobson> jesus
[00:36:28] <ojacobson> SeriousWorm: are you sure you mean taylor series and not summation? Not every summation is a taylor series.
[00:36:45] *** chaz has joined ##java
[00:36:45] *** getBoa has quit IRC
[00:36:47] <ojacobson> In particular for vectors with finite numbers of bases, the summation form of the dot product only has finitely many terms
[00:36:58] *** mreggen has joined ##java
[00:37:08] <SeriousWorm> ojacobson: right. i meant the finitely many (first couple of) terms
[00:37:26] <SeriousWorm> i just hope i'm not in #math instead of ##java :D
[00:37:34] <ojacobson> (The nice thing about that summation form is that it's trivial to implement in code)
[00:37:42] <ojacobson> (And, you can use it to determine the angle between two vectors)
[00:38:22] <b0r3d> it can also probably be pipelined ~
[00:39:06] *** josemoreira has joined ##java
[00:39:11] *** Segnale007 has joined ##java
[00:39:14] <ojacobson> (b0r3d: taylor serieses estimate any random differentiable function.)
[00:39:38] *** marcosRz has joined ##java
[00:39:45] <ojacobson> (There's one for cos or sin, and you can pick a fixed number of terms and implement that in hardware to implement cos in your FPU and get reasonable performance + precision)
[00:40:08] <b0r3d> i only remember we calculated PI using taylor series? by estimating arctan(x) or the like
[00:40:23] <Will123456> whenever i read conversations like this and think about the fact that i'm a programmer with literally no grasp of maths i think thank god for web design
[00:40:43] *** SEcki has quit IRC
[00:40:57] <ojacobson> Will123456: none of this is hard maths. It's just unfamiliar jargon to you. :)
[00:41:10] <SeriousWorm> iirc, sin(x) is like 1 + x^2/2 + x^4/4 etc.
[00:41:11] <SeriousWorm> or similar
[00:41:13] <surial> Will123456: Draw a circle of radius 1 around the (0, 0) coordinate.
[00:41:15] <b0r3d> i happen to hate anythign to do with web design :P
[00:41:20] <mapreduce> And when I see programmers unable to cope with simple maths, I am thankful that web design is becoming easier for non-techies, so that web designers can go back to flipping burgers.
[00:41:32] <ojacobson> mapreduce: When's your interview, anyways?
[00:41:40] <surial> Will123456: Now draw a line at angle X. through (0, 0). It'll have to cross that circle somewhat, let's say at coordinate (A,B). sin 30 = B. cos 30 = A.
[00:41:42] <surial> That's what sin and cos are.
[00:41:58] <b0r3d> ojacobson, were I right about PI?
[00:41:59] <mapreduce> ojacobson: I don't have any upcoming.
[00:42:07] <ojacobson> b0r3d: probably
[00:42:22] <b0r3d> true, my memory can't fail me
[00:42:26] <Will123456> surial: ah right. i'll have to remember that
[00:42:37] <Will123456> i'll go down to the local library in a few days and get a GCSE maths book out :P
[00:42:39] *** teralaser has quit IRC
[00:42:39] <SeriousWorm> http://upload.wikimedia.org/math/2/9/c/29cb648e96291f52707c7225630c1a17.png
[00:42:42] * b0r3d used to score high in math courses
[00:42:50] <surial> Well, you might as well just run sin X through a calculator normally. That explaining is so you can grok what sin and cos *represent*.
[00:42:51] * bobbytek2 loves math
[00:42:59] * bobbytek2 loves it loves it
[00:43:01] <SeriousWorm> sin(x) is approx. x - x^3/3! + x^5/5! (that's enough precision)
[00:43:06] <Will123456> yeah
[00:43:12] <b0r3d> looks familiar :D
[00:43:22] <surial> SeriousWorm: No.
[00:43:26] <surial> SeriousWorm: That's only true if x is small.
[00:43:35] <SeriousWorm> surial: so you need the x^7/7! term too?
[00:43:36] <surial> sin(2*PI*1000000000000000000000) = 0.
[00:43:44] <ojacobson> You can take advantage of sin's periodicity to move large values of x in sin(x) closer to 0
[00:43:45] <surial> I'm fairly sure plugging that number into your formula isn't anywhere near 0.
[00:43:49] *** exobyte has joined ##java
[00:44:01] <ojacobson> SeriousWorm: if x is arbitrarily large, you need arbitrarily many terms
[00:44:02] <SeriousWorm> surial: we're talking about high performance real time 3d graphics routines here.
[00:44:03] <SeriousWorm> :D
[00:44:06] <surial> *AFTER* normalizing to the -pi to +pi range, that formula is fantastic.
[00:44:10] <surial> and normalizing is cheap.
[00:44:17] <SeriousWorm> ok, right.
[00:44:31] <exobyte> is the general idea behind input streams and sockets that you can begin processing the data before they're all back from the server?
[00:44:40] <surial> exobyte: Not just that.
[00:44:41] <mapreduce> In 1860 the state of Iowa attempted to pass a bill making pi equal to 3.
[00:44:49] <SeriousWorm> lol.
[00:44:51] <surial> exobyte: Also to process stuff of arbitrary size, including of sizes that would not even fit in memory.
[00:44:58] <exobyte> surial: ahh
[00:45:11] <surial> exobyte: So it's BOTH to start before the full data has been sent, AND to process gigantic pieces of data that would never fit in memory as a whole.
[00:45:20] <ojacobson> Will123456: now look what you did
[00:45:30] <exobyte> surial:
[00:45:37] <surial> For example, if you read a 2 TB file and tried to zip it via java's ZipOutputStream.. it would just work. Even on a machine with significantlyl ess than 2TB memory.
[00:45:41] <exobyte> surial: I should probably take adcantage of this...
[00:45:41] <Will123456> ojacobson: :P not my fault. i know nothing!
[00:45:50] <SeriousWorm> i wonder how much.. damn, i gotta test this.. (how much taylor sum approximation is faster than Math.sin(x))
[00:46:03] * SeriousWorm is gonna test it now even though SeriousWorm has to go to sleep
[00:46:08] *** DirtyD has left ##java
[00:46:13] <surial> exobyte: Depends. If the connection has high bandwidth and the total data load multiplied by the concurrency is less than about 1GB, don't bother.
[00:46:14] <exobyte> surial: I forgot about large data, but it makes sense to handle them that way
[00:46:15] * SeriousWorm has a uni class in 7 hours..
[00:46:34] <bobbytek2> taylor sums, ah yes, the good days
[00:46:40] <exobyte> surial: it's XML parsing, if that helps
[00:46:41] <surial> SeriousWorm: Don't let your education get in the way of learning something.
[00:46:49] <SeriousWorm> surial: thanks:)
[00:46:53] <surial> exobyte: You're parsing XML yourself? Oh, lord.
[00:46:55] <exobyte> surial: probably up to 100k of it
[00:46:59] <surial> ~~ exobyte xml parsing
[00:46:59] <javabot> exobyte, xml parsing is best accomplished with one of - XOM @ http://www.xom.nu/ - JAXB @ http://java.sun.com/xml/jaxb/ - JDOM @ http://www.jdom.org/ - mox @ http://bit.ly/6Z15WF - JAXP (including StAX as well as the legacy SAX and DOM) @ https://jaxp.dev.java.net/
[00:47:00] <exobyte> surial: fuck no
[00:47:02] <SeriousWorm> don't worry i live 5 minutes from college.
[00:47:11] <bobbytek2> heh
[00:47:28] <surial> SeriousWorm: I meant: You'll actually learn something useful by writing a simple test to see which one is faster. Whether or not you're actually going to learn anything at your day at uni tomorrow is debatable.
[00:47:43] <SeriousWorm> surial: yes I understood, I think
[00:47:44] <SeriousWorm> thanks.
[00:47:55] <exobyte> surial: but I can still decide between pipelining it and waiting until the request is complete
[00:48:29] *** Ivellina has quit IRC
[00:49:10] <surial> SeriousWorm: Maybe I'm just really curious to see how much of a difference it makes :P
[00:49:15] <SeriousWorm> :D
[00:49:15] <bobbytek2> exobyte: pipelining?
[00:49:26] <bobbytek2> as in instruction pipelline?
[00:49:34] <surial> bobbytek2: I rather doubt that.
[00:49:37] <SeriousWorm> I'll use a 1 million long double array and Math.random() as source for x.
[00:49:40] <SeriousWorm> for starters.
[00:49:45] *** josh0x0 has quit IRC
[00:49:47] *** Athenon has joined ##java
[00:49:58] <surial> SeriousWorm: Okay, but then add normalizing.
[00:50:17] <exobyte> bobbytek2: using a Stream to process data as they come in is the same concept as instruction pipelining
[00:50:18] <surial> not for Math.sin (or maybe also), but definitely before you stick such a double into the taylor expansion.
[00:50:20] *** styx_ has joined ##java
[00:50:25] *** magn3ts has joined ##java
[00:50:32] <SeriousWorm> surial: hm
[00:50:35] *** SJrX has quit IRC
[00:50:44] <SeriousWorm> pi is 3.14.. Math.random() returns 0-1
[00:50:47] <SeriousWorm> why normalize?
[00:50:50] <exobyte> bobbytek2: and they can both stall
[00:50:57] <surial> SeriousWorm: okay, just do Math.random() * 2*PI - PI.
[00:51:02] <SeriousWorm> ok :)
[00:52:12] *** L-----D has joined ##java
[00:52:15] <exobyte> well this is interesing: we prefix messags with their lengths.  I almost think it's so we can quit reading before we know the connection's closed
[00:52:28] <mapreduce> Half of all doubles are between -1 and 1.
[00:52:50] *** bojo has quit IRC
[00:53:04] <b0r3d> exobyte, if i'm not mistaking in instruction pipelining has to deal with dependencies between the intructions.  Does Stream do this as well?
[00:53:14] <exobyte> mapreduce: is that because the exponent portion is just a signed X-byte int?
[00:53:29] *** nullobj has quit IRC
[00:53:32] <mapreduce> Dunno.
[00:53:48] <SeriousWorm> I'll also precalculate the x's.
[00:53:56] <exobyte> b0r3d: say you have an input stream.  What do you think happens if there's no more data, but they're on their way (disk, network, etc)
[00:54:08] <rawtaz> question: are sessions always started by the servlet container, if there isnt one already for hte client? or is it just started if one manipulates/retrieves the session object?
[00:54:17] <mapreduce> exobyte: It blocks.
[00:54:27] <b0r3d> exobyte, hence no dependency between the data.  the point i'm trying to make
[00:54:31] <exobyte> mapreduce: yes.  Which is the same thing as a stall in the pipeline
[00:54:41] *** cyth has quit IRC
[00:54:43] <exobyte> b0r3d: no...there is dependecny
[00:55:00] <exobyte> b0r3d: the data have to arrive before the stream can output
[00:55:34] <exobyte> with instruction pipelining, the result of an operation needs to be complete before some operation can continue
[00:55:42] <exobyte> same idea
[00:56:09] *** dob1 has joined ##java
[00:56:13] <b0r3d> exobyte, why the data has to arrive before the stream can output?  that's just a waste of time
[00:56:13] *** pgib has quit IRC
[00:56:30] <b0r3d> i think the concept is different than pipelining
[00:56:31] <exobyte> b0r3d: not *all* the data
[00:56:37] <mapreduce> We have a pipeline consisting of a number of threads, mainly one to read images from a stream, one to decode them (via ffmpeg), one to display them, and one to write them to file, the last of which isn't always needed.
[00:56:39] <exobyte> b0r3d: some of them
[00:56:41] <b0r3d> yup, unlike instruction pipelining
[00:56:43] <dob1> hi, sorry for the off-topic, but can i use an lgpl licensed library in a commercial (not open source) application?
[00:56:50] <mapreduce> dob1: Yes.
[00:57:06] <dob1> mapreduce: thanks
[00:57:17] <exobyte> b0r3d: what's unlike instruction pipelining?
[00:57:31] <exobyte> b0r3d: having threads?
[00:57:37] <mapreduce> The original designer expected to have more than one image flowing through this pipeline at a time, but to minimise latency there's only one going through, so the threading seems pointless to me.
[00:57:49] *** lolsuper_ has joined ##java
[00:57:53] <exobyte> b0r3d: what do you call more than one operation executing at the same time?
[00:58:13] <b0r3d> multi processing
[00:58:17] <mapreduce> I'm trying to refactor it in such a way that can make the threading-or-not pluggable, which isn't fun so far.
[00:58:18] <linxeh> heh
[00:58:19] <b0r3d> you need 1+ cores
[00:58:24] <exobyte> b0r3d: no.
[00:58:42] <b0r3d> 2 operations can't execute at the same time on 1 core
[00:58:47] <exobyte> b0nn: no.
[00:58:49] *** BeholdMyGlory has quit IRC
[00:58:49] <linxeh> on some cores they can
[00:58:56] <exobyte> b0r3d: err, you.
[00:59:11] *** bojo has joined ##java
[00:59:19] <SeriousWorm> surial
[00:59:22] <b0r3d> some cores can ~ not all operations
[00:59:26] <SeriousWorm> only 3 times as quick :(
[00:59:35] <b0r3d> it's pseudo parallel
[00:59:39] <exobyte> b0r3d: cores process different code (typically)
[00:59:44] <SeriousWorm> 386ms taylor, 1092ms Math.sin on a 10000000 doubles long array.
[00:59:45] <linxeh> b0r3d: depends on the cores. look at the sparc architecture
[00:59:53] <surial> SeriousWorm: Well, I hadn't really expected that much of a difference.
[00:59:59] <surial> SeriousWorm: CPU these days just isn't the bottleneck anymore.
[01:00:01] <SeriousWorm> http://upload.wikimedia.org/math/2/9/c/29cb648e96291f52707c7225630c1a17.png this is the formula
[01:00:07] <SeriousWorm> lets try removing the final term
[01:00:18] <b0r3d> exobyte, in Stream you don't need to wait at all .. you can directly output on a receipt of a byte
[01:00:21] <surial> It's memory reads, cache misses. One memory read off-cache takes as long as 300+ instructions
[01:00:37] <surial> A far cry from the old days when a memory read took 1 cycle and cache was an archaic name for a register.
[01:00:51] <exobyte> b0r3d: the idea of both streams and instruction pipelining is to try to process the data you already have while something else is getting what you'll need in a minute ready
[01:01:03] <exobyte> b0r3d: what if there aren't any bytes in the stream?
[01:01:10] *** km has joined ##java
[01:01:11] <SeriousWorm> surial: now it's 4 times as fast.
[01:01:31] <SeriousWorm> comparison: 205 vs 324 vs 1060.
[01:01:40] <exobyte> back in the old days, any idiot could pull up the specs for ram and wire it to a microcontroller
[01:01:45] <exobyte> DDR makes this a pain
[01:01:52] <SeriousWorm> heh
[01:02:51] <exobyte> old PC-133 is still my memory of choice if I need to give a microcontroller a lot of memory
[01:03:01] *** BeholdMyGlory has joined ##java
[01:03:10] <exobyte> (or 100.  I'm underclocking it, anyway)
[01:03:36] <SeriousWorm> :)
[01:03:39] <exobyte> b0r3d: moral of my pipelining thing: you'll find similar approaches to different things troughough computing.
[01:03:47] <b0r3d> exobyte, in intruction pipelining sometimes you can't process the data until another portion arrives .. in Stream you can directly process it .. depending on the data
[01:04:00] <exobyte> b0r3d: NOT IF IT'S NOT THERE
[01:04:20] <b0r3d> if it's there. still there's a differnece
[01:04:47] <exobyte> b0r3d: read() blocks, you knopw
[01:04:53] <exobyte> *know
[01:04:57] <SeriousWorm> surial: here's the source. http://pastebin.ca/1822054
[01:05:23] <exobyte> b0r3d: blocking is analogous to a pipeline stall
[01:05:34] <SeriousWorm> it's very quick and dirty, I just spotted a few nonsenses.
[01:06:26] <SeriousWorm> LOL i did a Math.sin on the input.
[01:06:30] <b0r3d> exobyte, i think i made the difference clear
[01:07:01] <SeriousWorm> everything's 4 times as fast now that I removed the Math.sin on the input..
[01:07:07] <surial> SeriousWorm: cool. By the way, normalizing: double normalized = (original + Math.PI) % (2*Math.PI) + Math.PI;
[01:07:12] <SeriousWorm> ok, thanks
[01:07:30] *** pstickne has quit IRC
[01:07:55] <SeriousWorm> surial: updated. http://pastebin.ca/1822060
[01:08:02] <surial> I didn't test that. Unit testing it isn't difficult - just generate a bunch of arbitrary doubles and calculate the sin of the original as well as the normalized. Should be equal.
[01:08:36] <SeriousWorm> surial: nevermind the "4 times as fast comment", I commented the input array x assignment so everything was being calculated using 0 as input.
[01:08:48] <surial> whoops.
[01:08:55] <exobyte> b0r3d: I'd say the difference is that a pipeline *might* execute unrelated code.
[01:08:57] <SeriousWorm> the updated code is fixed though. everything works as before.
[01:08:59] *** joet3ch has joined ##java
[01:09:02] *** meo has quit IRC
[01:09:18] <surial> SeriousWorm: So what's the speed diff with real values?
[01:09:26] <SeriousWorm> 205 / 413 / 1535
[01:09:42] <surial> Your code contains a bug-ish concept.
[01:10:06] <surial> double x = -Math.PI + (Math.random() * Math.PI * 2);
[01:10:06] <surial> try that.
[01:10:13] <SeriousWorm> well, you gave me the formula. :)
[01:10:46] <SeriousWorm> it shouldn't really matter - the output might be more accurate but I'm not testing for that yet.
[01:10:54] <surial> SeriousWorm: That was different.
[01:11:04] <SeriousWorm> 205 / 324 / 1550
[01:11:07] *** mbroeker has quit IRC
[01:11:12] <surial> SeriousWorm: sin and cos are cyclical; if cos(X) = Y, then cos(X+C*2*PI) is also Y, no matter what C is.
[01:11:19] <surial> (well, as long as its integral)
[01:12:21] <surial> So, SIN(20000000000000000), which the taylor expansion is going to horribly suck at, as it's very far removed from 0, is actually the same as SIN(normalize(2000000000000000000)). With normalize given by that formula (in+Math.PI) %(2*Math.PI)-Math.PI;
[01:12:28] <surial> possibly switch the + and - around.
[01:12:46] *** styx_ has quit IRC
[01:13:01] *** alkos333 has quit IRC
[01:13:07] *** nullobj has joined ##java
[01:13:37] *** Pirate_Hunter has quit IRC
[01:15:11] *** pstickne has joined ##java
[01:16:29] *** r1nu- has quit IRC
[01:18:22] *** nullobj has quit IRC
[01:19:05] *** rook2pawn has joined ##java
[01:19:39] *** b0r3d has quit IRC
[01:22:49] *** tauren has joined ##java
[01:25:11] *** jonkri has quit IRC
[01:26:57] *** shamelessn00b has left ##java
[01:27:29] *** antiPoP has joined ##java
[01:28:01] <antiPoP> Hi, is there some set implementation that aloows to search bot by key or by value?
[01:28:20] <antiPoP> or somthing even is not a set implementation?
[01:28:20] *** bojo has quit IRC
[01:28:38] *** tauren has quit IRC
[01:29:26] *** bojo has joined ##java
[01:31:19] <Resistance> a set is a collection of values, not key-value pairs. do you mean bi-directional map?
[01:31:45] *** Ilod has quit IRC
[01:33:44] *** rburton- has joined ##java
[01:33:45] <antiPoP> Resistance yes
[01:33:48] <antiPoP> I meant a map
[01:34:00] <surial> ~~ antiPoP googlecollections
[01:34:01] <javabot> antiPoP, googlecollections is http://code.google.com/p/google-collections/
[01:34:05] <surial> That contains a BiMap.
[01:34:09] *** pstickne has quit IRC
[01:34:21] *** LordQuackstar has joined ##java
[01:34:54] <antiPoP> thanks, abd there is something in sun api?
[01:36:31] *** Rivenge has joined ##java
[01:36:38] <LordQuackstar> Currently I'm looking through guides on Java scripting (JSR223) , but I can't seem to find an answer to this anywhere: Is it possible in the JS engine to use annotations?
[01:37:01] <antiPoP> http://google-collections.googlecode.com/svn/trunk/javadoc/index.html?com/google/common/collect/BiMap.html <- interesting, although I cant find how to make a search by value
[01:37:09] <antiPoP> seem you have to invert the map
[01:37:59] <Rivenge> Hey does anyone have one of those links on "How to ask a question"....Someone had referred me to one a loooong time ago and now I can find any. I want to send it to someone that I'm trying to help but can only say it "doesn't work"
[01:38:30] <ojacobson> ~smart questions
[01:38:30] <javabot> you need to ask smart questions to get a smart answer.  see http://www.catb.org/~esr/faqs/smart-questions.html
[01:38:31] *** bojo has quit IRC
[01:38:34] <ojacobson> ~easy to help
[01:38:34] <javabot> Make yourself easy to help and more people will help you. See "~testcase", "~doesn't work", and "~newbie ides" for suggestions.
[01:38:52] <Rivenge> thanks
[01:39:04] <Rivenge> ~doesn't work
[01:39:05] <javabot> Rivenge, doesn't work is useless.  Tell us what it is, what you want it to do, and what it is doing.  Consider putting some code and any errors on a pastebin.  (use ~pastebin for suggestions)
[01:39:24] <antiPoP> ~newbie ides
[01:39:25] <javabot> Newbies shouldn't start with IDEs.  It's important to learn the environment and fundamentals of a language before offloading those to an IDE.  Learn about packages and imports and classpaths.  Learn how to compile and use the JDK tools.  Get some basic grasp of the API layout.  Learn how to do things then switch to an IDE to do them faster.  See http://tinyurl.com/yvks48 and and http://tinyurl.com/2cpn6o for more info.
[01:39:32] *** bojo has joined ##java
[01:39:52] *** gratz|home has quit IRC
[01:40:36] *** karstensrage has quit IRC
[01:41:27] <bobbytek2> i don't buy that factoid, but hey
[01:41:33] *** BeholdMyGlory has quit IRC
[01:41:45] *** [Justice] has quit IRC
[01:42:33] <antiPoP> i also don't
[01:42:56] <antiPoP> wasting hours to just find you mistyped a case is not useful... i think...
[01:43:33] <antiPoP> using an ide will speedup the learnig as you will nothave to care about small mistakes...
[01:43:45] <surial> Joy, SeriousWorm's taylor tester now works properly. For the record, with normalized numbers, the error is ~0.00001
[01:43:52] <surial> even for just 3 term taylor.
[01:43:56] <antiPoP> or at least wating hours trying to decode the avac output
[01:45:28] <bobbytek2> indeed on all accounts
[01:45:38] <surial> The factoid is right... for people who have moved past the very very early beginning stage.
[01:45:46] <bobbytek2> surial: isn't the error greater as the x approaches infinity?
[01:45:51] <surial> But presuming people can just get rolling on classpaths and stuff when "a = 5 + 2;" is confusing to them is stupid.
[01:45:51] *** arnoldito has quit IRC
[01:46:13] <surial> bobbytek2: It is, but sin is cyclical, so you just mod it to 2*PI.
[01:46:17] <SeriousWorm> ok so here it is: http://pastebin.ca/1822102
[01:46:32] <SeriousWorm> it has a nice output. outputs the results every 100 msec (configurable.)
[01:46:36] *** [Justice] has joined ##java
[01:46:50] <bobbytek2> ah, nice
[01:47:54] *** setz has quit IRC
[01:48:07] <surial> I get pretty wildly wrong answers.
[01:48:33] *** setz has joined ##java
[01:48:34] <surial> for x:2.344, for example, I get 3:-1.3600, 4:-1.4372, actual: +0.7155
[01:49:02] <SeriousWorm> umm, yes, I see now.
[01:49:32] <SeriousWorm> it seems like it works up to PI/2
[01:49:38] <SeriousWorm> for example: x:-0.5258083414114045	T3:-0.5019145143410405	T4:-0.5019123095787931	sin:-0.5019123180236679
[01:49:48] <SeriousWorm> but x:-2.515952399444813	T3:-0.7017154582804289	T4:-0.5751000950910563	sin:-0.5856163754805735
[01:50:17] *** juan--d-_-b has joined ##java
[01:50:20] *** bojo has quit IRC
[01:51:18] *** Stephmw has quit IRC
[01:51:40] *** bojo has joined ##java
[01:52:20] *** km has quit IRC
[01:53:34] *** philosophia has joined ##java
[01:53:37] <surial> SeriousWorm: Fixed it for you.
[01:53:42] <surial> In your paste you still had / 3, and not / 6.
[01:53:43] <surial> http://pastebin.ca/1822115
[01:53:58] *** bojo has quit IRC
[01:54:18] *** Segnale007 has quit IRC
[01:54:18] <surial> That one has an error of .05 which is still too large but it's in the ballpark. I also added more iterations, it was running too fast on my system. I'm getting only a very moderate performance increase. 23 for TR3, 40 for TR4, and 58 for Math.sin.
[01:54:35] <SeriousWorm> ok, sorry. in my local source i have / 6
[01:54:48] <surial> also, error.add() returns a *NEW* instance. It should have been called plus, so now I print the actual error, as difference between any two results divided by total iterations.
[01:54:57] *** Razec has quit IRC
[01:55:00] <SeriousWorm> ok, nice
[01:55:32] <SeriousWorm> i'll add the patch to my code :D
[01:55:36] <SeriousWorm> might open up a git as well :D
[01:55:39] <SeriousWorm> repo*
[01:55:41] *** bojo has joined ##java
[01:56:08] *** jonkri has joined ##java
[01:56:29] <surial> a github gist would work for something as simple as this :P
[01:57:44] <SeriousWorm> surial: the error is with large values of x
[01:57:52] <SeriousWorm> i think it could be due to the double precision.
[01:58:07] <SeriousWorm> perhaps when I multiply x to the seventh, it loses precision
[01:58:23] <SeriousWorm> or not. 2 to the seventh is like 128 ..
[01:58:34] *** infi has joined ##java
[01:58:38] *** keks_bla has quit IRC
[01:58:53] <SeriousWorm> pi^7 = 3020.29323 / 5040 .. hm, I don't see a big loss of precision here
[01:59:29] *** bojo has quit IRC
[01:59:45] *** aaronorosen2 has joined ##java
[02:00:01] <SeriousWorm> the error is 7.474430608750462871462217265141865E-9 if I limit the inputs from -PI/10 to PI/10
[02:00:27] *** bojo has joined ##java
[02:00:31] <aaronorosen2> Hello i have a question about this error. integer number too large: 231416828982229. I'm doing if( id = (long)231416828982229) and id is defined as a long. Anyone know why this thinks its an integer?
[02:00:47] <SeriousWorm> you meant id == long ?
[02:01:03] *** pstickne has joined ##java
[02:01:10] *** lolsuper_ has quit IRC
[02:01:12] *** antiPoP has quit IRC
[02:01:36] *** lolsuper_ has joined ##java
[02:01:46] <SeriousWorm> anycase, i'm off to sleep. also: http://pastebin.ca/1822123 have fun :)
[02:02:08] *** b3nn3tt has quit IRC
[02:02:10] <SeriousWorm> (error is only 0.00057... if inputs are -pi/2 to pi/2). night
[02:02:22] *** bojo has quit IRC
[02:02:30] *** L-----D has quit IRC
[02:02:46] *** L-----D has joined ##java
[02:03:36] <surial> SeriousWorm: The error if TR4 is only a tenth of TR3.
[02:03:42] <surial> So I guess that 4th time is pretty important after all.
[02:03:50] <surial> met fair input range is +pi to -pi, to be honest
[02:06:31] *** andy^ has quit IRC
[02:06:48] *** Iszak has joined ##java
[02:07:06] *** murz has joined ##java
[02:07:08] <AMcBain> ah, surial, did you see my final note about the actual cause of the issue?
[02:07:20] <surial> AMcBain: probably not.
[02:07:38] <AMcBain> It was caused by having another project from the same Eclipse workspace on the build path.
[02:07:44] *** robbyoconnor has joined ##java
[02:07:48] <bobbytek2> :(
[02:07:59] <AMcBain> I ended up using addMapping and adding the 4 classes by hand to fix it, so all is well.
[02:08:09] <AMcBain> Thanks for your help
[02:08:33] <bobbytek2> Is AMcBain a simpsons reference?
[02:09:03] *** chad has joined ##java
[02:09:09] <AMcBain> bobbytek2, surprisingly no. That's actually parts of my real name. My alternate nick, Rainier, is a play on my name and the Simpsons reference that could be implied.
[02:10:09] <bobbytek2> AMcBain: Are you the same Rainier of struts2 fame?
[02:10:12] *** tiemonster has joined ##java
[02:10:27] <AMcBain> not that I know of
[02:10:30] <bobbytek2> hehe
[02:10:30] <bobbytek2> k
[02:10:46] <AMcBain> I know nothing about struts2 other than that it may be a web-framework
[02:10:55] <bobbytek2> it may, yes
[02:11:01] <tiemonster> Is there a good beginner's guide for understanding the differences between the dozens of servlets and application servers out there for java?
[02:11:09] <aaronorosen2> SeriousWorm: sorry i mean id is a type long
[02:11:21] * AMcBain suggests ditching J2EE and using something like the Play! framework :)
[02:12:00] <bobbytek2> tiemonster: that kind of talk could start a flame war :)
[02:12:20] <AMcBain> ~webframeworks
[02:12:20] <javabot> AMcBain, I have no idea what webframeworks is.
[02:12:23] <AMcBain> ~web frameworks
[02:12:23] <javabot> Nowadays the popular choices are JSF, Struts, Webwork, Tapestry, Stripes, Wicket, Spring MVC, Grails, Play and RIFE. See http://static.raibledesigns.com/repository/presentations/JavaWebFrameworkSweetSpots.pdf for short introductions to each. Also see http://java-source.net/open-source/web-frameworks for an exhaustive list - or just ask me about a specific one.
[02:12:26] <tiemonster> bobbytek2: let me explain my situation
[02:12:27] *** Fanook|Clone has joined ##java
[02:12:30] *** Fanook|Clone is now known as Fanook
[02:12:35] <AMcBain> ~webframeworks is <see>webframeworks
[02:12:36] <javabot> OK, AMcBain.
[02:12:40] <AMcBain> er, crap
[02:12:44] <rook2pawn> is there such a thing as a json compliant serializer/deserializer? json-lib isnt complete, and jackson is purely sax style :/
[02:12:46] <AMcBain> ~no, webframeworks is <see>web frameworks
[02:12:46] <javabot> OK, AMcBain.
[02:12:57] <Fanook> I almost wonder what it would do with that alias
[02:13:07] <tiemonster> two months into learning java, and need to set up an existing open source java solution
[02:13:15] <AMcBain> Fanook, tell everyone who used it, that it detected a circular ref.
[02:13:21] <AMcBain> unfortunately, they fixed that :P
[02:13:24] <Fanook> oh right, i remember fixing that
[02:14:20] <vinse> rook2pawn: http://www.json.org/java/index.html
[02:14:32] <pstickne> rook2pawn, JSONObject* stuff "worked for me". Doesn't it cover the entirely of JSON, though?
[02:14:40] <tiemonster> bobbytek2: I'm given the option of downloading a bundled solution - with two versions of Tomcat, JBOSS, jetty, or glassfish
[02:14:45] <pstickne> (There are many things not covered in JSON)
[02:14:55] <tiemonster> so... roll a die?
[02:15:16] <bobbytek2> well, iirc, JBOSS uses Tomcat
[02:15:47] <tiemonster> bobbytek2: well they have three different options: JBOSS, Tomcat 5.5 and Tomcat 6
[02:15:53] <AMcBain> hmm, I remember svm_invictvs using a JSON lib that was decent (I think he said)
[02:15:57] <tiemonster> and the others I mentioned
[02:15:58] <AMcBain> but he's away
[02:16:15] <svm_invictvs> gson
[02:16:17] <tiemonster> I went with the default for now, but I'll also be installing other applications down the road
[02:16:27] <svm_invictvs> AMcBain: gson
[02:16:32] <surial> AMcBain: I did see that note :P
[02:16:33] <bobbytek2> well jetty is just a servlet container
[02:16:37] <tiemonster> and wondered what I should stumble along with before I know what I'm doing
[02:16:51] <svm_invictvs> AMcBain: It converts POJOs to JSON effortlessly.
[02:16:55] <bobbytek2> and so is tomcat, but a bit more heavier
[02:16:59] <svm_invictvs> AMcBain: Also....Skaringa
[02:17:02] <AMcBain> svm_invictvs, awesome
[02:17:02] <tiemonster> servlet container < application server ?
[02:17:03] <surial> AMcBain: That's somewhat scary. That's my _actual_ name.
[02:17:06] <bobbytek2> jboss and glassfish have ejb containers
[02:17:17] <surial> AMcBain: But Rainier / AMcBain / simpsons reference - I guess I haven't watched enough SImpsons. I don't get it.
[02:17:18] <svm_invictvs> I can attest to Gson's quality. I Have an app written in it.
[02:17:25] <svm_invictvs> I can't attest to the quality of Skaringa
[02:17:38] <svm_invictvs> BUt, when I ran it through some test cases, it worked quite well.
[02:17:42] *** aaronorosen2 has left ##java
[02:17:43] <tiemonster> bobbytek2: ejb?
[02:17:43] <surial> gson if you need marshalling, mine if you don't.
[02:17:47] <surial> ~json
[02:17:47] <javabot> surial, json is short for JavaScript Object Notation. It's a lightweight data-interchange format, based on a subset of javascript and very popular for webapps. See http://www.json.org/ for an explanation of the format, and http://github.com/rzwitserloot/com.zwitserloot.json for a library to create and parse JSON.
[02:17:51] <surial> I better update that.
[02:17:53] <surial> ~literal json
[02:17:53] <javabot> short for JavaScript Object Notation. It's a lightweight data-interchange format, based on a subset of javascript and very popular for webapps. See http://www.json.org/ for an explanation of the format, and http://github.com/rzwitserloot/com.zwitserloot.json for a library to create and parse JSON.
[02:18:15] <tiemonster> ~ejb
[02:18:16] <javabot> tiemonster, ejb is Enterprise Java Beans. See http://java.sun.com/products/ejb/
[02:18:16] <bobbytek2> tiemonster: business components... enterprise java beans
[02:18:17] <AMcBain> surial, there's a guy on the simpsons, called Rainier Wolfcastle, and he's an actor who plays a Arnold S. type guy in a movie/tv series within the Simpsons (and he's always being chased by communist nazis or something)
[02:18:29] <AMcBain> I don't watch that much Simpsons either, but I know that much at least
[02:18:37] *** hrehf has quit IRC
[02:18:43] <tiemonster> bobbytek2: I'm mildly past Hello World in my coursework ;-)
[02:18:49] <bobbytek2> haha
[02:18:51] *** dasen has quit IRC
[02:18:55] <surial> ~no, json is short for JavaScript Object Notation. It's a lightweight data-interchange format, based on a subset of javascript and very popular for webapps. See http://www.json.org/ for an explanation of the format, and http://bit.ly/afez13 for a library to create and parse JSON, and gson at http://bit.ly/LOCU1 to marshall into/out of objects.
[02:18:55] <javabot> OK, surial.
[02:18:57] <bobbytek2> I would go with jetty then
[02:19:05] <bobbytek2> but what are your requirements?
[02:19:13] <tiemonster> no idea atm
[02:19:34] *** philosophia has quit IRC
[02:19:47] <tiemonster> get this thing working
[02:19:56] <tiemonster> playing around with Liferay
[02:19:59] <bobbytek2> jetty is probably the simplest
[02:20:04] <bobbytek2> ah, liferay is it?
[02:20:05] <tiemonster> eventually I'll be looking at Pentaho
[02:20:09] <bobbytek2> that's a beast
[02:20:15] <bobbytek2> we use both of those
[02:20:25] <tiemonster> and maybe a custom app to do some other things
[02:20:55] <bobbytek2> tiemonster: I'd say look at grails :)
[02:20:58] <rook2pawn> vinse: thanks, the official .java implementation is perfect. unfortunately, i dont think they have a maven repository
[02:21:04] <bobbytek2> There is a liferay plugin
[02:21:11] <tiemonster> ~grails
[02:21:12] <javabot> tiemonster, I have no idea what grails is.
[02:21:14] *** Athenon has quit IRC
[02:21:16] <bobbytek2> And the custom app stuff is a no brainer :)
[02:21:17] <tiemonster> well crap
[02:21:38] <tiemonster> bobbytek2: I may find something else to do "that custom stuff"
[02:21:55] *** Athenon has joined ##java
[02:22:07] <tiemonster> ticket system and query to Excel
[02:22:28] <bobbytek2> sounds pretty intense for university
[02:22:33] <bobbytek2> what's the project?
[02:22:45] <tiemonster> I'm the reporting coordinator
[02:22:54] <tiemonster> I'm moving them away from Access
[02:23:08] <tiemonster> I said, "Hey, I might as well learn java while I'm here"
[02:23:13] <tiemonster> and signed up for a class
[02:24:22] <tiemonster> I have one CentOS server and $0 to work with
[02:24:29] <tiemonster> and all the time in the world
[02:25:09] *** josemoreira has quit IRC
[02:25:29] *** philosophia has joined ##java
[02:26:16] *** lanalyst has joined ##java
[02:27:39] <tiemonster> bobbytek2: is there any fear that java isn't a stable future with the Oracle acquisition?
[02:28:00] <bobbytek2> I would think it will be around for quite some time
[02:28:11] <bobbytek2> there will always be openjdk :)
[02:28:19] <bobbytek2> ... maybe
[02:28:22] <bobbytek2> ;)
[02:28:52] <tiemonster> I hear java is faster than anything I've worked with before
[02:29:08] <tiemonster> But it's hard to believe because I've used a lot of crappy java apps
[02:30:20] <tiemonster> bobbytek2: we've been using Hudson for a couple weeks, and we love it, so java adoption shouldn't be that hard
[02:33:11] <rook2pawn> does anyone have a recommended way to perform the decodeURIComponent in java without the myfaces project?
[02:34:21] *** LouisJB has quit IRC
[02:34:31] <tazle> it would be kind-of nice if remove() of various collections was also generic
[02:34:51] *** karstensrage has joined ##java
[02:36:37] *** freeone3000 has joined ##java
[02:36:38] *** tolland has quit IRC
[02:36:53] *** bn` has quit IRC
[02:36:53] <tiemonster> bobbytek2: thanks for the help. have a good night.
[02:36:57] *** tiemonster has quit IRC
[02:38:17] <surial> rook2pawn: apache commons-lang has it, I'm fairly sure.
[02:39:44] <surial> rook2pawn: Correction! Just use this;
[02:39:50] <surial> ~~ rook2pawn URLEncoder
[02:39:50] <javabot> rook2pawn, I have no idea what URLEncoder is.
[02:39:56] <surial> ~~ rook2pawn javadoc URLEncoder
[02:39:56] <javabot> rook2pawn: http://is.gd/4uRY6 [JDK: java.net.URLEncoder]
[02:40:11] <surial> it is actually equivalent to js's encodeURIComponent.
[02:41:10] <rook2pawn> Yes, i noticed. i had to write my own in perl and found the ruleset to do so
[02:41:41] <surial> This is fantastic. I'm generating a bunch of code off of class files that represent a template, and I just added mixins to this. Annotation Processors are fun.
[02:44:59] *** philosophia has quit IRC
[02:45:50] *** shookees has quit IRC
[02:46:28] *** ojacobson has quit IRC
[02:48:49] *** tauren has joined ##java
[02:50:10] *** dob1 has quit IRC
[02:50:57] *** Fuco has quit IRC
[02:51:42] *** maxorator has quit IRC
[02:52:16] *** ojacobson has joined ##java
[02:54:16] *** alek_b has joined ##java
[03:00:40] *** Sattvic has joined ##java
[03:00:48] *** vulture has quit IRC
[03:00:54] *** Sattvic has left ##java
[03:03:27] *** epalm has joined ##java
[03:04:19] *** bnewton has quit IRC
[03:06:39] *** hcfd has quit IRC
[03:10:29] *** philosophia has joined ##java
[03:10:49] *** jcp has joined ##java
[03:21:21] *** hcfd has joined ##java
[03:22:32] *** SJrX has joined ##java
[03:24:11] *** jerkface03 has joined ##java
[03:27:17] *** bnewton has joined ##java
[03:29:59] *** tissue has joined ##java
[03:30:23] <The_Birdman> ~javadoc JTable
[03:30:24] <javabot> The_Birdman: http://is.gd/4MIYJ [JDK: javax.swing.JTable]
[03:31:13] *** cemerick has joined ##java
[03:33:42] *** cemerick has quit IRC
[03:34:24] *** domX_ has joined ##java
[03:35:17] *** LordQuackstar has quit IRC
[03:35:22] *** Ruum has joined ##java
[03:37:26] *** zapadoejoe has quit IRC
[03:38:57] *** domX has quit IRC
[03:42:06] *** ojacobson has quit IRC
[03:47:09] *** [TechGuy] has quit IRC
[03:48:58] *** androoid has quit IRC
[03:49:42] *** The_Birdman has quit IRC
[03:51:52] *** juan--d-_-b has quit IRC
[03:52:42] *** jonkri has quit IRC
[03:53:40] *** tech_help has joined ##java
[03:56:58] *** Jonty has quit IRC
[04:00:49] *** emit has joined ##java
[04:04:30] *** pastyhermit has joined ##java
[04:05:10] *** Redxross has joined ##java
[04:05:21] <Redxross> ~pastebin
[04:05:22] <javabot> http://pastie.org - Paste the final url after you've pasted your stuff there.
[04:06:01] *** zed_DX has joined ##java
[04:06:06] <pastyhermit> Any tips on finding the source of NullPointer Exceptions?  I have initialized all my variables but get a wierd NullPointerException on a variable that I am not even calling!!!
[04:06:11] *** auntieNeo has joined ##java
[04:06:14] *** L-----D has quit IRC
[04:06:34] <pastyhermit> Im getting a NullPointer exception from some AWT thingy but I am using Swing!
[04:06:35] <pastyhermit> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
[04:06:51] <pastyhermit> I dont have any variables called AWT-EventQueue-0
[04:06:54] <freeone3000> pastyhermit: Well, *something*'s null. What's on the line it points to?
[04:07:06] *** dj_segfault has joined ##java
[04:07:06] <freeone3000> That's the name of the _thread_, not that name of the variable.
[04:07:17] <pastyhermit> Its a simple class I am calling
[04:07:31] <pastyhermit> oh, I didnt ask it for a thread... I asked it to use the class
[04:07:57] <freeone3000> What's the full stack trace?
[04:08:24] <pastyhermit> The line it gives me is a for loop!
[04:09:02] <Redxross> Hi guys.  I don't understand why this switch statement with the corresponding ennum types won't work over the same variable.  Shouldn't only one of these objects be created? Then why do I get a duplicate variable error?  How can I accomplish this effect of using one variable and declare it based upon selection?  Thank you all for your kind help =)
[04:09:10] <Redxross> opps the link is http://pastie.org/852939
[04:09:23] <pastyhermit> http://pastebin.com/Pf4AzK8b
[04:09:31] <surial> Redxross: new SomeEnum()?
[04:09:37] <surial> Redxross: You clearly don't get enums. You can't create them.
[04:09:39] <surial> They just exist.
[04:09:58] <pastyhermit> surial, I can create enums on MySQL or are those different?
[04:10:01] <surial> you don't have to make 61 variables. Also, anytime you have variables with a counter in the name, you fucked up. Use an array already.
[04:10:04] <freeone3000> pastyhermit: What's TME2Question4b.java line 113?
[04:10:17] *** kgrad has joined ##java
[04:10:27] <Redxross> they are all different message data types
[04:10:32] <pastyhermit>     for (int i = 0; i < numPanels; i++) {
[04:10:37] <surial> pastyhermit: Paste your code of TME2Question4b.
[04:10:43] <surial> particularly line 113.
[04:10:54] <surial> pastyhermit: is numPanels an object of type Integer?
[04:11:04] <surial> correction: is numPanels a *variable* of type Integer?
[04:11:14] <Redxross> surial: can u clarify for me what i am missing?
[04:11:25] <freeone3000> Redxross: An *enum* is a type. Individual enum entries are not types.
[04:11:27] <surial> Redxross: Yes. you're using something without knowing the first thing about it.
[04:11:30] <surial> ~~ Redxross enum
[04:11:31] <javabot> Redxross, enum is http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html or http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.9 (JLS 3rd Edition 8.9)
[04:12:03] *** hnr has quit IRC
[04:12:23] *** domX has joined ##java
[04:12:45] <auntieNeo> is it safe to reimplement setSize() in java.awt.Component? I want to listen for resize events from within my new swing component
[04:13:04] *** murz has quit IRC
[04:13:22] <Fanook> why not just register for the already existing event?
[04:13:32] <surial> auntieNeo: Then add a listener, don't override setSize.
[04:13:41] <auntieNeo> alright
[04:13:52] <auntieNeo> am I guaranteed that the event will trigger before this thing re-draws?
[04:14:04] <auntieNeo> I suppose that's all I'm worried about
[04:14:22] <Fanook> you can trigger another repaint if you want
[04:14:30] *** surial has quit IRC
[04:14:44] <auntieNeo> I mean, certainly if my component is resized, it will also be redrawn...
[04:14:44] <Fanook> but I'd expect all of the events to be handled before any repaint actually happens
[04:14:52] <auntieNeo> alright
[04:14:56] <auntieNeo> I'll just... do it
[04:15:13] <Fanook> keep in mind, .repaint() doesn't actually do the painting. it just schedules a "repaint me" event on the EDT
[04:15:14] <pastyhermit> surial numPanels is of type Integer
[04:15:26] *** surial has joined ##java
[04:16:27] <pastyhermit> surial, http://pastebin.com/2t5GSEXV
[04:16:39] *** domX_ has quit IRC
[04:17:00] <auntieNeo> so... it makes sense for me to add my component as a listener for its own events? sounds kind of roundabout to me...
[04:17:18] <surial> pastyhermit: The exception trace you pasted does not match this source file.
[04:17:36] <auntieNeo> heh, I suppose I already have to do that for mouse events. meh
[04:17:37] <Fanook> auntieNeo: as long as your component implements the proper interface, it's perfectly legal
[04:17:38] <pastyhermit> I know I renamed the main class
[04:17:40] <surial> pastyhermit: recompile everything.
[04:17:47] <pastyhermit> Its the file...
[04:17:51] <surial> pastyhermit: line 113 is incapable of generated an NPE.
[04:17:52] *** L-----D has joined ##java
[04:18:03] <pastyhermit> ok I will recompile
[04:18:05] <surial> pastyhermit: and yet it did. meaning, this source file is not the source of whatever classfile generated that NPE.
[04:18:18] <pastyhermit> JAva is broken?
[04:18:27] <pastyhermit> or I broke somethin during runtime
[04:18:30] <Redxross> I messed up the code a litte before, does this help explain what I am trying to do? http://pastie.org/852954
[04:18:40] <Redxross> It should make sense
[04:19:32] <Redxross> or am i still cluless about enum's?
[04:20:12] <pastyhermit> surial, the problem is I have take this pre-done convoluted code that I did not write and put it in my program
[04:20:17] <pastyhermit> Eckel can't write clean code.
[04:20:28] <surial> pastyhermit: Ah, I see. And this is our problem?
[04:20:41] <pastyhermit> no its not 'our' problem
[04:20:48] <pastyhermit> Im just trying to find where the NPE is
[04:20:49] <surial> pastyhermit: Either way, *the stack trace you showed us - CANNOT have come from that source file*.
[04:20:57] <surial> I don't see what kind of further answer you expect from ##java.
[04:21:11] <surial> recompile stuff, rerun, get a proper stacktrace.
[04:21:14] <pastyhermit> surial, how I might find where the NPE is...
[04:21:15] <pastyhermit> k
[04:21:16] <pastyhermit> will do that
[04:21:29] <surial> Redxross: you're still clueless.
[04:21:44] <surial> Redxross: 1) An enum implies there is only one. Of any enum constant, such as ADT_A01, there's exactly 1 instance. Not 0. Not 2. 1.
[04:22:07] <surial> Redxross: And yet you call "new ADT_A01();" beside the fact that 'new' works on types, and enum constants aren't usually types, "new" creates new instances. But there can be only 1.
[04:22:09] *** jcp has quit IRC
[04:22:17] <pastyhermit> Oh you're right
[04:22:19] <pastyhermit> hrm...
[04:22:24] <surial> Redxross: Secondly, you're creating a bunch of numbered constants. This is *RETARDED*. It's so ugly I wanna gouge my eyes out.
[04:22:27] <Redxross> wait
[04:22:29] <pastyhermit> different error when I save the file under a different name and rename the class.
[04:22:37] <Redxross> ADT_A01() happens to be a class
[04:22:42] <Redxross> so does ADT_A02
[04:22:44] <Redxross> ()
[04:22:58] <Redxross> i am trying to instanciate based upon a choice
[04:22:59] <freeone3000> So you named your enum the same thing as your classes. Smart.
[04:23:05] <Redxross> yes
[04:23:08] <auntieNeo> oh this is silly. the resize event doesn't even tell me what the previous size was
[04:23:10] <surial> So you have a class named ADT_A01, *AND* you have an enum with, amongst other things, a constant named ADT_A01?
[04:23:15] <Redxross> yes
[04:23:24] <Redxross> its part of a package
[04:23:24] <surial> Redxross: I'm not going to help you. Because there's a limit to the sheer amount of stupid I can handle.
[04:23:26] <auntieNeo> guess I gotta store it ;/
[04:23:36] <freeone3000> I can handle this! I do PHP.
[04:23:39] <Redxross> k, thanks fo ryour help
[04:23:48] *** rook2pawn has quit IRC
[04:23:52] <freeone3000> Okay. Basically, you'd want to use composition instead of polymorphism in this case.
[04:23:59] <Redxross> yes
[04:24:02] <surial> Redxross: A casual glance seems like this should compile, but the sheer fuckedup-ness of it probably means I'm missing something. Which is proof for why this is fucked up in the first place. I can't see the forest for the trees.
[04:24:04] <freeone3000> This reduces the number of classes you'd have to have.
[04:24:13] <surial> Redxross: You also didn't paste any error, which isn't helping your cause at all.
[04:24:19] <freeone3000> surial: He's not prefixing the enum constants with the enum name, so it's an ambiguous symbol.
[04:24:40] <surial> freeone3000: I don't think that's the probelm. The problem is multiple declarations with name "adt" in the same scope.
[04:24:44] <Redxross> eys
[04:24:46] <Redxross> yes
[04:24:49] <Redxross> thats it
[04:24:57] <pastyhermit> Whats the deal with static vs non static, why does the compiler always bitch about them and then bitch when I put the keyword static infront of a non-static variable in a static context...
[04:24:57] <surial> Redxross: Well, there you go. Don't do that.
[04:25:00] <freeone3000> surial: Which woudl be fixed by prefixing the constants with the enum name.
[04:25:07] <freeone3000> ~~ pastyhermit static
[04:25:08] <javabot> pastyhermit, static is a keyword which indicates that a member is scoped to a class rather than an object instance.  Members of interfaces (except methods) are always static.  Nested interfaces and enums are always static.  See http://tinyurl.com/3q7oc and http://tinyurl.com/34vr3u for more information.
[04:25:13] <surial> pastyhermit: You can't fucking program without understand what the hell you're doing. That's the problem.
[04:25:29] <freeone3000> surial: Heh, tell that to Intro to Web Development.
[04:25:30] <surial> pastyhermit: If static is bothering you, I strongly suggest you try your hand at python or basic first. It's less complicated to get into.
[04:25:43] <surial> freeone3000: No, it wouldn't.
[04:25:44] <pastyhermit> I have to learn JAVA
[04:25:54] <Redxross> i am trying to generate different messages randomly.. those are all message types... so my plan was to randomly pick a enum type and then declare the proper adt
[04:26:04] <pastyhermit> and I have read about static before but I dont understand the concept because its not explained well it seems
[04:26:05] <surial> freeone3000: You still have a bunch of 'int adt = 0;' 'int adt = 1;' in the same block. You can't do that. Yes, different cases, nicely broken out of, in the same switch, are still the same block.
[04:26:11] <pastyhermit> OR IM JUST A FUCKING MORON
[04:26:12] <freeone3000> Redxross: And making 30-odd classes seemed like a good idea?
[04:26:14] <surial> pastyhermit: Then read a little more.
[04:26:17] <surial> pastyhermit: Or that.
[04:26:20] <Redxross> i didn't make the classes
[04:26:25] <surial> pastyhermit: Simple fix: in your public static void main, always do: "new MyClass().start();"
[04:26:28] <Redxross> they are part of this HL7 api
[04:26:31] <Redxross> called Hapi
[04:26:35] <surial> pastyhermit: And other than the 'static' in main, never, ever, use static, until you understand what it does.
[04:26:42] <Redxross> they are all message types
[04:26:50] <surial> pastyhermit: That should keep you going until you've unmoronized enough to understand this admittedly annoyingly complicated concept.
[04:26:53] <pastyhermit> surial, its the only way to get rid of the compiler messages
[04:26:57] <freeone3000> Redxross: Bad spec. Try again. -.-
[04:26:58] <Redxross> there are that many different message types in hl7 which is used in health care
[04:27:04] <surial> Redxross: I'm not the one who decided to use an API written by an idiot.
[04:27:04] <Redxross> i didn't spec it
[04:27:05] <hiredman> surial: itym new MyClass().run();
[04:27:06] *** daya has joined ##java
[04:27:17] <Redxross> its used all over in healthcare
[04:27:18] <pastyhermit> .start() what does that do?
[04:27:18] <surial> hiredman: start(), run(), who gives a flying toss?
[04:27:23] <Redxross> to work with hl7 messages
[04:27:29] <FauxFaux> pastyhermit: It doesn't matter.
[04:27:32] <surial> pastyhermit: Nothing. It's a method you make that's the "real" main.
[04:27:34] <pastyhermit> .run() is for threads
[04:27:39] <hiredman> surial: well .run comes from a useful interface
[04:27:39] <pastyhermit> ahh ok
[04:27:41] <freeone3000> Redxross: Okay. The "fix" is to rename your constants to things that aren't the same as your classes. The REAL fix is to engineer a halfway decent API that reads the spec *and* doesn't require 30-odd classes.
[04:27:47] <freeone3000> Redxross: Whoever wrote that lib was on something.
[04:27:48] <hiredman> pastyhermit: run is from Runnable
[04:28:00] <surial> pastyhermit: main just does that: "new MyClass().start(args);" - NOTHING ELSE. Your start method (which is *NOT* static), is the rea main. If you set it up like that, the only 'static' you need is on your main method, and you don't need to know what it means.
[04:28:09] <Redxross> http://hl7api.sourceforge.net/v25/apidocs/index.html
[04:28:10] <surial> hiredman: You don't understand how this works, do you?
[04:28:12] <Redxross> thats the api
[04:28:18] <freeone3000> Redxross: Right. It's still retarded.
[04:28:19] <Redxross> look at all those classes
[04:28:25] <surial> hiredman: he's a very confused newbie. And now you're naming arbitrary things just to confuse him. Stop it.
[04:28:32] <freeone3000> ...Really. REALLY retarded.
[04:28:33] <hiredman> surial: I'm not actually looking at any code
[04:28:41] <Redxross> but in the hl7 message structure there are that many different types of messages
[04:28:43] <surial> hiredman: Neither am I.
[04:28:51] <surial> ~pastebin
[04:28:52] <javabot> http://mysticpaste.com - Paste the final url after you've pasted your stuff there.
[04:28:55] <pastyhermit> interesting...
[04:28:57] <freeone3000> And why should there be a one-to-one mapping of messages to classes, hmm?
[04:29:01] <pastyhermit> never heard of doing that before...
[04:29:08] <pastyhermit> well never 'read' about it
[04:29:12] <Redxross> because each message type can have different set of fields, each unique
[04:29:32] *** jcp1 has joined ##java
[04:29:44] <freeone3000> As opposed to just having a .get(String) and a .set(String), akin to __get() or __set()
[04:29:45] <surial> pastyhermit: http://mysticpaste.com/view/2056
[04:29:46] <Redxross> freeone3000, but that would work huh?
[04:29:51] <surial> pastyhermit: Start with that for all programs you write from now on.
[04:30:07] <freeone3000> It'd work. My advice is to find whoever wrote this idiot "protocol" and whack him in the head.
[04:30:18] <Redxross> lol i will
[04:30:22] <surial> pastyhermit: You haven't? It's how 90%+ of all main classes are written.
[04:30:41] <pastyhermit> I have seen it in code
[04:30:41] <Redxross> wait, why would calling the enum types something else make a difference?
[04:30:43] <pastyhermit> but never explained
[04:30:51] <pastyhermit> I have only seen it in GUI code
[04:30:57] <Redxross> for duplicate symbol issue for the varialbe adt
[04:31:01] <freeone3000> Redxross: Because ADR_A19 can refer to two things - an enum constant or your class.
[04:31:04] <surial> Redxross: It wouldn't.
[04:31:11] <surial> freeone3000: For fucks sake.
[04:31:16] <FauxFaux> pastyhermit: Do what the man says, he knows what he's talking about, angry and has ops.
[04:31:17] <surial> freeone3000: You're wrong. Whatever you think the problem is, it isn't.
[04:31:25] <Redxross> so what is it?
[04:31:27] <freeone3000> Fine. I'm wrong. What IS the problem, then?
[04:31:30] <pastyhermit> FauxFaux, Im not arguing I want to know why
[04:31:38] *** bnewton has quit IRC
[04:31:41] <surial> freeone3000: Compile this for me: switch (10) { case 0: int x = 10; break; case 1: int x = 20; break; }
[04:31:47] <surial> freeone3000: Once you get the error, I think you'll understand.
[04:32:07] <freeone3000> Oh. Cause x and x are in the same scope, and he needs to call the variables different things.
[04:32:10] <freeone3000> That's silly.
[04:32:12] <surial> bingo.
[04:32:13] <pastyhermit> Problem is programming was a very small part of my degree and most of it was scripting so I got by no problems but was never taught how to program
[04:32:13] <FauxFaux> pastyhermit: You want to know why you should do it the way everyone in the entire world does it?
[04:32:15] <surial> isn't it?
[04:32:21] <pastyhermit> now I have to get into Java and Im fucked.
[04:32:25] <freeone3000> Java scoping is.. different.
[04:32:26] <surial> freeone3000: He's got a bushel of var decls all named "adt".
[04:32:29] <Redxross> but wait
[04:32:32] <pastyhermit> FauxFaux, UES
[04:32:34] <pastyhermit> YES
[04:32:38] <Redxross> the type is not int
[04:32:46] <surial> Redxross: The type is irrelevant.
[04:33:06] <Redxross> so its more like  switch (10) { case 0: string x = "ABC"; break; case 1: int x = 20; break; }
[04:33:09] <freeone3000> an if/else tree wouldn't have this problem because { } restrict the scope.
[04:33:13] <surial> Redxross: The point is, you've got a bunch of variable declarations (a variable declaration looks like "anyType name;", or "anyType name = value;"), all with the same name, all in the same scope (scope = braces. These things: {}).
[04:33:16] <freeone3000> Redxross: Which is STILL invalid, for the same reason.
[04:33:31] <surial> Redxross: As a style issue, you should try writing switches like so...
[04:33:33] <Wolfman2000> Welp...I've taken a look at JavaFX so far. It's looking like a hybrid of Java and PHP right now. I don't know if that's a good thing or not.
[04:33:34] <surial> ~pastebin
[04:33:34] <javabot> http://mysticpaste.com - Paste the final url after you've pasted your stuff there.
[04:33:53] <pastyhermit> PHP rocks
[04:33:54] <pastyhermit> it works...
[04:33:56] <pastyhermit> :)
[04:33:57] <FauxFaux> pastyhermit: "Normally you'd be inside a class instance.  There can't be an instance as the program is starting ('cos nothing's started it yet), so you're in this magic place called static.  surial's code creates an instance and gets you inside it, hence you're back to happy."
[04:34:31] <Redxross> so, then i don't know how to create a instance of a class, randomly
[04:34:32] <surial> Redxross: http://mysticpaste.com/view/2057
[04:34:37] <surial> Write your shit like that, this problem goes away.
[04:34:48] <Redxross> i love u, thank you
[04:34:52] <surial> Redxross: Of course, after the closing brace, the name "adt" ceases to have any meaning.
[04:35:00] <surial> Redxross: So your code snippet as said, doesn't do much and never will.
[04:35:05] <surial> But we'll burn that bridge when we get to it.
[04:35:19] <pastyhermit> Ahh so then everything inside start is inside the 'static paradigm'
[04:35:33] *** nmx has joined ##java
[04:35:39] <surial> pastyhermit: Yes, because adding fucking "paradigm" to any concept made it easier to understand.
[04:35:40] *** jcp1 is now known as jcp
[04:35:42] <freeone3000> It's not a paradigm, darnit.
[04:36:11] <surial> pastyhermit: Static simply means "there is no instance". This is simple to understand, to an expert OO programmer. You aren't one. So, read the fucking docs, and if you don't understand what they means, forget about it, do what I said, and revisit the topic a year later when you're smarter.
[04:36:12] <Redxross> OMG I GET IT
[04:36:22] <Redxross> its because the varaible doesn't exist outside the case scope
[04:36:30] <Redxross> right?
[04:36:34] <pastyhermit> surial, ah I see
[04:36:35] <freeone3000> ...But it does for all the other cases, if you don't brace.
[04:36:41] <pastyhermit> I get no instance
[04:36:53] <freeone3000> If you brace, it doesn't exist for any of the other cases either! Redeclaration problem solved.
[04:36:55] <pastyhermit> if someone put that in the fucking docs then maybe I would have fucking understood it
[04:37:01] <surial> Redxross: Technically? No. But I can easily imagine your understand of the terms you used mean it was true.
[04:37:12] <Redxross> lol, i am trying
[04:37:19] <surial> pastyhermit: I'm fairly sure that's the first thing the docs say.
[04:37:25] <FauxFaux> pastyhermit: Well, it's utter lies, but it's consistent with what you observe.
[04:37:36] <surial> Redxross: I presume you want to do something with your 'adt' after you assign a "new ADT_Axy();" to it?
[04:37:43] <freeone3000> Yep. Says "they belong to a class, not to an instance of the class".
[04:38:04] <Redxross> basically adt.this and that
[04:38:16] <Redxross> because all the fields i work on are the same no matter the message type
[04:38:17] <FauxFaux> freeone3000: *a class in a classloader. ;)
[04:38:22] <pastyhermit> they?
[04:38:36] <freeone3000> FauxFaux: Everything belongs to a class.
[04:38:46] <freeone3000> FauxFaux: Either a class, or an instance of the class, rather.
[04:38:49] <Redxross> so there is no reall way of me doing this
[04:39:06] <freeone3000> Redxross: And here's where polymorphism comes in. If you declare a variable of type Message, what type is it?
[04:39:41] <FauxFaux> freeone3000: Technically, class A { static int b; } b doesn't belong to class A as we'd normally name class A. :P
[04:39:45] <Wolfman2000> pastyhermit: I think I'm finding a problem with javafx. It doesn't want to run on my system. :(
[04:39:57] <Wolfman2000> or at least, the javafx applets
[04:39:58] <pastyhermit> Wolfman2000, use PHP
[04:40:00] <pastyhermit> :)
[04:40:15] <freeone3000> Redxross: Well, it's of type Message, but I have no way of knowing whether or not it declares the methods you want because the docs are down.
[04:40:19] <pastyhermit> Wolfman2000, I cant help you I hardly know what the fuck public static void main() {} is
[04:40:23] <AMcBain> javafx isn't even close to PHP in scope
[04:40:30] <Wolfman2000> pastyhermit: I wanted to see if I could turn my java code into JavaFX. I require interactivity without...well, the user having to reload the webpage
[04:40:57] <pastyhermit> Wolfman2000, yah cant help you sorry
[04:41:03] <freeone3000> Wolfman2000: Most people use flash or javascript for this. They tend to work.
[04:41:20] <AMcBain> JavaScript \o/
[04:41:22] *** hmmmm has joined ##java
[04:41:49] <Wolfman2000> ...javascript...it was suggested I turn my Java code into javascript, but I thought Java would be better.
[04:42:02] <freeone3000> Java applets tend to suck.
[04:42:13] <Wolfman2000> freeone3000: I amde a java application, not an applet
[04:42:14] <pastyhermit> freeone3000, agreed. to slow of a user experience
[04:42:30] <freeone3000> Wolfman2000: Then... what's up with the webpage, then? Applications function independent of the browser.
[04:42:36] <pastyhermit> Wolfman2000, you just loaded it inside an applet container?
[04:42:43] <AMcBain> freeone3000, except for 2 examples: http://games.asobrain.com and Tank Hunter both rock
[04:42:55] <AMcBain> (Tank Hunter isn't related to asobrain)
[04:43:03] <Wolfman2000> freeone3000, pastyhermit: Someone in here yesterday suggested I look into JavaFX as a possibility for bringing a better Java related experience to the end user.
[04:43:12] <freeone3000> ..What does that *mean*?
[04:43:18] <Wolfman2000> I'm merely reporting back that if I can't even view the examples without browser crashing, what good is it?
[04:43:22] <surial> Wolfman2000: That was me.
[04:43:36] <pastyhermit> Wolfman2000, yes I heard its far better
[04:43:41] <surial> Wolfman2000: Look, a direct in-browser experience involving java is always going to suck. Well, unless you count GWT.
[04:43:46] <pastyhermit> like Adobe Flex RIA kind of better
[04:43:50] <surial> Wolfman2000: You'd distro your javafx app via for example webstart.
[04:43:55] *** poseidon has quit IRC
[04:43:57] <pastyhermit> But my understnding is that you will have refactor quite a bit.
[04:43:58] <freeone3000> Which is totally awesome.
[04:44:03] <surial> Wolfman2000: Whatever's causing the crash is likely your browser plugin. Which wouldn't even come into play.
[04:44:21] <Wolfman2000> ...which emans...crap, I need #firefox help
[04:44:47] <pastyhermit> When the browser crashes check the JAvaConsole
[04:44:56] <freeone3000> You say that like it exists.
[04:45:23] <Wolfman2000> pastyhermit: unsure how to do that over here
[04:45:58] <pastyhermit> Wolfman2000, I am no help to you.
[04:46:02] <pastyhermit> ask surial
[04:46:10] <Wolfman2000> pastyhermit: That's partly why I went into #firefox
[04:46:18] <Wolfman2000> ...I may have to try the mozilla server though
[04:46:22] <pastyhermit> oh you mean looking at the java console
[04:46:23] <pastyhermit> ok
[04:46:43] <pastyhermit> ... thats easy its in the system tray right click on it while after the application crashes and select open console
[04:46:55] <pastyhermit> then you can type ? and see the list of commands
[04:47:08] <Wolfman2000> pastyhermit: ...I'm on a Mac
[04:47:08] <freeone3000> Except it's *not* in the system tray.
[04:47:10] *** marcosRz has quit IRC
[04:47:22] <freeone3000> It hasn't been since like, 1.6.0_02.
[04:47:32] <FauxFaux> Lol mac, Java 6, what's that?
[04:47:48] <freeone3000> FauxFaux: Recent and extant, that's what.
[04:47:54] <Wolfman2000> freeone3000: pardon?
[04:48:03] *** pstickne has quit IRC
[04:48:06] <freeone3000> Apple released JRE 1.6 a while ago, no?
[04:48:21] <pastyhermit> Im gonna go home
[04:48:21] <AMcBain> Only for x64 capable Macs
[04:48:22] <pastyhermit> later
[04:48:22] <Wolfman2000> recently. I think it's equivalent to 1.6.0_17 or something like that.
[04:48:40] <pastyhermit> thanks for the spanking everyone
[04:49:22] *** deg has joined ##java
[04:49:47] *** Tniffoc has joined ##java
[04:50:35] <Tniffoc> if I have two instances of java.awt.Canvas and they both call this.getClass().getClassLoader().hashCode() will it come out with different values?
[04:50:49] <Fanook> ~tias
[04:50:50] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[04:50:51] <freeone3000> Maybe.
[04:51:07] *** deg has left ##java
[04:51:21] *** pastyhermit has quit IRC
[04:52:31] <surial> FauxFaux: If you were implying that java 6 doesn't exist for macs, you're wrong.
[04:52:59] <FauxFaux> Oh, okay.  I forget what the divine master allows to run on his hardware these days.
[04:53:04] <surial> On Snow Leopard, it's 32-bit. On Leopard, you'd have to go to soylatte for 32-bit java6.
[04:53:26] *** whaley has joined ##java
[04:53:58] <surial> FauxFaux: You mean, on the open source kernel that mac os x runs on? If the iPhone is any indication, virtually nothing. Fortunate then that you can run apps on it with or without the blessing from cupertino, huh?
[04:53:59] <AMcBain> "divine masters" ... is this like HeMan or something?
[04:54:33] *** ztj has quit IRC
[04:55:05] <FauxFaux> One suspects the iPhone kernel contains a lot of bsd code, too.  Much like the Windows kernel!
[04:55:38] <AMcBain> ?
[04:55:38] *** ztj has joined ##java
[04:55:52] <freeone3000> Oh come on, EVERYONE ripped off that networking stack.
[04:56:06] <AMcBain> haha
[04:56:13] <FauxFaux> My main objection with osx is the way applications that want focus bounce the taskbar endlessly.  Aaaaaaaaaaaargh!
[04:56:27] <FauxFaux> But, veering wildly off-topic.  /me flees.
[04:56:34] <Tniffoc> Fanook, 	int i = c1.getClass().getClassLoader().hashCode(); gives NullPointer. c1 is set to new Canvas()
[04:56:37] <AMcBain> FauxFaux, you think Windows is any better with the blinking taskbar tabs?
[04:56:47] <kgrad> is it bad practice to do bean validation on jpa annotated DAO's? does it mix concerns?
[04:57:08] <kgrad> with jsf2.0
[04:57:09] <FauxFaux> AMcBain: As of Vista it's limited to three flashes then cancelled, unless you specifically code around the API. :P
[04:57:29] <AMcBain> aww. that's how I knew someone had msg'd me on IRC :-/
[04:57:31] <surial> FauxFaux: ... you mean just like in windows, except it bounces instead of flashing?
[04:57:32] <Wolfman2000> Welp...found where the applet cache is kept on my system. I have a feeling JavaFX won't be a good one.
[04:57:34] *** whaley has quit IRC
[04:57:45] <FauxFaux> surial: See above reply to AMcBain. :P
[04:57:54] <Wolfman2000> surial: what were the other options you talked about? I recall you mentioned an embedded web server, but not much else
[04:57:58] *** whaley has joined ##java
[04:58:13] <surial> Tniffoc: getClassLoader() returns null if its loaded by the system class loader.
[04:58:19] <surial> Tniffoc: If you read the docs, you'd know this.
[04:58:31] <surial> Wolfman2000: I mentioned an embedded web server, yes.
[04:58:54] <AMcBain> FauxFaux, the Windows flashing is actually a result of slow API changes that prevent applications from being able to steal focus and come to the frront immediately (somewhat annoying), and so they blink the taskbar instead of giving it focus, however, apps always find a way around, so they turn that into blinks ... yadda, yadda ...
[04:59:01] <surial> Wolfman2000: I also mentioned GWT, but at this point it sounds like you want a web app but are too unskilled to make one so you thought you'd roll with applets instead. That's not the impression I got before.
[04:59:18] <Wolfman2000> surial: You have the wrong impression presently
[04:59:26] *** tak11 has joined ##java
[04:59:45] <Tniffoc> ~ClassLoader
[04:59:45] <javabot> Tniffoc, classloader is what loads classes in Java; you can extend the ClassLoader class to implement your own loading strategies. See http://java.sun.com/docs/books/tutorial/ext/basics/load.html
[04:59:47] <Wolfman2000> I merely wanted to try the different technologies and figure out which is the best way to distribute my java app
[04:59:53] <Wolfman2000> I'm aware that applets are not the way to go
[05:00:07] <Tniffoc> ~javadoc ClassLoaer
[05:00:08] <javabot> I don't know of any documentation for ClassLoaer
[05:00:10] <Tniffoc> ~javadoc ClassLoader
[05:00:11] <javabot> Tniffoc: http://is.gd/4jgRq [JDK: java.lang.ClassLoader]
[05:00:38] <surial> Tniffoc: The documentation for "getClassLoader" obviously wont be in classloader.
[05:00:47] <surial> ~~ Tniffoc javadoc Class.getClassLoader()
[05:00:47] <Wolfman2000> Sorry for the misunderstanding
[05:00:47] <surial> enjoy.
[05:00:50] <javabot> Tniffoc: http://is.gd/9EiYa [JDK: java.lang.Class.getClassLoader()]
[05:01:06] <Tniffoc> Ok we're good now/
[05:01:10] <surial> Wolfman2000: If you want to deliver an app to the web... write in the language of the web. jQuery, javascript, html, css.
[05:01:31] <AMcBain> Canvas is awesome, btw, for the web.
[05:01:38] <ztj> yep
[05:01:43] <Wolfman2000> AMcBain: HTML5 I presume
[05:02:07] <AMcBain> Wolfman2000, technically, but there are implementations in most modern browsers and at lest 2+ versions floating around that have backends that work with IE.
[05:02:22] <AMcBain> least*
[05:02:28] <Wolfman2000> Somehow, I doubt there is a Java/HTML5 library out there. Still...I've only messed with it before.
[05:02:32] <Wolfman2000> HTML5 that is
[05:02:33] *** Misterangry has quit IRC
[05:02:44] *** Misterangry has joined ##java
[05:02:46] <AMcBain> Uh, this would require you to write your app in JS.
[05:02:50] *** adu has joined ##java
[05:03:08] <AMcBain> We're not attempting to suggest that Java will just fly as JS, except possibly in parts through GWT.
[05:03:16] <ztj> Which for better or worse is the "One True Language" for web client development anyway
[05:03:30] <AMcBain> It's not bad as far as a language goes.
[05:03:33] <Wolfman2000> If nothing else, I have plenty to think about.
[05:03:41] <AMcBain> but that's here nor there for this channel
[05:04:00] <AMcBain> that's neither*
[05:04:03] <Wolfman2000> I understand
[05:05:09] *** jerkface03 has quit IRC
[05:06:17] *** djz has joined ##java
[05:07:13] <djz> hey, I was wondering how one would go about getting values from JTextField and adding them?
[05:09:17] <AMcBain> field.getText()
[05:10:01] *** olabaz has quit IRC
[05:10:52] *** whaley has quit IRC
[05:15:53] <Iszak> eh?
[05:16:02] <Iszak> Wouldn't it return a string tho?
[05:16:18] <Iszak> How would you typecast it to an integer?
[05:16:24] <freeone3000> Integer.parseInt()
[05:16:31] <Iszak> Oh cool, we've got one of those too.
[05:16:45] <Iszak> but JavaScript has weirdness when it comes to dynamic typing like..
[05:16:59] <Iszak> "10" > "9"
[05:17:04] <freeone3000> Not Javascript. Java. Totally different languages.
[05:17:09] <Iszak> I know.
[05:17:13] <freeone3000> Java doesn't do operator overloading. Except for String, and then only +
[05:17:29] *** lolsuper_ has quit IRC
[05:17:30] <Iszak> + is for string concat?
[05:17:48] <Iszak> Man PHP really screws me over
[05:18:12] <Will123456> well i was discussing it with someone because i thought that PHP's use of . was almost perverse
[05:18:15] <Will123456> but he said it was a good thing
[05:18:26] <Will123456> differentiated it from adding other types of things
[05:18:52] *** kinection has quit IRC
[05:19:43] <freeone3000> You want to see perverse? Take how C++ interperts << on streams.
[05:20:34] <Iszak> I wish strong concating in PHP was +
[05:20:45] <Iszak> s/strong/string
[05:20:56] *** rjohnson19 has quit IRC
[05:21:31] *** Cain` has joined ##java
[05:23:07] *** Cain has quit IRC
[05:23:07] *** Cain` is now known as Cain
[05:23:15] <pr3d4t0r> Iszak: "Stop "."whining!";
[05:23:19] <pr3d4t0r> Iszak: :)
[05:24:15] *** Baldurgon has quit IRC
[05:24:27] <auntieNeo> okay... so I'm a C++ programmer most of the time... and I'm trying to do something that would be totally easy with pointers. I basically have this linked list of BufferedImages, and I want a pointer to the reference of one of the buffered images
[05:24:43] <freeone3000> You want a pointer to a pointer?
[05:24:49] <auntieNeo> essentially because I want to initilize the buffered image elsewhere, and then set the value later
[05:24:55] <auntieNeo> yeah
[05:25:00] <freeone3000> No. Try again.
[05:25:00] <auntieNeo> something like that
[05:25:08] <freeone3000> (That's a bad idea in C++)
[05:25:15] <auntieNeo> no it's not :/
[05:25:23] <auntieNeo> not with what I'm doing
[05:25:26] <auntieNeo> I swear it
[05:25:44] <auntieNeo> in fact, it's way easier in java because I don't have to worry about memory leaks
[05:25:57] <freeone3000> But you can't do it the same way. So, try again.
[05:25:59] <auntieNeo> but there's no... pointery hack in java?
[05:26:10] <freeone3000> No.
[05:26:23] <Will123456> auntieNeo: forgive me if this is a dumb suggestion or i'm missing the point, but you could always use an object as a sort of fake pointer? er
[05:26:25] <Will123456> maybe it wouldn't work
[05:26:26] <auntieNeo> I can't change a reference in my linked list without traversing the whole list?
[05:26:29] <Will123456> as an intermediate
[05:26:44] <freeone3000> auntieNeo: You could store a reference to a Node.
[05:26:45] <ztj> auntieNeo: you can't, use an array
[05:26:59] <ztj> auntieNeo: in almost all cases arrays are faster than using linked lists anyway
[05:27:02] <freeone3000> auntieNeo: However, List doesn't expose any Nodes. So.
[05:27:03] <auntieNeo> I don't want to reallocate the huge list all the time
[05:27:18] <freeone3000> Why are you reallocating, anyhow? And why are you worrying about the internals of List?
[05:27:21] <ztj> you wouldn't do it all the time unless you were an extremely novice programmer
[05:27:26] <auntieNeo> ztj: in this case I only care about the ends
[05:27:37] <ztj> I think that's a lie based on what you just said
[05:27:41] <auntieNeo> mmm
[05:27:53] <freeone3000> list.get(0); list.get(list.size()-1);
[05:28:27] <auntieNeo> this is a two dimensional deal that grows and shrinks almost constantly
[05:28:34] <freeone3000> Doesn't matter. That's dynamic.
[05:28:36] <ztj> auntieNeo: if you insist on being unnecessarily dumb, your next option is to use container objects that actually reside in the list
[05:29:05] <freeone3000> I'm confused here. What's the actual problem?
[05:29:14] <auntieNeo> *sigh* :/
[05:29:20] *** trsh has quit IRC
[05:29:37] <auntieNeo> ztj: no you're dumb :(
[05:29:43] <ztj> freeone3000: they seem to want to change a value in the middle of a linked list without first iterating to that point
[05:29:57] <ztj> freeone3000: in other words, they want arrays
[05:30:09] <freeone3000> Or they may just want to stop worrying about performance so darn much.
[05:30:09] <auntieNeo> see, the thing is
[05:30:20] <ztj> or they should write their own data structure...
[05:30:31] <freeone3000> Or maybe we should let the nice man explain his problem instead of us random guessing.
[05:30:38] <auntieNeo> my linked list is kind of... shifting from side to side
[05:30:45] *** Gracenotes has joined ##java
[05:31:02] <auntieNeo> and I want to be able to update certain elements of the list without having to find my bearings all the time in the list
[05:31:48] <karstensrage> why?
[05:31:58] <karstensrage> what are you worried about?
[05:31:58] <auntieNeo> to implement it as an array would either involve a whole lot of buffering it and copying all the time because my list can shift infinately left or right
[05:32:06] <auntieNeo> memory?
[05:32:13] <auntieNeo> I'm not that worried about it
[05:32:18] <freeone3000> Do you have problems with memory?
[05:32:28] <auntieNeo> no :/
[05:32:30] <ztj> sounds like they have problems using data structures besides lists
[05:32:42] <freeone3000> Then you don't have problems with memory. So what are you worried about?
[05:32:43] <auntieNeo> LINKED OR NOT, I want to be able to have a pointer to an element in my list, okay? :P
[05:32:50] <karstensrage> auntieNeo, trust me, do it how you want, and worry about problems when you ACTUALLY have them
[05:32:51] <freeone3000> Can't do that.
[05:33:01] <auntieNeo> I suppose...
[05:33:04] <Ruum> hey guys when working with a GridBag layout, how do you get the buttons more spaced out?
[05:33:06] <auntieNeo> I could make a silly object
[05:33:13] <auntieNeo> and then change the reference value inside of the object
[05:33:30] <freeone3000> Ruum: .ipadx adds x-spacing to components; same for .ipady. imarginx and imarginy add spacing between components.
[05:33:35] <Ruum> ~javadoc GridBagLayout
[05:33:36] <javabot> Ruum: http://is.gd/9EoKN [JDK: java.awt.GridBagLayout]
[05:33:46] <auntieNeo> karstensrage: I can't do it how I want, apparently :P
[05:33:55] <auntieNeo> and then ztj called me an idiot for using a linked list
[05:34:05] <ztj> quit lying
[05:34:07] <auntieNeo> but my question still stands, linked or not
[05:34:31] <auntieNeo> ztj: dude, fuck you
[05:34:52] <auntieNeo> I'll use an array if that's what you want
[05:34:54] <freeone3000> auntieNeo: No, you cannot simply create a pointer to a reference.
[05:35:01] <auntieNeo> okay :(
[05:35:03] <Ruum> anyone?>
[05:35:05] *** CodeWar has joined ##java
[05:35:34] <freeone3000> Oh what, missed the answer up there?
[05:35:40] <Ruum> because on my GridBagLayout, my JButtons are too close together
[05:35:53] *** dublisk has joined ##java
[05:36:08] <Will123456> Ruum: freeone3000 mentioned .ipadx and .ipady
[05:36:20] <freeone3000> (and margin)
[05:36:31] *** [twisti] has quit IRC
[05:36:33] <ztj> ztj: that's not very ladylike of you
[05:36:35] <ztj> lmao
[05:36:40] <ztj> auntieNeo: that's not very ladylike of you
[05:36:50] <ztj> such language
[05:37:17] <Will123456> oh yeah, sorry :P
[05:37:45] <auntieNeo> you know what
[05:37:58] <auntieNeo> I just hate being called stupid all the time on this channel
[05:38:22] <ztj> So you're trying to get people to call you a jackass instead?
[05:38:25] <auntieNeo> you can say it how it is without being so abrasive
[05:38:42] <auntieNeo> ztj: no, I think it's quite plain that you're the jackass
[05:39:04] <ztj> You think so?
[05:39:08] <auntieNeo> and now you've made a jackass out of me :(
[05:39:19] <ztj> Pleasure Island
[05:39:21] <Ruum> can you guys give me a code example?
[05:39:28] <Ruum> of how to use ipadx ?
[05:39:46] <freeone3000> Ruum: It's the amount of x padding to add to each element. It's set on GridBagConstraints, same as all the other variables.
[05:39:49] <Ruum> I am googling and not getting much
[05:40:00] *** newton- has joined ##java
[05:40:11] <Will123456> auntieNeo: i don't think you're a jackass :)
[05:40:22] <Ruum> http://www.google.com/search?q=ipadx+java&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
[05:40:42] <newton-> if I were to go out an buy a book on java, what would be the best to get?
[05:40:47] <auntieNeo> Will123456: pfft :(
[05:40:55] <ztj> newton-: that depends, are you just learning?
[05:40:58] *** tak11 has quit IRC
[05:40:59] <ztj> newton-: are you trying to get better?
[05:41:04] <newton-> learning
[05:41:04] <ztj> newton-: is there a specific area you feel weak in?
[05:41:07] *** tak11 has joined ##java
[05:41:08] <ztj> ~~ newton- tij
[05:41:08] <javabot> newton-, tij is Thinking in Java by Bruce Eckel, see http://www.mindview.net/Books/TIJ/ for the 3rd edition (free download, published in 2002) or see http://www.mindview.net/Books/TIJ4 for the current edition which covers Java 5 features.
[05:41:09] *** Rory959 has quit IRC
[05:41:27] <Will123456> Ruum: this should help http://www.java2s.com/Code/JavaAPI/java.awt/GridBagConstraintsipadx.htm
[05:41:53] <Ruum> and newton, javadoc is a partner that you cant escape from :-)
[05:41:57] <Will123456> i mean that WAS the second result but still :P
[05:42:20] *** Bixby has joined ##java
[05:42:29] <Bixby> heyo
[05:42:31] <newton-> ztj: thanks for that tip
[05:42:43] *** newton- has quit IRC
[05:42:47] <Ruum> freeone3000 so I lol need to know how to "use ipadx in a java sentence :-p "
[05:43:02] <Bixby> Is there method to find the center of a circle i'm drawing on the screen with my paint method?
[05:43:11] <Ruum> thanks I just sawa that
[05:43:37] *** TommyBres has joined ##java
[05:43:39] <Will123456> Ruum: sometimes it helps to be more specific too. usually when i'm searching for something like that i add "swing" to the search
[05:43:45] *** TommyBres has left ##java
[05:43:56] <Bixby> Bixby: Is there method to find the center of a circle i'm drawing on the screen with my paint method?
[05:44:05] <Ruum> well Will123456 that pretty much did it
[05:44:07] <Ruum> thanks
[05:44:42] *** devendra has quit IRC
[05:44:43] <Will123456> Bixby: other than the circle x and y + circle width and height / 2? :p
[05:45:15] <Bixby> well i'm trying to compare the center of two circles
[05:45:35] <Ruum> btw Will, do I need to specify ipady if I use ipadx ?
[05:45:47] <Will123456> Ruum: i have no idea :P try it and see
[05:45:52] <Ruum> haha kk
[05:45:54] <Ruum> thanks;
[05:45:59] <Will123456> no problem :P
[05:46:06] <Will123456> Bixby: compare them in what way?
[05:46:27] <Bixby> I want to see if they are within a certain distance of eachother (the bigRadius + the smallRadius to be precise)
[05:46:56] <Will123456> funnily enough i've just spent the evening doing exactly the same thing :P
[05:46:58] *** Cymage has quit IRC
[05:47:03] <Bixby> really?
[05:47:10] *** tech_help has quit IRC
[05:47:12] <Will123456> well, circle to circle collision detection anyway, yeah
[05:47:38] <Bixby> yeah that's what I'm trying to do
[05:47:59] *** arpu has quit IRC
[05:48:44] <Bixby> how do u do it? :)
[05:48:58] <Will123456> haha well you have to get the distance between the two centre points of the circles
[05:49:14] <Bixby> which is what I can't figure out how to do :P
[05:49:16] *** Ionic has quit IRC
[05:49:41] <Will123456> it's the pythagorean thing
[05:49:42] <freeone3000> First, find the center point of one circle. Next, find the center point of the other circle. Finally, find the distance between two points.
[05:49:55] *** _kmh_ has joined ##java
[05:50:21] <Bixby> how do you apply pythagorean to i?
[05:50:24] <Bixby> it*
[05:50:29] <Bixby> its a circle :(
[05:51:18] <Will123456> you need to compare the x coord of circle 1 with the x coord of circle 2 (and the same for the y coord)
[05:51:24] <freeone3000> Distance between two points is Sqrt((x_2 - x_1 ) ^ 2 + (y_2 - y_1) ^ 2)
[05:51:28] <Will123456> yeah.
[05:51:46] <Will123456> i think freeone3000 can put it a lot more succinctly than i could :P
[05:51:50] <freeone3000> This is based off of the pathagorean theorum, since the x-component and the y-component of the differences of the points form two legs of a right triangle, with the difference being the hypotenuse.
[05:52:16] <freeone3000> So, first, find the center points (Circles => Points.). Next, find the distance between them (Points => Distance).
[05:53:05] <Gracenotes> and you don't have to take the square root, even, you can just check (x'-x)^2 + (y'-y)^2 <= (r1+r2)^2
[05:53:30] <Bixby> should i put the left side in abs?
[05:53:36] <freeone3000> Why? You're squaring.
[05:53:47] <Bixby> ah my b :)
[05:54:09] *** philosophia has quit IRC
[05:54:39] *** veritos has joined ##java
[05:54:59] *** Ionic has joined ##java
[05:55:15] <veritos> I need a way to get a unique number for every object in a set (the C pointer address of the object will do fine). Is it possible to get something like this?
[05:55:26] <auntieNeo> I think I've solved my problem... with java, it's impossible to access primitive values by reference, but you can access objects by reference. so I just put my crap in an object
[05:55:36] <auntieNeo> makes perfect sense <_<
[05:55:39] <Will123456> Gracenotes: hate to ask a stupid question, but does that optimisation work even if r1 and r2 are floating points below 1 (and above 0)
[05:55:40] <Will123456> ?
[05:56:07] <Bixby> I plugged all that in
[05:56:13] <Bixby> still not working
[05:56:34] *** bnewton has joined ##java
[05:56:35] <Bixby> if (Math.pow(foodX - s.getx(), 2) + Math.pow(foodY - s.gety(), 2)
[05:56:35] <Bixby> 				== Math.pow(FOOD_RADIUS - s.getRadius(), 2))
[05:57:06] <Gracenotes> Will123456: squaring should be faster than sqrt, not sure what the input values matter
[05:57:41] <Bixby> did i type something wrong?
[05:57:52] *** mr_daniel has joined ##java
[05:58:03] <Will123456> Gracenotes: i'll have to test it. i went with sqrt because i assumed the r1+r2^2 making something smaller would mess it up.
[05:58:17] <Fanook> I wonder if the explicit square would be faster than the Math.pow() call
[05:58:41] <CodeWar> veritos, System.identityHashCode should do it though I m not sure if any guarantee is made by it about  two separate objects not sharing a value
[05:59:01] <Gracenotes> Will123456: there is the same number of floating point values between 1 and 2 as there is between .5 and 1, between .25 and 5, between 1024 and 2048, etc.
[05:59:20] *** maduser has joined ##java
[05:59:40] *** maduser has quit IRC
[05:59:57] <veritos> CodeWar, java.lang.Object's default hashCode() method just returns the pointer unless overridden, if I recall, so that's what I want. Thanks!
[06:00:00] <Gracenotes> floating point gets messed up at higher values, usually you don't venture so small it gets messed up lower. The messing up happens when you have big and small numbers doing operations together, to an extent
[06:00:00] <Will123456> Gracenotes: oh no, i meant the fact that squaring say, 0.5 comes up with 0.25
[06:00:06] <Bixby> Will
[06:00:10] <freeone3000> But float is a quantized representation. Not every floating point number can be represented as a float.
[06:00:44] <Gracenotes> Will123456: math is math. if x < y, then squaring is monotonic, so sqrt(x) < sqrt(y). Always, for non-neg.
[06:01:09] <Bixby> Grace
[06:01:15] <Ruum> guys I am talking about the space between the buttons on a gridbaglayout
[06:01:29] *** djz has quit IRC
[06:01:31] <Will123456> Gracenotes: i see - thanks for clearing it up :)
[06:01:34] *** mr_danie1 has quit IRC
[06:01:41] <Ruum> is there a function that will make the space between the jbuttons more vast
[06:01:48] <Gracenotes> Bixby: not sure why you're subtracting the radii rather than adding
[06:01:59] <Gracenotes> no, but there ar esome layouts that have that
[06:02:24] <Bixby> subtracting works when the centers are on top of eachother
[06:02:28] <Bixby> adding doesn't work
[06:02:44] <Gracenotes> well. there is padding with GridBagLayout, but that changes when you resize
[06:02:47] <Bixby> I want it to work when the circles collide
[06:02:59] <Bixby> IE when the 2 centers difference is the 2 radiues added together
[06:03:03] <Bixby> how would I change this to make that work?
[06:03:04] <Bixby> 	if (Math.pow(foodX - s.getx(), 2) + Math.pow(foodY - s.gety(), 2)
[06:03:04] <Bixby> 				== Math.pow(FOOD_RADIUS - s.getRadius(), 2))
[06:03:18] *** veritos has left ##java
[06:03:26] <Gracenotes> Bixby: suppose the circles intersect with each other to make a sort of venn diagram. Does that count as a collision?
[06:03:37] <Bixby> of course
[06:03:50] <freeone3000> Why not just use the .intersects() method of Shape?
[06:03:55] <Gracenotes> well, the distance between the centers there isn't exactly the sum or difference of the two radii
[06:03:57] <Bixby> never herad of that one?
[06:03:58] *** Ruum has quit IRC
[06:04:00] <Gracenotes> it's less than it
[06:04:25] <Bixby> change it to <=
[06:04:26] <Bixby> ?
[06:04:27] <Gracenotes> in fact, if the differences between the centers is 0, that sure as heck counts as a collision
[06:04:33] <Bixby> freeone whats that?
[06:04:45] <freeone3000> ~javadoc Shape
[06:04:48] <javabot> freeone3000: http://is.gd/3SbKV [JDK: java.awt.Shape]
[06:04:51] <Gracenotes> draw a diagram if it helps, put the x and y lengths on lines, etc.
[06:05:49] <Bixby> ok
[06:05:54] <Bixby> i changed it to <=
[06:05:57] <Bixby> and it seems to work now :)
[06:06:03] *** deepjoy has quit IRC
[06:06:40] <Gracenotes> for the complicated geometry stuff, there is no substitute for drawing diagrams when working out the logic. That, and remembering certain useful geometric facts.
[06:08:17] *** edi_99 has quit IRC
[06:08:20] <Bixby> aye but this stuff is all over my head :)
[06:08:27] <Bixby> I'm just a lowly highschool student in algebra 2 haha
[06:08:57] <Gracenotes> yes, that is why we must instill our youngins with math! *instilling*
[06:09:09] <Bixby> lol
[06:09:12] <Bixby> my teacher tries :)
[06:09:18] <Bixby> course I don't like her so I don't pay attention
[06:09:52] <_kmh_> tststs
[06:10:04] <Will123456> Bixby: you'd do well to pay attention to her. i was useless at maths and now i can't even figure out how long to microwave readymeals
[06:10:08] *** IvoryZion has quit IRC
[06:10:16] <Bixby> well I understand math
[06:10:17] <_kmh_> remember math is all about curves ....
[06:10:20] *** earlyy has joined ##java
[06:10:27] <Bixby> Ie I can float by the class without paying attention
[06:10:28] <Bixby> :)
[06:10:59] <Bixby> but I get to this stuff and I dunno if it's right :)
[06:11:03] <Will123456> i thought that and now i have to eat tiny black curled up bits of bacon because i leave them in the pan too long :(
[06:11:38] <Bixby> lol
[06:12:36] *** CodeWar has quit IRC
[06:13:14] <Will123456> is >> and << instead of dividing or multiplying by 2 still worth it?
[06:14:10] <Gracenotes> the compiler will likely decide that for you
[06:14:30] <Will123456> so it's best just to go with readability
[06:16:38] <pr3d4t0r> Will123456: I'd go with >>, but then I'm not afraid of thinking that this is a computer anyway.
[06:17:31] <hiredman> computers are for nerds
[06:18:41] <Will123456> :P
[06:21:29] *** delskorch has quit IRC
[06:21:59] <Will123456> anyway thanks for all your help. i've made loads of progress today - night!
[06:22:16] *** Will123456 has quit IRC
[06:22:45] *** alkos333 has joined ##java
[06:24:18] *** Iszak has quit IRC
[06:27:15] *** earlyy has quit IRC
[06:30:24] *** brilliantnut has joined ##java
[06:30:43] *** Bixby has quit IRC
[06:38:26] *** bobbytek2 has quit IRC
[06:39:11] *** dublisk has quit IRC
[06:39:28] *** jcp has quit IRC
[06:43:26] *** joet3ch has quit IRC
[06:46:02] *** zed_DX has quit IRC
[06:46:43] *** jcp has joined ##java
[06:47:46] *** hmmmm has quit IRC
[06:48:50] *** dublisk has joined ##java
[06:49:12] <dublisk> are changes to a primitive type with the "volatile" qualifier atomic?
[06:53:03] *** dj_segfault has quit IRC
[06:53:44] *** deepjoy has joined ##java
[06:54:31] *** bindaas has joined ##java
[06:55:27] *** bobbytek2 has joined ##java
[06:55:59] *** Iszak has joined ##java
[06:58:42] *** dublisk has quit IRC
[07:00:07] *** jerkface03 has joined ##java
[07:00:21] *** daya has quit IRC
[07:01:27] *** tak11 has quit IRC
[07:04:46] *** geaaru has joined ##java
[07:04:57] *** smorg has quit IRC
[07:05:33] *** Iszak has quit IRC
[07:06:06] *** Redxross has quit IRC
[07:06:34] *** Ruum has joined ##java
[07:06:59] *** blbrown_win has joined ##java
[07:07:14] <Ruum> Guys I am STILL trying to use a gridbag layout and I am trying to get a greater space between the jbuttons
[07:07:33] <Ruum> and I cant seem to get the gap big enough
[07:07:53] <waz> why not use something like table layout?
[07:08:01] <Ruum> what?
[07:08:05] <Ruum> no.....
[07:08:14] <Ruum> gridbag is working actually
[07:08:24] <Ruum> but if I cant get it to do it that way
[07:08:30] <Ruum> then I will just use a null layout
[07:08:32] <waz> it's working but it's not
[07:08:38] <waz> that'd be stupid
[07:08:54] <Ruum> dude I could just show you the .jar file
[07:09:17] *** blbrown_win has quit IRC
[07:10:24] *** jcp has quit IRC
[07:11:22] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEE2010.jar\
[07:11:39] <Ruum> tell me how to get the gap between the jbuttons bigger
[07:11:53] <Ruum> the size of the jbuttons themselves are fine
[07:12:09] <Ruum> if you need me to do a pastebin I can do that
[07:12:37] *** vmhobbes has quit IRC
[07:13:25] *** deepjoy has quit IRC
[07:13:54] *** rburton- has quit IRC
[07:15:45] *** deepjoy has joined ##java
[07:16:22] <Ruum> is really everyone THAT stumped?!?!?!
[07:17:06] *** ldam has quit IRC
[07:18:23] <waz> apparently
[07:18:33] <waz> I stay away from grid bag layout
[07:18:35] *** ldam has joined ##java
[07:19:45] *** magn3ts has quit IRC
[07:21:40] <freeone3000> Margins.
[07:22:17] <Gracenotes> sounds like you might like BoxLayout
[07:23:03] <Ruum> well the box layout is going to be for my jlabels
[07:23:15] <Ruum> that is going to be UNDERNEATH the jbuttons
[07:23:24] <Ruum> I am just trying to get the jbuttons right.
[07:23:32] <Gracenotes> use it for the jbuttons then
[07:23:48] *** geaaru has quit IRC
[07:24:04] <Ruum> so freeeone, now do I get the margins correct with a gridbag layout
[07:24:05] *** daya has joined ##java
[07:24:06] <Ruum> ?
[07:25:03] *** e1n85 has joined ##java
[07:25:03] *** hax0r1 has joined ##java
[07:25:55] <freeone3000> GridBagConstraints. marginx and marginy.
[07:26:19] <hax0r1> why does Integer.parseInt() throws java.lang.NumberFormatException.forInputString(Unknown Source)?
[07:26:26] <freeone3000> Augh. Scratch that.
[07:26:37] <freeone3000> Either wrap the JButtons in Insets or use ipadx and ipady.
[07:26:44] <hax0r1> when used with BufferedReader
[07:26:52] <freeone3000> hax0r1: Because it's an improperly formatted number. For instance, Integer.parseInt("bannana"); will throw that.
[07:28:24] <hax0r1> freeone3000: hmm I want to parse "q"
[07:28:32] <freeone3000> q's not a number.
[07:28:36] <hax0r1> e.g. get the ascii # out of it
[07:28:52] <freeone3000> .charAt(0) will do that.
[07:29:20] <AMcBain> well, you have to cast there result back to a number ...
[07:29:32] <AMcBain> the*
[07:29:34] <freeone3000> char is a numeric type.
[07:30:44] <Ruum> ipadx and ipady just make the size of the jbuttons bigger or smaller
[07:30:44] <freeone3000> Ruum: Insets, then.
[07:30:44] <hax0r1> something like this: "try { cmd = Integer.parseInt(tok.nextToken()); }", so them I use cmd in switch statement
[07:30:53] <AMcBain> you can use chars directly in switch statements iirc.
[07:30:56] <Ruum> ~javadoc Insets
[07:30:56] <javabot> Ruum: http://is.gd/4TnJt [JDK: java.awt.Insets]
[07:31:07] <freeone3000> Right. That'll work as long as tok.nextToken() returns a base-10 number as a string.
[07:31:19] <freeone3000> It doesn't? NumberFormatException.
[07:31:29] <freeone3000> Of *course* you can use char directly in a switch statement. It's a numeric type.
[07:31:33] *** deepjoy has quit IRC
[07:34:00] <Ruum> freeone can I have a code example?
[07:34:13] <Ruum> java doc is too vague again.
[07:35:57] <freeone3000> Ruum: http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html
[07:37:30] *** bearded_oneder has left ##java
[07:37:30] * AMcBain wonders why we're teaching someone GridBag when the basic layout managers can accomplish quite a bit by themselves with minimal work.
[07:37:55] <AMcBain> With Flow, Grid, Border, and Card, I can accomplish (almost) anything.
[07:38:09] <Gracenotes> except nice-looking guis
[07:38:18] <AMcBain> Hey! They look nice.
[07:38:31] <freeone3000> Oh come on, it's excessively complex!
[07:38:31] <AMcBain> What? hell no!
[07:38:31] <Gracenotes> BoxLayout, and if necessary GroupLayout, are nice solutions
[07:38:34] <freeone3000> What are we supposed to not teach him next, annotation processing?
[07:38:37] <Gracenotes> GridBayLayout is just an ad-hoc mess
[07:38:51] <AMcBain> GroupLayout happens to be better for forms, but learning that is a pita (I did though!)
[07:39:07] <AMcBain> Just don't ask me to explain it :P
[07:39:47] *** deepjoy has joined ##java
[07:39:48] <Ruum> never mind freeone I got it
[07:40:20] <AMcBain> I'm working on polishing up a 2 layout managers of my own here, one of which I had already in use and I just rounded it out with the missing pieces, the other one will come in handy for those times I wish BorderLayout had corners (because I'll have one that does work that way :)
[07:42:53] *** dtrott has joined ##java
[07:45:37] *** gsr has quit IRC
[07:46:23] <Ruum> thanks freeone I got it
[07:46:43] <Ruum> I did this:
[07:47:08] <Ruum> constraintvarname.insets.left = 40;
[07:47:21] <Ruum> and it came out the way that I want :-)
[07:51:49] *** Blackhawk has joined ##java
[07:53:20] *** durre has joined ##java
[07:53:22] <Blackhawk> Hi, i need some help with regex
[07:53:27] <Blackhawk> can somebody help me
[07:53:31] <Blackhawk> i have a string
[07:53:34] <Blackhawk> Table2.34563.34567.37115.3486
[07:53:42] *** forneus_ has joined ##java
[07:54:09] <Blackhawk> i only want the number after table then . and then 4 numbers
[07:54:25] <Blackhawk> i want "2.3456"
[07:55:02] <jerkface03> Table(\d+\.\d{4})
[07:55:08] <jerkface03> i think
[07:55:08] <Blackhawk> ok i try
[07:55:11] <dmlloyd> no
[07:55:19] <dmlloyd> Table(\d\.\d{4})
[07:55:21] <dmlloyd> close though :)
[07:55:35] *** forneus has quit IRC
[07:56:38] <Blackhawk> aaaah very good
[07:56:58] <Blackhawk> but i dont want the "table" just the number
[07:57:08] <Ruum> alright dude, I am kinda 1/2 way there now :-) thanks freeone
[08:00:54] *** hax0r1 has quit IRC
[08:02:05] <dmlloyd> Blackhawk: use a capture group.  matcher.group(1)
[08:02:10] <Ruum> ##assembly
[08:02:15] *** taras has joined ##java
[08:02:39] *** _kmh_ has quit IRC
[08:03:09] <Blackhawk> i am new to java, i use import java.util.regex.Matcher; import java.util.regex.Pattern;
[08:03:21] <Blackhawk> did u mean that
[08:03:35] *** deepjoy has quit IRC
[08:04:52] <dtrott> dmlloyd: Or you could use a zero-width positive lookbehind :-)
[08:05:26] <dmlloyd> I don't trust those lookahead/lookbehind assertions.  there's too many caveats and I'm never quite sure how it generates them
[08:05:30] *** Engin has joined ##java
[08:05:38] <dmlloyd> does java even have a lookbehind?
[08:05:50] *** dhr039 has joined ##java
[08:05:58] <dmlloyd> ~~ Blackhawk javadoc Matcher.group(int)
[08:05:59] <javabot> Blackhawk: http://is.gd/9ENoH [JDK: java.util.regex.Matcher.group(int)]
[08:06:03] <Engin> I really hope Java not having unsigned types are justified! it's giving me headaches implementing a non-standard crc32
[08:06:18] <dtrott> dmlloyd: It does and it hasn't burnt me **YET**
[08:06:20] <dmlloyd> Engin: pfft.  it only matters when you right-shift or print the value.
[08:06:43] <dmlloyd> Engin: if it matters any other time, you've screwed something up.
[08:07:03] <Blackhawk> okay thank you, i give it a try :)
[08:08:06] *** e1n85 has quit IRC
[08:08:19] *** appleguru has joined ##java
[08:08:35] <appleguru> you can set an int to an Integer directly, no?
[08:08:47] <dmlloyd> ~~ appleguru autoboxing
[08:08:48] <javabot> appleguru, autoboxing is http://java.sun.com/j2se/1.5.0/docs/guide/language/autoboxing.html
[08:09:07] <dmlloyd> I'm going to bed.  adios.
[08:09:20] <appleguru> dmlloyd: ty :)
[08:09:25] <appleguru> (that's a yes, you can :))
[08:11:46] *** pstickne has joined ##java
[08:12:15] *** jcp has joined ##java
[08:12:49] <dtrott> appleguru: Technically it creates an Integer object and assigns the Integer object not the original int.
[08:13:10] <appleguru> that's fine..
[08:13:46] *** kgrad has quit IRC
[08:14:06] *** somecodehere has joined ##java
[08:14:51] *** hnr has joined ##java
[08:15:19] <Engin> dmlloyd, yeah, you're right.
[08:18:55] *** Angel-SL has joined ##java
[08:18:56] *** frangiz has joined ##java
[08:23:21] <oorza> I need a HashMap to be threadsafe, and I'm debating whether to override the write methods (put/remove/putAll) and make them synchronized or to keep an internal store of Reentrant locks so that locking is done on a per-key basis instead of a per-map basis.  Is this advisable?
[08:24:03] *** adu has quit IRC
[08:24:23] *** durre has quit IRC
[08:24:46] <AMcBain> depends on your needs ... if you need operations on the entire map to be atomic, then you want to ensure that anyone who tries to access the map has to wait their turn.
[08:25:14] <SeriousWorm> (just in case, try ConcurrentHashMap. if you have lots of reads but rare writes, it's pretty good)
[08:25:40] <oorza> Yeah I was just looking at that
[08:27:26] <dhr039> Being new to threads sorry if the question sounds dumb. I'm calling a third party lib function and that function deep inside spawns a thread. I want to wait that thread to finish before continuing with my work. Can I somehow 'join' that
[08:27:28] <dhr039> thread without having a ref to its thread object? Or should I wrap the function in another thread and join the latter?
[08:28:34] <oorza> SeriousWorm, I'm just worried about the race conditions, although I don't think the data in question here will matter if raced.
[08:28:39] *** epalm has quit IRC
[08:28:42] <AMcBain> wrapping the method call in another thread and joining that thread will succeed in having your program wait until the wrapper thread finishes, which won't be very long.
[08:29:04] <AMcBain> (since it will finish as soon as the method call finishes, and you noted that it creates a thread way down there)
[08:29:23] <dhr039> AMcBain, thank you!
[08:29:30] *** meling has joined ##java
[08:29:51] <SeriousWorm> oorza: well, I'm using several ConcurrentHashMaps in my realtime 2d game - no errors so far. that's the extend of my usage of that map..
[08:30:03] <SeriousWorm> use what suits you, though.
[08:30:14] <AMcBain> dhr039, erm, that was intended to indicate that the wrapper thread won't work ... probably should have explicitly stated that.
[08:30:45] *** pstickne has quit IRC
[08:30:56] <dhr039> oh
[08:31:22] *** pstickne has joined ##java
[08:31:25] <AMcBain> what I mean is that the wrapper thread will call the method, the method will spawn the thread (somewhere along the line) then the method called by the wrapper thread will return and the wrapper thread will exit
[08:31:28] <oorza> SeriousWorm, I'm using it to store peers in a bittorrent tracker with keys based on the torrent and the peer itself (two dimensional mapping) so the worst case scenario I can think about is if a peer somehow manages to add himself to the "leechers" table at the same time he's trying to be removed, but I doubt I'll ever see that happen.
[08:31:40] <AMcBain> so you still have that spawned thread going in the background, which isn't what you wanted
[08:31:58] <dhr039> i see
[08:32:42] <SeriousWorm> oorza: might not want to use ConcurrentHashMap then, I guess.
[08:32:48] *** ldam has quit IRC
[08:32:56] <oorza> SeriousWorm, eh, I'll tias.
[08:33:05] <oorza> I think it'll be fine :x
[08:33:23] *** pstickne has quit IRC
[08:33:30] <SeriousWorm> yeah, that's the problem with concurrency
[08:33:36] *** JoshuaL has joined ##java
[08:33:56] <SeriousWorm> it's kind of hard to try it. it may work perfectly now, but in 6 months, when you get the weird, totally unrelated bug reports.. hehe.
[08:33:57] <AMcBain> dhr039, there's not really anything you can do if you don't have access to that thread. the best you can do is code your program to continue when it receives some sort of callback notification (if any) that the thread has finished executing.
[08:34:00] *** Magnastash has quit IRC
[08:34:16] <dhr039> it creates a file
[08:34:18] <oorza> Is there no way to retrieve a random subset of the values of a map without grabbing the values() collection and converting to an array and getting a random chunk from that?
[08:34:42] <dhr039> i'll wait in a loopp till file is there
[08:34:48] <SeriousWorm> a HashMap generally doesn't like to be iterated
[08:34:54] <dhr039> maybe
[08:35:01] <SeriousWorm> try a TreeMap though.
[08:35:13] *** geri has joined ##java
[08:35:40] <oorza> Well say I have a HashMap with 2500 peers in it and I need to get 30 random peers from it, is there a better method than what I said?
[08:35:42] <SeriousWorm> also, for getting random values out of a TreeMap.. well, it doesn't really like that.. hmm..
[08:35:42] *** bnewton has quit IRC
[08:35:48] <oorza> I don't want to iterate
[08:35:56] <SeriousWorm> I don't think so, maybe someone can correct me.
[08:36:36] <SeriousWorm> although, I think you better generate 30 random keys and fetch that, I think it's faster (maybe?) (out of a HashMap)
[08:36:41] <AMcBain> dhr039, the fact that they put this file creation into another thread seems to indicate that the designers of this method you call didn't intend for someone to sit around and wait for the file to be completed (and it probably won't be quickly if it's a large file, otherwise why a new thread?), so maybe you're going about this the wrong way
[08:36:58] <oorza> But myHashMap.values().toArray().length, generate n random numers, return elements from those random numbers...
[08:37:02] <oorza> that seems awfully slow
[08:37:04] *** brilliantnut has quit IRC
[08:37:34] <oorza> random numbers < length, rather.
[08:38:17] *** L-----D has quit IRC
[08:38:30] *** LouisJB has joined ##java
[08:38:32] *** LouisJB has quit IRC
[08:39:35] *** shervin_a has joined ##java
[08:40:11] <dhr039> AMcBain, that function generates a sound file from a String (Text To Speech). I want to copy the generated file somewhere else.
[08:40:40] *** brilliantnut has joined ##java
[08:42:44] *** geri has quit IRC
[08:44:05] *** mazzachre has joined ##java
[08:45:04] *** taras has quit IRC
[08:47:11] *** NoReGreT has joined ##java
[08:47:42] *** sn3d has joined ##java
[08:47:51] <NoReGreT> if i want to write a generic layer that communicates with any web portal, what can I use? SOAP maybe?
[08:48:21] *** RdeWilde has joined ##java
[08:48:51] <injekt> NoReGreT: Yeah, SOAP works well
[08:48:53] *** LouisJB has joined ##java
[08:49:43] <NoReGreT> great
[08:50:06] *** meling has quit IRC
[08:52:01] *** geaaru has joined ##java
[08:52:23] *** selckin has quit IRC
[08:52:31] *** Resistance has quit IRC
[08:52:48] *** hnr has quit IRC
[08:52:50] *** selckin has joined ##java
[08:53:41] *** geaaru has quit IRC
[08:54:07] *** LouisJB has quit IRC
[08:54:27] *** corpsicle has joined ##java
[08:54:39] *** euvitudo has quit IRC
[08:55:42] *** dframe has joined ##java
[08:56:14] *** exbio has quit IRC
[08:56:26] *** Blackhawk has quit IRC
[08:58:18] *** lolsuper_ has joined ##java
[08:59:04] *** frangiz has quit IRC
[08:59:13] *** frangiz has joined ##java
[09:00:09] *** teralaser has joined ##java
[09:03:26] *** SurfMan has joined ##java
[09:03:36] *** pstickne has joined ##java
[09:04:03] *** pstickne has quit IRC
[09:04:47] *** da_shadow has joined ##java
[09:05:11] *** hnr has joined ##java
[09:06:16] *** SurfMan has quit IRC
[09:06:49] *** jivedude has joined ##java
[09:06:54] *** KeiKurono has joined ##java
[09:07:14] <KeiKurono> morning
[09:07:17] *** GrooveDroid has joined ##java
[09:07:43] *** Xianny has quit IRC
[09:10:35] *** hnr has quit IRC
[09:14:59] *** deSilva has quit IRC
[09:15:39] *** lolsuper_ has quit IRC
[09:15:39] *** Resistance9 has joined ##java
[09:15:43] *** ghisen has quit IRC
[09:15:44] *** Resistance9 is now known as Resistance
[09:16:18] <dhr039>  i was going the wrong way indeed, after reading again the docs found out that there is an option parameter for completion callback :-)
[09:18:06] *** ghisen has joined ##java
[09:22:25] *** ldam has joined ##java
[09:26:52] *** devendra has joined ##java
[09:27:34] *** Athenon has quit IRC
[09:28:30] *** nullobj has joined ##java
[09:30:58] *** SurfMan has joined ##java
[09:31:04] *** lilalinux is now known as lilalinux_away
[09:35:44] *** psst has joined ##java
[09:38:01] *** Athenon has joined ##java
[09:38:46] *** b0red has joined ##java
[09:40:01] *** omry|work has quit IRC
[09:40:22] *** Nachturnal has joined ##java
[09:44:57] *** lilalinux_away is now known as lilalinux
[09:47:32] *** Ruum has quit IRC
[09:48:02] *** magn3ts has joined ##java
[09:49:31] *** csaba has joined ##java
[09:49:55] *** Ragnor has quit IRC
[09:52:38] *** cofeineSunshine has quit IRC
[09:56:09] *** magn3ts has quit IRC
[09:56:14] *** magn3ts has joined ##java
[09:56:14] *** skbohra has joined ##java
[09:59:56] *** fr0ggler has joined ##java
[10:00:41] <appleguru> how do I call a non-static method?
[10:01:11] *** KermitTheFragger has joined ##java
[10:01:30] <appleguru> oh... I need to make an instance... hmm
[10:02:05] *** Iceman_B|SSH has quit IRC
[10:02:36] *** Peej has quit IRC
[10:02:54] *** prc33 has joined ##java
[10:03:09] *** magn3ts has quit IRC
[10:03:18] *** prc33 has left ##java
[10:04:11] <appleguru> wow... this is insane.. only took me 4 years to finally figure out what the hell I'm doing in java...
[10:04:34] <GrooveDroid> It took you 4 years to grasp the concept of objects?
[10:05:13] <appleguru> pretty much
[10:05:25] <appleguru> not that I've really tried until now
[10:06:04] <appleguru> before I pretty much just copy and pasted my old code that worked.. if I got an error trying to reference something in a static context that wasn't static.. I just made it static
[10:06:05] <auntieNeo> so I've got this thread and I want to be notified when it's finished. is there a good way to subscribe to it or something?
[10:06:15] <appleguru> call join()...
[10:06:37] <auntieNeo> um, no...
[10:06:37] <appleguru> that'll block the calling thread until it finishes though
[10:06:44] <auntieNeo> that's not what I want :P
[10:07:06] <auntieNeo> there should be some way to use the event loop to do it in a fancy way or something
[10:07:14] <_W_> auntieNeo, which thread?
[10:07:20] <AMcBain> GrooveDroid, yeah, but it really doesn't matter how long it takes
[10:07:24] <auntieNeo> I could keep checking the thread, but it's not like I want to do that in my own loop
[10:07:30] <_W_> if it's your own, just add a method call in a finally in the run method
[10:07:31] <AMcBain> s/yeah, but//
[10:07:37] <auntieNeo> _W_: a thread I derived from java.lang.Thread
[10:07:46] <auntieNeo> it's just rendering stuff
[10:07:50] *** skbohra has quit IRC
[10:07:50] <_W_> also, use Runnable, not Thread
[10:07:53] <AMcBain> auntieNeo, yuck, implement Runnable
[10:08:06] <auntieNeo> pshaw :P
[10:08:10] <auntieNeo> okay
[10:08:24] <_W_> but it's the same for either; public void run(){try{/* method body here */} finally {dude.iJustFinished();}}
[10:08:47] <_W_> or you could use a Callable, if that makes sense
[10:09:01] <_W_> err, sorry, wrong word. you could use a /Future/
[10:09:07] <_W_> ~javadoc Future
[10:09:08] <javabot> _W_: http://is.gd/4MJEE [JDK: java.util.concurrent.Future]
[10:09:16] <AMcBain> Basically the idea is that since you're not really adding any functionality to Thread itself, but rather making stuff to run on a Thread, you should implement RUnnable.
[10:09:40] *** genesiss has joined ##java
[10:09:41] <AMcBain> I also recommend checking out Future-related items.
[10:09:53] <auntieNeo> yeah, I'm just don't have a method that's constantly called from the event loop
[10:09:55] *** mbroeker has joined ##java
[10:10:11] <auntieNeo> s/I'm/I/
[10:10:16] <auntieNeo> I'll read up on future
[10:10:19] <AMcBain> auntieNeo, ? you were previously asking about being notified when it was done.
[10:10:27] <_W_> in general, there's a lot in java.util.concurrent that you might want to use
[10:10:36] <_W_> so check out all the classes in that package
[10:10:49] <auntieNeo> AMcBain: yeah, and to do that I would need to either check a value constantly...
[10:10:58] <auntieNeo> ...or be notified by the event loop. right?
[10:11:17] <auntieNeo> I'd prefer the later
[10:11:18] <AMcBain> Well the idea is to reduce the checking part of things, and Future-related classes make it so that you can be notified when it's done.
[10:11:21] <auntieNeo> but whatever works
[10:11:26] <_W_> auntieNeo, just check the classes in that package, really
[10:11:30] <auntieNeo> okay, I'll read :P
[10:11:36] <AMcBain> The Concurrent package is actually quite awesome.
[10:11:40] <_W_> there are several that can help you with what you want, depending on the context
[10:11:51] <_W_> *several classes there
[10:12:19] *** Ragnor has joined ##java
[10:12:34] <auntieNeo> heh, I might need to make a thing or two thread safe as well :P
[10:12:51] <appleguru> the correct way to create/start a thread is Thread t = new Thread (new someClassThatImplementsRunnable); t.start() yes?
[10:13:11] <_W_> that's /one way/ not necessarily the correct one
[10:13:19] <auntieNeo> I derived a thread ;P
[10:13:29] <_W_> typically you don't want to be creating your own threads manually at all, but rather use an Executor
[10:13:45] <fr0ggler> ~~appleguru jcip
[10:13:45] <javabot> appleguru, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java.  http://jcip.net/
[10:13:51] <_W_> makes it easy to later change the thread-creating strategy
[10:13:58] <appleguru> I see
[10:15:07] *** shookees has joined ##java
[10:15:23] *** dymaxion has quit IRC
[10:15:44] *** Athenon has quit IRC
[10:16:14] *** kibibyte has joined ##java
[10:17:35] <kibibyte> why i cannot download opensso from https://opensso.dev.java.net/public/use/index.html oracle removed it ?
[10:17:45] *** tolland has joined ##java
[10:19:33] <kibibyte> ??
[10:19:37] <kibibyte> ~ping
[10:19:38] <javabot> You rang, m'lord?
[10:21:04] <fr0ggler> maybe we don't answer because we don't know...
[10:21:17] *** shookees has quit IRC
[10:22:10] *** Swordsman has left ##java
[10:23:55] *** Niall has quit IRC
[10:24:27] *** [raymond] has quit IRC
[10:24:35] *** Stephmw has joined ##java
[10:24:39] <auntieNeo> hehe, Executor, just like starcraft :D
[10:24:52] *** [raymond] has joined ##java
[10:27:48] *** digitaloktay has joined ##java
[10:28:41] *** jcp has quit IRC
[10:29:52] *** Antagonist has joined ##java
[10:29:54] *** meling has joined ##java
[10:33:12] <_W_> auntieNeo, or, you know, like executor http://en.wiktionary.org/wiki/executor
[10:33:30] <_W_> the word predates starcraft by a /bit/
[10:36:04] <appleguru> doing homework with svn/google code is fun.. I get to see how I progress from garbage to slightly better garbage over the course of a night :P
[10:38:48] <appleguru> also get to see my OO epiphany in the form of diffs :)
[10:38:49] <tolland> in swing, i want to use something like a grid layout with 1 col and 5 rows, but I want the rows to expand to whatever height is there another Layout I should be using?
[10:39:16] *** rchern has quit IRC
[10:39:19] <appleguru> just tell the frame to pack().. should work
[10:39:20] <tolland> (at the moment each row is forced to equal heights, so I have massive buttons and scrunched up text areas)
[10:39:28] <appleguru> ah
[10:39:47] *** rchern has joined ##java
[10:39:52] <nevcairiel> a gridbaglayout can control the weight of each row
[10:40:14] <appleguru> yeah
[10:40:20] <appleguru> http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html
[10:40:25] <SurfMan> if you can use external libs, you can give MigLayout a spin.
[10:40:25] *** dinesh___ has joined ##java
[10:40:28] <dinesh___> hi all
[10:40:38] <dinesh___> I've got a quick question about glassfish, I'm running Windows
[10:40:56] *** bumblebird has joined ##java
[10:40:58] <dinesh___> should I download glassfish-installer-v2.1.1-windows.jar size 63MB , or glassfish-installer-v2.1.1-windows-ml.jar size 78MB  ?
[10:41:07] <dinesh___> i don't find a description of the difference on the website
[10:41:18] <bumblebird> hi is it possible with reflection to replace a method with some other method code?
[10:41:25] <SurfMan> sounds like ml = multi language?
[10:41:30] <bumblebird> or at least hook into a method so I know when it's called
[10:41:40] <dtrott> appleguru: Source control is more useful when you realize that the version you had 3 hours ago is the version you actually wanted ....
[10:42:00] <dinesh___> oh okay, i thought it would just support java
[10:42:02] <appleguru> dtrott: indeed.. and keeping revisions lets me do just that :)
[10:42:28] <Antagonist> appleguru: Rollbacks, never underestimate it till you're in a situation where you NEED it
[10:42:49] <appleguru> yup
[10:42:59] <Antagonist> Happened quite a few times that I change a line, see it breaks something, change the line back and... its still broken O.o
[10:43:25] <dtrott> I personally like git over SVN because you can commit every minute (if you want) then you can clean up the commit history before making it public.
[10:44:05] <Antagonist> I prefer not to have any post-alpha commits that result in an uncompilable or unrunnable system
[10:44:14] <da_shadow> bumblebird: if the object implements an interface, you can create a new object of that interface and delegate to the real object. Otherwise you can proxy objects
[10:44:17] <Antagonist> Unless its quitting time for the day, then its backup
[10:45:00] *** robrose has joined ##java
[10:45:04] <dtrott> Antagonist: Thats my point git (and several other SCM's) allow you to keep everything hidden so you don't break anyone else.
[10:45:10] <bumblebird> da_shadow: proxy objects?
[10:45:21] <fr0ggler> ~~bumblebird BCEL
[10:45:21] <javabot> bumblebird, bcel is the Byte-Code Engineering Library - http://jakarta.apache.org/bcel/
[10:45:29] <bumblebird> ah ok thanks
[10:45:46] <da_shadow> ~Proxy
[10:45:46] <javabot> da_shadow, please review this first:  http://eugeneciurana.com/galereya/view_photo.php?set_albumName=Humor&id=knuttz_ueba_22
[10:46:12] <da_shadow> bumblebird: java.lang.reflect.Proxy is an object you might want to look into
[10:46:42] *** Resistance has quit IRC
[10:46:54] <dtrott> yea that factoid should probably have been ~lolproxy
[10:47:27] <dtrott> ~cglib
[10:47:27] <javabot> dtrott, I have no idea what cglib is.
[10:47:47] <fr0ggler> zomgz
[10:49:21] *** Baldurgon has joined ##java
[10:49:39] <dtrott> ~cglib is cglib is a code generation library used to extend Java classes and implements interfaces at runtime, see: http://cglib.sourceforge.net/
[10:49:40] <javabot> OK, dtrott.
[10:50:28] *** dinesh___ has quit IRC
[10:51:25] <dtrott> How do you delete/replace a factoid ?
[10:51:43] *** LinkRage has joined ##java
[10:52:56] *** shookees has joined ##java
[10:53:34] <appleguru> ~cglib
[10:53:34] <javabot> appleguru, cglib is cglib is a code generation library used to extend Java classes and implements interfaces at runtime, see: http://cglib.sourceforge.net/
[10:53:34] *** Resistance0 has joined ##java
[10:53:39] *** Resistance0 is now known as Resistance
[10:54:05] <dtrott> Aye I want to replace that double "cglib is"
[10:54:13] *** amitev has quit IRC
[10:54:29] <KeiKurono> why if i don't set a text label in JButton constructor, it doesn't show the background icon ??
[10:55:19] *** PygoscelisPapua has quit IRC
[10:55:36] *** devendra has quit IRC
[10:55:37] <KeiKurono> like this:  JButton ceppolino = new JButton("fanchiulo",new ImageIcon(....
[10:56:51] *** devendra has joined ##java
[10:57:33] *** amitev has joined ##java
[10:57:36] *** meling has quit IRC
[10:57:41] *** Ragnor has quit IRC
[10:57:58] *** LennyLen has joined ##java
[10:58:20] *** exobyte has quit IRC
[10:59:09] *** PygoscelisPapua has joined ##java
[10:59:21] *** dtrott has left ##java
[11:00:13] *** amitev has quit IRC
[11:00:16] *** Ragnor has joined ##java
[11:00:48] *** appleguru has quit IRC
[11:01:33] *** LennyLen has left ##java
[11:03:00] *** shookees has quit IRC
[11:03:07] *** meling has joined ##java
[11:03:17] *** amitev has joined ##java
[11:08:40] *** amitev has quit IRC
[11:08:43] *** amitev has joined ##java
[11:10:23] *** morris1 has joined ##java
[11:11:04] <jottinger> morning
[11:11:10] <fr0ggler> hey jottinger
[11:11:25] <SurfMan> hey
[11:12:10] <morris1> i have library.jar file in ./lib and Source.java in ./foo. Source.java imports "org.library.stuff". In . as working directory, i type "javac -classpath ./lib ./foo/Source.java" but it cannot find the library.jar. what am i doing wrong?
[11:12:52] <fr0ggler> ~~morris1 classpath
[11:12:52] <javabot> morris1, The classpath tells Java or the compiler in which jar files and folders to look for classes and resources. Use the -cp/-classpath run-time options to specify the classpath. Also see http://is.gd/j4gM [sun.com] for more info. If you're on windows see: http://is.gd/9qq26 [sun.com].
[11:12:58] <jottinger> morris1: javac -classpath -lib/library.jar ...
[11:13:11] <morris1> oh :) thank you
[11:13:20] <jottinger> if you use java 6, you can also do javac -classpath lib/* ..
[11:13:28] <jottinger> but why the heck aren't you using a build tool?
[11:13:41] *** cemerick has joined ##java
[11:13:56] <morris1> dont know, just started java. any recommendations?
[11:15:22] <jottinger> maven, sadly.
[11:15:26] *** JusticeFries has quit IRC
[11:15:27] <fr0ggler> aw
[11:16:07] <morris1> ;)
[11:16:13] <fr0ggler> i like maven!
[11:16:42] <jottinger> ~maven
[11:16:43] <javabot> jottinger, maven is is a software project management and comprehension tool, found at http://maven.apache.org/ . It can construct, build, install, and document your project. Generally loved by its adherents for being comprehensive and able to locate dependencies by name rather than file, and hated by everyone else for being overcomplicated and underarchetyped. See #maven on irc.codehaus.org
[11:17:42] *** meling has quit IRC
[11:18:41] *** shookees has joined ##java
[11:19:59] *** amitev has quit IRC
[11:20:14] <mapreduce> If you get a certificate from some certification authority, is there a limit on how long signatures you create with that are valid for?
[11:20:34] <morris1> is the method name "parameters" somehow reserved? i get different compile errors for "parameters_" and "parameters"
[11:20:51] <jottinger> morris1: which are?
[11:21:16] <mapreduce> morris1: Presumably one of those has already been declared.
[11:22:17] <morris1> mapreduce: yes, nevermind me -.-
[11:22:31] *** cemerick has quit IRC
[11:23:00] *** amitev has joined ##java
[11:26:09] *** amitev has quit IRC
[11:26:12] *** dinesh___ has joined ##java
[11:26:13] *** amitev has joined ##java
[11:27:08] *** omry|work has joined ##java
[11:28:56] *** shookees has quit IRC
[11:30:20] *** dymaxion has joined ##java
[11:30:50] <bumblebird> I'm working with bcel, is it possible to replace a method on the fly with it?
[11:30:57] <bumblebird> I can't find any example of this
[11:31:04] *** da_shadow has left ##java
[11:31:08] <bumblebird> only cde that writes out to a class file
[11:31:46] *** f3ew has quit IRC
[11:32:20] <jottinger> what do you mean by "replace a method" on the fly?
[11:33:45] <bumblebird> I am using an external .jar
[11:33:58] *** wlievens has joined ##java
[11:33:59] <bumblebird> I want to replace one of the methods in one of the classes of it, with my own
[11:34:06] <bumblebird> at runtime
[11:34:10] <jottinger> is the class implementing an interface?
[11:34:15] <bumblebird> no
[11:35:00] *** nullobj has quit IRC
[11:35:02] <bumblebird> should I be looking at ClassGen + MethodGen
[11:35:06] <jottinger> bummer. Well, I haven't used javassist for that.
[11:35:10] <jottinger> or bcel. or asm.
[11:35:13] *** tolland has quit IRC
[11:35:14] <bumblebird> k np
[11:35:24] *** hrehf has joined ##java
[11:35:31] <bumblebird> think I just found an example of it
[11:35:44] *** f3ew has joined ##java
[11:36:14] <wlievens> JAXB seems to disregard propOrder when marshalling a bean
[11:36:19] <wlievens> what could be the reason for that?
[11:36:42] <dinesh___>  hm, in order to install glassfish wihtin netbeans, do I need to put "glassfish" as a subdirectory of where my netbeans is installed ?
[11:37:32] <jottinger> no
[11:37:45] <jottinger> you can tell netbeans where glassfish is (that's what the default install does)
[11:38:33] <dinesh___> ok thanks
[11:39:07] *** SurfMan has quit IRC
[11:43:48] *** bojo has joined ##java
[11:43:56] *** monestri has joined ##java
[11:44:06] *** k0tk0t has joined ##java
[11:44:10] <k0tk0t> Question
[11:44:16] <rvsjoen> anyone know whether is is possible to hide the mouse pointer when my java app has focus ?
[11:44:36] <k0tk0t> I'm writing a server application that distributes a large amout of files across a network
[11:44:38] *** mazzachre has quit IRC
[11:44:50] <k0tk0t> What's the most effecient way to go about doing so, speed wise?
[11:44:57] <k0tk0t> Should I load all the files in memory?
[11:45:05] <k0tk0t> Should I leave the FileInputStreams open?
[11:45:20] <rvsjoen> where are the bottlenecks ?
[11:45:44] <k0tk0t> memory, open streams, hard-drive read speed?
[11:45:45] *** kibibyte has quit IRC
[11:45:58] <k0tk0t> The files are accessed very often
[11:46:35] <jottinger> k0tk0t: put them in a jar
[11:46:45] <jottinger> then put the jar in the classpath
[11:47:09] <k0tk0t> there are thousands of files
[11:47:23] <jottinger> magical mystery fix.
[11:47:25] <k0tk0t> they're retreived from an SQL database
[11:47:27] <jottinger> how large? What's the distribution method?
[11:47:34] <jottinger> Why not leave them in the SQL db then?
[11:47:36] <k0tk0t> jottinger, TCP connection
[11:47:45] <k0tk0t> jottinger, the files aren't located in the SQL database
[11:47:49] <jottinger> TCP is a little low-level to be useful.
[11:47:51] <k0tk0t> URI's to the file are
[11:48:01] <jottinger> k0tk0t: *sigh* then use JCR
[11:48:05] <k0tk0t> JCR?
[11:48:10] <jottinger> is what I would do, at least
[11:48:11] <jottinger> ~jcr
[11:48:12] <javabot> JCR is the Java Content Repository, an API that provides access to data in a tree. Ideal for storing, well, content. Look for Apache Jackrabbit for a common, if poorly documented, example of the API. See ~jsr 170 for the spec. (Hint: avoid schemas, they're icky.)
[11:48:16] <jottinger> use ANY content repository, really
[11:48:29] <jottinger> they're design to, well, distribute content, generally efficiently.
[11:48:44] <mapreduce> "Ours is not to reason why" says the guy opposite me.
[11:48:46] *** Nachturnal has quit IRC
[11:48:48] <k0tk0t> jottinger, can it do so across a TCP connection?
[11:48:53] * mapreduce needs to start polishing his CV.
[11:48:57] <jottinger> k0tk0t: *sigh*
[11:49:13] <jottinger> yes, it can. It can use DAV, HTTP, RMI, any number of possibilities.
[11:52:46] <k0tk0t> is there an alternative to useing JCR?
[11:53:48] *** pht has quit IRC
[11:53:49] <k0tk0t> I can't find any decent documentation
[11:54:34] <k0tk0t> jottinger: Is it okay to leave FileInputStreams open?
[11:56:16] <k0tk0t> Is there a way to re-open a FileInputStream after it's been closed?
[11:56:21] <k0tk0t> without creating a new one?
[11:56:41] <mapreduce> k0tk0t: No.  No.
[11:57:02] <k0tk0t> mapreduce, so it would be better to just create a new one?
[11:58:03] *** mazzachre has joined ##java
[11:59:28] *** jonevans has joined ##java
[12:01:10] <dinesh___> hm, is there any implicit call to the method "clone" of java objects ?
[12:02:51] *** surial has quit IRC
[12:03:16] <ztj> dinesh___: no
[12:03:25] *** r1nu- has joined ##java
[12:03:49] <dinesh___> and why does Object declare "clone" when it does not implement Clonable ?
[12:03:58] *** phretor has joined ##java
[12:04:04] <dinesh___> kind of language evolution thing that got messed up ?
[12:04:19] <ztj> dinesh___: ask the language designers, only they truly know
[12:04:20] <dinesh___> hm well Clonable is in JDK 1.0 already
[12:04:28] <mapreduce> k0tk0t: It's better to close a resource when you've finished using it.
[12:04:39] *** deepjoy has joined ##java
[12:04:42] <mapreduce> If you don't know whether you've finished using it, you've finished using it.
[12:05:04] *** waza-ari has joined ##java
[12:05:06] <mapreduce> dinesh___: Object declares clone because it contains an implementation of clone.
[12:05:20] <mapreduce> If it didn't declare clone, it wouldn't be able to contain the implementation.
[12:05:56] <waza-ari> Hello, its me again... Does "extends Thread" and "implements Runnable" do the same thing? Or vice versa: Is it possible to make a class a Thread without "extends Thread", because it is already extending another class
[12:05:57] <mapreduce> That's why all you need to do is class Mine implements Cloneable { public Object clone() { return super.clone(); } }
[12:06:07] <mapreduce> waza-ari: No, no.
[12:06:14] <phretor> hello, I am trying to create a TreeMap out from a sorted list. The first element of the list should be the leftmost leaf and the last element must be the rightmost. Any suggestion?
[12:06:21] <dinesh___> yeah, thanks
[12:06:42] <dinesh___> so far i never used the clone method so it's a bit new
[12:07:06] <ztj> well that's good because you shouldn't use it anyway
[12:07:10] <mapreduce> I prefer Runnable because I can use it with a thread pool, executors, SwingUtilities.invokeLater, etc.
[12:07:34] <mapreduce> You don't need clone if you have immutable objects.
[12:07:35] <waza-ari> mapreduce: executors are blocking the Thread were i call it...
[12:07:49] <mapreduce> waza-ari: I can't believe it's not butter.
[12:08:07] <k0tk0t> mapreduce, when you clone an object that contains a list, does the list and it's items get cloned as well?
[12:08:23] <ztj> k0tk0t: indeed
[12:08:27] <ztj> do they?
[12:08:27] <k0tk0t> that saves me alot of hastle
[12:08:33] <ztj> that's the point of why you should not use it
[12:08:34] *** L-----D has joined ##java
[12:08:35] <ztj> you don't know
[12:08:35] <waza-ari> mapreduce: sorry? my english is not that good...
[12:08:43] <k0tk0t> ztj, that's why i'm asking
[12:08:48] <ztj> k0tk0t: you can't know!
[12:08:54] <mapreduce> k0tk0t: Not unless the object's clone method clones the list and its items.
[12:09:05] <mapreduce> ztj: You can know, there's no undefined behaviour there.
[12:09:09] <k0tk0t> when you clone a list, does it's items get cloned as well?
[12:09:17] <ztj> k0tk0t: you have no way to know how a given Class has implemented .clone() without reading its source
[12:09:28] <mapreduce> k0tk0t: Only if the list's clone() method clones the items.
[12:09:40] <k0tk0t> does an ArrayList's clone method clone the items?
[12:09:48] <ztj> RTFM?
[12:09:49] <mapreduce> k0tk0t: Look at its implementation.
[12:10:03] <k0tk0t> is there any nifty IRC command that can link me?
[12:10:09] <mapreduce> k0tk0t: The default clone() implementation inherited from Object just copies the bits in the object to a new object.
[12:10:17] <k0tk0t> i have like 9999 windows open on a single monitor
[12:10:18] <mapreduce> k0tk0t: Look in src.zip in your JDK.
[12:10:22] <mapreduce> I don't care.
[12:10:36] <mapreduce> Close them.  Turn off the PC if it helps.
[12:10:42] <k0tk0t> They're all necessary
[12:11:17] <mapreduce> There are lots of necessary people in graves.
[12:11:25] <k0tk0t> asking people is alot easier than googling
[12:11:35] <k0tk0t> maybe someone has the answer off the top of their head
[12:11:35] <ztj> k0tk0t: for you, you lazy ass
[12:11:39] <ztj> k0tk0t: do your own work
[12:11:50] <mapreduce> k0tk0t: The answer is "look in src.zip in your JDK"
[12:14:57] *** cemerick has joined ##java
[12:16:39] *** _kmh_ has joined ##java
[12:17:32] *** Peej has joined ##java
[12:17:47] *** devendra has quit IRC
[12:17:55] *** peper has quit IRC
[12:18:37] *** nopsled has joined ##java
[12:22:18] *** mazzachre has quit IRC
[12:22:43] *** waza-ari has quit IRC
[12:25:22] *** geri has joined ##java
[12:25:40] <jottinger> k0tk0t: get a new monitor!
[12:25:41] *** geri has quit IRC
[12:25:48] <jottinger> bigger, better, more of 'em
[12:25:54] <jottinger> I wish I had four monitors to work with
[12:26:05] *** CMoH has joined ##java
[12:26:46] *** deepjoy has quit IRC
[12:26:52] *** deepjoy has joined ##java
[12:27:18] *** Peej has quit IRC
[12:28:09] *** Copter has joined ##java
[12:31:36] *** daedra has joined ##java
[12:32:35] *** mazzachre has joined ##java
[12:32:39] *** Farhadix has joined ##java
[12:33:02] <daedra> hey I got some help here a while back about extending HashMap to make my own data structure. I was told that I will need to write my own equals() method, overriding HashMap's, but there was one other I would need to write. Anybody have a guess as to what it could be?
[12:33:07] <Farhadix> Hi guys, I have a query that contains a word in Persian, I'm programming in Java using mysql-connector-java-5.1.12. this query returns nothing. because Persian word in transmission between java and mysql change its encoding. how can I set encoding to UTF-8 in transmission ?
[12:33:45] <jottinger> daedra: hashCode()?
[12:33:58] <daedra> aha! yes that rings a bell
[12:35:02] <daedra> found the HOWTO I needed. excellent
[12:35:06] <daedra> thanks
[12:37:08] *** surial has joined ##java
[12:37:43] <mapreduce> jottinger: What should I look for in a JSF/EJB/JPA-using codebase to see whether it uses transactions or not?
[12:37:58] *** asina12 has joined ##java
[12:38:16] *** realloc has joined ##java
[12:38:26] <mapreduce> There's vague ideas floating around that the DB Windows service gets killed in the middle of a transaction and that that leaves the database in an undefined state.
[12:38:43] *** AMcBain has quit IRC
[12:38:45] <mapreduce> I don't do enterprise, but to me the whole point of transactions is so that that doesn't happen.
[12:38:58] *** tauren has quit IRC
[12:39:38] *** LouisJB has joined ##java
[12:40:19] <realloc> Hi ppl, i have a (semi)offtopic question... Anybody knows about some app (desktop/web) for representing abstract data types (binary search tree, avl tree, 2-3, 2-3-4, B-tree, lists, stacks, queus, heaps, etc.) graphicly? thanks
[12:41:08] *** dinesh___ has quit IRC
[12:41:33] *** csaba has quit IRC
[12:41:35] <dblevins> mapreduce: that can happen of the no one calls commit/rollback on the transaction
[12:42:22] *** daya has quit IRC
[12:42:25] *** csaba has joined ##java
[12:42:54] <dblevins> tx stays open waiting to be closed
[12:43:40] <dblevins> mapreduce: might be some tx timeout setting you can use in the db to protect against it a bit
[12:44:34] *** Resistance has quit IRC
[12:44:42] <wlievens> JAXB seems to disregard propOrder when marshalling a bean, any reason what could cause that?
[12:47:18] <jottinger> mapreduce: if you're using EJB, you are using transactions
[12:47:25] <jottinger> unless you specifically turn them off
[12:47:43] *** meling has joined ##java
[12:49:01] *** jmarsman has joined ##java
[12:52:17] *** phretor has left ##java
[12:52:34] *** Fuco has joined ##java
[12:54:23] *** nopsled has quit IRC
[12:55:14] <daedra>  /wc
[12:55:17] *** daedra has left ##java
[12:55:42] *** Mavrik- has joined ##java
[12:57:26] *** guille_ has joined ##java
[12:57:36] *** realloc has left ##java
[12:59:00] *** brilliantnut has quit IRC
[12:59:37] *** babysnakes has joined ##java
[13:00:09] *** kibibyte has joined ##java
[13:00:38] <babysnakes> Hi, I want to implement HttpProxy. Does anybody knows if there's a good opensource one?
[13:02:14] <jottinger> why would you care about a good open source one if you were going to implement one yourself?
[13:03:03] *** gigasoft has joined ##java
[13:04:06] *** tissue has quit IRC
[13:05:31] <babysnakes> jottinger: I'm trying to save myself the time of doing all the research. If I'll look at an open source implementation (my app is open source as well) I may be able to get good ideas for my project.
[13:05:58] *** okae has joined ##java
[13:06:06] *** meling has quit IRC
[13:07:06] *** josemoreira has joined ##java
[13:09:07] <jottinger> babysnakes: but ... if it's a good implementation, why would you write it yourself?
[13:10:14] <babysnakes> jottinger: I need a proxy for customized functionality, but it should accept HttpProxy protocol.
[13:11:07] *** ruins has joined ##java
[13:11:24] *** ruins has left ##java
[13:11:49] <ztj> So we're a search engine?
[13:12:25] <babysnakes> ztj: no, I want also experience, not just results. I've found some results but I don't have idea how good are they.
[13:12:27] *** Peste_Bubonica has joined ##java
[13:12:39] <ztj> try them out
[13:12:55] *** dpy has joined ##java
[13:13:20] <babysnakes> ztj: if someone have good experience on production with a proxy implementation, that's might mean more to me then first place in google :)
[13:17:00] *** brilliantnut has joined ##java
[13:18:44] *** dawciobiel has joined ##java
[13:20:04] *** luneff has joined ##java
[13:21:55] *** tolland has joined ##java
[13:22:08] *** Anusko has quit IRC
[13:22:43] <jottinger> all the http proxies I've ever used IRL were in C, which means they're not right for ##java
[13:22:53] <tolland> what does the "extent" mean on a JScrollBar?
[13:24:29] <tolland> my scrollbar seems to be upside down, and I can't set the default value to the maximum...
[13:26:22] *** Anusko has joined ##java
[13:26:36] *** SurfMan has joined ##java
[13:28:57] *** dawciobiel has quit IRC
[13:29:07] <mapreduce> dblevins: jottinger: Thanks.
[13:30:34] *** dawciobiel has joined ##java
[13:30:53] *** guille_ has quit IRC
[13:31:22] *** Segnale007 has joined ##java
[13:32:34] *** babysnakes has quit IRC
[13:32:38] *** dawciobiel has quit IRC
[13:33:58] <jottinger> mapreduce: EJBs' use of automagic transactions is one of their strengths, and when developers didn't realise that it was there, they always wondered why EJB performance sucked compared to their spring beans
[13:34:11] <jottinger> (then wondered why spring's performance sucked when they added transactions)
[13:34:49] <mapreduce> jottinger: The real problem appears to be that the DB service and app container get brought down and back up 2am every day 'for reliability'.
[13:34:54] <jottinger> haha
[13:34:59] <jottinger> yeah, that sounds "reliable"
[13:35:08] <mapreduce> This is on Windows, and there's no dependency set up between the two services.
[13:35:10] <ztj> must be jboss
[13:35:21] <mapreduce> What would you normally do on Windows for that?
[13:35:34] <mapreduce> Glassfish and Derby.
[13:35:47] <ztj> you run derby as a network accessible db?
[13:35:49] <ztj> good god
[13:35:58] <ztj> derby is horribly slow in that mode
[13:35:59] <mapreduce> ztj: I'd guess only localhost can reach it.
[13:36:01] <jottinger> ztj: no issue with that, it's basically cloudscape rebranded
[13:36:15] <ztj> I know what it is and I know it's horribly slow in network mode
[13:36:17] <jottinger> and no, not especially slow. Compare it to hsqldb in network mode. :)
[13:36:41] * ztj has been working with derby for years
[13:36:42] <jottinger> what defines "slow" to you?
[13:36:56] <jottinger> (just collecting information)
[13:37:05] <ztj> worse than 50% performance loss
[13:37:09] <mapreduce> Sloth is not an issue here, there's less than one transaction per minute.
[13:37:18] <ztj> mapreduce: then you wouldn't notice I suspect
[13:37:54] <ztj> mapreduce: anyway you can set up a dependency in the services on windows
[13:38:00] <ztj> has to be done when the service is registered
[13:38:14] <jottinger> ztj: no, no. I mean, how long would it take to insert 10000 rows (each row consisting of 1:M entities, where M ranges from 1 to 5), and then reading those 10000 things back?
[13:38:30] *** guille_ has joined ##java
[13:38:36] <mapreduce> ztj: Can that be done manually by a user afterwards?
[13:38:50] <jottinger> let's say it's on the same system, and if you have embedded vs. external, that'd be awesome
[13:38:52] <ztj> mapreduce: I've not seen a way, usually when I have changes to a service I just pull it and reregister it
[13:39:19] <ztj> jottinger: I don't do performance comparisons in that format, do it yourself.
[13:39:21] <mapreduce> We don't control the Glassfish service, the user installs Glassfish from a Sun bundle.
[13:39:26] *** k0tk0t has quit IRC
[13:39:35] <ztj> mapreduce: do you want glassfish to depend on derby?
[13:39:39] <mapreduce> Yes.
[13:39:53] <ztj> ah hm... I'm not sure what you can do, maybe it can be modified after, but I don't know how
[13:39:58] *** setz has quit IRC
[13:40:05] <ztj> i only know that you can definitely have dependencies, both required and optional
[13:40:09] *** reverend has quit IRC
[13:40:18] *** reverend has joined ##java
[13:40:37] *** setz has joined ##java
[13:40:43] <jottinger> ztj: fair enough
[13:41:16] <jottinger> ztj: I really should write that, shouldn't I
[13:41:17] *** Fanook has quit IRC
[13:41:26] <ztj> if it's useful information to you
[13:41:58] <jottinger> well, it can give a useful aggregate picture of what reads and writes actually cost
[13:42:09] <mapreduce> ztj: If you have service A depending on service D, and stop service D, does A stop first?
[13:42:21] <ztj> it stops, I'm not sure if order is preserved
[13:42:28] <mapreduce> Ok.
[13:42:46] <mapreduce> So the usual way to do it would be having Derby embedded rather than a separate process, right?
[13:42:47] <jottinger> we were able to determine a specific performance concern with one type of operation (the others were not at issue) as well as validate what our network impact was, with such a test
[13:43:31] *** Johannes13 has joined ##java
[13:43:40] *** Tac has quit IRC
[13:43:45] <ztj> jottinger: in our specific use case, my best guess for the performance detriment is a more aggressive locking algorithm in network mode
[13:44:13] <ztj> with a different schema and usage pattern, perhaps it's not as bad
[13:44:30] <ztj> but the same difference in performance doesn't occur in, say, h2 or ms sql
[13:44:44] *** okae has quit IRC
[13:44:50] <mapreduce> The developer who did this thinks that it needs to be as a separate process because 'that's the way Glassfish works' but I think he's talking shite.
[13:44:55] <ztj> of course, I still deploy to derby, it has been fairly reliable
[13:45:30] <ztj> mapreduce: it should be a separate process if it must be accessible but more than one app and you can't be sure which one will be running when
[13:45:48] <ztj> otherwise I'm not sure why you'd need it to be
[13:45:52] *** okae has joined ##java
[13:46:38] <ztj> jottinger: actually every problem I've ever had with derby is related to what seems like a propensity for hair-trigger locking promotion heh
[13:47:08] <ztj> we'll actually be restructuring the schema because of it, when the next major revision rolls around
[13:47:09] <mapreduce> ztj: Yes, there's only one app.
[13:47:25] * mapreduce prepares to pull rank.
[13:47:46] <ztj> mapreduce: silliness then, even with embedded mode you can enable network access if you need it for, say, a management app to peek at data at runtime or something
[13:48:17] <ztj> oh wells, not my concern :)
[13:48:55] *** Tac has joined ##java
[13:50:24] *** csaba has quit IRC
[13:50:57] *** gdoko has joined ##java
[13:52:24] <mapreduce> Thanks, ztj.
[13:54:14] *** philosophia has joined ##java
[13:54:26] <rvsjoen> anyone know if there is a way disable the mouse pointer whenever my java application has focus ?
[13:56:31] *** Farhadix has quit IRC
[13:56:58] <mapreduce> rvsjoen: JFrame.setCursor or something?
[13:57:15] *** whaley has joined ##java
[13:59:36] <rvsjoen> i'll look into that, thanks
[14:00:23] *** squeese has joined ##java
[14:00:42] *** jonevans has quit IRC
[14:00:44] *** r1nu- has quit IRC
[14:00:59] <rvsjoen> seems that only replaces the cursor inside that frame, what I need to do is hide the cursor completely, not even sure if that is possible
[14:01:01] *** n_np has joined ##java
[14:01:01] *** gdoko has quit IRC
[14:01:04] <n_np> hello
[14:01:14] *** Gravitron has quit IRC
[14:01:15] <n_np> What is the way to import a .java file from the same package?
[14:01:17] *** psault has joined ##java
[14:01:22] <squeese> Im trying to grab jruby from kenai.com, anyone know of mirrors?
[14:01:26] *** RdeWilde has quit IRC
[14:01:34] <SurfMan> n_np: you shouldn't have to import that
[14:01:45] <guille_> squeese: github probably
[14:01:53] *** Angel-SL has quit IRC
[14:01:58] <n_np> it gives me the error message, 'cannot import symbol class'
[14:02:14] <SurfMan> n_np: correct case?
[14:02:35] *** betehess has quit IRC
[14:02:37] <SurfMan> Symbol != symbol
[14:02:58] *** morris1 has quit IRC
[14:03:00] <n_np> yes
[14:03:13] <n_np> What does the word 'symbol' mean in java?
[14:03:23] <n_np> (sorry my memory is a bit spider webs)
[14:04:00] <mapreduce> Identifier.
[14:04:17] *** juan--d-_-b has joined ##java
[14:04:18] <mapreduce> ~jls
[14:04:20] <javabot> mapreduce, jls is The Java Language Specification: http://java.sun.com/docs/books/jls/
[14:04:30] <SurfMan> so check the spelling on class or Class
[14:04:43] <n_np> It should really be loading the .java file if its in the same folder and the same package right?
[14:04:44] <SurfMan> paste the line that the compiler complains about...
[14:05:02] <n_np>      	Converge f = new Converge("Convergance");
[14:05:32] <mapreduce> n_np: That's not the line that caused the error.
[14:05:49] <mapreduce> Hint: The line that gives 'cannot import symbol class' contains the word 'import'.
[14:05:52] <n_np> I know, but that's what the compiler says
[14:06:08] <n_np> it says cannot find symbol class
[14:06:22] <mapreduce> That's a different error.
[14:06:32] <mapreduce> Perhaps you have not compiled Converge.
[14:06:50] <n_np> interresting
[14:07:05] <mapreduce> ~tooldocs
[14:07:06] <javabot> mapreduce, tooldocs is http://java.sun.com/javase/6/docs/technotes/tools/index.html
[14:07:07] <n_np> I assumed that it would do passings
[14:07:14] <n_np> but this isn't asm :s
[14:07:48] <SurfMan> sounds like Converge just doesn't exist. Do you compile by hand, or with an IDE?
[14:08:22] <ztj> There should've been code pastebinned a long time ago
[14:08:36] <ztj> why speculate so much?
[14:08:51] *** Orban has quit IRC
[14:08:58] *** andy^ has joined ##java
[14:09:08] <n_np> It's definetely Converge that wouldn't compile, it has a coding error too
[14:09:15] *** bitshuffler has joined ##java
[14:09:16] <n_np> just busy fixing that now and I'll get back to you
[14:09:35] <SurfMan> there you go :)
[14:10:21] *** guille_ has quit IRC
[14:10:47] *** Farhadix has joined ##java
[14:12:08] *** dymaxion has quit IRC
[14:12:56] *** luneff has quit IRC
[14:13:01] *** CMoH has quit IRC
[14:15:22] *** Farhadix has quit IRC
[14:15:30] *** styx_ has joined ##java
[14:15:48] <KeiKurono> using layouts is fun
[14:15:52] <KeiKurono> not really
[14:16:13] <SurfMan> depends on the layout you're using... MigLayout has never let me down.
[14:16:44] <KeiKurono> i'm trying girdbaglayout now..
[14:16:52] <SurfMan> ah, I feel your pain...
[14:17:02] *** betehess has joined ##java
[14:17:09] <KeiKurono> lol
[14:17:46] <n_np> What does this mean: local variable title is accessed from within inner class; needs to be declared final ?
[14:18:16] <SurfMan> you have used the variable title in an inner class. You can only do that if it's declared final.
[14:18:17] <jink> It means _exactly_ what it says.  You have to make the title variable final.
[14:18:30] <SurfMan> so make that: final String title = "42";
[14:18:58] *** clrg has joined ##java
[14:19:45] <n_np> What is the standard practise for naming variables?
[14:20:10] <SurfMan> anything, as long as you keep away from Hungarian notation :)
[14:20:42] <SurfMan> I think it's called the Sun Coding Guidelines that gives an idea?
[14:20:46] <clrg> Variable names should be short and informative, so anyone seeing a name anywhere in your code knows what the value stands for.
[14:21:05] <SurfMan> http://java.sun.com/docs/codeconv/
[14:21:41] <n_np> I'm trying to use args
[14:21:45] <n_np> but it keeps not working
[14:21:46] <n_np> :/
[14:22:17] <n_np> ignore that!
[14:22:28] <SurfMan> we did :)
[14:22:39] <jink> We did what? :P
[14:22:44] <SurfMan> lol
[14:22:58] <n_np> cannot find symbol constructer
[14:22:59] <n_np> :/
[14:23:58] <SurfMan> that means you are trying to create an object with a constructor that does not exist... (Did I just retype the error message?)
[14:24:10] <fr0ggler> ~~n_np pastebin
[14:24:11] <javabot> n_np, http://mysticpaste.com - Paste the final url after you've pasted your stuff there.
[14:24:11] <n_np> strange thing is that it has a constructor
[14:24:22] *** GrooveDroid has quit IRC
[14:24:26] <SurfMan> yeah, but prolly not THAT one
[14:24:35] *** clrg has left ##java
[14:24:44] <SurfMan> show us some code using the link above
[14:25:50] <n_np> http://mysticpaste.com
[14:26:00] <SurfMan> lol
[14:26:08] <SurfMan> http://mysticpaste.com/view/2064
[14:26:18] <n_np> oops
[14:26:32] <n_np> yeh
[14:26:34] <n_np> thats it
[14:27:15] <SurfMan> Free Tip: start your variables with lowercase... Classes start with uppercase.
[14:27:17] *** vezzoni has joined ##java
[14:27:27] <n_np> tnx!
[14:27:30] *** dinesh___ has joined ##java
[14:27:40] <fr0ggler> ~camelcase
[14:27:41] <javabot> fr0ggler, camelcase is a convention for naming methods and classes.  Classes start with a capital letter, methods and variables start with a lower case, with an upper case character in the middle.  ClassName, methodName.  See http://java.about.com/od/c/g/camelcase.htm
[14:28:27] <SurfMan> the method is called: public static void main
[14:28:35] <SurfMan> and not: public static void Converge
[14:28:37] *** L-----D has quit IRC
[14:28:42] <n_np> why not?
[14:28:48] <reverend> does anyone recall the name of the framework that allows you to define beans without accessors and mutators?
[14:28:55] <reverend> i think it's named after a chili pepper or something
[14:28:58] *** Descra has quit IRC
[14:29:09] <SurfMan> by convention, the JVM looks for this method if you try to run the class
[14:29:17] <fr0ggler> n_np, and you can't mimic the "static void main" method for constructors. constructors look like public Converge(String[] args) { .. }
[14:29:23] <fr0ggler> ~constructor
[14:29:24] <javabot> fr0ggler, constructors is http://java.sun.com/tutorial/java/javaOO/constructors.html
[14:29:50] <reverend> lombok
[14:29:52] <reverend> i think that's it
[14:30:01] <n_np> rigght
[14:30:38] <n_np> it still won't work
[14:30:44] *** maxorator has joined ##java
[14:30:48] <SurfMan> new paste pls
[14:30:50] <mazzachre> Ok, "solved" my parsing/marshalling problem... Now I have a map of identification strings to class objects and use the class object to newInstance() and then populate the instance (via it's interface) and return it... Perhaps not the prettiest way, but it works for now...
[14:31:06] *** Farhadix has joined ##java
[14:31:18] *** andy^ has quit IRC
[14:31:22] <SurfMan> n_np: and define "won't work"
[14:31:36] <n_np> public Converge(String[] args) {
[14:31:36] <SurfMan> I got a neighbour, and he won't work either
[14:31:48] <n_np> cannot find symbol constructor Converge(java.lang.String)
[14:32:01] <fr0ggler> n_np, constructors are not the same as methods, and will not provide the same functionality as static void main
[14:32:13] <cheeser> you ctor takes a String[] and you're passing it a String
[14:32:17] <fr0ggler> (if that's what you're trying to do)
[14:32:24] <n_np> oh i get it!
[14:32:43] *** motaka2 has joined ##java
[14:33:43] *** bolt has quit IRC
[14:35:33] <n_np> I'm having my second thoughts about this
[14:36:04] <SurfMan> why, you're going back to Visual Basic? :)
[14:36:34] *** bolt has joined ##java
[14:36:39] *** dhr039 has quit IRC
[14:36:45] <n_np> i never used visual basic
[14:36:49] <KeiKurono> how do i push a component to top using the gidbaguglylayout manager?
[14:36:51] <n_np> i use cpp, asm, etc
[14:37:08] <n_np> SurfMan, I'm not going to use the args[] input at all now, because its supposed to be a visual program anyway
[14:37:09] <SurfMan> n_np: what are your second thoughts then?
[14:37:57] <SurfMan> n_np: if that title is giving you problems, hard-code it for now, get it working, then start on the title
[14:38:18] <n_np> yeah
[14:38:27] *** Antagonist has quit IRC
[14:38:31] *** bolt has quit IRC
[14:38:35] <SurfMan> KeiKurono: what do you mean with "top"? As in the 1st row, or "always on top"?
[14:39:09] <KeiKurono> yes first row
[14:39:21] <KeiKurono> but it actually add some padding at top
[14:39:32] <KeiKurono> and left right too..
[14:39:50] *** motaka2 has quit IRC
[14:40:29] <SurfMan> set ipadx and ipady on the GBConstraints
[14:41:06] *** bolt has joined ##java
[14:42:26] *** bolt has quit IRC
[14:43:13] <KeiKurono> ipad are default to 0
[14:45:00] *** bolt has joined ##java
[14:45:50] <mapreduce> Oh, not more ipad talk!
[14:45:57] <SurfMan> lol
[14:45:59] <fr0ggler> wakka wakka wakka!
[14:46:39] *** brilliantnut has quit IRC
[14:47:40] *** jornp has joined ##java
[14:49:05] *** alkos333 has quit IRC
[14:49:22] <jornp> BufferedImage.setRGB(int x, int y, int rgb); How can I represent an RGB color as an int?
[14:50:21] *** andy^ has joined ##java
[14:50:48] <KeiKurono> eh?
[14:50:49] <dinesh___> well usually colors are 24 bits
[14:50:53] <dinesh___> ints 32
[14:50:55] <SurfMan> look a the constructor of java.awt.Color
[14:51:00] <dinesh___> so there's enough place ;)
[14:51:24] <SurfMan> value = ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | (g & 0xFF) << 8)  | ((b & 0xFF) << 0);
[14:51:25] <dinesh___> and usually it's something like R << 16 | G << 8 | B
[14:51:56] *** philosophia has quit IRC
[14:52:27] *** charzero has joined ##java
[14:52:46] *** RLa has joined ##java
[14:53:10] *** abms1116 has joined ##java
[14:53:10] <jornp> thanks all, I have been looking at that stuff, but it only gives me black or grey. I'm almost beginning to think it doesn't draw colors lol
[14:54:07] <RLa> what doesn't draw colors?
[14:54:22] <jornp> my app
[14:54:53] <RLa> are you setting colors in the right thread?
[14:55:54] <SurfMan> what about using: BufferedImage.setRGB(0,0 new Color(230,100,210).getRGB() ); ?
[14:56:37] <RLa> does something display or repaint the buffer?
[14:56:45] <RLa> if not then no color will appear
[14:56:54] <RLa> or now drawing updates
[14:56:58] <RLa> no*
[14:57:20] *** platzhirsch has joined ##java
[14:58:22] <jornp> I think I'm drawing inside a greyscale image lol
[14:58:59] <SurfMan> gee, I wonder why it doesn't work :)
[14:59:19] *** joev has joined ##java
[15:00:26] <jornp> hehe I created a new image on top of it, works now, thanks anyway
[15:01:22] *** juan--d-_-b has quit IRC
[15:01:58] *** babysnakes has joined ##java
[15:01:59] <n_np> jcreator LE isnt really good is it?
[15:02:03] *** babysnakes has left ##java
[15:02:47] *** melter has quit IRC
[15:03:05] <SurfMan> dunno, I don't use it
[15:03:29] *** Ragnor has quit IRC
[15:03:48] *** bov has joined ##java
[15:04:48] *** charzero has quit IRC
[15:06:17] <n_np> SurfMan, which one has something like intellisense and a decent uml and form designer?
[15:06:35] *** Ragnor has joined ##java
[15:06:51] *** melter has joined ##java
[15:06:59] <SurfMan> pff, I assume NetBeans can do that, as well as Eclipse and IntelliJ IDEA (The last one is what I use)
[15:07:00] *** b0red has quit IRC
[15:07:30] <SurfMan> but something tells me you shouldn't start an IDE war here
[15:07:43] <n_np> yeah
[15:07:44] <n_np> not at all
[15:07:52] *** NetHawk has joined ##java
[15:07:59] <n_np> its not my intention
[15:08:47] <SurfMan> cool :) my advice to all beginners is to start with notepad-ish environments so you can get familiar with compiling, classpath, packages etc.
[15:08:52] *** rdg has joined ##java
[15:09:07] <n_np> you rock
[15:09:13] <SurfMan> if you know what that's about, start using an IDE to actually be productive
[15:09:16] <n_np> yeah i'm using one like that just to get the rust out of my brain
[15:09:25] *** kgrad5 has joined ##java
[15:09:47] <rdg> if I have a jar file (using logger and its own log4j.xml) and it is a library being used by my portlet (which has its own logger/log4j.xml) .. I won't get any logging conflicts will i?
[15:09:48] <nmx> i reject the idea that IDEs are necessary for productivity
[15:09:56] *** philosophia has joined ##java
[15:10:06] <rdg> basically, my portlet is supposed to be launching a thread in the other jar.. but the jar is never logging *anything*
[15:10:08] *** Resistance1 has joined ##java
[15:10:09] <SurfMan> well, they *do* help a bit
[15:10:12] *** Resistance1 is now known as Resistance
[15:10:37] <kgrad5> ide's are wonderful for refactoring
[15:10:54] <kgrad5> oops remove that apostrophe :(
[15:11:14] <jottinger> this is IRC, we need to keep it for posterity, to keep you humble
[15:11:37] *** LukeL_ has joined ##java
[15:11:40] <cheeser> yeah.  jottinger could use the company.
[15:11:53] <nmx> so is M-%
[15:12:22] *** FireSlash has joined ##java
[15:12:28] <n_np> I like the way that lean IDEs get your brain working
[15:13:19] <nmx> if i could embed emacs as an editor in an ide i might be more open to the idea
[15:13:35] <SurfMan> IntelliJ has a vi plugin :)
[15:13:38] *** somecodehere has quit IRC
[15:14:02] <nmx> SurfMan: if you know anything about emacs and vi you should know that said feature is useless to me :P
[15:14:58] <cheeser> it makes me sad to see kids calling IDEA "Intellij"
[15:15:22] <kgrad5> The only good feature of emacs is C-x M-c M-butterfly ...
[15:15:24] <nmx> ie, if someone is a diehard emacs fan so much so that they want it embedded in an IDE, he is probably not going to be happy with vi
[15:15:42] <SurfMan> for the record: I mentioned IntelliJ IDEA the first time...
[15:16:07] <nmx> ah yes. it's much like how NPR refers to the President, using his title the first time but calling him Mr. Obama in subsequent references
[15:16:10] <KeiKurono> gridbaguselesslayout
[15:16:38] <nmx> you aren't dissing gridbaglayout are you? i can whip up layouts with that thing that would make your head spin
[15:16:49] <nmx> also with pfn's resourcebundle version of it it's even better
[15:16:58] <KeiKurono> i just can't rid of the padding
[15:17:12] <KeiKurono> of the container jpanel
[15:17:20] <SurfMan> have you played around with the weights?
[15:17:27] <nmx> post the code, screenshot, etc
[15:17:34] <KeiKurono> aren't weights for resize only?
[15:17:47] <nmx> if you don't set the weight on at least one column/row, everything clumps in the middle
[15:18:51] <KeiKurono> uhh right
[15:18:59] *** rdg has quit IRC
[15:19:00] <KeiKurono> weights seems to do the work
[15:19:05] <KeiKurono> thanks for the hint
[15:19:57] *** LinkRage has quit IRC
[15:20:02] *** GrooveDroid has joined ##java
[15:21:17] *** karstensrage has quit IRC
[15:21:40] *** t0rc has joined ##java
[15:21:57] *** n_np has quit IRC
[15:22:09] *** dinesh___ has quit IRC
[15:23:24] *** LukeL_ has quit IRC
[15:23:43] *** _kmh_ has quit IRC
[15:24:40] *** abms1116 has quit IRC
[15:26:22] *** amacleod has joined ##java
[15:26:59] *** ojacobson has joined ##java
[15:27:36] *** SurfMan has quit IRC
[15:29:13] *** sebersole has joined ##java
[15:30:11] *** arpu has joined ##java
[15:30:52] *** luke85 has joined ##java
[15:32:04] *** charzero has joined ##java
[15:33:00] *** elfgoh has joined ##java
[15:33:24] *** outoftime has joined ##java
[15:33:36] *** srm has joined ##java
[15:33:37] *** EnginA has joined ##java
[15:34:06] <luke85> Hi. In topic is written "This channel is logged". Where is the log?
[15:35:04] <cheeser> ~logs
[15:35:05] <javabot> channel logs can be found at http://www.antwerkz.com/javabot-grails (Select the channel from the list on the left-hand side.)
[15:35:10] <KeiKurono> how does it look the bottom right popup? http://img13.imageshack.us/i/screenshotpopup.gif/
[15:35:44] *** morris1 has joined ##java
[15:35:47] *** guille_ has joined ##java
[15:36:39] *** bitshuffler has quit IRC
[15:36:43] <morris1> in my project, i have to jar files to build from different sources. should i use a single ant file to build it, or is using to seperate ant files better?
[15:36:49] *** Engin has quit IRC
[15:36:52] <morris1> *two jar files
[15:37:53] *** mvfranz has joined ##java
[15:39:11] *** WrathOfTheMath has joined ##java
[15:40:05] *** gdoko has joined ##java
[15:40:11] *** squeese has quit IRC
[15:40:24] *** [TechGuy] has joined ##java
[15:41:55] <luke85> thanks
[15:42:21] <luke85> ~logs
[15:42:23] <javabot> channel logs can be found at http://www.antwerkz.com/javabot-grails (Select the channel from the list on the left-hand side.)
[15:42:29] *** ldam has quit IRC
[15:42:55] <philosophia> i have a hashmap that holds <String, Long> - I need to expand it to hold another value <String, int, Long> - what's the best collection type for this?
[15:43:20] <WrathOfTheMath> Hello All, I am looking for an open source MP4 library I can use to transcode. Basically All I need to do is tweak bit-rates and modify stereo to mono as I am trying to automate the creation of multiple mp4 files with different bit-rates for multiple mobile devices.Anyway I have been looking around and can not seem to find anything that fits the bill. Any help will be appreciated, thanks in advance!
[15:43:32] <luke85> morris1: I would use separate ant script for every jar, but its quit egal
[15:43:45] <jottinger> philosophia: err, probably a Map<String, Map<Integer, Long>>
[15:44:10] <ojacobson> philosophia: that depends on what you want.
[15:44:10] <luke85> philosophia:  <String, MyObject>
[15:44:24] <philosophia> thanks guys
[15:44:52] <WrathOfTheMath> philosophia: Perhaps Map<String,Entry<Integer,Long>> would be less expensive.
[15:45:19] <WrathOfTheMath> You can implement Entry easily
[15:45:23] *** deepjoy has quit IRC
[15:45:30] *** alkos333 has joined ##java
[15:46:15] *** Mavrik- has quit IRC
[15:46:29] <philosophia> if i use <String,Entry<Integer,Long>> can i sort on the Long value?
[15:46:57] <WrathOfTheMath> philosophia:  Sure you just have to write a Comparitor
[15:47:06] <philosophia> k
[15:47:14] <philosophia> yeah i already have one
[15:47:34] *** styx_ has quit IRC
[15:47:36] *** geaaru has joined ##java
[15:47:53] <WrathOfTheMath> err mabey you would be better off writing the sort yourself depending on how many entries you have in the parent map and what the distribution is
[15:48:21] *** rantingsteve has joined ##java
[15:49:09] <ojacobson> WrathOfTheMath: unlikely
[15:49:24] <ojacobson> implementing Comparator or Comparable correctly is much easier than implementing your own sort
[15:50:40] *** dawciobiel has joined ##java
[15:51:34] *** rdg has joined ##java
[15:51:56] *** joet3ch has joined ##java
[15:52:30] <rdg> my portlet, which uses other libraries... needs to have a log4j with the other class's listed in its logger names in order to get that logger's output, right?
[15:53:32] *** Baldurgon has quit IRC
[15:54:26] <bov> has anyone experienced java.lang.reflect.Proxy preventing the JVM from unloading classes after the ClassLoader that loaded the classes has been collected by the GC?
[15:54:46] *** styx_ has joined ##java
[15:54:56] <jottinger> bov: it's the classloader, not the proxy
[15:55:09] <WrathOfTheMath> ojacobson: Generally yes, I work allot of large sets with predictable distributions so checking is a matter of habit for me.
[15:55:21] <morris1> what is a good, portable way to provide the OS with a command which just calls a certain jar file?
[15:55:36] *** Windcape has joined ##java
[15:55:40] <bov> jottinger: ClassLoader has been collected, and the classes have no path to the GC.
[15:56:26] <jottinger> bov: somewhere that proxy is being retained then
[15:57:10] <Windcape> if I want to create a flexible application that I can deploy as a WAR package, what is the best way to provide application configuration then? It doesn't seem smart if the deployer is forced to edit the WAR package manually to find a .properties file hidden somewhere deep inside it.
[15:57:10] *** durre has joined ##java
[15:57:18] *** dinesh___ has joined ##java
[15:57:35] *** thecarlhall has joined ##java
[15:58:58] *** olavgg has quit IRC
[15:59:02] <durre> I'm trying to use an in memory database (derby) to run my unit tests. how can I get it to reset the database each test, or even each run? "create=true" in the connection string doesnt seem to do it
[15:59:03] <_W_> Windcape, it depends on what is being configured
[15:59:10] <_W_> JNDI is good for some things
[15:59:42] *** meling has joined ##java
[15:59:46] <_W_> durre, a common idiom is to start a transaction for each test and roll it back at the end
[15:59:48] *** ninan has joined ##java
[16:00:04] <_W_> that won't work if you are testing transacted queries though
[16:00:14] *** werdan7 has quit IRC
[16:00:25] *** _kmh_ has joined ##java
[16:00:57] <_W_> durre, I don't know about derby itself, or the option you mention, but it sounds like it should work and that you're simply reusing the connection between tests?
[16:01:03] <Windcape> _W_ clientside stuff for presentation, mostly. Some network paths, and port numbers
[16:01:18] <durre> _W_: I will be testing transactions later on
[16:01:25] <_W_> Windcape, sounds like servlet parameters to me
[16:01:51] <jottinger> ztj: you there?
[16:02:27] *** flowr has joined ##java
[16:02:40] <_W_> (or the equivalent - that you configure in the container)
[16:02:56] <ninan> Hi. I use JOTM as transaction manager in Tomcat. My Webapp works fine, if I restart complete tomcat at every redeployment. If I do hot redeployment, I get "Unable to cleanup Synchronization with TransactionManager" errors from hibernate at every request for Session (SF.getCurrentSession). Any clue?
[16:03:09] <durre> _W_: I repeatedly do "re run last unit test". and the objects in the in memory db is just growing. I dont even know how it got the tables and everything right... I never sent like a sql create script to it or anything :)
[16:03:25] <flowr> Hi. What's the issue with having static methods in interfaces?
[16:03:31] <_W_> durre, ah, then that parameter is probably /not/ working, no
[16:03:34] *** rantingsteve has quit IRC
[16:03:38] *** Wicked has quit IRC
[16:04:12] <fr0ggler> ~~flowr static
[16:04:13] <javabot> flowr, static is a keyword which indicates that a member is scoped to a class rather than an object instance.  Members of interfaces (except methods) are always static.  Nested interfaces and enums are always static.  See http://tinyurl.com/3q7oc and http://tinyurl.com/34vr3u for more information.
[16:04:37] <mapreduce> flowr: There is no issue.
[16:04:56] *** rchern has quit IRC
[16:04:59] *** rchern has joined ##java
[16:05:02] <_W_> flowr, you sound like you have something more to say that you're holding back? What made you ask that question?
[16:06:20] *** Wicked has joined ##java
[16:07:59] *** betehess has quit IRC
[16:08:13] <flowr> _W_:    Implementor.java: cannot implement method() in Interface; overriding method is static
[16:08:20] *** werdan7 has joined ##java
[16:08:23] *** cybastl has left ##java
[16:08:27] <_W_> flowr, static is never inherited
[16:08:40] <_W_> only things tied to instances is inherited
[16:08:44] <_W_> *are
[16:08:56] *** jdolan has joined ##java
[16:09:13] <flowr> implementor.java: public static void sort() <--- fault ........   interface.java: void sort();
[16:09:22] <flowr> I want that method to be static
[16:09:33] <rdg> if I have a portlet that needs to launch a thread, what's the correct way to do that? can I do something as simple as doing a class.run() (where Thread is extended) or should I involve the container somehow?
[16:09:41] <_W_> flowr, and it is
[16:09:51] *** rohdef has joined ##java
[16:10:00] <_W_> flowr, do you want it to be static of the class Implementor, or static of the interface Interface?
[16:10:14] <reverend> flowr: interfaces don't have static methods
[16:10:59] <rohdef> is there a nice helping class to convert a String[] to one string with a seperator between each string, eg. {"foo", "bar", "baz"} to "foo/bar/baz"?
[16:12:50] *** shervin_a has quit IRC
[16:13:00] *** marcosRz has joined ##java
[16:13:19] <bov> rohdef: Jakarta Lang Commons StringUtils.join()
[16:14:04] *** Segaja has joined ##java
[16:14:15] <rohdef> bov, think I found it, so there's no util like that in the default system I can guess
[16:14:35] <Segaja> hi, if i want to make an application that is zoomable and i have checkboxes (JCheckBox) in it. how can i make the checkbox to zoom the box itself, too?
[16:15:02] <dinesh___> Glassfish includes JNDI and JMS, is that right?
[16:15:07] <nmx> Segaja: you can use setIcon to replace the box
[16:15:59] <jottinger> dinesh___: er, yes
[16:16:24] <flowr> _W_: I want the implemetator to implement that method as static
[16:17:16] <dinesh___> ok thanks
[16:17:40] *** karstensrage has joined ##java
[16:17:50] <dinesh___> sounds like Glassfish is a bit heavy to just use for its JNDI and JMS capabilities ;)
[16:17:55] <jottinger> flowr: errr... what?
[16:18:02] <jottinger> dinesh___: why? It doesn't start up any services you don't use
[16:18:10] <Segaja> so there is no "normal" way to make the box to take some size according to the set font size?
[16:18:21] <_W_> flowr, you can't
[16:18:24] *** hoerup has joined ##java
[16:18:28] <flowr> I want to implement a interface as static
[16:18:44] <_W_> flowr, you can't
[16:18:46] <wlfshmn> there is no implementation to be made static
[16:18:58] <flowr> hm ok..... java's weird sometimes
[16:19:15] <jottinger> why... err... um... WTF
[16:19:20] <jottinger> how is THAT java being wierd?
[16:19:37] <jottinger> To me it sounds like YOU are being weird. It's an INTERFACE. How would static factor in?
[16:19:49] *** saml has joined ##java
[16:20:03] *** hoerup has quit IRC
[16:20:20] <karstensrage> why would you want an interface to be static, what does that even mean?
[16:20:39] *** Iceman_B|SSH has joined ##java
[16:20:43] *** LinkRage has joined ##java
[16:21:00] <KeiKurono> what's the best practices for hard coding relative paths? :/
[16:21:01] <charzero> flowr: Do you mean to have a static method in an interface?
[16:21:05] *** Deeewayne has joined ##java
[16:21:15] <charzero> KeiKurono: Don't. (:
[16:21:49] <jottinger> karstensrage: exactly
[16:22:02] <KeiKurono> i need to load some files though
[16:22:16] *** waza-ari has joined ##java
[16:22:16] <charzero> KeiKurono: I would put them in a resource bundle.
[16:22:29] <saml> do you use final method parmeters?   void f(final int i, final SomeClass c) .. ?
[16:23:01] *** betehess has joined ##java
[16:23:10] *** freeone3000 has quit IRC
[16:23:14] <fr0ggler> KeiKurono, getResource/getResourceAsStream
[16:23:23] <waza-ari> Hello, its me again ;) How can i maximize a JFrame under Windows? setExtendedState(JFrame.Maximize_both) works under Unix, but not under windows. Any ideas? Thanks...
[16:23:25] *** bojo has quit IRC
[16:24:12] <rdg> if I have a portlet that needs to launch a thread, what's the correct way to do that? can I do something as simple as doing a class.run() (where Thread is extended) or should I involve the container somehow?
[16:25:07] *** Superbest has joined ##java
[16:25:29] *** durre has quit IRC
[16:25:35] *** Mavrik- has joined ##java
[16:25:41] <jottinger> rdg: use the container
[16:25:54] *** bojo has joined ##java
[16:26:04] <rdg> what do I need to google to find information on that
[16:26:23] <jottinger> JCA
[16:26:29] <jottinger> ~jca
[16:26:29] <javabot> jottinger, jca is The Java EE Connector Architecture (http://tinyurl.com/r4qkw), and also the Java Cryptography Architecture (http://tinyurl.com/ysj96o)
[16:26:33] *** LinkRage has quit IRC
[16:26:38] <jottinger> What does this thread do?
[16:26:50] <jottinger> (JCA might be massive overkill for what you're trying to do)
[16:26:54] <KeiKurono> let's say the resource is inside an image directory, which is inside the jar
[16:26:59] *** TinyTom has joined ##java
[16:27:12] <rdg> portlet is a form where someone submits a URL with some mapping data.. portlet then launches a thread to take map data and create a file based on it
[16:27:57] <jottinger> that sounds like an ideal use for an MDB, not a user-managed thread
[16:28:02] <TinyTom> if I create an object called Car and have an array of Car, would Car = Car[0]; actually remove the item in position 0?  or just send the ref?
[16:28:03] <jottinger> use JMS, my friend
[16:28:05] *** AMcBain has joined ##java
[16:28:14] <jottinger> TinyTom: would COPY the ref
[16:28:16] <wlfshmn> I really need to look at JMS one of these days..
[16:28:20] <jottinger> wouldn't affect the array at all
[16:28:22] <rdg> ~mdb
[16:28:22] <javabot> rdg, mdb is the Microsoft Access file format, to access such files you can either use the odbc-jdbc driver that sun provides or you can try ~jackcess (non-jdbc) or the ~j-steal (commercial jdbc) driver
[16:28:28] <jottinger> rdg: ew
[16:28:30] <jottinger> ~jms
[16:28:30] <javabot> jottinger, 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
[16:28:31] <TinyTom> thats what I thouhght
[16:28:37] <jottinger> ~ejb
[16:28:38] <javabot> jottinger, ejb is Enterprise Java Beans. See http://java.sun.com/products/ejb/
[16:28:45] <jottinger> an MDB is a message-driven EJB
[16:29:00] *** Petein has joined ##java
[16:29:07] <fr0ggler> wlfshmn, likewise. i have a feeling it will figure in my future
[16:29:45] <rdg> i''ll need something like activemq involved in order to do that right
[16:30:14] <jottinger> yes
[16:30:18] <jottinger> you will
[16:30:20] *** Submarine has joined ##java
[16:30:28] <jottinger> luckily, even activemq doesn't suck enough to make that not pay off
[16:30:57] <rdg> i'm not entirely sure the production server i'll be working with has activemq or an equivalent on it
[16:31:45] *** convivial has quit IRC
[16:31:48] *** mreggen has quit IRC
[16:32:23] *** dbatbold has quit IRC
[16:32:33] <Petein> jottinger: hello
[16:32:39] *** EricInBNE has joined ##java
[16:34:05] <wlfshmn> fr0ggler: It's one of those things I've been sniffing around for years, but my projects tend to stop just short of getting enterprisy enough ;)
[16:35:25] *** convivial has joined ##java
[16:35:32] <jottinger> rdg: time to install! :)
[16:35:36] *** andrewh has joined ##java
[16:35:55] <rdg> eh. i'm the new guy. i'm not telling anyone what to do yet
[16:36:23] <jottinger> well, NOT telling them and spawning threads in a servlet container marks you as not only the new guy but a 'tard as well
[16:36:57] *** anders^ has joined ##java
[16:37:04] <_W_> rdg, I speak from experience when I say that being the new guy is the perfect time and place to suggest such things
[16:37:05] *** mazzachre has quit IRC
[16:37:36] <anders^> I am trying to write stuff to an output file (plain text). I can write to it and everything, but everytime I run the code it recreates the file from scratch and overwrites all old contents
[16:37:36] *** luneff has joined ##java
[16:37:41] <anders^> How do I prevent this?
[16:37:42] <_W_> "oh you don't /have/ X yet?"
[16:37:48] *** setz has quit IRC
[16:38:10] <anders^> If a file already exists i want it to just open it, else I want it to create a new one
[16:38:15] <rdg> the good news is it's on the server in question, so no more thread and switching to mdb
[16:38:26] <_W_> anders^, the term you are looking for is "append"
[16:38:45] <_W_> anders^, try looking for that term in the documentation of what you are using to write to the file :)
[16:38:57] <anders^> but the file gets blanked even if I just create a new File object without writing to it
[16:39:10] <anders^> i.e. File myFile = new File("testfile.txt");
[16:39:11] <_W_> a File object is a bit misnamed - it's really a FileName
[16:40:03] <_W_> new File("/no/such/dir/nonexistent.file") works just fine
[16:40:38] <fr0ggler> wlfshmn, yeah sounds the same for me. i had a skim read a while back and I was really interested, then work took over again
[16:40:53] <_W_> anders^, presumably you are using this File instance to get something that actually interacts with disk - /that's/ what you should look at
[16:41:14] <anders^> I'm not sure I understand what you're saying
[16:41:24] <Petein> any java middleware which compiles to C code, like nesC ?
[16:41:31] <_W_> anders^, you are not just doing new File("myfile").write("stuff"); right?
[16:41:32] *** drd20 has joined ##java
[16:41:48] *** EricInBNE has quit IRC
[16:42:04] <anders^> _W_: I'm just a PrintStream on the file
[16:42:05] <drd20> What opensource installers does any one like?
[16:42:10] <_W_> Petein, that would be kind of hard... how would it handle reflection? dynamic class loading?=
[16:42:17] *** dbatbold has joined ##java
[16:42:19] <_W_> anders^, aha
[16:42:36] <anders^> s/just/using/
[16:42:58] <_W_> anders^, Printstream's File and String constructors are really convenience methods that wrap things like FileOutputStream
[16:43:27] <_W_> if you want more control (like appending to a file instead of overwriting) you need to construct the output stream yourself
[16:43:28] *** EricInBNE has joined ##java
[16:43:39] <anders^> but the problem isnt that im overwtiting the file when i write to it
[16:43:53] <anders^> it's that creating my File object automatically overwrites the existant file
[16:44:01] <_W_> File objects don't write to files
[16:44:01] <Petein> _W_: it may not. ive seen a bit of nesC today and im asking if there is something similar. i know that corba or rmi are things similar to what ive seen but nesC is much faster. it creates python-like code to C code and deploys that
[16:44:45] <_W_> anders^, creating File objects never affect files on disk - you have misunderstood what your code does
[16:46:28] <anders^> so you're saying the problem lies with my PrintStream and that I should look towards the output method/object?
[16:46:42] <_W_> ~~ anders^ javadoc FileOutputStream
[16:46:44] <javabot> anders^: http://is.gd/3wDJd [JDK: java.io.FileOutputStream]
[16:47:15] <anders^> _W_: thanks for explaining and pointing me in the right direction
[16:47:18] <anders^> I'll RTFM for a while :)
[16:48:54] *** jerkface03 has quit IRC
[16:50:03] *** EricInBNE has quit IRC
[16:52:57] <sgronblo> Trying to learn about JAX-RS but I can't really find the PackagesResourceConfig class in its javadocs
[16:53:08] *** drd20 has quit IRC
[16:53:24] *** Jaimie has joined ##java
[16:54:27] *** Resistance has quit IRC
[16:55:12] *** EnginA has quit IRC
[16:56:04] <sgronblo> never mind
[16:56:19] *** xabbuh has joined ##java
[16:56:48] *** wlievens has quit IRC
[16:57:28] *** dinesh___ has quit IRC
[17:00:41] *** kibibyte has quit IRC
[17:01:25] <mapreduce> ztj: Regarding the embedding of Derby, apparently I need to add the Derby thing to Glassfish as a JDBC resource.  I guess that's because we're specifying derby in web.xml, otherwise, how does the application server even know we need Derby?
[17:01:27] *** deepjoy has joined ##java
[17:01:46] <mapreduce> ztj: Oh, and you were right, it's world-accessible, they didn't lock it to localhost. :(
[17:02:31] <mapreduce> I was hoping to just modify the connection string in the source and run the thing, but there's a 15-page deployment guide.
[17:02:38] *** nitrix has joined ##java
[17:03:41] <nitrix> hi all
[17:04:42] *** cyth has joined ##java
[17:05:09] *** Gracenotes has quit IRC
[17:05:16] <nitrix> I'm using ACEGI, and I saw that ExceptionTranslationFilter is the class that save the request, but I didn't find where this filter is being instanciated (this filter runs in any HTTP call)
[17:05:23] <mapreduce> Hmm.  Why do I need to create a connection pool, as in http://number9.hellooperator.net/articles/2008/05/15/javadb-and-glassfish-v3-to-embed-or-not-to-embed ?
[17:05:52] *** dawciobiel has quit IRC
[17:06:21] *** [twisti] has joined ##java
[17:06:26] <nitrix> Does anyone know where this filter is put in the web context ? I'm asking this because I have 2 projects, and this filter is instanciated only in one of them
[17:06:53] <nitrix> (there is nothing in the web.xml)
[17:06:56] <[twisti]> is there a way to sort of set a directory on the file system to "watched" and be alerted somehow when files are put there ? or would i have to poll it manually every few minutes ?
[17:07:27] <ianp> you'll have to poll
[17:10:35] <deebo> anyone know of an xml parse that can self correct ? like missing end tags etc
[17:10:38] *** finalbeta has joined ##java
[17:11:50] *** amacleod has quit IRC
[17:11:55] <cyth> deebo, for xml specifically? or do you mean html/xhtml?
[17:12:11] <fr0ggler> [twisti], or use a preexisting library like JNA
[17:12:21] <fr0ggler> ~~[twisti] jna
[17:12:22] <javabot> [twisti], jna is Java Native Access, an alternative means of using native code from within Java. See https://jna.dev.java.net/
[17:12:22] <deebo> well basically, trying to get a DOM of a broken xhtml page i cant fix
[17:12:38] <[twisti]> thanks fr0ggler
[17:12:40] <cyth> deebo, check out jtidy
[17:13:05] <[twisti]> fr0ggler: any idea what the thing i want is called so i know what to look for ?
[17:13:25] *** ldam has joined ##java
[17:13:54] <deebo> cyth: that should work, thanks
[17:14:31] <fr0ggler> [twisti], after some googling, FileMonitor
[17:14:37] <[twisti]> thanks
[17:14:49] <mapreduce> I have an app that depends on a toolkit, using maven for dependencies.  When app depends on toolkit-1.0, a failure happens.  When I adjust it to depend on toolkit-1.1-SNAPSHOT, it succeeds.
[17:15:09] <mapreduce> But there are no changes other than the version numbers between 1.0 and 1.1-SNAPSHOT.
[17:15:19] <fr0ggler> mapreduce, what's the failure?
[17:15:41] <mapreduce> A runtime problem that I hoped I'd fixed before 1.0.
[17:15:58] <mapreduce> Namely, some code relying on an image wasn't finding it as I'd moved the code but not the image sometime.
[17:16:00] *** Eblis has joined ##java
[17:16:05] <Eblis> hi
[17:16:27] <fr0ggler> mapreduce, hm. well i doubt i can suggest anything that you haven't already thought of :)
[17:16:27] *** guille_ has quit IRC
[17:17:11] *** amacleod has joined ##java
[17:17:11] <elmomalmo> mapreduce: I get issues like that sometimes. It's usually because the 1.0 that's in the local repo isn't the latest 1.0 available
[17:17:16] *** Segaja has left ##java
[17:17:19] <Eblis> i'm building a JNI library and i was wondering if it's ok to call JNIEnv->throwException() more than once from the same native method ? Is it allowed ? What happens in this case, which exception gets thrown ?
[17:17:27] <mapreduce> Only one 1.0 was ever built.
[17:18:06] *** omaru has joined ##java
[17:18:18] *** JoshuaL has quit IRC
[17:18:33] *** e1n85 has joined ##java
[17:18:34] * mapreduce builds another to pass the time.
[17:21:03] *** whaley has quit IRC
[17:21:11] *** chaz has quit IRC
[17:21:43] *** Gracenotes has joined ##java
[17:22:44] *** setz has joined ##java
[17:23:48] *** k0tk0t has joined ##java
[17:24:37] <k0tk0t> Question: When you create a HashMap and use a string as the key, and you try to retreive a value by key, does it compare the strings or does it check if the two objects are the same instance?
[17:25:03] *** hnr has joined ##java
[17:25:30] <SeriousWorm> ~tias
[17:25:31] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[17:26:52] <[twisti]> meh
[17:26:55] *** t0rc has quit IRC
[17:27:16] <k0tk0t> SeriousWorm
[17:27:21] <k0tk0t> I'm working on a fairly large project
[17:27:23] <SeriousWorm> (k0tk0t: it uses object.equals() for comparison.)
[17:27:28] <k0tk0t> thanks.
[17:27:31] <SeriousWorm> np. :)
[17:27:35] <[twisti]> im looking for ideas on how to communicate between a php script and a running java program (same server, linux). any ideas ? it seems all options sort of suck
[17:27:38] <fr0ggler> ~~k0tk0t javadoc HashMap.get(*)
[17:27:49] <javabot> k0tk0t: http://is.gd/9Gzio [JDK: java.util.HashMap.get(Object)]
[17:27:51] <[twisti]> err, communicate in the sense that the script sends a message to the java program
[17:27:53] <[twisti]> not two way
[17:28:00] *** elfgoh has quit IRC
[17:28:12] *** finalbeta has quit IRC
[17:28:30] <SeriousWorm> well if anything else fails, you can use sockets, heh.
[17:28:35] <SeriousWorm> everything else*
[17:28:45] <[twisti]> yeah, thats amongst the sucky methods :|
[17:28:47] <mapreduce> [twisti]: A co-worker of mine has one write a file and the other read it.
[17:29:00] *** Windcape has left ##java
[17:29:01] <mapreduce> That's sucky too, but it works for his needs.
[17:29:03] <SeriousWorm> hm, I don't think that's even close to optimal :/
[17:29:04] <[twisti]> mapreduce: then i have to poll the file/directory every x seconds, also sucky
[17:29:14] <SeriousWorm> my vote is for sockets, unless there's a more advanced method.
[17:29:22] <mapreduce> Isn't polling quite usual in web dev?
[17:29:32] <fr0ggler> mapreduce, aye, at some level
[17:29:35] <mapreduce> Polling might be better than blocking.
[17:29:36] <[twisti]> the java program has nothing to do with the web
[17:29:39] <SeriousWorm> sockets cause no disk I/O.
[17:29:57] <mapreduce> SeriousWorm: Files don't have to cause disk I/O either.
[17:30:06] <SeriousWorm> really? how?
[17:30:06] <[twisti]> especially not in the temp directory
[17:30:09] <SeriousWorm> oh
[17:30:11] <SeriousWorm> right.
[17:30:13] <[twisti]> those are always almost cached
[17:30:15] <mapreduce> Or on a ramdisk.
[17:30:27] *** waza-ari has quit IRC
[17:31:41] *** GrooveDroid has quit IRC
[17:31:56] <[twisti]> i hate writing ugly things :(
[17:32:09] *** [TechGuy] has quit IRC
[17:32:36] <Eblis> i'm building a JNI library and i was wondering if it's ok to call JNIEnv->throwException() more than once from the same native method ? Is it allowed ? What happens in this case, which exception gets thrown ?
[17:32:40] <[twisti]> the data is purely ascii-7 strings if that matters
[17:33:04] *** jornp has quit IRC
[17:33:17] <[twisti]> i could probably run the java app in a screen and use console input and then from the php script pipe the dat...BAD TWISTI!
[17:33:38] <[twisti]> its funny how that seemed like a good idea until i started typing it out
[17:33:56] *** chaz has joined ##java
[17:34:18] *** Resistance2 has joined ##java
[17:34:23] *** Resistance2 is now known as Resistance
[17:34:35] *** marcosRz has quit IRC
[17:35:45] <mapreduce> fr0ggler: The earlier issue reared its head again when I built 1.1-SNAPSHOT using maven insead of IDEA.
[17:36:13] *** Laserbeak43 has joined ##java
[17:36:51] *** scummos__ has joined ##java
[17:36:56] *** hnr has quit IRC
[17:37:00] <fr0ggler> mapreduce, i guess that's why I never use IDEA to build. if it works on the command line, at least you have a better chance of it being reproducible. still weird tho.
[17:37:23] <fr0ggler> [twisti], anything php <-> java is going to suck
[17:37:36] <[twisti]> dont i know it
[17:37:50] <[twisti]> in fact id shorting it to anything php is going to suck
[17:37:56] <[twisti]> shorten*
[17:39:19] <mapreduce> fr0ggler: I use IDEA to build because it's faster than maven is.  I'll probably keep doing that until I waste more time because of differences between IDEA and command-line is greater than the time I save.
[17:39:31] <mapreduce> s/that sentence/a grammatically sound one/
[17:39:43] <fr0ggler> i got the gist :)
[17:40:34] *** ntoll has joined ##java
[17:43:05] *** corpsicle has quit IRC
[17:43:09] <anders^> What would the syntax be to create an array of hashmaps?
[17:43:13] <anders^> or an arraylist, even
[17:43:21] <nmx> i have been thinking about checking out IDEA, but never having really used a java IDE, is it feasible to spawn, say, ant from IDEA so that my existing build process would stay the same?
[17:43:30] <jottinger> sure
[17:43:52] *** realtime_ has joined ##java
[17:44:30] <fr0ggler> nmx, i'd recommend checking it out. it's a nice IDE.
[17:44:33] *** j`ey has joined ##java
[17:44:58] <j`ey> can I get an array of matches from a regex, instead of using match.find() and looping?
[17:45:03] <scummos__> hi. i'm trying to create a testcase java applet (that browser stuff) which draws anything with OpenGL. being new to the java world, i'm somewhat lost in the jungle of frameworks and opengl implementations... does anyone have a good point where to start for me?
[17:45:03] *** dframe has left ##java
[17:45:06] <nmx> hmm. i unpacked and tried to run it and it insisted upon a jdk being installed, though
[17:45:16] <nmx> i guess this is offtopic
[17:45:37] <[twisti]> j`ey: probably not easily, regex is designed with streams and large amounts of data in mind
[17:45:40] <rvsjoen> i'm using java3d, and i'm having some issues trying to rotate an object around it's center instead of the scene center using Transform3D objects, I understand that I need to translate the object to 0,0,0, rotate and then translate back but I'm not sure how to do that, http://pastebin.com/pi1L0L0F my current code rotates the object, but around the center of the scene
[17:45:43] <mapreduce> nmx: Do you not have a JDK installed?
[17:46:01] <j`ey> [twisti]: i see
[17:46:10] <j`ey> [twisti]: sure my friend said he did it :/
[17:46:21] <nmx> mapreduce: i don't. it could be done, but the whole build environment i use currently lives on a different server. when i build now from emacs it just does an 'ssh remotehost ant -f blah.xml'
[17:46:26] *** Eblis has left ##java
[17:46:27] <[twisti]> he did what ?
[17:46:40] <j`ey> got an array
[17:46:47] <[twisti]> then ask him how he did it
[17:46:55] <j`ey> i did, but he diidnt reply yet so. :P
[17:47:04] <[twisti]> its not like its rocket surgery to make a loop that puts the results in an array
[17:47:37] <j`ey> why do that.. if it canbe done for me :P
[17:47:52] <fr0ggler> anders^, List<HashMap<Foo, Bar>> foobarMaps = new ArrayList<HashMap<Foo, Bar>>();
[17:48:06] <fr0ggler> j`ey, good attitude. you'll go far. :|
[17:48:28] <anders^> fr0ggler: thanks!
[17:48:31] *** elfgoh has joined ##java
[17:48:31] <j`ey> fr0ggler: so, if there is already a method for it, I should rewrite it anyway?
[17:48:36] *** chad has quit IRC
[17:49:18] <fr0ggler> j`ey, some things you do have to do yourself.
[17:49:27] <j`ey> fr0ggler: and others you don't.
[17:49:42] <fr0ggler> i sense a cyclical nature to this discussion.
[17:49:48] <j`ey> fr0ggler: same :P
[17:51:41] *** Petein has left ##java
[17:53:26] *** amacleod has quit IRC
[17:55:00] *** platzhirsch has quit IRC
[17:55:35] *** joev has quit IRC
[17:57:31] *** vsync has joined ##java
[17:57:33] *** teralaser has quit IRC
[17:57:50] *** platzhirsch has joined ##java
[17:58:56] *** jor has joined ##java
[17:59:26] *** multi_io has joined ##java
[17:59:39] <fr0ggler> I never thought I'd love going back to coding prepared statements until I used Hibernate. it's like going back home where you know a baboon has been hiding all day, and instead of finding shit thrown about the place, he's kindly tidied up and done your washing.
[18:00:15] *** pgib has joined ##java
[18:00:25] <fr0ggler> and Spring templates = win
[18:01:23] *** Submarine has quit IRC
[18:01:32] <_W_> I'm not fond of any of those choices
[18:01:39] <_W_> what's wrong with SQL?
[18:02:00] *** scummos__ has quit IRC
[18:02:07] *** jcp has joined ##java
[18:03:21] <m0> I am trying to figure out why my prepared statements don't work while normal statments work fine. Anyone have experience on Oracle environment? http://pastebin.com/tPPQ9pS0
[18:03:53] *** KeiKurono has quit IRC
[18:04:09] *** dpy has quit IRC
[18:04:30] <fr0ggler> _W_, well Spring templates i've found to be the best of both worlds. you can still go back to the most low level SQL if you want. they just have some nice convenience stuff that makes ORM a whole lot less of a headache than Hibernate
[18:04:48] <m0> The thing is, the callcode is a 'char' of 6 length. If I find something where its callcode = '1' it doesn't update the query using PreparedStatements, while with normal Statements it works fine.
[18:04:52] <_W_> have they added generics to them yet?
[18:04:59] *** ntoll has quit IRC
[18:05:10] *** jivedude has quit IRC
[18:05:15] *** finalbeta has joined ##java
[18:05:45] *** anders^ has quit IRC
[18:05:48] <charzero> m0: Try changing whitespace randomly. I have found cases where changing only whitespace makes a non-working query start to work with Oracle's JDBC driver.
[18:05:51] <m0> This is on Oracle RAC setup, I have done the trace here http://pastebin.com/eYHzTg4w  I have experience in JDBC, and I know prepared statements pretty well, but I can't seem tof igure out why it works for Statement and not PreparedStatement.
[18:06:19] <m0> charzero: what do you mean change whitespaces randomly?
[18:06:23] <mapreduce> fr0ggler: And solved.. it was a jpeg in src/main/java instead of src/main/resources
[18:06:51] <charzero> m0: I had a query that worked if I had 4 or more spaces between "SELECT" and the first column name, but not if I had 1, 2, or 3 spaces.
[18:07:07] <fr0ggler> mapreduce, ah, that'll do it :)
[18:07:47] <m0> charzero: if I include all the whitespaces in the "CHAR" it works fine in prepared statemtns.
[18:08:02] <fr0ggler> _W_, aye
[18:08:14] <m0> charzero: for example, update csrccodr set description='abc' where callcode='1     '
[18:08:27] <fr0ggler> _W_, "Spring 3.0 updates all of the following approaches with Java 5 support such as generics and varargs."
[18:08:32] <m0> charzero: while this doesn't work in PreparedStatements in Oracle, update csrccodr set description='abc' where callcode='1     '
[18:08:35] <charzero> m0: That is a different issue entirely.
[18:08:36] <_W_> fr0ggler, wow, really? I just did a quick search after asking the question, and found no api for 3.0
[18:08:40] <fr0ggler> http://static.springsource.org/spring/docs/3.0.x/reference/html/jdbc.html
[18:08:40] <m0> err where callcode='1'
[18:08:49] <_W_> excellent. thanks
[18:08:54] *** bnewton has joined ##java
[18:09:01] <fr0ggler> np
[18:09:09] <multi_io> is it possible to constrain the selection of a JList?
[18:09:13] *** Segnale007 has quit IRC
[18:09:22] <m0> The server is using a rac environment, take a look at the driver url here: http://pastebin.com/eYHzTg4w  line 3
[18:09:23] <multi_io> Example: prevent the first 5 elements from being selected
[18:10:14] <Resistance> ~~ multi_io ListSelectionModel
[18:10:15] <javabot> multi_io, I have no idea what ListSelectionModel is.
[18:10:23] <j`ey> can someone show me an example of how to loop through matches of a regex?
[18:10:51] <_W_> fr0ggler, heh, they still use some raw types in their examples on that page though ><
[18:10:57] <m0> This issue is driving me nuts :( I don't know why Oracle doesn't like '1' = '1      ' for PreparedStatments if I have a RAC setup while if I don't do clustering, it works just fine.
[18:11:21] <charzero> m0: Try PreparedStatement.setCharacterStream()
[18:11:53] <m0> charzero: where do I set that?/
[18:12:07] <m0> charzero: reading docs ... one sec
[18:12:19] <fr0ggler> _W_, hm i guess they haven't got round to updating them all, hence the big "NOTE" at the top :)
[18:12:22] <_W_> fr0ggler, anyway, that's good news, and makes me want to remake my ORM and base it on JdbcTemplate
[18:12:38] <fr0ggler> _W_, honestly, a colleague recommended it, and it's so easy
[18:13:13] <multi_io> Resistance: ok, I know about that class. So I would just have my own ListSelectionModel and ignore any requests to select one of the first 5 elements?
[18:14:42] <multi_io> will JList honour that, then? E.g. the 6th element is selected, user presses <cursor up>, and nothing happens?
[18:14:47] <Resistance> multi_io, correct
[18:15:30] *** Matic`Makovec has joined ##java
[18:15:30] *** LouisJB has quit IRC
[18:18:10] <multi_io> hm, it would probably deselect everything then
[18:19:11] *** acuster has quit IRC
[18:19:24] *** deSilva has joined ##java
[18:19:25] *** epure has joined ##java
[18:19:54] *** anders^ has joined ##java
[18:21:38] *** xabbuh has quit IRC
[18:29:42] <m0> I feel like overriding executeQuery for prepared statements to use the original normal statements instead to make this work.
[18:32:24] <m0> Can anyone interpret what is being passed in the JDBC trace? http://pastebin.com/eYHzTg4w ?
[18:33:46] *** flavioribeiro has joined ##java
[18:34:32] *** keks_bla has joined ##java
[18:34:47] *** r1nu- has joined ##java
[18:37:47] *** prc33 has joined ##java
[18:38:14] *** prc33 has left ##java
[18:39:43] *** peper has joined ##java
[18:39:51] <_W_> fr0ggler, upon further investigation, the transfer to generics is a bit lacking in parts as well
[18:40:45] <fr0ggler> _W_, i must admit, I haven't delved in fully, so I don't pretend to know about all the bits and bobs :)
[18:40:58] <_W_> it's painful how few libraries actually support language features that are many years old
[18:41:29] *** flowr has quit IRC
[18:43:00] *** arpu has quit IRC
[18:43:25] *** Terabyte has joined ##java
[18:44:12] <Terabyte> hi, i have a 'Model' class object, it's my own class, not provided to me, is there a quick way to 'copy' an object? do i have to write any code in the class or is there something alreayd there for me?
[18:44:23] *** Gracenotes has quit IRC
[18:44:39] *** bitshuffler has joined ##java
[18:44:47] <_W_> Terabyte, there is, but you should make your own regardless (a copy constructor is good)
[18:44:54] <_W_> ~clone
[18:44:55] <javabot> Making deep copies of objects: http://java.sun.com/developer/JDCTechTips/2001/tt0410.html#making  Cloning Objects: http://java.sun.com/developer/JDCTechTips/2001/tt0306.html#cloning  Making defensive copies of objects: http://java.sun.com/developer/JDCTechTips/2001/tt0904.html#tip1 also see: http://mindprod.com/jgloss/clone.html
[18:45:35] <Terabyte> woo, thanks
[18:45:48] *** bov has quit IRC
[18:46:14] *** Jaimie has quit IRC
[18:46:52] *** [Justice] has quit IRC
[18:50:51] *** dphase has joined ##java
[18:51:38] *** Matic`Makovec has quit IRC
[18:52:45] *** Stew-a has joined ##java
[18:52:52] *** genesiss has quit IRC
[18:53:10] <nmx> i don't think the author of that 'defensive copies' link understands geometry very well
[18:53:52] <Stew-a> how would i go about forcing a JFrame to be perfectly square always, even when user-resized
[18:53:56] *** Varox has joined ##java
[18:54:57] <SeriousWorm> jframe.setResizable(false)
[18:55:03] *** ztj has quit IRC
[18:55:08] *** WrathOfTheMath has quit IRC
[18:55:19] <SeriousWorm> ah, nevermind. register a window event listener i think..
[18:55:35] <Stew-a> i want it resizable, but i only want it to have a specific aspect ratio
[18:56:06] <SeriousWorm> try addwindowlistener or something like that, i think the resize is a WindowEvent or some such.
[18:56:20] <SeriousWorm> so when user resizes the window, you re-resize it correctly.
[18:56:50] *** JusticeFries has joined ##java
[18:56:54] <Stew-a> WindowEvent only appears to have events for open, close, focus, blur, minimise, restore etc, i didn't see resize
[18:57:15] <SeriousWorm> i wish surial was here. i optimized my taylor sin approximation to be almost 8 times as fast as Math.sin, heh. error is now under 1e-7.
[18:57:21] *** JusticeFries has quit IRC
[18:57:38] *** curiousbob has joined ##java
[18:58:32] *** merp has joined ##java
[18:58:58] <Stew-a> ah, componentlistener has the resize event, thanks for the pointer
[18:59:22] *** JusticeFries has joined ##java
[18:59:34] <curiousbob> hi, I trying to create a scrollable JPanel that display several labels, but I have having trouble getting the vertical scrollbar to work. The horizontal scroll works fine.
[18:59:59] *** Gracenotes has joined ##java
[19:01:51] *** JusticeFries has quit IRC
[19:02:05] *** ninan has quit IRC
[19:02:40] *** JusticeFries has joined ##java
[19:02:43] <svm_invictvs> Where's robo?
[19:02:44] <svm_invictvs> :(
[19:03:19] *** Ruum has joined ##java
[19:03:28] *** geaaru has quit IRC
[19:05:00] *** JusticeFries has quit IRC
[19:05:01] *** hnr has joined ##java
[19:05:15] *** hnr has quit IRC
[19:05:44] *** amacleod has joined ##java
[19:06:12] *** hnr has joined ##java
[19:06:22] <rdg> jottinger: so I'm trying to do an MDB like you said.. when my code tries to get a new ActiceMQConnectionFactory ... it craps out.. the exception simply says  "Servlet threw an exception" ...  http://kohana.pastebin.com/TvVqUNvJ  is the stacktrace .. thoughts?
[19:06:31] *** psst has quit IRC
[19:06:38] *** JusticeFries has joined ##java
[19:06:42] <jottinger> well, YOU don't do that, you should get it from JNDI
[19:06:45] <jottinger> but let me look
[19:06:46] *** tsdh has joined ##java
[19:07:15] <jottinger> oh, classpath issue, see line 110
[19:07:55] <rdg> wait.. could you explain more about me not doing that.. i'm using the code that a java programmer used to teach me this stuff.. and it worked in what he taught me.. but if I'm doing it wrong I'd like to do it the right waty
[19:07:58] *** rook2pawn has joined ##java
[19:08:04] <Stew-a> i've got a jframe who's entire contents are a jpanel with a custom paint method, for some reason about half the time when the window shows, the jpanel isn't painted, and repaint doesn't do anything, it just sits there blank until i resize the window
[19:08:57] <rdg> hm. i'm not sure how I get a noclassdef on this.. i'm including the jar in the war
[19:10:47] <tsdh> I'm stuck with generic methods. I want a createList(Class<T>) method that returns a new ArrayList<T>.  What I have is http://pastebin.ca/1822883. But can I use that (or something different) to create a List<T> where T is somthing like Set<Integer>?
[19:11:22] *** [TechGuy] has joined ##java
[19:12:14] <m0> Anyone knows about setFixedCHAR for PreparedStatement?
[19:12:26] <m0> Is there a way to make that the default?
[19:12:58] *** Ivellina has joined ##java
[19:12:58] *** Stew-a has quit IRC
[19:13:43] <m0> Never mind, found out hjow.
[19:13:58] *** duncanm has joined ##java
[19:14:21] *** bitterman has joined ##java
[19:17:51] *** elfgoh has quit IRC
[19:18:01] *** luneff has quit IRC
[19:18:34] <_W_> tsdh, of course you can
[19:18:38] <_W_> T can be /any/ type
[19:18:54] <_W_> (any object type anyway, primitives need their wrapper class)
[19:22:23] *** CMoH has joined ##java
[19:22:42] <mapreduce> Eclipse is just too hard to use.
[19:24:00] <waz> ~barbie Eclipse
[19:24:01] <javabot> <barbie>Eclipse is hard!</barbie>
[19:24:11] <saml> hey, how can I profile a web app running on a server?
[19:24:15] <waz> ~eclipse--
[19:24:15] <javabot> eclipse has a karma level of -160, waz
[19:24:18] *** LouisJB has joined ##java
[19:24:20] <saml> i opened visualjvm  and it really hangs
[19:25:05] <tsdh> _W_: But how do I get the class of lets say Set<Integer, to pass it to createList()?
[19:25:26] <mapreduce> waz: I'm on the verge of ordering somebody to stop using Eclipse.
[19:25:34] *** yup has joined ##java
[19:25:43] <yup> hello
[19:25:52] <yup> I have a problem with a one java network application, thereis preference to use ipv4 stack and if I use it application works correctly, but when I do not specify to use ipv4 then application gives error - Network is unreachable. So I assume that the problem is with ipv6 configuration, what can I do in such case ?
[19:26:09] *** ruins has joined ##java
[19:26:24] <nmx> ~~yup techsupport
[19:26:25] <javabot> yup, Hello, ##java is not a technical support channel for your Java apps or virtual machines, it is a development enthusiast channel which prefers to receive questions and discussion on the topic of programming with the Java language.  Please consider seeking help with the vendor of your software if you can't figure out how to use it.
[19:26:40] *** ruins has left ##java
[19:27:08] <mapreduce> waz: I had a go at doing something he was unsure about, and had it completely fail to check something out of svn.  I clicked the Finish button, and the 'new project' wizard appeared again in a new window.  For fun I did it once more and had 3 of the buggers.
[19:27:11] *** j`ey has left ##java
[19:27:27] *** gratz|home has joined ##java
[19:27:40] <waz> heh
[19:27:43] *** yup has quit IRC
[19:28:03] <mapreduce> He uses Tortoise for SVN, and now I know why.
[19:29:08] *** arpu has joined ##java
[19:29:18] *** pstickne has joined ##java
[19:29:37] *** brahle has joined ##java
[19:29:39] <brahle> hi
[19:30:09] *** Submarine has joined ##java
[19:30:10] <brahle> I have a String[] and I would like to create a new String[] from it but without the first element
[19:30:18] <brahle> How can I do it?
[19:30:29] *** devendra has joined ##java
[19:31:03] <mapreduce> brahle: new and System.arraycopy
[19:31:45] *** taras has joined ##java
[19:31:58] <RLa> substring
[19:32:07] <_W_> tsdh, ah
[19:32:11] <RLa> oh
[19:32:14] *** exobyte has joined ##java
[19:32:16] <RLa> array of strings
[19:32:21] <_W_> tsdh, make the generic type a class parameter instead, then you can specify it specifically
[19:32:27] <brahle> mapreduce:thanks
[19:32:33] <RLa> ignore me
[19:32:34] <_W_> (the same way you can have a List<Set<Something>>=
[19:33:26] <exobyte> Is there a static versions of "this?"  I know I can just used the class name, but it's not clean that I meant THIS class, not some other class
[19:33:30] <taras> hi. are there some image formats converting library for java?
[19:33:35] <exobyte> s/versions/version/
[19:34:06] <_W_> exobyte, it's perfectly clean
[19:34:11] <exobyte> taras: did you google it?
[19:34:27] <RLa> see java image api
[19:34:28] <_W_> and no, there's nothing else
[19:34:41] <exobyte> _W_: guess it's clean enough, then
[19:34:53] <exobyte> taras: http://www.roseindia.net/java/example/java/swing/ConvertImageToFormats.shtml
[19:35:10] <exobyte> taras: first result on google for "image format convert java"
[19:35:38] *** Xianny has joined ##java
[19:36:57] <Ruum> ~javadoc BoxLayout
[19:36:59] <javabot> Ruum: http://is.gd/9H2Jp [JDK: javax.swing.BoxLayout]
[19:37:21] *** platzhirsch has quit IRC
[19:38:08] *** Descra has joined ##java
[19:38:13] <exobyte> for all the effort people went to to get 5-character domain names, we still have the whole // fuckup
[19:38:47] <exobyte> is <protocol>: really so bad?
[19:38:51] <tsdh> _W_: I cannot use a generic class parameter.  That whole stuff is in a code generator, and there should be one factory method that creates an empty instance of any List<T> for any type T, may it be another generic like Set<Map<String, List<Integer>>> or just a simple Integer...
[19:39:17] <rdg> damn i guess jottinger isn't around
[19:39:34] <_W_> tsdh, I don't understand your argument against a class parameter
[19:39:56] *** waza-ari has joined ##java
[19:40:32] <_W_> but you can't say List<String>.class, so it's all you got
[19:41:09] *** rhlampe has joined ##java
[19:41:18] <rdg> can someone tell me when I need to set the Class-Path in my Manifest.MF (I'm working with a portlet)..  http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html isn't particularly clear to me
[19:41:36] <waza-ari> Hello all. I have a Java Thread waiting for some action using a blocking method. How can i stop this thread? All these "use a controlling variable in a while construct" does not work for me, because the thread is using a blocking method.
[19:42:11] *** bitterman has quit IRC
[19:42:38] <pstickne> waza-ari, you generally try not to do that :) you -can- send an interrupt, and hopefully that will be nice enough to unblock said method.
[19:42:50] <mapreduce> waza-ari: You can close the resource that the thread is blocking on.
[19:42:50] <pstickne> waza-ari, and there is the DEPRECATED stop
[19:43:03] <pstickne> ...or listen to mapreduce :P
[19:43:11] <nmx> pstickne: don't speak its name
[19:43:21] <pstickne> mapreduce, while (1) { /* close me ^^ */ }
[19:43:28] * pstickne snickers and walks away
[19:43:35] <pstickne> err, I fail anyway...
[19:43:55] *** Phil has joined ##java
[19:44:40] *** Phil has quit IRC
[19:44:52] *** Phil has joined ##java
[19:45:00] <tsdh> _W_: The method is in some class which has nothing to do with T; it's not specialized for T...  Well, I guess I'll have a look how the EMF guys handle that in their code generators.
[19:45:42] <mapreduce> tsdh: ? instead of T might be an option then, though I'm not following your discussion.
[19:45:52] <waza-ari> mapreduce: it is an executor's invokeAll method which is blocking...
[19:46:12] <waza-ari> and this is waiting for a message from the networkclient using a Scanner.
[19:46:15] *** tauren has joined ##java
[19:46:29] *** b3nn3tt has joined ##java
[19:48:38] <_W_> tsdh, sounds like you have a class that does more than it should then
[19:48:51] <tsdh> mapreduce: The problem is a generic <T> List<T> createList(Class<T>) method, and I want it to work for type including other generics. But createList(Set<Integer>.class) is no valid java. I could live with casting, if that would do the trick.
[19:49:02] <Ruum> ~javadoc BorderFactory
[19:49:02] <javabot> Ruum: http://is.gd/9H5ld [JDK: javax.swing.BorderFactory]
[19:49:34] <_W_> tsdh, any reason why you can't just do <T> List<T> createList()?
[19:49:56] *** sebersole has quit IRC
[19:50:23] *** sebersole has joined ##java
[19:50:31] *** lilalinux is now known as lilalinux_away
[19:50:41] *** tolland has quit IRC
[19:50:45] *** lilalinux_away is now known as lilalinux
[19:51:08] *** brahle has quit IRC
[19:51:08] *** tauren has quit IRC
[19:51:38] <rdg> if my portlet has a jar in its WEB-INF/lib directory, do I need to mention it explicitly in my MANIFEST.MF?
[19:51:43] *** srm has quit IRC
[19:53:22] *** tolland has joined ##java
[19:53:38] *** fr0ggler has quit IRC
[19:53:54] *** Ilod has joined ##java
[19:54:04] *** waza-ari has quit IRC
[19:54:10] *** RLa has quit IRC
[19:54:11] <tsdh> _W_: Here's the context: The createList() method is in Graph. A Graph contains vertices and edges.  Those are typed and attributed, and a code generator generates classes deriving from Graph, Vertex, and Edge.  All elements can have attributes of any type, including things like List<Set<Map<Integer, String>>>. To load such a graph, the code generator has to instantiate such a deeply nested generic thing...
[19:54:51] <_W_> I still do not understand why this is a problem
[19:55:12] *** genesiss has joined ##java
[19:55:17] <_W_> this is what generics were made to solve
[19:55:25] <Ruum> hey guys I need help with one more thing plz
[19:55:27] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jar
[19:55:37] <_W_> perhaps you're just not understanding them correctly, or possibly the code generator people you are talking about don't
[19:56:14] <Ruum> the BoxLayout is trying to cram all of the JLabels and JTextFields into one line
[19:56:34] <Ruum> and I would like it ATLEAST on 2 lines
[19:56:34] <_W_> Ruum, pastebin the code instead, I doubt anyone is going to download, unpack, and inspect a jar file
[19:56:37] <nmx> Ruum: yes, that's what BoxLayout does
[19:56:48] <Ruum> kk well I just want you guys to run it
[19:56:55] *** bnewton has quit IRC
[19:57:04] <Ruum> I will do a paste bin in a second
[19:57:06] *** CMoH has quit IRC
[19:57:08] <nmx> there's no point in pasting the code.
[19:57:12] <nmx> that's how boxlayout works.
[19:57:15] *** getisboy has joined ##java
[19:57:18] <nmx> if you want a different result use a different layout
[19:57:40] <Ruum> what about gridbag?
[19:58:02] <nmx> gridbaglayout gives you the most flexibility. alternatively you can nest layouts
[19:58:29] <_W_> I feel obliged:
[19:58:36] <_W_> ~totally gridbag
[19:58:37] <javabot> _W_, totally gridbag is http://madbean.com/anim/totallygridbag/
[19:59:54] *** ruins has joined ##java
[20:00:37] *** ruins has left ##java
[20:02:26] <Ruum> W lol that was funny
[20:02:40] <Ruum> but.... this STILL doesnt solve my problem
[20:03:59] <Ruum> if I could get this on about maybe 2 lines instead of one line then it wont looks so bad
[20:04:11] <_W_> I can only say "you must be doing some GUI coding... poor sap"
[20:04:20] <Ruum> haha
[20:04:22] <Ruum> ya I am
[20:04:28] <Ruum> but I am almost done with it
[20:04:30] <curiousbob> is it possible to have a scrollable JPanel that contains a bunch of different Components?
[20:04:33] <tsdh> _W_: You are right.  That method was only convenience for simplifying the code generator which worked good until someone tested with deeper nested generics.  So I'll get rid of that method alltoghether and change the generator.
[20:06:37] *** keks_bla has quit IRC
[20:07:01] *** Chetic has quit IRC
[20:07:14] *** CMoH has joined ##java
[20:08:02] *** androoid has joined ##java
[20:08:12] <Ruum> so W I take it that you dont like GUI programming?
[20:08:16] *** RLa has joined ##java
[20:08:39] *** keks_bla has joined ##java
[20:08:54] *** bnewton has joined ##java
[20:09:32] *** alkos333 has quit IRC
[20:09:49] <androoid> gui is the shiznit
[20:10:06] <Ruum> ya I like GUI programming
[20:10:16] <Ruum> but I just need to get this to look right
[20:10:22] <Ruum> all the elements are there now
[20:10:25] <Ruum> for the most part
[20:10:32] <Ruum> I just got to get this to look good
[20:11:06] <Ruum> right now it looks like some sloppy, sloppy, $H!+ !!!!!
[20:11:12] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jar
[20:11:37] <_W_> screenshots are also probably more likely to be viewed than running some random joe's code
[20:11:55] <Ruum> ya I could do that.....
[20:12:13] <Ruum> but that requires ALOT of picture editing
[20:12:23] *** CMoH has quit IRC
[20:12:30] <Ruum> but if that is what it takes for me to get help
[20:12:32] <Ruum> then I can do that
[20:13:11] <Ruum> and I say alot of picture editing because this is going to be alot of screenshots....
[20:13:45] <cheeser> ~~ Ruum enter
[20:13:46] <javabot> Ruum, enter is not punctuation.  Please don't press your Enter or Return key until you've finished typing your question, sentence, or idea.  It is annoying to see that and hard to follow.
[20:14:16] *** Incubuss has joined ##java
[20:14:23] *** jihedamine has joined ##java
[20:14:43] <Ruum> fine   I will do a screen shot
[20:15:19] *** jazz-lady has joined ##java
[20:16:03] *** gelignite has joined ##java
[20:17:27] *** keks_bla has quit IRC
[20:17:36] *** CMoH has joined ##java
[20:18:26] <rdg> i'm getting a JMSException saying not "HTTP" line was found... what's the common cause of that? I'm not seeing anything of a solution in google searches.. this is a clean activemq installation
[20:18:39] <Ruum> um>	http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[20:18:46] <rdg> i've tried doing a wget on  http://localhost:616161 and can confirm that it's not sendling a line with HTTP
[20:19:13] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[20:19:16] *** anders^ has quit IRC
[20:19:26] <Ruum> there now here is my screenshot
[20:19:32] <Ruum> and it looks like ccrap
[20:19:34] *** getisboy has quit IRC
[20:19:35] <Ruum> crap
[20:20:32] *** Stephmw has quit IRC
[20:20:51] <cheeser> um.  that's an invalid port number
[20:21:25] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/IEEEmicroProcessorSimilator2010.jpg
[20:21:45] <Ruum> sorry now it looks like its supposed to be
[20:21:59] *** rado1 has joined ##java
[20:22:43] *** CMoH has quit IRC
[20:22:58] *** CMoH has joined ##java
[20:23:25] <rdg> cheeser: sorry, i meant 61616
[20:23:41] <rdg> ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("http://localhost:61616");
[20:24:17] *** amacleod has quit IRC
[20:24:34] <NfNitLoop> So I've found what appears to be a bug in the 1.6 SAXParserImpl.   When I drop in xerces implementation the bug goes away.
[20:24:39] *** rook2pawn has quit IRC
[20:25:05] <NfNitLoop> I've searched the bug DB for the JRE, but haven't found a similar report.
[20:25:27] <NfNitLoop> I'd like to write a report, but I don't have source code from SAXParserImpl to trace into it to pinpoint the precise problem.
[20:25:59] <NfNitLoop> Where could I find the right version of that to match JRE 1.6.0_15  (or _18) to attach to Eclipse to debug this issue?
[20:26:10] <pr3d4t0r> NfNitLoop: I wouldn't be surprised.  We found that SAX on Java 6 isn't strict enough when we compared it against lxml and xmllint.
[20:26:27] <NfNitLoop> pr3d4t0r: "isn't strict enough"?
[20:26:46] <NfNitLoop> My error is that it's passing junk data to Apache XMLRPC's XMLReader.  >.<
[20:26:53] <pr3d4t0r> NfNitLoop: It was allowing things that xmllint flagged as baddies, mostly in expressions.
[20:27:07] <pr3d4t0r> NfNitLoop: Er, expression validation.
[20:27:15] <NfNitLoop> expression validation?
[20:27:23] <NfNitLoop> is this for XSLT?
[20:27:25] <Ruum> lol ok, NOW I have my screenshot correct
[20:27:26] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[20:27:38] <NfNitLoop> I'm just doing plain SAX document parsing in the process of using XMLRPC.
[20:27:56] <Ruum> so can anyone help me get this to look right?
[20:28:30] *** Athenon has joined ##java
[20:28:38] *** Incubuss has quit IRC
[20:29:21] *** keks_bla has joined ##java
[20:29:32] *** Incubuss has joined ##java
[20:30:23] *** nuvolari has quit IRC
[20:30:47] *** rook2pawn has joined ##java
[20:31:19] *** ninan has joined ##java
[20:31:22] *** asina12 has left ##java
[20:31:41] *** sgtd has joined ##java
[20:32:02] *** robrose has quit IRC
[20:32:31] *** Zaidwi has joined ##java
[20:34:16] *** anders^ has joined ##java
[20:34:26] *** boringwall has quit IRC
[20:34:44] *** e1n85 has quit IRC
[20:34:58] *** platzhirsch has joined ##java
[20:35:55] *** goundy has joined ##java
[20:36:56] *** merp has quit IRC
[20:37:46] *** scummos has joined ##java
[20:39:46] *** jonkri has joined ##java
[20:39:54] <scummos> hi... i've been searching for some hours now, but i'm still somewhat confused... i'd like to have an applet in a webbrowser which uses openGL. how do i accomplish that, do you have some tutorial for me?
[20:40:31] <saml> webgl ?
[20:40:32] <cheeser> dunno offhand.  but i *do* know we don't support applets here.
[20:40:49] <scummos> saml: isn't webGL that canvas thingy?
[20:41:21] <exobyte> https://jogl-demos.dev.java.net/applettest.html
[20:41:27] <saml> i don't know
[20:41:41] <scummos> then webGL is that canvas thing. ^^
[20:41:55] <scummos> Yeap, that's exactly what i'm looking for...
[20:42:06] *** gratz|home has quit IRC
[20:42:19] <kgrad5> is it possible to add an annotation to a method from a superclass in the subclass without reimplimenting the method?
[20:42:20] *** dpy has joined ##java
[20:42:40] *** nitrix has quit IRC
[20:43:04] *** mail has joined ##java
[20:43:13] *** pstickne has quit IRC
[20:43:33] <mail> netbeans or intellijidea
[20:43:35] <cheeser> kgrad5: you can't
[20:43:35] <kgrad5> for example, i have an abstract class with an id instancevariable, in my subclass i would like to add the @Id annotation without overriding the getId() method
[20:43:39] <scummos> exobyte: btw, on my current system that applet gives error: "Cannot find certificates for JNLPAppletLauncher class"
[20:43:48] <cheeser> mail: IDEA hands down.  as long as you're not a newbie.  then it's vim.
[20:43:52] <kgrad5> cheeser: thanks :(
[20:44:21] <mail> been coding java using a text editor so far ...
[20:44:37] <scummos> netbeans looks okay
[20:45:06] <NfNitLoop> I ended up with Eclipse just because it has the largest number of useful addins.
[20:45:11] <scummos> exobyte: so how would i achieve that?
[20:45:38] <fupp> I'm trying to run something but have problems with the classpath.. I tried java -classpath ./secondstring-20060615.jar Test and java -classpath ".;./secondstring-20060615.jar" Test
[20:45:47] *** dpy has quit IRC
[20:48:09] *** agnul has joined ##java
[20:48:17] *** SoulBlade has joined ##java
[20:49:08] <SoulBlade> do I have to explicitly define a no argument constructor in a subclass if the base class defines one?  it appears i do, but i want to make sure..
[20:49:40] <fupp> seems like I just needed : instead of ;
[20:49:44] <cheeser> no, you don't, SoulBlade
[20:49:56] *** Incubuss has quit IRC
[20:50:31] <SoulBlade> what if the subclass defines a constructor with an argument
[20:50:41] <SoulBlade> and the superclass has an empty one
[20:50:48] <cheeser> that's fine
[20:51:01] <cheeser> ~~ SoulBlade constructors
[20:51:02] <javabot> SoulBlade, constructors is http://java.sun.com/tutorial/java/javaOO/constructors.html
[20:51:15] *** gratz|home has joined ##java
[20:52:58] <SoulBlade> im getting constructor SubClass() is undefined... SubClass extends an abstract class
[20:53:52] *** ulfdoz has joined ##java
[20:54:37] <ulfdoz> g'eve. Is there a clean way to convert a timestamp-like value (Calendar, Data, j.sql.Timestamp) to another timezone?
[20:55:05] *** devendra has quit IRC
[20:55:06] <ulfdoz> I need that for database testing. There is no use in writing explicitly UTC-values and checking them e.g. against CET.
[20:55:34] *** srm has joined ##java
[20:55:34] <cheeser> ~~ SoulBlade show us
[20:55:36] <javabot> SoulBlade, Paste the code (and any errors) in the pastebin where we can see it.  See ~pastebin for options.  Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[20:55:40] <SoulBlade> in the process..
[20:55:43] * cheeser nods.
[20:56:12] *** styx_ has quit IRC
[20:56:27] <SoulBlade> heh well my small test compiles
[20:56:28] <SoulBlade> so wtf..
[20:56:34] <SoulBlade> let me dig.. sorry
[20:56:59] <rdg> http://activemq.apache.org/jndi-support.html   can someone look at this (the very first snippet in it) and tell me how javax.jms.TopicConnectionFactory factory = (javax.jms.TopicConnectionFactory)ctx.lookup("ConnectionFactory");  is supposed to pull anything out of that
[20:57:09] <rdg> seems to me the line of interest in the jndi.properties is commented out
[20:57:10] <SoulBlade> ah broke it - one sec
[20:58:56] *** Athenon has quit IRC
[20:59:06] *** styx_ has joined ##java
[20:59:30] *** KermitTheFragger has quit IRC
[20:59:50] *** NfNitLoop has left ##java
[20:59:54] *** webus has joined ##java
[21:00:08] *** karega has joined ##java
[21:00:09] <SoulBlade> http://pastebin.org/101280
[21:00:18] *** bitshuffler has quit IRC
[21:00:22] <karega> hello
[21:00:31] <SoulBlade> even adding a public Foo() { } constructor to Foo.java doesnt fix the error
[21:00:59] <karega> If I use Node.normalize() does it break the data structure out of it's heirarchy?
[21:01:25] *** sk1 has joined ##java
[21:01:36] <sk1> are public function in anonymous inner classes unreadable?
[21:01:55] <sk1> if you define the function within the class and pass it somewhere else?
[21:02:19] <sk1> (using reflection of course)
[21:02:53] * _W_ mubles some curses about Class.getConstructor and its retarded return type, and even lamer justification
[21:03:10] <karega> anyone?
[21:03:13] <SoulBlade> que?
[21:03:13] <_W_> ~~ sk1 tias
[21:03:14] <javabot> sk1, Try it and see. You learn much more by experimentation than by asking without having even tried.
[21:03:45] <sk1> _W_: it returns an array of constructors, right? What's wrong with that? What's the justification?
[21:03:49] <SoulBlade> cheeser - any thoughts on the pastebin?
[21:04:21] <_W_> sk1, it returns an array of Constructor<?>, instead of an array of Constructor<T> or List<Constructor<T>>
[21:04:35] <sk1> javabot: I did! My JSF appliction is screaming at me claiming it can read the fields I made which are clearly marked as public. I wanted to know, without writing a whole new app, if this is because the fields are unreadable of if the JSF implementation is just....wait..why am I talking to a bot
[21:04:36] <javabot> OK, sk1.
[21:05:04] <cheeser> SoulBlade: FooImpl does not have a default/noarg ctor.  you have to pass in an int
[21:05:06] <sk1> _W_: wait..what's the <?> in the generic do?
[21:05:07] <_W_> javabot, forget I did! My JSF application
[21:05:07] <javabot> I never knew about i did! my jsf application anyway, _W_.
[21:05:10] <cheeser> SoulBlade: ctors are not inherited.
[21:05:41] <_W_> sk1, it's a wildcard, meaning it could be a constructor for anything... meaning that you have to cast the object once you actually call it
[21:06:00] <_W_> (or cast the constructor in the first place) - just what you want to use generics to avoid
[21:06:17] <sk1> wait..my 1.5 API says it returns Constructor<T>
[21:06:18] *** nofilicity has joined ##java
[21:06:21] <SoulBlade> that'll explain that..
[21:06:41] <_W_> sk1, oh, sorry, I meant getConstructors - the plural form
[21:06:46] <nofilicity> What would be the most efficient way to do OCR? If I have a bunch of images for a font, and an image to read it from
[21:07:02] <sk1> I haven't seen the <?>...doesn't it just turn the collection into what it would have been without generics then?
[21:07:13] <_W_> sk1, essentially
[21:07:17] <_W_> well, not quite
[21:07:26] <_W_> ~generics
[21:07:26] <javabot> For a tutorial on generics, please see http://javachannel.net/wiki/pmwiki.php/Main/Generics
[21:07:32] <sk1> does it still suff from type-erasures with <?>
[21:07:33] *** amacleod has joined ##java
[21:07:36] <_W_> you should probably have a look at that if you really want to learn about wildcards
[21:07:42] *** Rayne has joined ##java
[21:07:51] *** JimmyMcJimbo has quit IRC
[21:08:15] <sk1> I'm not a big fan of Generics in Java. I don't understand why I can't cast List<SuperClass> to List<SubClass>
[21:08:19] <_W_> you can't add items to a List<?> for instance - since it might be a List of a specific generic argument that doesn't match what you add
[21:08:53] <sk1> wait..so List<?> would be immutble?
[21:09:00] <rdg> ActiveMQ's JNDI tutorial is busted.
[21:09:07] <_W_> sk1, that's just because you don't understand it sufficiently - in this case, if you cast it to List<SubClass> you would get SubClass instances back, which might be wrong
[21:09:29] <mail> netbeans is coool
[21:09:50] <sk1> _W_: well I understand why...I should say I don't understand why they decided to go with that implementation
[21:09:56] *** taras has quit IRC
[21:10:09] <_W_> as they might not be instances of that subclass, or even of a subclass at all - what you'd want in that case is what you CAN do, cast List<SuperClass> to List<? super SubClass>
[21:10:10] <sk1> _W_: removing types from Generics that is.
[21:10:22] <_W_> they don't
[21:10:31] *** gdoko has quit IRC
[21:10:35] <_W_> generics has types ><
[21:11:35] *** astrojp has joined ##java
[21:11:51] <sk1> just at compile time..not at runtime. The types are removed. If I can take an instanec of SubClass and always cast it to SuperClass (sorry, I think I got that backwards earlier), so for every instance of SubClass in a List, I KNOW it can be cast to its super
[21:12:11] <_W_> well, there's probably a long story to erasure
[21:12:16] <sk1> but you can't cast the entire list. you get compile errors because the types aren't stored in the collection itself
[21:12:25] <_W_> sk1, you are also mixing things
[21:12:31] <sk1> not really..it's just to maintain backwards compatability with 1.4
[21:12:42] <_W_> erasure is bad, I agree, but what you are talking about is excellent, a good thing
[21:12:48] <mapreduce> ~gafter's gadget
[21:12:49] <javabot> mapreduce, gafter's gadget is http://gafter.blogspot.com/2006/12/super-type-tokens.html
[21:12:52] <sk1> C# preserves types in their generics, but breaks compatability with earlier runtimes
[21:12:55] <mapreduce> tsdh: See that link.
[21:13:09] <mapreduce> sk1: Incorrect.
[21:13:13] *** gdoko has joined ##java
[21:13:18] *** Submarine has quit IRC
[21:13:21] <_W_> anyway, you are massively confused, and should probably learn the subject properly before you can criticise accurately
[21:14:00] *** jdolan has quit IRC
[21:14:08] <mapreduce> Sorry, you're correct, I just misread the bit about compatibility.
[21:14:09] <sk1> I have read up on it....a lot on it. It's bit me in my web apps a lot
[21:14:38] *** nofilicity has quit IRC
[21:14:43] <_W_> you haven't read enough if you think you should be able to cast List<Something> to List<SuperOfSomething> or List<SubOfSomething>
[21:14:54] <mapreduce> sk1: Types are compile-time only.  You're talking about classes if you're talking about runtime.
[21:15:11] *** josemoreira has quit IRC
[21:15:35] <mapreduce> sk1: Your magical C# doesn't let you cast List<string> to List<object>.
[21:16:43] <mapreduce> (C# 4 allows casting from IEnumerable<string> to IEnumerable<object>, but that's because IEnumerable's type parameter is covariant).
[21:16:54] <sk1> but you can cast an entire array
[21:16:56] <sk1> http://safalra.com/programming/java/wrong-type-erasure/
[21:17:20] <_W_> and that's probably a bad thing as well
[21:17:23] *** gratz|home has quit IRC
[21:17:34] <mapreduce> Covariant arrays in Java are a bug in the language.
[21:17:36] *** goundy has quit IRC
[21:17:37] <_W_> but not something you can fix without breaking a lot of existing code
[21:17:42] <tsdh> mapreduce: Thanks, that's interesting.
[21:17:53] *** scummos has left ##java
[21:18:04] <mapreduce> Number[] n = new Integer[1]; n[0] = Double.valueOf(5.6); //ArrayStoreException
[21:18:37] *** S11001001 has joined ##java
[21:18:38] *** jivedude has joined ##java
[21:21:26] *** mydog2 has quit IRC
[21:22:59] *** jerkface03 has joined ##java
[21:23:49] *** Stephmw has joined ##java
[21:24:19] *** pstickne has joined ##java
[21:24:20] <S11001001> Under what conditions can this expression be true, where uC is an HttpURLConnection: (uC.getInstanceFollowRedirects () && uC.getResponseCode () == HttpURLConnection.HTTP_MOVED_PERM)
[21:24:43] <_W_> S11001001, probably several million
[21:25:00] * _W_ doesn't like questions formulated that way
[21:25:02] *** e1n85 has joined ##java
[21:25:34] *** rantingsteve has joined ##java
[21:27:13] *** Mavrik- has quit IRC
[21:28:16] *** jdolan has joined ##java
[21:28:52] <S11001001> Alright, what HTTP status codes are HttpURLConnection designated to consider "redirects" when instanceFollowRedirects is true?
[21:29:12] <_W_> also, I don't think I've seen a worse capitalized class in the Java API
[21:29:22] <exobyte> somewhat off-topic, but...how can I get XStream to not add a class="foo.bar" attribute to nodes?
[21:29:26] <_W_> HttpURLConnection? Why is URL all caps, and HTTP not?
[21:29:28] *** _kmh_ has quit IRC
[21:29:30] <cheeser> seems a little inconsistent.  8^)=
[21:29:50] <cheeser> exobyte: iirc, you can define aliases.
[21:30:10] <pgib> I thought all 300s were redirect?
[21:31:13] <_W_> S11001001, the documentation says 3xx codes
[21:31:51] *** preflex has quit IRC
[21:32:32] *** Johannes13 has quit IRC
[21:32:48] *** adaro has joined ##java
[21:33:02] <exobyte> cheeser: I'll look into that.  the aliasing is a bit more rich than I realized
[21:33:23] <S11001001> Okay.  Thanks.  When a redirect happens, assuming the resulting HTTP request/response completes successfully, will the result of #getResponseCode always be set to the code of the latter request?
[21:33:40] *** Athenon has joined ##java
[21:34:12] *** skoskav has joined ##java
[21:34:18] *** boringwall has joined ##java
[21:34:30] *** drindt has joined ##java
[21:34:47] *** Willy has quit IRC
[21:35:39] <_W_> I've always just used HttpComponents
[21:35:46] <_W_> ~httpcomponents
[21:35:47] <javabot> _W_, httpcomponents is http://hc.apache.org/httpcomponents-client - the current version of Apache's HTTP client for Java. More modular than httpclient 3.x was, and *probably* more multithread-friendly.
[21:35:47] *** keks_bla has quit IRC
[21:36:12] *** preflex has joined ##java
[21:36:35] <Ruum> S11001001 do you know that 11001001= 201 ?
[21:36:55] <Ruum> or better said: 1100 1001= 201
[21:37:33] <skoskav> http://paste.pocoo.org/show/185694/
[21:37:35] <skoskav> this jsp will only print out "searchDTO.nextResultsOffset", not the value it holds. Any ideas how i could put that value inside the input tag's "value" property?
[21:37:42] *** drindt has quit IRC
[21:38:53] <_W_> skoskav, ${} is the common way, but I bet there's a way to use c:out as well
[21:39:13] <S11001001> _W_: I'm trying to work out this: http://jira.codehaus.org/browse/MNG-4428, which appears to be an issue with org.apache.maven.wagon.providers.http.LightweightHttpWagon#fillInputData, where I got the state in my first question.  wagon-http, also part of the wagon-1.0-beta-* set, already uses httpclient (albeit an older version)
[21:39:27] *** tsdh has quit IRC
[21:39:40] <S11001001> Ruum: indeed
[21:40:25] *** criminy_ has joined ##java
[21:40:55] <rdg> i have a portlet connecting to an activemq queue ... when i do a junit test the message is sent .. but when i call the same code from within my portlet it says ConnectionFactory is not bound... same jndi.properties file.. the file is in the war... any thoughts?
[21:41:21] <_W_> S11001001, I don't understand
[21:41:40] <chetan-> rdg: where in the war? classpath issue in loading the props?
[21:42:09] <rdg> WEB-INF\classes   along with my log4j.xml and application-context.xml .. both of which are picked up in other parts of the code w/ no issue
[21:43:21] *** jerkface03 has quit IRC
[21:45:59] <S11001001> _W_: #fillInputData is responsible for getting an input stream.  The result as seen in that bug from some requests shows that the content from the 301 response is being passed back to whatever is using the wagon system to get resource data, rather than the content from a supposed redirection request.  The specific state I mentioned first is true for these requests after calling #getInputStream on the relevant HttpURLConnection
[21:46:16] <exobyte> cheeser: addDefaultImplemention did it
[21:46:20] <rdg> is it possible that tomcat could be reading my jndi file one way and  eclipse/junit is reading it another way?
[21:46:39] *** meo has joined ##java
[21:46:42] <cheeser> exobyte: great
[21:46:42] *** gdoko has quit IRC
[21:46:53] *** alek_b has quit IRC
[21:46:59] <_W_> S11001001, well obviously the state you mentioned is true in some conditions - I would presume you wouldn't have asked the question in the first place if it weren't - what I am confused about is why you are telling me all these other things
[21:46:59] <S11001001> _W_: if you are interested in seeing the method in question, it is here: http://is.gd/9HuXC
[21:46:59] *** keks_bla has joined ##java
[21:47:00] <exobyte> cheeser: hopefully my Converter will handle the subclasses correctly
[21:47:13] <cheeser> heh
[21:48:07] <S11001001> _W_: I'm trying to figure out why it would be true.
[21:48:18] * _W_ sighs
[21:48:23] *** keks_bla has quit IRC
[21:48:30] *** Agbeladem has joined ##java
[21:49:16] <_W_> you should probably have a look at the source of HttpURLConnection (sun's internal implementation class, I mean)
[21:49:38] <exobyte> cheeser: and if I set up Converters correctly, XStream can supposedly read in the format I just got it to write, right?
[21:49:44] *** srm_ has joined ##java
[21:49:47] <_W_> though with the circumstances you described, it sounds like it's just a matter of upgrading a library?
[21:49:55] <_W_> or just using HttpComponents
[21:51:08] <meo> i cant figure out why with ibatis 3 beta 10 does not work @Options(useGeneratedKeys = true, keyProperty = "id"), i need generate ID with annotation...
[21:51:57] *** srm has quit IRC
[21:51:57] *** srm_ is now known as srm
[21:52:02] <_W_> S11001001, I am already doing this to sate my own curiosity though, so if you want you can wait around while I figure it out
[21:52:38] *** Dosshell has joined ##java
[21:53:05] *** tauren has joined ##java
[21:53:58] *** gdoko has joined ##java
[21:54:58] <Ruum> so come on guys if you help me get this looking correct
[21:55:05] <Ruum> then I will be outta your hair
[21:55:10] <Ruum> and maybe help others
[21:55:27] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[21:55:43] <Ruum> are you sure I cant use a box layout?
[21:55:56] <Ruum> do I REALLY need to use gridbag ?
[21:57:36] <Dosshell> hi, my JFileChooser does not shows as i wants. It does not "clear the framebuffer" between the draws. If i enter a map the last map and the new one is drawn. http://codepad.org/6bw98A6e
[21:58:10] <Agbeladem> what are you trying to do ruum ?
[21:58:14] <Dosshell> map = catalog
[21:58:40] <Ruum> because I would like 6 columns and 3 rows for the jlabes and textfields
[21:58:50] <Ruum> well there is my screenshot
[21:58:57] *** ztj has joined ##java
[21:59:04] <Agbeladem> how to "check a cast" ?
[21:59:10] <Agbeladem> I'm getting a "cast unchecked" warning
[21:59:28] <Ruum> well are you using inheritance ?
[21:59:32] <_W_> S11001001, I've found a couple of ways - redirects from HTTP to HTTPS scheme or the other way, for instance
[21:59:38] <Ruum> agbeladem ?
[21:59:38] <Agbeladem> Well I can't really
[21:59:43] <Agbeladem> I'm using an ObjectInputStream
[22:00:00] <Agbeladem> so readObject() is Object
[22:00:03] <Ruum> ok..... is this client server program
[22:00:10] <Agbeladem> nope
[22:00:12] <Agbeladem> just reading files
[22:00:26] <_W_> S11001001, which seems to be the case for the original poster of that bug
[22:00:26] <Ruum> do you need to do this as objects?
[22:00:39] <Agbeladem> no
[22:00:45] <Ruum> there is an easier way to read files ya know
[22:00:48] <Agbeladem> I'm casting it to the container class
[22:00:53] <Agbeladem> which is an ArrayList<Move>
[22:00:57] *** gdoko has quit IRC
[22:01:02] <Agbeladem> of a serializable class of my own
[22:01:07] *** bindaas has quit IRC
[22:01:27] <Ruum> ok.... well you can still use the java.util package for the scanner
[22:01:47] <Agbeladem> I think it's weird
[22:01:49] <Agbeladem> I mean
[22:01:57] <Agbeladem> I'm creating a file with a specific class
[22:02:03] <Agbeladem> and it's unchecked when I read it back
[22:02:15] <Agbeladem> how would I be supposed to do ?
[22:02:16] <Ruum> and then depending on your arraylist cast
[22:02:40] <Ruum> well I think that is because your just reading it in as objects
[22:03:03] <Agbeladem> Well, that's how ObjectInputStreams should work, isn't it ?
[22:03:10] <Ruum> right
[22:03:29] <Agbeladem> Then how should I tell him what kind of object it is
[22:03:39] <Agbeladem> which would be less "unchecked" than a cast
[22:03:44] <Agbeladem> so that I don't get that warning any more =/
[22:04:18] <Ruum> but the problem with objects in java is that you DO eventually have to cast it as SOMETHING you cant leave it as just "Object" because it doesnt need to be cast as either a primitive type or another known java class.
[22:04:35] <Agbeladem> right
[22:04:59] *** DirtyD has joined ##java
[22:05:04] <Agbeladem> but I thought there was a cast exception
[22:05:06] <Ruum> sry I mean *does
[22:05:18] <Agbeladem> (yeah got that)
[22:05:25] <Ruum> ok.... time for you to do a pastebin my friend
[22:05:35] *** gratz|home has joined ##java
[22:05:50] <Agbeladem> hmmm okay
[22:05:53] <Agbeladem> still
[22:05:57] <DirtyD> I'd like my J2EE app monitor an imap box and take action when a new email is received. What type of bean should I contain this functionality in?
[22:06:00] <Agbeladem> It shouldn't be a warning
[22:06:06] <Agbeladem> it should be a thrown exception, imho
[22:06:17] <Agbeladem> (so an error in javac if we don't ...
[22:06:44] *** webus has quit IRC
[22:06:44] <Ruum> are you working with JSF or JSP /
[22:06:46] <Ruum> ?
[22:06:58] *** sebersole has quit IRC
[22:07:03] <Agbeladem> (btw Ruum, what's wrong with GridBagLayout ?)
[22:07:37] <Ruum> I dont think I would like the way it would space the labels and the jtextfields
[22:07:42] <_W_> S11001001, in fact, it seems all reports of this bug are redirects from http:// to https://
[22:07:53] <Agbeladem> I see.. hmm
[22:07:54] <S11001001> _W_: Interesting, thanks very much for checking it out
[22:07:56] *** jihedamine has quit IRC
[22:08:44] <Ruum> I want the labels and the textfields to be close together and then have the space be between at the end of each textfield....
[22:08:45] <_W_> the solution remains the same of course :)
[22:09:00] <Ruum> think of the label and the textfield as like a pair
[22:09:18] <S11001001> _W_: yes, convince the maintainers to drop wagon-http-lightweight
[22:09:21] *** Gravitron has joined ##java
[22:10:00] *** Theravadan has joined ##java
[22:10:27] <Ruum> I want 3 "pairs" across and between each pair I want a nice even neat space so that using that know enough about assembly programming can easily see the values in each register
[22:10:53] *** ninan has quit IRC
[22:11:29] <Ruum> but if I cant achieve this with a box layout, then I will have no choice to use gridbag
[22:11:38] <Ruum> here is my screenshot again
[22:11:40] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[22:11:40] *** toZi has joined ##java
[22:11:52] <Ruum> and I will give you a pastebin agbeadem
[22:12:00] <Agbeladem> yes
[22:12:02] <Agbeladem> me too lol
[22:12:53] <Ruum> http://pastie.org/854513
[22:13:22] *** ech0s7 has joined ##java
[22:13:30] <Ruum> there is my pastebin
[22:13:36] *** Engin has joined ##java
[22:14:49] *** Farhadix has left ##java
[22:15:30] *** realtime_ has quit IRC
[22:16:09] *** ninan has joined ##java
[22:17:33] *** philosophia has quit IRC
[22:17:53] *** Ruum has quit IRC
[22:18:03] <Agbeladem> hmm
[22:18:11] <rdg> y'all ever have an issue where tomcat/openportal quit redeploying wars? I'm having to undeploy, restart tomcat, then redeploy every time
[22:19:14] *** Steve^ has joined ##java
[22:19:31] *** mreggen has joined ##java
[22:20:34] *** flavioribeiro has left ##java
[22:20:36] <toZi> rdg: check the server clock and the one of your workstation
[22:20:46] <rdg> they're one in the same
[22:20:49] *** Ruum has joined ##java
[22:20:51] <rdg> (same machine)
[22:20:59] <Agbeladem> hey again ruum
[22:21:11] <Ruum> sry my connection was lost for a second
[22:21:14] <Ruum> :-p
[22:21:23] <Agbeladem> So how would you prevent the unchecked cast warning on line 27 ?
[22:21:24] <Agbeladem> http://pastebin.com/Lbb23HHf
[22:21:29] <Ruum> sure I will look
[22:22:57] <Ruum> kk here is your main problem for starters
[22:23:10] <pstickne> you ... don't?
[22:23:24] *** rook2pawn has quit IRC
[22:23:31] *** teralaser has joined ##java
[22:23:47] <pstickne> OIS/OOS aren't well-typed in that aspect.
[22:23:52] *** gilead has joined ##java
[22:23:54] *** cankoy has joined ##java
[22:24:14] <Ruum> private ArrayList<Move> moves;
[22:24:16] <Ruum> .
[22:24:17] <Ruum> .
[22:24:19] <Agbeladem> yes
[22:24:19] <Ruum> .
[22:24:20] <Ruum> moves = new ArrayList<Move>();
[22:24:23] <pstickne> You would need to use something that supported a typed-structure, such as, say, XStream, which internally does checks-and-casts.
[22:24:26] <Agbeladem> no
[22:24:31] <Agbeladem> it's already defined when loaded
[22:24:42] <Agbeladem> (I load a game while a game's already being played)
[22:24:50] * pstickne tickles Agbeladem
[22:25:01] <Agbeladem> I know nothing about XStream ^^
[22:25:06] *** km has joined ##java
[22:25:16] <pstickne> Anyway, you can 'hide' the cast, but you'll need it to move from Object -> SomethingYouWant.
[22:25:34] <Agbeladem> So I would get this error with any use of InputStreamObject?
[22:25:38] *** Matic`Makovec has joined ##java
[22:25:38] <Agbeladem> warning I mean
[22:25:51] <pstickne> Agbeladem, what type does readObject() return?
[22:25:56] <Agbeladem> Object
[22:26:26] <pstickne> How do you get from Object -> ArrayList<T>?
[22:26:41] <Agbeladem> well ObjectOutputStream
[22:26:49] <Agbeladem> will put any Serializable object in a file
[22:26:54] *** EnginA has joined ##java
[22:26:59] <Agbeladem> which would be read by an ObjectInputStream
[22:27:12] <pstickne> With Generics you get the 'unchecked' cast because the type information with Generics is 'lost' at runtime (mostly).
[22:27:12] <Agbeladem> So no matter what you do, casting is crucial
[22:27:20] *** sk1 has quit IRC
[22:27:26] *** adaro_ has joined ##java
[22:27:34] <pstickne> So it's being a tad more grumpy than a raw (ArrayList)
[22:27:49] <Agbeladem> ho so there's no way I'm getting rid of that warning :p
[22:27:53] <pstickne> So it's saying: "I can't verify what you're doing!"
[22:27:55] <Ruum> absolutely.
[22:28:17] <pstickne> You can suppress the warning -- or bury it behind another method. The warning only occurs during the compiling.
[22:28:24] *** A5c11Char5et has joined ##java
[22:28:24] <pstickne> I would just leave it.
[22:28:30] <Steve^> instanceof?
[22:28:36] <pstickne> That won't work with Generics
[22:28:40] <Agbeladem> =)
[22:28:42] <Steve^> why not?
[22:28:42] <pstickne> which is what the particular error amounts to
[22:28:47] <Ruum> ageladem warnings are not a big deal dude
[22:28:51] <_W_> I would mark it with a @SupressWarnings("unchecked") on the statement
[22:28:54] <pstickne> Because you can tell if it's an ArrayList, but not an ArrayList<Moves>
[22:29:12] <pstickne> The "unchecked" bit comes in with the <Moves>
[22:29:14] <Agbeladem> Well... my terminal's usually clean, warnings burn my eyes :p
[22:29:19] *** adaro has quit IRC
[22:29:19] *** adaro_ is now known as adaro
[22:29:37] <Agbeladem> on the other I wouldn't be able to cast with (ArrayList) only would I ?
[22:29:41] <Agbeladem> on the other hand*
[22:29:45] <Ruum> but btw when you save, your not defining your ArrayList there either though
[22:29:51] <pstickne> Agbeladem, move it to a separate class which is updated non-often (and thus compiled non-often) and then the warning is non-often :)
[22:29:58] <pstickne> Agbeladem, tias :)
[22:30:15] <pstickne> Agbeladem, or see the SupressWarning(s) annotation.
[22:30:15] <Agbeladem> ha, good stuff
[22:30:17] <Ruum> no you have already casted your arraylist to the class Move
[22:30:24] *** SEcki has joined ##java
[22:30:29] <Agbeladem> yes
[22:30:29] *** Engin has quit IRC
[22:30:33] <pstickne> Ruum, ...?
[22:30:35] *** EnginAy has joined ##java
[22:30:37] *** adaro has quit IRC
[22:30:37] <Agbeladem> but (ArrayList)(readObject())
[22:30:52] <pstickne> So tias.
[22:30:52] <Agbeladem> though weird, wouldn't be meaningless
[22:30:59] <pstickne> You'll make Java upset in another way.
[22:31:04] <Agbeladem> exactly
[22:31:04] <A5c11Char5et> How difficult is Remote Method Invokation to can to grips with ?
[22:31:39] <pstickne> A5c11Char5et, how hard is it to understand the concept of an area under a curve?
[22:31:47] <Ruum> ok but in that case your just passing readObject to the constructor dude
[22:32:08] <Ruum> you have defined it at the top as of the type Move
[22:32:24] <Steve^> What's the point of a warning that the programmer can do nothing about?
[22:32:37] <pstickne> Agbeladem, ArrayList<Moves> a = ...; ArrayList b = a; a = (ArrayList<Moves>)b; // this will also generate the 'unchecked' warning
[22:32:42] <Ruum> so you could do it as a Integer or a String
[22:32:47] <pstickne> Steve^, you can. See my suggestions.
[22:32:54] <Agbeladem> interesting
[22:32:57] <pstickne> Steve^, and it's better than no-warning, no?
[22:33:18] <pstickne> Steve^, in a number of cases it can be avoided (with the proper use of generics about).
[22:33:29] <Steve^> actually, no its not
[22:33:32] *** EnginA has quit IRC
[22:33:36] <Ruum> pstickne hahah that is just a pain in the @$$ way of programming arraylists, but I get your point
[22:33:53] <Steve^> it should only show in the cases that the compiler is smart enough to know are a problem
[22:33:54] <pstickne> Steve^, the problem here is that there is no way (in the Java type system and how OIS is setup) to go from Object -> T<M> without being "unchecked" (in terms of the generic).
[22:34:05] <Steve^> filling the code with annotations is not the solution
[22:34:14] <pstickne> Steve^, see above.
[22:34:26] <Ruum> anyway can anyone point me in the right direction about my little layout problem?
[22:34:35] <Steve^> unnecessary separation of code isn't either
[22:34:36] <pstickne> Steve^, the Java system simply can not express this. Hence the "unchecked" behavior is allowed (but warned).
[22:34:55] <pstickne> Steve^, you argument would be "have no warning" which is a worse "solution".
[22:34:56] <Ruum> should I stick with the boxlayout or go with gridbag ?
[22:34:59] <Steve^> I understand why it can't express it - there is just little point in throwing a warning
[22:35:13] <Ruum> ANYONE?
[22:35:17] <Agbeladem> ha :D
[22:35:19] <pstickne> Steve^, mine was: (implied documentation) and careful use of extraction and/or a simple (very rarely used) annotation.
[22:35:21] *** Willy has joined ##java
[22:35:32] <pstickne> Steve^, yes there is. Because *many* times the problem can be addressed.
[22:35:38] <pstickne> Steve^, this is not one of them.
[22:35:44] <Steve^> then show the warning many times
[22:35:49] <Agbeladem> Ruum, you tried all storta glue ?
[22:35:54] <pstickne> Steve^, that is what happens.
[22:36:07] <Steve^> pstickne, are you saying that the compiler cannot tell the difference in this case?
[22:36:10] <pstickne> Steve^, which is the opposite of the "don't show the warning" you are suggesting
[22:36:14] <Ruum> no I dont want to get into "glue" code til I know if that will work
[22:36:27] <Ruum> I have a code example
[22:36:29] *** sn3d has quit IRC
[22:36:30] <pstickne> Steve^, could you not tell that from my previous statements?
[22:37:03] <pstickne> Steve^, ignoring the cast from Object->ArrayList, the problem with this case is fundamentally due to Type Erasure of Generics in Java.
[22:37:06] <Steve^> pstickne, it seems pretty clear to me that you can't check a generic. The compiler can choose not to show a warning in that event
[22:37:10] <Agbeladem> ruum, what about a cardlayout?
[22:37:11] <Ruum> http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html
[22:37:23] <Ruum> lemme look at that....
[22:37:25] *** Segnale007 has joined ##java
[22:37:33] <pstickne> Steve^, which is WORSE. It's much better to have to OPT-IN to NOT SHOW. Than ALWAYS NOT SHOW. Which is what you are suggesting.
[22:37:36] <Agbeladem> http://java.sun.com/docs/books/tutorial/figures/uiswing/layout/CardLayoutDemo.png
[22:37:51] <pstickne> Steve^, and some compilers likely have such global-suppressions.
[22:38:01] <pstickne> (Also @SupressWarnings can apply to a class?)
[22:38:35] *** neuro_sys has quit IRC
[22:38:39] <charzero> Oracle's first change: your browser now has to accept cookies to download the JDK from java.sun.com.
[22:39:14] <pstickne> Steve^, there are only a few cases when this issue is really "an issue" and a warning there is better than having code which is not provable to be safe (unless of the explicit choice to suppress/hide the warning -- such a supperssion DOES NOT FIX the fundamental problem, it's done after analysis of the problem -- BY A HUMAN -- because javac can't do it)
[22:40:08] <pstickne> Steve^, see the case above where I assing from b to a. That is "visually safe", although javac can not prove the general form of that.
[22:40:13] <pstickne> *assigning
[22:40:13] <Ruum> Agbeladem that would make my app look like $h!+
[22:40:24] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[22:41:11] <jonkri> does java have the appropriate native file system support to be able to implement a linux package manager? (basically dpkg)
[22:41:23] <Steve^> why doesn't   foo  = (String) s.readObject()  not give an unchecked warning?
[22:41:28] <pstickne> Steve^, after analysis of such an operation I may mark the method (which would be isolate to the smallest area of affect) with the explicit warning suppression (and hopefully document it as such).
[22:41:38] <selckin> jonkri: no
[22:41:43] <pstickne> Steve^, because there is no generic involved. That may result in a CCE.
[22:41:49] *** joet3ch has quit IRC
[22:41:52] <jonkri> selckin: what is missing?
[22:41:52] <pstickne> Steve^, see the example with ArrayLists above.
[22:42:10] <Steve^> pstickne, ok, I was under the impression that "unchecked" referred to general checking of the type before a cast
[22:42:13] <pstickne> Steve^, without generics it is guarnanteed that, if the cast succeeds, you'll have an object of type String.
[22:42:15] <selckin> jonkri: all kinds of permission magic, jdk7 has a bit of the haps filled in
[22:42:19] <pstickne> Steve^, no, no :)
[22:42:24] <bobbytek> Anyone know if there is a channel for birt?
[22:42:33] *** Incubuss has joined ##java
[22:42:36] <Agbeladem> Ruum, well the use of a GridBagLayout is a little longer but since it's a big tool, it will more easily fill your needs
[22:42:55] <jonkri> selckin: what if we look at it from the perspective of jdk7?
[22:42:58] <Steve^> pstickne, then the warning is even more strange - the programmer needs a helping hand when using generics but not when using POJOs? Both result in a bad type case?
[22:43:03] <Steve^> *type cast
[22:43:14] <Ruum> well before I work with gridbag AGAIN
[22:43:42] <Ruum> here is what I got for box:
[22:44:01] <Ruum> http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html
[22:44:01] <Agbeladem> well gridbag is really useful anyway
[22:44:13] <Agbeladem> yes what about that tutorial ?
[22:44:15] <Ruum> see now those labels are aligned
[22:44:19] *** jdolan has quit IRC
[22:44:23] <pstickne> Steve^, I'm not grocking that. ArrayList<Y> b = ...; ArrayList<X> a = (ArrayList<X>)b; // this may succeed even if X and Y are not related, there is no CCE thrown because an ArrayList is an ArrayList. However, now the contracts with generics are violated and may cause an error later on.
[22:44:38] <Ruum> that is how I want it to look in the jpanel instead of a textArea
[22:44:58] <Agbeladem> in the name chooser?
[22:45:01] <Agbeladem> you mean ?
[22:45:04] <pstickne> Steve^, the warning is "hey! this may appear to work [not throw a CCE] but still result in an invalid state"
[22:45:07] *** KDE4000 has joined ##java
[22:45:16] <Ruum> ya
[22:45:30] <Agbeladem> looks more like a gridlayout to me
[22:46:12] <Agbeladem> have you used BoxLayout.LINE_AXIS ?
[22:46:24] <Agbeladem> because that's basically what they're doing
[22:46:37] *** FireSlash has quit IRC
[22:46:45] <pstickne> Steve^, a.getClass() === b.getClass() in the above -- the 'generic' type information is lost. This is different than it is in .NET/CLR where the type information is kept about at runtime.
[22:46:50] *** chaz has quit IRC
[22:47:30] *** Chase-san has joined ##java
[22:48:08] <Ruum> except that I want the jlabel: jtextfield GAP jlabel: jtextfield instead of all crammed together like in this screenshot
[22:48:12] <Ruum> here:
[22:48:18] *** rellis has quit IRC
[22:48:19] <Chase-san> Is there a way to use a classloader to reload an already loaded class file without reloading the entire program in question (say the class was recompiled)
[22:48:38] <Agbeladem> put an empty jlabel in the gap ? =/
[22:48:55] <pstickne> Chase-san, there are some classloaders/setups that can do that. See javarebel, for instance.
[22:49:15] <pstickne> Chase-san, it's not trivial -- and without magic you'll get "A is not A" exceptions.
[22:49:28] *** jivedude has quit IRC
[22:49:46] <rdg> anyone here ever set up JNDI through Tomcat?
[22:49:48] <Chase-san> Oh I am interested in just reloading the class (though it can extend an existing class)
[22:49:51] <Chase-san> erm
[22:49:52] *** psst has joined ##java
[22:49:58] *** jivedude has joined ##java
[22:50:03] *** srm has quit IRC
[22:50:07] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[22:50:09] <Chase-san> it will be accessed completely through its parent interface
[22:50:10] <rdg> I'm curious as to if this has ever been accomplished. all of the docs I find on apaches site are along the lines of "this hasn't been tested but should work"
[22:50:11] <Chase-san> erm
[22:50:37] <ztj> mapreduce: yeah, even in embedded mode you'd still use it that way, it's just going to load the JDBC driver which is also the whole db implementation.  The only problem I could see is if they won't put the jdbc driver in glassfish's classpath and instead used the db2 driver or whatever it is that's protocol compatible with derby... though I don't know why one would do such a thing.
[22:50:37] *** ojacobson has quit IRC
[22:50:42] <ztj> jottinger: I am now
[22:50:43] <pstickne> Chase-san, google javarevel :)
[22:50:46] <pstickne> *rebel
[22:50:46] <exobyte> wow.  I ran across code that sends an int over the network in little endian
[22:50:53] <Ruum> ya I have used LINE_AXIS agbeladem
[22:51:00] <Ruum> its in my pastebin
[22:51:01] <pstickne> exobyte, as long as the format is well-defined....
[22:51:09] <Agbeladem> well then
[22:51:14] <Ruum> http://pastie.org/854513
[22:51:15] <Agbeladem> use an empty component as a gap
[22:51:32] <exobyte> pstickne: it's spec-less
[22:51:38] *** styx_ has quit IRC
[22:51:45] <exobyte> pstickne: and network byte order is tradationally big endian
[22:51:53] <Ruum> well are you SURE that gridbag is the ONLY way around that?
[22:51:57] <pstickne> exobyte, even informally, there has to be a `spec' or there is no way to use it.
[22:52:10] <Ruum> because that would make the code hairy for other programmers
[22:52:11] <pstickne> exobyte, it depends on format
[22:52:11] <Agbeladem> well a GridBag alone would do it
[22:52:20] <Ruum> D@MN
[22:52:25] <Agbeladem> but you have to put the gaps
[22:52:32] <Agbeladem> if you use a GridLayout
[22:52:39] <Ruum> ya I know.....
[22:52:42] <Ruum> ;-/
[22:52:42] *** RealKillaz has joined ##java
[22:52:45] <Agbeladem> or you can stop using layouts...
[22:52:48] <pstickne> exobyte, for instance, is UTF-32 BE or LE?
[22:52:58] <Ruum> haha you mean like a null layout?
[22:52:59] <pstickne> (or UTF-16, for that matter)
[22:53:04] <RealKillaz> hi... I'm looking for the operation to always switch off the # bit
[22:53:07] <ztj> pstickne: there are plenty of cases where a protocol spec leaves out crucial details because the writer made assumptions about OS or similar things
[22:53:08] <Ruum> I have thought about that actually.....
[22:53:15] <Agbeladem> RealKillaz: the # bit ?
[22:53:15] <exobyte> pstickne: UTF-32?
[22:53:18] <pstickne> ztj, that's just a failure then :)
[22:53:35] <RealKillaz> for example 0100100 switch of the 3th bit means --> 0100000
[22:53:35] <ztj> pstickne: indeed, but that doesn't preclude the necessity to encounter such failures :)
[22:53:41] <exobyte> pstickne: I know ID3v2 tags mark UTF-16 endianness
[22:53:42] <Agbeladem> Well Ruum, if it's for the comprehension of your code to others... only you can make that clear
[22:53:45] <pstickne> exobyte, UTF-32 would be the 'successor' of UCS-4, you know, how to encode Unicode in "4 bytes"/codepoint
[22:53:58] *** styx_ has joined ##java
[22:53:58] <Ruum> no it is actually
[22:53:58] <RealKillaz> Agbeladem, #th bit ie the 3th bit
[22:54:08] <exobyte> pstickne: who would ever spend four bytes for a character?
[22:54:10] <Ruum> because I need to have other ppl look at my code and understand it
[22:54:19] <pstickne> exobyte, there is actually UTF-16/32-LE/BE/BOM
[22:54:28] <Ruum> about 4 other ppl will be looking at it besides you guys
[22:54:32] <Agbeladem> uuh, use powers of two ? lol
[22:54:35] <pstickne> exobyte, who would ever need more than 640k RAM?
[22:54:40] <RealKillaz> 1001 turn off the 4th bit ---> 0001
[22:54:52] <RealKillaz> there must be an operator for this right?
[22:54:57] <ztj> exobyte: asians, probably
[22:54:57] <Ruum> what do you mean use powers of 2?  are you talking to me?
[22:54:58] <Agbeladem> I don't recall
[22:54:59] <exobyte> pstickne: depends how big your L3 cache is
[22:55:02] <Agbeladem> no ruum
[22:55:05] <Ruum> kk
[22:55:14] *** EBSMobile has joined ##java
[22:55:21] <exobyte> ztj: perhaps, but then you're encoding a whole word
[22:55:27] <ztj> so?
[22:55:29] <Agbeladem> Well ruum, find a good commented way to may that gridbaglayout understandable..
[22:55:36] <sgronblo> Is there a difference between setting up something like the the Jersey ServletContainer as a servlet or as a filter. And if so which one is more correct?
[22:55:42] <Ruum> I will .....
[22:55:46] <ztj> exobyte: you don't seem to understand unicode
[22:55:54] <Ruum> but I would like to not have to gridbag again.
[22:55:58] <pstickne> exobyte, I don't see how that relates at all. Anyway, with UTF-32 there is a direct correlation with characters/length, which is not the case with UTF-16 and unicode characters outside of the BMP.
[22:56:02] <Ruum> but I will do it.
[22:56:37] <pstickne> exobyte, so depending upon implementation details, expected use-cases, available resources, etc, why NOT UTF-32? E.g. don't reverse the 'burden of proof'.
[22:56:51] <exobyte> ztj: sure, I do.  but 4-bytes per character is wasteful for most purposes.  At least UTF-8 is pseudo huffman-encoded
[22:57:01] <Ruum> ~javadoc gridbaglayout
[22:57:03] <javabot> Ruum: http://is.gd/9EoKN [JDK: java.awt.GridBagLayout]
[22:57:18] <pstickne> exobyte, one could very easily extend the 'why UTF-32' to 'why UTF-16' when there is a UTF-8, for instance.
[22:57:29] <ztj> exobyte: so what if it's wasteful for most purposes? who the hell cares? When was the the point of any of this conversation?
[22:57:37] <pstickne> (or why not UTF-6/7?)
[22:57:55] <exobyte> pstickne: because we use 8-bit bytes
[22:58:11] <ztj> so you think
[22:58:15] <pstickne> exobyte, how does that relate to UTF-32 vs UTF-16 as UTF-16 vs UTF-8?
[22:58:22] <Agbeladem> Ruum, wish you luck, always hated that javadoc page :p
[22:58:23] <exobyte> I've always found UTF-8 to be more popular than 16
[22:58:31] <pstickne> (and see what ztj said -- there are many odd sizes of 'bytes' historically :-)
[22:58:31] <ztj> but you apparently did not live during the dark ages of the dialup mode where a single baud could only carry 7 bits over unreliable connections
[22:58:37] <linxeh> we use UTF-8 because most of us write in ASCII, so it means that most characters take less apce
[22:58:46] <linxeh> UTF16 is is better for CJK etc
[22:58:52] <FauxFaux> 31-bit IBM, gogo.
[22:58:53] *** epure has quit IRC
[22:58:59] *** charzero has quit IRC
[22:59:08] <Agbeladem> oh I have but one final question
[22:59:20] <Agbeladem> Given a Field instance
[22:59:23] <Ruum> ya well all I need to do know before I use gridbag again is now to pass the number of columns and rows the way I want - because I dont know if you use it like a gridlayout in that way
[22:59:25] <Agbeladem> or with any class
[22:59:27] <Ruum> for example:
[22:59:29] *** rantingsteve has quit IRC
[22:59:32] <FauxFaux> !give Agbeladem return
[22:59:34] <Agbeladem> how could I analyse that class to get the value of  the field?
[22:59:38] *** Ivellina has quit IRC
[22:59:40] <Ruum> setLayout(new GridLayout(3,3,1,1));
[22:59:52] <ztj> pstickne: you have to wonder why you are going on about UTF-32, wasn't your point about formats specifying endianness?
[22:59:54] <FauxFaux> ..I need to stop doing that.
[23:00:07] <Agbeladem> sorry FauxFaux
[23:00:09] *** EnginA has joined ##java
[23:00:13] <FauxFaux> Agbeladem: Seriously, you could answer that in one second with the docs.
[23:00:21] <Agbeladem> Yeah trying to
[23:00:29] <pstickne> ztj, oh, yeah, completely not related. That was in defense of the 'why UTF-32?' :-)
[23:00:30] <Agbeladem> I got getLong() etc for intrinsic types
[23:00:37] <FauxFaux> You want to GET the value of a Field on an Object?
[23:00:50] <Agbeladem> yes, but automatically
[23:00:53] *** DirtyD has left ##java
[23:00:54] <ztj> pstickne: oh well that's a question you shouldn't have to answer :)
[23:00:56] <FauxFaux> Agbeladem: Are you reading the docs from bottom to top?
[23:00:59] <Agbeladem> I can browse and object with the reflection class
[23:01:04] <Agbeladem> an* object
[23:01:14] <FauxFaux> Agbeladem: Open the damn javadocs.  Read the method names outloud.
[23:01:14] <Agbeladem> and get the names of the methods and fields
[23:01:20] *** jesmon has joined ##java
[23:01:30] <FauxFaux> ~~ Agbeladem javadoc java.lang.reflect.Field
[23:01:31] <javabot> Agbeladem: http://is.gd/52WkK [JDK: java.lang.reflect.Field]
[23:02:05] <Agbeladem> that arises a question
[23:02:13] <FauxFaux> No it doesn't.
[23:02:15] *** Varox has quit IRC
[23:02:17] <Agbeladem> how could one use get() if the field is supposed to be private ?
[23:02:28] *** jivedude has quit IRC
[23:02:31] <Ruum> agbeladem how do I get 6 colums across and 3 rows using gridbag?
[23:02:45] <Agbeladem> huuu.. xD
[23:02:57] <Agbeladem> I'm no specialist with layouts
[23:02:59] *** monestri has quit IRC
[23:03:02] <Ruum> lol what?
[23:03:04] <FauxFaux> Agbeladem: You mean, yuo want to SET it ACCESSIBLE?  Again, docs.
[23:03:21] <Agbeladem> I don't get the philosophy of this FauxFaux
[23:03:21] *** EnginAy has quit IRC
[23:03:29] <FauxFaux> Agbeladem: The philosophy of reading the docs?
[23:03:33] *** omaru has quit IRC
[23:03:37] <Agbeladem> what's the point of forbidding an access if anybody can set it accessible ?
[23:03:39] *** merp has joined ##java
[23:03:59] <Ruum> well can anyone help me get this grid correct using gridbag?
[23:04:06] <Agbeladem> (Ruum, what aren't you able to do that isn't in the tutorial ?)
[23:04:59] <Ruum> I want a 6 column 3 row layout using gridbag
[23:05:16] *** monestri has joined ##java
[23:05:48] <Agbeladem> yes... that will be set step by step with the gridx and gridy fields
[23:06:08] *** rohdef has quit IRC
[23:06:28] *** bearded_oneder has joined ##java
[23:06:35] <FauxFaux> Agbeladem: Setting it accessible requires permissions (which you have by default in a desktop environment).  Also, private is about software design, reflection is normally about undoing software design.
[23:06:54] <Agbeladem> I see
[23:07:02] *** Matic`Makovec has quit IRC
[23:07:08] *** JusticeFries has quit IRC
[23:07:26] *** BeholdMyGlory has joined ##java
[23:07:33] *** askhl_ has quit IRC
[23:08:08] <jonkri> just read http://www.osgi.org/About/WhyOSGi... cool stuff
[23:08:26] *** DWSR is now known as Shadowed4
[23:08:36] *** Shadowed4 is now known as Shadowed9001
[23:09:11] *** Shadowed9001 is now known as DWSR
[23:09:28] *** cemerick has quit IRC
[23:09:31] *** RealKillaz has quit IRC
[23:09:39] *** askhl_ has joined ##java
[23:10:34] *** kezz has joined ##java
[23:11:08] *** rjohnson19 has joined ##java
[23:11:27] *** e1n85 has quit IRC
[23:11:42] *** gverig has joined ##java
[23:11:43] *** styx_ has quit IRC
[23:11:57] *** yogione has joined ##java
[23:12:35] * ztj uses osgi every day
[23:13:09] *** Niall has joined ##java
[23:13:17] *** lanalyst has quit IRC
[23:13:19] <Agbeladem> okay anyway I'm off
[23:13:24] <Agbeladem> thank you pstickne for the explanations
[23:13:32] *** [twisti] has quit IRC
[23:14:08] *** tomvolek has joined ##java
[23:15:05] *** delskorch has joined ##java
[23:16:36] <Ruum> agbeladem this now looks TERRIBLE:
[23:16:46] <Agbeladem> ha well
[23:16:53] <Agbeladem> now you know why I hate layouts haha
[23:17:13] *** Araxia has joined ##java
[23:18:25] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[23:18:34] <joed> ~seen ernimiril
[23:18:58] <javabot> joed, I have no information about "ernimiril"
[23:19:06] <ztj> one too many i's
[23:19:11] <gverig> I'm having troubles using Connector/J and MySQL with international (non-latin 1) text. Anybody has any idea how to debug it? Table is UTF8, connector seems to be set up as utf8, when I get data directly through mysql client I see correct data... any thoughts/insight/etc?
[23:19:38] <linxeh> ooh what GPL project are you working on ?
[23:19:46] <Agbeladem> Ruum, wish you luck, you'll need it with gridbag, thanks for everything bye
[23:19:47] *** Agbeladem has left ##java
[23:20:22] <Ruum> then WHY DONT I JUST GO BACK TO BOXLAYOUT ?!?!?!?
[23:20:25] <Ruum> :-/
[23:20:28] <joed> Indeed....
[23:20:34] <Ruum> :'-(
[23:20:36] <joed> ~seen ernimril
[23:20:41] <javabot> joed, ernimril was last seen at 2/23/10 6:07 AM with the following entry: oh well, time to get to the airport. Time to see some sun. :-)
[23:21:02] <Ruum> who here is good with layouts?
[23:21:09] <Ruum> using GUIs
[23:21:10] <Ruum> ?
[23:22:04] *** CMoH has quit IRC
[23:22:29] <waz> ~seen joed
[23:22:29] <javabot> waz, joed was last seen at 3/4/10 5:17 PM with the following entry: ~seen ernimril
[23:22:32] *** Gravitron has quit IRC
[23:22:34] *** jonkri has quit IRC
[23:22:34] * luke85 is good with layouts
[23:22:43] <S11001001> _W_: I attached a patch to the jira issue; thanks again for your help
[23:22:44] <joed> ~seen waz
[23:22:44] <javabot> joed, waz was last seen at 3/4/10 5:19 PM with the following entry: ~seen joed
[23:22:53] <joed> ~seen javabot
[23:22:53] * luke85 suggests Rumm to read FAQ
[23:22:53] <javabot> joed, javabot was last seen at 3/4/10 5:19 PM with the following entry: joed, waz was last seen at 3/4/10 5:19 PM with the following entry: ~seen joed
[23:23:10] <JavaGeek> ~seen seen
[23:23:21] <javabot> JavaGeek, I have no information about "seen"
[23:23:37] <joed> ~seen noobs than google
[23:23:37] <javabot> joed, I have no information about "noobs than google"
[23:23:41] <joed> ~seen noobs that google
[23:23:42] <javabot> joed, I have no information about "noobs that google"
[23:23:55] <joed> ~pulp fiction
[23:23:55] <javabot> You feel that sting, big boy, huh? That's pride FUCKIN' with you! You gotta fight through that shit!
[23:25:48] *** Xion345 has joined ##java
[23:26:08] *** Magnastash has joined ##java
[23:26:52] *** ech0s7 has quit IRC
[23:26:58] *** philosophia has joined ##java
[23:27:25] *** [TechGuy] has quit IRC
[23:27:57] <Xion345> I would like to know if any kind of remote ArrayList exists
[23:28:27] <Xion345> I mean an ArrayList where remote applications can add/remove/iterate over elements
[23:28:52] *** Steve^ has quit IRC
[23:28:55] <Ruum> luke85 please help me
[23:28:55] <joed> ~rmi
[23:28:56] <javabot> joed, rmi is http://java.sun.com/docs/books/tutorial/rmi/index.html
[23:29:09] <Ruum> this is looking like $h!+ !!!!!
[23:29:32] *** ldam has quit IRC
[23:29:44] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[23:30:13] <Xion345> Okay, I was just wondering if it existed
[23:30:38] *** rdg has quit IRC
[23:30:43] <luke85> Ruum: what exactly do you want?
[23:30:52] <Xion345> Thanks
[23:31:37] <Ruum> I want the jlabels and the jtextfields to be close together but a gap between each of them likes so:
[23:32:09] <Ruum> jlabel:jtexfield GAP jlabel:jtexfield  GAP jlabel:jtexfield
[23:32:23] <Ruum> gap or space however you look at ti
[23:32:25] <Ruum> it
[23:32:39] <luke85> Ruum: how wide the gap is? could you post me a screenshot?
[23:32:51] *** lolsuper_ has joined ##java
[23:32:59] <Ruum> and I need it to be 6 columns across and 3 rows down
[23:33:21] <Ruum> the gap could be like 1/4 of an inch or less
[23:33:28] <luke85> and send SSCCE
[23:33:44] <Ruum> it just needs to looks neat and not jammed together
[23:33:57] <Ruum> luke you mean you want a pastebin?
[23:34:17] <luke85> Ruum: see &1 and &2 posts before. yes, pastebin
[23:34:40] <Ruum> well dude I gave you a screenshot
[23:34:58] <Ruum> http://student.fgcu.edu/jsummerh/javaproject/FGCUmicroSimIEEE2010.jpg
[23:35:14] <Ruum> and here is a current pastebin
[23:35:24] <Ruum> and I can update your screenshot if you like
[23:35:30] <Ruum> but it still looks bad
[23:35:45] *** kezz has quit IRC
[23:35:52] <luke85> Ruum: don't see pastebin
[23:36:24] <Ruum> http://pastie.org/854680
[23:36:34] <Ruum> and there is my paste bin
[23:36:41] <Ruum> lemme update the screenshot
[23:38:05] *** tak11 has joined ##java
[23:38:17] *** ulfdoz has quit IRC
[23:38:20] <luke85> Ruum: could you give me SSCCE, please? http://mindprod.com/jgloss/sscce.html
[23:38:42] <Ruum> screenshot updated
[23:41:16] <Ruum> well I mean the pastebin gives you the code
[23:41:25] <Ruum> and the screenshot shows how bad it looks
[23:41:42] <Ruum> I am not sure what you want by a sscce ?
[23:41:53] <Ruum> I read it briefly
[23:41:59] *** ldam has joined ##java
[23:42:09] <Ruum> if you want I will send you the .jar file
[23:42:16] <Ruum> I can do that too
[23:42:17] <luke85> Ruum: i need to c&p the code to the gui environment to play with it a bit to figure out how GBL parameters should be correctly set.
[23:43:08] <luke85> Ruum: but it is not even a runnable class
[23:43:21] *** Theravadan has quit IRC
[23:43:25] *** mvfranz has quit IRC
[23:43:33] <Ruum> kk well I was also thinking a box layout too
[23:43:45] <Ruum> but no one seemed to help me much with that
[23:44:35] <saml> hey, can I get temporary file name without actually creating a file using File.createTemporary
[23:45:00] *** pgib has quit IRC
[23:45:06] <Ruum> here I will pastebin most of the gui stuff.
[23:45:11] <luke85> Ruum: gbl is far more complicated than any other layout. i used miglayout or formlayout with forms/buttons, but those are not java native layouts. for such simple button bar, i think you could use some simpler layout. But I dont know the semantics of other layouts, though grid might be well suited for your task.
[23:46:32] <Ruum> but I am not having trouble with jbuttons man
[23:46:33] *** philosophia has quit IRC
[23:46:35] <Ruum> that is done
[23:46:40] *** Xion345 has quit IRC
[23:46:53] <Ruum> I am having trouble with jlabels and jtextfields
[23:47:14] <luke85> you mean those register indexes below buttons?
[23:47:21] <curiousbob> Ruum: GridBagLayout is tough, but it is the best overall, IMO.
[23:47:37] <Ruum> here is my pastebin
[23:47:39] <Ruum> http://pastie.org/854700
[23:47:42] <luke85> curiousbob: for serious applications that is not true
[23:47:56] <Ruum> ya the registers
[23:48:09] *** trsh has joined ##java
[23:48:25] <Ruum> I need the register and the output of the register right next to eachother then a space between them
[23:48:42] <luke85> Ruum: That is not SSCCE, too, because if I c&p it, it wont run
[23:48:48] *** philosophia has joined ##java
[23:49:30] <Ruum> well gimme something to copy paste it into my friend
[23:49:57] <Ruum> if you dont like paste bin
[23:50:17] <Ruum> I just havent heard of SSCCE before
[23:50:43] <Ruum> I mean you gave me the definition but that is all.
[23:51:31] <luke85> SSCCE must be a runnable snippet of code. To previous sentence: I assume that you dont want equal box size for each register. Because if you do, gridLayout should solve your problem
[23:52:45] <Ruum> kk well how do I adjust rows and columns with gridbag ?
[23:53:24] <Ruum> because the only thing that I want equal is the length of the JTextFields
[23:53:40] *** mr_gant has joined ##java
[23:54:09] <Ruum> because a grid layout will place a space between the jlabel and the jtextfield like so:
[23:54:30] <Ruum>  jlabel: GAP jtextfield  GAP
[23:54:39] <Ruum> and I DONT want that
[23:54:42] <Ruum> I want this:
[23:54:56] *** Petein has joined ##java
[23:55:06] <Ruum>  jlabel: jtextfield GAP  jlabel: jtextfield
[23:56:14] <Petein> hello im using a RequestBuilder to download the contents of a web page from my server. The content of that html is loaded fine. there i include a js library which is on the server as well. when i click on the image the slimbox2 js is not doing its job. ive seen through firebug that it can find the library. what am i doing wrong?
[23:56:33] *** tomvolek has quit IRC
[23:56:41] <Ruum> and I want in one row I want 3 jlabels and 3 jtextfields
[23:57:06] <Ruum> and I want it like that in a 3 column fashion
[23:57:34] *** ojacobson has joined ##java
[23:57:37] *** maxorator has quit IRC
[23:57:40] <luke85> Ruum: One option is to put JTextField and JLabel into its own JPanel and put that JPanel into grid cell.
[23:57:57] <Ruum> wow that would be horrible to do
[23:58:12] <Ruum> that is about 18 jpanels!!!!
[23:58:56] <Ruum> I am doing this with a group of people
[23:58:58] <luke85> Ruum: Well, that's Java GUI. What did you expected? It's a normal practice. JPanels are also for "GUI balancing" ;)
[23:59:41] <Ruum> but 3 other people have to look at my code after me and add "nuts and bolts" to it
[23:59:48] <gverig> what's the "proper" way to set encodings in Java web app? I know I can set it on the response directly, but is there a way to set it for the whole application?
[23:59:57] <Ruum> I am just making the GUI
[23:59:59] *** mvfranz has joined ##java

top