Switch to DuckDuckGo Search
   March 4, 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:00:11] <pr3d4t0r> Anyway, I leave the floor to others to continue. Have a good sleep, peeps.
[00:00:25] *** Nikelandjelo has quit IRC
[00:00:34] <bearded_oneder> k_89: web applications, e-commerce, distributed applications, desktop apps, embedded systems, appliances, set top boxes, mobile devices -- pretty much on anywhere hardware that can run a compatible JVM.
[00:00:51] <bearded_oneder> on any*
[00:02:00] <Cpudan80> Can a singleton JEE bean not implement PropertyChangeListener ?
[00:02:15] *** mr_daniel has joined ##java
[00:02:22] *** epalm has joined ##java
[00:02:25] <Cpudan80> it won't compiile if I'm implementing that interface ..
[00:03:29] *** echosystm has joined ##java
[00:03:51] <echosystm> what is the best way to clear a database between unit tests? i'm using liquibase for schema management if that affects anything
[00:05:04] *** ghuru has quit IRC
[00:05:18] <cbeust> echosystm: do it in a @BeforeMethod and load it up with batch inserts?
[00:05:18] <ianp> liqui.. what?
[00:05:52] *** Prot has quit IRC
[00:05:54] <ianp> cbeust: I think he wants a delete in @AfterMethod in this case
[00:06:15] <ianp> but that too
[00:07:37] <ianp> or try to write tests that dont need deletes
[00:07:40] *** pipeep has quit IRC
[00:07:43] <ianp> and use an in memory db
[00:08:05] *** fannagoganna has joined ##java
[00:08:27] <cbeust> I also read about people doing inserts in transactions but not committing it, and setting the isolation level so that they could actually run their tests on uncommitted data. Not sure how convenient or realistic that is.
[00:08:30] *** pipeep has joined ##java
[00:09:01] <fannagoganna> hello, i wonder if there is a streamable-type implementation of Graphics2D, or if anyone knows of a way to use Graphics2D without exhausting JVM (heavy drawing on the Graphics2D canvas)?
[00:11:22] *** freeone3000 has joined ##java
[00:12:14] *** Cpudan80 has quit IRC
[00:12:30] *** jdolan has quit IRC
[00:13:22] *** askhl has joined ##java
[00:16:09] *** Luc1fel has quit IRC
[00:17:50] *** matsebc has joined ##java
[00:18:23] *** bitshuffler has joined ##java
[00:18:40] *** tomvolek has quit IRC
[00:19:25] <MagmaRules> Guys anyone knows how i can use <jsp:include page="..." /> and access variables inside the included files?
[00:19:28] *** chomping has joined ##java
[00:22:08] <freeone3000> JSP may be PHP-like, but I don't think it's *that* retarded. Don't write your code in JSPs. Put it in your backing servlet, or your controller, or your beans, or even in a taglib.
[00:22:33] *** Speed` has quit IRC
[00:23:34] <k_89> O.K. so java used here and there.... what is its advantage? RoR, php etc can do scripting much quicker, C/C++ can do much better closer to machine jobs, what is java's usp, other than its virtual machine
[00:23:46] *** erkan^ has joined ##java
[00:23:48] <k_89> had been away from the pc for a while
[00:24:03] <freeone3000> k_89: Tools and libraries.
[00:24:18] *** arborist has quit IRC
[00:24:22] <exobyte> What's the fix for not being able to reflectivelty access publuc members of Map.Entry?
[00:24:42] <freeone3000> exobyte: Fixing your reflection code. You can always access public members.
[00:25:04] <Charrit> freeone3000, I set up a TableCellEditor to handle the cell edit with a JTextField but I have the same problem, the cursor doen't appear. Can you point me a example of what I should do?
[00:25:18] <exobyte> freeone3000: that's what I thought, but I was pretty sure there was a "bug" with that in 1.5
[00:25:25] *** ExtraSpice has quit IRC
[00:25:30] <k_89> freeone3000 : Other languages have it too, the thing is, i know core java pretty well and was thinking of getting scjp and scjd certs, are they worth the time i would spend prepping for them
[00:25:32] *** rretzbach has joined ##java
[00:25:58] <freeone3000> exobyte: Not that I know of. (Why are you using 1.5, anyway?)
[00:26:09] <freeone3000> k_89: Certs? I don't think so.
[00:26:29] <echosystm> cbeust: i meant more in terms of what is an easy way to run some script that clears the db?
[00:26:38] *** harry_ has joined ##java
[00:26:39] <k_89> freeone3000: I don't have a CS degree, have a physics one
[00:27:03] <k_89> Am a self taught java, php, c++ programmer
[00:27:07] <echosystm> ie. how can i have some .sql or liquibase changelog and then easily run that from inside my tests
[00:27:09] <k_89> use php to make bucks
[00:27:18] <freeone3000> k_89: I've found it matters less what credientials you have than the ability to show you can program. Having a decent project to show off wouldn't be terrible.
[00:27:18] <exobyte> freeone3000: broken code. It's pretty sad.
[00:27:39] <bearded_oneder> k_89: it's tools, libraries, and abstraction from the machine permit you to focus more on what the application does rather than platform and hardware idiosyncrasies.
[00:27:46] *** eyesUnclouded has quit IRC
[00:27:49] <freeone3000> exobyte: Uhm, you're aware that only the API has changed between 1.5 and 1.6, and that library changes are backwards compatible to the point of annoyance, yes?
[00:27:54] *** l2trace99 has quit IRC
[00:28:12] *** Matuku has joined ##java
[00:28:22] <echosystm> k_89: the thing about java is that that it is often the best tool for the job, particularly once you start doing "enterprise scale" work
[00:28:43] <fannagoganna> or instead, should i use something like Batik and stream the output? Example given here, http://xmlgraphics.apache.org/batik/using/svg-generator.html
[00:28:48] <exobyte> freeone3000: XSLT magically breaks between two 1.5 revisions. My guess is that it's that the code was broken to begin with
[00:28:54] <echosystm> if you're putting together small content managed websites about your pet cats, php or ruby will be far better
[00:28:59] <bearded_oneder> k_89: if you are a "self taught Java programmer" (beyond the basic tutorials), it's benefits should be obvious in comparison to what you've already used.
[00:29:07] *** tilerendering has quit IRC
[00:29:18] <exobyte> freeone3000: it's bad, I know
[00:29:21] <echosystm> but if you're doing big web services and so on, java is pretty much the only sane choice
[00:29:24] <erkan^> Hello. I have a problem with Java Chat: I cannot close java applets in my browser, when i clicking the 'X'button just nothing happens. Can someone help me?
[00:29:34] <freeone3000> ~~ erkan^ tech support
[00:29:34] <javabot> erkan^, 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.
[00:29:38] <arex\> How do I change the default Javadoc @author tag in Netbeans IDE? It defaults to my username, and I don't want that.
[00:29:38] *** ewanas has joined ##java
[00:30:03] <erkan^> ow ok, freeone3000
[00:30:04] <erkan^> thank you
[00:30:16] <echosystm> arex\: http://www.google.com.au/search?sourceid=chrome&ie=UTF-8&q=netbeans+author+javadoc
[00:30:21] <echosystm> also, #netbeans
[00:30:21] <k_89> facebook is written in php(so i have heard), twitter uses RoR, what is bigger than them
[00:30:56] <echosystm> ok
[00:31:12] <erkan^> Good night :-)
[00:31:14] <echosystm> firstly, twitter uses Scala, which is "THE new JVM language"
[00:31:15] *** erkan^ has left ##java
[00:31:25] <echosystm> (it's basically java)
[00:32:00] <echosystm> secondly, writing facebook in PHP was a mistake - a mistake that has resulted in them having to write a tool to compile their php to C (facebook uses hiphop)
[00:32:43] *** pantokrator has joined ##java
[00:32:53] *** Soliah has joined ##java
[00:32:55] <echosystm> infact, twitters move from ruby to scala pretty much confirms what i said: scripting languages suck for large projects
[00:33:08] <bearded_oneder> yep, it couldn't scale. Facebook had to be heavily refactored and in many places rewritten.
[00:33:14] <echosystm> same goes for facebook fail
[00:33:23] *** Ademan has quit IRC
[00:34:51] *** ldh has joined ##java
[00:35:07] *** akkad has quit IRC
[00:35:40] <echosystm> to be honest, the JVM is the only VM i trust to handle big projects
[00:35:52] <Charrit> freeone3000, I solved that in a simpler way: jTable4.setSurrendersFocusOnKeystroke(true);
[00:36:00] <Charrit> then cursor appears
[00:36:03] <k_89> k... will give serious thought to moving to jsp and all. And since you guys are java programmers, what do you say about j2ee, haven't heard great things about it, but then, have only talked to .net and php programers
[00:36:17] <exobyte> freeone3000: I found it! http://bugs.sun.com/view_bug.do?bug_id=4071957
[00:36:21] <echosystm> at a guess, ruby only has a weakly-concurrent mark-and-sweep garbage collector, which is going to fail hard on any decent sized heap
[00:36:40] <freeone3000> k_89: It's a library for everything you'd want to do Enterprise-y. Also, JSP is terrible - go with Velocity or FreeMarker for templating.
[00:37:06] <arex\> Do you call a "public static final" in Java "a constant"?
[00:37:13] <freeone3000> You could.
[00:37:21] *** kinks has joined ##java
[00:37:22] <Sou|cutter> arex\: sure
[00:37:25] *** pipeep has quit IRC
[00:37:31] <echosystm> k_89: j2ee is great, because it gives you a highly standardised and portable platform to design against
[00:37:44] <echosystm> however, it has a high learning curve and shouldnt be used for everything
[00:37:49] <Sou|cutter> arex\: if it's immutable anyway
[00:37:56] <echosystm> if youre developing small content managed sites, don't use java
[00:38:16] *** disappearedng_ has quit IRC
[00:38:20] <Sou|cutter> k_89: there are several high-quality frameworks to choose from in java-land these days
[00:38:48] <Sou|cutter> k_89: pure servlets/jsp is not something I would recommend, though
[00:38:57] <echosystm> if you want a sweet framework for developing highly portable MVC web apps, check out grails
[00:39:07] <echosystm> its all the benefits of java, with all the benefits of a scripting language
[00:39:18] <Sou|cutter> ~~ k_89 web frameworks
[00:39:18] <javabot> k_89, Popular web frameworks: JSF, JAX-RS, Struts 2, Stripes, Wicket, Spring MVC, Grails, GWT, Play, and Click. Ask me about each for more info.
[00:39:31] <Sou|cutter> (those are in no particular order, and fill different niches)
[00:39:35] <echosystm> for larger mvc projects, check out spring
[00:40:02] *** wolfman2000 has joined ##java
[00:40:07] <bearded_oneder> k_89: PHP is great for one off projects, small low budget web apps, prototyping, and low investment startups, but for scalable, well engineered, high traffic applications it just can not compete with Java. use the tool that fits the project specs and budget. see http://www.richardrauser.com/index.php/2010/01/18/php-vs-java-for-webapps-quality-maintanability-of-code/
[00:40:28] *** tewecske has quit IRC
[00:40:31] <Sou|cutter> ~ bearded_oneder++
[00:40:32] <javabot> bearded_oneder has a karma level of 16, Sou|cutter
[00:41:03] <k_89> looks like i have neglected java for too long now(almost half a year), thnx guys, will move to learn java as soon as i have some time
[00:41:16] <k_89> no... its been an year
[00:41:37] <Sou|cutter> most of these frameworks have been around for years ;) but it's impossible to know them all, so no worries
[00:41:59] <Sou|cutter> that list is hardly complete either
[00:42:01] * Sou|cutter shrugs
[00:42:07] <k_89> i got comfortable with core java a year ago, haven't used it since
[00:42:23] <k_89> made some trees, graphs etc in it
[00:42:27] *** ghuru has joined ##java
[00:43:10] <k_89> i do data structure problems to get comfy with a lang
[00:43:10] *** digs has joined ##java
[00:43:18] *** vpit3833 has joined ##java
[00:43:18] <k_89> thats all
[00:43:28] <Sou|cutter> k_89: cool :) There is a lot of depth to the java ecosystem, I have programmed it in years and more than ever I realize how little I know *grin*
[00:44:19] *** Charrit has quit IRC
[00:45:29] <cheeser> we've been trying to tell you that, Sou|cutter P^)=
[00:46:04] *** ghuru has quit IRC
[00:46:41] <k_89> Can you guys suggest some books to learn beyond core java, I know there is Core java vol.1 & 2, but something which lets me work in web-dev and s/w dev(mainly on android) more quickly
[00:46:44] <Sou|cutter> People who claim to know a lot about things are dangerous!
[00:47:09] <plarsen> k_89: in what regards? Development of what type of application?
[00:47:46] <k_89> what type of app. : apps for android tabs
[00:47:55] *** E-sense has quit IRC
[00:48:11] <freeone3000> That's an entirely separate language with exactly the same syntax.
[00:48:13] <k_89> web dev: the stuff i do in php, but something which i can do at a larger scale
[00:48:21] <plarsen> k_89: Lots of resources online about that; but as to theory look at MVC design pattern books
[00:48:58] <k_89> i have read a lot about MVC, done it a lot in php
[00:49:18] <plarsen> k_89: http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=androd+programming&x=0&y=0 - lots of books too.
[00:51:22] <k_89> see... the thing is, i think there are 3 main areas in programming.... web-dev, s/w dev, embedded-dev, I feel C/C++(and most probably C++0x) would be much better for third one
[00:51:39] <k_89> and C++)x would be better for pc s/w dev
[00:51:59] <Sou|cutter> java has not made a huge impact on desktop apps outside of development tools
[00:52:20] <k_89> java syntax goes in mobile devices s/w dev ..
[00:52:34] <k_89> and in (as u guys say) large scale web-dev
[00:52:39] *** zemanel has quit IRC
[00:53:14] *** E-sense has joined ##java
[00:53:22] <k_89> so those are the things i want to know some good books for... mainly web dev for java and maybe mobile s/w dev
[00:53:32] <cbeust> k_89: take a look at GWT also, might give you a faster path to getting something up and runnning than JSP
[00:53:34] <k_89> and thanks for the android book
[00:54:17] <Sou|cutter> as for web dev, I think you might have to narrow your focus a bit... find a framework you're interested in, and go from there
[00:54:30] *** Soliah has quit IRC
[00:54:54] <Sou|cutter> there's plenty of good online resources for most of them that should give you at least a taste of them before you need to run off and read books
[00:55:00] *** fisted_ has joined ##java
[00:55:30] *** Soliah has joined ##java
[00:56:42] *** platzhirsch has joined ##java
[00:56:53] <k_89> thanks guys... you all have been of much help
[00:56:55] *** plarsen has quit IRC
[00:56:56] <Sou|cutter> k_89: I highly recommend JCIP if you're interested in scaling
[00:57:04] <Sou|cutter> ~~ k_89 jcip
[00:57:04] <javabot> k_89, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[00:57:15] *** harry_ has quit IRC
[00:57:50] *** freeone3000 has quit IRC
[00:57:59] *** fisted has quit IRC
[00:58:22] <Sou|cutter> that's not strictly a web-dev thing, but in most large-scale web-apps there is some layer at which you'll find the information in that book invaluable
[00:58:39] <k_89> Sou|cutter : I have tried my hand at threading, played with it a little, so know how the basics of it. Scaling of sites would come later. What i want for now is to learn web-dev in java
[00:58:41] <bearded_oneder> k_89: web dev starter -- http://tinyurl.com/Core-Servlets-Javaserver-Pages ; http://tinyurl.com/Java-Servlet-Programming ; http://tinyurl.com/Core-JavaServer-Faces-3rd-Ed
[00:58:51] <Sou|cutter> k_89: fair enough
[00:59:26] <k_89> thanx bearded_oneder
[00:59:28] *** zatan has quit IRC
[00:59:30] <Sou|cutter> k_89: that's the book to read if you ever need to go deeper into concurrency in java, though
[00:59:36] <k_89> sure
[00:59:40] *** javobiwan has quit IRC
[01:00:51] *** platzhirsch has quit IRC
[01:02:25] *** digs has quit IRC
[01:02:31] *** plarsen has joined ##java
[01:03:44] *** MagmaRules has quit IRC
[01:05:27] *** ninjai has quit IRC
[01:05:36] *** rretzbach has quit IRC
[01:07:16] *** switch is now known as [switch]
[01:14:52] *** epalm has quit IRC
[01:14:53] *** ldh has quit IRC
[01:15:19] *** ldh has joined ##java
[01:15:23] *** kinabalu has joined ##java
[01:15:38] *** spectrahp has joined ##java
[01:16:32] *** L-----D has joined ##java
[01:17:19] *** ldh has quit IRC
[01:17:33] *** barq has quit IRC
[01:22:17] *** Matuku has quit IRC
[01:22:39] *** multi_io has joined ##java
[01:23:04] *** epalm has joined ##java
[01:23:31] *** TomyLobo has quit IRC
[01:25:38] *** bitshuffler has quit IRC
[01:27:16] *** phantomcircuit has joined ##java
[01:27:44] *** cythrawll has quit IRC
[01:27:59] *** Fanook has joined ##java
[01:29:25] *** homie has quit IRC
[01:29:57] *** phantomcircuit has quit IRC
[01:30:05] *** phantomcircuit has joined ##java
[01:31:21] *** PelleTut has quit IRC
[01:32:30] *** jesmon has left ##java
[01:35:08] *** cbeust has quit IRC
[01:36:02] *** platzhirsch has joined ##java
[01:36:58] *** platzhirsch has left ##java
[01:37:06] *** jonn has joined ##java
[01:38:25] *** adamisme has quit IRC
[01:40:42] *** gtrak has quit IRC
[01:41:04] <jonn> Is there a reason why Java does not have a soft phantom reference?
[01:41:51] <cheeser> ~javadoc PhantomReference
[01:41:52] <javabot> cheeser: http://is.gd/rFbSPY [JDK: java.lang.ref.PhantomReference]
[01:41:53] <cheeser> is that not what you want?
[01:43:39] <jonn> it just seems like there should be 4 types. {soft,weak} and then a phantom equiv. There only seems to be a weak phantom, but not a soft equiv.
[01:43:56] *** echosystm has quit IRC
[01:44:18] *** jpk has quit IRC
[01:44:21] <cheeser> i don't really know enough about them to comment either way
[01:44:28] <cheeser> i only know they're there
[01:45:48] <Fanook> the package description for java.lang.ref explains the reference semantics pretty well
[01:45:53] <tjsnell> do you have a use case where you really need them
[01:46:10] *** plarsen has quit IRC
[01:46:25] *** alamar has quit IRC
[01:46:30] *** L-----D has quit IRC
[01:48:29] *** fisted_ is now known as fisted
[01:50:26] <jonn> tjsnell: caching with the needs of phantom references wouldnt seem unrealistic
[01:51:33] *** cornell has joined ##java
[01:52:07] *** cbrock has joined ##java
[01:52:18] <cornell> ~pastebin
[01:52:18] <javabot> http://eugeneciurana.com/pastebin - Paste the final url after you've pasted your stuff there.
[01:52:19] <Fanook> Soft: if you run out of memory, try reclaiming this. Weak: doesn't prevent objects that reference this from being reclaimed. Phantom: all objects that reference this have been or can be reclaimed. Most often used with ReferenceQueue to replace finalizers
[01:52:25] *** lt232 has joined ##java
[01:52:38] <lt232> wats up yall
[01:53:19] *** cornell has quit IRC
[01:54:26] <lt232> Which of the following declares an array that will hold a list of integers?
[01:54:35] <jonn> Fanook: I know what they each do.
[01:54:37] <Fanook> ~~ lt232 arrays
[01:54:38] <javabot> lt232, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[01:54:45] <lt232> (a) int[] numbers; (b) int numbers[]; (c) numbers = new int[10]; (d) numbers = new int[]; (e) int[10] numbers;
[01:54:55] <Fanook> lt232: we will not do your homework for you. Go read the docs and tutorials
[01:54:59] <jonn> but there is a lack of "dont relcaim this until youre out of memory, but then place it in the queue"
[01:55:37] *** matsebc has quit IRC
[01:55:57] <Fanook> jonn: sure there is. SoftReference(T, ReferenceQueue)
[01:56:07] <lt232> im just asking for confirmation i put (d
[01:56:10] <lt232> ?
[01:56:44] <cheeser> ~homework
[01:56:45] <javabot> Homework is meant to be done by YOU, so that YOU learn something. Stop cheating; we don't like doing our own, why should we do yours? Also, answering homework questions is extremely frustrating. See "~why no homework" for more reasons why we won't answer your questions.
[01:56:53] <Fanook> lt232: again, go read the tutorial you were linked above
[01:56:54] <jonn> Fanook: then is a phantom not just a weakref(t,queue)?
[01:57:22] *** Ochikobore has joined ##java
[01:57:35] *** DJClean has quit IRC
[01:57:38] *** wcfs96 has joined ##java
[01:57:41] *** wcfs96 has left ##java
[01:57:45] <Ochikobore> can anyone help a newbie with a school problem?
[01:57:46] *** wcfs96 has joined ##java
[01:57:55] <lt232> Oh its answer (a) isnt it??
[01:58:00] <Ochikobore> hahaha
[01:58:01] <Fanook> Ochikobore: we may point you in the right direction
[01:58:03] <Ochikobore> i wish :[
[01:58:07] <cheeser> ~anyone
[01:58:07] <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.
[01:58:09] <jonn> lt232: just try it
[01:58:13] <cheeser> Ochikobore: he's talking abut something else
[01:58:24] *** Ochikobore has left ##java
[01:58:40] <lt232> someone pm me
[01:58:43] <cheeser> ok then.
[01:59:33] <jonn> Fanook: I dont understand the purpose of the queuef or non-phantom references. how does it enqueue a deleted object..?
[01:59:44] *** katy has joined ##java
[01:59:52] <katy> I love java
[01:59:53] <lt232> ~~freeone3000
[01:59:53] <javabot> The syntax is: tell nick about factoid - you missed out the 'about', lt232
[02:00:02] <katy> it is the best language known to man...
[02:00:07] <lt232> paging freeone3000
[02:00:07] <katy> C++ is for fags
[02:00:16] *** katy has left ##java
[02:00:23] *** disappearedng_ has joined ##java
[02:00:43] *** ztj has joined ##java
[02:00:49] <lt232> ~javabot
[02:00:49] <javabot> for a FAQ and a quick tutorial on how to use javabot, see: http://javachannel.net/wiki/pmwiki.php/FAQ/Javabot
[02:01:03] <lt232> ~~cheeser
[02:01:03] <javabot> The syntax is: tell nick about factoid - you missed out the 'about', lt232
[02:01:07] <lt232> ~cheeser
[02:01:07] <javabot> lt232, what does that even *mean*?
[02:02:19] <Fanook> jonn: from my understanding of the package docs and javadocs, ReferenceQueues are processed between the time a referenced object is identified as reclaimable and when it's actually reclaimed
[02:03:25] *** cyphorious has quit IRC
[02:03:42] <Fanook> jonn: PhantomReferences only indicate that no other live objects are referencing the associated object and as such the object will be reclaimed once the queue it's associated with processes it
[02:03:54] *** homie has joined ##java
[02:05:31] *** nchaimov has joined ##java
[02:05:34] *** JohanSJA has joined ##java
[02:06:36] *** wcfs96 has left ##java
[02:07:28] *** wcfs96 has joined ##java
[02:09:56] *** ElWuilMeR has joined ##java
[02:10:26] *** ElWuilMeR has left ##java
[02:11:31] *** vengeancex32 has quit IRC
[02:12:33] *** vengeancex32 has joined ##java
[02:14:09] *** Gargadon has joined ##java
[02:14:12] *** Gargadon has left ##java
[02:14:13] *** ElWuilMeR has joined ##java
[02:15:21] *** Fanook has quit IRC
[02:15:50] *** Fanook has joined ##java
[02:16:16] <disappearedng_> http://paste.pocoo.org/show/347779/ Anybody mind telling me why my timer doesn't expire?
[02:19:42] *** epalm has quit IRC
[02:20:27] <Fanook> disappearedng_: it expires for me. Pastebin your test case
[02:20:48] *** nchaimov has quit IRC
[02:20:53] *** nchaimov has joined ##java
[02:21:05] *** Auv5 has joined ##java
[02:21:42] *** ewanas has quit IRC
[02:21:53] <disappearedng_> actually sorry I realized my code is caught up on some other part
[02:22:09] *** ElWuilMeR has left ##java
[02:25:20] *** plarsen has joined ##java
[02:27:43] *** gucko has quit IRC
[02:28:10] <chomping> hi guys, I need some help here with regards to servlet. Let say I want to response from my servlet a JSON object. However, I want to response a preformatted HTML then I want to reply {result: "<li>....list of 20 items .. </li>"}. In my code I do request.getRequestDispatcher("website/ajax/fetchMorePostsPageTemplate.jsp").forward(request, response); Now how would I able to get the preformatted HTML?
[02:28:14] *** bradford has quit IRC
[02:28:28] *** hex` has quit IRC
[02:35:08] <disappearedng_> Hey guys I am new to java, I basically wants to do the following: start_timer => after X amount of time, run SetFlagTask(this should be in a loop). Then stop_timer just cancels this loop. How come I am not getting what I want? http://paste.pocoo.org/show/347788/
[02:35:57] *** xiliax has quit IRC
[02:36:28] *** Wicked has quit IRC
[02:39:18] <Planck_> disappearedng_: I don't even see how that could compile
[02:39:29] <disappearedng_> Planck: It does
[02:39:41] <disappearedng_> I left out the static variable declaration at the top cause I don't want to paste the whole thing down
[02:41:53] <Planck_> Ahh, I see: TimerTask is a nested class
[02:42:00] <Planck_> Err, SetFlagTask
[02:42:08] <disappearedng_> do you want me to paste you the whole java file?
[02:42:11] <disappearedng_> if that helps
[02:42:13] <Planck_> Nah, it's fine
[02:42:28] <disappearedng_> I am implementing go back N as an exercise for my interview
[02:42:49] <Planck_> You are changing the timer instance up to 200 times per second...
[02:42:57] <disappearedng_> yeah I took that off let me repaste
[02:44:22] <disappearedng_> Planck_: http://paste.pocoo.org/show/347791/ Well the one thing that I have is now when I run this code, I keep seeing multiples of System.out.println("Timer expired, running again"); being run at the same time
[02:44:32] <disappearedng_> I thought start_timer will destory the old timer now?
[02:44:35] <disappearedng_> *no?
[02:45:47] <Planck_> Well, it does make it garbage, but continues to exist for a while.
[02:47:18] <disappearedng_> ok I guess I have to check if timer = null then timer.cancel
[02:47:18] *** Fisiu has quit IRC
[02:47:19] *** Naith has quit IRC
[02:47:26] <Planck_> Incidentally, that 's an awful lot of static methods
[02:47:33] *** L-----D has joined ##java
[02:47:35] <Planck_> Hmm, and static fields
[02:47:39] <disappearedng_> lol I am not that good with java yet
[02:47:43] <disappearedng_> just touching the basics
[02:47:44] *** plarsen has quit IRC
[02:47:55] <disappearedng_> I mean they are gonna ask you to like do algorithms and netwrok
[02:48:04] <disappearedng_> won't really critize you on the spot for using that much static in an interview
[02:49:06] *** lt232 has quit IRC
[02:49:35] <Planck_> Hmm, actually start_timer doesn't do anything to previous timers at all
[02:49:56] <Planck_> I was misreading stop_timer as beign part of it
[02:49:57] *** matsebc has joined ##java
[02:50:56] <Planck_> Though I suppose start_timer is only ever called when the only task on the previous timer finishes.
[02:51:00] <disappearedng_> yeah sorry yeah but basically I came from python background and I thought that once you overwrite a variable the memory gets trashed
[02:51:34] <Planck_> Oh wait, that's not true either. Your main() method does lots of start_timers
[02:51:46] <disappearedng_> yeah
[02:51:51] <disappearedng_> now I check in start_timer
[02:51:55] <Planck_> So they continue to run and can't be stopped
[02:51:58] <disappearedng_> if timer != null, stop_timer()
[02:52:47] <Planck_> Wouldn't it be better to just maintain a single Timer and schedule tasks on that?
[02:52:52] *** sbxd has joined ##java
[02:52:54] *** plarsen has joined ##java
[02:53:14] *** Elazar has joined ##java
[02:53:15] <sbxd> ~pastebin
[02:53:15] <javabot> http://mysticpaste.com - Paste the final url after you've pasted your stuff there.
[02:53:44] <Elazar> Is there a way to convert a Date instance from one TimeZone to another without having to convert to String and back again?
[02:54:02] *** sbxd has quit IRC
[02:54:43] <Planck_> Elazar: java.util.Date?
[02:55:04] *** ojacobson has joined ##java
[02:57:23] *** gelignite has quit IRC
[02:58:53] *** wcfs96 has quit IRC
[02:59:35] *** matsebc has quit IRC
[03:01:14] *** Naith has joined ##java
[03:01:47] <monty_hall> will javafx 2 be included as part of javase? ie: d/l as a separate plugin etc etc.
[03:01:48] <Elazar> Planck_: Yes.
[03:02:32] *** lamdk has quit IRC
[03:02:32] <Planck_> Elazar: All the functions to do with timezones in Date are deprecated and shouldn't be used.
[03:02:45] <Elazar> Planck_: So, the answer to my question is "no," then?
[03:02:53] *** HardDisk_WP has quit IRC
[03:03:12] <Planck_> The answer to your question is "you shouldn't be using Date for that purpose at all"
[03:03:27] *** tissue has joined ##java
[03:03:47] *** em has quit IRC
[03:04:17] <Elazar> Planck_: I'm writing an application based on Jersey and I'm trying to use http://jsr311.java.net/nonav/releases/1.1/javax/ws/rs/core/Response.ResponseBuilder.html#lastModified(java.util.Date) which expects a GMT date.
[03:04:34] *** em has joined ##java
[03:04:41] <Elazar> To my knowledge, any Date instance will respect the timezone of the current system, which may or may not be GMT.
[03:04:53] <Planck_> Date represents a specific time, independent of timezone.
[03:05:14] <Planck_> That's the only non-deprecated functionality left in it
[03:05:43] <Elazar> Planck_: How would you suggest I handle this situation, then?
[03:05:50] *** the_evil_gungur has joined ##java
[03:06:04] *** Gracenotes has quit IRC
[03:06:08] *** JohanSJA has quit IRC
[03:06:49] *** grug has joined ##java
[03:06:50] <Planck_> You can either use one of the two Date constructors (if either are what you need), or use a Calendar of some sort.
[03:06:54] *** fuzzygroove has joined ##java
[03:07:38] <Planck_> What Date do you wish to represent?
[03:07:39] <grug> what is the best way to print a List (i.e. i have a list of List<TreeEvent> treeEvent), just iterate through it and print each element?
[03:07:51] <Planck_> grug: Yes
[03:07:58] <grug> sweet, cheers :)
[03:07:58] <Fanook> what's .toString() give you?
[03:08:22] <grug> well i could do that, but i want to be able to format it nicely
[03:08:32] <grug> so printing each element and doing what i want with each element is a bit easier
[03:08:36] <grug> i may be mistaken, though
[03:09:37] <Elazar> Planck_: No specific date. It's variable.
[03:10:18] <Planck_> I mean, what are you using to specify the date? Offset from now? Year/month/day? etc.
[03:10:55] <Planck_> Millseconds since Jan 1st 1970 GMT?
[03:12:18] <Elazar> Planck_: I think the Calendar suggestion you made may be what I need.
[03:12:27] <Planck_> Okay :-)
[03:12:49] <Elazar> Planck_: Would calling setDate(someDate) on that, then setTimeZone(new SimpleTimeZone(0, "GMT")), then getDate() give me someDate respective to GMT?
[03:13:35] *** freeone3000 has joined ##java
[03:14:24] <Planck_> Date objects don't model timezone representations at all.
[03:15:45] *** phantomcircuit has quit IRC
[03:16:03] <Planck_> (Well, they used to try. But they failed and you shouldn't use that anymore)
[03:16:07] <Elazar> Planck_: OK, maybe I should rephrase the question. If I'm in GMT-6 and I want to know the time in GMT+0, how would I get that?
[03:16:22] <Planck_> Use a Calendar.
[03:16:46] <Elazar> Planck_: Doing what I just described? ^
[03:16:47] *** HardDisk_WP has joined ##java
[03:16:59] <Planck_> Nothing to do with Date at all
[03:17:18] *** tje2 has joined ##java
[03:17:22] <tje2> Hello all.
[03:17:28] <Elazar> Planck_: OK, now what if I want to do it for a time that isn't the current time?
[03:17:43] <tje2> I was wondering if someone might be able to clue me in as to the best place to put the PostgreSQL JDBC .jar file might be?
[03:17:51] <ojacobson> Elazar: The Date for 2011-03-03 09:00:00-03:00 is the same as the Date for 2011-03-03 12:00:00Z
[03:17:55] <ojacobson> That's the point he's making
[03:18:15] <ojacobson> There's no "the date here" vs "the date there" distinction. You get the same Date object, modulo identity, either way.
[03:18:15] <tje2> I'm looking to place it somewhere "global" where, ideally, anything called from $JAVA_HOME/bin/java would find it in it's $CLASSPATH.
[03:18:21] *** pipeep has joined ##java
[03:18:28] <tje2> I'm fairly knowledgeable with PostgreSQL, but a total n3wb to Java.
[03:18:32] <ojacobson> tje2: On your application's classpath.
[03:18:37] <ojacobson> Global classpath *does not work well*. Don't do it.
[03:18:51] <ojacobson> It's only convenient until you accidentally break something that was expecting some other version of the library.
[03:18:55] *** carutsu_ has joined ##java
[03:19:17] <tje2> ojacobson, OK, got ya. I've already got it in one of the app's include dir's.... was just hoping that there was a "global" classpath that I might fall-back on.
[03:19:40] *** carutsu_ has left ##java
[03:19:51] <ojacobson> There is, but you don't want it.
[03:19:54] <Planck_> Elazar: You can use a Calendar to choose a time using its calendar-specific fields (such as timezone), and get the Date corresponding to that.
[03:20:03] <tje2> ojacobson, Might I inquire as to why?
[03:20:18] <tje2> I'd be happy w/ a link to an explanation if you don't feel like going into all of the details...
[03:20:29] <ojacobson> The absence of version information in inter-JAR dependencies means that a globally-visible library is almost certainly going to be the wrong version
[03:20:30] *** Wicked has joined ##java
[03:20:34] <Planck_> You can also start with a Date, and use a Calendar to get the calendar-specific fields for a given timezone
[03:20:38] <ojacobson> It's the right version for the app you're writing now, and for nothing else
[03:20:49] <tje2> Got ya.... Now THAT makes perfect sense.
[03:20:49] *** pyrony has quit IRC
[03:21:00] <ojacobson> with JDBC in particular, a driver in the global spot gets loaded into every program that uses DriverManager, which is most of the ones that use databases
[03:21:03] <tje2> Thanks, ojacobson. I believe that gives me exactly what I need to know.
[03:21:10] <ojacobson> do you really want to have side effects on every db-using program you run? :)
[03:21:55] <tje2> Well, considering that the box is going to be dedicated to a single custom app, I don't think it'll be an issue... but if it's a "best practice" not to rely on a global classpath for such things, than I want to do it the right way.
[03:22:20] <ojacobson> Is it a container-using app or something freestanding?
[03:22:33] <tje2> Honestly, the app is written in PHP (the front-end), but I had intended to write the backend (send/recv XML over SSL socket from PHP code up front) in Java as a learning experience.
[03:22:46] <tje2> It would be a standalone app.
[03:22:51] <ojacobson> Euargh. That's going to be terrible.
[03:22:55] *** cbeust has joined ##java
[03:23:00] <ojacobson> JVM startup has been much improved, but it's still pretty noticable
[03:23:01] <tje2> It's more of an exercise than anything for right now.
[03:23:03] <Planck_> Elazar: In short, a Date is an object representing a physical time. A Calendar is an object that handles local representations of time.
[03:23:04] <tje2> Learning Java.
[03:23:12] <ojacobson> especially if you spin up a JVM every time you want to send one of thse requests :)
[03:23:31] <tje2> Oh, no, nothing like that... Yeah, JVM startup takes forever and a day. That's my biggest beef w/ Java apps.
[03:24:32] <tje2> I had intended to write a daemon, in Java, that connects to a PostgreSQL database. The Java app would receive XML over an SSL socket containing a username/password combo (from the PHP code up front), parse out the XML, check the user/pass against the database, and then return XML back to the front-end over the SSL socket.
[03:24:35] <Elazar> ojacobson, Planck_: OK, thanks guys. I think I understand, cranial inclination toward explosion notwithstanding.
[03:25:08] *** epalm has joined ##java
[03:26:17] *** zemanel has joined ##java
[03:26:18] <tje2> ojacobson .. Again, thanks for the gift of clue. I'll forget the idea of a global version of the PostgreSQL JDBC .jar, was just a thought that I figured I'd look into while I was thinking about it.
[03:26:44] <tje2> I'm going to have to get going; gotta get the girl's butt out of bed so she can get ready for work (and I can have some peace and quiet w/ the computer) :)
[03:26:44] <ojacobson> tje2: No probobelem.
[03:27:29] *** tje2 has quit IRC
[03:27:51] *** plarsen has quit IRC
[03:31:37] *** the_evil_gungur has quit IRC
[03:32:37] *** zemanel has quit IRC
[03:33:12] *** [twisti] has quit IRC
[03:33:21] *** Everclear72216 has quit IRC
[03:34:22] *** Nebulam has joined ##java
[03:40:21] *** Naith has quit IRC
[03:41:00] *** Fishy has joined ##java
[03:43:09] *** hrad has quit IRC
[03:43:20] *** plarsen has joined ##java
[03:43:59] *** wolfman2000 has quit IRC
[03:47:14] *** cbrock has quit IRC
[03:50:24] <bearded_oneder> " Don't call me 'Junior' ! " It's "Indiana", "Dr. Jones" if you're nasty. (re-watching the Indiana Jones series).
[03:53:52] *** Cymage has joined ##java
[03:56:08] *** Rivenge has joined ##java
[03:56:15] *** Rivenge has quit IRC
[03:59:50] *** plarsen has quit IRC
[04:00:30] *** arex\ has quit IRC
[04:05:36] *** jam3s2001 has joined ##java
[04:05:37] *** Auv5 has quit IRC
[04:05:41] *** jam3s2001 has left ##java
[04:07:35] *** k_89 has quit IRC
[04:08:43] *** tyebud has joined ##java
[04:08:51] <LtHummus> I wanted a car, I got a computer. How's that for being born under a bad sign?
[04:08:56] *** Optic has quit IRC
[04:09:02] *** tyebud has left ##java
[04:09:13] <freeone3000> But you can only drive one car at a time.
[04:09:51] <LtHummus> I suppose
[04:11:47] *** Behold has quit IRC
[04:12:46] *** t0rc has joined ##java
[04:20:38] *** wolfman2000 has joined ##java
[04:22:38] *** terranova has joined ##java
[04:23:18] *** terranova has joined ##java
[04:24:25] *** Fishy has quit IRC
[04:32:34] *** Gracenotes has joined ##java
[04:35:15] *** echosystm has joined ##java
[04:35:56] <echosystm> whats a good library for database testing with testng?
[04:36:13] *** terranova has quit IRC
[04:36:15] <echosystm> i'd use dbunit, but im wondering if there is some testng equivalent
[04:36:38] <chomping> guys, how would I able to get the value from this syntax -> request.getRequestDispatcher("website/ajax/fetchMorePostsPageTemplate.jsp").forward(request, response);
[04:37:06] <chomping> if I can get the value after being parsed, I want to assign it to a variable that's why I need the return data from that, any idea?
[04:37:38] <ojacobson> What return data?
[04:39:08] <cbeust> echosystm: Not really, people use DBUnit, which is pretty easy to integrate with TestNG
[04:39:10] <chomping> ojacobson: as I tested it, it does return a formatted HTML which is a string. prior than that, I have actually a variable as request.setAttribute()... which populates data to that jsp file then after it's done, I want to get the result and assign it to a variable, but I don't know how.
[04:39:17] <cbeust> I had a few issues a few years back using DBUnit, maybe moot now
[04:39:22] <chomping> I was looking towards the net didn't got any success to find how
[04:39:33] <ojacobson> chomping: it doesn't return anything.
[04:39:50] <ojacobson> It writes the resulting HTML (or whatever else the JSP produces) to the HttpServletResponse you passed it.
[04:40:03] <ojacobson> If you want it to go somewhere other than the originating client (browser, usually), give it a different response to write to
[04:40:05] <chomping> ojacobson: really, so let say I believe you have experienced this already
[04:40:25] *** Nebulam has quit IRC
[04:40:29] <chomping> oh ojacobson can you give me any url's that shows that? damn, I really didn't get any reference
[04:40:41] <chomping> what I was trying to achieve is that
[04:41:16] <chomping> I want to pass the data thru JSON object and I don't want to produce the HTML
[04:41:25] *** OverlordQ has joined ##java
[04:42:01] <chomping> ojacobson: this is what's puzzling me on how to do this -> "give it a different response to write to" as what you've said
[04:42:09] <ojacobson> I don't see what's puzzling about it
[04:42:39] <ojacobson> HttpServletRequest is just an interface
[04:42:43] <chomping> what I mean is that I don't know how to do that, I was trying to research didn't got any luck how to do it in java
[04:43:11] <ojacobson> The instance of that interface you get when the container hands you a request to process is only magic in that it's connected to the HTTP client that originated the request
[04:43:19] <ojacobson> nothing's stopping you from inventing your own
[04:43:23] <ojacobson> same goes for HttpServletResponse
[04:43:43] <freeone3000> Couldn't you just create a new HTTP request to your own webserver and fetch the page contents?
[04:43:57] <ojacobson> freeone3000: forward can do things that inbound requests can't
[04:44:14] <ojacobson> (you can forward to resources inside of WEB-INF, for example)
[04:44:15] <chomping> I can actually do this -> JSONObject mapped = new JSONObject()... mapped.put("test", "test data");
[04:44:30] <chomping> I have no problem doing it and it produce JSON into my browser
[04:45:06] <chomping> but if I have a jsp file as my source of data sort of I want to add, mapped.put("result", data from the jsp file I want);
[04:45:46] <chomping> I don't know how, what it does right now it will immediately print the HTML after i do mapped.write(response.getWriter())
[04:45:51] *** Versuchen has quit IRC
[04:47:09] <freeone3000> Well, no duh.
[04:47:21] <freeone3000> "My program is doing exactly what I'm telling it to!"
[04:48:35] *** pyrony has joined ##java
[04:49:22] <freeone3000> So either provide your own HttpServletResponse which isn't hooked up to browser output and get the data from it, or perform the request/response like one would a standard http client.
[04:49:46] <ojacobson> Actually, according to the docs there are some restrictions on what kinds of request and response you can pass
[04:49:51] *** Gracenotes has quit IRC
[04:49:59] <ojacobson> but they're sufficiently open that you can still ultimately do anything you want, you just need to be pedantic about it
[04:50:29] *** pen has quit IRC
[04:51:27] *** rjohnson19 has quit IRC
[04:53:38] *** Sliker has quit IRC
[04:53:51] *** disappearedng_ has quit IRC
[04:54:25] *** homie has quit IRC
[04:58:29] *** Raju has joined ##java
[05:03:56] *** bfuster has joined ##java
[05:04:04] *** ojacobson has quit IRC
[05:12:21] *** maslen has joined ##java
[05:12:32] *** maslen has left ##java
[05:12:56] *** tnzr has quit IRC
[05:17:36] *** OverlordQ has left ##java
[05:18:21] *** Naith has joined ##java
[05:19:19] *** pen has joined ##java
[05:24:06] *** pyrony has quit IRC
[05:26:59] *** eyesUnclouded has joined ##java
[05:28:17] *** Raju has quit IRC
[05:29:47] *** _controller has joined ##java
[05:29:59] <_controller> Hello, how can I check how many threads an ExecutorService is running?
[05:30:43] *** DirtyD has joined ##java
[05:32:06] <exobyte> _controller: the API doesn't provide a means
[05:32:27] <_controller> that's retarded
[05:32:49] <exobyte> _controller: you could submit a task that submits a task, then blocks, and so on, but that only half works
[05:33:03] <_controller> if a callable threw an uncaught exception, would the thread be destroyed?
[05:33:23] <_controller> assuming im using a fixed thread pool
[05:33:28] <exobyte> _controller: oh
[05:33:40] <exobyte> _controller: if it's a ThreadPoolExecutor, there is an api call
[05:34:14] <exobyte> _controller: getActiveCount, getCorePoolSize, and getLargestPoolSize
[05:34:17] <_controller> does Executors.newFixedThreadPool return a ThreadPoolExecutor
[05:34:23] *** bradford has joined ##java
[05:34:32] <exobyte> _controller: what do the javadocs say?
[05:34:38] <_controller> dont say anything
[05:34:45] <exobyte> yes, they do
[05:35:47] <_controller> where?
[05:35:48] <exobyte> _controller: you could also provide a custom ThreadFactory that counts how often a thread is made
[05:36:02] <_controller> that's nasty
[05:36:05] <_controller> Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. At any point, at most nThreads threads will be active processing tasks. If additional tasks are submitted when all threads are active, they will wait in the queue until a thread is available. If any thread terminates due to a failure during execution prior to shutdown, a new one will take its place if needed to execute subsequent tasks. T
[05:36:10] <_controller> no mention of threadpoolexecutor
[05:36:19] <exobyte> _controller: read the method signature
[05:36:30] *** meling has quit IRC
[05:36:34] <_controller> ExecutorService....
[05:36:47] *** devkhadka has joined ##java
[05:36:50] <exobyte> _controller: that's what it returns
[05:36:55] <_controller> umm..
[05:36:58] *** phantomcircuit has joined ##java
[05:37:02] <_controller> ExecutorService is an abstract class
[05:37:10] <exobyte> yes
[05:37:13] *** Matuku has joined ##java
[05:37:16] <_controller> meaning it might have used a Threadpoolexecutor
[05:37:23] <exobyte> you can make a ThreadPoolExecutor on your own, too
[05:37:51] <exobyte> yup
[05:38:50] *** CodeWar has joined ##java
[05:38:54] <exobyte> _controller: why don't you just create a new ThreadPoolExecutor on your own?
[05:39:03] <_controller> idk
[05:39:05] <_controller> whatever
[05:39:07] <_controller> thanks
[05:39:12] *** _controller has quit IRC
[05:40:02] * exobyte "helped" someone!
[05:40:34] *** CodeWar has quit IRC
[05:40:53] *** blbrown_win3 has joined ##java
[05:43:25] *** exobyte has quit IRC
[05:43:54] *** CodeWar has joined ##java
[05:47:13] *** homie has joined ##java
[05:48:45] *** Matuku has quit IRC
[05:50:35] *** phantomcircuit has quit IRC
[05:53:25] *** meling has joined ##java
[05:54:03] *** c_axis has quit IRC
[05:54:57] *** homie has quit IRC
[05:58:40] *** BoF has joined ##java
[06:02:16] *** Cymage has quit IRC
[06:05:28] *** eyesUnclouded has quit IRC
[06:06:53] *** homie has joined ##java
[06:08:21] *** eyesUnclouded has joined ##java
[06:08:48] *** huntercool has joined ##java
[06:08:52] *** Naith has quit IRC
[06:09:17] *** eyesUnclouded has quit IRC
[06:10:20] *** wliao has joined ##java
[06:11:48] *** CodeWar has quit IRC
[06:13:02] *** BoF has quit IRC
[06:13:12] *** glcrazy has joined ##java
[06:13:48] *** ariaxu has joined ##java
[06:15:07] *** Gracenotes has joined ##java
[06:16:52] *** mistik1_ has joined ##java
[06:18:23] *** top^ has joined ##java
[06:18:36] *** boredomist has quit IRC
[06:19:49] *** mistik1 has quit IRC
[06:19:49] *** mistik1_ is now known as mistik1
[06:25:52] *** Gracenotes has quit IRC
[06:26:00] *** franzks has joined ##java
[06:26:25] <franzks> hello, please take a look at http://java.pastebin.com/AD9gsvdR at line 73
[06:26:31] *** Gracenotes has joined ##java
[06:26:51] <franzks> I wanted to create a sort of a Log with the logins, but everytime I run the program again, it creates a new Log.txt
[06:27:22] <franzks> How can I do it so that it used only 1 Log.txt, everytime it needs to write something, it just adds to the text file instead of create a new one
[06:27:39] <Fanook> open your stream in append mode
[06:28:18] <franzks> so instead of println(), I use append() ?
[06:29:21] <Fanook> no, that's not what I said
[06:31:13] *** glcrazy has quit IRC
[06:32:16] <franzks> There is no other append in the API for printstream, where else should I look?:
[06:32:21] <franzks> google doesnt help either :(
[06:32:49] <Fanook> well, you're writing to a file, so how about FileOutputStream
[06:33:26] *** terranova has joined ##java
[06:33:29] <franzks> FileOutputStream(file, true)?
[06:33:31] <franzks> thanks!
[06:33:43] *** pantokrator has quit IRC
[06:33:43] *** werdan7 has quit IRC
[06:35:00] *** sorabji52 has joined ##java
[06:35:28] <franzks> uhm, new problem, FileOutputStream doesnt have any methods that accepts strings?
[06:35:45] <Fanook> so wrap it in a writer or stream that does
[06:37:37] *** werdan7 has joined ##java
[06:45:21] *** lilalinux_mbp has joined ##java
[06:46:31] *** lilalinux has quit IRC
[06:46:31] *** lilalinux_mbp is now known as lilalinux
[06:46:31] *** JStoker has quit IRC
[06:46:31] *** frimend has quit IRC
[06:46:32] *** mdunham918_ has quit IRC
[06:46:32] *** phix has quit IRC
[06:46:32] *** Phil-Work has quit IRC
[06:46:32] *** bn` has quit IRC
[06:46:32] *** shurane has quit IRC
[06:46:32] *** eerie has quit IRC
[06:46:32] *** supercosmonaut has quit IRC
[06:46:32] *** Garibaldi has quit IRC
[06:47:23] <echosystm> does anyone know of a nice framework for testing databases that isn't completely database-specific?
[06:47:24] *** sorabji52 has quit IRC
[06:47:40] *** shurane has joined ##java
[06:47:45] <echosystm> ie. i'm not actually testing my database, im just testing that the results of my webservice calls are doing the right thing in the database
[06:47:57] *** bn` has joined ##java
[06:48:04] <echosystm> dbunit seems far too much towards testing the database itself
[06:48:05] *** Garibaldi has joined ##java
[06:48:24] *** eerie has joined ##java
[06:48:24] <echosystm> i basically just want an easy way to run queries and assertions
[06:49:23] *** jpk has joined ##java
[06:50:37] *** JStoker has joined ##java
[06:51:55] *** Phil-Work has joined ##java
[06:55:11] *** t0rc has quit IRC
[06:56:52] *** ariaxu has quit IRC
[06:57:17] *** sorabji52 has joined ##java
[06:58:00] *** JohanSJA has joined ##java
[06:59:14] *** terranova has quit IRC
[07:01:49] *** bearded_oneder has quit IRC
[07:02:19] *** ormaaj has quit IRC
[07:02:56] *** ormaaj has joined ##java
[07:04:38] *** Simath has quit IRC
[07:04:51] <blbrown_win3> is there a working git java api
[07:05:44] *** sorabji52 has quit IRC
[07:06:06] <blbrown_win3> I guesss jgit
[07:06:24] *** sorabji52 has joined ##java
[07:06:37] *** pen has quit IRC
[07:16:06] *** chomping has quit IRC
[07:16:24] *** brig has joined ##java
[07:20:24] *** mxweas has joined ##java
[07:28:33] *** ExtraSpice has joined ##java
[07:30:42] *** caverdude has joined ##java
[07:31:39] <cbeust> Yup jgit
[07:31:43] <cbeust> Eclipse uses it
[07:32:32] *** echosystm has quit IRC
[07:32:50] *** phantomcircuit_ has joined ##java
[07:33:04] *** dextro_ has joined ##java
[07:33:30] <dextro_> why do HashMaps have containsValue() but no way to get the key(s) that contain the value
[07:34:19] *** DirtyD has quit IRC
[07:34:52] <cbeust> Because they're built for fast key look up, not values
[07:35:22] *** glcrazy has joined ##java
[07:36:37] <dextro_> yes but to do the check containsValue() it has to loop though the entire list anyway
[07:36:48] <dextro_> so why not have it just return the fucking key
[07:38:41] <cbeust> Because there can be more than one
[07:41:13] <dextro_> not in my HashMap, so is there something better suited I should use/
[07:41:33] *** sd1074_2 has joined ##java
[07:41:34] <cbeust> You can always use a second hashmap that reverses keys and values
[07:43:41] *** [[thufir]] has joined ##java
[07:44:16] *** sd1074_2 has left ##java
[07:44:54] <dextro_> double the memory :(
[07:45:06] <dextro_> probably my best bet though
[07:45:23] <dextro_> would be faster lookups than looping though the first HashMap prob
[07:46:12] <cbeust> Typical space/time dilemma.
[07:46:25] *** phantomcircuit_ has quit IRC
[07:48:03] *** rhonabwy has quit IRC
[07:48:16] *** top^ is now known as top
[07:52:05] *** lhnz has quit IRC
[07:53:37] *** lhnz has joined ##java
[07:54:58] *** lhnz has quit IRC
[07:56:20] *** franzks has quit IRC
[07:58:28] *** GirL has joined ##java
[07:58:51] <GirL> Hello
[07:58:56] *** lhnz has joined ##java
[08:00:03] *** r0bby_ is now known as robbyoconnor
[08:00:23] *** GirL has left ##java
[08:02:06] *** pZombie has joined ##java
[08:03:56] *** Jacmob has joined ##java
[08:06:12] *** homie has quit IRC
[08:08:04] *** rretzbach has joined ##java
[08:10:24] <jerkface03> performance penalty when boxing primitive -- anyone know how bad it is
[08:12:44] *** matsebc has joined ##java
[08:12:54] <cbeust> jerkface03: Don't worry about it until the profiler tells you to
[08:18:41] *** Jacmob has quit IRC
[08:18:57] *** matsebc has quit IRC
[08:19:48] *** Kamaran has joined ##java
[08:19:57] *** homie has joined ##java
[08:20:00] *** brig has quit IRC
[08:20:48] *** gnychis_ has joined ##java
[08:21:08] <gnychis_> how can i avoid "unchecked cast from Object to ArrayList<ScanResult>" with this code: ArrayList<ScanResult> netlist_80211 = (ArrayList<ScanResult>)i.get("com.gnychis.coexisyst.80211");
[08:24:15] *** mastroDani has joined ##java
[08:24:24] *** CoryDambach has quit IRC
[08:26:01] <freeone3000> You can't.
[08:28:07] *** CoryDambach has joined ##java
[08:29:45] *** DJClean has joined ##java
[08:31:45] *** frangiz has joined ##java
[08:32:17] *** fuzzygroove has quit IRC
[08:34:51] *** MindTaker has joined ##java
[08:35:38] <_W_> gnychis_, change the type of i
[08:37:40] *** mazzachre has joined ##java
[08:39:45] *** Ch30ps has joined ##java
[08:41:59] *** talios has joined ##java
[08:42:08] <MindTaker> how come i cant do this in java , Arr[]=new Arr[5]; ptr* p=arr[3]; arr[-1]// i can do it in c ,and for java: Arr[]=new Arry[5]; Object ptr=Arr[3]; ptr[-1]// error
[08:42:31] *** frangiz_ has joined ##java
[08:43:10] *** frangiz has quit IRC
[08:43:10] *** fannagoganna has quit IRC
[08:45:31] <pirx> hello! does anyone know of a good (command line) tool to list jmx beans (and get their values)?
[08:47:12] <MindTaker> pirx: forget it java is a bad language
[08:48:59] *** MindTaker has quit IRC
[08:49:30] *** gimix has quit IRC
[08:53:28] *** brig has joined ##java
[08:53:52] *** [[thufir]] has quit IRC
[08:54:16] *** hrehf_ has joined ##java
[08:54:31] *** _Jorde has joined ##java
[08:55:07] *** epalm has quit IRC
[08:56:08] *** terranova has joined ##java
[08:56:16] *** tilerendering has joined ##java
[09:00:50] *** c|oneman has joined ##java
[09:01:22] <c|oneman> Can someone explain in very laymen terms the differences between || and &&, when compared to | and &
[09:01:45] <c|oneman> this text doesnt seem to pay much attention to
[09:01:51] <c|oneman> | and &
[09:09:14] *** zuxqoj has joined ##java
[09:10:13] *** eitch0000 has joined ##java
[09:10:53] <RLN> c|oneman, http://download.oracle.com/javase/tutorial/java/nutsandbolts/opsummary.html
[09:11:01] <jim> where's int min(int, int)?
[09:11:16] *** pZombie has quit IRC
[09:11:27] <talios> java.lang.Math
[09:11:30] *** FrozenKnight has joined ##java
[09:11:48] <jim> thanks
[09:12:43] *** rretzbach has quit IRC
[09:16:43] *** pen has joined ##java
[09:19:18] *** barq has joined ##java
[09:20:20] <cbeust> c|oneman: Look up boolean arithmetic and binary arithmetic
[09:26:18] *** msieradzki has joined ##java
[09:27:12] *** sphenxes has joined ##java
[09:28:22] *** barq has quit IRC
[09:29:15] *** barq has joined ##java
[09:29:16] *** sorabji52 has quit IRC
[09:30:27] *** mastroWork has joined ##java
[09:31:45] *** jjido has joined ##java
[09:32:40] *** harry_ has joined ##java
[09:33:10] *** gnychis_ has quit IRC
[09:33:13] *** push[RAX] has quit IRC
[09:33:33] *** mastroDani has quit IRC
[09:36:37] *** cbeust has quit IRC
[09:36:46] *** tewecske has joined ##java
[09:39:43] *** homie has quit IRC
[09:41:01] *** homie has joined ##java
[09:42:02] *** jjido has quit IRC
[09:42:07] *** Kamaran has quit IRC
[09:44:13] *** barq has quit IRC
[09:45:30] *** barq has joined ##java
[09:45:40] *** alex88 has joined ##java
[09:46:26] *** mastro has joined ##java
[09:47:12] <alex88> hi guys, i'm trying to load a big image as RenderedImage or BufferedImage, but it get outofmemory, is possible to load just a block of an image without fully loading it?
[09:47:33] *** hrehf_ has quit IRC
[09:48:11] <pirx> i am trying to get some values from an application using jmx (monitoring purposes, using nagios). i can get simple values like ints, like this: java -Djava.endorsed.dirs=../terracotta-3.4.1/lib/ -cp jmxquery.jar org.nagios.JMXQuery -U service:jmx:jmxmp:// -O "org.terracotta:type=Terracotta Server,name=DSO" -A GlobalServerMapGetSizeRequestsCount which answers: "JMX CRITICAL GlobalServerMapGetSizeRequestsCount=0". but some o
[09:48:42] *** hrehf has joined ##java
[09:48:50] <pirx> the endorsed libs is there because terracotta uses jmxmp for their beans
[09:49:19] *** mastroWork has quit IRC
[09:51:34] *** Seganku has quit IRC
[09:51:43] *** vdv has joined ##java
[09:52:39] *** msieradzki has quit IRC
[09:53:04] *** msieradzki has joined ##java
[09:54:54] *** msieradzki has quit IRC
[09:55:01] *** blbrown_win3 has quit IRC
[09:56:31] *** mitch0 has joined ##java
[09:56:35] <Planck_> alex88: Not via the built-in Java APIs
[09:56:53] *** Railgun has joined ##java
[09:57:00] *** Planck_ has quit IRC
[09:57:01] *** Repox has joined ##java
[09:57:05] *** Planck_ has joined ##java
[09:58:13] <alex88> Planck_: any idea? i've to get blocks of 8x8 pixels for processing them and reassemble image
[09:58:38] *** magentar has joined ##java
[09:58:52] *** mastro has quit IRC
[09:59:31] *** X-Scale has quit IRC
[09:59:43] *** barq has quit IRC
[10:00:27] *** joakimk has joined ##java
[10:03:44] <Repox> Hi. I'm a typical PHP developer with all the shortcomings that language brings and I'm currently trying to develop something in Java; I'm currently stuck at something that might seem simple, but I can't google the simple solution.
[10:03:58] <Repox> What I wan't is to set a timestamp for the current time. And when I activate some function I wan't to compare that timestamp with the current time to see if x seconds has passed.
[10:04:09] <Repox> In PHP I would do something like this: http://pastebin.com/NMZyLNzZ - How can I accomplish something like this, in a simple way?
[10:06:39] <joakimk> Anyone know what to do when Eclipse puts a red ! over the project folder? I realize this may be off-topic, but at least I'm working on a Java project :)
[10:07:29] <Bombe> Nah, it’s still off-topic.
[10:07:52] *** jjido has joined ##java
[10:08:03] <joakimk> The project is checked out via SVN, using Subclipse. And suddenly, while I'm programming, this ! appears and after that Eclipse simply stops compiling new binaries. When I do Run, I just get the last binaries compiled before the error/warning happened. And the main problem is, Eclipse doesn't *say* anything (in text) about what it's complaining about!
[10:08:51] <RLN> Repox, System.currentTimeMillis()
[10:09:20] <Repox> RLN: Thank you - I'll try that...
[10:10:52] *** c|oneman has quit IRC
[10:14:07] *** jjido has quit IRC
[10:16:56] *** frimend has joined ##java
[10:16:57] *** Niek has joined ##java
[10:17:08] <frimend> Anyone who have worked with "PrimeFaces"?
[10:17:08] *** mxweas has joined ##java
[10:17:43] *** benoitdo has joined ##java
[10:17:57] <frimend> I have a icon, and I wish to enlarge it.
[10:18:25] <Niek> I am currently running a SOAP server on PHP. I really notice that it is quite slow. So I am concidering moving to Java. Would Java run faster as PHP for SOAP servers?
[10:18:28] <frimend> <p:commandButton action="#{filterBean.getXSDasFile}" ajax="false" title="Last Ned" image="ui-icon ui-icon-arrow-1-s">
[10:18:31] <frimend> <f:setPropertyActionListener value="#{xsd}" target="#{filterBean.selectedXSD}" />
[10:18:34] <frimend> </p:commandButton>
[10:19:14] <frimend> If anyone has any hint on how I should go about, to enlarge the icon "ui-icon ui-icon-arrow-1-s", that would be very helpfull.
[10:19:24] *** mastroDani has joined ##java
[10:26:40] *** alex88 has quit IRC
[10:29:57] *** hrehf has quit IRC
[10:30:48] <tjololo> anybody have experience with dom4j? (please don't kill me for asking about that)
[10:33:02] *** camcorder has joined ##java
[10:33:06] <camcorder> hi
[10:33:21] <camcorder> I add a basic JButton to a JFrame, but whatever I did I couldn't make it shown
[10:33:49] <camcorder> when I debug I see the component is there, I use .validate() etc. but Panel is there, though can't add any component
[10:34:31] <camcorder> isn't creating a Jbutton, and panel.add(button); button.setVisible(true); panel.validate(); enough?
[10:35:16] *** horte has joined ##java
[10:37:21] <freeone3000> Don't need the .setVisible() call, and the validate() call is wrong - if the panel's not yet laid out, you don't need it ; if it is, you need .revalidate();
[10:39:07] *** mastroDani has quit IRC
[10:42:31] <camcorder> freeone3000, didn't work
[10:42:48] <camcorder> freeone3000, can it be related with layout? I mean can I use '.add()' for a container using GroupLayout?
[10:43:26] <freeone3000> camcorder: You don't want to, no.
[10:43:47] <camcorder> hmm
[10:44:00] <camcorder> then designer gui became partially useless
[10:44:20] *** mastroDani has joined ##java
[10:44:29] <camcorder> or I should create my own JPanel using the grouplayout of mainPanel (which netbeans project creates automatically)?
[10:45:47] <camcorder> grouplayout looks like a hack to create a gui designer, as far as I see.
[10:46:13] *** xiliax has joined ##java
[10:46:36] <camcorder> using it with handwritten code can easily end up with spagetti code
[10:49:30] *** gelignite has joined ##java
[10:49:33] *** Kamaran has joined ##java
[10:49:43] <freeone3000> GroupLayout contents are changed through creating Groups. And yes, GUI Designers for Swing tend to produce poor code.
[10:50:01] *** pen has quit IRC
[10:50:14] *** gelignite has quit IRC
[10:54:10] *** supercosmonaut has joined ##java
[10:54:30] *** Pozejdon has joined ##java
[10:55:11] *** gelignite has joined ##java
[10:56:00] *** gelignite has quit IRC
[10:56:05] *** larsivi has joined ##java
[10:57:18] *** talios is now known as naked
[10:57:38] *** Alvo has joined ##java
[10:57:42] *** abhijain has joined ##java
[10:57:46] <larsivi> Hi - I have a question with regard to the Java specification and the decision to omit implicit to-bool conversions (such are as present in C/C++) in conditions and expressions - do some documentation with examples exist as to why the decision was made?
[10:58:11] <Alvo> hi, where can i find <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> ?
[10:58:29] <Alvo> 1.2 seems not to be out
[10:59:13] <naked> alvo - god only knows since the demise of the old java.net maven repo. It might be under a different groupId/artifact now tho. which, if you're trying to solve a dep. on a different library - good luck :(
[10:59:51] <Alvo> larsivi: i dont know exactly decision but general decisions might be that java had no operators at all
[11:01:01] *** xeviox has joined ##java
[11:01:18] *** nuvolari has joined ##java
[11:01:19] *** supercosmonaut has quit IRC
[11:01:42] *** fr0ggler has joined ##java
[11:02:10] <xeviox> hi, I'm using spring with jpa, any ideas what kind of query I have to create to check if a entity is in the table?
[11:02:33] <xeviox> using getResultList().count or something like that?
[11:03:11] <xeviox> the problem, first I used .getSingleResult, but that throws an error if no result is present
[11:03:44] *** [[thufir]] has joined ##java
[11:04:09] *** gelignite has joined ##java
[11:05:40] *** supercosmonaut has joined ##java
[11:06:27] *** pen has joined ##java
[11:07:06] *** javobiwan has joined ##java
[11:10:02] *** mastroWork has joined ##java
[11:11:25] *** Peej has joined ##java
[11:11:36] <mitch0> isn't there something like .get() or find() ?
[11:11:54] *** wliao has quit IRC
[11:12:25] *** pen has quit IRC
[11:13:36] *** mastroDani has quit IRC
[11:15:13] *** abhijain has quit IRC
[11:16:51] *** Tyred has joined ##java
[11:17:47] *** tigger0jk has quit IRC
[11:19:01] <freeone3000> xeviox: .getSingleResult() and catch the error, perhaps?
[11:22:52] *** pZombie has joined ##java
[11:23:09] <larsivi> Alvo: Java didn't have boolean operators in the beginning?
[11:26:30] *** scruz has joined ##java
[11:26:35] <ztj> Alvo: don't believe everything you read on the internet
[11:26:50] *** naked is now known as Talios
[11:27:09] *** psst has joined ##java
[11:27:51] <scruz> i'm definitely getting old
[11:28:22] *** rvncerr has quit IRC
[11:28:54] *** mastro has joined ##java
[11:31:34] *** nuvolari has quit IRC
[11:31:43] *** mastroWork has quit IRC
[11:33:12] *** Ledgrip has joined ##java
[11:33:25] *** joakimk has quit IRC
[11:34:15] *** JohanSJA has quit IRC
[11:35:09] <Ledgrip> Hello?
[11:35:49] <Ledgrip> anybody here?
[11:35:59] <Tyred> Hi
[11:36:14] <[switch]> Ledgrip: morning
[11:36:23] <Ledgrip> Hello, sir' or maddam
[11:36:24] <[switch]> well here anyway :P
[11:36:25] <fr0ggler> nope, I'm not.
[11:36:40] <[switch]> fr0ggler: see last :)
[11:36:49] <Ledgrip> Is there anybody in here who can help me get a jumpstart on java?
[11:36:58] <fr0ggler> ~~Ledgrip tutorial
[11:36:58] <javabot> Ledgrip, Please see http://download.oracle.com/javase/tutorial/
[11:37:02] <fr0ggler> ~~Ledgrip rbi
[11:37:03] <javabot> Ledgrip, rbi is http://download.oracle.com/javase/tutorial/reallybigindex.html
[11:37:11] <fr0ggler> ~~Ledgrip book
[11:37:11] <javabot> Ledgrip, Download these two beginners' bibles free of charge: 1) Sun Java Tutorial at http://java.sun.com/docs/books/tutorial 2) Bruce Eckel's "Thinking in Java" at http://www.mindview.net/Books/TIJ
[11:38:25] <Ledgrip> I have the book Head First 2nd Edition. But i learn better when somebody can help me get the basics down first
[11:38:46] *** mastro has quit IRC
[11:38:50] <ztj> go to school then
[11:38:56] <fr0ggler> Ledgrip, then pay for a tutor. if you have specific java questions, then ask here. "teach me java" isn't what we're here for.
[11:38:59] <ztj> hire a tutor
[11:39:06] * ztj gasps
[11:39:28] <fr0ggler> ztj, i know. and there you were thinking you were someone's dedicated Java bitch.
[11:39:31] <Ledgrip> I cant afford a tutor
[11:39:40] <fr0ggler> Ledgrip, then read.
[11:39:52] <fr0ggler> I learnt without a tutor, so can you.
[11:39:52] <ztj> learn to be a tutor, then tutor yourself
[11:40:19] <ztj> Funny that the word tutor is such a big part of the word tutorial
[11:40:21] <ztj> funny indeed
[11:40:34] <[switch]> :)
[11:41:00] <Ledgrip> wow, I was just asking a question. I could do without the smart ass comments. I have done nothing to you. Just a guy looking for a little help, clearly this isnt the place
[11:41:39] <ztj> Imposing your laziness on others is a thing that you did, it's not well respected here, your mistake. We'll get over it.
[11:41:45] <[switch]> Ledgrip: the URLS already given here are your best place to start.
[11:42:50] * ztj stretches
[11:43:03] <ztj> It's been a while, I'm rusty. It's hard work being such an asshole.
[11:43:13] <fr0ggler> Ledgrip, we've given you some help. As I said, if you have specific questions, that's fine. We aren't your dedicated tutors.
[11:43:19] *** javobiwan has quit IRC
[11:43:42] <fr0ggler> ztj, but you do it so well! :)
[11:44:13] <ztj> We all must have our talents
[11:44:25] *** mastro has joined ##java
[11:44:37] <pZombie> i cannot find mine
[11:45:03] <ztj> Your talent is being named after the worst Pizza Hut novelty menu item ever conceived.
[11:45:05] <[switch]> pZombie: look closer, its there somewhere
[11:45:08] <Ledgrip> Im not lazy, Thats why I have all those links stored in my Browser and I bought a book. Im just asking for a few pointers. But as I said before, This isn't the place for help. Only snarky attitudes. So thanks but no thanks. Im trying to be serious and you're just making jokes. I will find somebody who isn't a Dick.
[11:45:20] <fr0ggler> Ledgrip, really, we're helping you.
[11:45:25] <ztj> Ledgrip: your loss
[11:45:31] *** frangiz_ has quit IRC
[11:45:34] <ztj> I learned everything about java here *shrug*
[11:45:50] <fr0ggler> Ledgrip, we're not being dicks at all. You just don't seem to like our answers for you. By all means, if you need specific help, ask here.
[11:45:54] <ztj> ~~ Ledgrip getting answers
[11:45:54] <javabot> Ledgrip, Not getting the kind of responses you'd like? Read this: http://www.mikeash.com/getting_answers.html
[11:46:31] *** frangiz has joined ##java
[11:47:03] <ztj> And if that doesn't solve your problem, here is a huge flock of geese taking off at once http://bit.ly/ij4Ke4
[11:47:11] <Ledgrip> I'll just figure it out on my own.
[11:47:23] <ztj> Maybe (a) gosling is in there somewhere
[11:47:31] <fr0ggler> ztj, boom tish.
[11:47:52] <scruz> hi fr0ggler, ztj
[11:47:58] <fr0ggler> Ledgrip, that's what I did. And I ask in here for help with specific things, as well as googling and using forums. It's just sensible.
[11:48:02] <fr0ggler> we have day jobs you know.
[11:48:11] * scruz can't believe that he forgot that a ^ 0 = a
[11:48:12] *** paissad has quit IRC
[11:48:16] <fr0ggler> hey scruz
[11:48:56] <Ledgrip> I understand. Thanks
[11:49:23] <scruz> Ledgrip: my advice, so you don'y get pissed off, ask for specific things. and show code as much as possible when asking
[11:49:38] <ztj> I think he did the latter
[11:49:43] <ztj> by technicality
[11:50:07] <Ledgrip> Will do.
[11:50:08] <scruz> if you don't assume you're obligated to get an answer, you're more likely to learn stuff in here
[11:50:23] *** javahorn has joined ##java
[11:50:29] <javahorn> Hi
[11:50:33] <scruz> ~xor
[11:50:33] <javabot> scruz, what does that even *mean*?
[11:50:40] <xeviox> freeone3000: this would work, but I don't like using exceptions when there is a high possibility that they may raise (then its not an exception ^^)
[11:50:42] <ztj> ~operators
[11:50:42] <javabot> ztj, operators is http://java.sun.com/tutorial/java/nutsandbolts/operators.html
[11:50:49] <javahorn> if i have to modify a signature, it says remove @Override,why so?
[11:51:12] <fr0ggler> javahorn, because it no longer matches the superclass' method signature?
[11:51:13] <ztj> javahorn: don't you know what @Override means?
[11:51:19] *** Xeli has joined ##java
[11:51:30] <scruz> what fr0ggler said
[11:51:41] <javahorn> ztj: yes a bit, that is new flavour in the down hierarchy
[11:51:48] *** Ledgrip has left ##java
[11:51:48] <scruz> override means you're exactly matching the signature
[11:51:55] <javahorn> fr0ggler: superclass does not have it explicitly
[11:52:09] *** sig^ has joined ##java
[11:52:10] <ztj> javahorn: no it means the method it's adorning directly overrides (or implements in the case of interfaces) a parent class's method (or interface's method)
[11:52:33] <ztj> javahorn: so if you change the super class/interface or the subclass method and it stops matching, you get warnings. It's a service to you.
[11:52:57] <ztj> javahorn: now you know that your overridden method isn't actually matching any super class's method
[11:53:11] <ztj> javahorn: so either you need to fix the other part of the equation or remove override because you don't actually want to be overriding
[11:53:25] <javahorn> ztj: ok, let me go to other half
[11:54:19] <javahorn> ztj: fr0ggler thanks
[11:54:31] <scruz> well, that's...new
[11:55:47] <ztj> heheh someone looked at my geese
[11:56:10] <Phil-Work> campaign2 is "17364_gill christmas gifts" and campaign2.matches("^[0-9]{3,}_") returns false
[11:56:14] <Phil-Work> what's wrong there? :S
[11:56:57] <Phil-Work> hm, does the whole string need to match?
[11:56:59] <ztj> Phil: it has to match the string as a whole, it's not find it's matches
[11:57:01] <Phil-Work> i.e. do I need a .* at the end
[11:57:03] <ztj> yes
[11:57:07] <Phil-Work> ah, thanks :)
[11:57:15] <Phil-Work> thus I don't need the ^?
[11:57:30] <ztj> not really but I don't think it hurts anything
[11:57:35] <Phil-Work> alright, thanks
[11:58:39] *** forneus has joined ##java
[12:00:06] * scruz mutters to javabot xor is exclusive or
[12:01:13] <Niek> [11:47:14] scruz can't believe that he forgot that a ^ 0 = a <-- if you're talking about math, a^0=1
[12:02:13] <scruz> Niek: really? try it on a calculator. any numeric value xor'ed with 0 returns itself
[12:02:40] <Niek> ah, xor'd
[12:02:51] <Niek> ^ is also the notation for power.
[12:02:59] <Niek> exponent
[12:03:00] *** nuvolari has joined ##java
[12:03:01] <scruz> not in computing it's not
[12:03:02] *** mastro has quit IRC
[12:03:04] <Niek> true.
[12:03:06] <ztj> not in java you mean
[12:03:21] <Niek> but I thought you were talking about math, that's why I said "if youre talking about math"
[12:03:35] <scruz> or C, or C++, or C#...
[12:03:47] <Niek> it was unclear for me if you meant xor or pow with ^
[12:03:59] <Niek> try it in the Google calculator with ^ ;-)
[12:04:00] <scruz> don't mind me
[12:04:49] <ztj> scruz: never fear, it is impossible for your mind to be as hazy as this landscape http://bit.ly/gVCNci
[12:05:23] <ztj> Niek: I suspect its syntax matches unix bc
[12:05:27] <scruz> ztj: you sure do take a lot of photos, don't you?
[12:05:41] <ztj> scruz: it's what photographers do
[12:06:00] <ztj> even amateur ones
[12:06:15] <scruz> and would i be correct in assuming that statement implies you are a photographer?
[12:06:33] <ztj> enthusiastically
[12:07:08] <ztj> Hm I only have 287 photos publicly visible. Not too many for less than one year in the hobby
[12:07:16] * scruz goes off on a mental tangent and plans how to convince ztj that the camera, and not he, takes the photos
[12:07:36] <ztj> scruz: you would have a hard time convincing any actual photographer of that sentiment
[12:07:56] <ztj> Like claiming a painter does not paint, but his brush does.
[12:08:08] <pZombie> there is no photo
[12:08:14] <scruz> and all of them would have a hard time printing photographs from memories
[12:08:22] *** mastro has joined ##java
[12:08:36] <ztj> A camera does nothing on its own
[12:08:51] <pZombie> the photographer picks the motive
[12:08:55] <scruz> a camera does camera stuff on its own
[12:09:01] <ztj> a camera does nothing on its own
[12:09:12] <pZombie> it does a lot on it s on
[12:09:19] <scruz> it looks like a camera on its own. that has *got* to count, doesn't it?
[12:09:19] <ztj> no, it does nothing until prompted
[12:09:21] <pZombie> it can even take photos on it s own
[12:09:28] <ztj> only if instructed to do so
[12:09:35] * scruz will stop pulling ztj's leg now
[12:10:16] * ztj pushes the dissenters in front of this train http://flic.kr/p/8TQxEz
[12:10:48] * scruz doesn't hear the dissenters' screams
[12:10:50] *** mischievious has quit IRC
[12:10:57] <pZombie> those photos have nicer colors than reality
[12:11:08] <scruz> officer, it's ztj! he killed all those peoples!
[12:11:21] <ztj> pZombie: you must not have seen reality, it's pretty colorful
[12:11:37] <pZombie> not as colorful as your photos
[12:11:41] <ztj> sure it is
[12:12:19] <Peej> Java is just great.
[12:12:32] <Peej> that is all.
[12:12:44] <ztj> Java keeps me employed so that is pretty great.
[12:13:04] *** Talios has quit IRC
[12:13:16] *** diminish has quit IRC
[12:13:30] *** diminish has joined ##java
[12:14:32] *** RLa has joined ##java
[12:14:50] <ztj> pZombie: the human perception of light and color is so incredibly askew, what with the effects of the physics of the eye, the limits of the optical nerve and the huge amount of subconscious reconstruction that goes on in the brain (you know, the center of your vision in each eye is blind. It is in everyone.)
[12:17:57] <pZombie> is it possible to combine zoom + magnifying into one camera lens?
[12:18:04] *** pipeep has quit IRC
[12:18:26] <pZombie> like zoom in 50x to someones face, and then magnify one of his pimples x5?
[12:18:52] <pZombie> or even combine that with microscopy
[12:19:45] *** xiliax has quit IRC
[12:20:04] *** xiliax has joined ##java
[12:20:18] <scruz> pZombie: one camera lens generally has a single focal length. all the zoom and stuff works by combining several lenses iirc
[12:20:36] <fr0ggler> pZombie, magnification is a factor of "zoom" (or focal length)
[12:20:59] <pZombie> yes, but usually you can zoom to someone's face, but you cannot get down to watch cells on his skin move
[12:21:16] <fr0ggler> pZombie, that's because the "zoom" doesn't go far enough
[12:21:36] <pZombie> like, you i attach the output of that zoom objective which does 50x to a microscope input and get to see cells?
[12:21:39] <scruz> i think that's because the cells on his skin are dead, too
[12:22:21] <pZombie> well, i read somewhere that once there existed such a magnifying zoom objective
[12:22:39] <ztj> pZombie: theoretically that's possible but the optic would be pretty huge
[12:22:55] <fr0ggler> pZombie, light accumulation would be a distinct problem. there are adapter lenses that magnify but you lose on f values.
[12:23:07] <ztj> it's actually quite hard to make lenses that have high enough resolution to produce that small of a thing at a visible size from a distance
[12:23:08] <scruz> yup. hence the close-up for microscopes
[12:23:14] <pZombie> why are you all experts on optics ffs?
[12:23:23] <scruz> what's an f-value, anyway?
[12:23:24] <pZombie> i feel like i am surrounded by aliens
[12:23:32] *** mxweas has quit IRC
[12:23:39] <scruz> i did physics some years back. like 13 or so
[12:23:40] <fr0ggler> scruz, indeed and hence the reason why light microscopes have large lighting rigs
[12:23:49] <fr0ggler> pZombie, and it's kind of common sense :)
[12:23:56] <ztj> scruz: he's referring to aperture which is not really the right thing, t-stops is what he should be referring to but aperture ratios imply change in t-stops
[12:23:57] *** forneus has quit IRC
[12:24:02] <ztj> (though it varies by lens)
[12:24:04] <fr0ggler> pZombie, why do you think the better telescopes have larger apertures?
[12:24:19] *** forneus has joined ##java
[12:24:21] <psst> pZombie: then why did you ask on ##java?
[12:24:25] <fr0ggler> psst, heh
[12:24:34] <ztj> actually better telescopes have smaller apertures, which allows for finer detail
[12:24:46] <[switch]> the things you can learn in a ##java channel..
[12:24:51] <ztj> smaller aperture lenses are a bigger challenge due to diffraction
[12:24:59] <pZombie> intuition i guess i would find all experts on optics in the ##java channel
[12:25:04] <fr0ggler> ztj, its a balance between focal length and aperture
[12:25:07] <[switch]> lol
[12:25:09] *** mastroWork has joined ##java
[12:25:12] <fr0ggler> at least, how I understood it
[12:25:16] <ztj> pZombie: it's not that hard to learn about lenses, the factors haven't changed much in 100 years
[12:25:27] <ztj> fr0ggler: depends on the type of lens, the purpose, etc.
[12:25:32] <fr0ggler> ztj, aye.
[12:25:37] <pZombie> i d like to create my own modular lenses
[12:25:48] <fr0ggler> pZombie, you can. lenses and adapters exist
[12:25:49] <ztj> wide apertures allow incidental light which causes circles of confusion which is not desirable for scientific purposes
[12:25:50] <pZombie> so i can build modular objectives for all purposes
[12:26:16] <fr0ggler> ztj, but magnification ability decreases I guess.
[12:26:17] <ztj> you can combine lenses but without the design to do so in the first place you'll often see quick degradation of resolution or quality in one form or another
[12:26:31] <fr0ggler> hence, electron microscopes. there's only so far you can go with light.
[12:27:00] <scruz> those only work in a vaccuum. no crawling cells here
[12:27:10] <dreamreal> morning
[12:27:14] <fr0ggler> hey dreamreal
[12:27:22] <scruz> afternoon
[12:27:40] <ztj> fr0ggler: well now you'll get into the realm of actual aperture size to subject size ratios rather than focal length to aperture ratios but yeah it impacts things at certain scales
[12:27:41] *** Raju has joined ##java
[12:27:44] <fr0ggler> you've joined us in a very java related microscopy session.
[12:27:53] <fr0ggler> ztj, yeah.
[12:27:54] <dreamreal> oh?
[12:28:05] <ztj> but regular skin cells aren't all that small
[12:28:11] <fr0ggler> i can see mine!
[12:28:13] <ztj> no need for an electron microscope for that :)
[12:28:32] *** mastro has quit IRC
[12:28:49] <ztj> however there is a bigger problem for imaging at that magnification which is of course the extremely shallow depth of field (hence the need for narrowest possible aperture for the subject size)
[12:29:08] <_W_> there's an actual photography channel on this network, only I can't remember its name, and it's apparently +s
[12:29:19] <ztj> if you were going to try and image a cell from a distance you'd have issues with intersecting the focal plane and the cells
[12:29:35] *** Raju has quit IRC
[12:29:50] <jink> _W_: search your logs? :/
[12:29:58] <ztj> it's the whole reason you flatting shit out on a slide when you use a microscope
[12:30:02] <ztj> err flatten
[12:30:03] <DroidAgent> Where's cheeser? :D
[12:30:09] <_W_> haven't been in it for over a year, and don't have logs that far back
[12:30:15] <_W_> ~be cheeser
[12:30:15] <javabot> that's very interesting, but what's that got to do with java?
[12:30:25] <DroidAgent> :)))
[12:30:45] <jink> _W_: /msg alis list *photo* ?
[12:31:33] <_W_> I did a /list and it didn't have it, so I am guessing it's actually secret
[12:32:05] <jink> I'm not sure how alis handles that, but you might be right.
[12:33:07] <_W_> (or have since moved network or otherwise disappeared)
[12:33:10] <ztj> well #photography is +s
[12:33:26] <ztj> er well #photogeeks which is what it forwards to
[12:33:38] <_W_> photogeeks! that was it
[12:34:09] <_W_> also, duh on the #photography redirect
[12:35:08] <_W_> so, yes, everyone buzz off to #photogeeks :p
[12:35:29] <jink> :P
[12:35:47] <_W_> anyone know of a compression algorithm specifically tailored to Java source code?
[12:35:48] <pZombie> Just one last question, since there are so many experts on optics here. What would happen if i use a high quality lens which is usually used to check diamonds and such, and can magnify 15x optical in high quality, and then put that lens in front of a high resolution CMOS digital cam with the objective removed, at the right distance, would it magnify the object in front of the lens when recording video?
[12:35:54] <ztj> it may be the only channel on fn with more snark than this one
[12:36:50] <javahorn> ztj: public class A extends B implements C I changed the signature of a method createItem on interface C. Remove @Override in implementation class A and pass the two new param in createItem. But it warns of creating method in B(even though i create it, still it throws exception)
[12:37:09] *** selckin has joined ##java
[12:37:38] <ztj> pZombie: depends on the lens and where it casts its light in focus and the size of that circle, but it's theoretically possible. FYI, there are microscopic lenses for modern (D)SLR cameras. They are specialty but they exist.
[12:39:25] <pZombie> they are also very expensive
[12:39:26] *** Guyman has joined ##java
[12:39:34] <fr0ggler> pZombie, good lenses generally are
[12:39:45] <Guyman> if i implement Comparator in java, is the implementing class should be abstract?
[12:40:01] <FauxFaux> Guyman: Given you need to instanciate it?
[12:40:13] <Guyman> why would i need to?
[12:40:20] <Guyman> i just use it as static
[12:40:21] <FauxFaux> To pass it to people?
[12:40:26] <Guyman> umm
[12:40:32] <Guyman> i dont know yet, but i got your point
[12:40:40] <Guyman> mostly it would be abstract, right?
[12:40:46] <ztj> pZombie: lenses are tough to make and have a relatively low level of demand and what's worse, once you get a good one you pretty much never have to replace it (unless you can't find a proper mount for a newer imager or whatever)
[12:41:08] <javahorn> ztj: what is being missed?
[12:41:11] <ztj> hell I just proudly bought a Nikkor lens that was new 10 years ago. Loving it. Will probably keep loving it for years.
[12:41:27] <ztj> javahorn: pastebin dude, I can't answer your theoreticals which could just be flat out wrong
[12:41:34] <FauxFaux> Guyman: An implementation of a single-method interface would be abstract? No? Why?
[12:41:54] <_W_> Guyman, your question really makes no sense
[12:42:00] <Guyman> why not?
[12:42:24] <Guyman> we dont need to instanciate usally, we just prove it 2 objects and get an int back
[12:42:29] <Guyman> provide(
[12:42:30] <_W_> Guyman, every implementation I have made of Comparator has been public final
[12:42:31] *** scruz has quit IRC
[12:42:40] <Guyman> ok..
[12:42:50] <_W_> (if you don't know, final rules out abstract)
[12:43:00] <Guyman> i know
[12:43:04] <ztj> Guyman: because the interface defines Comparators as things you instantiate then provide the instance. Nothing stops you from providing the same actual instance everywhere, but you still have to have one.
[12:43:59] <Guyman> alright
[12:46:46] *** espeed has quit IRC
[12:48:17] *** Marcofe has joined ##java
[12:52:27] *** Skyec has joined ##java
[12:53:23] *** pen has joined ##java
[12:54:24] *** camcorder has quit IRC
[12:55:59] *** pipeep has joined ##java
[12:56:19] *** mr_daniel has quit IRC
[12:59:02] *** mastroWork has quit IRC
[13:00:20] <pZombie> does Thread.yield() actually work? It seems to return way faster than the lowest Thread.sleep(1) one could use.
[13:01:07] <tjololo> I think yield only allows other threads to execute before the thread you called yield on
[13:01:16] *** zChris has quit IRC
[13:02:11] <FauxFaux> Operating systems don't trust programmers to yield sensibly 'cos generally they don't. Also, it soundsl ike you're using it wrong if you care about how long it takes.
[13:02:48] <_W_> in general, you don't use yield
[13:03:22] <tjololo> if there is no other threads waiting to execute then yield will not pause (asfar as you can notice)
[13:05:44] *** FrozenKnight has quit IRC
[13:06:23] *** FrozenKnight has joined ##java
[13:07:53] <javahorn> ztj: http://pastebin.com/0dngJgEV
[13:09:55] *** Ch30ps has quit IRC
[13:10:15] *** Ch30ps has joined ##java
[13:10:15] *** mah01 has joined ##java
[13:10:33] *** Ch30ps has quit IRC
[13:10:40] *** gelignite has quit IRC
[13:10:42] *** zuxqoj has quit IRC
[13:11:10] *** Versuchen has joined ##java
[13:13:10] *** tombee has quit IRC
[13:13:31] *** Cymage has joined ##java
[13:18:04] *** Engin has joined ##java
[13:22:27] *** topriddy has joined ##java
[13:23:15] *** glcrazy has quit IRC
[13:24:08] *** Railgun has quit IRC
[13:25:05] <topriddy> hi, am having problems integrating guice with jersey running in my web app, Daos are injected in the pages but not in the web services. i googled jersey-guice, used the lib, didnt work still, seems the versions arent maintained. any pointers?
[13:28:02] <RLa> why not just use jersey and guice
[13:28:29] *** Alvo has quit IRC
[13:30:07] *** Niek has quit IRC
[13:32:38] *** Cymage has quit IRC
[13:32:49] *** Ch30ps has joined ##java
[13:35:04] *** Cymage has joined ##java
[13:35:17] <Peej> any pointers, no sorry not in Java.
[13:35:25] <Peej> Did you see what i did thar?!
[13:35:52] <Peej> Sorry topriddy, i cant actually help but i thought i'd be funny and bring some laughter :>
[13:36:30] <dreamreal> Peej: it's not so funny when you're wrong, though :)
[13:36:38] *** bitshuffler has joined ##java
[13:39:33] *** harry_ has quit IRC
[13:42:44] *** Ch30ps has quit IRC
[13:43:15] *** Ch30ps has joined ##java
[13:43:58] *** glcrazy has joined ##java
[13:44:47] <topriddy> RLa: couldnt get guice to inject into Jersey by default. even when same daos were injecting successfully into my Wicket web pages
[13:45:14] <RLa> i read that with jersey you cannot use constructor injection
[13:46:22] <topriddy> RLa: i am doing field injection. ie public class Foo{@Inject PersonDao personDao; public Foo(){}}
[13:46:38] <RLa> hm, weird
[13:47:26] *** poccha has joined ##java
[13:47:52] <Peej> :(
[13:48:37] <Peej> dreamreal, people can laught at me. All are merry!
[13:49:05] * tjsnell laughs
[13:49:18] *** mastroDani has joined ##java
[13:49:56] *** frangiz has quit IRC
[13:50:17] *** frangiz has joined ##java
[13:50:32] *** glcrazy has quit IRC
[13:50:51] *** Engin has quit IRC
[13:54:40] *** vdv has quit IRC
[13:55:24] *** Vorrin has joined ##java
[13:56:27] <Vorrin> hello, I'm displaying a Jlist in a Jscrollpane in a Jpanel. Weirdly the scrollpanel scrolls down way past the end of the list which only contains a handful of elements. Does anyone have an idea about what I am doing wrong?
[13:58:34] <Vorrin> oh, I had initialized the list as a massive one, which was not needed, obviously I noticed now that I asked, rather than in the past hour that I've been trying to work out why -_-
[13:59:19] *** pythonirc101 has joined ##java
[13:59:41] <pythonirc101> how do i find out whether my java installation is 32-bit or 64-bit on windows (preferably from the command line)
[14:00:13] <dreamreal> pythonirc101: java -version
[14:00:23] <dreamreal> here, I'll show you
[14:00:28] <dreamreal> java version "1.6.0_20"
[14:00:28] <dreamreal> OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1)
[14:00:28] <dreamreal> OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
[14:00:35] <dreamreal> see that "64-Bit" there?
[14:00:40] <pythonirc101> java version "1.6.0_23", Java(TM) SE Runtime Environment (build 1.6.0_23-b05), Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
[14:00:46] <pythonirc101> I dont see a 64/32 there?
[14:00:53] <ztj> then it's 32 bit
[14:00:58] <pythonirc101> thanks
[14:01:00] <dreamreal> then it's 32
[14:01:05] *** Johannes13 has joined ##java
[14:01:12] <ztj> pythonirc101: 64 bit is still largely a "special" case
[14:01:21] <ztj> as it offers almost no benefit beyond a larger max heap
[14:01:31] <ztj> (and some specific algorithms are faster, like gzip for some reason)
[14:01:47] <pythonirc101> thanks
[14:06:48] <mitch0> gzip is phased out anyways with xz :)
[14:07:42] <ztj> ha
[14:07:48] *** mastroWork has joined ##java
[14:08:00] <ztj> just like a thousand other things set to replace pkzip have not succeeded
[14:08:18] <ztj> gzip will continue to be, for a very long time, the most compatible compression in certain contexts
[14:10:50] <pythonirc101> when i run a java program (weka), I get this error: Not enough memory. How can i increase the heap size for weka?
[14:11:20] *** mastroDani has quit IRC
[14:11:56] *** mrdata has joined ##java
[14:12:01] *** SpitfireWP has joined ##java
[14:12:10] *** SpitfireWP has left ##java
[14:12:13] *** SpitfireWP has joined ##java
[14:13:56] *** dextro_ has quit IRC
[14:14:14] *** wilfredor has joined ##java
[14:14:22] <wilfredor> Good afternoon
[14:14:26] *** SpitfireWP has left ##java
[14:14:35] <wilfredor> I'm a ANT user
[14:14:49] <wilfredor> I'm trying build a big proyect
[14:14:56] <wilfredor> but I have the follow error "at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:999)"
[14:15:06] *** mrdata has left ##java
[14:15:12] <wilfredor> I changed the ANT memory size
[14:16:33] *** tombee has joined ##java
[14:17:27] <Candle> ~~ wilfredor enter
[14:17:28] <javabot> wilfredor, enter is not punctuation. Please don't press your Enter or Return key until you've finished typing your question, sentence, or idea. It is annoying to see that and hard to follow.
[14:17:34] <Candle> ~ wilfredor paraphrase
[14:17:35] <javabot> Candle, what does that even *mean*?
[14:17:38] *** vague` has joined ##java
[14:17:47] <ztj> ~don't paraphrase
[14:17:47] <javabot> ztj, what does that even *mean*?
[14:17:50] <ztj> it's gone
[14:17:52] <ztj> jerks
[14:18:00] <Candle> ~~ wilfredor paraphrase
[14:18:01] <javabot> wilfredor, Don't paraphrase code or errors. If you knew what was important to show us, you wouldn't need us to answer your question. You should pastebin the *actual* code and the *actual* error. Anything else is most likely going to be useless.
[14:18:11] <ztj> ah I see you forgot a ~
[14:18:14] <Candle> no, I just failed at adding two ~.
[14:18:59] *** glcrazy has joined ##java
[14:19:22] *** ojacobson has joined ##java
[14:19:31] <vague`> Anyone have experience with the MQSeries java classes, how is the writing to remote clustered queues? Simple to setup? I'm attempting this in perl atm and it's driving me nuts. I would like to have some forknowledge before I start with java if possible.
[14:20:02] <wilfredor> Candle: the full mistake is here http://java.pastebin.com/5aRAAFFV
[14:20:09] *** frangiz has quit IRC
[14:20:31] *** frangiz has joined ##java
[14:20:46] *** halhorn has joined ##java
[14:21:07] *** mastroWork has quit IRC
[14:23:54] <Candle> wilfredor: Ok, so there's a compiler error somewhere, find where the ant task has put the output from the compiler and fix it.
[14:24:20] <wilfredor> I can't to see the compiler output
[14:26:02] *** Optic has joined ##java
[14:26:17] <wilfredor> If someone could help me try to do everything possible to facilitate the help, I hope you can understand that my knowledge of ant is almost nil
[14:26:35] *** mastroDani has joined ##java
[14:26:45] <Candle> Can you compile the project without ant?
[14:27:15] <wilfredor> I have read the tutorials online, and I understand to some extent, however, the performance for certain cases of the tool is what I do not know
[14:27:21] <paulweb515> wilfredor: http://ant.apache.org/manual/
[14:27:31] <paulweb515> wilfredor: can't you find your javac task and ask for verbose output?
[14:27:32] *** tissue has quit IRC
[14:27:47] *** pZombie has quit IRC
[14:27:48] <wilfredor> The project can be compiled fine without ant
[14:27:55] <wilfredor> paulweb515: I readed already that
[14:28:12] <dreamreal> wilfredor: why are you using ant?
[14:28:27] <wilfredor> I even read a book about ant, however, I am not familiar with their errors
[14:28:32] *** bfuster has quit IRC
[14:28:32] <paulweb515> wilfredor: and does your javac task product verbose output?
[14:28:47] <wilfredor> dreamreal: It is a requirement to automate builds
[14:29:19] <wilfredor> paulweb515: ant build build.xml -debug =
[14:29:28] <dreamreal> wilfredor: Maven.
[14:29:43] <Candle> wilfredor: Check the javac task and remove anything that isn't completely needed. The 'nowarn' should definitly be the default: 'off'.
[14:29:50] <paulweb515> wilfredor: that's not the javac task I've now mentioned twice
[14:30:01] <paulweb515> wilfredor: you are the one with the build.xml, you *must* read it
[14:30:05] <paulweb515> ~~ wilfredor rif
[14:30:06] <javabot> wilfredor, Reading Is Fundamental
[14:30:36] <Candle> It's probably at line 71 of the build.xml, you know, as the error message says.
[14:31:13] <wilfredor> That line has nothing in particular that would suggest an error. I think so
[14:31:54] <Candle> You know what was said about paraphrasing earlier, that includes the code that is failing.
[14:32:09] <wilfredor> My build.xml is here http://java.pastebin.com/222xH2MB
[14:32:13] *** RLa has quit IRC
[14:32:46] <ojacobson> this is reminding me why I don't use ant any more
[14:32:54] <ojacobson> <jottinger> wilfredor: Maven.
[14:33:06] <wilfredor> Candle: There is no code that is failing. I think it's a configuration problem of tool
[14:34:42] <ojacobson> build.xml is effectively code (albiet code written in an XML dialect).
[14:34:42] <wilfredor> ojacobson: I have no choice, I can only use ant
[14:34:48] <ojacobson> It's strongly imperative.
[14:34:59] *** Mwa has joined ##java
[14:35:41] <Candle> ojacobson: I still use a little ant, but only in maven-antrun-plugin.
[14:35:56] <Mwa> Is there a way to silence all warnings in a package? JSON doesn't use generics in any of it's multitude of tangles, and it's driving Eclipse mad.
[14:36:04] <ojacobson> Candle: you can package up small ant scripts and use them as maven plugins. The plugin machinery supports it pretty reasonably.
[14:36:51] <ojacobson> Mwa: Use existing compiled versions rather than compiling it yourself (it's in central as org.json:json
[14:37:08] <ojacobson> Or use a less jank json library
[14:37:16] <Candle> ojacobson: Yes, creating a small maven plugin is pretty easy. but it *is* more initial work then throwing in an antrun definition.
[14:38:37] <dreamreal> wilfredor: why can you only use ant?
[14:39:20] <wilfredor> This is a standard among all enterprise-level developers
[14:39:26] <ojacobson> nnnnot so much, no
[14:40:02] <wilfredor> It is a requirement of the application, you can think that way
[14:40:18] <Candle> The 'enterprise' needs to update it's skill set then.
[14:41:03] <wilfredor> That's another problem, however, is not something that is going to do now or at some time
[14:42:04] <dreamreal> wilfredor: *nod* pragmatism always wins, just sucks when it's necessary like that
[14:42:55] <wilfredor> you're right
[14:42:56] <wilfredor> I agree
[14:43:03] *** Keepers has joined ##java
[14:43:23] <Keepers> someone familiar with jsp expression language?
[14:43:30] <Candle> ( wilfredor: you still need to find the output of the compiler that the an task is calling)
[14:43:33] <FauxFaux> ~~ Keepers ask
[14:43:33] <javabot> Keepers, The Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.
[14:43:41] <dreamreal> although what *I* would do is use maven, and tell it to build an ant script for you just to satisfy the "we use ant" requirement
[14:43:42] <Candle> ~~ Keepers anyone
[14:43:42] <javabot> Keepers, 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.
[14:43:49] <wilfredor> Candle: It's a windows bug
[14:44:05] <wilfredor> not resolved
[14:44:12] *** arborist has joined ##java
[14:44:14] <Keepers> i want to check if a parameter exists or not in a <c: if test="${}"></c:if>
[14:44:54] <Keepers> its like: <c:if test="${empty files.audio_transfer.uri and (not exist) param.defaultaudio_transfer}">
[14:45:05] *** rgr has joined ##java
[14:45:52] *** topriddy has quit IRC
[14:47:47] *** gelignite has joined ##java
[14:47:52] <aLeSD> maybe it's a stupid question. But is it a real cast? float x = 0.5f; Float y = (Float)x; ?
[14:48:06] <dreamreal> no.
[14:48:30] <aLeSD> dreamreal, in any VM implementation ?
[14:48:44] <wilfredor> the same mistake. http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200909.mbox/%3C5e76b0ad0909191130h3017c4e3p1b36228eba55510c at mail dot gmail.com%3E
[14:48:50] <aLeSD> (that was the stupid question)
[14:49:05] <dreamreal> aLeSD: errrrrrr
[14:49:06] <wilfredor> unsolved
[14:49:26] <dreamreal> I would imagine the java spec would cover this fairly clearly. It's not a cast: autoboxing is a conversion.
[14:50:41] *** frangiz has quit IRC
[14:51:49] *** frangiz has joined ##java
[14:54:49] *** CallToPower is now known as denmeyer
[14:54:56] *** VJTachyon has joined ##java
[14:56:02] *** Repox has quit IRC
[14:56:06] *** rgr_ has joined ##java
[14:57:10] *** denmeyer is now known as CallToPower
[14:57:44] *** rgr has quit IRC
[15:00:10] *** scruz has joined ##java
[15:00:53] *** raju has joined ##java
[15:02:34] *** mastroWork has joined ##java
[15:03:38] *** RedEx` has joined ##java
[15:06:47] *** mastroDani has quit IRC
[15:07:32] <scruz> is there a way to get the number of actual bytes stored in a byte array? to clarify, if you write into a byte array but you don't write into the entire array, is there a way to get the number of 'filled spaces' as it were?
[15:08:01] *** l2trace99 has joined ##java
[15:08:30] <Skyec> by filled spaces, do you mean non-0?
[15:08:32] <ojacobson> scruz: There's no such concept.
[15:08:37] <scruz> yup
[15:08:39] *** Guyman has quit IRC
[15:08:51] <scruz> ok
[15:08:55] <Skyec> is there a way to differiate between a valid 0 value and an empty value
[15:09:09] <scruz> i don't think so
[15:09:17] <Skyec> it sounds like you should probably be using a stream
[15:09:21] <scruz> well, 0 isn't null
[15:09:22] <cheeser> not with a primitive
[15:09:54] <Skyec> scruz: this might be helpful. http://download.oracle.com/javase/tutorial/essential/io/bytestreams.html
[15:10:20] <ztj> Skyec: java doesn't allow you to compile code that reads a variable that doesn't have a "valid value"
[15:10:42] <Skyec> it was more of a concept for what he was using it. not a syntatical one
[15:11:03] *** RedEx` has left ##java
[15:11:20] <Skyec> because if he is actually writing 0s through his byte array, he's going to have to track the length externally
[15:11:29] <Skyec> otherwise, he could just use a loop, although that might be expensive
[15:11:33] <ztj> which is a perfectly common thing to do
[15:11:45] <Skyec> ztj: ofc, but its worth asking anyway
[15:12:07] *** Sliker has joined ##java
[15:12:12] <wilfredor> Thanks for everything, I think my problem is too complex to hope that someone can devote so much time to help me. Have good day
[15:14:03] *** nuvolari has left ##java
[15:16:10] *** wilfredor has quit IRC
[15:17:08] *** saml has joined ##java
[15:17:42] *** frangiz has quit IRC
[15:20:29] *** bearded_oneder has joined ##java
[15:20:44] *** eyesUnclouded has joined ##java
[15:21:59] *** frangiz has joined ##java
[15:24:13] *** epalm has joined ##java
[15:25:07] *** danzik17 has joined ##java
[15:25:09] *** tilerendering has quit IRC
[15:27:56] *** L-----D has quit IRC
[15:28:11] *** TR2N has joined ##java
[15:29:11] *** monty_hall1 has joined ##java
[15:30:28] *** ldh has joined ##java
[15:31:02] *** monty_hall has quit IRC
[15:31:28] *** Phil-Work has quit IRC
[15:32:53] *** eyesUnclouded has quit IRC
[15:33:50] *** jdolan has joined ##java
[15:34:57] *** BeholdMyGlory has joined ##java
[15:37:37] *** alex88 has joined ##java
[15:37:50] *** jenue has joined ##java
[15:38:00] *** wchun has joined ##java
[15:39:29] *** eyesUnclouded has joined ##java
[15:39:30] *** matsebc has joined ##java
[15:39:38] <alex88> hi guys, i'm using this code, http://pastebin.com/ej7HtLAF for replacing a region of an image with the bufferedimage i supply, but writer.replacePixels is throwing exception UnsupportedOperationException, docs says that's because canReplacePixels is returning false, how can i know why it returns file? due file format or what?
[15:39:55] <alex88> *false
[15:41:09] <saml> so if it can'tReplacePixels, then you should not call replacePixels
[15:41:27] <saml> why not create a new Image and copy the entire image with replaced pixels?
[15:41:50] *** bduncan has joined ##java
[15:42:34] <alex88> because the image is very big and i get outofmemory trying to load it into memory, so i've done readimg that reads a region of image, then process it, and then write the processed one in the same region of a new image.
[15:43:14] <alex88> i'm thinking to create a new empty image compatible with replacepixels but i've no idea what's supported.
[15:43:24] *** mastroWork has quit IRC
[15:44:13] *** mortal1 has joined ##java
[15:44:25] *** monty_hall1 is now known as monty_hall
[15:44:51] *** sebersole has joined ##java
[15:45:07] <saml> alex88, it doesn't make sense for JPG writers to replace pixels
[15:45:27] <saml> maybe try "BMP"
[15:45:44] <saml> ImageIO.getImageWritersByFormatName("BMP").next();
[15:46:06] <alex88> saml: the final image should already exists right?
[15:46:25] *** tilerendering has joined ##java
[15:46:56] <saml> can you pipe streams?
[15:47:01] <saml> i don't know how imageio works..
[15:47:17] <alex88> i'm new to that too.. i'll try more... thank you
[15:47:22] <saml> but since image output is jpg.. writer is bmp..
[15:47:36] <saml> bmp | jpg | output
[15:48:03] <saml> do u have fully runnable program and demo image?
[15:48:11] *** raju has quit IRC
[15:48:34] *** frangiz has quit IRC
[15:48:35] <alex88> because i've to do like a parallel processing, block by block and the reassemble the whole image using map reduce.
[15:48:47] *** mastroWork has joined ##java
[15:48:48] <alex88> i've a sample image of 16kx16kx pixels for test.
[15:49:00] *** mortal1 has quit IRC
[15:49:10] <saml> no.. i'm not interested in parallel processingp art
[15:49:38] <saml> anyway try to pipe it. i think it's possible
[15:50:15] *** Luc1fel has joined ##java
[15:50:35] <saml> like.. bmpWriter.setOutput(jpgOutputStream);
[15:50:38] <saml> no i'm confused
[15:50:45] *** sbalmos has joined ##java
[15:50:49] *** devkhadka has quit IRC
[15:51:23] *** mortal1 has joined ##java
[15:51:59] *** Artefact2 has joined ##java
[15:52:22] <Artefact2> hello. why does System.err.println("[quote]\n".matches("quote")); prints false? what am I doing wrong?
[15:52:29] *** passwordoff has joined ##java
[15:52:38] *** supercosmonaut has quit IRC
[15:52:55] <deebo> because .matches is a regular expression
[15:53:03] <deebo> you want .contains (or similiar)
[15:53:15] *** frangiz has joined ##java
[15:53:16] <Artefact2> deebo: but "quote" is a valid regular expression too
[15:53:21] <cheeser> and it matches the whole string. and "quote" doesn't end with \n
[15:53:23] <deebo> .matches("\[quote\]") would match
[15:53:37] <deebo> oh yeah and add the \n
[15:53:45] <Artefact2> oooh. so java regexes have ^ and $ implied at the beginning/end?
[15:53:45] <deebo> altho i think without dotall mode it will match anyhow
[15:53:50] *** mxweas has joined ##java
[15:54:32] *** rgr_ has quit IRC
[15:55:03] *** horte has quit IRC
[15:55:16] <ojacobson> Artefact2: No, .matches checks that the entire region matches the regex.
[15:55:33] <ojacobson> You can simulate .matches with \A and \Z and find, though
[15:56:14] <Artefact2> ojacobson: ooh, right. .find() is exactly what I am looking for, thanks!
[15:56:41] <Artefact2> (i am used to php regexes, and preg_match doen't match only the whole string)
[15:59:18] *** scruz has quit IRC
[15:59:18] *** alex88 has quit IRC
[15:59:18] *** javahorn has quit IRC
[15:59:18] *** spectrahp has quit IRC
[15:59:31] <_W_> preg_match always reminds me that PHP is pregnant with failure
[15:59:38] *** larsivi has left ##java
[15:59:57] *** osmosis_paul has joined ##java
[15:59:57] <ojacobson> preg_match is, would you believe, a potential code-injection vector :-(
[16:00:06] *** osmosis_paul has quit IRC
[16:01:02] *** osmosis_paul has joined ##java
[16:01:06] <osmosis_paul> hello a simple question to read a file the path that i have to write is from my project right?
[16:01:14] <osmosis_paul> if my project is A anmd i have my file in B that is inside A the path would be /A/B/file right?
[16:02:29] <fr0ggler> osmosis_paul, that seems like a simple question, but I'm confused as to what you're trying to do
[16:02:50] <mitch0> fr0ggler: he's trying to confuse use
[16:02:57] <fr0ggler> he's doing a good job
[16:03:00] <Skyec> i don't need any help being confused
[16:03:34] <osmosis_paul> becuase i'm writing the path from project root without the project name of course path="/public/images/import/File" but File file = new File(Path) dont get anything
[16:03:42] *** passwordoff has left ##java
[16:04:02] <fr0ggler> osmosis_paul, what's a project got to do with it? and what actually is a "project"?
[16:04:15] *** mastro has joined ##java
[16:04:17] <osmosis_paul> once that i have the file i want to remove it file.delete()
[16:04:48] <osmosis_paul> proyect
[16:04:55] <fr0ggler> osmosis_paul, right ok. well it seems the confusion arises from where you think a "project" should store its files
[16:05:10] <fr0ggler> what do you mean by "project"? like in an IDE?
[16:05:39] <osmosis_paul> Java proyect
[16:05:49] <ojacobson> Java doesn't have a concept of projects
[16:05:56] *** Phil has quit IRC
[16:05:57] *** xeviox has quit IRC
[16:06:07] <fr0ggler> osmosis_paul, project doesn't mean anything in J... what ojacobson said
[16:06:34] *** TR2N has quit IRC
[16:06:45] <osmosis_paul> ojacobson, new java project in Eclipse? what IDE use? or use notpad :-P
[16:06:54] *** Behold has joined ##java
[16:06:57] <ojacobson> osmosis_paul: that's entirely an IDE-specific concepts.
[16:06:57] <fr0ggler> osmosis_paul, it makes no difference
[16:06:58] <ojacobson> concept.
[16:07:07] <ojacobson> From Java's point of view, it's just classes, resources, and the filesystem
[16:07:35] <ojacobson> You *probably* want getResource or getResourceAsStream for resources that are going to be part of your program (images, etc), though.
[16:07:38] <ojacobson> ~resources
[16:07:38] <javabot> Put your resources inside the jar file together with your class files, then use YourClassName.class.getResourceAsStream("foo.png") for images in the same directory as your class file, or YourClassName.class.getResourceAsStream("/images/foo.png") if your resources are in a dir named 'images' in the root of the jar file. Do NOT use ClassLoader.getResource. More info: http://is.gd/4IGHp
[16:07:49] <osmosis_paul> Ok in Eclipse you can separate by "projects" in others IDE's as Inteligent you cannot
[16:07:50] *** Mwa has quit IRC
[16:07:50] *** Cymage has quit IRC
[16:07:50] *** caverdude has quit IRC
[16:07:50] *** Garibaldi has quit IRC
[16:07:50] *** huntercool has quit IRC
[16:07:50] *** JohnnyDavidson has quit IRC
[16:07:50] *** armyriad has quit IRC
[16:07:51] *** dangertools has quit IRC
[16:07:51] *** fahadsadah_ has quit IRC
[16:07:51] *** Cobi has quit IRC
[16:07:51] *** robbyoconnor has quit IRC
[16:07:51] *** tjololo has quit IRC
[16:07:51] *** multi_io has quit IRC
[16:07:51] *** dasilvj has quit IRC
[16:07:51] *** Caleb-- has quit IRC
[16:07:51] *** tommytastic_ has quit IRC
[16:07:51] *** meeper has quit IRC
[16:07:51] *** BSWolf has quit IRC
[16:07:51] *** quest88 has quit IRC
[16:07:51] *** LowKey has quit IRC
[16:07:51] *** amichair has quit IRC
[16:07:51] *** milligan has quit IRC
[16:07:51] *** shookees has quit IRC
[16:07:51] *** ryanakca has quit IRC
[16:07:52] *** anaconda has quit IRC
[16:07:52] *** fez has quit IRC
[16:07:52] *** svm_invictvs has quit IRC
[16:07:52] *** krainboltgreene has quit IRC
[16:07:52] *** mbreslin has quit IRC
[16:07:52] *** vmromanos has quit IRC
[16:07:52] *** bob2 has quit IRC
[16:07:52] *** Bennit has quit IRC
[16:07:53] <fr0ggler> osmosis_paul, you need to figure out how to reference that file path, i.e. relative to a given path or classloader, or absolute to a given path or classloader
[16:07:58] <fr0ggler> *blargh*
[16:08:03] <ojacobson> netsplat
[16:08:04] *** mastroWork has quit IRC
[16:08:37] <fr0ggler> osmosis_paul, forget the concept of a project. think of your program and its resources.
[16:09:56] *** Cymage has joined ##java
[16:10:13] *** BeholdMyGlory has quit IRC
[16:10:40] <osmosis_paul> well again, it is possible use this path path="/public/images/import/File" where public is one of the root folders?
[16:10:47] *** Matuku has joined ##java
[16:11:08] <fr0ggler> osmosis_paul, possibly. we don't know your filesystem or permissions. read the link that ojacobson gave you.
[16:11:20] *** mazzachre has quit IRC
[16:11:23] *** bolt_ has joined ##java
[16:12:06] *** fahadsadah has joined ##java
[16:12:18] *** jinky has joined ##java
[16:12:50] *** X-Scale has joined ##java
[16:14:23] *** zChris_ has joined ##java
[16:16:06] *** Glavata has quit IRC
[16:16:06] *** monk13 has quit IRC
[16:16:06] *** bolt has quit IRC
[16:16:06] *** freeone3000 has quit IRC
[16:16:06] *** ruro has quit IRC
[16:16:06] *** jink has quit IRC
[16:16:07] *** jinky is now known as jink
[16:16:25] *** sigtau has quit IRC
[16:16:25] *** Sou|cutter has quit IRC
[16:16:25] *** gartt has quit IRC
[16:16:27] <saml> is there a way to include a.jsp inside b.jsp so that a.jsp has all variables defined in b.jsp?
[16:16:33] *** meling has quit IRC
[16:16:51] *** bearded_oneder has quit IRC
[16:16:56] <saml> b.jsp has <% final boolean isBlah = true; %> and I want to include a.jsp that uses isBla
[16:17:00] <saml> isBlah
[16:17:08] *** gtrak has joined ##java
[16:17:20] <dreamreal> sure
[16:17:23] <dreamreal> everything's POSSIBLE
[16:17:35] <ojacobson> ##java is the new zombo.com, confirm/deny
[16:17:46] <ojacobson> Putting code in your JSPs is still a bad idea, though
[16:17:51] <mitch0> what's the old zombo.com?
[16:17:54] <ojacobson> zombo.com
[16:18:08] <ojacobson> related: http://html5zombo.com/
[16:18:22] *** sebersole_ has joined ##java
[16:18:28] <gtrak> welcome to zombo com
[16:18:59] <cheeser> this is zombocom!
[16:19:38] <fr0ggler> erm. what's this zombo of which you speak? I see spangly balls.
[16:19:56] <fr0ggler> it seems i've been out-memed.
[16:20:03] <mitch0> actually, it's kinda relaxing
[16:20:04] *** waz has joined ##java
[16:20:15] <fr0ggler> hm to me it's about as relaxing as comic sans.
[16:20:21] *** mortal1 has quit IRC
[16:20:22] <ojacobson> Turn on your speakers
[16:20:29] <fr0ggler> oh god no. not... sound.
[16:20:37] <ojacobson> Do it. I know things. Listen to me.
[16:20:51] <dreamreal> sound is overrated. You should avoid it.
[16:20:54] <dreamreal> I know this!
[16:21:04] *** javawizard has joined ##java
[16:21:15] <fr0ggler> oh lord.
[16:21:28] <osmosis_paul> fr0ggler, thanks for the info.
[16:21:36] <osmosis_paul> ojacobson, thanks for the info.
[16:21:54] <fr0ggler> there are two things of which I am now sure. firstly that it is zombocom. and secondly that I am welcome.
[16:22:11] <cheeser> http://html5zombo.com/
[16:22:16] <cheeser> modernized!
[16:22:34] <fr0ggler> aw it stopped.
[16:22:46] <ojacobson> cheeser: <ojacobson> related: http://html5zombo.com/
[16:22:47] <ojacobson> oldmeme
[16:22:53] *** Phil-Work has joined ##java
[16:23:01] <ojacobson> The HTML comments in it are gold
[16:23:02] <cheeser> oh. missed that.
[16:23:06] <cheeser> 8^)=
[16:23:07] <mitch0> the htlm5 version is better. I missed yellow in the original
[16:23:53] *** vague`_ has joined ##java
[16:24:08] *** bojo has joined ##java
[16:24:17] <ojacobson> saml: zombo.com notwithstanding, I would seriously avoid <% code %> and <%! code %> constructs
[16:24:23] <ojacobson> They have a nasty habit of turning into PHP
[16:24:44] <ojacobson> If all you need is something to hang EL and c:if off of, c:set or jsp:useBean can create a java.lang.Boolean and initialize it
[16:24:50] *** cbeust has joined ##java
[16:25:12] <gtrak> mm delicious php mysql html spaghetti
[16:26:04] *** bolt_ has quit IRC
[16:26:04] *** sebersole has quit IRC
[16:26:04] *** xiliax has quit IRC
[16:26:04] *** ExtraSpice has quit IRC
[16:26:04] *** wolfman2000 has quit IRC
[16:26:04] *** sproingie has quit IRC
[16:26:05] *** whaley has quit IRC
[16:26:05] *** jcp has quit IRC
[16:26:05] *** tjsnell has quit IRC
[16:26:05] *** vague` has quit IRC
[16:26:05] *** ianp has quit IRC
[16:26:05] *** javawizard is now known as jcp
[16:27:15] *** ryanakca_ has joined ##java
[16:27:34] *** caverdude has joined ##java
[16:27:34] *** AUTx has joined ##java
[16:27:38] *** BSWolf2 has joined ##java
[16:27:38] *** Garibaldi has joined ##java
[16:27:39] *** DoubleString has joined ##java
[16:27:51] *** eitch0000 has quit IRC
[16:27:54] *** Phil has joined ##java
[16:27:55] *** armyriad has joined ##java
[16:27:56] *** tjololo has joined ##java
[16:27:58] *** dasilvj has joined ##java
[16:28:34] *** BSWolf2 is now known as BSWolf
[16:28:44] *** dangertools has joined ##java
[16:28:51] *** seicherlbob has joined ##java
[16:29:02] <AUTx> if I have this method: http://pastebin.com/02P5YYVL How could I return a location which is opposite to what would normally be returned?
[16:29:11] *** wilfredor has joined ##java
[16:29:17] <AUTx> so instead of closer it gets a location +1 further
[16:29:27] *** CoryDambach has quit IRC
[16:29:34] *** Cobi has joined ##java
[16:29:47] <saml> how can I introduce a property in my jsp? I tried <jsp:setProperty name="stuff" property="entryToEdit" value="<%= entryToEdit %>"/> but I get null pointer exception
[16:30:41] <seicherlbob> hi! I would like to lookup the local IP address, but InetAddress.getLocalHost() only returns <myhostname>/ I set a custom securitymanager (for testing) that allows any connect attempt, but still, I only get the loopback address. can someone help me?
[16:31:10] <ojacobson> seicherlbob: which one?
[16:31:27] *** sebersole_ is now known as sebersole
[16:31:30] <ojacobson> A single host can have many IP addresses. You can interrogate NetworkInterface to find them all, but you need some way to decide which to use.
[16:32:19] <seicherlbob> ojacobson: well, if i ask about "www.google.com" I get all addresses with getAllByName. but for my host, i only get the loopback
[16:32:25] *** bolt_ has joined ##java
[16:32:27] *** eitch0000 has joined ##java
[16:32:55] *** bolt_ is now known as bolt
[16:32:56] <_W_> seicherlbob, are you asking for the address of localhost, by any chance?
[16:33:15] <_W_> it's a common standard to have localhost resolve to the loopback ip
[16:33:22] *** DoubleString is now known as shookees
[16:33:35] <_W_> seicherlbob, what do you need this address for?
[16:33:46] <seicherlbob> _W_: I call getLocalHost(), which tells me my hostname. Then i lookup all adresses for the hostname
[16:34:10] <ojacobson> seicherlbob: You remind me of that parable about a man searching for his keys under the streetlight
[16:34:11] <seicherlbob> _W_: I'd like to build a debugging/administration panel for a client application
[16:34:13] <ojacobson> stop trying the thing that doesn't work
[16:34:22] <_W_> seicherlbob, and what does the IP have to do with that?
[16:34:51] <seicherlbob> _W_: well, for a system administrator it would be nice to know the clients IP, if the serverconnection fails.
[16:35:08] <_W_> then I would suggest you do as ojacobson say - iterate the interfaces, and list up all addresses
[16:35:20] <_W_> they might only be able to reach it on one or a few of the ones
[16:35:27] <seicherlbob> _W_: the list only contains the loopback
[16:35:33] <ojacobson> seicherlbob: you could ask the socket what IP address it used
[16:35:34] * Skyec searches for the streetlights above his keys
[16:35:36] <ojacobson> that information is available
[16:35:37] <_W_> (or might not be able to reach it on any - if it is behind NAT for instance)
[16:35:51] *** terranova has quit IRC
[16:35:51] <_W_> seicherlbob, no, if you followed ojacobson's advice, you get them all
[16:36:27] <ojacobson> seicherlbob: Though honestly the only peer that can tell where a connection came from is the accepting peer, not the connecting peer
[16:36:32] <ojacobson> (due to NAT)
[16:36:50] <seicherlbob> ojacobson: it's an internal network without NAT
[16:36:53] <ojacobson> the connecting peer can determine which of its own IP addresses it used, though - that's available from the Socket object associated with the connection
[16:37:02] *** zemanel has joined ##java
[16:37:48] *** kinks has quit IRC
[16:37:55] *** wilfredor has left ##java
[16:38:20] *** Ivellina has quit IRC
[16:39:26] *** Xeli has quit IRC
[16:39:48] *** Xeli has joined ##java
[16:41:36] <seicherlbob> thanks, the NetworkInterface.getNetworkInterfaces() did it!
[16:46:54] *** Garibaldi has quit IRC
[16:47:10] *** Garibaldi has joined ##java
[16:47:32] *** meling has joined ##java
[16:47:39] *** huntercool has joined ##java
[16:49:51] *** Archon has joined ##java
[16:50:32] <Archon> Can Swing components inherit the style settings (eg. font) as its parent component?
[16:51:09] <seicherlbob> Archon: Maybe you better edit the lookandfeel
[16:52:08] *** monk14 has joined ##java
[16:53:55] <monk14> hello all, I had an java editing quest since its a lil' dead in #eclipse. I cannot set a breakpoint in eclipse for a jsp file. I realized its cause the default editor it uses with "Open With" is the "Java Editor", not the "JSP Editor". I can change each file's "Open With" setting, but was curious where to set the default. Hope its fine to ask in here.
[16:54:52] <jink> Nope, that's #eclipse specific. Someone might know, but don't expect too much. ^__^
[16:54:58] *** passwordoff has joined ##java
[16:55:05] <seicherlbob> monk14: I think you can set the default editor under General->editors->File Associations
[16:55:53] <monk14> seicherlbob, Thanks so much. works :).
[16:56:02] <seicherlbob> monk14: i just stepped over it recently, because i deactivated the POM editor (and changed to standard XML editor).
[16:56:12] <seicherlbob> monk14: you're welcome
[16:57:31] *** paissad has joined ##java
[16:59:18] *** _Jorde has quit IRC
[16:59:55] *** werdan7 has quit IRC
[17:00:09] *** jjido has joined ##java
[17:00:49] *** werdan7 has joined ##java
[17:04:30] *** SpaceDoG has quit IRC
[17:06:17] *** Elazar has left ##java
[17:06:23] *** k_89 has joined ##java
[17:06:36] *** cythrawll has joined ##java
[17:06:54] *** jjido has quit IRC
[17:07:50] *** Pozejdon has quit IRC
[17:08:37] *** bojo has quit IRC
[17:09:57] *** jjido has joined ##java
[17:10:26] *** matsebc has quit IRC
[17:10:31] *** SpaceDoG has joined ##java
[17:12:22] *** bradford- has joined ##java
[17:12:27] *** Tyred has quit IRC
[17:12:38] *** matsebc has joined ##java
[17:13:01] *** shiranpuri has quit IRC
[17:13:20] *** shiranpuri has joined ##java
[17:13:40] *** eyesUnclouded has quit IRC
[17:13:57] *** Candle_ has joined ##java
[17:14:21] *** kinks has joined ##java
[17:14:25] *** realtime_ has joined ##java
[17:14:34] *** eitch0000 has quit IRC
[17:14:35] *** mistik1_ has joined ##java
[17:15:34] *** benoitdo has quit IRC
[17:16:14] *** supercosmonaut has joined ##java
[17:16:45] *** jjido has quit IRC
[17:17:09] *** jerkface03 has quit IRC
[17:17:46] *** paissad_ has joined ##java
[17:18:38] *** Gracenotes_ has joined ##java
[17:18:47] *** paissad has quit IRC
[17:18:47] *** cbeust has quit IRC
[17:18:48] *** mistik1 has quit IRC
[17:18:48] *** bradford has quit IRC
[17:18:48] *** dropdrive has quit IRC
[17:18:48] *** neuro_sys has quit IRC
[17:18:48] *** wyvern` has quit IRC
[17:18:48] *** realtime has quit IRC
[17:18:48] *** msmorul_work has quit IRC
[17:18:48] *** whoever has quit IRC
[17:18:48] *** dreamreal has quit IRC
[17:18:48] *** pr3d4t0r has quit IRC
[17:18:48] *** DroidAgent has quit IRC
[17:18:48] *** Teckla has quit IRC
[17:18:48] *** ronr_ has quit IRC
[17:18:48] *** linenoise has quit IRC
[17:18:48] *** Candle has quit IRC
[17:18:48] *** iulian has quit IRC
[17:18:48] *** MikeJansen has quit IRC
[17:18:48] *** reisi has quit IRC
[17:18:48] *** t3rminat0r_ has quit IRC
[17:18:49] *** l2trace99 has quit IRC
[17:18:49] *** vpit3833 has quit IRC
[17:18:49] *** VooDooNOFX has quit IRC
[17:18:49] *** tolland has quit IRC
[17:18:49] *** pirx has quit IRC
[17:18:49] *** jtrally has quit IRC
[17:18:49] *** Blub\0 has quit IRC
[17:18:49] *** thomasp has quit IRC
[17:18:49] *** e_ has quit IRC
[17:18:49] *** samferry has quit IRC
[17:18:49] *** Kneta_ has quit IRC
[17:18:50] *** mistik1_ is now known as mistik1
[17:18:52] *** l2trace99 has joined ##java
[17:18:52] *** vpit3833 has joined ##java
[17:18:52] *** VooDooNOFX has joined ##java
[17:18:52] *** tolland has joined ##java
[17:18:52] *** e_ has joined ##java
[17:18:52] *** jtrally has joined ##java
[17:18:52] *** Blub\0 has joined ##java
[17:18:52] *** thomasp has joined ##java
[17:18:52] *** Kneta_ has joined ##java
[17:18:52] *** samferry has joined ##java
[17:19:05] *** pipeep has quit IRC
[17:19:24] *** cbeust has joined ##java
[17:19:39] *** Ch30ps has quit IRC
[17:20:04] *** jjido has joined ##java
[17:20:06] *** jesmon has joined ##java
[17:20:12] <passwordoff> split
[17:20:35] *** Pozejdon has joined ##java
[17:21:17] *** jesmon is now known as 30BAAXNSD
[17:21:38] *** Candle has joined ##java
[17:22:00] *** ronghail has joined ##java
[17:22:01] *** top^ has joined ##java
[17:22:22] *** bduncan has joined ##java
[17:22:34] *** FrozenKn1ght has joined ##java
[17:23:17] *** Gracenotes has quit IRC
[17:23:23] *** Gracenotes_ is now known as Gracenotes
[17:24:13] *** magn3ts has quit IRC
[17:24:13] *** bradford- has quit IRC
[17:24:13] *** meling has quit IRC
[17:24:17] *** bradford has joined ##java
[17:24:19] *** 30BAAXNSD has quit IRC
[17:24:22] *** meling has joined ##java
[17:24:23] *** dmb_ has joined ##java
[17:24:23] *** Teckla has joined ##java
[17:25:05] *** dmb_ has quit IRC
[17:25:05] *** jjido has quit IRC
[17:25:06] *** l2trace99 has quit IRC
[17:25:06] *** vpit3833 has quit IRC
[17:25:06] *** VooDooNOFX has quit IRC
[17:25:06] *** tolland has quit IRC
[17:25:06] *** jtrally has quit IRC
[17:25:06] *** Blub\0 has quit IRC
[17:25:06] *** thomasp has quit IRC
[17:25:06] *** e_ has quit IRC
[17:25:06] *** samferry has quit IRC
[17:25:06] *** Kneta_ has quit IRC
[17:25:14] *** gelignite has quit IRC
[17:25:31] *** gelignite has joined ##java
[17:26:08] *** passwordoff has left ##java
[17:26:10] *** tangatools has joined ##java
[17:26:10] *** DroidAgent has joined ##java
[17:26:28] *** Xeli has quit IRC
[17:26:34] *** huntercool has quit IRC
[17:26:49] *** magn3ts has joined ##java
[17:27:10] *** Sliker has quit IRC
[17:27:13] *** Sliker has joined ##java
[17:27:17] *** epalm has quit IRC
[17:27:17] *** ldh has quit IRC
[17:27:41] *** Xeli has joined ##java
[17:27:45] *** osmosis_paul has quit IRC
[17:29:06] *** AUTx has left ##java
[17:29:17] *** nmx has quit IRC
[17:29:17] *** aLeSD has quit IRC
[17:29:17] *** dmb has quit IRC
[17:29:18] *** Marcofe has quit IRC
[17:29:18] *** jpk has quit IRC
[17:30:20] *** jenue has quit IRC
[17:30:22] *** [TechGuy] has joined ##java
[17:30:30] *** jesmon` has joined ##java
[17:30:32] *** dmb_ has joined ##java
[17:30:32] *** jjido has joined ##java
[17:30:32] *** l2trace99 has joined ##java
[17:30:32] *** vpit3833 has joined ##java
[17:30:32] *** VooDooNOFX has joined ##java
[17:30:32] *** tolland has joined ##java
[17:30:32] *** e_ has joined ##java
[17:30:32] *** jtrally has joined ##java
[17:30:32] *** Blub\0 has joined ##java
[17:30:32] *** thomasp has joined ##java
[17:30:32] *** Kneta_ has joined ##java
[17:30:32] *** samferry has joined ##java
[17:30:33] *** sbalmos has quit IRC
[17:30:45] *** [TechGuy] is now known as sbalmos
[17:31:46] *** sako has quit IRC
[17:31:46] *** Candle_ has quit IRC
[17:31:46] *** FrozenKnight has quit IRC
[17:31:46] *** top has quit IRC
[17:31:46] *** ronghail_ has quit IRC
[17:31:46] *** [[thufir]] has quit IRC
[17:31:46] *** _W_ has quit IRC
[17:31:48] *** VJTachyon has quit IRC
[17:31:48] *** FCTW has quit IRC
[17:32:16] *** mastroWork has joined ##java
[17:36:07] *** jjido has quit IRC
[17:36:53] *** kinks has quit IRC
[17:36:53] *** cythrawll has quit IRC
[17:36:53] *** dangertools has quit IRC
[17:36:53] *** mastro has quit IRC
[17:36:53] *** Versuchen has quit IRC
[17:36:53] *** Planck_ has quit IRC
[17:36:53] *** sphenxes has quit IRC
[17:36:54] *** vengeancex32 has quit IRC
[17:36:54] *** murr4y has quit IRC
[17:36:54] *** kinabalu has quit IRC
[17:37:09] *** tangatools is now known as dangertools
[17:39:00] *** Gracenotes has quit IRC
[17:39:55] *** mah01 has quit IRC
[17:41:59] *** _W_ has joined ##java
[17:43:15] *** Bombstone has joined ##java
[17:48:56] *** echelog has joined ##java
[17:50:29] *** Noya has quit IRC
[17:50:30] *** aLeSD has joined ##java
[17:50:40] *** anaconda has joined ##java
[17:51:07] *** Guest85730 has joined ##java
[17:52:12] *** Guest85730 has quit IRC
[17:53:32] *** ShriekingMonkey has quit IRC
[17:54:09] *** armyriad has joined ##java
[17:54:21] *** balooo has joined ##java
[17:55:07] *** fr0ggler has quit IRC
[17:55:10] *** Pozejdon has quit IRC
[17:55:19] *** matsebc has quit IRC
[17:55:50] *** dreamreal has joined ##java
[17:56:35] *** teralaser has joined ##java
[17:57:28] *** kermit has quit IRC
[17:57:28] *** paulweb515 has quit IRC
[17:57:28] *** balou has quit IRC
[17:58:41] *** aLeSD has quit IRC
[17:58:49] *** LtHummus has quit IRC
[17:59:49] <jesmon`> ~eclipse++
[18:00:01] <javabot> eclipse has a karma level of -378, jesmon`
[18:00:13] *** xiliax has joined ##java
[18:00:19] <dreamreal> jesmon`: cool! it must have given you an excuse for why your project was late or something?
[18:00:37] *** bolt has joined ##java
[18:00:45] <jesmon`> dreamreal: no, I don't have that plugin installed
[18:01:34] <jesmon`> but, I switched from IDEA a little over a week ago (after the update which introduced more bugs), and I'm actually liking it quite a bit
[18:02:19] <jesmon`> it has the best emacs key bindings of any java IDE I've tried :-)
[18:02:32] <dreamreal> it's part of the base IDE :/
[18:02:44] <dreamreal> wow
[18:02:47] <dreamreal> you're probably the second person ever to say that
[18:02:50] <dreamreal> which release of IDEA were you on?
[18:03:31] <jesmon`> dreamreal: 10.whatever, community edition. I like IDEA, but it became unusable for one of my projects
[18:04:16] <dreamreal> I've actually never used community
[18:04:40] <dreamreal> but I hate moving from IDEA, it's like going from a bullet train to a yugo, while the train is moving and the yugo ... isn't
[18:05:34] <jesmon`> there's certainly a transition involved. but, I'm quite happy so far with eclipse, and learning more cool things each day
[18:05:39] *** E-sense has joined ##java
[18:05:50] <dreamreal> keep us informed when you discover what a piece d'crap it is :)
[18:06:08] *** cbeust has quit IRC
[18:06:13] <jesmon`> sure thing :-)
[18:06:40] *** Scorchin has joined ##java
[18:08:54] *** Xeli has joined ##java
[18:09:38] *** poccha has quit IRC
[18:11:50] *** arborist has quit IRC
[18:13:44] <cheeser> i have a hard time believing that one.
[18:14:05] <cheeser> how big is your project? because i work on several large projects in IDEA and it's just fine.
[18:14:49] *** jonn has quit IRC
[18:14:49] *** SpaceDoG has quit IRC
[18:16:41] *** jerkface03 has joined ##java
[18:16:59] <FauxFaux> Work are forcing me to use IDEA instead of Eclipse; I'm going to do a writeup at some point. Basically, anyone who claims IDEA is even remotely bug free, especially around the Swing stuff and the Maven integration, is just plain lying.
[18:17:43] *** cbrock has joined ##java
[18:17:52] *** neuro_sys has joined ##java
[18:17:52] <jesmon`> cheeser: I don't think it was the size of the project. It was a combination of the mercurial support they "enhanced" in the update was causing unpreventable annoying popups, telling me the remote repo was invalid. The project makes pretty heavy use of generics, and IDEA started to freak out about some of it at roughly the same time. I generic parsing errors in Netbeans before, but not IDEA...Eclipses type checker seemed to have a
[18:17:52] <jesmon`> easier time.
[18:17:57] <dreamreal> FauxFaux: nobody says it's bugfree
[18:18:14] <cheeser> ah. yeah. last i checked, the hg support wasn't native
[18:18:17] *** SpaceDoG has joined ##java
[18:18:19] <cheeser> and rather flaky.
[18:19:12] *** Sliker has quit IRC
[18:19:52] *** Sliker has joined ##java
[18:21:07] *** shakamca has joined ##java
[18:21:55] *** BeholdMyGlory has joined ##java
[18:23:51] *** pr3d4t0r has joined ##java
[18:25:15] *** Behold has quit IRC
[18:25:29] *** nixness has joined ##java
[18:26:51] *** Keepers has quit IRC
[18:27:50] *** RobotCow has joined ##java
[18:28:26] *** K4mirox has joined ##java
[18:30:03] *** jdolan has quit IRC
[18:30:48] *** realtime_ has joined ##java
[18:31:53] *** aLeSD has joined ##java
[18:31:57] <aLeSD> hi all
[18:33:06] *** terranova has joined ##java
[18:33:08] <aLeSD> I have a class that has a method void m(List<List<Float>>) .. .how could I add a method m(List<Float>) ?
[18:33:10] <saml> hi aLeSD
[18:33:26] <saml> void m(List<Float> l); ?
[18:33:27] *** tilerendering has quit IRC
[18:33:32] <cheeser> aLeSD: you'd need a different name
[18:33:44] <saml> ah sorry
[18:34:03] <cheeser> i'm reasonably sure the compiler will complain if they're both named m()
[18:34:24] <waz> m1 and m2
[18:35:14] <aLeSD> ok
[18:36:53] *** Stephmw has quit IRC
[18:40:11] *** caverdude has quit IRC
[18:41:23] *** sproingie has joined ##java
[18:41:43] *** cbeust has joined ##java
[18:42:02] *** ries has left ##java
[18:42:13] *** Archon has quit IRC
[18:43:03] *** Mkop has joined ##java
[18:43:55] *** bduncan has quit IRC
[18:44:12] *** nucc1 has quit IRC
[18:44:35] *** seicherlbob has quit IRC
[18:47:37] *** shakamca has quit IRC
[18:47:38] *** yoshx has joined ##java
[18:50:49] *** dogmeat has joined ##java
[18:54:56] *** Fallout2man has joined ##java
[18:55:34] *** Luc1fel has quit IRC
[18:55:40] *** jonkri has joined ##java
[18:57:08] *** Terabyte has joined ##java
[19:01:10] *** RLa has joined ##java
[19:02:12] *** starcoder has joined ##java
[19:03:00] *** youdonotexist has joined ##java
[19:05:30] *** Kamaran has quit IRC
[19:07:01] *** pyrony has joined ##java
[19:07:48] *** ormaaj has quit IRC
[19:08:05] *** ormaaj has joined ##java
[19:09:29] *** harry_ has joined ##java
[19:11:14] *** wyvern` has joined ##java
[19:11:49] *** srji has joined ##java
[19:11:59] *** RobotCow has quit IRC
[19:14:18] *** fuzzygroove has joined ##java
[19:15:39] *** megaTherion has joined ##java
[19:18:07] *** kba has joined ##java
[19:18:41] *** monty_hall has quit IRC
[19:18:50] *** vengeancex32 has joined ##java
[19:19:20] *** queequeg1 has joined ##java
[19:19:24] <sbalmos> I'm tias'ing in various incantations, but it doesn't look like I can specify that a millisecond component is optional for parsing in a DateFormat, can I?
[19:20:24] *** plarsen has joined ##java
[19:20:55] *** rretzbach has joined ##java
[19:21:14] *** zemanel has quit IRC
[19:21:18] <wyvern`> sbalmos, if there's an ISO8601 preset, try that
[19:21:20] <wyvern`> or joda time
[19:21:26] <kba> How would I create menu-like structure in a console application with Java? Like in Aptitude or when you install most Linux variants from the console?
[19:21:30] <wyvern`> (is threeten ready for use yet?)
[19:21:39] <wyvern`> kba, jansi or similar?
[19:21:40] <ernimril> sbalmos: for DateFormat you can create your own one that does it, if you mean SimpleDateFormat then no
[19:21:50] <sbalmos> wyvern`: This is in a proprietary system built on top of Java's, so I can't slap in Joda
[19:22:07] <sbalmos> I'm checking to see how close to ISO8601 the timestamps are
[19:22:09] <wyvern`> sbalmos, bummer
[19:22:14] <dmlloyd> ~threeten
[19:22:14] <javabot> dmlloyd, threeten is the JSR-310 reference implementation at http://sourceforge.net/projects/threeten (it replaces the older JSR-310 project at dev.java.net).
[19:22:39] <kba> wyvern`: isn't htat only for coloring stuff?
[19:23:06] <wyvern`> kba, dunno but in general ansi terminal controls is what you're looking for. Perhaps there's a java wrapper to ncurses
[19:23:39] <kba> ah yes, ncurses. That seems like something useful. I just needed a keyword to Google, thank you :)
[19:24:20] <wyvern`> ncurses is a little non-obvious of a name. :)
[19:24:24] <Fallout2man> Is there a way to specifically hide a class inside a jar you want to not be importable by anyone using that jar? Like let's say I had a class I needed to mark as public because I had a lot of packages and I needed it to be usable internally accross all packages, but not usable externally. How would you do that?
[19:24:37] <cheeser> you wouldn't
[19:24:39] <cheeser> you can't
[19:24:42] <Fallout2man> hrmm
[19:24:49] <Fallout2man> Okay, thanks
[19:24:50] <cheeser> not until jigsaw at least.
[19:24:52] <wyvern`> Fallout2man, unfortunately the 'superpackages' stuff got bumped from java7 too i think
[19:25:28] <ernimril> kba: if you do java then consider doing a swing gui, javas handling of console sucks
[19:25:42] <Fallout2man> Actually in this case I'm trying to discern how to extract a class from a jar
[19:25:48] <Fallout2man> But it's android and not strictly Java
[19:25:54] <Fallout2man> but the Android guys didn't know
[19:25:57] *** rretzbach has quit IRC
[19:25:59] <RLa> use obfuscator
[19:26:01] <ernimril> Fallout2man: a jar is a zip-file, just unpack it
[19:26:06] <Fallout2man> so thought I'd see if anyone here had any idea of what Vanilla java could do the same
[19:26:19] <RLa> there is proguard, maybe works for android too
[19:26:28] <Fallout2man> ernimril: That's worthless since my app has to run on a mobile phone where I cannot modify the jar. :p
[19:26:50] <kba> ernimril: well I don't like Java's GUIs, tbh
[19:26:59] <Fallout2man> I'm trying to figure out why the IDE is not allowing me to use the class, since I have the full source and it's marked as public final.
[19:26:59] *** nawk has joined ##java
[19:27:05] <ernimril> kba: why not?
[19:27:13] *** Pozejdon has joined ##java
[19:27:20] <Fallout2man> proguard!
[19:27:22] <Fallout2man> that's it
[19:27:30] <nawk> what is an abstract class?
[19:27:33] <Fallout2man> I saw a proguard config in my android extra files.
[19:27:43] <Fallout2man> nawk: A class that is only partially implemented.
[19:28:05] <Fallout2man> Abstract classes allow you to include abstract methods, which are method definitions that subclasses will be required to implement themselves.
[19:28:12] <ernimril> kba: if you really want to do console, then sure go for it, but note that java has _very_ little support for console (basically only read line, write line and turn echo off (for password input)
[19:28:14] <ernimril> )
[19:28:14] <RLa> nawk, a class you cannot instantiate
[19:28:41] *** SSgtSpoon|work has joined ##java
[19:28:47] *** io2 has joined ##java
[19:28:47] <RLa> there is jline if you want nice prompt
[19:28:55] *** Determinist has joined ##java
[19:30:09] <kba> ernimril: I think it's slow and for what I'm going to make, a console will do just fine :)
[19:30:55] <ernimril> kba: swing is not slow, but there are a lot of bad swing programs that may feel slow
[19:31:16] <ernimril> kba: http://www.digpro.com/Articles/Produkter/dp_com.html <== what I do for work, quite a lot of swing
[19:31:24] *** push[RAX] has joined ##java
[19:32:02] <kba> is dp_com_pop.jpg made in Swing?
[19:32:26] <kba> Ah, yes, it is. I can see the buttons in the lower left-hand corner.
[19:32:33] *** cbrock has quit IRC
[19:32:34] <ernimril> kba: yes, that is standard swing
[19:32:40] *** danzik17 has quit IRC
[19:32:41] *** jdolan has joined ##java
[19:32:42] <kba> I just think generally they are very ugly.
[19:32:47] <ernimril> kba: with own drawing for the maps of course
[19:37:14] *** SpaceDoG has quit IRC
[19:37:14] *** neuro_sys has quit IRC
[19:37:14] *** Xeli has quit IRC
[19:37:15] *** dmb_ has quit IRC
[19:37:15] *** megaTherion has quit IRC
[19:37:15] *** l2trace99 has quit IRC
[19:37:15] *** nixness has quit IRC
[19:37:18] *** vpit3833 has quit IRC
[19:37:18] *** VooDooNOFX has quit IRC
[19:37:18] *** tolland has quit IRC
[19:37:18] *** jtrally has quit IRC
[19:37:18] *** Blub\0 has quit IRC
[19:37:18] *** thomasp has quit IRC
[19:37:18] *** e_ has quit IRC
[19:37:18] *** samferry has quit IRC
[19:37:18] *** Kneta_ has quit IRC
[19:38:05] *** kermit has joined ##java
[19:38:44] <ernimril> kba: ugly is a matter of taste and some people think that swing is ugly, not much to do about it. You can change the look and feel to be more native, but then other people will think it is ugly
[19:38:45] <nawk> Fallout2man, RLa, by characteristics you described, its like an interface and a class combined kinda thing
[19:38:46] *** kermit is now known as 15SAAC1T0
[19:38:46] <kba> Well, if I really wanted to create a GUI app, I would probably take a look at Cocoa anyway
[19:38:46] <kba> but what I'm intending to build is really more suitable as a console application; I appreciate your insight though :-)
[19:39:09] *** megaTherion has joined ##java
[19:39:09] *** nixness has joined ##java
[19:39:09] *** SpaceDoG has joined ##java
[19:39:09] *** neuro_sys has joined ##java
[19:39:09] *** Xeli has joined ##java
[19:39:09] *** dmb_ has joined ##java
[19:39:09] *** l2trace99 has joined ##java
[19:39:09] *** vpit3833 has joined ##java
[19:39:09] *** VooDooNOFX has joined ##java
[19:39:09] *** tolland has joined ##java
[19:39:09] *** e_ has joined ##java
[19:39:09] *** jtrally has joined ##java
[19:39:09] *** Blub\0 has joined ##java
[19:39:09] *** thomasp has joined ##java
[19:39:09] *** Kneta_ has joined ##java
[19:39:09] *** samferry has joined ##java
[19:39:51] <Fallout2man> nawk: Indeed, it's an inheritance thing. It lets you define a partial implementation so you can very effectively write subclasses.
[19:40:08] <Fallout2man> So that way there's minimal code duplication.
[19:40:16] *** VooDooNOFX has quit IRC
[19:40:22] <Fallout2man> A great example are the java collections classes like list.
[19:40:28] <aLeSD> if I have a two reference to the same list (a,b) and I run a.remove(3); b see the modification . is it ?
[19:40:40] *** VooDooNOFX has joined ##java
[19:40:45] <Fallout2man> They use abstract bases so that many types of lists can derrive from a partial base implementation whose code is universally relevant.
[19:41:04] <aLeSD> now the real question is : if I run a.remove(0) ... what happen to b ?
[19:41:36] <_W_> aLeSD, nothing happen to either a or b in your examples
[19:41:46] <_W_> the mutation happens to the list that both a and b point to
[19:41:53] <aLeSD> ok
[19:42:02] *** Xeli has quit IRC
[19:42:04] <aLeSD> _W_, I am very happy
[19:43:21] *** [[thufir]] has joined ##java
[19:45:13] *** KarlKFI|work has quit IRC
[19:45:45] *** Artefact2 has quit IRC
[19:49:33] <Terabyte> if I have dis = new DataInputStream(new BufferedInputStream(is)); and is is a URL stream. what's the best way of keeping what would be read from dis for later (given there are other objects that want to make use of the contents in the form of an "inputstream")
[19:50:14] *** riotz has joined ##java
[19:50:24] <Terabyte> (that is, if I read dis compleatly, the stream is depleated and I don't want to have to download again to retrieve the same information for another object later)
[19:50:29] <Terabyte> lete*
[19:52:06] *** lamdk has joined ##java
[19:52:27] *** dropdrive has joined ##java
[19:53:02] <_W_> Terabyte, just parse it fully the first time, and make the results of that available?
[19:53:14] *** arborist has joined ##java
[19:53:40] <Terabyte> hae done. so at the moment, i'm storing the result of readUTF in a string, and then creating a new ByteArrayInputStream from that string whever anybody needs it again. Not sure if that's the best way.
[19:53:49] <Terabyte> have*
[19:54:13] *** Sou|cutter has joined ##java
[19:54:31] *** matsebc has joined ##java
[19:55:19] <Terabyte> is there any reason why readUTF() would cause the characters <? to be ommited from the opening? When I print the string out, those 2 characters are missing.
[19:59:06] *** cbrock has joined ##java
[19:59:07] *** sorabji52 has joined ##java
[20:08:25] <Terabyte> nevermind used buffered reader problem went away
[20:08:41] *** abhijain has joined ##java
[20:08:46] *** new2net has joined ##java
[20:10:00] <nawk> Fallout2man, thank you, it's been almost 4 years since I touched cup/line of Java
[20:10:25] <nawk> s/cup/a &/
[20:10:54] <Fallout2man> No worries, I've been all over the place myself. Started out with web work, then objective-C and now java
[20:11:01] <new2net> return n instanceof Integer ? n + 1 : n; "object + 1 operation not supported... "
[20:11:02] <Fallout2man> after this, who knows? :p
[20:11:05] *** sorabji52 has quit IRC
[20:11:29] <new2net> how do I turn the type checker off?
[20:11:31] <Fallout2man> new2net: If you're using a wrapper class then it'd be n.intValue()
[20:11:39] *** Tuplanolla has joined ##java
[20:11:44] <Fallout2man> new2net: You can't disable type safety in Java
[20:11:53] *** x21 has joined ##java
[20:12:19] <x21> LOL
[20:12:22] <Fallout2man> If you're using a wrapper class you can't perform math operations on it, you need to get a primitive value first.
[20:12:28] <nawk> Fallout2man: oh great, maybe I could ask for some obj-C stuff in the near future to help me get started, especially there isn't an ##objective-C
[20:12:29] *** LtHummus has joined ##java
[20:12:33] <nawk> :-)
[20:12:43] <Fallout2man> nawk: #iphonedev
[20:12:46] *** dojo has left ##java
[20:12:53] <Fallout2man> because let's be real, you're not developing Objective-C if it's not iDevice :p
[20:13:07] <new2net> Integer.parseInt(n.toString()) + 1 ... it's beutiful
[20:13:11] *** RLa has quit IRC
[20:13:31] <Fallout2man> new2net: I wouldn't do that, it's not as clean as you think.
[20:19:10] *** echelog has joined ##java
[20:19:22] <new2net> well my interface is for a linked list, so it receives anything you want to put into a linked list
[20:19:28] *** srji has quit IRC
[20:19:30] *** mistik1 has joined ##java
[20:19:48] <Tuplanolla> There already is a linked list class.
[20:20:06] <new2net> yeah, synchronized
[20:20:23] <new2net> i'll show you my code
[20:20:23] <Fallout2man> Okay, so it's basically receiving information one piece at a time to insert inside a collection? Will it always be one at a time or might there me times where more than one piece of information might need to be put in?
[20:20:36] *** jcp has joined ##java
[20:21:07] <new2net> well the list is immutable, but you can put another list into an existing list using append()
[20:21:51] <Tuplanolla> To quote http://download.oracle.com/javase/6/docs/api/java/util/LinkedList.html "this implementation is not synchronized".
[20:22:31] *** jesmon has joined ##java
[20:23:37] *** echelog has joined ##java
[20:23:56] <new2net> here's what i've been testing it with http://pastebin.com/r2xsz1ji
[20:24:18] *** meling has joined ##java
[20:25:16] <new2net> you build off of the empty list.
[20:25:35] <Fallout2man> Hrmm, might be able to take a look later
[20:25:39] <Fallout2man> got stuff to do right now
[20:25:41] <Fallout2man> bbl
[20:25:42] *** Johannes13 has quit IRC
[20:26:04] *** x21 has quit IRC
[20:27:27] *** Cymage has joined ##java
[20:27:59] *** whaley has joined ##java
[20:29:18] <new2net> how has Java survived this long?
[20:29:30] *** VooDooNOFX has joined ##java
[20:30:01] *** bolt has joined ##java
[20:30:41] <sbalmos> Bribery
[20:30:45] *** homie has joined ##java
[20:30:46] *** klaas has joined ##java
[20:31:23] <new2net> makes sense.
[20:31:59] <shiranpuri> who's bribing who?
[20:32:11] *** JStoker has joined ##java
[20:32:25] *** r0bby has joined ##java
[20:32:32] <cheeser> whom
[20:32:32] <cheeser> 8^)=
[20:32:35] *** tjsnell has joined ##java
[20:33:26] *** forneus_ has joined ##java
[20:33:33] *** KWhat_Work has joined ##java
[20:33:34] <kercyr> Who's whom?
[20:34:35] *** Matic`Makovec has joined ##java
[20:35:21] *** waz has quit IRC
[20:35:23] *** QshelTier has joined ##java
[20:37:07] <KWhat_Work> How do you get mail protocol information with javaee.jar? When i try to include mail.jar I get an error like "java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream" due to the javamail conflict? When I remove it I get javax.mail.NoSuchProviderException: imap. How the hell do you use mail with javaee.jar?
[20:38:04] *** dmlloyd has quit IRC
[20:38:21] *** dmlloyd has joined ##java
[20:38:37] *** cbrock has quit IRC
[20:38:54] *** webczat has joined ##java
[20:39:00] *** cbrock has joined ##java
[20:39:06] <webczat> Hey, how do you do a java server that accepts many many connections, usually?
[20:39:38] <new2net> gnome multithreading. You need more gnomes
[20:39:48] <cheeser> ~grizzly
[20:39:48] <javabot> cheeser, grizzly is a framework to build scalable and robust server applications using nio. Grizzly is used in GlassFish and SJSAS PE 8.1. For more information see https://grizzly.java.net/ or see Jean-Francois Arcand's blog: http://weblogs.java.net/blog/jfarcand/archive/2005/06/grizzly_an_http.html
[20:40:09] <webczat> I mean if you have thousants of users, it probably isn't a good idea to try to accept 10000 users on 10000 threads.
[20:40:32] <new2net> gnome threads, the gnome is a layer in the short stack
[20:40:41] <cheeser> ~nio
[20:40:41] <javabot> cheeser, nio is the New I/O framework, which supports (among other things) non-blocking I/O and memory-mapped files. It's relatively hard to use though. See http://is.gd/k13w [sun.com] and http://is.gd/k13Q [pdf file at oswego dot edu] for more info, and ask me about ~xnio, ~netty, ~rnio, ~mina, and ~grizzly.
[20:41:15] <webczat> So actually, are streams or channels preferred for usage?
[20:41:16] *** FauxFaux_ has joined ##java
[20:41:20] *** martin8412 has quit IRC
[20:41:25] <new2net> ~xnio
[20:41:25] <javabot> new2net, xnio is an NIO replacement framework, which keeps Channels but does away with Selectors, developed by ##java's very own dmlloyd. The project can be found at http://www.jboss.org/xnio - have fun!
[20:41:34] * dmlloyd bows
[20:41:42] <dmlloyd> could use some testers for XNIO 3
[20:41:48] *** Martin8412 has joined ##java
[20:41:52] *** brundlefly has joined ##java
[20:41:54] *** xiliax has joined ##java
[20:42:27] <new2net> I need to figure out how to parse an int from object first lol
[20:43:25] <webczat> ?
[20:43:26] <Tuplanolla> You could limit it to extend Comparable<T> and use (int)a.compareTo(b).
[20:44:10] <webczat> Should you use streams or channels, or when which one is preferred?
[20:44:51] <webczat> i mean if I don't want to use any frameworks beyond standard java lib because of something.
[20:45:44] <webczat> i think java isn't so hard to do it like that.
[20:45:46] *** Charrit has joined ##java
[20:45:48] <Charrit> hi
[20:46:27] *** ktorn_ has joined ##java
[20:47:22] *** gtrak has joined ##java
[20:48:51] *** Gracenotes has joined ##java
[20:49:01] <webczat> And, where can I find java language reference or tutorial?
[20:49:25] <new2net> http://www.java2s.com/Tutorial/Java/CatalogJava.htm
[20:49:53] *** dwilliamii has joined ##java
[20:49:55] *** jdolan has quit IRC
[20:50:33] *** elb0w` has joined ##java
[20:50:39] <elb0w`> is there a java freelance channel?
[20:51:11] <webczat> Are jsp or servlets actually good?
[20:51:18] <cheeser> not really. yes.
[20:51:19] *** Ashutto has joined ##java
[20:52:27] <webczat> i heart opinions that they aren't
[20:52:59] <cheeser> well, you know what they say: opinions are like assholes. everyone has one and they all stink.
[20:53:03] *** impl_ has joined ##java
[20:53:17] <cheeser> if they meet your needs, they're awesome. if they don't, probably not great.
[20:53:44] <webczat> why servlets aren't good?
[20:53:51] *** FauxFaux has quit IRC
[20:53:56] <cheeser> i never said they weren't.
[20:53:56] *** FauxFaux_ is now known as FauxFaux
[20:55:02] <webczat> s/servlets/jsp
[20:55:17] *** impl has quit IRC
[20:55:20] *** impl_ is now known as impl
[20:55:48] *** abhijain has quit IRC
[20:55:50] <cheeser> for many varied reasons, really.
[20:55:58] <cheeser> i don't really want to run down the list
[20:56:19] <webczat> are servlets videly used?
[20:56:25] <cheeser> yes
[20:56:25] <mapreduce> very videly
[20:56:30] <cheeser> heh
[20:56:40] <Matuku> Does anyone know of a good library for converting a movie to a series of images?
[20:56:44] <mapreduce> Evenin' all.
[20:56:54] <webczat> i usually see cgi or php
[20:57:01] <mapreduce> Matuku: libavformat
[20:57:08] <mapreduce> For Java, probably xuggler.
[20:57:43] <Tuplanolla> Do you happen to know a short and simple tutorial about project file management?
[20:57:53] <cheeser> read the maven book
[20:57:54] <Tuplanolla> I find myself spending more times managing files than actually programming.
[20:58:05] <mapreduce> Tuplanolla: As in pom.xml files?
[20:58:09] *** Gracenotes has quit IRC
[20:58:19] <Tuplanolla> As in *.java, *.class and *.jar.
[20:58:30] <mapreduce> Tuplanolla: What build tool are you using?
[20:58:42] <Tuplanolla> javac only. :P
[20:58:42] <webczat> Are there any free hostings making it possible to write servlets?
[20:58:56] <mapreduce> Tuplanolla: That's a compiler, not a build tool as such.
[20:59:02] <mapreduce> Tuplanolla: Look into maven.
[20:59:02] <Tuplanolla> Well, no build tools then.
[20:59:04] <cheeser> webczat: yes
[20:59:25] <mapreduce> webczat: You can also do it on your own PC for development purposes.
[20:59:32] <cheeser> amazing!
[20:59:42] *** forneus has quit IRC
[20:59:42] *** diminish has quit IRC
[20:59:43] *** Bombe has quit IRC
[20:59:44] *** cschneid has quit IRC
[20:59:45] *** pht has quit IRC
[20:59:45] *** ktorn has quit IRC
[20:59:47] *** raek has quit IRC
[20:59:47] *** sheenobu has quit IRC
[20:59:48] *** ktorn_ is now known as ktorn
[21:00:28] <Tuplanolla> Maven... is it portable?
[21:00:35] <cheeser> ...
[21:00:36] *** Clete2 has joined ##java
[21:00:44] *** diminish has joined ##java
[21:00:50] <mapreduce> It is a Java program.
[21:00:57] <mapreduce> So it's as portable as Java is.
[21:00:59] <cheeser> it's usuable on most flavors of solaris.
[21:01:07] <cheeser> spelling++
[21:01:08] <mapreduce> That's more than solaris is.
[21:01:16] <webczat> Does it need apavhe/mod_jk if I use apache?
[21:01:22] <Tuplanolla> I was thinking of a few kB tool I could put on a memory stick.
[21:01:36] <mapreduce> webczat: Maven builds stuff, it largely doesn't care whether you use apache later.
[21:01:45] <cheeser> dear lord
[21:02:05] <mapreduce> Though there is a jetty:run goal you can use to have it locally host the servlets.
[21:03:27] *** alexandernst has quit IRC
[21:03:55] <Tuplanolla> I much prefer the C way of having a single *.bat or *.sh that builds the project (even partially) no matter how the files are located.
[21:04:02] <Tuplanolla> Might as well try Maven though.
[21:04:18] <sbalmos> You've never dealt with Makefiles then?
[21:04:43] <Tuplanolla> Haven't really needed to.
[21:04:49] <cheeser> wow. that's ... um. wow.
[21:04:51] <sbalmos> wow
[21:04:55] <sbalmos> <boggle/>
[21:05:00] <cheeser> Tuplanolla: you're a student?
[21:05:04] <Tuplanolla> Nope.
[21:05:06] <cbeust> Tuplanolla: You've probably never have to deal with complex software then
[21:05:06] *** jdolan has joined ##java
[21:05:18] <cheeser> professional?
[21:05:21] <kercyr> javac `find . | grep java$`
[21:05:24] *** r0bby has quit IRC
[21:05:26] <Tuplanolla> Not that either.
[21:05:31] <Tuplanolla> I've had bigger projects, but they don't usually take much to compile.
[21:05:39] <cheeser> not very big then.
[21:05:44] *** queequeg1 has quit IRC
[21:05:51] <cheeser> or just incredibly stupidly done.
[21:08:49] *** gracenotes has joined ##java
[21:09:02] <mapreduce> Tuplanolla: You can write a .sh file to build Java stuff if you like too.
[21:09:05] *** Speed` has joined ##java
[21:09:33] *** bitshuffler_ has joined ##java
[21:09:34] <Tuplanolla> I wouldn't call anything stupid that's easy to maintain though.
[21:09:34] <mapreduce> I occasionally do that, for throwaway projects, but I usually use maven.
[21:09:51] <saml> <jsp:include page="<%= somepath %>.html"/> why is this bad?
[21:09:59] *** new2net is now known as N2N
[21:10:07] <cheeser> if it's small enough sure. but any large project that doesn't use a build tool is dumb.
[21:10:44] <mapreduce> saml: Does it fail to compile?
[21:11:11] <saml> yah it doesn't like %>
[21:11:36] <cheeser> try ${somepath}.html
[21:11:54] *** Vorrin has left ##java
[21:11:56] <saml> i'm doing it with <c:set var="stuff" value="<%= asdfadadsadfaf.asdaf() %>"/> <jsp:include page="${path}.html" />
[21:12:13] *** starcoder has joined ##java
[21:12:16] <saml> i mean....... you know what i'm saying
[21:12:55] *** bduncan has joined ##java
[21:13:03] <saml> hrm.. jstl and el stuff are good.. but they silently fail
[21:13:24] *** bitshuffler has quit IRC
[21:13:25] <saml> <jsp:include page="something/that/doesn't/exist.html"/> is okay without compilation error
[21:13:33] <saml> is it really recommended?
[21:14:48] *** iulian has joined ##java
[21:15:11] *** Clete2 has quit IRC
[21:15:42] <Tuplanolla> Maven doesn't seem to provide an interface to compile/run/package/upload the project with a single keystroke, so I'm sticking with my scripts until I run into trouble.
[21:16:07] <mapreduce> Tuplanolla: mvn deploy
[21:16:15] <sbalmos> mvn de... <backspace/>
[21:16:22] <sbalmos> RIF
[21:17:28] *** cschneid has joined ##java
[21:17:28] *** pht has joined ##java
[21:17:28] *** raek has joined ##java
[21:17:31] <cheeser> hahahahah
[21:17:36] <cheeser> holy shit.
[21:17:46] <cheeser> your script doesn't have a single keystroke either.
[21:18:08] <Tuplanolla> It uses MS-DOS interrupts.
[21:18:11] <Tuplanolla> Let's not go there.
[21:18:37] <mapreduce> So you do use a build tool after all.
[21:18:50] *** Cymage is now known as cyjaz
[21:18:57] <sbalmos> int $0B = build
[21:18:58] *** cyjaz is now known as Cymage
[21:19:28] <Tuplanolla> I wouldn't classify it with such a high status word, mapreduce. :>
[21:19:38] *** Clete2 has joined ##java
[21:21:02] *** dropdrive has quit IRC
[21:22:00] *** dropdrive has joined ##java
[21:24:16] *** realtime_ has quit IRC
[21:29:57] *** dwilliamii has quit IRC
[21:30:25] *** tishammer has joined ##java
[21:30:47] <tishammer> why would one want to use nio instead of DataInputStream? I basically has the same api without the hassle.
[21:31:48] <saml> i do <c:set var="foo" value="bar"/> <jsp:include page="/some/path.html"/> .. but /some/path/html.jsp (that handles GET request to /some/path.html) has ${foo} == null
[21:34:36] *** Scorchin has quit IRC
[21:34:46] *** armyriad has quit IRC
[21:34:51] *** SSgtSpoon|work has quit IRC
[21:35:23] *** Speed` has quit IRC
[21:35:50] *** Speed` has joined ##java
[21:36:10] <saml> oh i had to do <c:set var="foo" value="bar" scope="request"/>
[21:36:23] <cheeser> tishammer: a class has the same api as an IO technique?
[21:36:26] *** forneus_ has quit IRC
[21:36:27] *** jesmon has quit IRC
[21:36:31] *** _controller has joined ##java
[21:36:48] <_controller> Hey, is there any way to check if another threads owns a specific object's monitor?
[21:36:56] <_controller> thread*
[21:37:38] *** tigger0jk has joined ##java
[21:38:10] *** N2N is now known as new2net
[21:38:15] *** forneus has joined ##java
[21:38:43] <nawk> Hi
[21:39:28] <new2net> hi
[21:39:39] *** jesmon has joined ##java
[21:39:43] <nawk> java is known as the "Java application launcher", so how does the JVM gets created/run
[21:39:51] <nawk> I am not sure how it works
[21:40:13] <nawk> I am reading the wiki right now, but dont' quite get it
[21:40:19] *** armyriad has joined ##java
[21:40:36] <nawk> http://en.wikipedia.org/wiki/Java_Virtual_Machine#Execution_environment
[21:41:01] <new2net> its the JRE, you can shred it
[21:41:12] <new2net> thats what I did
[21:41:25] *** Scorchin has joined ##java
[21:41:46] *** new2net has quit IRC
[21:42:11] <nawk> I mean java.exe
[21:42:20] *** wolfman2000 has joined ##java
[21:43:24] *** Auv5 has joined ##java
[21:46:00] *** cbeust has quit IRC
[21:46:28] *** cbeust has joined ##java
[21:47:18] <wyvern`> _controller, if you're using ReentrantLock I think you can
[21:47:36] <_controller> i was using implicit blocks, but i see using a reentrant one is the best way
[21:47:40] <_controller> locks*
[21:47:55] <wyvern`> you do not have access to anything like that if you're using implicit.
[21:51:48] <tishammer> cheeser: you know what i mean
[21:51:56] <cheeser> no, i don't.
[21:52:22] <tishammer> cheeser: instead of channel+bytebuffer i can use directly datainputstream. they both give me the ability to readInt, readLong etc from a bytestream
[21:52:25] <tishammer> basically
[21:52:40] <cheeser> one is blocking. one is not.
[21:52:42] <tishammer> but with datainputstream i can read faster as i can pass a bufferedinputstream
[21:53:02] <tishammer> cheeser: on files? nio is non blocking on files?
[21:53:23] <cheeser> who said anyting about files?
[21:53:28] <tishammer> i do
[21:53:38] <nawk> What's the point of an reentrantlock? (though I never used it in Java), it's kind of lazy to do that. Shouldn't programmer should keep track him/her self?
[21:54:05] <cheeser> just now maybe.
[21:54:14] <nawk> the number of times it has acquire the lock
[21:54:39] <wyvern`> nawk, why wouldn't you want it to be reentrant?
[21:54:42] <tishammer> ok, then now :) i don't see the sense of using nio with files while you can use DataInputStream(BufferedInputStream). it's way faster, easier to use and has similar apit
[21:54:55] <cheeser> that might be true.
[21:55:08] <tishammer> ok
[21:55:11] *** Bombstone has quit IRC
[21:55:41] <tishammer> and abount non-blocking, afaik inputstreams are now developed on nio, aren't they?
[21:55:49] <nawk> wyvern` I don't know. The only concurrent programming I've done is with Pthreads.
[21:56:05] <wyvern`> nawk, it's more pleasant in Java. Read JCIP :)
[21:56:08] <wyvern`> ~~ nawk jcip
[21:56:09] <javabot> nawk, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[21:56:13] <cheeser> tishammer: no
[21:56:24] *** harry_ has quit IRC
[21:56:25] <cheeser> InputStreams are blocking. always will be.
[21:56:27] <nawk> I can't think of a situation where a thread has to acquire a lock for a resource more than once
[21:56:48] <tishammer> ok
[21:56:52] <wyvern`> nawk what about a synchronized method that calls another synchronized method
[21:56:54] <wyvern`> that's reentrant.
[21:57:16] <_controller> should lock objects be volatile
[21:57:30] <wyvern`> _controller, are you changing which lock object is being used (which is a terrible idea btw)?
[21:57:46] <_controller> no
[21:57:55] <wyvern`> Then will volatile make any difference? (Hint: no.)
[21:57:56] <_controller> i never really got the purpose of volatile
[21:58:04] <_controller> if it doesnt block, then what's it do
[21:58:06] <wyvern`> ~~ _controller jcip
[21:58:06] <javabot> _controller, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[21:58:21] <_controller> can someone simply not explain it with a one liner?
[21:58:26] <wyvern`> No.
[21:58:29] <wyvern`> It's more complex than that.
[21:58:55] <wyvern`> It has implications for memory visibility and reordering. Read the book. It's a good book.
[21:59:00] <tishammer> about inputstreams. I'm implementing a datareader over my own db and would like to export Iterator interface. Of course that means no IOException at next(). What is the best practice in these situations? drop the idea of decorating with an iterator? :)
[21:59:15] *** homie has quit IRC
[21:59:30] <_controller> wyvern`, ok but should it simply be used when multiple threads mutate the same object concurrently
[21:59:30] *** Terabyte has quit IRC
[21:59:39] <wyvern`> _controller, read the book. It's complicated.
[21:59:39] <nawk> wyvern`, mmm... perhaps I should read JCIP when I have time. All I know is that a synchronized method implements a monitor in Java
[21:59:47] <_controller> ...
[21:59:52] *** zatan has joined ##java
[22:00:03] <wyvern`> nawk, that is correct.
[22:02:03] <mapreduce> tishammer: A bigger problem with that is that there's no way of closing the resource partway through the iteration.
[22:02:24] *** hd1 has joined ##java
[22:02:46] <mapreduce> E.g., you only care about the first three hundred bytes, so you stop iterating after that. The resource stays open and bad shit happens.
[22:02:47] *** Rayne has joined ##java
[22:03:21] *** homie has joined ##java
[22:03:43] *** [[thufir]] has quit IRC
[22:03:50] <_controller> guys does Executors.newFixedThreadPool instantiate a ThreadPoolExecutor
[22:03:51] <_controller> ?
[22:04:03] <wyvern`> Check the source and see
[22:05:08] <jim> speaking of source... can I get a tarball of it to link to eclipse?
[22:05:29] <wyvern`> if your jdk is installed properly eclipse should have no problems showing source of most classes
[22:05:35] <wyvern`> (i.e. not some com.sun ones)
[22:05:58] <whaley> jim: source.zip somewhere in the bowels of your jdk
[22:06:16] <jim> where can I get it?
[22:06:26] <tishammer> mapreduce: ok, you implement Closeable
[22:06:26] <jim> for 2.1 and maybe 2.2
[22:06:34] <wyvern`> huh? what is 2.1?
[22:06:49] <jim> wait, I'm sorry...
[22:07:00] <jim> I'm typing to wrong window
[22:07:05] <wyvern`> heh
[22:07:13] <whaley> ~~ jim ls
[22:07:13] <javabot> jim, wrong window pal!
[22:07:27] <tishammer> jim: at least it wasn't your CC number
[22:07:33] *** zemanel has joined ##java
[22:07:49] *** ojacobson has quit IRC
[22:07:55] <jim> or the password to Obama's toybox...
[22:08:21] <jim> again, sorry; have an awesome day
[22:08:42] *** gcristian has quit IRC
[22:10:08] *** Peste_Bubonica has quit IRC
[22:10:10] *** terranova has quit IRC
[22:11:15] *** ojacobson has joined ##java
[22:13:34] *** Nikelandjelo has joined ##java
[22:14:36] *** Scorchin has quit IRC
[22:16:45] *** Johannes13 has joined ##java
[22:16:59] <mapreduce> tishammer: The foreach construct won't call .close()
[22:18:50] <mapreduce> So you can't do for (String line: linesInFile(file)) if (line.startsWith("foo")) return line; without leaking resources.
[22:18:58] <mapreduce> (or slurping)
[22:19:39] *** Cymage has quit IRC
[22:19:49] *** Pozejdon has quit IRC
[22:20:12] *** whoever has joined ##java
[22:20:48] *** wchun has quit IRC
[22:20:49] <Tuplanolla> Slurping!
[22:20:50] *** Tuplanolla has quit IRC
[22:21:02] *** gtrak has quit IRC
[22:23:47] *** _controller has quit IRC
[22:25:09] *** Cymage has joined ##java
[22:25:21] *** magentar has joined ##java
[22:26:38] *** harry_ has joined ##java
[22:28:21] *** choongii has joined ##java
[22:31:49] *** yoshx has quit IRC
[22:34:08] *** hd1 has left ##java
[22:34:33] *** FrozenKn1ght has quit IRC
[22:37:05] *** luneff has joined ##java
[22:37:20] *** carutsu has joined ##java
[22:37:55] *** TomyLobo has joined ##java
[22:37:59] <TomyLobo> hi
[22:38:07] <LtHummus> javabot, say hi to TomyLobo
[22:38:07] <javabot> hi to TomyLobo
[22:38:14] <TomyLobo> lol
[22:38:28] <TomyLobo> javabot, say !k LtHummus
[22:38:28] <javabot> !k LtHummus
[22:39:50] *** Determinist has quit IRC
[22:40:26] *** lt232 has joined ##java
[22:40:26] *** Determinist has joined ##java
[22:41:31] *** Patt has joined ##java
[22:42:36] *** Lone_Rifle has joined ##java
[22:43:00] *** Cher has joined ##java
[22:43:48] <Lone_Rifle> "any discussions related to performance comparisons between Java and C++ ultimately boils down to how close you want to get to bare metal" - Discuss.
[22:44:42] *** brundlefly has quit IRC
[22:44:45] <lt232> int[ ] numbers;
[22:44:46] <lt232> is that what i need to write to declare an array that will hold a list of integers?
[22:45:17] <Lone_Rifle> ~~lt232 arrays
[22:45:18] <javabot> lt232, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[22:45:24] <Lone_Rifle> ~~lt232 collections
[22:45:25] <javabot> lt232, The Collections API is available at http://java.sun.com/javase/6/docs/technotes/guides/collections/index.html
[22:47:26] <TomyLobo> is there a way to look ahead in a stream or to put back a string i already read?
[22:47:32] *** ChanServ sets mode: +o tjsnell
[22:47:58] <TomyLobo> err bufferedreader to be precise
[22:48:17] *** ChanServ sets mode: +o tjsnell
[22:48:18] *** sebersole has quit IRC
[22:48:54] <Cher> TomyLobo: have you tried PushbackReader?
[22:49:37] <lt232> so im thinking that was right based on that
[22:49:39] <TomyLobo> ah sounds good
[22:49:52] *** kermit has joined ##java
[22:50:38] <TomyLobo> Cher is that significantly slower than bufferedreader?
[22:50:43] <TomyLobo> i.e. unbuffered
[22:51:38] <TomyLobo> in other words: should i wrap the bufferedreader in the pushbackreader or the filereader i have
[22:51:45] <TomyLobo> a box in a box in a box or a box in a box?
[22:53:18] *** titankiller has joined ##java
[22:54:09] <Cher> TomyLobo: That depends on your use case.
[22:54:49] *** Rubarb has joined ##java
[22:55:00] <Cher> TomyLobo: Unless your use case is inherently performance critical - which most use cases are not - performance should not matter directly, it would come automatically from a clean, aesthetic design.
[22:56:47] <TomyLobo> so it's not buffered?
[22:57:09] <Cher> Does the description of PushbackReader say it's buffered?
[22:57:30] <TomyLobo> no, but the ability to "unread" something kinda implies there is some kind of buffer
[22:58:06] *** Auv5 has quit IRC
[22:59:00] <Lone_Rifle> why would the presence of a buffer matter anyway?
[22:59:13] <Cher> Because the description doesn't mention buffering, I think it is a valid conclusion that PushbackReader buffers what you unread. It doesn't buffer less, otherwise it wouldn't work. It does not guarantee that it buffers more. It might be that it buffers what you unread and read again, but that wouldn't matter.
[22:59:37] <Lone_Rifle> ~javadoc PushbackReader
[22:59:38] <javabot> Lone_Rifle: http://is.gd/u5FvYb [JDK: java.io.PushbackReader]
[22:59:39] <Cher> In other words: If my use case suggests both, unreading and buffering, I would chain PushbackReader and BufferedReader.
[23:00:10] <TomyLobo> i found it makes my design cleaner to just make a pushbackreader in the small part of my code where i actually need it
[23:01:27] <Lone_Rifle> given you're working with Java, do you have bigger things to worry about than choosing the best combination of readers to go in your project?
[23:01:42] *** RobotCow has joined ##java
[23:01:50] *** Ashutto has quit IRC
[23:01:54] <TomyLobo> yes, but these are things i can't change :P
[23:03:06] *** Luc1fel has joined ##java
[23:03:07] <TomyLobo> like this: return position.clone().add(size.clone().multiply(0.5));
[23:04:35] <mapreduce> Clone, poor man's immutability.
[23:04:52] <TomyLobo> thing is, they are mutable
[23:05:00] <lt232> i have this array
[23:05:04] <lt232> String[] sentence = new String[5];
[23:05:04] <TomyLobo> and they'd suck if they weren't
[23:05:07] *** jonkri has quit IRC
[23:05:14] <lt232> now i need to assign a value inside the arry
[23:05:23] <mapreduce> TomyLobo: Why would they?
[23:05:29] <Cher> TomyLobo: You just discovered one of the things that I would change about the Java API, if I could: Dimension etc. should be immutable imo.
[23:05:46] <lt232> this be ok
[23:05:47] <lt232> sentence[5] = "sentence.";
[23:05:51] *** queequeg1 has joined ##java
[23:05:59] *** queequeg1 has left ##java
[23:06:15] <lt232> someone pm me
[23:06:18] <Cher> lt232: What exactly is the question?
[23:06:21] <TomyLobo> mapreduce because that would prevent efficient operation if you, say, want to sum up a bunch of vectors
[23:06:40] <TomyLobo> you'd essentially copy the vector each time you add something to it
[23:07:04] <mapreduce> TomyLobo: Not really. Allocating and deallocating very short-lived objects is blindingly fast on modern JVMs.
[23:07:08] <lt232> i need to assign a value inside the array
[23:07:16] <lt232> String[] sentence = new String[5];
[23:07:16] <mapreduce> lt232: Your code sample does that.
[23:07:24] <mapreduce> lt232: So what's the problem?
[23:07:25] <lt232> oh ok let me try again
[23:07:26] <Cher> lt232: Why don't you just compile and run this?
[23:07:30] <saml> final String[] sentence = new String[]{"a"};
[23:07:38] <TomyLobo> mapreduce it's not nothing
[23:07:39] <Lone_Rifle> http://ideone.com
[23:07:40] <lt232> i have other errors so im waiting
[23:07:57] *** r0bby has joined ##java
[23:08:03] <lt232> (d) sentence ["a "];
[23:08:08] <mapreduce> TomyLobo: Sure, but it's close enough to nothing to not matter in most if not all cases.
[23:08:10] *** xeer has joined ##java
[23:08:24] <lt232> sentence["a"];
[23:08:32] <Cher> lt232: I guess your program will compile but yield a runtime error. If you think a little bit about it, you should find out why.
[23:08:35] <mapreduce> lt232: Array indexes are ints, not strings.
[23:08:40] <xeer> This is some bs. HashMap.put claims to return the object inserted or null. Everything is returned as null! What gives?
[23:08:58] <mapreduce> xeer: It claims to return the previous object.
[23:09:06] <mapreduce> And oddly enough, that's what it does.
[23:09:20] <xeer> "previous" object referring to what
[23:09:32] <Cher> What's previousyl been mapped to the key.
[23:09:33] *** saml has quit IRC
[23:09:33] <mapreduce> Time.
[23:09:33] <Lone_Rifle> the previous object that was held by the Map at that key location
[23:09:39] <xeer> put(K, V) -> returns !V
[23:09:44] <TomyLobo> mapreduce even in C++ people care about useless copies. and you wont claim that allocation and deallocation is faster in java than in C++, right? :)
[23:09:52] <xeer> AGH that is so misleading.
[23:09:53] <mapreduce> TomyLobo: Yes, I will.
[23:09:54] <lt232> sentence["Hello"]; sentence[2] = "this "; [3] sentence = "is "; sentence ["a "]; sentence[5] = "sentence.";
[23:10:00] <lt232> those are what i've tried
[23:10:04] <lt232> which could be correct
[23:10:05] * Cher agrees with mapreduce.
[23:10:07] <TomyLobo> also, allocation is not the only thing involved in a copy
[23:10:16] <mapreduce> TomyLobo: new and delete are slower than Java for short-lived objects.
[23:10:17] <xeer> mapreduce: It's called put, not replace. I want back the object I inserted.
[23:10:22] <Lone_Rifle> ~~lt232 arrays
[23:10:23] <javabot> lt232, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[23:10:28] <mapreduce> Stack allocation in C++ is certainly fast though.
[23:10:29] <TomyLobo> mapreduce i'm talking about temporaries
[23:10:33] <TomyLobo> which reside on the stack
[23:10:47] <Lone_Rifle> actually, since we're slowly moving into C++ vs Java territory...
[23:10:52] *** Naith has joined ##java
[23:11:12] <TomyLobo> accum = accum + current; vs accum += current
[23:11:14] <mapreduce> TomyLobo: I'm not sure whether it's in yet, but I believe JVMs can/will be able to.. stack-allocate objects as an optimisation.
[23:11:24] <Lone_Rifle> is the whole performance comparison between the languages really a comparison between needs and wants?
[23:12:06] <mapreduce> TomyLobo: The general upshot is that code that minimises object creation often does more harm than good, other than for expensive objects like file handles.
[23:12:08] *** rjohnson19 has joined ##java
[23:12:14] *** harry_ has quit IRC
[23:12:33] *** jdolan has quit IRC
[23:12:45] <Lone_Rifle> a point i have in mind is that through GC Java can collate all the garbage and use one free() while C++ has to free() for each and every object
[23:12:48] *** terranova has joined ##java
[23:12:55] <mapreduce> If immutability would get you to a correct solution quicker, who gives a flying frog if it's 0.5% slower on every other Tuesday.
[23:12:58] *** terranova has quit IRC
[23:13:03] <Lone_Rifle> but on the other hand, there might be situations where latency is critical and so I don't want Java's GC to kick in at the wrong time
[23:13:06] <TomyLobo> Lone_Rifle pool allocators
[23:13:18] <Lone_Rifle> ~g pool allocators
[23:13:18] <javabot> http://www.google.com/search?q=pool+allocators
[23:13:18] *** gener1c has joined ##java
[23:13:31] *** terranova has joined ##java
[23:13:31] <Cher> mapreduce: I'm not sure that I agree there. I'd prefer that object creation is primarily driven by proper immutability / mutability properties of objects, by scope and by suited collaborations.
[23:13:33] <TomyLobo> http://www.boost.org/doc/libs/1_46_0/libs/pool/doc/index.html
[23:13:45] *** PrimeZ has joined ##java
[23:13:51] <gener1c> is there a way to set how a class will behave when System.out.print is invoked on it?
[23:13:52] <mapreduce> Lone_Rifle: You want the GC to kick in all the time, but not 'stop the world'.
[23:13:55] <gener1c> some return method?
[23:14:05] <mapreduce> gener1c: Override toString
[23:14:08] <Lone_Rifle> mapreduce: i thought G1 is stop-the-world?
[23:14:13] <gener1c> ok thanks mapreduce
[23:14:31] *** r0bby is now known as robbyoconnor
[23:14:33] <mapreduce> Lone_Rifle: I don't know much about it, but I expect it has other phases that don't stop the world.
[23:14:38] *** sbalmos has quit IRC
[23:14:43] <mapreduce> I.e., for short-lived objects.
[23:15:08] <Lone_Rifle> i doubt that would go down well with say, angry equity traders
[23:15:13] <mapreduce> Cher: I can't actually make any sense out of what you just said.
[23:15:42] <mapreduce> Lone_Rifle: I work on software where GC pauses are fairly fatal problems, and I just keep the heap low.
[23:15:51] <mapreduce> That way the pauses aren't noticeable.
[23:16:12] <Lone_Rifle> mapreduce: are you at liberty to disclose the software in question?
[23:16:20] <mapreduce> CCTV viewing software.
[23:16:33] <cheeser> aka public peeping toms
[23:16:33] <Lone_Rifle> ok
[23:16:43] <TomyLobo> tbh i wouldnt be surprised if some jvm implementation uses boost::pool :D
[23:17:30] <Cher> mapreduce: I refer to minimising object creation. You said it often does more harm than good. I think minimising object creation shouldn't be the primary design driver, but it definitely shouldn't be avoided either.
[23:17:53] *** queequeg1 has joined ##java
[23:18:05] *** queequeg1 has left ##java
[23:18:19] <mapreduce> Cher: I've benchmarked cases where it "seems obvious" that cacheing objects will be faster than recreating them, and found that it wasn't.
[23:18:50] <Lone_Rifle> mapreduce: did you document it, and is it accessible from the Net?
[23:18:55] <TomyLobo> Cher in the case of Vector.add, one could split the operation into mutating and a non-mutating part
[23:18:56] <mapreduce> Reasonably serious benchmarks running over a couple of weeks.
[23:19:07] *** smw has joined ##java
[23:19:21] <TomyLobo> Vector.addAndReturn(Vector)
[23:19:52] <mapreduce> Lone_Rifle: Yes, but probably in a project-specific way, and no. It'd take a rewrite to be publishable I think.
[23:19:55] <smw> Anyone here know jsvc well? I am getting an error when I try to run it. jsvc error: JSVC re-exec requires execution with an absolute or relative path
[23:20:02] <TomyLobo> that'd be the equivalent to C++'s operator+, while add would be +=
[23:20:05] *** srcerer has quit IRC
[23:20:16] <TomyLobo> however, that is ugly :)
[23:20:25] <Cher> mapreduce: I wouldn't care about creating a few String or Integer objects more than necessary, true. For short-lived flyweights I wouldn't care about their creation. For objectss which are more in the centers than at the leaves of models, I would.
[23:21:01] <mapreduce> TomyLobo: It makes more sense to have two Vector types, one mutable and one not, plus some conversions between the two.
[23:21:20] <TomyLobo> that wouldnt cut down on the method calls in my code
[23:21:41] <TomyLobo> it'd essentially replace the clones in my code by toImmutableVector
[23:21:49] *** shaunren has joined ##java
[23:22:06] <Cher> TomyLobo: Why do you want an immutable Vector?
[23:22:21] <mapreduce> position.add(size.multiply(0.5))
[23:22:22] <kercyr> so you can keep track of changes.
[23:22:29] <TomyLobo> what mapreduce said
[23:23:39] * kercyr doesn't understand what mapreduce caid
[23:23:45] <kercyr> said...
[23:24:02] <TomyLobo> that is the code i want to write and that's what i need immutable vectors for
[23:24:04] <Cher> Me neither. And I don't understand why someone would want an immutable java.util.Vector.
[23:24:30] <TomyLobo> not java.util.Vector, duh
[23:24:32] <mapreduce> I don't think it's java.util.Vector he's on about, but something like a 3D vector for graphics.
[23:24:35] <TomyLobo> a mathematical vector
[23:24:41] <Cher> Ah okay...
[23:24:56] *** Radu-Mihail has joined ##java
[23:25:04] <TomyLobo> no one likes java.util.Vector anyway
[23:25:06] <mapreduce> I'd want an immutable java.util.Vector so I don't have to putz about cloning it wherever I receive one.
[23:25:32] *** Free_Bullets has joined ##java
[23:26:02] *** terranova has quit IRC
[23:26:06] <mapreduce> A Smalltalk developer might not understand why you want your ints to be immutable.
[23:26:21] <Radu-Mihail> Hello.
[23:26:33] *** kh31d4r has joined ##java
[23:26:55] <TomyLobo> mapreduce 1 = 5?
[23:27:01] <Cher> Do you really want an immutable java.util.Vector or would an immutable java.util.ArrayList do? I mean, you don't need the sync stuff if it's the true object is immutable. You'd only need it if it's just an immutable view, but that makes no sense if you talk about cloning when receiving one. Right?
[23:27:27] <mapreduce> TomyLobo: I believe you can do something like that in Smalltalk.
[23:27:50] <TomyLobo> and subsequent reading from "1" would return 5?
[23:27:53] <TomyLobo> that is gross
[23:28:00] <mapreduce> Cher: Me? I don't really care, as I have access to libraries that provided immutable lists.
[23:28:22] <mapreduce> s/provided/provide/
[23:28:26] <TomyLobo> sounds functionally
[23:28:29] <TomyLobo> like your name :)
[23:28:42] <mapreduce> I use Functional Java, yes, but there's also Guava.
[23:29:16] <gener1c> oh no
[23:29:17] <Lone_Rifle> interesting, they were talking about it in the workplace the other day. Did you examine alternatives, and why did you settle with FJ?
[23:29:23] <gener1c> i cant invoke .toString on Int
[23:29:31] <TomyLobo> "Even the statement true become: false is valid in Smalltalk, although executing it is not recommended."
[23:29:33] <mapreduce> tbh I mainly only use fj's tuples and Option at the moment.
[23:29:34] <TomyLobo> from wikipedia :D
[23:29:41] <lt232> http://pastebin.com/hR0zq8jb
[23:30:18] <mapreduce> Lone_Rifle: I know the author, and had my own library before FJ existed, which was trivial to convert uses of to FJ.
[23:30:35] <mapreduce> Guava (then google-collections) refused to add something I found useful.
[23:30:43] <TomyLobo> lt232 nice code i guess, what is (with) it?
[23:30:58] <TomyLobo> oh, homework
[23:31:03] <TomyLobo> javabot, homework
[23:31:03] <javabot> Homework is meant to be done by YOU, so that YOU learn something. Stop cheating; we don't like doing our own, why should we do yours? Also, answering homework questions is extremely frustrating. See "~why no homework" for more reasons why we won't answer your questions.
[23:31:07] <xeer> lt232 is throwing code examples about just to get people to answer the questions on their test.
[23:31:19] <TomyLobo> cool, you have a homework factoid
[23:31:23] * kercyr loves fj.
[23:31:23] <Lone_Rifle> TomyLobo: ~~<user> <keyword> for better targetting
[23:31:43] <lt232> i need to initialize the nums array with random numbers
[23:31:44] <mapreduce> lt232: The answer is 10.
[23:31:49] <lt232> in my instance part
[23:31:50] <TomyLobo> what is one paste ~~? QQ?
[23:31:52] <Lone_Rifle> mapreduce: nein, 7!
[23:32:01] <lt232> stop guys either help or not
[23:32:02] <mapreduce> das ist klein
[23:32:05] <Cher> mapreduce: Ah you used base 42 :-)
[23:32:07] <Lone_Rifle> ~~lt232 homework
[23:32:08] <javabot> lt232, Homework is meant to be done by YOU, so that YOU learn something. Stop cheating; we don't like doing our own, why should we do yours? Also, answering homework questions is extremely frustrating. See "~why no homework" for more reasons why we won't answer your questions.
[23:32:09] <lt232> dont be a prick about it
[23:32:09] <PrimeZ> Anyone can suggest how can I create a general sql query (with multiple params) such that if some parameters are null, the condition on them (wherE) will not take place?
[23:32:30] <TomyLobo> mapreduce no, gigantisch
[23:32:35] <mapreduce> lt232: You haven't asked a question, prick.
[23:32:36] *** srcerer has joined ##java
[23:32:40] *** Mkop has quit IRC
[23:32:52] <lt232> sorry guys
[23:33:14] <Lone_Rifle> ~howtoaskforhelp
[23:33:15] <javabot> Lone_Rifle, what does that even *mean*?
[23:33:16] <xeer> lt232: I gave you the chance in pm to learn before posting homework
[23:33:18] <TomyLobo> PrimeZ refer to your server's manual. though you might give NOT ISNULL(field) a shot
[23:33:41] <kercyr> ~average
[23:33:41] <javabot> kercyr, what does that even *mean*?
[23:33:59] <Lone_Rifle> they've changed javabot's response to unknown keywords. hmph.
[23:34:12] <mapreduce> Yeah, my original wording was far better.
[23:34:21] <TomyLobo> what was it?
[23:34:32] <Lone_Rifle> "i have no idea what <keyword> is"
[23:34:50] <cheeser> they == me
[23:34:50] <TomyLobo> hmm abusable
[23:35:01] <cheeser> not really
[23:35:08] *** Soliah has quit IRC
[23:35:14] <TomyLobo> i have no idea ~yourmom is
[23:35:18] <TomyLobo> +what
[23:35:25] <Lone_Rifle> javabot sounds a bit hysterical now
[23:35:26] <javabot> Lone_Rifle, what does that even *mean*?
[23:35:30] <mapreduce> Amusing when you tell someone else about a non-existent factoid.
[23:35:41] *** ojacobson has quit IRC
[23:35:41] <mapreduce> ~~ cheeser smelly feet
[23:35:42] <javabot> cheeser, what does that even *mean*?
[23:36:01] <Lone_Rifle> see, it even acts indignant when i pass a comment about it
[23:36:49] <cheeser> i need to fix that, actually, to bother the sender on a bad factoid like that.
[23:37:28] *** Carnage\ has joined ##java
[23:37:32] <kba> anybody have experience with CHARVA? I installed it as http://www.pitman.co.za/projects/charva/Download.html instructed me, but when I do "sh test.sh" nothing happens. "sh test.sh swing" works, however.
[23:37:39] *** cbrock has quit IRC
[23:37:54] *** xianny has quit IRC
[23:38:01] <TomyLobo> nice portmanteau
[23:38:10] <mapreduce> kba: support at pitman dot co.za
[23:38:35] *** cbrock has joined ##java
[23:38:48] <mapreduce> Sorry, that was just a guess, but this isn't: http://www.pitman.co.za/projects/charva/Support.html
[23:39:41] *** titankiller has quit IRC
[23:39:50] *** Nikelandjelo has quit IRC
[23:39:50] <mapreduce> kba: What terminal are you running it within?
[23:39:52] *** jaskal_ has joined ##java
[23:39:56] <kba> bash
[23:40:11] <mapreduce> No, that's your shell.
[23:40:24] <mapreduce> E.g., xterm, rxvt, gnome-terminal, OS X Terminal
[23:40:28] <kba> Standard MacOSX Terminal
[23:40:39] <TomyLobo> konsole *cough*
[23:40:39] *** Symbi0nt|GER has joined ##java
[23:41:50] <mapreduce> There's nothing in the docs that I can see referring to OS X's Terminal, so I'd try the mailing list.
[23:42:14] *** ldh has joined ##java
[23:44:33] *** Auv5 has joined ##java
[23:45:43] *** fisted has quit IRC
[23:47:26] *** jaskal_ is now known as jaskal
[23:47:27] *** fisted has joined ##java
[23:47:29] *** jaskal has quit IRC
[23:47:30] *** titankiller has joined ##java
[23:47:54] <kba> thanks
[23:48:46] *** Wyvern666 has joined ##java
[23:49:49] *** riotz has quit IRC
[23:49:50] *** BlGene has joined ##java
[23:50:06] <Wyvern666> why the read() in InputStream returns an int in the range 0-255 and read() in Reader returns an int in the range 0-65535?
[23:50:15] *** bitterman has joined ##java
[23:50:16] *** jaskal has joined ##java
[23:50:28] <carutsu> is there a BufferedReader to read just data, not text?
[23:50:37] <cheeser> because InputStream operattes on bytes and Reader on char
[23:50:46] <cheeser> carutsu: InputStream
[23:50:51] <cheeser> but it's not buffered
[23:51:24] <carutsu> cheeser: basically what I can is have a buffer to keep all the characters untill an end of line is read
[23:51:27] <carutsu> *want
[23:51:37] *** Johannes13 has quit IRC
[23:51:57] <cheeser> then use a BufferedReader
[23:52:28] <Wyvern666> [cheeser] and why the range is small for bytes?
[23:53:00] <shiranpuri> Wyvern666: cuz that's the size for bytes?
[23:53:01] <carutsu> cheeser: but the tream has more than characters
[23:53:04] *** luneff has quit IRC
[23:53:07] <cheeser> unless you don't really mean "characters" in which case you shouldn't say characters
[23:53:18] <cheeser> Wyvern666: how large a number can a byte hold?
[23:53:20] <carutsu> pardon me
[23:53:27] <carutsu> cheeser: pardon me the bytes
[23:53:55] <cheeser> then the idea of EOL is meaningless with binary data
[23:54:30] <Wyvern666> mm yes is 255
[23:55:10] <carutsu> cheeser: unless, of course, I'm controling that binary data and can asure that an EOL character means that it's the end of the message
[23:55:44] *** lt232 has quit IRC
[23:56:01] <cheeser> then read until you see 13 and dump the bytes in to a ByteArrayOutputStream
[23:57:08] <carutsu> cheeser: that's what I needed!, thank you :-D
[23:57:27] <cheeser> sure
[23:57:36] *** riotz has joined ##java
[23:57:42] *** epalm has joined ##java
[23:58:02] <carutsu> cheeser: just one thing, what I failed to tell you is that all this is just for a socket and all I want is to make sure I have all the bytes before reading the message
[23:58:12] <carutsu> thanks :-)
[23:58:30] *** t0rc has joined ##java
[23:58:32] *** lt232 has joined ##java
[23:59:10] *** webczat has quit IRC
[23:59:14] <cheeser> i'm writing the same kinda code at this very moment.
[23:59:14] <cheeser> 8^)=
[23:59:33] <carutsu> cool
[23:59:45] <carutsu> B-)

   March 4, 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 | >