Switch to DuckDuckGo Search
   March 3, 2011  
< | 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 | >


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:01:06] *** shaunren has quit IRC
[00:01:15] *** VJTachyon has quit IRC
[00:01:27] *** pipeep has quit IRC
[00:01:40] *** VJTachyon has joined ##java
[00:02:20] *** pipeep has joined ##java
[00:02:39] *** VJTachyon has quit IRC
[00:02:55] *** sbxd_ has joined ##java
[00:03:01] *** barq has joined ##java
[00:04:19] *** Quantum_Ion has quit IRC
[00:04:20] *** deadbeef has joined ##java
[00:05:32] *** blbrown_win3 has joined ##java
[00:06:25] *** `linux has joined ##java
[00:06:32] *** `linux has left ##java
[00:06:36] <deadbeef> hello guys i've a problem; i've an abstract class with a method "public abstract Collection<A> a();", but when i try to override it with "public Collection<B> a() { .. }", with B that extends A, i get an error (the return type is incompatible)
[00:06:40] <deadbeef> any solution?
[00:07:08] *** BoF has quit IRC
[00:07:56] <cheeser> you can't override on return type
[00:08:09] <cheeser> use a different method name
[00:08:17] <deadbeef> yup but Collection<B> is a form of Collection<A>
[00:08:30] <cheeser> no.
[00:08:41] <kercyr> Collection<B> is a Collection<? extends A> perhaps.
[00:08:45] <cheeser> B may extend A but Collection<B> is not a Collection<A>
[00:08:48] <blbrown_win3> java practice...fail fast in a method, do you use it?
[00:08:51] *** [[thufir]] has joined ##java
[00:08:53] <cheeser> that'd be my advice
[00:09:24] <deadbeef> ok i think i'll use generics in the abstract class then
[00:09:27] <deadbeef> thanks a lot guys
[00:09:37] <deadbeef> (in the form suggested by kercyr)
[00:13:32] *** gtrak has quit IRC
[00:14:04] *** flukenstrug has joined ##java
[00:15:19] *** AgentisDave has quit IRC
[00:15:25] *** werdan7 has joined ##java
[00:16:02] *** mitch0 has quit IRC
[00:17:27] *** intuition has quit IRC
[00:18:19] <kercyr> I'm rendering a lot (thousands?) of small rectangles... a few of them which move... Rendering them to a JComponent naively takes about 60 ms. Is there a way to figure out which rectangles intersect the clipping rectangle quickly?
[00:18:53] <ernimril> ~prtree
[00:18:53] <javabot> ernimril, prtree is a Priority R-Tree a spatial data structure that enables quick lookup of data inside a query rectangle as well as nearest neighbour queries. This implementation is very small and memory efficient. For more information see: http://www.khelekore.org/prtree/
[00:19:09] <ernimril> kercyr: ^^^
[00:19:10] <kercyr> the problem is the it's not mutable.
[00:19:41] <kercyr> I just wrote a test program for prtree for static data. It worked like a champ.
[00:19:58] *** fahadsadah has quit IRC
[00:20:22] <kercyr> crazy amazing, actually... but not quite good nuf.
[00:21:06] <ernimril> kercyr: have a prtree with the entries that do not move, handle the moving ones separatly
[00:21:37] *** arborist has quit IRC
[00:21:47] <ernimril> kercyr: or look for another r-tree (there are a few that supports mutating the tree, but all that I have found sucks memory wise)
[00:22:01] <kercyr> it's hard to tell which will move and which won't. The idea is that you can drag the any given group of rectangles back and forth.
[00:22:57] <ernimril> kercyr: how long does it take to rebuild the prtree with the static parts, once you have decided that some of them are moving?
[00:23:45] *** Matuku has joined ##java
[00:24:45] *** Radu-Mihail has joined ##java
[00:24:53] *** fahadsadah has joined ##java
[00:24:58] <[twisti]> is there an annotation i could use to implicate that a certain variable is public for legacy reasons, due to change and is not to be used ?
[00:25:22] <[twisti]> i was thinking of deprecated, but that doesnt seem to convey the same message
[00:25:34] <Radu-Mihail> Why not?
[00:25:36] <dmlloyd> that's what deprecated means
[00:26:32] *** djbpython has quit IRC
[00:26:34] *** choongii has quit IRC
[00:26:39] <[twisti]> wow, weird, my head is in a strange place, youre completely right, thats exactly what it means
[00:26:45] <[twisti]> sorry, just ignore me
[00:28:01] <cheeser> @Obsolete would be nice.
[00:28:21] <cheeser> it'd allow existing binaries to work but fail any compiles that reference it.
[00:28:32] <cheeser> best of both worlds. kind of.
[00:30:02] <Radu-Mihail> :)
[00:30:06] *** jesmon has joined ##java
[00:31:31] *** c_axis has joined ##java
[00:33:43] <[twisti]> it would be nice if @Deprecated use would fail on compile time unless you override it with a reason stringor specify a certain compiler flag for those old legacy code pieces
[00:35:08] *** flukenstrug has quit IRC
[00:35:50] *** r0bby has joined ##java
[00:36:43] *** r0bby has quit IRC
[00:37:07] <kercyr> ernimril, probably at least as long as drawing them... (sorry for the delay)
[00:37:09] *** r0bby has joined ##java
[00:38:08] <ernimril> kercyr: that sounds odd, you should not need to rebuild the tree on every redraw
[00:38:20] *** wils has quit IRC
[00:38:46] <ernimril> kercyr: so, yes, it might take that long for one rebuild, but then you repaint a lot of times using the same tree (and have fast lookup during all of those repaints)
[00:38:50] <kercyr> well, if you're dragging something around, it's changing as fast as the mouse moves... which issues are repaint().
[00:39:14] *** bitshuffler has joined ##java
[00:39:20] <kercyr> oh, I see... I'm not seeing the trees through the prtrees.
[00:39:23] <ernimril> kercyr: one tree with non-moving parts, one list with parts that updates
[00:39:38] <ernimril> kercyr: one prtree with ...
[00:39:39] *** cythrawll has quit IRC
[00:39:44] *** deadbeef has left ##java
[00:40:27] *** flukenstrug has joined ##java
[00:41:02] *** matsebc has quit IRC
[00:41:46] *** ojacobson has joined ##java
[00:42:17] *** bearded_oneder has joined ##java
[00:42:28] <kercyr> it's a good thought. I'm afraid that it's even difficult to figure out which ones have moved. (There's actually another algorithm making sure that the rectangles are nonoverlapping...)
[00:42:34] <kercyr> huh... they're nonoverlapping...
[00:43:27] *** ninan has quit IRC
[00:44:08] *** Dux has quit IRC
[00:44:11] <ernimril> kercyr: ok, I am not really sure what you are trying to do, but right now it is sleeping time for me. if you still have the problem tomorrow then give more detail and I will try to think of something
[00:45:25] <kercyr> :-) Thanks for conversation. It's certainly helpful.
[00:47:00] *** Alkhi has quit IRC
[00:47:29] *** tyebud has joined ##java
[00:47:35] *** matsebc has joined ##java
[00:48:18] *** tyebud has quit IRC
[00:49:57] *** shaunren has joined ##java
[00:51:30] *** tyebud has joined ##java
[00:51:38] *** pipeep has quit IRC
[00:51:45] *** sebersole has quit IRC
[00:51:46] *** tyebud has quit IRC
[00:52:55] *** Cpudan80 has quit IRC
[00:53:10] *** barq has quit IRC
[00:53:21] *** bradford has quit IRC
[00:53:21] *** CBro2007 has joined ##java
[00:53:29] *** balr0g has quit IRC
[00:54:09] *** barq has joined ##java
[00:54:23] *** tyebud has joined ##java
[00:54:49] <tyebud> Where can I ask a question about applet crap
[00:54:58] *** barq has quit IRC
[00:55:16] *** tyebud has quit IRC
[00:55:24] <caverdude> anywhere but here
[00:55:58] *** homie has quit IRC
[00:56:30] <CBro2007> I just used Myeclipse and created a simple web application and I get an error in index.jsp :(
[00:56:38] <CBro2007> String path = request.getContextPath();
[00:56:48] <CBro2007> it says String cannot be resolved to a type
[00:56:48] *** ninan has joined ##java
[00:56:51] *** [twisti] has quit IRC
[00:56:53] *** fisted has quit IRC
[00:57:01] <CBro2007> does anyone here know how I can fix this?
[00:58:08] *** fisted has joined ##java
[00:58:25] *** jesmon has quit IRC
[01:00:35] *** flukenstrug has quit IRC
[01:00:40] *** EvilPenguin has quit IRC
[01:03:02] *** Fisiu has quit IRC
[01:04:30] <sbxd_> Aren't cannot be resolved to a type errors due to lack of imports?
[01:04:31] *** Versuchen has quit IRC
[01:05:17] *** brundlefly has quit IRC
[01:05:36] *** rretzbach has quit IRC
[01:05:44] *** drindt has quit IRC
[01:06:44] *** benoitdo has joined ##java
[01:06:52] <ojacobson> Proximally. However, in this case the root cause is putting code where it don't belong.
[01:06:56] *** RLN has joined ##java
[01:07:08] *** Bombstone has quit IRC
[01:07:27] <ojacobson> The Java web platform provides lots of ways to not mix presentation (via JSPs or any other template system) and logic (via servlets, controllers, or higher-level controller systems).
[01:08:52] <dmlloyd> ~@Resource problem is http://jaitechwriteups.blogspot.com/2011/02/resource-and-new-lookup-attribute-how.html
[01:08:52] <javabot> OK, dmlloyd.
[01:08:54] *** DJClean has quit IRC
[01:10:34] <ojacobson> Bleagh.
[01:10:47] *** h6w has joined ##java
[01:11:32] *** r0bby is now known as robbyoconnor
[01:11:44] <RLN> i'm developing an android application in which i need to have several independent functions, which are executed rather dynamically based on opcodes. i am wondering if it will be a memory issue if i use an object for each "operation" (ionly say this cause there are MANY operations) - or since i'm working with android would it be better to use one giant switch?
[01:11:59] <dmlloyd> ojacobson: no kidding :)
[01:12:06] <ojacobson> RLN: try it the clean way first
[01:12:17] <ojacobson> if and only if you discover limits, then work with those limits
[01:12:31] <RLN> okay :( it is a lot of work though
[01:12:42] *** homie has joined ##java
[01:12:51] <cbeust> RLN: Both are about the same amount of work, but ojacobson is right. I would use a map to start with, personally
[01:13:17] <RLN> okay thanks for opinions
[01:13:33] *** geoaxis has joined ##java
[01:13:39] <geoaxis> hello people
[01:14:10] <geoaxis> I am looking for ideas on how to harvest related keywords and implement it in Java
[01:14:21] <h6w> I seem to be having a problem with HashMap. Map says (key==null ? k==null : key.equals(k)) and yet it doesn't seem to be calling my equals() function on my key type when I use get() or containsKey(). Has anyone else had this experience? Am I missing something?
[01:14:31] <geoaxis> any ideas would be appreciated
[01:14:58] *** Sivam has quit IRC
[01:15:04] *** optraz has quit IRC
[01:15:24] <ojacobson> h6w: What's the signature of your equals method?
[01:15:25] <paissad> guys, i would like to know if it possible to access a database loaded "in-memory" (via the admin dashboard web interface) .. here is the url:
[01:15:26] <paissad> jdbc:h2:mem:worldcities (worldcities is the db name)
[01:15:26] <paissad> if i don't use the mem: subprotocol, i can access the DB and view it via the web interface
[01:15:54] <paissad> i forgot to say that the jvm is still running ( i did a while(true) { sleep ...}
[01:16:00] <cbeust> h6w: if the map never ends up calling your equals() method, it most likely means a problem with the equals() method of the key class you're using (which I'm guessing you wrote yourself?)
[01:16:01] <h6w> ojacobson: public boolean equals(AppPath otherpath)
[01:16:13] <ojacobson> h6w: That doesn't override Object.equals.
[01:16:38] <h6w> Hmmm, ok. So it actually needs to be Object, not <? extends Object>?
[01:16:38] <ojacobson> Add an @Override annotation (so the compiler can tell you next time this happens) and then fix the signature to something properly co/contravariant with Object.equals.
[01:16:55] <paissad> i'm in embedded mode btw
[01:17:01] <ojacobson> (In this case your only correct option is @Override public boolean equals(Object o)
[01:17:26] *** cbeust has quit IRC
[01:17:52] *** Elazar has joined ##java
[01:23:09] *** FrozenKnight has quit IRC
[01:24:41] *** t0rc has joined ##java
[01:25:58] *** echosystm has joined ##java
[01:26:02] *** wad has quit IRC
[01:27:02] <echosystm> i'm writing a servlet filter and it would seem that multiple server requests are being handled by a single servletrequest object
[01:27:24] <echosystm> if i sendError without checking if it is committed first, i get errors
[01:27:39] <echosystm> can someone explain whats going on here?
[01:28:25] *** pipeep has joined ##java
[01:29:03] <echosystm> ie. if (request.isCommitted()) { request.sendError(404); }
[01:29:27] <echosystm> if i just request.sendError(404), i get errors saying the response has already been comitted
[01:29:34] <echosystm> ugh, replace 'request' with 'response'
[01:30:37] *** mischievious has joined ##java
[01:30:40] <ojacobson> How does this lead to your original supposition (that the same request are being handled by the same object)?
[01:31:04] *** Radu-Mihail has quit IRC
[01:31:12] <echosystm> ok, let me explain again
[01:31:16] <echosystm> imagine all my filter does is this...
[01:31:22] <ojacobson> (Have you looked up what "committed" means in the context of the web request lifecycle?)
[01:31:41] <echosystm> its when the response is being sent back
[01:31:43] <echosystm> no?
[01:32:03] <ojacobson> Specifically, a response is considered committed when at least some output has been sent back to the user agent.
[01:32:07] <echosystm> ie. headers can no longer be changed
[01:32:07] <echosystm> yes
[01:32:11] <ojacobson> Once a response is committed you can no longer change the status or headers
[01:32:17] *** dmlloyd has quit IRC
[01:32:22] <ojacobson> so your i.e. up there is flatly nonsensical...
[01:32:49] <echosystm> imagine my servlet only does this - response.sendError(404);
[01:32:50] <h6w> ojacobson: Odd. I've changed it to public boolean equals(Object o) but it's still not being called.
[01:32:59] *** Matuku has quit IRC
[01:32:59] *** modernbob has quit IRC
[01:33:01] <h6w> And added @Override.
[01:33:11] <echosystm> that would give me errors when multiple requests come through
[01:33:12] <ojacobson> h6w: clean build
[01:33:13] *** RobotCow has quit IRC
[01:33:20] *** TecladoZurdo has joined ##java
[01:33:20] *** mischief has quit IRC
[01:33:26] *** modernbob has joined ##java
[01:33:37] *** TecladoZurdo has left ##java
[01:33:47] <h6w> ojacobson: Yes. Clean build.
[01:34:39] *** RobotCow has joined ##java
[01:34:47] *** xiliax has quit IRC
[01:34:56] *** RobotCow has quit IRC
[01:35:03] *** CBro2007 has quit IRC
[01:35:17] *** RobotCow has joined ##java
[01:36:36] *** Elazar has left ##java
[01:37:34] <ojacobson> Insufficient information, then.
[01:37:35] <ojacobson> ~show us
[01:37:36] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[01:37:43] <ojacobson> echosystm: No, it won't. Not without some other problem.
[01:38:13] <ojacobson> A naked HttpServlet whose only action is to set an error code in the response will reliably generate that error
[01:38:27] <ojacobson> If you're seeing something else, it's because something else is happening
[01:38:34] <h6w> Yeah. Pastebin seems to be inaccessible at the moment. I've been waiting a few mins for it to come up.
[01:38:43] <ojacobson> ~info pastebin
[01:38:43] <javabot> pastebin was added by: cheeser on 11-16-2010 at 3:04 PM, EST and has a literal value of: <reply>(http://eugeneciurana.com/pastebin|http://rifers.org/paste|http://mysticpaste.com|http://pastie.org|http://ideone.com/|http://paste.pocoo.org/) - Paste the final url after you've pasted your stuff there.
[01:38:48] <ojacobson> Try one of the others :)
[01:39:09] *** zesoze has joined ##java
[01:40:14] *** bduncan has joined ##java
[01:40:15] <h6w> ojacobson:http://pastebin.com/nTfptfeU
[01:40:16] *** wils has joined ##java
[01:40:46] <ojacobson> h6w: psst: null instanceof T is always false
[01:40:47] <zesoze> hi..I'm having troubles with Java out of memory exception...when trying to calculate a distance matrix.....anybody knows some way to better perform it or a way to monitor the memory usage?
[01:41:00] <ojacobson> however, using instanceof with a non-final class is (usually) insufficient to correctly implement equals
[01:41:05] <psst> ojacobson: thanks
[01:41:11] <ojacobson> AND you haven't implemented hashCode in a way that's compatible with equals
[01:41:26] <ojacobson> Object.equals and Object.hashCode both make that requirement clear in the docs - don't tell me you overrode a method without reading its docs
[01:41:33] *** wils has left ##java
[01:41:38] * psst wonders how ojacobson knows about that.
[01:41:44] <zesoze> this matrix is symmetric matrix which has a large number of cell some thing greater than 7.000 doubles values
[01:41:53] <ojacobson> psst: oops
[01:41:58] <ojacobson> that wasn't meant as an alert, more of a whisper :)
[01:42:09] <psst> ojacobson: but don't worry, eclipse pointed out my folly and I removed my equals() method
[01:42:18] <h6w> lol
[01:42:23] <zesoze> I reduce it by half but it remains given the exception
[01:42:45] <psst> ojacobson: wait — you didn't know about my code at all!
[01:42:55] <ojacobson> psst: damn! busted.
[01:43:47] <zesoze> I trying to do something with files to avoid memory usage...but this it a little trick to do...
[01:44:32] <h6w> ojacobson: The way I read it, hashCode() is an optimisation. Do I really need to implement that, too?
[01:45:05] <ojacobson> What part of
[01:45:06] <ojacobson> Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.
[01:45:07] <ojacobson> is unclear?
[01:45:19] <ojacobson> 'must' in the RFC-must sense, I.E., skip it at your peril :)
[01:45:34] <ojacobson> in this specific case, no, it really is necessary. You're using instances of your class in a hashing collection.
[01:45:42] <ojacobson> How do you suppose it decides which hash bucket to look in?
[01:45:49] <Fanook> magic
[01:45:53] <ojacobson> ~pfm
[01:45:53] <javabot> pure fucking magic
[01:46:31] <h6w> "Implementations are free to implement optimizations whereby the equals invocation is avoided, for example, by first comparing the hash codes of the two keys. (The Object.hashCode() specification guarantees that two objects with unequal hash codes cannot be equal.) "
[01:46:54] <h6w> I was reading a different part of the spec. To do with Map rather than Object.
[01:47:50] <ojacobson> Right, but if you're going to override a method (even something as apparently simple as Object.equals) it's smart to read the docs for that method
[01:48:11] <h6w> Yeah. Kapish. :-)
[01:48:17] <ojacobson> The parenthetical part you just quoted does rather imply the same thing I said, though
[01:48:35] <ojacobson> The default implementation of Object.hashCode() ensures that != objects usually have != hashCodes
[01:48:46] <ojacobson> it would be an astronomical fluke if your code had worked :)
[01:49:05] <h6w> Yeah. I was confused by the prefacing sentence talking about optimisations.
[01:50:10] *** wchun has quit IRC
[01:50:43] <ojacobson> In fact, Sun's implementation uses one of those optimizations
[01:50:55] <ojacobson> it never even looks in the buckets for hash codes other than the hash code of the key you passed in
[01:52:26] *** ninan has quit IRC
[01:54:56] <whoever> isn't getMaxSearchDepth() part of java.io ?
[01:55:17] <ojacobson> Methods aren't generally part of packages
[01:55:29] <ojacobson> Methods live in classes, classes live in packages
[01:56:04] <whoever> ojacobson: well i am trying to use it and i keep getting that it cannot be resolved
[01:56:21] <ojacobson> I don't see how that in any way contradicts what I just said.
[01:56:22] *** [[thufir]] has quit IRC
[01:56:26] *** dmlloyd has joined ##java
[01:56:43] *** cbeust has joined ##java
[01:56:51] *** homie has quit IRC
[01:57:05] *** [[thufir]] has joined ##java
[01:57:25] <whoever> ojacobson: well in my limited time with java when i get cannot be resolved it is a package issue
[01:57:45] <ojacobson> What's on the left of the dot, before that method call?
[01:58:02] *** [[thufir]] has quit IRC
[01:58:12] *** [[thufir]] has joined ##java
[01:58:20] *** homie has joined ##java
[01:58:53] <whoever> ojacobson: files[x]
[01:59:03] <ojacobson> What does the declaration of files look like?
[01:59:11] *** [[thufir]] has quit IRC
[01:59:20] *** homie has quit IRC
[01:59:26] *** [[thufir]] has joined ##java
[01:59:48] *** [[thufir]] has quit IRC
[02:00:08] <whoever> ojacobson: files = dir.listFiles();
[02:00:19] <Fanook> that's not what he asked
[02:01:07] <ojacobson> That's its initialization... The declaration is the bit where you say what type it is, and what scope it has. In this case it'll look like either 'Something[] files;' or 'Something[] files = '.
[02:01:13] *** homie has joined ##java
[02:01:44] *** homie has quit IRC
[02:02:01] <whoever> File[] files = dir.listFiles();
[02:02:24] <ojacobson> Ok, so that makes the expression files[x] have the type File.
[02:02:35] <ojacobson> Does java.io.File have a method named getMaxSearchDepth?
[02:03:08] <whoever> ojacobson: i am recurisvly seracing and listing files and directories
[02:03:22] *** tewecske has quit IRC
[02:03:23] <ojacobson> That's an interesting story. Nothing to do with what I asked, though.
[02:03:30] *** Soliah has joined ##java
[02:03:50] *** fuzzygroove has joined ##java
[02:04:59] <Fanook> let's go one step further. whoever: why do you think that method call should work?
[02:05:49] *** ChanServ sets mode: +o dmlloyd
[02:05:58] <whoever> Fanook: because i am trying to print out the depth of the search for files
[02:06:00] *** [[thufir]] has joined ##java
[02:06:07] *** txithihausen has joined ##java
[02:06:15] <Fanook> so?
[02:07:17] *** dextro_ has quit IRC
[02:07:46] <Fanook> you obviously had some thought process that led you to believe that code would work. What was that process?
[02:07:55] *** mhahe has quit IRC
[02:08:49] <whoever> Fanook: that i want to see how far deep in the recursion the file is , and eventualy set the max depth
[02:09:12] *** zemanel has joined ##java
[02:09:23] *** Farmer_ has quit IRC
[02:09:34] *** bn` has quit IRC
[02:09:37] <whoever> but i should problably set it on the directory that I am searching
[02:09:51] <Fanook> right, you've said that before. Why did you think that method existed on that class?
[02:09:55] *** shaunren has quit IRC
[02:10:13] *** Denebola has quit IRC
[02:11:00] <whoever> Fanook: because I think it would be a way to filter a search and fileFilter is in java.io.
[02:11:21] * Fanook gives whoever a pony
[02:11:39] *** McMAGIC-- has quit IRC
[02:11:51] *** sbxd_ has quit IRC
[02:11:56] <whoever> alright a pony ... can i trade up :-)
[02:12:13] <cheeser> you're saying you want to talk to a man about a horse?
[02:12:20] *** KarlKFI|work has quit IRC
[02:12:34] <Fanook> i've got a bridge for sale. I'll take a pony in trade
[02:12:47] *** Willy has quit IRC
[02:13:26] <ojacobson> whoever: Point of all of this is: just because you want a method to exist doesn't necessarily mean it does, and just because you heard about it somewhere doesn't mean that guy was right. Always check the docs.
[02:13:32] *** homie has joined ##java
[02:13:46] <ojacobson> In this case, you're going to have to build your own recursion depth limiting - there are a few ways to do it (by examining the file, by keeping a count, and others).
[02:14:57] <whoever> ojacobson: ok, will try
[02:15:34] <cheeser> Thread.currentThread.getStackTrace().length > <some limit> 8^)=
[02:15:39] <ojacobson> oi
[02:15:44] *** matsebc has quit IRC
[02:15:46] <cheeser> because, you know, performance isn't important.
[02:15:47] <cheeser> 8^)=
[02:15:48] <ojacobson> Don't give normals loaded handguns :)
[02:16:26] *** Fanook has quit IRC
[02:16:43] *** Fanook has joined ##java
[02:16:46] <whoever> ojacobson: i wan't a refund mine was preloaded with nurff balls
[02:16:54] <whoever> *want
[02:17:07] <ojacobson> Will you accept monopoly money?
[02:17:29] <dmlloyd> nurff
[02:19:18] <ojacobson> Oh, the benefits of exhaustive testing
[02:19:23] *** sbalmos has joined ##java
[02:19:43] <ojacobson> http://paste.pocoo.org/show/347237/ has a subtleish bug
[02:20:00] <ojacobson> Because I tested all 16 permutations, I didn't ship with it :)
[02:26:00] <txithihausen> Hi guys,
[02:26:32] <txithihausen> i'm dealing with a problem to generate an XML documento through JDOM Api
[02:26:43] *** Sliker has quit IRC
[02:27:13] *** flippo has quit IRC
[02:27:23] <txithihausen> i'd like to know how could I set the xmlschem intended through jdom?
[02:27:33] <txithihausen> do you happen to know anything about this?
[02:29:27] *** realtime has quit IRC
[02:33:02] *** Cymage has quit IRC
[02:33:37] <Fanook> ojacobson: that is rather subtle
[02:33:39] *** veritto has joined ##java
[02:33:56] *** dmb has quit IRC
[02:34:18] <Cher> ojacobson: % vs $ in the prime number lines with distance 4 :)
[02:35:05] *** Cymage has joined ##java
[02:36:09] *** dmb has joined ##java
[02:36:43] *** Cymage has quit IRC
[02:38:34] *** bduncan has quit IRC
[02:38:34] *** brunohl has joined ##java
[02:38:43] <ojacobson> That's one of them.
[02:39:03] <ojacobson> The other one is that GIVEN and FAMILY misformat null, "Dole" and "Bob", null respectively
[02:39:25] <ojacobson> (I barely counted the typo as a bug :)
[02:39:55] *** wolfman2000 has quit IRC
[02:39:55] *** jtrally has quit IRC
[02:39:55] *** paissad has quit IRC
[02:39:55] *** konr has quit IRC
[02:39:55] *** Blub\0 has quit IRC
[02:39:56] *** thomasp has quit IRC
[02:39:56] *** jink has quit IRC
[02:39:56] *** samferry has quit IRC
[02:39:56] *** Kneta_ has quit IRC
[02:40:53] *** Cymage has joined ##java
[02:40:53] *** brunohl has quit IRC
[02:42:01] <Cher> ojacobson: Well, if givenName or familyName is null, format wouldn't be used, no?
[02:42:24] <ojacobson> Right, and also the special case formats for handling those cases aren't smart enough
[02:42:41] <ojacobson> I ended up with http://paste.pocoo.org/show/347240/ instead
[02:42:51] *** ries has joined ##java
[02:43:07] <ries> How do I convert this : Fahrradtr%E4ger back into a UTF-8 string?
[02:43:46] <cheeser> new String(thatString.getBytes(), "UTF-8"))
[02:43:56] * ojacobson eyes cheeser.
[02:44:03] <ojacobson> ries: Looks like URL-encoding?
[02:44:03] *** wolfman2000 has joined ##java
[02:44:03] *** jtrally has joined ##java
[02:44:03] *** paissad has joined ##java
[02:44:03] *** konr has joined ##java
[02:44:03] *** Blub\0 has joined ##java
[02:44:03] *** thomasp has joined ##java
[02:44:03] *** jink has joined ##java
[02:44:03] *** Kneta_ has joined ##java
[02:44:03] *** samferry has joined ##java
[02:44:33] <ojacobson> De-URL-encode it, then decode the resulting byte[] under UTF-8 to get a String back out
[02:44:35] <ries> ojacobson: yes it is.... cheeser let me try that
[02:44:51] <ojacobson> (Lots of URL APIs work with Strings. These APIs are lying to you, very subtly. :)
[02:44:58] *** eyesUnclouded has joined ##java
[02:45:30] *** lamdk has quit IRC
[02:46:02] <ries> ojacobson: what do you mean?
[02:46:06] *** bitshuffler has quit IRC
[02:46:13] <ries> cheeser: I get Fahrradtr?ger back... Hmmmm
[02:46:18] *** wolfman2000 has quit IRC
[02:46:18] *** jtrally has quit IRC
[02:46:18] *** paissad has quit IRC
[02:46:18] *** konr has quit IRC
[02:46:18] *** Blub\0 has quit IRC
[02:46:18] *** thomasp has quit IRC
[02:46:19] *** jink has quit IRC
[02:46:19] *** samferry has quit IRC
[02:46:19] *** Kneta_ has quit IRC
[02:46:34] <cheeser> worth a shot
[02:46:35] <cheeser> 8^)=
[02:46:39] *** Cpudan80 has joined ##java
[02:46:41] <Cpudan80> Hello folks
[02:47:12] <ries> cheeser: :)
[02:47:12] *** grug has joined ##java
[02:47:25] <Cpudan80> I asked this earlier but didn't get any hits ---- I want to do a complex SQL query where I have several where statements (ie. WHERE user = "dan" OR user = "bill")
[02:47:46] *** terranova has quit IRC
[02:47:48] <Cpudan80> What the best way to do that .... Is the only method to simply write out the query in text form and execute it?
[02:48:08] *** tnzr has joined ##java
[02:48:12] <Cpudan80> I was kinda hoping to feed in an array or something, but if I have to write it out by hand - I'll live ....
[02:48:13] <tnzr> folx
[02:48:47] <ojacobson> Cpudan80: do you know in advance how many ? placeholders are going to appear?
[02:48:52] <ojacobson> If so, then yes, write it out the dumb way
[02:49:06] <ojacobson> if not, then use mybatis, jdbctemplate, or your ORM's query API, *NOT* string construction.
[02:49:29] <Cpudan80> Well with the API they pass me a List and I return a parallel list with the results
[02:49:37] <ojacobson> "No"
[02:49:45] <Cpudan80> no?
[02:49:59] <ojacobson> unless your database supports something like IN or ANY predicates against SQL ARRAYs, there's no way to turn a List into a big giant predicate list
[02:50:09] <ojacobson> ie. you can't use it to populate "... WHERE x IN ?"
[02:50:13] <ojacobson> (that's a syntax error, in fact)
[02:50:51] <Cpudan80> it's mysql underneath
[02:50:54] <ojacobson> And, really, any solution that involves the SQL ARRAY type is bad juju
[02:50:56] <ojacobson> oh, not even a database then
[02:51:06] <ojacobson> yeah, use some kind of query-constructing API (See list above)
[02:51:31] <Cpudan80> there is no ORM for this db unfortunately, I'll check out the others thanks
[02:51:50] *** wolfman2000 has joined ##java
[02:51:50] *** jtrally has joined ##java
[02:51:50] *** paissad has joined ##java
[02:51:50] *** konr has joined ##java
[02:51:50] *** Blub\0 has joined ##java
[02:51:50] *** thomasp has joined ##java
[02:51:50] *** jink has joined ##java
[02:51:50] *** Kneta_ has joined ##java
[02:51:50] *** samferry has joined ##java
[02:52:35] <ries> cheeser: ojacobson I see already what's going on, it's not properly encoded in the first place
[02:52:43] *** Behold has quit IRC
[02:53:59] <ojacobson> mybatis actually has two ways to do it - either via their query-mapping stuff or via an API that looks like http://paste.pocoo.org/show/347241/
[02:54:03] <ojacobson> (gross, but effective)
[02:54:16] <ojacobson> honestly this might be better solved in python - sqlalchemy is really nice for constructing SQL programattically
[02:54:28] <ojacobson> dunno if it runs under jython though
[02:55:36] *** O1athe has quit IRC
[02:57:16] *** [[thufir]] has quit IRC
[02:57:45] *** Olathe has joined ##java
[02:58:30] *** eidolon has joined ##java
[02:59:47] *** VooDooNOFX has joined ##java
[02:59:51] *** matsebc has joined ##java
[03:03:18] *** wliao has joined ##java
[03:04:44] <meeper> hehe, that api is dumb
[03:04:59] <veritto> quit
[03:05:19] *** veritto has quit IRC
[03:05:21] <meeper> talk about the worst of both worlds. hard to read, fragile, and it's still not even non-typesafe
[03:05:49] <ojacobson> Limits of the language... an SQL-building API that was typesafe and reasonably complete would be unwieldy
[03:06:09] <meeper> ojacobson: well that's what the jpa criteria api is
[03:06:15] *** cbeust has quit IRC
[03:06:27] <ojacobson> I see no problem with this reply. :)
[03:07:43] <ojacobson> (I'm not arguing that this is better, mind)
[03:08:01] <ojacobson> (Problems shaped like generating some SQL are bad problems to have)
[03:09:06] <meeper> yeah, generating sql is a bad idea. but I have to wonder how anybody ever could've thought that api was a good idea. it adds virtually nothing, though I guess there's some kind of metadata annotation going on there
[03:09:06] * eidolon is trying to fathom how to implement spring JPA into this app.
[03:09:30] <ojacobson> It has some support for named parameters, as well
[03:09:36] <Planck_> Gah. I hate broken software that generates "C2 92" sequences in UTF-8 for an apostrophe.
[03:09:39] <ojacobson> The other way mybatis has to do it is actually pretty good
[03:10:02] <ojacobson> If you don't mind using XML to program in...
[03:10:04] *** Cymage has quit IRC
[03:10:09] <eidolon> ibatis! aieee!
[03:10:11] <ojacobson> Planck_: PRIVATE USE TWO (U+0092)
[03:10:29] <ojacobson> It's not even kind of an apostrophe
[03:10:32] <ojacobson> how did they pull that off?
[03:10:42] *** psst has quit IRC
[03:11:47] <Planck_> From Windows code page 1252, apparently.
[03:12:05] <ojacobson> 1252 doesn't have multibyte characters
[03:12:40] <ojacobson> C2 92 would be U+00C2 U+2019
[03:13:06] <ojacobson> LATIN CAPITAL LETTER A WITH CIRCUMFLEX and LATIN CAPITAL LETTER A WITH CIRCUMFLEX respectively
[03:13:14] <Planck_> I know :( C292 is the UTF-8 encoding for U+0092, and 0x92 is the character in 1252 for
[03:13:14] <ojacobson> er
[03:13:20] *** psst has joined ##java
[03:13:21] <ojacobson> RIGHT SINGLE QUOTATION MARK for the second
[03:13:34] <ojacobson> It's not an apostrophe but at least it's visually similar
[03:13:44] <ojacobson> That's several rounds of wackyencoding
[03:13:56] <ojacobson> You really have to work at it to fuck it up like that :)
[03:13:59] <tazle> or one
[03:14:20] <tazle> you only need to interpret cp1252 as latin-1, and then encode to UTF-8
[03:14:55] <multi_io> what's the deal with this readlimit parameter to InputStream#mark(int readlimit)?? Looks like that method has no documented failure mode, i.e. if InputStream#markSupported(), then any readlimit value, no matter how large, MUST be supported by the implementation.
[03:15:00] <multi_io> Isn't that stupid?
[03:15:34] <ojacobson> multi_io: If you don't want large read limits, don't ask for them
[03:15:48] <multi_io> shouldn't at least markSupported() also have been p[arameterized with a readlimit parameter?
[03:16:07] <multi_io> So the implementation could say "I support mark/reset up to that readlimit"
[03:16:42] *** cbeust has joined ##java
[03:16:48] *** sbalmos has quit IRC
[03:18:05] <multi_io> ojacobson: say I must be able to reset the (finite) stream from the end to the beginning.
[03:18:18] <multi_io> the length of the stream is known at runtime only.
[03:19:27] <multi_io> hm..wait
[03:19:49] *** nchaimov has joined ##java
[03:20:08] <multi_io> ok, so in that case I would decide not to use mark/reset if the length is deemed too large, I guess.
[03:20:50] <ojacobson> You can't safely buffer an entire, arbitrarily-sized stream into memory, and there's not always somewhere else to put it
[03:21:33] *** zemanel has quit IRC
[03:21:58] <multi_io> but still, there are implementations that can readily support arbitrarily large readlimits (e.g. FileInputStream, I guess)
[03:22:30] <ojacobson> In those cases you can usually switch to something that can exploit those features (RandomAccessFIle, FileChannel)
[03:22:35] <multi_io> but there's no way for me to make use of that, because there's no InputStream#markSupported(int readlimit).
[03:23:33] <multi_io> ojacobson: well, it breaks encapsulation to use low-level stuff rather than InputStream
[03:24:05] <ojacobson> You can't do what you're trying to do at the stream level
[03:24:17] <ojacobson> you could build a general seekable stream-like api to generalize in directions you need, though
[03:24:44] <eidolon> hey ojacobson - quicky. i'm adding spring hibernate / jpa to the app. currently the pom.xml breaks out spring-beans, spring-web, sprint-context, etc. should i just collapse all that down to just 'spring' now that i'm using more of spring?
[03:24:52] <ojacobson> No
[03:25:01] <eidolon> okay.
[03:25:04] <ojacobson> They're trying to get rid of the org.springframework:spring: artifact
[03:25:18] * eidolon nods.
[03:25:23] <ojacobson> too many duplicate class problems :)
[03:25:25] <eidolon> okay, i'll research what pieces i need. thanks.
[03:26:49] *** [[thufir]] has joined ##java
[03:29:35] *** txithihausen has quit IRC
[03:29:47] *** fuzzygroove has quit IRC
[03:29:56] <Cpudan80> Is there any SQL escape algorithm that is included with Java?
[03:30:20] <Cpudan80> I see a lot of references to StringEscapeUtils from apache - but that's not with Java ...
[03:30:33] <eidolon> don't use string escapes.
[03:30:33] <ojacobson> No
[03:30:36] <eidolon> use prepared statements.
[03:30:54] <ojacobson> Lots of DB APIs don't even use escaping internally
[03:32:26] <Cpudan80> The problem is that I need to use a WHERE IN clause
[03:32:26] *** harry_ has quit IRC
[03:32:36] <Cpudan80> To select several hundred items at once
[03:32:41] <eidolon> did jboss take over hibernate?
[03:32:51] <ojacobson> Ages ago.
[03:32:52] <eidolon> all the docs i keep hitting all go to jboss sites.
[03:32:54] <eidolon> huh. k.
[03:32:55] <Cpudan80> And a prepared statement won't let me put a bunch of things
[03:33:35] *** zesoze has quit IRC
[03:34:31] * eidolon sticks fingers in ears, clicks 'mvn install' and presses enter.
[03:36:12] *** Auv5 has quit IRC
[03:37:49] <multi_io> ojacobson: I guess something like InputStream#markSupportedWithConstantMemory(int readlimit) might be nice. But I haven't thought this through, I reckon.
[03:38:07] <Planck_> Cpudan80: putting the list of things into a temporary table isn't an option?
[03:38:31] <ojacobson> ^ not a completely insane idea
[03:38:44] <ojacobson> (WHERE foo = ANY(SELECT foo FROM temporary_foo_table)
[03:39:14] <Cpudan80> Planck_: unfortunately no, I only have read access
[03:39:27] <Cpudan80> It's a pretty tight corner case
[03:39:44] <Planck_> There is a hack of creating the prepared statement with the right number of ?s. But ew.
[03:40:01] <ojacobson> Where did this list of values come from?
[03:40:19] <ojacobson> (Planck_: if you're hearing the word 'JOIN' float past right about now...)
[03:41:56] <Cpudan80> ojacobson: some other database (on a different server)
[03:42:18] <Cpudan80> a different kind of DB too -- one is MySQL and the other is postgres I think
[03:42:45] <ojacobson> And this is *really* easier than exporting both datasets to CSV, importing them into a scratch DB (sqlite, h2, whatever), and writing it as a one-shot join there?
[03:42:54] *** jpk has quit IRC
[03:43:18] <Cpudan80> ojacobson: The databases are too large to export as CSV
[03:43:42] <Cpudan80> I mean I guess I could select all the rows
[03:43:47] <Cpudan80> And filter it out on the back end
[03:44:30] *** Paradox has joined ##java
[03:44:35] <Cpudan80> So there really is no string escape function in Java?
[03:44:53] <ojacobson> Cpudan80: for SQL? No, there's no general-case safe way to escape text for SQL.
[03:45:00] <ojacobson> Too many encoding- and database-specific edge cases.
[03:45:15] <ojacobson> There's a *reason* most databases don't use escaping to handle parameters. (Actually, several.)
[03:45:34] *** eyesUnclouded has quit IRC
[03:45:42] <Paradox> hi, i'm somewhat of a novice to java. I have two classes that implement vector, one is from java.util, and the other is from a different package
[03:45:47] <ojacobson> Most competently-designed database wire formats pass the query and the parameters in separate parts of their messages. Even MySQL supports this. Escaping is the single most bone-headed way you could do it.
[03:45:50] <Paradox> how do i specify which vector to use?
[03:46:07] <Paradox> erm
[03:46:22] <Paradox> how do i specify what package's vector i want to use
[03:46:41] <Planck_> Specify the fully qualified name - you dont' need to import.
[03:46:48] <Planck_> java.util.Vector myVector = ...
[03:46:52] <Paradox> ah
[03:46:53] <Paradox> thanks
[03:47:05] <Planck_> (Or use ArrayList)
[03:47:18] <Paradox> minecraft scripts
[03:47:21] <Planck_> Heh
[03:47:22] <eidolon> this is odd. maven just ralphed on a goal that i haven't touched with a 'bad error'. the thother bit is it's saying it can't find an artifact… it just downloaded.
[03:47:24] <eidolon> http://pastebin.stonekeep.com/11582
[03:47:26] <Cpudan80> ojacobson: it's only for mysql though ... Im not gonna change the underlying DB
[03:47:28] <Paradox> working with worldedit
[03:47:48] <eidolon> ung. i'm beginning to wonder if minecraft is the best hting that's happened to Java or the worst.
[03:48:27] <ojacobson> We hhos considered adding | No Minecraft | after No Applets
[03:48:27] *** dmb has quit IRC
[03:50:05] <eidolon> maven gives me a headache.
[03:50:09] *** rhonabwy has quit IRC
[03:50:45] *** antigravity has joined ##java
[03:51:24] *** antigravity has quit IRC
[03:51:41] *** gimix has joined ##java
[03:51:57] <cbeust> eidolon I see Minecraft definitely as a positive for Java
[03:52:57] *** surial has joined ##java
[03:53:20] <surial> Maven repo entries usually have source associated with them. How do I tell ivy to grab the jar and put it someplace?
[03:55:27] *** antigravity has joined ##java
[03:55:50] *** EuroTrash has quit IRC
[03:56:03] <eidolon> whoah
[03:56:08] <eidolon> mvn help:effective-poms
[03:56:10] <eidolon> ++++
[03:56:14] <cheeser> indeed.
[03:58:55] *** harry_ has joined ##java
[03:59:05] <eidolon> so i'm specifying hsqldb in my pom.xml just as it's written here: http://mvnrepository.com/artifact/hsqldb/hsqldb/1.7.2
[03:59:17] *** sigtau has joined ##java
[03:59:21] <eidolon> but i'm still getting: Downloading: http://repo1.maven.org/maven2/hsqldb/hsqldb/1.7.2/hsqldb-1.7.2.jar
[03:59:21] <eidolon> [INFO] Unable to find resource 'hsqldb:hsqldb:jar:1.7.2' in repository central (http://repo1.maven.org/maven2)
[04:00:41] <ojacobson> No JAR in central
[04:00:56] <ojacobson> just a POM, and a JAR with a classifier (<classifier>rc6c</classifier> I suspect)
[04:01:01] <ojacobson> There are newer versions, though
[04:01:03] <ojacobson> or, h2
[04:01:43] <eidolon> but the mvnrepository is saying "this is the pom.xml to getthis dependency" - or am i misunderstanding how mvnrepository.com is supposed to work?
[04:02:03] <ojacobson> mvnrepository is correctly reflecting the pom that is in central
[04:02:10] <ojacobson> the pom that is in central doesn't seem to have a matching JAR
[04:02:26] * eidolon nods.
[04:03:03] <ojacobson> http://repo2.maven.org/maven2/hsqldb/hsqldb/
[04:03:23] <eidolon> much later.
[04:03:24] <eidolon> interesting.
[04:03:51] <eidolon> vaguely worried i'll get a version issue, but i'll try 1.8.0.7
[04:04:45] <eidolon> good. that pulled.
[04:04:56] <ojacobson> Why hsqldb?
[04:04:59] *** rjohnson19 has quit IRC
[04:05:29] <eidolon> looked like it was a requirement for spring jpa
[04:05:31] <eidolon> tain't?
[04:05:52] <ojacobson> Nnnno
[04:06:06] <eidolon> k
[04:06:09] <ojacobson> JPA doesn't depend on any specific DB. Hell, JPA could *in principle* be used with non-SQL stores
[04:06:13] <ojacobson> spring-jpa sits on top of that
[04:06:19] <eidolon> oh duh. hsqldb is the hsql db engine.
[04:06:22] * eidolon slaps self
[04:06:27] <ojacobson> (in practice it'd be a real pain to implement JPA without SQL)
[04:07:01] *** disappearedng_ has joined ##java
[04:07:43] *** chomping has quit IRC
[04:09:21] *** EuroTrash has joined ##java
[04:09:59] <eidolon> i don't supose in mvn i can use <version>LATEST</version> could i?
[04:11:50] <ojacobson> [0,)
[04:11:55] <ojacobson> but really, don't
[04:11:59] <ojacobson> it's more trouble than it's worth
[04:12:01] <disappearedng> Hey I am writing code to test my server and client. So I have server listening on port 11111 and sending on 111112 (both udp) and the client listening on 11112 and sending on 11111. For testing purposes, both are on localhost. How come I am getting Address already in use when I try to set up the socket ?
[04:12:03] <eidolon> heh
[04:12:07] <ojacobson> revision ranges are a neat idea but they blow up on you really quickly
[04:12:12] *** antigravity has quit IRC
[04:12:18] *** matsebc has quit IRC
[04:12:26] <ojacobson> (and they blow up on anyone downstream from you instantly :)
[04:12:32] *** dmb has joined ##java
[04:12:40] <eidolon> k. i'm finding myself spending a lot of time guessing at versions - it seems like a step backwards in package management. how do i know i have the right matches?
[04:13:11] <ojacobson> You ideally know what versions of stuff you're trying to use
[04:13:13] *** Paradox has left ##java
[04:13:18] <ojacobson> mostly you let transitive deps sort themselves out
[04:13:33] <ojacobson> If you don't know what version of a library to use, that's mostly between you and the library's own docs and maintainer
[04:14:03] *** ojacobson has quit IRC
[04:14:07] *** matsebc has joined ##java
[04:15:06] *** ojacobson has joined ##java
[04:15:18] <disappearedng> any help?
[04:15:53] <cheeser> disappearedng: probably an old test hanging around
[04:16:11] <disappearedng> @cheeser: but in theory, it should work right?
[04:16:26] <cheeser> sure. in theory, everything should work.
[04:16:27] <cheeser> 8^)=
[04:16:31] *** lemonhall has joined ##java
[04:16:44] <disappearedng> like I can have one program with 2 sockets on different port and in another process 2 sockets on the same port right
[04:16:59] <cbeust> disappearedng: use random ports at every run, safer.
[04:17:17] <disappearedng> I try using other ports and it seems to be just this
[04:17:19] <ztj> disappearedng: you can't have two programs listening on the same host+port combo
[04:17:32] *** hoverbear has left ##java
[04:17:36] <cbeust> disappearedng: you didn't read me correctly.
[04:17:37] <disappearedng> ztj: what? Then how do you write server client?
[04:17:47] <ztj> disappearedng: the client sends, it doesn't listen
[04:17:57] <ojacobson> disappearedng: *listening*.
[04:17:57] *** eidolon has quit IRC
[04:18:02] <ojacobson> Connected is fine.
[04:18:05] <disappearedng> but you still need to create DatagramSocket
[04:18:37] <blbrown_win3> does anyone use spring and scala? Is there any reason to do so (I was asking #java because of 'spring')
[04:19:07] <ztj> disappearedng: look, I'm not in the mood to give a beginner's tutorial on IP, you really should learn about this in more detail before trying to write software around it. There are things you can and can't do and if you have used TCP/IP in the past it hides some magic stuff (like the selection of source ports) that you have to deal with yourself with UDP.
[04:19:14] <cbeust> blbrown_win3: might want to try #scala, although I don't think you'll get a love when you mention Spring there
[04:19:16] <ojacobson> blbrown_win3: spring has a channel
[04:19:22] <ztj> disappearedng: surely there's a tutorial/example out there you can get help from
[04:19:57] <ojacobson> ztj: you can, technically, let UDP pick its own port
[04:19:57] <blbrown_win3> cbeust, well you have all of that enterprise springy stuff, it seems like the two could be integrated
[04:20:05] <ojacobson> it's tricky to orchestrate a protocol where both ends do that, though
[04:20:18] <cbeust> blbrown_win3: makes total sense to me, but it's the #scala people you need to convince to help you :)
[04:20:37] *** jink has quit IRC
[04:20:39] <blbrown_win3> cbeust, I don't need their buy in
[04:20:53] *** jink has joined ##java
[04:21:00] *** eyesUnclouded has joined ##java
[04:21:19] <ztj> ojacobson: right well more to the point was one ought to do a little self-edification on this topic outside the scope of java before diving into it in java, in my opinion.
[04:21:27] <ojacobson> aye
[04:23:02] *** realtime has joined ##java
[04:23:22] *** Cpudan80 has quit IRC
[04:23:42] *** mxweas has joined ##java
[04:24:08] *** plarsen has quit IRC
[04:24:12] *** mxweas has joined ##java
[04:28:52] <blbrown_win3> if you deserialize an object, the constructor has to be called during that process?
[04:29:22] *** rtdos has quit IRC
[04:29:48] <blbrown_win3> " A no-arg constructor must be accessible to the subclass that is serializable. The" ...hmm
[04:30:29] <blbrown_win3> hmm, constructor is not called
[04:30:29] <ojacobson> blbrown_win3: the () constructor of the most-descended non-serializable ancestor is
[04:30:50] <ojacobson> everything below that is magicked up by the serialization library
[04:31:25] <ojacobson> (for most serializable types that's Object(), which is almost a no-op :)
[04:31:48] <blbrown_win3> ojacobson, during deserialization, the constructor is not called? correct?
[04:32:04] <blbrown_win3> of the class I am attempting to deserialize
[04:32:04] <ojacobson> blbrown_win3: way to completely ignore the explanation five lines above you.
[04:32:11] <ojacobson> (object)
[04:32:22] <ojacobson> No, because the object's immediate class must have been serializable.
[04:32:39] <blbrown_win3> with the state at the time of deserialization
[04:32:44] <blbrown_win3> serialization... I mean
[04:32:44] <ojacobson> However, it must have non-serializable classes in its ancestry (at minimum, Object), and *those* constructors are invoked as usual
[04:32:45] *** jcxl has joined ##java
[04:33:01] <blbrown_win3> ojacobson, I am working with Wicket, and they are heavy on serialization, which is why I am asking
[04:38:34] *** beasty_ has quit IRC
[04:49:03] *** eidolon has joined ##java
[04:51:48] *** mxweas has quit IRC
[04:52:20] *** eyesUnclouded has quit IRC
[04:54:41] <echosystm> is testng generally prefered over junit these days?
[04:59:38] <cbeust> echosystm: By far. And you can totally trust me :)
[05:05:08] *** c_axis has quit IRC
[05:05:11] *** SpaceDoG has quit IRC
[05:09:04] *** bindaas has joined ##java
[05:10:53] *** mrhota has joined ##java
[05:11:36] *** jpk has joined ##java
[05:11:45] *** sorabji52 has joined ##java
[05:12:56] <cheeser> i would agree. at least with the first part.
[05:12:57] <cheeser> 8^)=
[05:16:01] <blbrown_win3> if you look at the junit code (at least the older versions), it seemed to be nothing more than if statements/equivalence, assert exceptions and reflection
[05:16:07] *** new2net has joined ##java
[05:16:14] <blbrown_win3> ...not really much of a testing framework
[05:16:23] *** L-----D has joined ##java
[05:16:35] <ojacobson> And calls into hamcrest's matcher glue
[05:17:01] <blbrown_win3> but the "junit pattern" is pretty popular
[05:17:24] *** BoF has joined ##java
[05:17:25] *** puff has joined ##java
[05:17:28] *** teralaser has joined ##java
[05:17:28] *** cbeust has quit IRC
[05:17:29] <echosystm> ojacobson: do you know how to change the errors jersey shows when post/put body fails to deserialise?
[05:17:37] <echosystm> i dont want the users to see a full stack trace :/
[05:17:47] <puff> Anybody know how to get elipse JEE helios running on ubuntu (after downloading direct from eclipse.org)?
[05:17:52] *** cbeust has joined ##java
[05:17:55] <ojacobson> Set up an error page for 400 Bad Request in web.xml
[05:18:35] <echosystm> ok thanks
[05:20:00] <echosystm> you wouldnt happen to know how to get it to return a response in the same content-type as the request handler?
[05:20:20] <new2net> a stacktrace is slightly worse then error 400. Maybe catch an exception and render a page explaining what happened. You should be able to catch a runtime error and modify the headers?
[05:20:22] <echosystm> ie. if i post app/json, i'd like to recieve app/json back even if an error occurs
[05:21:15] <echosystm> maybe i should just write my own provider?
[05:21:38] <ojacobson> new2net: JAX-RS already deals with broken request entities by issuing a 400 Bad Request error
[05:21:39] *** matsebc has quit IRC
[05:21:58] <ojacobson> It includes the stack trace (technically, your container does, actually) by default, but you probably want to show people a nicer error than that
[05:22:24] *** pyrrhic has joined ##java
[05:22:25] <echosystm> let me summarise what i would like to achieve - any thrown WebApplicationException should be sent back with the same content-type as the method it occurs in
[05:22:46] <echosystm> also, any deserialisation should also be sent back according to the accept header
[05:22:53] <echosystm> is this all possible ojacobson ?
[05:23:06] <pyrrhic> Of course!
[05:23:30] <echosystm> *deserialisation error should
[05:24:02] <pyrrhic> Is content-type a generic?
[05:24:02] <echosystm> jersey should really do this out of the box
[05:24:18] <ojacobson> Returning it in the same content type as you received the request isn't feasible
[05:24:34] <ojacobson> you can't possibly come up with meaningful entities for arbitrary unpredictable request content types
[05:25:45] <ojacobson> Serving the "wrong" content type alongside a non-2xx response is fairly normal
[05:25:52] <ojacobson> you could argue that it's not right, but it's not unexpected
[05:25:56] <puff> Bleah.
[05:25:59] <puff> God, I hate eclipse.
[05:26:07] <tjsnell> now now
[05:26:22] <pyrrhic> oO
[05:26:26] <echosystm> i'm thinking the client should be able to parse the error message out of the response ojacobson, without having to deal with html if it was expecting json
[05:26:29] <pyrrhic> It's pretty spiffy when it does what it claims it will do
[05:26:57] <ojacobson> Sure, that's a nice touch
[05:27:14] <echosystm> to do this though, i'm going to have to have all my handlers just return text
[05:27:26] <echosystm> i wont be able to use all the jax-rs automagic marshal/unmarshal
[05:27:28] <ojacobson> Or have your 400 Bad Response error page be plain text
[05:27:48] <echosystm> hm
[05:27:50] <echosystm> thats easier
[05:28:04] <ojacobson> http://download.oracle.com/docs/cd/E13222_01/wls/docs81/webapp/web_xml.html#1017571
[05:28:20] <ojacobson> That's from the WebLogic docs, but it's the standard descriptor, not the weblogic one
[05:28:32] <echosystm> so just point it at my_error.txt ?
[05:28:47] <echosystm> how would i put error messages in that though
[05:28:48] <ojacobson> Or /WEB-INF/jsp/errors/400.jsp, or whatever, yes
[05:28:56] <ojacobson> JSPs can set their content type to plain text :)
[05:29:05] <ojacobson> (Getting whitespace right is tricky)
[05:29:09] <echosystm> what i mean is, how can i return text/plain if i need to set an error message
[05:29:11] <echosystm> oh
[05:29:25] <echosystm> hm
[05:29:40] <disappearedng> Can non threads sleep?
[05:29:47] <ojacobson> A negotiation-aware error system is nice
[05:29:56] <echosystm> disappearedng: there is no such thing as a non-thread
[05:29:57] <ojacobson> but it's prrrobably not a showstopper if your first release doesn't have it
[05:30:19] <echosystm> if your program is running, it has a thread
[05:30:45] <puff> pyrrhic: I'm trying to troubleshoot a performance issue in a project that's using eclipse. So it's delivered to me as an eclipse project. So I install eclipse from ubuntu repos. So none of the tutorials, etc, work for deploying from the eclipse project to tomcat. So I go to #eclipse. So #eclipse says the packages are broken, download directly (not the first time this has happened with java stuff). So I do. So now the downloade
[05:30:45] <puff> package errors when starting and there's no info out there on what the problem is.
[05:30:47] <echosystm> ok, so how exactly do i return text/plain with a jsp ?
[05:31:31] <ojacobson> Page directive
[05:31:47] <ojacobson> <%@ page contentType="text/plain; charset=UTF-8" %> for example
[05:31:48] <pyrrhic> lol
[05:31:53] <pyrrhic> puff, sounds like fun
[05:32:18] <ojacobson> You may want to set isErrorPage="true" as well
[05:32:19] <ojacobson> http://java.sun.com/products/jsp/syntax/2.0/syntaxref2010.html
[05:33:56] <puff> pyrrhic: Oh yeah.
[05:34:50] <pyrrhic> puff, I'd love to help but I haven't touched tomcat in years
[05:36:15] <puff> pyrrhic: tomcat is no problem, I've been handrolling tomcat webapps for yeeeeears.
[05:36:26] <puff> Eclipse, however, is a black f***ing box.
[05:37:28] <echosystm> thanks ojacobson
[05:37:48] *** new2net is now known as Guest71344
[05:37:54] *** bradford has joined ##java
[05:40:03] *** Guest71344 has quit IRC
[05:41:44] *** eyesUnclouded has joined ##java
[05:42:13] *** ojacobson has quit IRC
[05:43:02] *** eidolon has quit IRC
[05:43:23] <echosystm> hrm, when i use a jsp error page, it seems to be sending back a set cookie
[05:43:42] *** nvram has joined ##java
[05:43:46] *** nvram has left ##java
[05:44:16] *** sheenobu|nook has joined ##java
[05:45:17] *** Error404NotFound has joined ##java
[05:45:29] <sheenobu|nook> jax-rs + xml + xslt working very well =)
[05:47:09] *** sorabji52 has quit IRC
[05:48:25] <echosystm> json is even better :P
[05:48:35] <echosystm> xml is horrible
[05:48:38] *** mrhota has quit IRC
[05:52:44] <sheenobu|nook> meh xsl is nice if you arebt doing fo
[05:52:50] <sheenobu|nook> aren't
[05:53:24] *** lhnz has quit IRC
[05:53:25] *** dangertools has quit IRC
[05:53:25] *** skoskav has quit IRC
[05:53:46] *** dangertools has joined ##java
[05:53:51] *** sorabji52 has joined ##java
[05:54:26] <sheenobu|nook> "xml is horrible" is a played grope.
[05:54:35] <sheenobu|nook> hahaha auto correct
[05:54:36] *** lhnz has joined ##java
[05:55:25] *** meiskam has quit IRC
[05:55:54] <puff> Eh, xsl is just a bit twisty.
[05:56:04] <puff> kinda functionalish.
[05:57:07] *** meiskam has joined ##java
[05:57:39] *** eyesUnclouded has quit IRC
[05:57:56] *** digs has joined ##java
[05:58:13] <sheenobu|nook> yeah. i don't feel java has /any/ good templating languages. doing xml docs from my jaxrs objects then server side dsl was really straightforward though
[05:58:16] <sheenobu|nook> dsl
[05:58:21] <sheenobu|nook> xsl
[05:58:28] *** smokex has joined ##java
[05:58:43] <digs> I have a progress bar that is incremented with a new thread. When the progress bar reaches is maximum value, I want to call a function that takes parameters. How can I do this?
[05:58:53] <digs> I have been messing around for almost 2 hours to no avail.
[05:59:26] <digs> It is a game, and when "time runs out" it resets.
[05:59:33] <sheenobu|nook> someone in here suggested jax rd
[06:00:00] <sheenobu|nook> jaxrs and xslt lastnight
[06:01:03] <puff> sheenobu|nook: Depends on what for... I found JSP just fine, but I feel comfortable sticking java code in there. Not sure how I'd feel if I had to deal with designers mucking with the embedded java. There were a couple of fairly popular templating options back in the day.
[06:01:18] <puff> Velocity being the main one that comes to mind, though I haven't tried it.
[06:01:21] <Fanook> digs: have you tried using SwingWorker?
[06:01:25] <puff> But everybody seemed to like it.
[06:01:35] <digs> Fanook, no I will look that up.
[06:01:45] <sheenobu|nook> i tried velocity didn't like it
[06:02:58] <sheenobu|nook> my favs are wicket but i don't like the statefull api, and django templates
[06:05:53] <sheenobu|nook> ive been using isp/jspx its okay but seems limited. only runs in servlets, no runnable api etc
[06:09:16] <puff> God, this sucks.
[06:09:20] <puff> I hate eclipse
[06:09:33] *** sheenobu|nook has quit IRC
[06:09:55] *** armyriad has joined ##java
[06:10:46] *** robinsmidsrod has quit IRC
[06:11:10] *** CoryDambach has quit IRC
[06:11:16] *** robinsmidsrod has joined ##java
[06:11:59] *** CoryDambach has joined ##java
[06:12:15] <tjsnell> there's alternatives
[06:12:24] *** xianny has joined ##java
[06:15:31] *** mistik1 has quit IRC
[06:15:40] *** mistik1 has joined ##java
[06:15:47] <puff> yeah, but I'm troubleshooting an existing eclipse project.
[06:16:52] *** fuzzygroove has joined ##java
[06:17:00] <tjsnell> rcp?
[06:17:14] *** fuzzygroove has left ##java
[06:18:32] <cbeust> puff: more details?
[06:19:21] *** L-----D has quit IRC
[06:19:56] *** saby has joined ##java
[06:20:05] *** L-----D has joined ##java
[06:22:03] *** teralaser has quit IRC
[06:22:19] *** mrhota has joined ##java
[06:23:26] *** disappearedng_ has quit IRC
[06:24:27] *** sorabji52 has joined ##java
[06:24:55] *** a|3x has left ##java
[06:26:00] *** tilerendering has quit IRC
[06:26:45] <digs> Wow, thanks Fanook, after I sorted through the docs and the wrong example, I figured it out and it works great.
[06:27:25] <digs> This whole example doesn't make sense... http://java.sun.com/products/jfc/tsc/articles/threads/src/Example1.java --- You can't invoke .start() on a SwingWorker... So I don't know why they do.
[06:27:32] <digs> But I figured it out.
[06:31:29] *** tissue has joined ##java
[06:32:41] *** banana has joined ##java
[06:32:45] *** devkhadka has joined ##java
[06:33:47] <banana> I've got a class that takes a specific enum as an argument. I want to generalize it so that it can take any enum as an argument, but I'm unsure how to refer to the quality that enums have. the closest I've found is Iterable<String>...
[06:34:51] *** jcxl has quit IRC
[06:35:16] <puff> cbeust: I downloaded eclipse java EE for linux from eclipse.org directly. I went to invoke the ELF binary, I get a popup with an error: "the eclipse executable launcher was unable to locate its companion shared library" ubuntu This error occurs whether I run it as ./eclipse or eclipse. Is it possible the old (ubuntu packaged) install of eclipse is interfering?
[06:35:39] <puff> cbeust: All I'm trying to do is a) get eclipse to run, b) import this project, c) build this project, d) deploy to tomcat and run.
[06:35:47] *** dextro_ has joined ##java
[06:35:51] *** paissad has quit IRC
[06:35:56] <dextro_> how do you stop a logger from printing to console/
[06:35:59] <puff> cbeust: and then I can work on load-testing it, profiling it, etc. But so far I've been getting stuck on basic stuff.
[06:36:04] <dextro_> i have it logging to file and thats enough
[06:36:06] <puff> dextro_: Adjust its config file?
[06:36:21] <puff> dextro_: Or redirect STDOUT & STDERR into /dev/null?
[06:36:22] *** smokex has quit IRC
[06:36:30] <grug> dextro_: what logger are you using
[06:36:43] <puff> dextro_: though there should be something you can tweak in whatever.properties.
[06:36:43] <dextro_> java.util.logging.Logger
[06:37:03] <dextro_> isnt /dev/null a linux thing
[06:37:11] <dextro_> isnt the point of java to be platform independant?
[06:38:01] <dextro_> log2.setUseParentHandlers(false);
[06:38:06] <dextro_> looks like it might work
[06:38:07] * dextro_ tests
[06:38:31] *** paissad has joined ##java
[06:38:34] <puff> dextro_: check here fo rinfo about the config file: http://download.oracle.com/javase/1.4.2/docs/guide/util/logging/overview.html
[06:39:02] <puff> dextro_: "By default, the LogManager reads its initial configuration from a properties file "lib/logging.properties" in the JRE directory. If you edit that property file you can change the default logging configuration for all uses of that JRE."
[06:39:07] <puff> dextro_: So, edit logging.properties.
[06:39:30] <puff> Or edit the System property java.util.logging.config.file
[06:39:35] <dextro_> i dont want it to be global
[06:39:39] <dextro_> just for this one logger :/
[06:39:45] <dextro_> in this one app
[06:40:05] <dextro_> setUseParentHandlers(false) did the job
[06:40:12] <puff> dextro_: good 'nuf, then.
[06:40:23] *** dmb has quit IRC
[06:40:25] <puff> dextro_: What was happening is, the log config sets up handlers to do sometihng with the log messages.
[06:40:46] <puff> dextro_: Sounds like the existing config had a ConsoleHandler that was spitting log messages out to STDERR.
[06:41:02] <puff> So you disabled the inherited handlers and that got dropped out.
[06:41:22] <paissad> with this simple code, i can retrieve all iso country codes http://pastebin.com/J7v2EQLZ
[06:41:22] <paissad> but i would like to get the full country name from the country code programmatically, do you think it is possible ?
[06:41:22] <paissad> or do i have to grab a file containing the equivalences ?
[06:42:04] <puff> paissad: Almost certainly you wil lhave to have a file, somewhere, either built in, or fetched at need, to translate.
[06:43:27] <paissad> ok
[06:43:35] <puff> paissad: Hm, on second thought, I guess you could iterate through the static Locales...
[06:44:06] *** dmb has joined ##java
[06:44:33] <paissad> puff, i already thought about that, ... but that won't return all countries ^^
[06:44:58] <dextro_> log2.addHandler(new FileHandler(getDataFolder().getAbsolutePath() + File.separatorChar + "error.log", true));
[06:45:01] <puff> paissad: So, you could iterate through the codes, for each code, new Locale(languageparameter, countrycode), then call Locale.getDisplayCountry().
[06:45:07] <dextro_> when i log2.log() it writes XML to the file
[06:45:08] <dextro_> wtf?
[06:45:23] <puff> paissad: You might be better off just fetching a file from somewhere.
[06:45:31] <paissad> yep
[06:46:10] *** L-----D has quit IRC
[06:48:21] <paissad> puff, http://www.iso.org/iso/list-en1-semic-3.txt
[06:50:14] <puff> paissad: cool.
[06:50:27] <puff> paissad: now if only I could get eclipse working properly.
[06:50:54] <paissad> what's wrong ?
[06:51:27] <paissad> there's #eclipse too
[06:51:40] <puff> Yeah, appears nobody's awake there.
[06:52:09] *** sorabji52 has quit IRC
[06:52:22] <cbeust> puff: your problem seems to be more about Ubuntu than Eclipse
[06:52:29] <cbeust> Maybe download a different version of Eclipse?
[06:53:07] <puff> I was trying to work with ubuntu packaged eclipse. #eclipse folks said forget the packages, get it from eclipse.org. I downloaded Java EE eclipse from eclipse.org, unzipped, untarred. I went to invoke the ELF binary, I get a popup with an error: "the eclipse executable launcher was unable to locate its companion shared library" ubuntu This error occurs whether I run it as ./eclipse or eclipse.
[06:53:23] *** defascat has quit IRC
[06:53:40] <paissad> puff, pastebin the error
[06:53:47] <puff> cbeust: Which different version? They have linux 32-bit, linux 64-bit, windows, and mac. Pretty much all the google hits on the error message come up with fixes for windows, "find this DLL."
[06:53:50] <cbeust> puff: yes that's what you wrote above, try to download another version. And yes, I tend to download the .tar.gz and unzip it myself
[06:53:54] <puff> paissad: That is the error, it show sup in a dialog.
[06:53:58] <cbeust> I mean not the Eclipse Java EE
[06:54:01] <puff> cbeust: Ah.
[06:54:06] <puff> cbeust: Okay.
[06:54:55] *** nibin has quit IRC
[06:55:15] <puff> cbeust: Just finished downloading a fresh copy of JEE eclipse. No reason this should behave differently, but let's extract and give it a try...
[06:55:21] <puff> Yay. It appears to work.
[06:55:26] <puff> Asking for workspace, etc.
[06:55:35] <cbeust> Then you're all set
[06:55:35] <puff> *no* idea why this one worked when the other didn't....
[06:56:14] <tjsnell> eclipse is a non deterministic hunk of code, we'll never know
[06:56:22] <puff> Sigh.
[06:57:34] *** CodeWar has joined ##java
[06:57:41] *** freeone3000 has joined ##java
[06:58:42] *** ExtraSpice has joined ##java
[06:59:15] *** pyrrhic has quit IRC
[07:00:15] <joed> puff: Next I'd try IDEA, you'll actually get refactoring and stuff like that.
[07:00:37] <cbeust> or you can choose to get refactoring with the IDE you already installed :)
[07:00:42] <puff> joed: Yeah, I used idea back in the day.
[07:04:41] *** alanic has joined ##java
[07:05:46] *** digs has quit IRC
[07:06:24] <echosystm> is there any way to get the class where an exception was thrown, within the class itself?
[07:06:30] <echosystm> sorry, within the exception itself
[07:06:38] <echosystm> ie. how can i work out what class threw an exception
[07:06:47] <cbeust> echosystm: Yes, get the stack trace from the exception
[07:06:58] *** MacTuitui has joined ##java
[07:07:14] <echosystm> hm
[07:08:32] *** surial has quit IRC
[07:09:55] <echosystm> getStackTrace()[0].getClass ?
[07:10:47] <CodeWar> this.getClass().getName()
[07:11:03] <echosystm> i dont want the name of the exception class CodeWar
[07:11:08] <echosystm> i want the name of the class that threw it
[07:11:44] <CodeWar> ??
[07:11:56] <echosystm> were you talking to me?
[07:12:30] *** rhonabwy has joined ##java
[07:14:15] *** zemanel has joined ##java
[07:15:43] <CodeWar> echosystm, http://pastebin.com/YrbhPrB5
[07:17:31] *** new2net has joined ##java
[07:20:30] <CodeWar> you could try e.getStackTrace()[0].getClassName() but its not necessary this information be present as javadoc points out
[07:23:39] *** digs has joined ##java
[07:23:54] <digs> Okay, I am blowing my brains out here trying to figure out how to do this.
[07:24:41] <new2net> try #suicide
[07:24:59] <digs> I have a function that calls itself recursively. It is a math game. If you get the answer wrong, it just counts it as a wrong answer and lets you try again, up to 10 seconds... then it calls the function recursively again after counting the answer as wrong.
[07:25:08] <digs> That works just as I explained.
[07:25:58] <cbeust> digs: recursion probably overkill here, use a loop
[07:26:36] <digs> But now... instead of just calling recursively, I decided to send a flag through, like "timeExpired"... Now, I try just a simple if, else statement, and I cannot get the panels to update properly. I even try just calling a NEW function outside of the recursive function in the done() method of the SwingWorker and it doesnt work.
[07:26:43] <digs> I am baffeled.
[07:26:58] *** zemanel has quit IRC
[07:27:08] <CodeWar> digs: this? --> void func(AtomicInteger counter){ do game ; if(checkresults() == true) {counter.increment();} func(counter);}
[07:27:10] <freeone3000> digs: A new function doesn't change the currently executing flag.
[07:27:12] <freeone3000> *thread.
[07:27:18] <CodeWar> yes use iteration
[07:27:29] <digs> freeone3000, I see.
[07:27:59] <freeone3000> Stuff in a SwingWorker's done is always on the EDT. You'd have to post your code for me to make any sense of what you've said.
[07:28:12] <digs> Okay. I can do that. One moment.
[07:30:54] *** [[thufir]] has quit IRC
[07:31:14] <digs> 161-175 is the code I want to run and halt everything else if time expires. 182-185 is where I tried an if else statment, I deleted the else part for now, (the else had everything in the fuction contained within it that was below the if statment. 275 begins the SwingWorker code... http://pastebin.com/UPy7CDDK
[07:31:21] <digs> and man pastebin borks up the indentation.
[07:31:26] <digs> It is perfect in eclipse.
[07:32:10] *** glcrazy has joined ##java
[07:33:19] *** new2net has quit IRC
[07:33:36] *** CodeWar has quit IRC
[07:33:45] <freeone3000> When the components of a JPanel are changed, it must be .revalidate()d.
[07:34:06] <digs> okay.
[07:34:17] <digs> Let me try.
[07:34:57] <digs> omg. I forgot the updateUI and validate on that :( -- good gosh that was dumb.
[07:35:13] <digs> I feel so stupid.
[07:35:17] <digs> sorry for wasting your time.
[07:38:18] *** echosystm has quit IRC
[07:38:20] *** new2net has joined ##java
[07:41:32] *** EnginA has joined ##java
[07:42:14] *** bearded_oneder has quit IRC
[07:42:35] *** squi has joined ##java
[07:42:47] *** supercosmonaut has quit IRC
[07:43:20] <squi> hey
[07:43:38] <squi> in javac, what does "attributed" mean? its a CompileState
[07:44:12] <squi> and "attribute" is the first step the compiler does
[07:45:36] <squi> it seems like a funny name for the analyzation phase
[07:48:36] *** t0rc has quit IRC
[07:49:13] *** tty1 has joined ##java
[07:49:21] *** L-----D has joined ##java
[07:50:00] *** defascat has joined ##java
[07:50:16] *** defascat has left ##java
[07:50:56] *** new2net has quit IRC
[07:52:06] *** rretzbach has joined ##java
[08:01:48] *** glcrazy has quit IRC
[08:05:47] *** alanic has quit IRC
[08:06:17] *** new2net has joined ##java
[08:08:02] *** digs has quit IRC
[08:08:07] <new2net> how does a singleton behave?
[08:11:55] <neshaug> It behaves the way the programmer intended or accidentally didn't intended.
[08:13:44] *** Error404NotFound has quit IRC
[08:14:10] *** jbosmans has quit IRC
[08:14:21] *** epalm has joined ##java
[08:15:26] <neshaug> new2net: :P could you be more specific?
[08:15:38] *** EnginA has quit IRC
[08:17:20] *** zhulikas has joined ##java
[08:17:41] *** zhulikas has quit IRC
[08:17:53] *** martin8412 has quit IRC
[08:18:01] *** caverdude has quit IRC
[08:21:42] *** BoF has quit IRC
[08:24:06] *** sd1074_2 has joined ##java
[08:24:28] *** d3javu has joined ##java
[08:25:50] *** Clete2 has quit IRC
[08:26:49] *** epalm has quit IRC
[08:27:30] <new2net> uh... I want to make an interface for my linked list ( http://pastebin.com/1btUrNZA ). And I want a singleton class called "Empty", and a class called "Node" that both implement an interface called "SchemeList". There is no need for more than 1 empty list to exist, so it should be a singleton?
[08:28:29] <freeone3000> What would you gain from disallowing multiple empty lists?
[08:28:55] *** Hyphenex has left ##java
[08:29:17] *** dtrott has joined ##java
[08:29:23] <banana> comparison?
[08:29:55] *** mah01 has joined ##java
[08:30:05] *** DJClean has joined ##java
[08:31:09] *** caverdude has joined ##java
[08:31:35] <new2net> hmm... well, if I made a hash of each list that existed, the empty list would always have the same hash... so why make more than 1? it would behave identically to any other instance of an empty list
[08:31:54] <new2net> these are immutable lists, by the way
[08:32:43] <dtrott> Is there any way to override an env-entry in web.xml using jboss-app.xml ?
[08:32:58] *** squi has quit IRC
[08:34:50] <new2net> the node and empty class aren't public. only the interface is. So a unique instance of empty would be better than allowing multiple instances of empty... it's really a public constant inside the interface (thats why I asked how a singleton behaves).
[08:35:55] *** LouisJB has quit IRC
[08:36:35] *** tty1 has quit IRC
[08:36:47] *** neshaug has quit IRC
[08:37:07] *** frangiz has joined ##java
[08:38:29] *** smokex has joined ##java
[08:38:41] <new2net> neshaug, I'm trying to learn about dynamic dispatch
[08:39:02] *** caverdude has quit IRC
[08:40:29] *** benoitdo_ has joined ##java
[08:42:47] *** benoitdo has quit IRC
[08:42:51] *** benoitdo_ is now known as benoitdo
[08:43:01] *** squi has joined ##java
[08:43:15] <psst> new2net: it behaves like any other java object — there's nothing special about it
[08:43:43] *** neshaug has joined ##java
[08:44:35] *** topriddy has joined ##java
[08:45:06] *** Ch30ps has joined ##java
[08:45:53] *** Kamaran has joined ##java
[08:47:08] *** terranova has joined ##java
[08:47:48] *** terranova has joined ##java
[08:48:06] *** pht has joined ##java
[08:48:35] <pht> hi, is there some builtin function that compares doubles (or Doubles) with given precision? Double.compare does not seem to.
[08:49:04] *** sd1074_2 has left ##java
[08:49:32] *** Pozejdon has joined ##java
[08:49:37] *** MacTuitui has left ##java
[08:49:41] *** Soliah has quit IRC
[08:50:03] <freeone3000> No, but it's pretty simple to subtract and check the absolute value of the difference against your epsilon.
[08:50:09] *** Soliah has joined ##java
[08:50:14] *** Clete2 has joined ##java
[08:50:47] *** mrhota has quit IRC
[08:52:10] *** topriddy has quit IRC
[08:52:37] *** rretzbach has quit IRC
[08:55:11] *** ChambreNoire has quit IRC
[08:55:37] *** [[thufir]] has joined ##java
[08:57:23] *** bn` has joined ##java
[08:58:45] *** topriddy1 has joined ##java
[09:03:18] *** servo has joined ##java
[09:05:12] *** ormaaj has quit IRC
[09:07:01] *** ormaaj has joined ##java
[09:07:04] *** smokex has quit IRC
[09:07:22] *** cbeust has quit IRC
[09:07:30] *** kh31d4r has quit IRC
[09:07:41] *** keepguessing has joined ##java
[09:07:45] *** placydo has quit IRC
[09:08:07] *** eitch0000 has joined ##java
[09:08:21] *** amlan81 has joined ##java
[09:08:27] <keepguessing> Does this channel also help in issues with WebServices??
[09:08:29] <amlan81> hello people
[09:08:36] <amlan81> I am new to java
[09:09:06] <amlan81> and I have this code : package includes;
[09:09:06] <amlan81> public class Database {
[09:09:06] <amlan81> public static void main()
[09:09:06] <amlan81> {
[09:09:06] <amlan81> System.out.println("Initialized"); // prints if package successfully initialized
[09:09:06] <amlan81> }
[09:09:07] <amlan81> }
[09:09:13] <[[thufir]]> lol
[09:09:20] <amlan81> this always gives me an error
[09:09:27] <amlan81> noclassdeffound
[09:09:52] <keepguessing> amlan81: use paste bin
[09:10:06] <amlan81> paste bin
[09:10:12] <keepguessing> amlan81: what is your name of the file
[09:10:18] *** benoitdo has quit IRC
[09:10:18] <new2net> is your .java file called "Database.java" ?
[09:10:27] <amlan81> yes
[09:10:43] <keepguessing> amlan81: use pastebin to share your sourcecode
[09:11:19] <C00re> ~pastebin
[09:11:20] <javabot> http://rifers.org/paste - Paste the final url after you've pasted your stuff there.
[09:11:45] <keepguessing> How are u running/compiling the source
[09:11:47] <new2net> ~dynamic_dispatch
[09:11:47] <javabot> new2net, what does that even *mean*?
[09:12:52] <new2net> ¯ (°_o)/¯ \
[09:13:49] *** disappearedng_ has joined ##java
[09:14:11] <disappearedng_> Hey I am kind of stuck on debugging, http://paste.pocoo.org/show/347317/ on line 135 receiveData is revealed to be all zeros. Any ideas why?
[09:14:34] <amlan81> http://www.mirc.net/paste/?4460
[09:14:39] *** kakashi_ has joined ##java
[09:14:40] <amlan81> is this what u meant?
[09:15:37] *** kakashi_ has left ##java
[09:15:52] *** psst has quit IRC
[09:16:10] <disappearedng_> you are not talking to me right
[09:16:44] <amlan81> keepguessing: here is the code - http://www.mirc.net/paste/?4460
[09:16:53] *** homie has quit IRC
[09:17:16] <amlan81> when i compile and run it it gives an error
[09:17:42] <keepguessing> what are the commands you are running to compile??
[09:17:43] *** CodeWar has joined ##java
[09:17:53] <amlan81> javac Database.java
[09:17:58] *** homie has joined ##java
[09:18:05] <amlan81> and java includes.Database.java
[09:18:16] <disappearedng_> will anyone know why is my receiveData on line 135 all zeros?
[09:18:17] <keepguessing> remove.java in the second command
[09:18:25] *** sphenxes has joined ##java
[09:18:29] <amlan81> sorry
[09:18:36] <amlan81> that was my typing mistake
[09:18:55] <amlan81> i am using java Database
[09:18:58] <amlan81> to run it
[09:19:02] <amlan81> but gives me the error
[09:19:08] <keepguessing> what version of java Are you using?? Is your classpath set properly ??
[09:19:13] *** blbrown_win3 has quit IRC
[09:19:59] <amlan81> yes the classpath is set coz i can run other java programs
[09:20:01] *** disaster_02 has joined ##java
[09:20:05] <amlan81> i will give u another example
[09:20:17] <disappearedng_> nvm I got it freaking udp
[09:20:18] <[[thufir]]> amlan81: would you be able to use javac? what else is in the package?
[09:20:37] *** mazzachre has joined ##java
[09:21:00] *** drindt has joined ##java
[09:21:50] <new2net> disappearedng_, you might find wireshark or ettercap to be useful for debugging that type of code. Just a shot in the dark.
[09:22:20] <disappearedng_> new2net: yeah I should use wireshark
[09:22:32] *** _Jorde has joined ##java
[09:22:41] <amlan81> thufir: I can use javac
[09:22:44] <amlan81> it works fine
[09:22:52] <amlan81> here is another code that works fine
[09:22:54] <amlan81> http://www.mirc.net/paste/?4461
[09:23:15] <amlan81> here i am importing the package and it works
[09:23:58] <amlan81> http://www.mirc.net/paste/?4460 but this does not work
[09:24:59] <[[thufir]]> amlan81: is the Database in the same file as Banking?
[09:25:22] <amlan81> no it is in the includes/ directory
[09:25:35] *** frangiz has quit IRC
[09:25:38] <[[thufir]]> are there other classes, or just those two?
[09:25:44] <amlan81> just these 2
[09:26:16] <amlan81> but when i go to includes/ and change the initialize to main method and try to compile and run it throws and error
[09:26:32] *** frangiz has joined ##java
[09:28:02] <amlan81> cant files in a package be run by itself?
[09:28:26] *** CodeWar has left ##java
[09:28:30] <[[thufir]]> the Bank class is the driver, it will instantiate Database
[09:28:37] *** freeone3000 has quit IRC
[09:28:45] <[[thufir]]> because Bank has a main method
[09:29:31] <amlan81> yes but then if i change the initialize to main in the Database.java
[09:29:40] <amlan81> and it still has the package statement
[09:29:45] <amlan81> is it not supposed to run
[09:29:48] <amlan81> ?
[09:30:42] <[[thufir]]> only one class should have "public static void main(..."
[09:31:02] <amlan81> http://www.mirc.net/paste/?4460 - can this run individually?
[09:32:51] <disappearedng_> yeah even though wireshark was complicated it nevertheless helped me debug thx new2net for the suggestion
[09:33:32] <[[thufir]]> amlan81: public static void main(String arg[]){
[09:33:41] <amlan81> yes?
[09:33:51] <[[thufir]]> only one class should have such a method
[09:35:30] <amlan81> I understand, I will give u another example
[09:35:50] <[[thufir]]> use javac and just compile one class at a time
[09:36:03] <new2net> javac *.java
[09:36:15] *** Behi has quit IRC
[09:36:52] <aLeSD> if I set a method final ... it means that it can't be override ?
[09:37:15] *** squi has quit IRC
[09:37:21] *** homie has quit IRC
[09:37:23] <new2net> yup, if you inherit from that class that method's signature can not be overwritten.
[09:37:32] <aLeSD> ok
[09:37:51] <new2net> it works for primitives also. final int three = 3;
[09:38:12] *** tewecske has joined ##java
[09:38:16] *** shurane has joined ##java
[09:39:30] <amlan81> thufir: check this - http://www.mirc.net/paste/?4462
[09:39:45] *** homie has joined ##java
[09:40:18] *** Matuku has joined ##java
[09:41:04] <amlan81> the problem is happing if i uncomment the package statement and try to run it
[09:41:13] <Planck_> amlan81: what's your classpath?
[09:41:29] <amlan81> classpath is .;
[09:42:02] <Planck_> Is the class file in ./includes/Database.class?
[09:42:10] <amlan81> yes
[09:42:24] <Planck_> What exactly does the error message say?
[09:43:05] *** servo has quit IRC
[09:43:32] <amlan81> exception in thread "main" noclassfounderr
[09:43:40] <Planck_> As written, it looks like the Database.class would be in ., not in ./includes/
[09:43:42] <amlan81> noclassdeffounderror
[09:44:05] <Planck_> Since you don't change directories before or after javac Database.java
[09:44:58] <amlan81> i do run javac from /includes/
[09:45:07] <amlan81> srry i missed mentioning that in my paste
[09:45:17] <Planck_> Yes. Do you also run "java includes.Database" from there?
[09:45:37] <amlan81> yes
[09:45:44] <Planck_> There's the problem then
[09:46:49] <Planck_> java looks in . (which is your includes/ dir) for a *sub*directory includes/ containing Database.class
[09:47:32] <Planck_> You can either run java from the parent directory, or set the classpath to the parent directory
[09:47:37] <[[thufir]]> ~packages
[09:47:37] <javabot> Please see http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/java/package/packages.html or http://en.wikipedia.org/wiki/Java_package if you prefer
[09:49:00] <amlan81> planck_: I have a question
[09:50:56] <amlan81> if i import the same Database.java(replacing the main method with a different method) from outside the /includes directory, after execution i see the Database.class is created in the /includes directory, yet it works fine
[09:52:16] <[[thufir]]> a class will be compiled to its package, at least that's my understanding.
[09:52:46] <Planck_> amlan81: The only problem you had was that you were running java from inside your includes/ dir
[09:53:01] <Planck_> So the classpath root "." wasn't where it ought to have been
[09:53:08] *** Busata has joined ##java
[09:53:54] <amlan81> ok I understand
[09:55:29] *** mitch0 has joined ##java
[09:56:00] <amlan81> Planck Thanks a lot I have it working now
[09:56:07] *** taitale has joined ##java
[09:56:17] <amlan81> Thanks for the great explanation Plank & Thufir
[09:56:29] <Planck_> No problem :)
[09:56:35] <amlan81> I tried java includes.Database
[09:56:38] <amlan81> and it works :D
[09:56:46] <[[thufir]]> ah, right :)
[09:57:05] <[[thufir]]> I thought it wasn
[09:57:21] *** frangiz has quit IRC
[09:57:23] <[[thufir]]> wasn't compiling. but, it was an execution, like planck said
[09:57:46] *** frangiz has joined ##java
[09:57:48] <DroidAgent> Hm, does regex work from right to left in Java (or in general)?
[09:58:01] <amlan81> yes
[09:58:07] <amlan81> the execution was the problem
[09:58:10] <Planck_> Normally left to right, but usually trying to match as much as possible first
[09:59:15] *** wliao has quit IRC
[09:59:34] <DroidAgent> Weird, I have a thingy that has "word | word2 | word3 | word4" and "(.*)\|(.*)" groups "word | word2 | word3 " and "word4".
[09:59:57] <Planck_> Yes, that first match tries to get as much as possible
[10:00:08] <DroidAgent> Ahh I see.
[10:00:19] <Planck_> Then it backs up until the rest can match
[10:01:14] <DroidAgent> Can I do something like (.*)<first occurence of \|>(.*)?
[10:01:48] <Planck_> You can modify the greediness with some of the fancier group qualifiers. I don't remember them that well...
[10:01:53] *** Matuku has quit IRC
[10:02:33] <DroidAgent> Hm I'll look into that, thanks.
[10:02:44] *** Phil-Work has quit IRC
[10:03:03] <Planck_> "reluctant" quantifier
[10:03:41] <Planck_> (.*?) will try to match with at little as possible, rather than as much as possible
[10:04:40] <DroidAgent> Oh, now I'm getting somewhere.. nice.
[10:05:22] *** squi has joined ##java
[10:08:42] *** new2net has quit IRC
[10:11:09] *** teralaser has joined ##java
[10:11:55] *** rchern has quit IRC
[10:12:01] *** rchern has joined ##java
[10:12:06] *** magentar has joined ##java
[10:16:14] *** plarsen has joined ##java
[10:17:38] <Busata> hmm, does the se have any function that would be able to validate if a string can be parsed to a number? without actually using Integer.parseInt (as it needs to be handled in an exception then)
[10:19:03] *** horte has joined ##java
[10:21:03] *** bn` has quit IRC
[10:22:18] <Candle> Busata: The common way to do this is to check that every character in the string is a digit.
[10:22:33] <Planck_> Well, or a minus sign
[10:22:39] <Planck_> So long as it's in the first position
[10:22:45] <mitch0> or a +
[10:23:01] <Planck_> Okay, I wasn't sure whether it accepted literal + sign
[10:23:12] *** amlan81 has left ##java
[10:23:13] <Busata> okie, thanks
[10:23:18] <Candle> "(+|-)?[0-9]+"
[10:23:27] *** plarsen has quit IRC
[10:24:06] *** shurane has quit IRC
[10:24:11] <mitch0> "\\s*[+-]?[0-9]+\\s*"
[10:24:14] *** shurane has joined ##java
[10:24:36] <Planck_> Hmm, Integer.parseInt docs say either number characters with an optional leading -'-
[10:24:43] <Planck_> Err, '-'
[10:25:13] <Planck_> And I don't know where that "either" came from :)
[10:25:37] *** d3javu has quit IRC
[10:25:42] <Planck_> In all, it's easiest to just catch the exception
[10:26:03] <Planck_> Since it also throws if the integer represented is outside int's range.
[10:26:11] *** javobiwan has joined ##java
[10:26:46] *** frangiz has quit IRC
[10:27:46] <Planck_> Yep, definitely doesn't accept leading spaces or +
[10:27:56] *** frangiz has joined ##java
[10:31:04] *** BeholdMyGlory has joined ##java
[10:31:42] *** TzilTzal has joined ##java
[10:31:53] <DroidAgent> "(.*?)\\|(.*?)\\|(.*?)(\\|.*?|\\.\\.\\.)(.*)" eeuw, but it does the trick, heh.
[10:32:02] <DroidAgent> Hm I could use {3} for the dots I guess.
[10:32:21] <Planck_> So for decimal Integer.parseInt equivalence, the true regular expression would be rather unwieldy.
[10:33:00] <DroidAgent> Scraping is an ugly business :D
[10:33:48] <Candle> Planck_: Well the Double.parseDouble documentation has the definition in BNF.
[10:34:07] <Candle> er, no it doesn't..
[10:35:10] <Candle> ~ javadoc Double.valueOf(String)
[10:35:11] <javabot> Candle: http://is.gd/ORMk8Z [JDK: java.lang.Double.valueOf(String)]
[10:35:37] <Planck_> It does have a paragraph or so of regex code, probably more as a warning than as example
[10:37:35] <Candle> Yes, *some* languages defined in BNF can also be regular. It doesn't mean that one should be writing them as regular expressions.
[10:38:19] *** Phil-Work has joined ##java
[10:39:01] *** d3javu has joined ##java
[10:39:29] *** jds has quit IRC
[10:39:52] *** Frankie-T has joined ##java
[10:39:56] *** Evelynn has quit IRC
[10:40:00] *** Tyred has joined ##java
[10:40:37] <Frankie-T> Hi guys. Is it possible to iterate over instance vars of a class?
[10:40:50] <Planck_> Though at least double has the luxury of returning Infinity for overflowed representations. Integer can't.
[10:41:19] *** magentar has quit IRC
[10:41:58] <Planck_> Frankie-T: Hmm, I can't think of any way to do that without going into instrumenting classloaders or something
[10:42:13] *** frimend has joined ##java
[10:42:45] <Planck_> You could probably write a constructor that adds every instance into a weak map or something, but dangerous and icky
[10:42:59] <frimend> I have a problem with a import. "import javax.servlet.*;"
[10:43:09] <frimend> eclipse says this "cannot be resolved".
[10:43:41] <Frankie-T> @Planck_ Yeah, that doesn't really sound clean :)
[10:43:42] <frimend> I wasn't the person who added this line, and I don't know what this is for, I just want it to compile. Am I missing something in eclipse?
[10:43:56] <frimend> Do I have to download something and add to my project?
[10:44:12] *** wlievens has joined ##java
[10:44:43] <wlievens> Anyone have any experience with javax.validation? I'd like to know how to write a custom validator that can look at the owner of a field.
[10:44:58] <wlievens> For instance if you have two date fields and you want to annotate such that date1 < date2
[10:44:59] <Candle> Planck_, Frankie-T: You can do it with reflection, but that's not really a good solution.
[10:45:19] <wlievens> You would need to access the object that owns both fields .... but I can't see how to do that with a ConstraintValidator implementation
[10:45:36] <wlievens> there's no parameter to the isValid method, or no getter on the context object for it!
[10:45:44] <Candle> frimend: try removing it and see if you get different compile errors :)
[10:45:51] <frimend> :D
[10:46:13] <disappearedng_> Yo let say I am waiting for a udp packet with inSocket.receive(myReceivePacket), how do I use a timer such that when the receive is too long I will break out of there (and be able to return -1 to indicate timer went off? )
[10:46:18] <Planck_> Candle: oh, I didn't realize that. Never needed it I suppose :)
[10:46:19] <frimend> Candle: It is used in the code.
[10:46:27] <frimend> so I get loads of errors if I remove it.
[10:46:46] <Candle> frimend: Then if you do, you'll need to find a jar containing the classes and add it to your classpath.
[10:46:57] <frimend> aha!
[10:47:17] *** freeone3000 has joined ##java
[10:47:54] <pht> freeone3000, okay, so i'll do my own utility function for that.
[10:48:09] <Planck_> disappearedng_: You can use inSocket.setSOTimeout
[10:48:18] <frimend> Candle: Isn't javax.servlet a part of java core?
[10:48:30] <mapreduce> No.
[10:48:38] <disappearedng_> well I am actually not waiting for the socket to time out, I am actually waiting for an event, can you recommend me something else?
[10:48:43] <pht> freeone3000, and actually that subtraction algorithm is wrong IMO.
[10:48:48] <mapreduce> disappearedng_: Don't wait, react.
[10:49:18] <disappearedng_> I can't react man I am sending through a fault emulator
[10:49:22] <disappearedng_> *faulty
[10:49:28] <mapreduce> disappearedng_: You could, on a different thread, react to the event by closing inSocket.
[10:49:39] <mapreduce> That would interrupt it.
[10:49:43] <freeone3000> If you're waiting on a .read(), that'd indeed be a timeout.
[10:50:03] <disappearedng_> ok so if I receive ANYTHING on inSocket then the timer on inSocket will expire
[10:50:37] <mapreduce> I thought you didn't want to wait for a timeout.
[10:51:09] <disappearedng_> ok nevermind what other timeout are there in java? Spawn another thread to just sleep and then wake up and see if certain events have happened?
[10:51:21] *** squi has quit IRC
[10:51:43] <freeone3000> If you want to determine if certain events have happened by a given elapsed time, yes.
[10:51:51] <mapreduce> java.util.Timer, javax.swing.Timer, java.util.concurrent.ScheduledExecutorService
[10:52:00] <Planck_> You could listed on the socket on one thread, and receive other types of events on another thread
[10:52:23] *** topriddy1 has quit IRC
[10:52:24] <Planck_> (E.g. UI events or something)
[10:52:28] <Busata> always fun to encounter this other peoples (already in production) code... let's assume x&y are objects with some functions ( if x == null & y == null) { x.doStuff(); y.doStuff(); }
[10:52:29] <Busata> :-(
[10:52:46] <Planck_> Feed them both into a task queue of some sort
[10:52:57] <Planck_> Lots of options.
[10:53:19] <Planck_> There's also selectable channels, depending what other events you're waiting for
[10:53:27] <disappearedng_> Hm, there are so many timer class I don't even know where to begin
[10:53:28] *** disaster_02 has quit IRC
[10:54:32] <Planck_> Do you really need a timer at all?
[10:54:36] *** d3javu has quit IRC
[10:55:16] <disappearedng_> well yeah I am waiting for a packet and if it doesn't arrive within the specified time I need to resend
[10:55:25] *** Behold has joined ##java
[10:55:28] <Planck_> Ahh, reimplementing TCP
[10:55:37] <disappearedng_> well not TCP but go back N
[10:55:52] <Planck_> Always a fun hobby. Done that a couple of times :)
[10:56:34] <disappearedng_> that's why none of the proposed methods mentioned works because the timer is needed specifically for the event of "If ack for sequence number X has arrived" rather than if a packet has arrived
[10:57:37] <Planck_> Heh, sounds a great deal like implementing TCP over UDP :)
[10:57:50] <disappearedng_> kind of
[10:57:56] <Planck_> (But sorry, I don't mean to be snarky :-)
[10:58:15] <disappearedng_> well which timer lib should I uise?
[10:58:29] <freeone3000> java.util.Timer performs a cancellable, one-off specially-crafted task in a timer thread. ScheduledExecutorService allows for execution of arbitrary tasks in another thread with a specified, uniform timeout or interval. javax.swing.Timer runs on the EDT, so it's not what you want.
[10:58:56] <Planck_> Last time I used an executor, and cancelled the re-send task when the ack arrived
[10:59:14] *** BeholdMyGlory has quit IRC
[10:59:37] <disappearedng_> Planck_ so you are talking about java.util.Timer right?
[11:00:48] <Planck_> In my case, java.util.concurrent.Executors.newSingleThreadScheduledExecutor()
[11:00:58] <Planck_> Though java.util.Timer would probably work too
[11:01:14] <Planck_> I don't recally exactly why I decided not to use it
[11:01:37] <freeone3000> Cause you need one timer per task, adn by the time you have a List<Timer> you might as well have a List<Future<Void>>.
[11:01:46] <Planck_> Ahh right :)
[11:01:57] <disappearedng_> damn this is why I don't use java
[11:02:09] <freeone3000> disappearedng_: Because it provides everything you need?
[11:02:51] <Planck_> Does it really need a Timer per task? Couldn't I just .schedule() a bunch of tasks on the same timer?
[11:03:06] *** Behold has quit IRC
[11:03:14] <disappearedng_> no because it requires a lot of reading + practice to go dive into fast development moe
[11:03:16] <disappearedng_> *mode
[11:03:39] <freeone3000> Planck_: Yes, but if you .cancel() a timer, all TimerTasks are cancelled, so if you want them to be independently-cancellable...
[11:04:38] <Planck_> Ah, and exception issues.
[11:05:43] <Planck_> In the end I decided TCP was actually what I really wanted anyway.
[11:05:50] *** LouisJB has joined ##java
[11:06:12] *** Sambler has joined ##java
[11:06:47] <Planck_> Just opening a second connection for urgent data instead of trying to juggle my own UDP timeouts and windows and such.
[11:07:29] *** homie has quit IRC
[11:08:01] <freeone3000> I ended up using a priority queue for message sends, such that urgent data was sent first.
[11:08:26] <freeone3000> Also turned out nice in case of client lag and an exit command followed by some typing.
[11:08:45] <Planck_> I had some long-running transfers that could be initiated and might not finish for tens of seconds
[11:13:06] *** dtrott has quit IRC
[11:13:35] *** new2net has joined ##java
[11:13:52] <Planck_> I suppose having a bulk transfer and a low-latency channel is essentially the same thing as a priority queue, only letting the TCP/IP stack handling the interleaving :)
[11:14:18] <new2net> whats the point of a nested interface?
[11:14:20] *** supercosmonaut has joined ##java
[11:14:53] <mapreduce> new2net: Not a lot, just makes its fully-qualified name include the outer class.
[11:15:35] *** simoncpu has joined ##java
[11:15:41] <simoncpu> yo dawg
[11:15:42] <new2net> oh, that it does. I was also wondering how do pass a function as an argument?
[11:15:54] <mapreduce> new2net: You cannot.
[11:15:55] <simoncpu> ur mom is so fat, that she's implemented in java!
[11:15:59] <simoncpu> lolololol
[11:16:08] <mapreduce> I see the AOL users are back online.
[11:16:20] <new2net> mapreduce, i mean lambda
[11:16:24] *** wyvern` has quit IRC
[11:16:30] <mapreduce> new2net: Java has no lambda. You can only emulate it, and badly.
[11:17:01] <simoncpu> yo dawg, i herd you like polymorphism
[11:17:12] <simoncpu> so i put a class in your class so taht u can expand while u expand
[11:17:14] <new2net> hmm... what about a function via anonymous inner class?
[11:17:20] <Planck_> About the best you can do is pass an object that implements an interface holding the type of function you expect.
[11:17:25] <mapreduce> new2net: Yep, that's the emulation.
[11:17:47] *** disappearedng_ has quit IRC
[11:17:48] <mapreduce> E.g., Collections.sort(list, new Comparator<String>() { public int compare(String one, String two) { return one.startsWith(two) ? 1 : 0; /* or whatever */ } }
[11:17:50] <mapreduce> );
[11:18:26] <Planck_> It works, but it's pretty ugly :(
[11:18:31] <new2net> I share your disappointment with java's cluncky syntax for functions via anonymous inner classes.
[11:18:36] <mapreduce> A good IDE will fold that for you so it looks like Collections.sort(list, Comparator<String>(String one, String two) { return one.startsWith(two) ? 1 : 0; });
[11:18:51] *** simoncpu has left ##java
[11:18:52] <mapreduce> However, most people seem to choose Eclipse instead.
[11:19:24] *** devkhadka has quit IRC
[11:19:56] <mapreduce> new2net: If you're only bound to the JVM and not to Java itself, you might look at Scala, or if you're into untyped programming, Clojure or Groovy.
[11:20:12] <mapreduce> Java 8 (sometime this decade) is expected to support lambdas.
[11:21:52] *** Sambler has quit IRC
[11:22:23] <Candle> mapreduce: So that'll be 2019/12/31 then?
[11:24:19] <Planck_> 2020 will do, for the 1-based non-programmers.
[11:24:20] <new2net> I've heard good things about Scala. But I'm not really wanting to learn a statically typed language, I feel like I might as well go learn ASM.
[11:24:48] *** xiliax has joined ##java
[11:25:19] <mapreduce> new2net: You know Java's statically typed, right?
[11:25:23] <new2net> Candle, there was no year 0. off by 1 error :p
[11:26:09] <Candle> heh, yes. you're right 2020 is still this decade.
[11:26:16] <new2net> mapreduce, I haven't noticed. It just boxes everything into Object anyways, might as well call it zval.
[11:26:40] <mapreduce> new2net: You mean because String, for instance, is a subclass of Object?
[11:27:21] * freeone3000 worries about the insane amount of casting.
[11:27:31] <mapreduce> I'd have thought that 1-based non-programmers would count like thus: 1111111111111
[11:27:56] <Planck_> Well, if we're talking about 1 AD many of them almost did :p
[11:28:10] <Planck_> I, II, III, etc... ;-)
[11:28:18] <Candle> one, two, three, many, lots.
[11:28:24] <mapreduce> Ah, the deluded people who are going to putz with my code after I'm gone think it will be easy to base it on their work.
[11:28:56] <mapreduce> "we'll maintain one codebase instead of two" No, you'll break it all and give up, because you don't know what you're doing.
[11:29:00] *** frangiz has quit IRC
[11:29:13] *** frangiz has joined ##java
[11:29:38] <new2net> mapreduce, I will put your code into a database and execute it with eval(). Your code is in good hands
[11:29:53] <mapreduce> Your database, however, is not.
[11:30:43] <new2net> i will build a circular reference, and deny all responsibility.
[11:31:38] <new2net> speaking of which, does java have an "eval" function?
[11:31:43] <mapreduce> I am trying to debug a listener leak.
[11:31:50] <mapreduce> ~keywords
[11:31:50] <javabot> here are a list of the keywords in java http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
[11:31:58] <mapreduce> here *is*, you dumbo.
[11:31:59] *** harry_ has quit IRC
[11:32:11] *** devkhadka has joined ##java
[11:33:29] <freeone3000> But list is plural, because it refers to more than one item, because that's how nouns work.
[11:34:22] <mapreduce> List isn't plural, otherwise you'd say "here are some list", like you say "here are some sheep".
[11:34:57] <new2net> mapreduce, I was looking for that keyword "throws". Thank you for indirectly helping me
[11:35:47] <mapreduce> Teach a man to fish, and all that.
[11:37:15] <Planck_> I'm sure there are plenty of codebases up there that need an Up exception class.
[11:37:30] <Planck_> So the code can be full of "throws Up"
[11:38:05] <new2net> catch it
[11:38:24] <Planck_> Eww, no you catch it.
[11:38:59] *** wlievens has quit IRC
[11:39:37] <mapreduce> throw null;
[11:39:59] *** neuro_sys has quit IRC
[11:40:00] *** CallToPower|away has left ##java
[11:40:47] <new2net> catch null pointer exception?
[11:41:09] *** tonique has joined ##java
[11:41:11] *** CallToPower has joined ##java
[11:42:14] <Busata> damn, now my code is going to be full of weird exception names
[11:42:22] <Busata> throw Frisbee!
[11:42:55] <Planck_> Hmm, can you even catch the NullPointerException that produces?
[11:43:10] <freeone3000> I think you have to catch the catch.
[11:44:01] <Busata> let's teach all newbies you have to name your exceptions Boomerang in order for them always to come back and be catched!
[11:44:43] <Planck_> Oh right, I was confusing myself when trying it.
[11:45:15] <Planck_> It just generates a perfectly ordinary NullPointerException.
[11:47:27] <mapreduce> Yeah, great fun.
[11:47:34] <mapreduce> It works in C# and Scala too.
[11:47:39] *** squi has joined ##java
[11:48:22] <horte> Guys, using JPA annotations I am trying to fetch a OneToMany relation based on a column name. Can you what's wrong in my @OneToMany mapping? http://pastebin.com/MRUYDPiM
[11:48:24] *** d3javu has joined ##java
[11:48:33] <mapreduce> "you've had one too many"
[11:52:01] *** squi has quit IRC
[11:52:08] <new2net> mapreduce, Object string = "this is a string lol"; it's all Object to me, I let the compiler figure out the details
[11:53:06] *** d3javu has quit IRC
[11:53:19] <mapreduce> new2net: Except it doesn't. You won't be able to use .substring on Object string;
[11:54:24] *** javobiwan has quit IRC
[11:54:52] *** hyppias has joined ##java
[11:55:02] <new2net> right, that's what ((String) string).substring is for
[11:56:19] <Candle> new2net: So you convert a compile-time check into a run-time check, which makes your code increadably fragile.
[11:56:49] *** harry_ has joined ##java
[11:58:08] *** taitale has quit IRC
[11:58:38] <new2net> upcasting :p better check yourself
[11:58:45] *** homie has joined ##java
[11:59:13] <freeone3000> First, that's down, and second... no, that's a terrible way of doing things.
[11:59:51] *** frangiz has quit IRC
[11:59:52] <horte> Any got a clue?
[11:59:54] *** kba has quit IRC
[12:00:26] *** frangiz has joined ##java
[12:00:50] <new2net> is it not both down and up? Object string = "str"; ((String) string).substring();
[12:01:32] <mapreduce> I think it's reasonably safe to assume he's joking.
[12:02:46] *** forneus has joined ##java
[12:03:27] *** squi has joined ##java
[12:03:47] *** Frankie-T has quit IRC
[12:07:32] *** CBro2007 has joined ##java
[12:11:06] <dreamreal> morning
[12:11:21] <new2net> good morning.
[12:11:30] *** forneus has quit IRC
[12:12:14] <mapreduce> Grr, I knew this two-way dependency would bite me eventually.
[12:12:44] *** [[thufir]] has quit IRC
[12:15:07] *** zuxqoj has joined ##java
[12:15:15] <asfdd> how can i manually call page down function of a JScrollPane
[12:15:24] *** zuxqoj has quit IRC
[12:15:54] *** zuxqoj has joined ##java
[12:16:23] *** RLa has joined ##java
[12:18:32] <mapreduce> asfdd: If in a JEditorPane or something, setCaret.
[12:18:44] <mapreduce> setCaretPosition, even.
[12:19:13] <asfdd> i just have a global key listener
[12:19:26] <asfdd> that should scroll the scrollpane regardless of where my focus is
[12:19:34] <asfdd> i just need to know where to delegate the command
[12:19:45] <asfdd> i can't seem to find it in either JSCrollpane or the viewport
[12:20:01] *** Olathe has quit IRC
[12:20:13] <mapreduce> scrollRectToVisible on JViewport?
[12:20:47] <asfdd> but then i have to manually calculate where to scroll to no?
[12:20:48] <ztj> are you trying to figure out how to use a scrollable window as a console or similar? Because there's an example linked in this factoid...
[12:20:50] <ztj> ~jcurses
[12:20:51] <javabot> Console/terminal support: See JavaCurses - http://sourceforge.net/projects/javacurses/ and Charva - http://www.pitman.co.za/projects/charva/ and Jcurzez - http://www.nongnu.org/jcurzez/ and also "Console Window with a JTextArea Component" - http://javaalmanac.com/egs/javax.swing.text/ta_Console.html and Java 6.0's java.io.Console class.
[12:20:51] <mapreduce> Yes.
[12:21:32] <asfdd> so its the component inside the viewports responsibility to determin where to scroll to normally?
[12:21:48] <ztj> yeah scroll panes work a little oddly in swing
[12:22:36] <asfdd> ok well then i guess i'll just calc it, i just figured it was dumb to do it if there already was some default behaviour that just scrolled one viewPort size down if available =)
[12:23:50] *** fr0ggler has joined ##java
[12:25:48] *** EarlOfEgo has joined ##java
[12:26:55] *** Olathe has joined ##java
[12:27:20] <EarlOfEgo> hey, i have a question. how can i set a fixed size for a JFrame?, so that the user isnt able to resize the window?
[12:27:45] <ztj> ~javadoc JFrame
[12:27:46] <javabot> ztj: http://is.gd/jQJCM [JDK: javax.swing.JFrame]
[12:27:55] *** Behi has joined ##java
[12:28:21] *** squi has quit IRC
[12:28:59] <ztj> ~javadoc JFrame.setResizable(*)
[12:28:59] <javabot> I don't know of any documentation for JFrame.setResizable(*)
[12:29:11] <ztj> ~javadoc Frame.setResizable(*)
[12:29:12] <javabot> ztj: http://is.gd/3co6Ho [JDK: java.awt.Frame.setResizable(boolean)]
[12:29:19] <ztj> There you go, it's inherited into JFrame
[12:29:24] <ztj> man reading docs is hard
[12:29:33] <EarlOfEgo> worked, thank you :)
[12:29:58] <asfdd> do i manually have to call repaint on my component after scrollToVisibleRect, or does scrollToVisibleRect do it for me?
[12:30:17] <asfdd> in JViewport
[12:30:24] *** Cher has quit IRC
[12:30:59] <new2net> oh wow... jambda... that works, I don't know how... but it did work
[12:31:12] *** frangiz has quit IRC
[12:31:39] *** frangiz has joined ##java
[12:33:28] *** squi has joined ##java
[12:35:38] *** konr has quit IRC
[12:35:59] <new2net> is there anyway to check an object to see if it's numeric in nature? a string "10" would not be numeric in nature, I mean Byte, Long, Double, Integer these things
[12:36:33] <dreamreal> new2net: what does "numeric in nature" mean? You mean does the *class* represent a number of some kind? Almost like a Number?
[12:36:41] *** ptoth has joined ##java
[12:37:04] <ptoth> cheeser are u always here ? :)_
[12:37:12] <dreamreal> lots of people idle online.
[12:37:17] *** EarlOfEgo has quit IRC
[12:37:32] <new2net> I mean if I try to do: obj + 1, I don't want an error.
[12:37:34] <dreamreal> I do, for example. If you watch my IRC "presence," I would look like I'd been here for a week.
[12:37:45] <dreamreal> new2net: What would you assign that to?
[12:38:20] <new2net> Object is the return value, so Object is a safe guess
[12:38:41] <dreamreal> heh
[12:38:44] <dreamreal> return value of WHAT?
[12:38:52] <ptoth> dreamreal not sure how IRC work, you have leave you PC on dont u?
[12:39:02] <dreamreal> ptoth: I use this thing called a "server"
[12:39:12] <dreamreal> I connect to it, and then connect to the IRC session
[12:39:36] *** saby has quit IRC
[12:39:40] <dreamreal> that way, my PC can be on, or off, or not at home, or whatever, and I can still connect to that "server" thingy and still not have to run IRC on the pc
[12:40:01] <new2net> i dunno, obj could be anything. obj + 1, obj is an instance of Object, could be a StringBuffer, could be a Byte. That's why I want to check it to see if it's numeric or not.
[12:40:41] <dreamreal> you do know that if it IS numeric by your definition, you aren't adding one to it in any event, right?
[12:40:47] <CBro2007> is there good regular expression support in Java?
[12:40:57] <fr0ggler> new2net, instanceof. but it sounds like your design is shonky if you're trying numeric operations on an object you know nothing about. you should fix your design so that you have a better idea of what obj is.
[12:41:04] <freeone3000> ~~ CBro2007 javadoc Pattern
[12:41:04] <javabot> CBro2007: http://is.gd/jNNxJ [JDK: java.util.regex.Pattern]
[12:41:11] <dreamreal> CBro2007: what is this regular expression thing you speak of? And no. if there were, it'd be in something like "java.util.regex" or some crap like that
[12:41:25] <fr0ggler> CBro2007, yes, Java's regex is, well, for regex.
[12:41:59] <CBro2007> I have a weird looking file with all sorts of crazy curly braces and stuff wrapped around... just wondering if its going to be a pain to get to the elements in java
[12:42:26] <asfdd> http://download.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html
[12:42:28] <freeone3000> Pattern.quote() will be your friend.
[12:42:32] <Bombe> CBro2007: Depends on the syntax of the file. If it's like HTML you can not use regular expressions to parse it.
[12:42:37] <dreamreal> depends on what elements you need. But you may want to consider not using regex like a parser.
[12:42:50] <dreamreal> asfdd: don't quite 1.4.2 docs, please - even 1.5 is end-of-lifed
[12:43:00] <CBro2007> its just a flat file which is the outpit of some query from a crappy dbms
[12:43:12] *** barq has joined ##java
[12:44:05] <CBro2007> I can paste it someplace so you have an idea
[12:44:07] <CBro2007> one sec
[12:44:41] <freeone3000> Regex is going to turn out the same. Only difference between Java's and Perl's are the ones outlined in the javadoc page, plus that java string literals don't get the special treatment regex literals do.
[12:45:25] <CBro2007> ok haven't done regexes in a while now and yeah mostly did them in Perl. I remember trying them out ages ago in Java and they had so many features missing
[12:45:33] <CBro2007> this was quite a while back
[12:45:47] <CBro2007> I might need the help of some regexp gurus here :)
[12:46:34] <CBro2007> http://paste.lisp.org/display/120164
[12:46:49] <CBro2007> I got two possible formats and I have mocked up some data to show both
[12:47:01] <ptoth> dreamreal ok good for zou
[12:47:03] <ptoth> you
[12:47:14] <CBro2007> does this look easy to break down in regexp?
[12:48:00] *** squi has quit IRC
[12:49:31] <freeone3000> It's regular.
[12:50:52] <CBro2007> freeone3000: ok
[12:51:20] <CBro2007> its just that I was thinking if I did a "split" on { or something.. it might screw up... so I will have to do something smarter and capture pattern bits or something
[12:54:06] <Pozejdon> I am asking: If I had 2 java class library projects open, how can I call one method from other project
[12:54:35] <mapreduce> Pozejdon: instance.method(args)
[12:54:56] <Pozejdon> ok
[12:55:02] <dreamreal> Pozejdon: holy cow, you're regressing in java knowledge now.
[12:55:46] <Pozejdon> ok that I know
[12:56:16] <Pozejdon> what about if cannot find one class in other project
[12:56:23] *** McMAGIC-- has joined ##java
[12:56:37] <dreamreal> hahaha
[12:56:43] <dreamreal> maybe you can't use it if you can't find it :)
[12:56:54] <dreamreal> if it's there and you can't find it, you don't know java or the classpath
[12:57:05] <Pozejdon> I know
[12:57:29] <mapreduce> You may be prematurely using an IDE.
[12:57:29] <Pozejdon> probel is maybe classpath
[12:57:31] <dreamreal> then why are you asking?
[12:57:44] <dreamreal> If you know the problem and you know why the problem is there, WHY THE HELL ARE YOU ASKING?
[12:58:14] <Pozejdon> I am asking because I cannot fix that
[12:58:18] <dreamreal> "If two pieces of wood aren't stuck together, and there's no nail there, but I have a nail and a hammer right here, and I want the two pieces nailed together, what should I do?"
[12:58:30] <dreamreal> Pozejdon: then you're screwed. Go back to ... whatever it was you did before.
[12:58:34] <mapreduce> Pozejdon: So, what is the classpath, and where is the .class that you're trying to use?
[12:59:22] *** matsebc has joined ##java
[12:59:32] <mapreduce> Pozejdon: Please keep it in-channel.
[12:59:51] <new2net> dreamreal, does your hammer implement any interfaces?
[12:59:56] <dreamreal> mapreduce: he may be learning fear of saying really stupid things in the open channel.
[13:00:29] <dreamreal> which - while I'm not in favor of fear in any circumstance, really - may be a good thing. It may spur him on to "learning" "things"
[13:00:43] *** frangiz has quit IRC
[13:01:14] <mapreduce> I'm likely to go offline shortly, need to drive to another office, so there's no point starting a /msg conversation.
[13:01:34] <dreamreal> apparently somewhere down the line he got the idea that learning stuff was overrated
[13:01:54] *** frangiz has joined ##java
[13:02:09] <mapreduce> We all limit our learning.
[13:02:50] <mapreduce> E.g., if dibblego says "imperative code is crap" we don't feel compelled to learn the alternatives just to see his point of view. We just assume he's being an elitist dick and move on.
[13:03:07] <mapreduce> Grr, maven..
[13:03:30] *** RobotCow has quit IRC
[13:03:33] <dreamreal> mapreduce: although the equivalent here is deciding that "crap" is the term we want to avoid learning anything about
[13:03:46] <mapreduce> The git-add command failed. fatal: 'c:\full\path\fokker-class2\pom.xml' is outside repository
[13:03:57] *** Archon has joined ##java
[13:04:40] *** RobotCow has joined ##java
[13:04:49] <Archon> Does anyone here use H2 or HSQLDB? What is the purpose of using the Java interface Trigger for triggers rather than allow normal SQL-style triggers?
[13:05:55] <RLa> maybe implementing full-featured procedural language for triggers is not good approach for these embedded db's
[13:06:26] <dreamreal> Archon: it allows you to write your triggers in java.
[13:07:18] <RLa> also, "normal SQL-style" can mean lot of things among database vendors
[13:07:20] *** Luc1fel has joined ##java
[13:07:31] <Archon> dreamreal: But there doesn't appear to be any other crossover features like that anywhere else.
[13:07:49] <ptoth> mapreduce hi I am now looking into assertion module of FEST(dreamreal ;) ) and looking for a way to test if user was sucessfully login. I am testing this(and I may doing this wrong) by looking up for certain component which has to be on screen when user is logged
[13:08:41] <dreamreal> Archon: maybe they're not required?
[13:08:44] <Archon> RLa: I've been looking for a single-file database that has a Hibernate dialect and MySQL syntax.
[13:08:56] * dreamreal boggles
[13:09:13] <ptoth> mapreduce problem is how to do that I can look the component but then I get org.fest.swing.exception.ComponentLookupException exception if use was not logged successful
[13:09:17] <Archon> single-file / embedded file-based
[13:09:27] <RLa> mysql syntax for stored procs/triggers/funcs?
[13:09:35] <Archon> RLa: For triggers, yes.
[13:09:41] <Archon> I don't use funcs or stored procs
[13:10:01] <ptoth> because obviously component will be there only if user log in successfully
[13:10:10] <dreamreal> Archon: maybe you should use mysql anyway.
[13:10:14] <RLa> why you need that mysql syntax, porting some app?
[13:10:27] <dreamreal> You do realize you're kinda asking for square wheels on a flintstone car, right?
[13:10:29] <RLa> or use real database if you need advanced features
[13:10:31] *** Xeli has joined ##java
[13:10:59] <Xgc> Pozejdon is pretty patient / persistent, jumping from channel to channel (or just waiting for days) until someone does his work. It's quite impressive.
[13:11:29] <dreamreal> Xgc: yep, and he's clue-resistant
[13:11:48] <Xgc> In every subject he's asked about, it seems.
[13:12:36] *** brundlefly has joined ##java
[13:12:56] *** brig has quit IRC
[13:13:00] *** brig has joined ##java
[13:13:30] *** horte has quit IRC
[13:14:27] <Xgc> The language barrier doesn't help.
[13:14:42] *** wchun has joined ##java
[13:15:03] *** squi has joined ##java
[13:15:04] *** jonkri has joined ##java
[13:16:59] *** teralaser_ has joined ##java
[13:18:51] *** horte has joined ##java
[13:19:07] *** teralaser has quit IRC
[13:21:13] *** teralaser has joined ##java
[13:21:33] *** Clete2 has quit IRC
[13:23:24] *** teralaser_ has quit IRC
[13:24:50] *** Clete2 has joined ##java
[13:28:57] *** L-----D has quit IRC
[13:29:43] *** adaro has joined ##java
[13:30:45] *** tomaw has quit IRC
[13:31:04] *** frangiz has quit IRC
[13:32:05] <adaro> Can somone explain why while (true) {String.valueOf(random.nextLong()).intern(); } wont throw a out of permgen space error ?
[13:32:05] *** frangiz has joined ##java
[13:32:08] *** harry_ has quit IRC
[13:32:25] <adaro> I was under the impression that the permgen was well you know permanent
[13:32:25] *** dextro_ has quit IRC
[13:32:52] <adaro> but in visualgc i actually see garbage collection going on
[13:34:01] *** zuxqoj has quit IRC
[13:34:12] *** zuxqoj has joined ##java
[13:35:31] *** Akima has joined ##java
[13:35:35] <paulweb515> adaro: does intern() add to the PermGen on a Sun VM?
[13:35:46] <paulweb515> adaro: usually it's classloading that goes into PermGen on a Sun VM
[13:35:48] <adaro> paulweb515: indeed it does
[13:36:03] <adaro> paulweb515: yes class definitions and interned strings among others
[13:36:04] *** Versuchen has joined ##java
[13:36:29] <adaro> visualgc makes it visual, so it shows the occupancy of the various spaces
[13:36:32] <Akima> If I run this command: "java -jar an_unstrusted_app.jar", will the jar be loaded in a security sandbox?
[13:36:35] <Planck_> .intern() doesn't require that the interned reference persist for the life of the VM.
[13:36:56] <adaro> i see the permgen space growing and growing, and then going down again when a gc kicks in
[13:37:18] <adaro> Planck_: but isn't the permgen space designed to be permanent
[13:37:29] <paulweb515> adaro: permgen doesn't mean the objects in it our permanent
[13:37:43] <dreamreal> heh
[13:38:12] <Planck_> It's designed for references that the heuristics *suspect* to be permanent.
[13:38:39] <Planck_> E.g. all the non-language-level stuff
[13:38:56] *** floppyears has quit IRC
[13:40:09] *** tomaw has joined ##java
[13:40:27] <Planck_> Oh wait, I'm conflating tenured and permanent together, aren't I?
[13:40:28] *** benoitdo has joined ##java
[13:40:39] <Planck_> Doh.
[13:40:43] *** teralaser has quit IRC
[13:41:22] *** tajen has joined ##java
[13:41:40] <paulweb515> adaro: from a reference: "However, the intered Strings behave no differently than had they been stored in the ordinary object heap. "
[13:41:51] <paulweb515> adaro: implication is they will still get GCed
[13:41:57] *** teralaser has joined ##java
[13:42:05] <Planck_> Right, PermGen is *only* the stuff the JVM uses internally, not corresponding to any Java object.
[13:42:11] *** jtheuer has joined ##java
[13:43:12] *** bitshuffler has joined ##java
[13:43:22] <Pozejdon> my output when I do clean&build
[13:43:24] <Pozejdon> http://pastebin.com/LZFZz4ym
[13:43:47] <dreamreal> Pozejdon: let us know when you learn java
[13:43:49] *** squi has quit IRC
[13:43:50] <dreamreal> we'll help you then
[13:44:22] <Pozejdon> I have there still RezervniDel.java in 32 row, but I changed this file with another file with Zamudnik.java
[13:44:30] <Bombe> Is he STILL at it?
[13:44:33] <tajen> Hi, what does the syntax "String... variablename" mean? I figured I was basically a String array, but cant under stand why there would be two ways of doing String[].. or maybe it is used to tell the compiler that there can be several parameters? Thanks for any info.
[13:44:34] <dreamreal> Pozejdon: let us know when you learn java. We'll be glad to help you then.
[13:45:03] <RLa> ~varargs
[13:45:03] <javabot> RLa, varargs is http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html
[13:45:13] <RLa> tajen, see that link
[13:45:19] <tajen> Thanks RLa :)
[13:45:51] <Planck_> It's similar to String[] for the callee, but more convenient in some ways for the caller.
[13:46:01] *** glcrazy has joined ##java
[13:46:03] <dreamreal> ... in every way that counts.
[13:46:13] *** adaro has quit IRC
[13:47:26] <dreamreal> we expect Pozejdon to completely get it wrong any moment now.
[13:49:24] <dreamreal> Bombe: it will never end.
[13:49:37] <Bombe> It appears so.
[13:49:39] <dreamreal> Bombe: I expect him to switch to VBA soon... and still bug ##java with questions.
[13:49:43] <Planck_> Well, at least he's not asking "why won't this code compile in my java? Dim message As New MailMessage(from,sendTo)"
[13:49:59] <dreamreal> Planck_: it's coming.
[13:50:12] <Planck_> Yeah, I had this horrible sinking feeling as soon as I wrote that.
[13:52:19] *** adaro has joined ##java
[13:52:34] <CBro2007> hi with groups and capturing in --> http://download.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html#cg ... I was wondering how I access the captured patterns later on? I know in Perl you just do a $1, $2 etc to get them back
[13:52:42] <CBro2007> not sure how its done in this Java class
[13:52:47] *** teralaser has quit IRC
[13:52:56] *** teralaser has joined ##java
[13:54:02] <ptoth> Paulweb what is best way for testing in FEST if some component is on the screen? I was using org.fest.swing.core.NameMatcher to find component and if it doesnt not find it I get expcetion. This could work I am onlz courious if there is better way I cannot find anything in Assert library
[13:54:15] <Fanook> CBro2007: it's all in the javadocs for Pattern. \<1-based index>
[13:54:20] <Fanook> ~javadoc Pattern
[13:54:20] <javabot> Fanook: http://is.gd/jNNxJ [JDK: java.util.regex.Pattern]
[13:54:37] <Planck_> CBro2007: You can use Matcher.group(int) to get the groups
[13:54:39] <Fanook> CBro2007: also, stop using the docs for java 1.4 we're all the way up to 6.0 now
[13:54:53] <Busata> you hope that!
[13:54:54] <CBro2007> ok wil look for 6
[13:54:57] *** squi has joined ##java
[13:55:45] <dreamreal> heh
[13:55:51] <hyppias> how can I find out which JAXB version is in the JDK 1.6.0.23 ?
[13:56:04] <dreamreal> there are some sad sacks who are still on 1.4, but they're contemptible and should only be pitied
[13:56:21] *** teralaser has quit IRC
[13:56:24] *** realtime_ has joined ##java
[13:56:27] *** teralaser has joined ##java
[13:56:42] <Busata> project I'm on right now still uses 1.4
[13:56:43] <ptoth> Paulweb515 also I tried assertThat(window.button("someButtion")).isNotNull(); but this throws exception also.
[13:56:53] <Busata> but that's the least of my worries :-p
[13:56:56] <dreamreal> Busata: why? Which project is that?
[13:56:58] <paulweb515> ptoth: as mentioned yesterday, I don't use fest
[13:57:11] <Bombe> I changed jobs this week, and the new company always uses the latest JDKs.
[13:57:13] <dreamreal> paulweb515: nobody does, except ptoth :/
[13:57:15] <ptoth> paulweb515 ou sorry then I forgot
[13:57:29] <Busata> dreamreal: company internal project thing
[13:57:32] <Bombe> I feared the worst when I initially applied as a developer for their main product.
[13:57:35] <ptoth> dreamreal I love generalizations
[13:57:38] <dreamreal> Busata: is the company still in 2002?
[13:57:45] <dreamreal> ptoth: i do too, always!
[13:57:54] <Busata> possibly
[13:57:58] <ptoth> dreamreal so what would you use for testing Swing?
[13:58:06] <dreamreal> ptoth: realistically, though, you're doing the same thing as Pozejdon: "it doesn't work, help me, even though I'm doing it wrong"
[13:58:14] <dreamreal> ptoth: Robot.
[13:58:46] <ptoth> javva.awt.Robot ?
[13:58:49] <Busata> the company I really work for is always up to date, but outsourced to this one now, and less happy :-p
[13:58:59] <dreamreal> plus, I'd be a lot more concerned over whether the things Swing interacted with did the right things instead
[13:59:05] <dreamreal> and those can be simpler unit tests
[13:59:22] <ptoth> for example?
[13:59:27] <ptoth> not sure what you mean
[13:59:43] <Akima> If I run this command from a terminal: "java -jar an_unstrusted_app.jar", will the jar be loaded in a security sandbox?
[14:00:04] <dreamreal> a jbutton would fire off an event that was implemented by a service class. Then you test the service class; the buttons are pretty simple.
[14:00:10] <paulweb515> Akima: not really
[14:00:12] *** squi has quit IRC
[14:00:34] <paulweb515> Akima: you could set a security policy for it, though, giving it almost no permissions
[14:00:35] <Akima> paulweb515: oh. It's really hard trying to find documentation on how the security in java works.
[14:00:57] <Akima> I'll just run it in a VM I think paulweb515. Thanks for the info
[14:00:59] <paulweb515> Akima: you can use policytool to create a policy file
[14:01:23] *** harry_ has joined ##java
[14:01:23] <paulweb515> Akima: that's what java does (run it in a VM). Pass in a policy file, and it will apply permission checks
[14:01:43] <paulweb515> Akima: http://download.oracle.com/javase/1.4.2/docs/guide/security/PolicyFiles.html
[14:01:57] * dreamreal eyes the 1.4.2
[14:02:07] <Akima> why is it a jar from a website that doesn't prompt for priviledge escalation automatically runs in a sandbox?
[14:02:26] <ptoth> dreamreal ok I think i understand you and so what you mean by Robot when I asked you what would you use to test swing? Java.awt.robot?
[14:03:01] <dreamreal> sure
[14:03:12] *** frangiz has quit IRC
[14:03:21] *** frangiz has joined ##java
[14:03:26] <paulweb515> Akima: an applet runs in a sandbox, but we're not talking about applets when you use java -jar
[14:03:33] <paulweb515> Akima: and on this channel, at all :-)
[14:03:35] <paulweb515> ~applets
[14:03:36] <javabot> Check the topic, read http://javachannel.net/wiki/pmwiki.php/FAQ/Applets - Basically, we don't support them here. Try the sun forums at http://tinyurl.com/2q2hog; consider the new Windows/OS X/Linux 32/64bit JNLP-compatible "Plugin2" from Java 6u10 (http://java.sun.com/javase/6/webnotes/6u10/plugin2/index.html)
[14:03:44] *** squi has joined ##java
[14:03:54] <Akima> ok
[14:04:00] <ptoth> from what I read I get an idea that java.awt. robot could be use but it could mean more code but I read this on FEST site I think so obviously author of FEST thinks that you should use his framework rather than not
[14:04:18] *** lugzer has joined ##java
[14:04:23] <lugzer> hi
[14:04:51] *** adamisme has joined ##java
[14:04:54] <lugzer> which channel for java apps / JRE discussion?
[14:05:47] <Busata> *looks around nervously¨*
[14:05:51] *** Cymage has joined ##java
[14:06:05] <lugzer> Busata, this one? ;)
[14:06:34] <Busata> I suggest you just shoot your question ;)
[14:06:48] <Busata> don't ask to ask and all that stuff
[14:06:52] <lugzer> yea sorry
[14:07:07] <tajen> Hi, I creating a NxM array like this: float[][] variable = {{0.5}, {0.6}}; Problem is that the compiler complains that 0.5 and 0.6 is double, and wants me to cast it to float. However, I got several hundrerds of those values in my code, and I dont want to manually cast all of them. Is there a better way than looping through all the values, and casting them one by one? Thanks.
[14:07:23] <Planck_> f
[14:07:38] <Fanook> shove an 'f' onto the end of each of those constants
[14:08:08] *** platzhirsch has joined ##java
[14:08:10] *** elzoog has joined ##java
[14:08:30] <tajen> Aha, nice. Thansk alot! :)
[14:08:56] <lugzer> this is kinda OSX related but in general, it looks like Java-based apps are using different "system channel" for saving files. issue i've got is that there is an app watching for changes in a file, when my Java-based editor saves it (Eclipse or jEdit), the change is not always picked up.. it looks like the root is somewhere in the system, but perhaps could be changed with some easy Java-fix?
[14:09:13] *** supercosmonaut has quit IRC
[14:09:20] *** platzhirsch has left ##java
[14:09:38] <ptoth> dreamreal so obviously I am bit confused if you tell me that nobody use FEST
[14:09:42] *** amlan81 has joined ##java
[14:09:43] <lugzer> * sorry for my language, i don't know much about system processes.
[14:10:41] <dreamreal> ptoth: I wrote a framework. BTW, you shouldn't use my framework; neither should I. (Does this make sense to you?)
[14:11:12] <elzoog> I have a question. Let's say you have a class TwoDouble { private double d1, d2; Public TwoDouble(double do1, do2) { d1 = do1; d2 = do2 } }
[14:11:20] * dreamreal sighs
[14:11:46] *** Fanook has quit IRC
[14:12:05] <elzoog> If you want to add a constructor with only one parameter, TwoDouble (double do1) where you assign the double to d1 and zero to d2, is it more efficient to do d1 = do1; d2 = 0.0; Or is it just as efficient to call this(do1, 0,0)?
[14:12:06] *** Glavata has quit IRC
[14:12:09] *** Fanook has joined ##java
[14:12:13] <ptoth> dreamreal please be more explicit :)
[14:12:44] <Planck_> elzoog: Efficient in what sense? CPU time, or programmer time?
[14:12:51] <Planck_> or maybe bytecode size?
[14:13:03] <jink> elzoog: Doing it yourself might be slightly faster, but then again, it would make sense to keep all the constructor code in a single place.
[14:13:05] <amlan81> how to access a static variable from a method within the same class. the class is not static
[14:13:08] <elzoog> Planck: CPU time because it doesn't seem to add that much to programmer time
[14:13:17] <dreamreal> ptoth: *sigh* of COURSE FEST's author says to use his framework. It'd be stupid otherwise, like an automobile manufacturer building cars and suggesting you use their competitors instead.
[14:13:47] <dreamreal> and fest has uses, certainly. but the problem here is that you have spent DAYS trying to get FEST working for you. At this point: it isn't happening in timely fashion. Shift gears.
[14:13:47] <ptoth> dreamreal yeah that what I said in previous line
[14:13:51] <Planck_> I expect the CPU time would be essentially identical.
[14:14:01] <elzoog> Have there been any performance tests to see how much extra speed you get?
[14:14:01] <jink> "Hey, we made this really cool car, but it doesn't actually work. Go drive something else."
[14:14:21] <dreamreal> jink: that sounds like an honest Chrysler commercial... :)
[14:14:52] <Planck_> If you're creating a billion objects per second it might make a measurable difference - but then the GC would eat you alive.
[14:15:17] <elzoog> Planck: GC?
[14:15:25] <Planck_> Garbage Collection
[14:15:30] <jink> dreamreal: :P
[14:16:00] <ptoth> dreamreal so why should I use robot over FEST or anyother framework?
[14:16:21] <elzoog> Planck: Reason I ask is I downloaded a Complex number class. The programmer calls this(re, 0.0) if you want to assign a real to a complex
[14:16:39] <ptoth> general rule is that framework should be better choice. IT may be different in this case but certain people over internet are still using it.
[14:16:58] <Planck_> I'll run a quick microbenchmark. It won't really be relevant to anything at all, but might be funny.
[14:17:07] <elzoog> If I might write a program where I might use a lot of complex numbers, would it make better sense to change it? Or go ahead and keep that?
[14:17:11] <dreamreal> ptoth: because you'd be able to, you know, make progress.
[14:17:26] <dreamreal> elzoog: object orientation and encapsulation can be their own reward.
[14:17:29] *** Saint-N has joined ##java
[14:17:36] <Saint-N> good morning
[14:17:54] *** Akima has left ##java
[14:18:08] <ptoth> dreamreal what progress
[14:18:20] <dreamreal> You could write double[] multComplex(double r1, double i1, double r2, double i2) { return new double[] { r1*r2, i1*i2 };} or...
[14:18:32] <Saint-N> ive been playing with decompiling apks and i've noticed that dex2jar tnds to create "duplicate files" like test and test$1 im wondering why, and if theres someway to merge them properly
[14:18:54] <elzoog> dreamreal: How would changing the constructor for real to this.re = re; this.im = 0.0; violate object orientation or encapsulation?
[14:19:02] <dreamreal> public class Complex { double r, double i; Complex multiple(Complex m) { return new Complex(d*m.getReal(), i*m.getImaginary()); } }
[14:19:02] *** squi has quit IRC
[14:19:16] <Saint-N> or f anyone has a good link to explain how i could get back to a single .java that contains a workable combination of both
[14:19:22] <dreamreal> Saint-N: time to learn java!
[14:20:02] <Saint-N> dream: yeah ive been learning its tructure as a sorta dive in check for rocks later, figured i'd come ask you guys and see if you have any info i could read up more about for the specific problem
[14:20:32] <dreamreal> look up inner classes. A given java file can contain many classes (although only one public top-level class).
[14:20:34] <Planck_> On my system, using this(re, 0.0) took between 12.6 and 14.8 seconds for a billion object creations (and destructions - I don't hav *that* much memory).
[14:20:58] <new2net> bow chicka wowow :D 1 line of code took 30 minutes lol
[14:21:11] <Saint-N> can the inner class be named the same as the top-level
[14:21:29] <new2net> inner class can't be named the outer class ~.~
[14:22:02] <Saint-N> and secondary side question (since that answer has give me google stuff to look up.. if a variable is defined as say this.something what reference is that? the class it's in or the top class?
[14:22:06] *** teralaser has quit IRC
[14:22:37] *** teralaser has joined ##java
[14:22:45] <dreamreal> Saint-N: "this" has a constant meaning.
[14:23:42] <new2net> Saint-N, are you still talking about inner classes? or about "this" in general?
[14:23:47] <elzoog> Planck: So the time saved with this.re = re; this.im = 0.0; is not significant compared to this(re, 0.0)?
[14:25:16] *** Planck_ has quit IRC
[14:26:09] *** chevelle has joined ##java
[14:27:29] *** zuxqoj has quit IRC
[14:27:33] <Saint-N> new2: well inner classes was the original question the "this" question is more a relative question, like does it refer to the inner class it's in or the top level class
[14:27:41] <CBro2007> are there good examples or sample code that show the usage of Pattern and Matcher/
[14:27:43] <CBro2007> ?
[14:28:27] <Saint-N> ill go read some on inner classes though, thanks dream
[14:28:44] <new2net> Saint-N, it can refer to the outer class from the inner class, it can refer to either based on context (shadowing). I'm not sure if the outer class can access the inner class variables directly.
[14:28:56] <ptoth> CBroo2007 google?
[14:31:02] <CBro2007> ptoth: did look around but cannot find any good sample code that does a pattern match and shows use of capturing groups... and then displaying those captured groups
[14:31:05] *** Behi has quit IRC
[14:31:25] <CBro2007> ptoth: lots of people still using some old regex libs
[14:31:50] <fr0ggler> CBro2007, use parenthesis in your regex and matcher.group(x);
[14:32:11] <fr0ggler> it's in the javadoc for Pattern and Matcher respectively
[14:32:16] <CBro2007> fr0ggler: would it be possible to give me a sample on pastebin?
[14:32:28] *** Cymage has quit IRC
[14:32:32] <CBro2007> yeah I seen it in the docs but there was no example of it's usage so wasn't sure
[14:32:46] *** frangiz has quit IRC
[14:32:48] <CBro2007> fr0ggler: I have seen people do .matches on a String object
[14:32:49] *** brundlefly has quit IRC
[14:32:56] <CBro2007> fr0ggler: is that the way to do it?
[14:33:42] *** sig^ has joined ##java
[14:34:00] *** frangiz has joined ##java
[14:34:16] <fr0ggler> CBro2007, that will test for the entire input against a pattern. read the API for Matcher.
[14:34:45] <sig^> which is more common: to have different libraries in their own jars, to have everything as class files inside on jar, to have libraries as jars along with class files inside a jar, some other way to use third-party libs with application code?
[14:34:48] *** Johannes13 has joined ##java
[14:34:49] *** asfdd has quit IRC
[14:34:52] <sig^> s/more/most/
[14:35:19] *** adaro has quit IRC
[14:36:09] <sig^> s/inside on /inside one /
[14:36:24] *** eyesUnclouded has joined ##java
[14:37:37] *** tallship has quit IRC
[14:39:18] *** devkhadka has quit IRC
[14:39:57] *** benoitdo has quit IRC
[14:39:58] *** elzoog has quit IRC
[14:39:58] *** supercosmonaut has joined ##java
[14:40:19] *** elzoog has joined ##java
[14:40:56] *** Cymage has joined ##java
[14:41:21] *** Fox` has joined ##java
[14:41:30] <Fox`> is it possible to take screenshots with java?
[14:41:49] *** squi has joined ##java
[14:42:25] *** CBro2007 has quit IRC
[14:42:38] <Busata> http://viralpatel.net/blogs/2009/01/how-to-take-screen-shots-in-java-taking-screenshots-java.html oh look, the first result in google
[14:43:14] <Fox`> i wasn't looking at how. just asking if it was possible
[14:43:28] <fr0ggler> surely the two are somewhat related.
[14:43:53] <Busata> still, if you can find how, you do know it is possible, eh?
[14:45:20] *** amlan81 has quit IRC
[14:45:28] <Fox`> argh but irc is so much faster than google
[14:45:50] <tjsnell> as long as you don't mind the ridicule
[14:45:51] <fr0ggler> really?
[14:45:58] *** Remolus has quit IRC
[14:46:03] <tjsnell> I'm not sure how that was faster either
[14:46:13] <Fox`> i usually leave before i get abuse
[14:46:16] <Busata> "but people do the work for me" was the honest response
[14:46:30] <fr0ggler> type question into google vs type question into IRC, wait for reply, gripe about reply.
[14:46:31] <tjsnell> ~google is it possible to take screenshots with java?
[14:46:32] <javabot> http://letmegooglethatforyou.com/?q=is+it+possible+to+take+screenshots+with+java%3F
[14:46:44] <tjsnell> and viola
[14:46:55] <Fox`> why can't i find any websites that let you take screenshots from the website then?
[14:47:11] <tjsnell> security
[14:47:38] <tjsnell> java applets don't have that access without permissions, they could get that permission
[14:47:49] <tjsnell> that's all a good thing
[14:48:03] <Fox`> ok
[14:48:11] <tjsnell> I'd rather not have to worry about a random web site taking screen shots of my screen
[14:48:30] <Fox`> didn't think about that. but it would be a useful took for poeple who can't work paint
[14:48:34] <Fox`> tool*
[14:48:39] <fr0ggler> say what?
[14:48:40] *** VJTachyon has joined ##java
[14:48:46] <dreamreal> heh
[14:48:58] <tjsnell> it's brain dead easy to take screenshots, even in windows
[14:48:58] *** Tyred has quit IRC
[14:49:03] <Busata> yea, I guess security is the least of their worries if they can't work with paint
[14:49:07] <fr0ggler> although yes I must admit, the PrtScn button is pretty tough to follow.
[14:49:15] <Fox`> yeh, but saving and uploading is a different story (for some people)
[14:49:44] <paulweb515> sig^: the first one ... having a set of jars and all of your app .class files in their own jar
[14:49:55] <Fox`> i just read about someone who took a photo of their screen isntead of print screening :P
[14:49:59] *** new2net is now known as N2N
[14:50:23] <sig^> paulweb515: howto import then? Just import packagename.*; doesnt seem to get the classes from packagename.jar
[14:50:34] <sig^> I get java.lang.NoClassDefFoundError
[14:50:42] <fr0ggler> ~~sig^ packages
[14:50:52] *** squi has quit IRC
[14:51:00] <sig^> ~~ packages
[14:51:05] <sig^> right.
[14:51:05] <cheeser> ~packages
[14:51:07] <cheeser> ~imports
[14:51:14] *** lugzer has left ##java
[14:51:15] <cheeser> hrm.
[14:51:16] <fr0ggler> wake up javabot.
[14:51:17] <sig^> flogging a dead bot are we
[14:51:31] *** jtheuer has quit IRC
[14:51:35] *** teralaser_ has joined ##java
[14:51:42] <fr0ggler> sig^, basically, the filename of the jar bears no resemblance to the classes that may be inside.
[14:51:52] <sig^> IRCbot idea: there should be a (reliable?) bot that would invoke the other bots upon "wake up <X>"
[14:51:52] *** grug has quit IRC
[14:51:57] <fr0ggler> foo.jar might have bar.* inside.
[14:52:04] <sig^> mm, oki
[14:52:12] <dreamreal> sig^: uhhhh
[14:52:18] <sig^> so there's a command line option for enumerating them?
[14:52:25] *** javabot has quit IRC
[14:52:40] <fr0ggler> the classes inside a package? no.
[14:52:49] <sig^> the jars
[14:52:50] *** javabot has joined ##java
[14:52:50] <cheeser> i think it's the users list stuff that's broken atm
[14:53:03] <fr0ggler> a jar is just a zip file. unzip it and poke around if necessary
[14:53:18] <cheeser> ~packages
[14:53:19] <javabot> Please see http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/java/package/packages.html or http://en.wikipedia.org/wiki/Java_package if you prefer
[14:53:22] <cheeser> ~imports
[14:53:22] <javabot> cheeser, import is http://download.oracle.com/javase/tutorial/java/package/usepkgs.html
[14:53:24] <cheeser> there
[14:53:25] <cheeser> 8^)=
[14:53:30] <sig^> kthx
[14:53:32] <fr0ggler> sig^, however you should have a fairly good idea which jars are on your classpath and what you need to import from them
[14:54:19] <sig^> that's no issue
[14:54:34] <sig^> just that it's nice if they're separated and all.
[14:54:58] *** brundlefly has joined ##java
[14:55:00] *** teralaser has quit IRC
[14:56:59] *** gtrak has joined ##java
[14:58:41] *** Planck_ has joined ##java
[14:59:26] *** brundlefly has quit IRC
[15:01:15] *** freeone3000 has quit IRC
[15:04:10] *** arborist has joined ##java
[15:04:14] *** frangiz has quit IRC
[15:04:49] *** glcrazy has quit IRC
[15:05:16] *** frangiz has joined ##java
[15:05:44] *** squi has joined ##java
[15:06:24] *** tilerendering has joined ##java
[15:07:34] *** tjololo has joined ##java
[15:12:56] *** Fisiu has joined ##java
[15:16:50] *** N2N has quit IRC
[15:17:49] *** tapan_chugh has joined ##java
[15:18:06] *** squi has quit IRC
[15:18:10] *** Alvo has joined ##java
[15:18:33] *** brundlefly has joined ##java
[15:19:17] *** jdolan has joined ##java
[15:19:19] <DroidAgent> Anyone in here familiar with Jackson? I'm trying to figure out how I can rename a field, i.e., get {"field": "value"} in String my_fieldname instead of String field.
[15:19:47] <tapan_chugh> guys i need some help. I am using swing to create a form which consists of and editable JTextPane in a JScrollPane. Whenever i type more than the length of the textPane and then move the mouse suddenly the form crashes.
[15:19:47] *** eidolon has joined ##java
[15:20:20] *** bn` has joined ##java
[15:20:27] <DroidAgent> I tried @JsonProperty("my_fieldname") String field; but it shows the original fieldname.
[15:20:41] *** e_ has joined ##java
[15:20:50] *** saml has joined ##java
[15:21:10] *** Archon has quit IRC
[15:21:30] *** brig has quit IRC
[15:21:53] *** Behi has joined ##java
[15:22:42] *** tapan_chugh has left ##java
[15:23:05] *** ptoth has quit IRC
[15:24:59] *** Quantum_Ion has joined ##java
[15:25:10] *** squi has joined ##java
[15:27:09] *** rtdos has joined ##java
[15:29:37] *** squi has quit IRC
[15:31:07] *** CBro2007 has joined ##java
[15:32:02] *** kinks has quit IRC
[15:32:40] *** xeer has joined ##java
[15:32:54] *** jjido has joined ##java
[15:32:57] *** jtheuer has joined ##java
[15:33:11] *** squi has joined ##java
[15:34:10] *** Vorrin has joined ##java
[15:34:33] <xeer> From looking at properties.dtd, it shows the properties node being the root and it only allowing entry nodes within. Is there any sort of subcategorizing I can do?
[15:35:41] *** Myth17 has joined ##java
[15:36:56] *** sebersole has joined ##java
[15:37:44] *** squi has quit IRC
[15:39:42] *** `moebius` has joined ##java
[15:40:16] *** PigFlu has quit IRC
[15:41:05] <CBro2007> i got a regular expression like --> "^\<\{(.+)\}.+\>$";
[15:41:10] <CBro2007> I am getting an error
[15:41:25] <CBro2007> I am wondering how I can ESCAPE the { and } characters?
[15:41:31] <CBro2007> can I not say \ in front?
[15:42:09] <saml> "\\{
[15:42:16] <saml> you need two \\
[15:42:39] <CBro2007> ah ok
[15:42:40] <CBro2007> thanks
[15:42:41] *** jesmon has joined ##java
[15:44:12] <mapreduce> Pattern.quote("{")
[15:46:24] *** brundlefly has quit IRC
[15:46:38] <Quantum_Ion> In Java everything is a class file
[15:46:46] <CBro2007> crap didn't catch it
[15:47:02] <CBro2007> <{10,20,30},40,0.345,10.0>
[15:47:06] <CBro2007> thats the line
[15:47:16] <fr0ggler> Quantum_Ion, what about resources? I use files in Java that aren't class files.
[15:47:19] <CBro2007> I am trying to get the first "10,20,30" out as a group
[15:47:20] <saml> Quantum_Ion, no there's xml and properties
[15:47:24] *** squi has joined ##java
[15:47:25] <CBro2007> "^\\<\\{(.+)\\}.+\\>$";
[15:47:33] <CBro2007> that was my regexp
[15:47:42] <CBro2007> wondering how to get this right
[15:47:58] <Quantum_Ion> fr0ggler, saml valid points
[15:48:00] <mapreduce> Why do you need to escape <?
[15:48:04] <CBro2007> I later on will have to extend it so that it matches the rest of the comma separated stuff
[15:48:12] <CBro2007> mapreduce: I thought it might be predefined
[15:48:13] <CBro2007> ?
[15:48:20] <fr0ggler> CBro2007, read the documentation
[15:48:25] <CBro2007> if not I can take it off... don't think it will matter
[15:48:32] <mapreduce> CBro2007: Stop guessing.
[15:48:36] <saml> "^<\\{([^}>])+\\},[^>]+>$"
[15:48:39] <fr0ggler> java's regex reserved characters are duly listed in said documentation
[15:49:11] <dmlloyd> saml has it. Avoid . unless you really mean to match anything.
[15:49:21] <saml> yah
[15:49:28] <dmlloyd> In particular don't use it when you mean "match anything except }"
[15:49:29] <saml> i would use \d and stuff
[15:49:34] <fr0ggler> aye
[15:49:46] <mapreduce> The format looks like you might need a proper parser for some other examples.
[15:49:52] <CBro2007> saml: that didn't work either
[15:49:54] <saml> yah right
[15:50:00] <mapreduce> E.g., if <{{3, 4}, 5}> is valid.
[15:50:05] <saml> you need parser combinator
[15:50:11] <saml> then you need context free parser
[15:50:21] <mapreduce> I've got a brand new parser combinator, and I'll give you the key.
[15:50:27] <fr0ggler> mapreduce, hah!
[15:51:13] <saml> CBro2007, are you doing a homework? what is this about?
[15:51:14] <CBro2007> well I would have ideally liked to split this string on "," but I cannot do it because of that stupid "{...}" in the start
[15:51:27] <saml> if it is a homework, or work assignment from your company, can you provide us spec?
[15:51:46] <saml> what are you trying to do (parse) ?
[15:51:48] <CBro2007> saml: nah its a project ... I am trying to plonk some output of a query into a JS array
[15:51:56] *** pirx has joined ##java
[15:51:57] <CBro2007> nah the file has a fixed format
[15:52:04] <saml> so what's the format?
[15:52:16] *** jjido has quit IRC
[15:52:17] *** xeer has quit IRC
[15:52:41] *** oyvinmar has joined ##java
[15:52:57] <CBro2007> saml: http://paste.lisp.org/display/120164#1
[15:52:57] *** squi has quit IRC
[15:53:02] <CBro2007> saml: thats the file
[15:53:06] <saml> is it always <{num, num, num}, num, num, num> ? where num is any representation of floating point (scientific, decimal) ?
[15:53:20] <saml> and are there whiet spaces..etc?
[15:53:23] <dmlloyd> nom nom nom
[15:53:31] <CBro2007> the numbers in the first {..} can be any number of such numbers all comma separated
[15:53:42] <CBro2007> no whitespaces
[15:53:57] <fr0ggler> ~dmlloyd++
[15:53:57] <javabot> dmlloyd has a karma level of 246, fr0ggler
[15:54:01] *** multi_io has quit IRC
[15:54:21] <saml> so 2.2250738585072012e-308 is valid number?
[15:54:36] <CBro2007> nope
[15:54:51] <CBro2007> will have a max precision of say 8 digits
[15:54:59] <saml> why not split on "," ?
[15:55:18] <saml> or replaceAll
[15:55:31] <CBro2007> saml: then would I not get {10, 20, 30}, .... etc
[15:56:02] <CBro2007> yeah maybe I can do a replaceAll first and then get rid of the {} and <>
[15:56:09] <CBro2007> saml: is that what you are suggesting?
[15:56:14] <pirx> hello! does anyone know of a good (command line) tool to list jmx beans (and get their values)?
[15:56:52] <CBro2007> saml: is that what you were getting at?
[15:57:03] <saml> s.replaceAll("[^\\d.]+", " ").split(" ")
[15:57:17] <chevelle> morning
[15:57:27] <saml> then you'll get Array of 6 numbers.. and you'll know what to do..
[15:57:36] <CBro2007> ah I see
[15:57:41] <CBro2007> and can this array be dynamic?
[15:57:47] *** adamisme has quit IRC
[15:57:55] <CBro2007> as in depending on the numbers it will automatically know how to resize etc?
[15:58:00] <saml> no it's statically typed String[]
[15:58:10] *** cbeust has joined ##java
[15:58:20] <CBro2007> ah ok
[15:58:27] <saml> is String[3] different type from String[4] ?
[15:58:32] *** squi has joined ##java
[15:58:39] <CBro2007> nah I get what you mean
[15:59:47] <mapreduce> saml: String[3] is not a type.
[16:00:03] <saml> oh no!!1 why not dependent type
[16:00:17] <mapreduce> Because then javac could not be written in Java.
[16:01:03] *** sbalmos has joined ##java
[16:01:35] <CBro2007> saml: isn't replaceAll returning a String?
[16:01:50] <CBro2007> or does it return an array of String? I didn't get that bit
[16:01:57] *** Busata has quit IRC
[16:02:02] <saml> oh i see. yah this is pretty hard
[16:02:07] <CBro2007> the documentation for replaceAll seems to suggest it will just return a single string
[16:02:16] <saml> no way
[16:02:26] <saml> then you can compose replaceAll with split
[16:02:30] <CBro2007> maybe I am looking at the older ones
[16:02:52] <CBro2007> ah actually I should check split ... sorry
[16:03:04] <saml> yah split might not be actual method
[16:03:24] <CBro2007> saml: sorry I don't get that :(
[16:03:32] *** frangiz has quit IRC
[16:03:33] <CBro2007> why is it not an actual method?
[16:03:36] <saml> http://download.oracle.com/javase/6/docs/api/java/lang/String.html#split%28java.lang.String%29
[16:03:42] <saml> it is actual method
[16:03:47] <saml> it takes regex
[16:04:15] <CBro2007> ok
[16:04:44] *** Matuku has joined ##java
[16:04:58] *** Fox` has quit IRC
[16:05:38] <mapreduce> Clearly all the brainy folks have disappeared to StackOverflow or somewhere.
[16:05:59] *** frangiz has joined ##java
[16:06:18] <sbalmos> mapreduce: That's a stretch
[16:06:20] *** meiskam has quit IRC
[16:07:01] <saml> mapreduce, u r still here
[16:07:07] <saml> u so brainy
[16:07:14] *** irenicus09 has joined ##java
[16:07:17] *** sysiphus has joined ##java
[16:07:27] *** sysiphus has left ##java
[16:08:01] *** gtrak is now known as Guest77433
[16:08:17] <CBro2007> saml: hmm that split idea you gave me doesn't work then huh?
[16:08:31] <CBro2007> saml: I tried --> strArray = strLine.replaceAll("[^\\d.]+", " ").split(" ");
[16:08:45] <CBro2007> saml: is the format wrong?
[16:08:49] <saml> CBro2007, these were examples.. you should come up with your own shit
[16:08:55] *** garytr25 has joined ##java
[16:08:58] <CBro2007> ok fine
[16:09:17] *** Guest77433 has quit IRC
[16:09:29] *** Saint-N has left ##java
[16:10:41] *** VJTachyon has quit IRC
[16:11:02] *** kunji has joined ##java
[16:12:03] *** Soliah has quit IRC
[16:12:21] *** monk12 has joined ##java
[16:12:27] * dreamreal downloads the internet (i.e., "mvn package")
[16:12:43] *** meiskam has joined ##java
[16:12:46] *** Quantum_Ion has quit IRC
[16:13:01] <irenicus09> Hi, im learning swing atm...can anyone suggest whether handcoding or using netbeans GUI creator is better for development in the long run?
[16:13:11] *** Matuku has quit IRC
[16:13:23] <RLa> hand coding
[16:13:54] *** tonique has left ##java
[16:14:02] <RLa> expecially for larger projects where you develop some common set of components
[16:14:14] <realtime_> I use the GUI. I know I should not, but it's SO much easier and quicker
[16:14:16] <kunji> I'm not strictly sure if this is a java issue or not, but I'm having trouble installing MCRInstaller.bin on Ubuntu 10.10, details here: http://matlab.pastebin.com/1aPEqT6z
[16:14:47] *** arex\ has joined ##java
[16:14:51] *** gucko has joined ##java
[16:15:12] <irenicus09> realtime_: I couldnt agree more, it gives u rapid development at the cost of maintanibility.
[16:15:16] <fr0ggler> ~~kunji tech support
[16:15:17] <javabot> kunji, 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.
[16:15:37] *** progme has joined ##java
[16:15:45] <arex\> Does it make sense to use StringBuilder in a toString method when I want to return a string based on a list?
[16:15:59] <RLa> yes
[16:16:14] *** VJTachyon has joined ##java
[16:16:14] <RLa> or maybe you can use list's own toString
[16:16:54] <Vorrin> would anyone happen to know, how to set the size of items contained in a JComboBox? (ie. I'd like the height of each item, normal text, to be 35px )
[16:16:57] *** tigger0jk has quit IRC
[16:16:59] *** jjido has joined ##java
[16:17:09] *** dr_summer has joined ##java
[16:18:10] <arex\> RLa: thanks :)
[16:21:32] *** squi has quit IRC
[16:21:36] *** jjido has quit IRC
[16:21:38] *** rgr has joined ##java
[16:22:05] *** riotz has quit IRC
[16:22:09] <kunji> fro0ggler: Sorry about that, I'm sure you know that tech support is usually less than helpful unless you're paying them big money though, and not to talk back to the bot but it isn't exactly an issue of figuring out how to use it, do you know any channels that do deal with this sort of thing?
[16:22:43] *** Kamaran has quit IRC
[16:24:02] *** RLa has quit IRC
[16:25:25] <fr0ggler> kunji, you could try #ubuntu?
[16:25:34] <fr0ggler> or contact the software devs
[16:25:40] *** Kamaran has joined ##java
[16:27:17] <kunji> fr0ggler: Already there, thanks though. Are the Matlab devs actually publicly accessible? I should check that. Thanks.
[16:27:30] *** terranova has quit IRC
[16:27:48] <dreamreal> it looks interesting, though, mathworks has a lot of cool stuff
[16:27:57] *** tissue has quit IRC
[16:28:17] <CBro2007> does anyone here use Myeclipse?
[16:28:24] *** squi has joined ##java
[16:28:26] <fr0ggler> kunji, no idea I'm afraid. we have a few bods around that use matlab, but I've never touched it myself.
[16:28:41] <Bombe> CBro2007: Who cares?
[16:28:48] *** jjido has joined ##java
[16:29:00] <dreamreal> ~poll
[16:29:00] <javabot> Chances are someone has, so why not just ask your question and save some time? If someone knows and wants/has time to help, perhaps he/she will.
[16:29:03] <CBro2007> Bombe: me
[16:29:06] <CBro2007> :)
[16:29:20] *** chevelle has quit IRC
[16:29:38] <CBro2007> well I am wondering if there is a very light weight database that I can combine with my web project that can store about 20K values
[16:29:39] <Bombe> CBro2007: So, if somebody answers "yes" you are satisfied?
[16:29:52] <dreamreal> CBro2007: and what does this have to do with myeclipse at all?
[16:29:55] <CBro2007> I wonder if MyEclipse comes with one
[16:30:16] <dreamreal> probably not, as that's not germane to myeclipse itself
[16:30:22] <dreamreal> plus: WTF?!
[16:30:23] <CBro2007> MyEclipse comes shipped with Tomcat and Derby ... so wondered if its got something light weight for a DB
[16:30:41] <Bombe> If you already have Tomcat you don't have to care about "light-weight" anymore.
[16:31:02] <CBro2007> yeah I need a light weight DB that will integrate well with Eclipse
[16:31:10] <CBro2007> and would be simple to query
[16:31:21] <dreamreal> but you said it was a web project
[16:31:23] <CBro2007> and don't have to dick around too much trying to get the drivers right etc
[16:31:41] <CBro2007> dreamreal: does that mean I cannot have a DB then?
[16:31:43] <dreamreal> besides, derby is lightweight for most definitions of such
[16:31:49] <dreamreal> CBro2007: no, it means you're asking stupid questions
[16:32:00] *** forneus has joined ##java
[16:32:12] <paulweb515> yeah, if you've got derby, try it out
[16:32:15] <dreamreal> "I have a car. Does my coat fit?"
[16:32:21] <CBro2007> dreamreal: ok relax
[16:32:32] *** X-Scale has joined ##java
[16:32:49] <Bombe> CBro2007: DON'T TELL DREAMREAL TO RELAX!!1
[16:32:59] * dreamreal eyes Bombe
[16:33:05] <Bombe> Oh oh.
[16:33:08] <Bombe> Here we go.
[16:33:22] <dreamreal> I do not quite understand what you're on about.
[16:33:25] *** magn3ts has quit IRC
[16:33:37] *** jjido has quit IRC
[16:34:59] *** devkhadka has joined ##java
[16:35:29] <elzoog> I recently downloaded this open source class for Polynomial http://pastebin.com/x67dpufD
[16:35:33] *** squi has quit IRC
[16:36:28] <elzoog> I was wondering if it's worth it for me to fix the following things 1) Make Polynomial invariant. 2) Get rid of the transient variables on line 95 and make them local to the root finding routines.
[16:37:49] *** squi has joined ##java
[16:38:05] *** VooDooNOFX has quit IRC
[16:38:19] *** TzilTzal has quit IRC
[16:38:19] *** Saint-N has joined ##java
[16:39:13] *** `moebius` has quit IRC
[16:40:04] *** jjido has joined ##java
[16:40:24] *** poccha has joined ##java
[16:40:29] *** oyvinmar has quit IRC
[16:41:01] <mapreduce> elzoog: 2) They're used to return values, so making them local wouldn't work.
[16:41:01] <Saint-N> public static final Parcelable.Creator<WimaxInfo> CREATOR = new WimaxInfo(); <-- this gives an incompatible types error.. in a totally general and nebulous way, how come?
[16:41:11] <mapreduce> elzoog: 1) What do you mean by invariant there?
[16:41:28] <Saint-N> the little amrker arrow is on the "new" portion of that
[16:41:36] <mapreduce> Saint-N: Because WimaxInfo is not a Parcelable.Create<WimaxInfo>().
[16:41:39] *** neuro_sys has joined ##java
[16:41:40] <mapreduce> s/\(\)//
[16:41:56] <Bombe> mapreduce: It could be.
[16:42:07] <mapreduce> Bombe: Then that message wouldn't appear.
[16:42:09] <mapreduce> So it's not.
[16:42:21] <Saint-N> public class WimaxInfo implements Parcelable
[16:42:23] <Bombe> mapreduce: Or maybe something completely nebulous happens!
[16:42:26] <Saint-N> thats what class it is
[16:42:39] <mapreduce> Saint-N: Parcelable is not Parcelable.Creator<WimaxInfo>
[16:42:41] <Saint-N> and post neededs are imported
[16:42:43] <mapreduce> Bombe: I'm sure it does.
[16:42:47] <Saint-N> ahh
[16:42:50] <Saint-N> duh thanks
[16:42:52] <Bombe> mapreduce: Again, it could be! :)
[16:42:59] *** squi has quit IRC
[16:43:41] <elzoog> mapreduce by invariant I mean making the coefficient array final.
[16:44:02] *** asfdd has joined ##java
[16:44:49] <mapreduce> elzoog: That would be a good idea, but bear in mind that the variable might be final but the array is still mutable.
[16:45:10] <mapreduce> Java's not very good at immutable, at least unless you use Guava or Functional Java or similar.
[16:45:14] <mapreduce> (libraries)
[16:45:49] *** squi has joined ##java
[16:45:53] *** bduncan has joined ##java
[16:46:26] <asfdd> I am trying to rotate a bufferd image around its center, but i the result is an image that is much smaller than the what it should be, the final image is the size i sepcified but its painted in only approximatly the last 2/3rds height and the first 3/4ths width
[16:46:27] <asfdd> http://tubasoft.pastebin.com/TBiiQHij
[16:46:35] *** poccha has quit IRC
[16:46:49] <wlfshmn> ~guava++
[16:46:49] <javabot> guava has a karma level of 2, wlfshmn
[16:47:11] <wlfshmn> hmm, guess I'm in the minority
[16:47:31] <dreamreal> nah, guava's great. All 542.54e of my personalities agree.
[16:47:39] *** Speed` has joined ##java
[16:47:42] <arex\> Is it possible to populate a LinkedList in the constructor?
[16:47:48] <asfdd> it actually just looks like it is painted in the wrong place
[16:47:58] <arex\> new LinkedList(c1, c2, c3) or something
[16:48:06] <dreamreal> arex\: see the api
[16:48:14] <elzoog> mapreduce: I also notice that a few of his algorithms are a little inefficient (I haven't looked at the algorithms in Polynomial, but they are probably okay)
[16:48:48] <elzoog> mapreduce: For example, he converts a binary representation of a number by adding the powers of 2.
[16:49:21] <elzoog> So that 101101 would be 2^5 + 2^3 + 2^2 + 1
[16:50:44] *** eitch0000 has quit IRC
[16:51:05] <mapreduce> It's O(n) where n is the number of binary digits.
[16:51:09] <mapreduce> Can you beat O(n)?
[16:51:26] <elzoog> It would be more efficient if he were to use synthetic division.
[16:51:51] <mapreduce> How much more efficient?
[16:52:49] <elzoog> Because 2^5 + 2^3 + 2^2 + 1 give you 14 operations ((2*2*2*2*2) + (2*2*2) + (2*2) + 1) Synthetic division gives you 9 operations
[16:53:22] <mapreduce> 2^5 wouldn't normally work out as 4 multiplications.
[16:53:24] *** cschneid has quit IRC
[16:53:50] *** cschneid has joined ##java
[16:53:53] <mapreduce> In Java you'd generally write that as 1<<5, which is one instruction.
[16:53:54] <realtime_> isn't it one operation?
[16:53:57] <realtime_> 2 SHL 5
[16:54:07] <mapreduce> 2 SHL 4, you mean.
[16:54:13] <mapreduce> Or 1 SHL 5
[16:54:36] <elzoog> Synthetic division, in STRICT left to right order (ignoring the fact that * has a higher priority than +) gives you 1*2*2+1*2+1*2*2+1
[16:55:19] <mapreduce> elzoog: How many seconds difference do you get between the two algorithms for an input size large enough to take a minute?
[16:56:16] *** cschneid has quit IRC
[16:56:17] *** squi has quit IRC
[16:56:25] *** cschneid has joined ##java
[16:57:11] <elzoog> mapreduce: Don't know. I don't think an algorithm that has less steps would take MORE time though.
[16:58:25] *** hrad has joined ##java
[16:59:03] *** Luc1fel has quit IRC
[16:59:26] <hrad> is it possible for the bidField to be a string ? onkeyup="javascript:onlyNumbers( '<%= renderResponse.getNamespace() + bidField %>' );"
[16:59:28] <elzoog> I will have to look at his code again. He writes his own pow2 function for taking 2^n power where n is an integer. I think he uses a straight for loop. If he uses >> instead then there probably wouldn't be any improvement
[16:59:30] *** cythrawll has joined ##java
[16:59:46] <hrad> it is already in " ' ' " quotes
[17:00:20] *** jjido has quit IRC
[17:00:32] <fr0ggler> hrad, yes. just as an aside, scriptlets in JSPs are considered nasty.
[17:01:56] *** DerHorst has joined ##java
[17:02:31] <elzoog> mapreduce: If I make the array coef in Polynomial final, then how can something outside of the class change, let's say coef[0]?
[17:03:06] <hrad> I don't think so, I don't like JSP in general, but scriptlets are printing output, they doesn't add any logic that shouldn't be in view layer
[17:03:56] <fr0ggler> hrad, use JSTL for printing output
[17:04:25] *** jquerier has joined ##java
[17:04:42] *** cbrock has joined ##java
[17:04:48] *** elzoog has quit IRC
[17:04:59] <hrad> it's portlet environment, gotta use this
[17:05:23] *** mastroWork has joined ##java
[17:05:24] <hrad> because of the portal
[17:06:23] *** dextro_ has joined ##java
[17:07:05] <dextro_> Logger log = Logger.getLogger("BlockLogLite"); log.setUseParentHandlers(false); FileHandler fh = new FileHandler("error.log", true); fh.setFormatter(new SimpleFormatter()); log.addHandler(fh);
[17:07:10] <dextro_> easier way to log to file?
[17:07:16] *** elzoog has joined ##java
[17:07:42] <elzoog> mapreduce: I got booted off. Did you see my question?
[17:08:23] <Candle> dextro_: Have a look at the documentatino for log4j or the logging framework that you are using.
[17:09:42] <Candle> dextro_: You should be able to do "private static final Logger LOG = LoggerFactory.getLogger(<<the class here>>.class);"
[17:09:43] *** sha1sum has joined ##java
[17:09:48] <sha1sum> How do I do "not this literal string" in a regex?
[17:09:51] <sha1sum> I basically want area code... e.g. (^[1-9]{1}[0-9]{2}$) but not "800" or "900"
[17:12:06] *** geoaxis has quit IRC
[17:12:41] *** squi has joined ##java
[17:13:47] <dmlloyd> it's ugly, sha1sum
[17:14:03] <sha1sum> hmmm
[17:14:17] <sha1sum> well I'll be doing the same thing with prefix excluding "555"
[17:14:18] <sha1sum> hah
[17:14:46] <dmlloyd> you're probably best off matching all \d\d\d and dealing with bad ones after the fact
[17:15:04] <dmlloyd> you can do trailing context but it makes the pattern very complex and complex is abd
[17:15:07] <dmlloyd> bad*
[17:15:15] <sha1sum> ok
[17:15:56] *** irenicus09 has quit IRC
[17:15:56] *** Myth17 has quit IRC
[17:16:04] <sha1sum> so (^[1-9]{1}[0-9]{2}[1-9]{1}[0-9]{6}$) look okay for a phone number then?
[17:16:27] <sha1sum> (USA)
[17:16:52] <dextro_> that wont math my #
[17:17:27] <sha1sum> really?
[17:17:29] * sha1sum tests
[17:17:44] <sha1sum> you have a US phone number?
[17:18:10] *** PigFlu has joined ##java
[17:19:05] *** rgr has quit IRC
[17:19:08] *** BoF has joined ##java
[17:19:21] <Bombe> Also, 555 1212 is a valid phone number for most area codes in the US.
[17:19:56] *** keepguessing has quit IRC
[17:20:03] <sha1sum> yeah but this is for new account setup for contracts only within the united states
[17:20:14] <sha1sum> and a valid *home* phone must be used
[17:20:55] *** cbeust has quit IRC
[17:25:08] *** squi has quit IRC
[17:27:06] *** Ch30ps has quit IRC
[17:27:51] *** jeremylemaire has quit IRC
[17:29:13] *** pipeep has quit IRC
[17:29:17] *** bearded_oneder has joined ##java
[17:29:56] *** Myth17 has joined ##java
[17:30:05] <hrad> fr0ggler, I'd use onkeyup="javascript:onlyNumbers('<portlet:namespace />bidField' );" but it not interpreted inside single quoted statement inside double quoted string
[17:30:38] *** teralaser_ has quit IRC
[17:30:49] *** squi has joined ##java
[17:31:14] *** jeremylemaire has joined ##java
[17:31:16] <hrad> it is being interpreted only like this '<portlet:namespace />' or "<portlet:namespace />"
[17:31:33] <bearded_oneder> just re-read this. still hilarious. if you work in a corporate dev setting, you'll probably enjoy it. http://fourstones.net/the-corporate-runs
[17:32:31] *** matsebc has quit IRC
[17:32:45] *** _Jorde has quit IRC
[17:34:09] <hrad> does anybody know how to interpret a jsp tag <portlet:namespace /> that is inside a String ?
[17:34:57] *** zemanel has joined ##java
[17:35:17] *** mazzachre has quit IRC
[17:35:18] *** roadt has joined ##java
[17:35:57] <fr0ggler> hrad, it should just work. http://onjava.com/pub/a/onjava/2006/02/01/what-is-a-portlet-2.html?page=5
[17:36:01] <mapreduce> elzoog: Code outside the class can't change the array if the array is private and there's no methods you expose that change the array.
[17:36:07] <fr0ggler> hrad, see point 4
[17:36:25] <mapreduce> Private encourages monoliths.
[17:36:40] *** km has joined ##java
[17:37:04] *** squi has quit IRC
[17:37:13] *** squi has joined ##java
[17:37:33] *** jjido has joined ##java
[17:37:41] <hrad> fr0ggler, the spec must have changed then
[17:38:03] <hrad> this throws Unexpected token <
[17:38:45] *** mastroWork has quit IRC
[17:38:48] <fr0ggler> hrad, whats the full code for that snippet?
[17:38:54] *** Zta has quit IRC
[17:39:49] *** brundlefly has joined ##java
[17:39:55] <ries> Anybody knows a good example on how to create your own EL function and create a separate jar out of that? I was thinking it was a simple jar file, but I keep getting in my project that wants to use it : The absolute uri: http://www.example.com/jstl/functions cannot be resolved in either web.xml
[17:40:18] *** supercosmonaut has quit IRC
[17:41:03] <hrad> fr0ggler, http://pastebin.com/G6b1faJ0
[17:41:46] <hrad> I see
[17:42:23] <hrad> it does work in html elements, but not if it is within another jsp tag <aui:input atr ....
[17:42:25] *** `moebius` has joined ##java
[17:42:36] *** AirGuitarist has joined ##java
[17:42:45] <fr0ggler> hrad, yeah, I would imagine so
[17:42:46] <hrad> interesting...it is most of the time within jsp tags
[17:42:51] <hrad> omg
[17:43:10] *** squi has quit IRC
[17:43:47] *** mastroWork has joined ##java
[17:44:25] <hrad> fr0ggler, I was wondering why they use both types of printing out the portlet namespace
[17:44:59] <hrad> never found the pattern until know
[17:45:15] *** brundlefly has quit IRC
[17:45:27] *** squi has joined ##java
[17:46:02] *** jjido has quit IRC
[17:48:27] *** `moebius` has quit IRC
[17:49:07] *** `moebius` has joined ##java
[17:49:18] *** pen has joined ##java
[17:49:24] *** garytr25 is now known as gtrak
[17:50:07] *** squi has quit IRC
[17:50:09] *** monk12 has quit IRC
[17:52:07] *** fuzzygroove has joined ##java
[17:52:16] *** fuzzygroove has left ##java
[17:52:55] *** supercosmonaut has joined ##java
[17:53:27] *** cbrock has quit IRC
[17:53:35] *** Fisiu has quit IRC
[17:55:10] *** `moebius` has quit IRC
[17:55:37] *** `moebius` has joined ##java
[17:57:35] *** placydo has joined ##java
[17:57:38] *** [TechGuy] has joined ##java
[17:57:42] *** pen has quit IRC
[17:57:42] *** dextro_ has quit IRC
[17:58:06] *** pen has joined ##java
[17:58:06] *** pen has quit IRC
[17:58:14] *** Wagoo has quit IRC
[17:58:23] *** dtrott has joined ##java
[17:58:30] *** pen has joined ##java
[17:58:30] *** pen has quit IRC
[17:58:41] *** BoF has quit IRC
[17:58:45] *** mah01 has quit IRC
[17:58:54] *** pen has joined ##java
[17:58:55] *** BoF has joined ##java
[18:00:02] *** mastroWork has quit IRC
[18:00:13] *** Gilos has joined ##java
[18:00:16] *** matsebc has joined ##java
[18:00:45] *** sbalmos has quit IRC
[18:00:45] *** [TechGuy] is now known as sbalmos
[18:01:07] *** zatan has joined ##java
[18:01:14] *** r0bby has joined ##java
[18:01:31] <Gilos> would this be an appropriate place to ask about running multiple versions of jre for different apps on a terminal server?
[18:01:36] *** `moebius` has quit IRC
[18:02:20] *** mitch0 has quit IRC
[18:02:20] *** klaas has quit IRC
[18:02:20] *** oorza has quit IRC
[18:02:20] *** DJClean has quit IRC
[18:03:09] *** DJClean has joined ##java
[18:03:21] *** wh1t3 has quit IRC
[18:03:34] *** krnl_ has quit IRC
[18:03:51] *** Wagoo has joined ##java
[18:03:54] *** poccha has joined ##java
[18:03:56] *** platzhirsch has joined ##java
[18:03:56] *** platzhirsch has left ##java
[18:04:22] *** VJTachyon has quit IRC
[18:04:22] *** homie has quit IRC
[18:04:22] *** robbyoconnor has quit IRC
[18:05:48] *** Myth17 has quit IRC
[18:06:07] *** diminish_ has joined ##java
[18:06:19] *** rchern has quit IRC
[18:06:25] *** rchern has joined ##java
[18:07:11] *** diminish has quit IRC
[18:09:28] *** phix has quit IRC
[18:10:46] *** phix has joined ##java
[18:11:29] *** dtrott has quit IRC
[18:11:38] *** supercosmonaut has quit IRC
[18:11:40] *** brig has joined ##java
[18:12:26] <dreamreal> you know something I love? I love when a project uses Jenkins/Hudson/whatever, and while the CI reports a clean build, when *I* pull down the repository, it won't build properly at all.
[18:13:16] <ernimril> dreamreal: since you have had that many times it must be your system that is at fault ;-)
[18:13:26] *** `moebius` has joined ##java
[18:14:22] *** Sagiftw has joined ##java
[18:14:24] <Sagiftw> hi
[18:14:37] <Sagiftw> how can i get rid of the application object?
[18:14:41] <dreamreal> ernimril: I didn't say it happened "many times." It's only happened with one project, except $employer's; $work has a specific situation that causes it, so while I don't like it, it's excusable.
[18:15:18] *** werdan7 has quit IRC
[18:15:22] *** rretzbach has joined ##java
[18:15:33] *** Olathe has quit IRC
[18:15:34] <ernimril> Sagiftw: you can not...
[18:16:01] <ernimril> Sagiftw: you can make objects eligable for gc by dropping all the references, then the jvm may remove the objects when it runs gc the next time
[18:16:03] <Sagiftw> ernimril: if i close eclipse it works
[18:16:21] <Sagiftw> ok
[18:16:28] <ernimril> Sagiftw: (in practice this means that your objects are removed quite soon after you drop the references)
[18:16:31] * dreamreal blinks
[18:16:45] *** cbrock has joined ##java
[18:16:52] *** Sagiftw has left ##java
[18:16:55] <ernimril> Sagiftw: if you have a memory leak you want to find a memory profiler and find out what is holding onto your objects
[18:17:01] <ernimril> hmmm
[18:17:02] *** zChris has joined ##java
[18:17:34] *** Olathe has joined ##java
[18:17:41] *** DerHorst has quit IRC
[18:19:23] *** zChris has left ##java
[18:19:45] *** zChris has joined ##java
[18:19:48] *** squi has joined ##java
[18:21:05] *** jtheuer has quit IRC
[18:21:37] *** brundlefly has joined ##java
[18:22:08] *** zChris has quit IRC
[18:22:25] *** Olathe has quit IRC
[18:23:36] *** Bombstone has joined ##java
[18:24:16] *** terranova has joined ##java
[18:24:22] *** horte_ has joined ##java
[18:25:11] *** zChris has joined ##java
[18:25:21] *** horte has quit IRC
[18:25:21] *** horte_ is now known as horte
[18:25:36] *** JumperDump has joined ##java
[18:25:39] *** Bombstone has quit IRC
[18:25:48] *** squi has quit IRC
[18:26:21] *** horte has quit IRC
[18:27:38] *** ronghail_ has joined ##java
[18:28:08] *** Luc1fel has joined ##java
[18:28:45] *** KermitTheFragger has joined ##java
[18:28:51] *** squi has joined ##java
[18:28:56] *** ronghail has quit IRC
[18:28:56] *** kinabalu has quit IRC
[18:28:56] *** dmb has quit IRC
[18:28:56] *** lolsuper_ has quit IRC
[18:28:56] *** wyvern has quit IRC
[18:29:10] *** dmb has joined ##java
[18:29:57] *** brundlefly has quit IRC
[18:30:29] *** Slush- has quit IRC
[18:32:03] *** titankiller has joined ##java
[18:32:21] *** cbeust has joined ##java
[18:32:26] <titankiller> how do i test if two vectors are equal using junit ?
[18:32:35] <dreamreal> assertEquals()
[18:32:46] <dreamreal> (but what does "equal" mean to you?)
[18:33:49] *** squi has quit IRC
[18:34:43] <titankiller> equal in sense contains same value
[18:34:46] <titankiller> values
[18:35:01] <dreamreal> well, what does Vector.equals(Object) say?
[18:35:55] *** `moebius` has quit IRC
[18:37:05] <titankiller> so then how do i assert if they're the same ?
[18:37:48] *** Cymage_ has joined ##java
[18:38:05] <titankiller> o k i get it assertsame ?
[18:38:08] *** CBro2007 has quit IRC
[18:38:08] *** Cymage has quit IRC
[18:38:23] *** Phil-Work has quit IRC
[18:38:45] *** placydo has quit IRC
[18:39:40] *** Cymage_ is now known as Cymage
[18:41:33] *** JStoker_ has joined ##java
[18:41:36] *** nmx has quit IRC
[18:41:36] *** JStoker has quit IRC
[18:41:39] *** JStoker_ is now known as JStoker
[18:41:45] *** RobotCow has quit IRC
[18:43:14] *** Phil-Work has joined ##java
[18:45:50] *** Phil-Work has quit IRC
[18:46:50] *** r0bby has quit IRC
[18:47:04] *** sbalmos has quit IRC
[18:48:15] *** rchern has quit IRC
[18:48:16] *** brig has quit IRC
[18:48:17] *** Xeli has quit IRC
[18:48:17] <titankiller> it doesn't work , the assertEqquals method
[18:48:17] <titankiller> any ideas dreamreal ?
[18:48:17] *** BoF has quit IRC
[18:48:18] *** Alvo has quit IRC
[18:48:19] *** Pozejdon has quit IRC
[18:48:19] *** X-Scale has quit IRC
[18:49:13] *** glcrazy has joined ##java
[18:50:03] *** freeone3000 has joined ##java
[18:50:25] *** glcrazy has quit IRC
[18:50:32] *** roadt has quit IRC
[18:50:32] *** bearded_oneder has quit IRC
[18:50:33] *** Kamaran has quit IRC
[18:50:33] *** jquerier has quit IRC
[18:50:33] *** Fanook has quit IRC
[18:50:33] *** tjololo has quit IRC
[18:50:33] *** Clete2 has quit IRC
[18:50:33] *** wchun has quit IRC
[18:50:33] *** ormaaj has quit IRC
[18:50:33] *** xianny has quit IRC
[18:50:33] *** oso[OuT] has quit IRC
[18:50:33] *** tesuki has quit IRC
[18:50:54] *** squi has joined ##java
[18:51:25] *** wolfman2000 has quit IRC
[18:51:58] *** roadt has joined ##java
[18:51:58] *** bearded_oneder has joined ##java
[18:51:58] *** jquerier has joined ##java
[18:51:58] *** tjololo has joined ##java
[18:51:58] *** Fanook has joined ##java
[18:51:58] *** Clete2 has joined ##java
[18:51:58] *** wchun has joined ##java
[18:51:58] *** ormaaj has joined ##java
[18:51:58] *** xianny has joined ##java
[18:51:58] *** tesuki has joined ##java
[18:51:58] *** oso[OuT] has joined ##java
[18:51:59] *** Sliker has joined ##java
[18:52:51] *** xec has joined ##java
[18:53:06] *** jor has joined ##java
[18:53:23] *** Peej has quit IRC
[18:53:57] *** new2net has joined ##java
[18:54:15] *** jonkri has quit IRC
[18:54:29] *** psst has joined ##java
[18:54:46] *** lilalinux_mbp has joined ##java
[18:55:16] *** tewecske has quit IRC
[18:55:16] *** lilalinux has quit IRC
[18:55:17] *** neuro_sys has quit IRC
[18:55:17] *** lilalinux_mbp is now known as lilalinux
[18:55:29] *** pen has quit IRC
[18:55:33] *** neuro_sys has joined ##java
[18:55:35] *** klaas has joined ##java
[18:55:36] *** sproingie has joined ##java
[18:55:58] <dreamreal> ~doesn't work
[18:55:58] <javabot> dreamreal, 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)
[18:56:08] *** squi has quit IRC
[18:56:30] *** Fanook has quit IRC
[18:56:31] *** supercosmonaut has joined ##java
[18:56:53] *** harry_ has quit IRC
[18:57:02] *** tewecske has joined ##java
[18:57:14] *** sbalmos has joined ##java
[18:57:15] <saml> your comment doesn't work
[18:57:16] *** KermitTheFragger has quit IRC
[18:57:46] <sproingie> your mom doesn't work
[18:57:50] <sproingie> wait what does that even mean
[18:57:50] <fr0ggler> oof
[18:57:57] <sbalmos> ~mom
[18:57:57] <javabot> sbalmos, what does that even *mean*?
[18:58:25] <dreamreal> that's what she said!
[18:58:32] *** roadt has quit IRC
[18:58:32] *** bearded_oneder has quit IRC
[18:58:32] *** jquerier has quit IRC
[18:58:33] *** tjololo has quit IRC
[18:58:33] *** Clete2 has quit IRC
[18:58:33] *** wchun has quit IRC
[18:58:33] *** ormaaj has quit IRC
[18:58:33] *** xianny has quit IRC
[18:58:33] *** oso[OuT] has quit IRC
[18:58:33] *** tesuki has quit IRC
[18:59:48] *** ormaaj has joined ##java
[19:00:15] *** fr0ggler has quit IRC
[19:00:51] *** pgib has joined ##java
[19:01:35] <pgib> Anyone know a good way to integrate HTML validation into a Java test? That is, test if a string represents a valid HTML document (or XHTML for that matter).
[19:01:36] *** xianny has joined ##java
[19:01:45] *** LouisJB has quit IRC
[19:01:53] <pgib> I thought I could do it with Jericho, but it is so tolerant of malformed input that it is not a good solution
[19:02:24] <freeone3000> To test for valid XHTML, parse it with an XML parser.
[19:02:30] *** SpaceDoG has joined ##java
[19:02:38] <freeone3000> As for HTML, well, if it parses, it's good enough, right?
[19:02:49] *** [TechGuy] has joined ##java
[19:02:49] <dreamreal> i wonder if there's an SGML parser good enough to validate HTML for real
[19:03:02] <freeone3000> W3C has one as a webservice.
[19:04:34] *** sveajobb has quit IRC
[19:05:04] *** sbalmos has quit IRC
[19:05:05] *** [TechGuy] is now known as sbalmos
[19:05:27] *** pen has joined ##java
[19:05:27] *** pen has quit IRC
[19:05:52] *** pen has joined ##java
[19:05:52] *** pen has quit IRC
[19:06:19] *** pen has joined ##java
[19:07:51] *** harry_ has joined ##java
[19:07:53] *** bradford- has joined ##java
[19:08:00] *** cschneid has quit IRC
[19:08:00] *** bradford has quit IRC
[19:08:05] *** psst has quit IRC
[19:08:05] *** progme has quit IRC
[19:08:06] *** Versuchen has quit IRC
[19:08:06] *** Saint-N has quit IRC
[19:08:17] *** cschneid has joined ##java
[19:08:27] *** jeremylemaire has quit IRC
[19:08:27] *** cythrawll has quit IRC
[19:08:27] *** drindt has quit IRC
[19:08:47] *** Versuchen has joined ##java
[19:08:48] *** eyesUnclouded has quit IRC
[19:08:52] *** progme has joined ##java
[19:08:55] *** jeremylemaire has joined ##java
[19:09:15] *** drindt has joined ##java
[19:09:39] *** cythrawll has joined ##java
[19:11:48] *** freeone3000 has quit IRC
[19:11:48] *** squeakytoy has quit IRC
[19:13:43] *** AirGuitarist has quit IRC
[19:15:01] *** poccha has quit IRC
[19:15:28] *** Gilos has quit IRC
[19:15:28] *** zek152 has quit IRC
[19:15:32] *** dr_summer has left ##java
[19:16:48] *** moqq has quit IRC
[19:17:05] *** wyvern` has joined ##java
[19:17:06] *** JumperDump has quit IRC
[19:17:06] *** diminish_ is now known as diminish
[19:17:08] *** sebrock has joined ##java
[19:17:26] *** freeone3000 has joined ##java
[19:17:48] *** Luc1fel has quit IRC
[19:18:48] *** tjololo has joined ##java
[19:19:28] *** new2net has quit IRC
[19:19:53] *** Pozejdon has joined ##java
[19:20:14] *** bduncan has quit IRC
[19:20:32] *** Cymage has quit IRC
[19:20:55] *** r0bby_ has joined ##java
[19:21:31] *** rretzbach has quit IRC
[19:21:32] *** Cymage has joined ##java
[19:21:44] *** dogmeat has joined ##java
[19:22:34] <dogmeat> looking for a strategy to check that a process started by one thread is ready. typically it opens a port, so i could try and check the port is open in the second thread, but is there a better way?
[19:23:06] *** netsurf3 has quit IRC
[19:23:33] *** SpaceDoG has quit IRC
[19:23:34] *** meiskam has quit IRC
[19:23:34] *** pirx has quit IRC
[19:23:36] *** sig^ has quit IRC
[19:23:36] *** l3dx has quit IRC
[19:23:36] *** Phil has quit IRC
[19:23:36] *** sako has quit IRC
[19:23:36] *** dropdrive has quit IRC
[19:23:39] *** KarlThePagan has joined ##java
[19:23:46] *** sako has joined ##java
[19:23:52] *** gcristian has quit IRC
[19:23:54] *** netsurf3 has joined ##java
[19:23:57] *** nmx has joined ##java
[19:24:01] *** Cobi has quit IRC
[19:24:09] *** elzoog has quit IRC
[19:24:09] *** Part` has quit IRC
[19:24:09] *** lundvall has quit IRC
[19:24:16] *** meiskam has joined ##java
[19:24:16] *** gcristian has joined ##java
[19:24:27] *** pirx has joined ##java
[19:24:44] *** Optic has quit IRC
[19:25:21] *** dropdrive has joined ##java
[19:25:34] <saml> dogmeat, have the process try to connect to a server?
[19:25:43] <saml> and pass a message that "i'm ready"
[19:25:48] *** KarlKFI|work has joined ##java
[19:26:42] *** lamdk has joined ##java
[19:27:30] <dogmeat> if the process tries to connect and the port is not open, some kind of failure and reattempt logic would be required
[19:28:09] *** notcyth has joined ##java
[19:28:39] *** SpaceDoG has joined ##java
[19:28:47] *** dwilliamii has joined ##java
[19:29:34] *** Optic has joined ##java
[19:29:42] *** l2trace99 has joined ##java
[19:29:42] *** barq has quit IRC
[19:29:43] *** McMAGIC-- has quit IRC
[19:29:43] *** tajen has quit IRC
[19:29:43] *** cythrawll has quit IRC
[19:29:43] *** jeremylemaire has quit IRC
[19:29:43] *** zatan has quit IRC
[19:29:43] *** rhonabwy has quit IRC
[19:29:43] *** karstensrage has quit IRC
[19:29:43] *** progme has quit IRC
[19:29:43] *** eidolon has quit IRC
[19:29:43] *** javabot has quit IRC
[19:29:43] *** Versuchen has quit IRC
[19:29:51] *** xec has quit IRC
[19:29:56] <pgib> freeone3000, yeah, I was hoping to avoid hitting an external service. I guess the XML would be fine then
[19:30:01] *** notcyth is now known as cythrawll
[19:30:05] *** kunji has quit IRC
[19:30:36] <cheeser> ~ping
[19:30:39] *** Versuchen has joined ##java
[19:30:59] *** Saint-N has joined ##java
[19:31:09] *** kunji has joined ##java
[19:31:16] *** msmorul_work has joined ##java
[19:31:30] *** zatan has joined ##java
[19:31:37] *** Fisiu has joined ##java
[19:31:46] *** Cobi has joined ##java
[19:31:46] *** rhonabwy has joined ##java
[19:31:58] *** javabot has joined ##java
[19:33:11] *** karstensrage has joined ##java
[19:33:38] *** fahadsadah has quit IRC
[19:33:38] *** nmx has quit IRC
[19:33:38] *** LtHummus has quit IRC
[19:33:38] *** tolland has quit IRC
[19:33:38] *** C00re has quit IRC
[19:33:47] *** LtHummus has joined ##java
[19:34:02] *** C00re has joined ##java
[19:34:04] *** _Maru_ has quit IRC
[19:34:04] *** LadySerena has quit IRC
[19:34:15] *** dblevins has joined ##java
[19:34:18] <dogmeat> cheeser, ping?
[19:34:39] *** disappearedng has quit IRC
[19:34:46] *** tolland has joined ##java
[19:35:18] *** squi has joined ##java
[19:35:52] *** VJTachyon has joined ##java
[19:35:53] <sbalmos> ~ping
[19:35:54] <javabot> http://www.nataliedee.com/071405/ping.jpg
[19:35:58] <sbalmos> There we go
[19:36:03] *** _Maru_ has joined ##java
[19:36:17] <wyvern`> mm that's such a good image
[19:36:26] <pgib> stunningly rendered
[19:36:55] <sbalmos> I demand it be converted to resolution independent SVG!
[19:37:54] *** titankiller has quit IRC
[19:37:57] <pgib> it looks better enlarged with firefox's crappy rescaling algorithm IMHO.
[19:38:30] *** nmx has joined ##java
[19:38:32] *** forneus_ has joined ##java
[19:40:18] *** sproingie has quit IRC
[19:40:38] *** forneus has quit IRC
[19:41:18] *** wchun has joined ##java
[19:42:03] *** TheSchoolinator has joined ##java
[19:43:21] *** squi has quit IRC
[19:43:59] *** fahadsadah_ has joined ##java
[19:44:01] <cheeser> dogmeat: pong?
[19:44:41] <dogmeat> i thought you might be saying something in reference to my question
[19:47:32] *** Vorrin has quit IRC
[19:47:32] *** GFXDude has quit IRC
[19:47:32] *** Echidna has quit IRC
[19:48:30] <pgib> dogmeat: ping
[19:48:56] *** bradford- has quit IRC
[19:48:56] *** Johannes13 has quit IRC
[19:49:15] *** tomvolek has joined ##java
[19:49:18] *** Fisiu has quit IRC
[19:49:18] *** _W_ has quit IRC
[19:49:25] *** gcristian has quit IRC
[19:49:48] *** JStoker has quit IRC
[19:49:48] *** sha1sum has quit IRC
[19:49:48] *** em has quit IRC
[19:50:08] *** sebrock has quit IRC
[19:50:16] *** CBro2007 has joined ##java
[19:50:18] *** forneus_ has quit IRC
[19:50:18] *** dogmeat has quit IRC
[19:50:18] *** devkhadka has quit IRC
[19:50:18] *** dangertools has quit IRC
[19:50:19] *** em has joined ##java
[19:50:33] *** freeone3000 has quit IRC
[19:50:51] *** wlfshmn has quit IRC
[19:50:51] *** neshaug has quit IRC
[19:50:54] <Saint-N> okay so i suck at java
[19:50:54] <Saint-N> i used the dex2jar thingy and exported my two .javas i've got 1 thats info and one thats info$1 which if i read right means that the $1 while named the same is a inner class
[19:50:54] <Saint-N> my problem is how the hell do i merge that into the non $1 file
[19:50:55] <Saint-N> or would one of you really good java people be able to merge it for me if i pastebin'd it with no real frame of reference or compile ability on your part?
[19:51:02] <CBro2007> hi guys I am trying to generate unique javascript variables in my JSP like "var flightPath<% k %> ="
[19:51:14] <CBro2007> but then its complaining when it reaches flightPath<% k %>.setMap(map);
[19:51:15] *** gcristian has joined ##java
[19:51:22] <CBro2007> has anyone done this sort of thing before?
[19:51:34] *** tangatools has joined ##java
[19:51:41] *** devkhadka has joined ##java
[19:52:12] *** squi has joined ##java
[19:52:13] *** bradford has joined ##java
[19:52:53] <saml> CBro2007, <%= k %>
[19:53:29] *** sebrock has joined ##java
[19:53:45] *** squi has quit IRC
[19:55:19] *** em has quit IRC
[19:55:21] *** dogmeat has joined ##java
[19:55:54] *** riotz has joined ##java
[19:56:12] *** arex\ has quit IRC
[19:56:12] *** nchaimov has quit IRC
[19:56:12] *** ztj has quit IRC
[19:56:20] *** em has joined ##java
[19:56:34] *** QshelTier has joined ##java
[19:56:38] *** Ero has quit IRC
[19:57:03] *** tomvolek has quit IRC
[19:57:04] *** CBro2007 has quit IRC
[19:57:04] *** robinsmidsrod has quit IRC
[19:57:04] *** Bombe has quit IRC
[19:57:10] *** BeholdMyGlory has joined ##java
[19:57:29] *** devkhadka has quit IRC
[19:57:30] *** EuroTrash has quit IRC
[19:57:30] *** Ivellina has quit IRC
[19:57:30] *** banana has quit IRC
[19:58:01] *** squi has joined ##java
[19:58:17] *** Phil-Work has joined ##java
[19:58:28] *** openpercept has joined ##java
[19:59:17] *** titankiller has joined ##java
[19:59:20] *** tilerendering has quit IRC
[19:59:56] *** matsebc has quit IRC
[20:00:22] *** robinsmidsrod has joined ##java
[20:01:10] *** Gracenotes has quit IRC
[20:01:47] *** eidolon has joined ##java
[20:02:00] *** Ivellina has joined ##java
[20:02:39] *** squi has quit IRC
[20:03:08] <Saint-N> there isnt a tool to convert baksmali to .java is there?
[20:03:51] *** RLa has joined ##java
[20:04:04] *** JStoker has joined ##java
[20:04:28] *** Kamaran has joined ##java
[20:05:56] *** werdan7 has joined ##java
[20:08:57] *** VooDooNOFX has joined ##java
[20:09:47] *** tomvolek has joined ##java
[20:10:39] *** Johannes13 has joined ##java
[20:10:55] *** devkhadka has joined ##java
[20:13:24] *** harry_ has quit IRC
[20:14:31] *** irn has joined ##java
[20:14:52] *** Phil-Work has quit IRC
[20:14:58] *** harry_ has joined ##java
[20:15:27] *** Phil-Work has joined ##java
[20:17:33] *** mastroDani has joined ##java
[20:18:13] *** oorza has joined ##java
[20:18:30] *** Gracenotes has joined ##java
[20:18:56] *** Naith has joined ##java
[20:19:58] *** Quantum_Ion has joined ##java
[20:20:02] *** squi has joined ##java
[20:21:21] *** monk13 has joined ##java
[20:25:24] *** squi has quit IRC
[20:25:41] *** bearded_oneder has joined ##java
[20:27:09] *** pyrony has joined ##java
[20:27:42] *** JumperDump has joined ##java
[20:29:56] *** rhonabwy has quit IRC
[20:30:29] *** Niamkik has joined ##java
[20:30:35] *** tilerendering has joined ##java
[20:30:43] *** squi has joined ##java
[20:31:05] *** barq has joined ##java
[20:33:22] *** rhonabwy has joined ##java
[20:33:40] *** jmgalloway has joined ##java
[20:34:29] <jmgalloway> I have a question about stringtokenizer..how do I return a specifc token in a string? Like..I want to return the third word in every line..?
[20:35:31] *** magn3ts has joined ##java
[20:35:50] *** barq has quit IRC
[20:36:06] *** rgr has joined ##java
[20:36:12] *** jmgalloway has quit IRC
[20:37:15] <h6w> jmgalloway: 1) Check to make sure you have enough tokens with countTokens() 2) Call nextToken() 3 timed and catch the third return value.
[20:37:24] <h6w> timed=times
[20:38:43] <h6w> This presumes you have already broken the entire text by line....
[20:39:45] *** Quantum_Ion has quit IRC
[20:39:53] *** srji has joined ##java
[20:40:18] *** horte has joined ##java
[20:40:24] *** openpercept has quit IRC
[20:41:09] *** squi has quit IRC
[20:41:27] *** barq has joined ##java
[20:42:01] *** horte has quit IRC
[20:42:44] *** bitshuffler_ has joined ##java
[20:43:31] *** titankiller has quit IRC
[20:44:28] *** Carnage\ has joined ##java
[20:46:46] *** h6w has quit IRC
[20:46:51] *** squi has joined ##java
[20:46:51] *** Nikelandjelo has joined ##java
[20:47:15] *** bitshuffler has quit IRC
[20:51:01] *** TheSchoolinator has quit IRC
[20:51:31] *** sproingie has joined ##java
[20:51:39] *** Nikelandjelo has quit IRC
[20:52:50] *** andrewfree has joined ##java
[20:53:28] <andrewfree> What is the default inheritance for a class?
[20:55:43] <cheeser> if you don't say "extends blah?"
[20:56:13] <andrewfree> yea
[20:56:21] <cheeser> Object
[20:56:45] <andrewfree> mmk thought so, thanks
[20:57:45] <cheeser> you can use reflection to test it
[20:58:06] *** kvarley has joined ##java
[20:58:26] *** JDuke128 has joined ##java
[20:58:44] <kvarley> Is it possible to highlight alternate lines in a JTextArea?
[20:58:51] <cheeser> yes
[20:58:52] *** squi has quit IRC
[20:59:15] <kvarley> cheeser: Thank you :)
[21:01:12] <kvarley> Is it possible to highlight a section of text in a JTextArea which starts with a set string up until a ( occurs?
[21:01:27] <cheeser> yes
[21:01:46] <kvarley> How would I do that?
[21:02:00] <cheeser> not sure offhand.
[21:02:04] *** sebrock has quit IRC
[21:03:19] *** QshelTier is now known as Bombe
[21:03:46] *** squi has joined ##java
[21:05:00] *** [twisti] has joined ##java
[21:06:21] <[twisti]> hey, im making an installer for my stuff and want to link people to the proper place to download JRE 1.6 if they dont have it yet. whats the proper url to link one to ?http://www.oracle.com/technetwork/java/javase/downloads/index.html has lots of options likely to confuse the average pc user, but if i click "Download JRE" the resulting link is a mess that makes me think it wont be there forever
[21:07:15] *** Nikelandjelo has joined ##java
[21:07:26] <[twisti]> is there no simple "get the latest release of java here" link ?
[21:07:40] *** compengi has joined ##java
[21:07:49] <kvarley> [twisti] Could you look at the source of the page and copy the code of the button and embed it on your page?
[21:07:53] *** hex` has joined ##java
[21:07:56] <[twisti]> kvarley: of course
[21:08:14] <[twisti]> but i could just click it and then copy it from the address bar
[21:08:40] <[twisti]> doesnt really address my problem though
[21:08:54] *** pgib has left ##java
[21:09:01] <[twisti]> it doesnt seem sensible to hardcode a link like this in an installer
[21:09:01] <[twisti]> https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jre-6u24-oth-JPR@CDS-CDS_Developer
[21:09:15] <[twisti]> that looks like itll break next week
[21:09:22] <cheeser> [twisti]: are you using izpack?
[21:09:23] *** bitshuffler__ has joined ##java
[21:09:29] <[twisti]> cheeser: NSIS
[21:09:33] <cheeser> ewww.
[21:09:34] <cheeser> 8^)=
[21:09:43] <[twisti]> im only like an hour into playing with it
[21:09:46] *** javobiwan has joined ##java
[21:09:52] <[twisti]> is izpack something you consider a better alternative ?
[21:09:54] <cheeser> izpack is really quite nice.
[21:09:57] <cheeser> yeah.
[21:10:07] <cheeser> i went with izpack over nsis a few years back
[21:10:31] <[twisti]> so how would switching to izpack solve this ?
[21:10:39] *** javobiwan has quit IRC
[21:10:53] *** bitshuffler_ has quit IRC
[21:11:31] <[twisti]> nm, it has that irritating java look
[21:11:55] <[twisti]> id like it to have the "normal" look
[21:12:57] *** Prot has joined ##java
[21:14:15] *** squi has quit IRC
[21:14:32] *** JumperDump has quit IRC
[21:17:00] <cheeser> set the L&F appropriately.
[21:17:27] <cheeser> last i checked, you could start an izpack installer via JWS
[21:17:56] *** kibibyte has joined ##java
[21:18:22] <Caleb--> int[] abc; and int abc[]; is the second usage discouraged in any way?
[21:18:28] <cheeser> yes
[21:18:31] <kvarley> How do I change the colour/background of text I am appending to a JTextArea?
[21:18:34] <Caleb--> cheeser, why?
[21:19:01] <cheeser> just not the preferred style
[21:19:18] <Caleb--> oh,
[21:19:26] <Caleb--> i thought something more serious than just style
[21:20:40] *** Charrit has joined ##java
[21:20:43] <Charrit> hi
[21:22:10] *** _W_ has joined ##java
[21:23:06] *** Bombstone has joined ##java
[21:23:07] *** Phil has joined ##java
[21:24:02] *** Glavata has joined ##java
[21:24:29] *** javobiwan has joined ##java
[21:25:40] *** kunji has left ##java
[21:25:55] <Charrit> How can I disable jTable row selection with one click? (in Netbeans)
[21:26:36] <Charrit> If I press the right mouse buttom it performs the edit operation, but I want to edit the cells with the left button
[21:31:31] <hrad> guys how jsp compiler interprets inner quotes ? onclick="addBid('<%= container_index + "string" %>');"
[21:31:37] <hrad> can't be done
[21:32:06] *** operhiem1 has joined ##java
[21:33:27] <hrad> simply I cannot concatenate string inside of the jsp expression
[21:34:55] <operhiem1> Does Java have an equivalent of C++'s virtual for variables? I'm extending a class and I'd like the methods in the superclass to prefer the subclass's version of the variable.
[21:35:58] <kercyr> operhiem1, use a getter.
[21:36:25] <operhiem1> kercyr: Okay, thanks.
[21:37:00] *** operhiem1 has left ##java
[21:37:07] *** Phil-Work has quit IRC
[21:37:47] *** Phil-Work has joined ##java
[21:37:58] *** Naith has quit IRC
[21:38:14] *** riotz has quit IRC
[21:40:01] *** switch has joined ##java
[21:40:30] *** pipeep has joined ##java
[21:43:48] *** operhiem1 has joined ##java
[21:45:10] *** bakarat has joined ##java
[21:45:29] *** akkad has joined ##java
[21:45:35] <bakarat> does anyone have an example of a jpa2 entity for h2?
[21:45:44] <akkad> is there a way to label threads so that in jconsole it's obvious which one is which?
[21:47:16] <sbalmos> ~~ akkad javadoc Thread.setName(*)
[21:47:18] <javabot> akkad: http://is.gd/2cOfGe [JDK: java.lang.Thread.setName(String)]
[21:48:16] *** Everclear72216 has joined ##java
[21:48:22] *** andrewfree has quit IRC
[21:48:34] <Everclear72216> hi
[21:48:46] <Everclear72216> i have a little question about internationalization
[21:49:19] <Everclear72216> my ResourceBundle object does not find the text files referenced by the base name
[21:49:30] <Everclear72216> where does it look for those files?
[21:49:44] <RLa> bakarat, why should it be different than entity for any other jdbc database?
[21:50:25] <bakarat> RLa, well it shouldn't really, but can't get this thing to work :P
[21:50:32] *** Bombstone has quit IRC
[21:53:04] *** RobotCow has joined ##java
[21:53:20] <Everclear72216> right now i have them in the same package folde
[21:55:41] <switch> ~pastebin
[21:55:41] <javabot> http://pastie.org - Paste the final url after you've pasted your stuff there.
[21:55:41] <kvarley> How can I set the colour of the text being appended to a JTextArea? I have tried .setForeground and it changes all of the text to that colour
[21:56:21] *** fuzzygroove has joined ##java
[21:56:49] *** fuzzygroove has left ##java
[21:59:22] *** odinsbane has joined ##java
[21:59:30] <Everclear72216> http://pastebin.com/KWMmRFu6
[21:59:46] *** boredomist has joined ##java
[22:00:30] <Everclear72216> The files ExceptionMessages.properties and ExceptionMessages_de_DE.properties are in the same directory as the file containing the pasted lines.
[22:00:31] *** murr4y has joined ##java
[22:00:31] *** andrewfree has joined ##java
[22:01:00] *** Saint-N has quit IRC
[22:02:17] <odinsbane> I've got an IDEA question, I don't know how to log in to SVN, I always have to update, then get an error message with an option to fix, where I can login.
[22:03:53] <odinsbane> er, the error message gives me an option to fix, when I click on fix I get a login window and everything is fine, I would just like to skip that first fail to login.
[22:04:17] <Everclear72216> What kind of svn client are you using. Is the repository administered by you?
[22:04:37] <mdunham918_> crabtree!
[22:05:13] <Everclear72216> let me rephrase the last question: are you the repository's adminstrator?
[22:05:15] *** armyriad has quit IRC
[22:05:45] <odinsbane> Everclear72216: I think I am using the SVN client that comes with the SVN plugin for Intellij IDEA.
[22:06:22] <odinsbane> Everclear72216: yes I setup the repo. This has little to do with svn, and more todo with IDEA.
[22:06:39] *** RobotCow has quit IRC
[22:07:04] *** terranova has quit IRC
[22:07:15] *** switch has quit IRC
[22:07:28] *** tazle has quit IRC
[22:10:03] *** cythrawll has quit IRC
[22:11:30] *** armyriad has joined ##java
[22:12:05] *** arex\ has joined ##java
[22:12:33] *** homie has joined ##java
[22:12:47] <hrad> is there any way to use jsp EL to get value of renderResponse.getNamespace(); ? because ${renderResponse.namespace} returns empty string
[22:12:58] <hrad> I mean is it only for POJOs ?
[22:13:37] *** cyphorious has joined ##java
[22:13:59] *** srji has quit IRC
[22:13:59] *** rgr has quit IRC
[22:15:01] <bakarat> hmm, any reason why a entityManager.persist() is not reflected in a database? (using hibernate) no errors are thrown and if i add a flush(), it throws an error "no transaction is in progress"
[22:16:13] *** kvarley has quit IRC
[22:16:15] <realtime_> bakarat: you have to do everything inside a transaction. and the changes will be really stored in the db when you commit that transaction, AFAIK
[22:16:44] <bakarat> realtime_, yes but apparantly there is no transaction open as the flush() throws that error?
[22:16:45] <RLa> or set connection to autocommit :)
[22:17:06] <RLa> bakarat, are you using spring?
[22:17:10] <bakarat> RLa, no
[22:17:22] <RLa> no ioc lib?
[22:17:46] <RLa> i'm not sure what should handle transactions then
[22:17:49] *** Rubarb has joined ##java
[22:18:31] <realtime_> bakarat: you have to explicitly open a transaction
[22:18:37] <bakarat> i would've thought by default it would be no transaction or auto-commit
[22:19:17] *** X-Scale has joined ##java
[22:20:51] <bakarat> ah hibernate debug logging shows: delaying identity-insert due to no transaction in progress
[22:26:08] *** freeone3000 has joined ##java
[22:26:30] <bakarat> it was indeed the transaction, works now
[22:26:38] <bakarat> realtime_, RLa thanks
[22:27:06] <arex\> http://pastie.org/1630180 java.util.ConcurrentModificationException problem - please help :D
[22:27:33] *** disappearedng_ has joined ##java
[22:27:38] *** rhonabwy has quit IRC
[22:27:56] <tjsnell> you can't iterate over a changing list
[22:28:18] <disappearedng_> anyone know why line 68 results in this error? http://paste.pocoo.org/show/347684/
[22:28:24] <RLa> arex\, itr = new ArrayList<Customer>(l).listIterator();
[22:28:34] <RLa> arex\, that's fastest fix
[22:28:56] *** irn has quit IRC
[22:29:15] <arex\> RLa: thanks, that's great - is there a slower way that might be considered better (practice)?
[22:29:20] <RLa> arex\, and when you remove, remove from te original list
[22:29:43] *** Cymage has quit IRC
[22:30:21] <disappearedng_> Can someone explain to me what is meant by "No enclosing instance of type sender is accessible. Must qualify the allocation with an enclosing instance of type sender (e.g. x.new A() where x is an instance of sender)."
[22:30:55] <RLa> arex\, i would not use iterators at all but for (Type e : list) loop
[22:31:09] *** Fallout2man has joined ##java
[22:31:34] *** tazle has joined ##java
[22:31:35] <RLa> disappearedng_, you create instance non-static inner class without instance of outer class
[22:31:38] <arex\> RLa: oh, that's interesting - what is the name of that construct (for google purposes)
[22:31:54] <RLa> enhanced for loop
[22:32:07] *** rhonabwy has joined ##java
[22:32:13] <disappearedng_> oh ok the error message was difficult to decrypt
[22:32:13] <Fallout2man> Is there a recommended way to deep copy a Map?
[22:32:14] *** tigger0jk has joined ##java
[22:32:15] <RLa> ~enhanced for
[22:32:15] <javabot> RLa, what does that even *mean*?
[22:32:15] *** Cymage has joined ##java
[22:32:36] *** andrewfree has left ##java
[22:32:39] <Fallout2man> I need to make sure all of the keys/values are duplicated during the copy, so modifications to the source or copy do not change the other.
[22:33:23] <arex\> RLa: what does it work with? all collections?
[22:33:29] <freeone3000> Fallout2man: You can serialize it and deserialize it.
[22:33:30] <RLa> Iterable
[22:33:35] <arex\> Thanks
[22:33:37] <RLa> arex\, and with arrays
[22:33:59] <Fallout2man> freeeone3000: Thanks! I'll give that approach a shot.
[22:34:54] *** karstensrage has quit IRC
[22:34:56] <akkad> undefined method `setName' for Java::JavaLang::Thread:Class (NoMethodError)
[22:35:15] *** Naith has joined ##java
[22:35:30] *** Niamkik has quit IRC
[22:35:57] <RLa> akkad, see javadoc for Thread
[22:36:27] <arex\> RLa: the enhanced for still uses an iterator in the background, so I still need to use the fast fix? (i still get the exception)
[22:36:28] <freeone3000> java.lang.Thread.class is a magical constant, not actually a member, and not a method.
[22:36:30] <RLa> hm, it actually has that method
[22:36:31] *** operhiem1 has left ##java
[22:36:52] <RLa> arex\, of course
[22:37:04] <RLa> arex\, or use copy-on-write collections
[22:37:57] *** tangatools is now known as dangertools
[22:40:05] <RLa> arex\, or collect together instances you want to delete and delete them in separate loop
[22:40:27] <arex\> yeah, i considered that
[22:40:34] <arex\> However I think I have done what you said, but I still get the exception, http://pastie.org/1630230
[22:40:38] <arex\> And I want to understand why :)
[22:41:42] <arex\> oh
[22:41:44] <arex\> im stupid
[22:42:08] <RLa> heh
[22:42:40] *** J11 has quit IRC
[22:42:54] <disappearedng_> http://paste.pocoo.org/show/347694/ Hey how come my code doesn't terminate even thought I have passed the last line "Sending EOT Packet"
[22:43:07] *** Johannes13_ has joined ##java
[22:43:10] <arex\> RLa: how do i both use an enhanced for loop and still make an iterator on a copy of the list? or did i misunderstand you?
[22:43:16] <RLa> arex\, use for (Customer c : new LinkedList<Customer>(l))
[22:43:36] <arex\> ah.
[22:43:44] <RLa> hm, weird, tho Iterator itself could be Iterable
[22:43:56] <ernimril> disappearedng_: get a full thread dump and find out
[22:44:46] <disappearedng_> I looked it up in eclipse and it shows Theard[Timer-3] (Running) for 5 threads as well as the Thread[DestroyJavaVM] (Running)
[22:44:48] <RLa> disappearedng_, Timer thread is daemonized and running?
[22:44:49] *** cythrawll has joined ##java
[22:44:55] *** sebersole has quit IRC
[22:45:17] *** realtime_ has quit IRC
[22:45:22] <RLa> maybe you can make it use non-daemon thread
[22:45:23] <ernimril> disappearedng_: you may want to cancel() the timers when you are done with them
[22:45:24] <disappearedng_> RLa: but all my timers are "cancelled"
[22:46:28] <RLa> looks like it doesn't care about that
[22:46:43] <RLa> maybe you need to .close() it
[22:46:47] <ernimril> disappearedng_: where in the paste do you cancel the timers?
[22:46:56] <disappearedng_> line 73
[22:47:00] *** Johannes13 has quit IRC
[22:47:04] <disappearedng_> I realized that line 73 is not even executed
[22:47:10] *** devkhadka has quit IRC
[22:47:12] <disappearedng_> I put a System.out.println("Cancelled"); in that if bloc
[22:47:15] <disappearedng_> not executed
[22:47:46] <ernimril> disappearedng_: using a static boolean and expecting updates to it to show up in other threads is also a bug....
[22:48:08] <RLa> ernimril, aren't static fields volatile?
[22:48:24] <RLa> so it could work
[22:48:41] *** c_axis has joined ##java
[22:48:48] <disappearedng_> Ok in Java how do I write code such that "I will start the timer on the last sent packet, in the mean time I will wait for acknowledgement packets to arrive, if the last sent packet is not acknowleged, I will want to resend everything"
[22:49:18] <ernimril> RLa: what makes you think that?
[22:49:38] <disappearedng_> should I even use Java.util.timer?
[22:49:42] <RLa> hm, no idea
[22:49:49] <RLa> that would be logical
[22:50:39] <ernimril> disappearedng_: is there a reason you are implementing TCP yourself instead of actually just using TCP?
[22:50:43] *** frangiz has quit IRC
[22:50:50] <disappearedng_> it's preparation for an interview
[22:50:51] *** eidolon has quit IRC
[22:51:18] <disappearedng_> well I need to know some java for this position
[22:51:45] <RLa> well, you could periodically wake up thread spinning on monitor
[22:52:14] <RLa> hm, or no need for monitor
[22:52:25] <RLa> just check for timeout or packet
[22:52:49] <arex\> Is the easiest way to do something X times a regular for loop? Nothing similar to Ruby's 10.times do {} ?
[22:53:08] *** Rubarb has quit IRC
[22:53:08] *** Rubarb_ has joined ##java
[22:53:20] <ernimril> arex\: for (int i = 0; i < 10; i++) { ... }
[22:53:20] *** plarsen has joined ##java
[22:53:25] <disappearedng_> RLa how would you structure the code for something like that
[22:53:44] *** wchun has quit IRC
[22:53:54] <RLa> disappearedng_, no idea, haven't done anything like that lately
[22:54:13] *** eyesUnclouded has joined ##java
[22:55:10] <RLa> disappearedng_, easiest way is probably take a thread make it sleep for timeout period, at packet arrival you interrupt the thread
[22:55:41] <disappearedng_> but if the packet arrive is not the desired packet then this will mess up the flow
[22:55:51] <disappearedng_> TCP has timer for the last sent packet rather than any acket
[22:56:02] <RLa> no, you check the packet
[22:56:30] <RLa> if it's not what you want, you will not interrupt sleeping thread
[22:56:45] <kercyr> you're writing the tcp layer in java?
[22:57:19] *** harry_ has quit IRC
[22:58:51] *** Rubarb_ has quit IRC
[23:00:51] *** Cpudan80 has joined ##java
[23:01:09] <Cpudan80> Hey
[23:01:15] *** km has quit IRC
[23:01:28] <Cpudan80> Is there a "Property Changed" type even for JEE entity bean?
[23:01:58] <Cpudan80> In C# theres a property changed thing that people can subscribe to -- Im not sure about JEE though, Im pretty new to it...
[23:02:03] *** kibibyte has quit IRC
[23:02:06] *** Johannes13_ has quit IRC
[23:02:22] *** martin8412 has joined ##java
[23:02:48] <saml> u mean event?
[23:02:57] <saml> maybe you need visitor pattern?
[23:03:02] *** mastroDani has quit IRC
[23:03:10] <cheeser> ~~ saml aolbonics
[23:03:10] <javabot> saml, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this kind of abbreviation is annoying and pointless. You have a full keyboard and presumably a full brain. Please use both. If you want intelligent answers, the least you can do is speak intelligently.
[23:04:11] *** matsebc has joined ##java
[23:05:13] *** Rayne has joined ##java
[23:05:28] <Cpudan80> saml: Visitor pattern ?
[23:05:40] *** PelleTut has joined ##java
[23:06:28] <saml> Cpudan80, like, in the setter, do something
[23:06:30] *** ghuru has joined ##java
[23:06:53] <saml> public void setLength(int i) { this.i = i; callback(); }
[23:06:58] <Cpudan80> saml: Well I mean I could do that --- but I was wondering if there was a better more "J2EE" style to do it
[23:07:06] <saml> oh i see
[23:07:11] <saml> i'm not j2ee specialist
[23:07:29] <saml> there could be something
[23:07:31] <sbalmos> Possibly an aspect cutpoint.
[23:08:10] <freeone3000> Cpudan80: Beans with registerable properties have a PropertyChangeListener, supplied through PropertyChangeSupport. Not all beans do this.
[23:08:35] *** ghuru has quit IRC
[23:08:38] <Cpudan80> It's an entity bean Im using...
[23:11:41] *** RLa has quit IRC
[23:11:59] *** alex88 has joined ##java
[23:13:19] <alex88> hi guys, i have to do a jpeg compression-decompression in blocks to use on large images using parallel jobs, anyone has an idea in where to start?
[23:13:33] *** sphenxes has quit IRC
[23:13:49] <freeone3000> ExecutorService and the JPEG standard.
[23:14:02] *** Kamaran has quit IRC
[23:15:30] <alex88> well for parallel jobs i've to use map reduce.. so i'm thinking to divide the image into block and emit a worker on each block
[23:15:56] *** Fisiu has joined ##java
[23:16:17] *** Fallout2man has quit IRC
[23:16:44] *** rtdos has quit IRC
[23:17:21] *** rjohnson19 has joined ##java
[23:17:40] <alex88> so i've to make by hand the image divide code and use jpeg compression on that block and then reassemble image
[23:18:13] *** Pozejdon has quit IRC
[23:18:35] *** TomyLobo has joined ##java
[23:18:39] <TomyLobo> hi
[23:18:47] <TomyLobo> is there something like http://adrinael.net/containerchoice for java?
[23:19:04] *** rhonabwy has quit IRC
[23:19:36] <freeone3000> TomyLobo: It's the same chart.
[23:20:02] <freeone3000> TomyLobo: Actually, no. Replace "vector" with "list". Then it's the proper chart. Standard data structures cross languages.
[23:20:03] <TomyLobo> except java has tons more
[23:20:13] *** rhonabwy has joined ##java
[23:20:19] <freeone3000> Java has lots of differing *implementations* of those data structures.
[23:20:27] <TomyLobo> ArrayList HashMap HashTable TreeMap
[23:20:43] <TomyLobo> very wrong
[23:20:46] <freeone3000> List. Map. Map. Map.
[23:21:38] <TomyLobo> a java Map, for instance, is an interface for various structures which have different run-time behaviour
[23:21:53] <freeone3000> Yes, and they all store data key=>value with unique keys.
[23:21:54] *** grh2g|zzz has joined ##java
[23:22:07] <saml> yah it's the best NoSQL web scale compatible
[23:22:22] <TomyLobo> freeone3000 but not all of them are sorted by key
[23:22:45] <freeone3000> TomyLobo: No. If that matters, you have a separate interface - SortedMap.
[23:23:03] <TomyLobo> see, i'd like a chart for all these
[23:23:09] *** bitshuffler__ has quit IRC
[23:23:11] <saml> make one
[23:23:13] <TomyLobo> and not just a class diagram
[23:24:14] <TomyLobo> a diagram based on choice, not inheritance
[23:24:26] <cheeser> that made no sense to me.
[23:24:26] *** Rayne has quit IRC
[23:24:35] *** gelignite has joined ##java
[23:25:04] <TomyLobo> the choice that makes sense for a certain use case
[23:25:08] <freeone3000> TomyLobo: Choose between a Set, List, and a Map. It should be obvious which one you need. From there, follow the inheiritance graph the way you want.
[23:25:13] <TomyLobo> they're not always clearly named either
[23:25:21] <TomyLobo> like Hashtable and HashSet
[23:25:40] <freeone3000> How is that not descriptive? One's a Hashtable. One's a HashSet. They sound like they do the exact same thing because they do.
[23:25:41] <cheeser> those serve two differnt purposes
[23:25:47] <TomyLobo> i know
[23:25:52] <cheeser> no, they don't.
[23:25:53] <TomyLobo> and the name doesnt hint to that
[23:26:04] *** grh2g|zzz has left ##java
[23:26:30] <freeone3000> Things like Vector and Hashtable aren't going to be changed now. New Collections are <ImplementationDetail><ImplementationDetail><ImplementationDetail><Interface>.
[23:26:46] <freeone3000> Like ConcurrentLinkedBlockingQueue, or CopyOnWriteArrayList.
[23:26:50] <cheeser> <blink>uh...</blink>
[23:26:59] *** matsebc has quit IRC
[23:27:03] <Charrit> editing a cell in a JTable the cursor doesn't appear, Why?
[23:27:14] *** mastroDani has joined ##java
[23:27:15] <freeone3000> Charrit: Because your TableCellEditor isn't displaying one.
[23:27:22] *** Luc1fel has joined ##java
[23:27:31] <Sou|cutter> god, I wish java actually broke backwards compatibility and removed some cruft
[23:27:32] <alex88> no one has experience in managing images in java?
[23:27:49] <freeone3000> alex88: ImageIO does it for you. This isn't suitable for your purposes, because it does an entire image at once.
[23:27:59] *** mastroDani has quit IRC
[23:28:08] <TomyLobo> Sou|cutter i wish they added operator overloading. sadly none of this is going to happen
[23:28:26] <cheeser> operator overloading--
[23:28:30] *** bakarat has quit IRC
[23:28:31] <Sou|cutter> TomyLobo: I'm ok without operator overloading
[23:28:35] <TomyLobo> and so we have to write things like return pos1.add(pos2).multiply(0.5);
[23:28:37] <Sou|cutter> but let's not get into that discussion!
[23:28:54] *** the_evil_gungur has joined ##java
[23:28:58] *** the_evil_gungur has left ##java
[23:29:43] *** meling has joined ##java
[23:29:49] *** meling has joined ##java
[23:30:01] <alex88> freeone3000: what if i use getRGB() to grab each 8x8 portion? problem is that i get an array, i don't have an idea on what to do then
[23:30:02] *** saml has quit IRC
[23:30:18] <Charrit> thanks freeone3000, I use the default cell editor used by Netbeans with "Individual Selection", in the cellEditor property it doesn't have any options. The only way to change this is coding my own cellEditor?
[23:31:00] <Sou|cutter> TomyLobo: I feel that aspect of java is far too baked-in to change at this point. If that's a big deal for your use case, I might suggest using another language (have to be pragmatic about these things)
[23:31:05] <alex88> freeone3000: oh, there is also getSubimage that returns a BufferedImage, probably there is a convertion function to that
[23:31:13] *** cbrock has quit IRC
[23:31:31] *** JohnnyDavidson has joined ##java
[23:31:46] <Sou|cutter> TomyLobo: and look at me continuing the conversation that I said should be shut down...
[23:31:49] * Sou|cutter slaps himself
[23:32:12] <freeone3000> Charrit: A JTable's TableCellEditor is an interface which delegates to a given JComponent. One can set up a TableCellEditor in about four lines of code, plus whatever it takes to customize the JComponent you want to use.
[23:32:21] *** Behold has joined ##java
[23:32:48] <freeone3000> alex88: 8x8? You're probably going to spend more time context-switching than encoding.
[23:33:13] *** prakas has joined ##java
[23:33:16] <Charrit> freeone3000, a lot of thanks i'll take this way
[23:33:25] <alex88> freeone3000: also on very large images? i'm trying to do this for parallel encoding on cluster
[23:33:36] <prakas> by the way is javax.sound.midi included in openjdk?
[23:33:45] <prakas> and swing
[23:34:22] *** adamisme has joined ##java
[23:34:27] *** Cymage has quit IRC
[23:34:49] *** BeholdMyGlory has quit IRC
[23:35:07] *** sbalmos has quit IRC
[23:36:03] *** scaryrawr has joined ##java
[23:36:17] *** drindt has quit IRC
[23:37:22] *** bindaas has quit IRC
[23:37:29] *** scaryrawr has left ##java
[23:38:06] *** prakas has left ##java
[23:38:29] *** freeone3000 has quit IRC
[23:39:34] <alex88> damn.. guys, is the JPEGImageEncoder included into the java sdk?
[23:41:30] *** jor has quit IRC
[23:42:14] <tjsnell> ~google JPEGImageEncoder
[23:42:14] <javabot> http://letmegooglethatforyou.com/?q=JPEGImageEncoder
[23:42:46] *** exobyte has joined ##java
[23:43:01] *** odinsbane has quit IRC
[23:44:01] <alex88> yeah funny, i' was already reading this http://www.javadocexamples.com/com/sun/image/codec/jpeg/com.sun.image.codec.jpeg.JPEGImageEncoder.html#encode:BufferedImage and it seems i can encode a single buffered image so the single block
[23:44:33] *** bindaas has joined ##java
[23:46:17] *** the_evil_gungur has joined ##java
[23:46:25] *** the_evil_gungur has left ##java
[23:46:27] *** the_evil_gungur has joined ##java
[23:46:29] *** the_evil_gungur has left ##java
[23:47:11] *** the_evil_gungur has joined ##java
[23:47:13] *** the_evil_gungur has left ##java
[23:51:45] *** alex88 has left ##java
[23:54:09] *** k_89 has joined ##java
[23:54:47] *** plarsen has quit IRC
[23:54:49] *** switch has joined ##java
[23:55:20] *** plarsen has joined ##java
[23:55:35] <push[RAX]> with toplink JPA, is there a way to automatically create indexes ?
[23:55:51] <k_89> a question.. why does java top the tiobe index... besides mobile s/w, where is it used
[23:56:43] *** ghuru has joined ##java
[23:57:25] *** MagmaRules has joined ##java
[23:57:32] *** Carnage\ has quit IRC
[23:58:41] <pr3d4t0r> k_89: Everywhere meaningful? :)
[23:58:52] <pr3d4t0r> k_89: Enterprises run on Jav.
[23:59:09] <pr3d4t0r> k_89: Er, Java.
[23:59:23] *** VJTachyon has quit IRC
[23:59:24] <pr3d4t0r> k_89: Every major e-commerce site that you can think of runs on Java.
[23:59:39] <pr3d4t0r> k_89: Every financial institution runs its mission-critical stuff on Java.
top

   March 3, 2011  
< | 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 | >