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


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:01:12] *** FRSoldier has quit IRC
[00:01:34] *** Gunduz has joined ##java
[00:02:01] *** Granjow has quit IRC
[00:02:12] *** fuzzygroove has left ##java
[00:02:24] <Gunduz> can anyone help me with an enigma machine?
[00:03:07] <whaley> no
[00:03:53] <Gunduz> just, no?
[00:04:18] <cheeser> show us code. maybe someone can help with that.
[00:05:05] <Gunduz> alright
[00:08:57] *** cythrawll has quit IRC
[00:10:25] *** pipeep has quit IRC
[00:12:49] *** t0rc has joined ##java
[00:13:49] *** t0rc has quit IRC
[00:14:51] *** djbpython has joined ##java
[00:15:15] *** t0rc has joined ##java
[00:16:34] *** srm has quit IRC
[00:18:18] *** TheSchoolinator has quit IRC
[00:18:20] <Gunduz> i have a driver class, and four enigma classes-each implements a more complex version of the machine
[00:18:26] <Gunduz> the components are here
[00:18:27] <Gunduz> http://pastebin.com/ZNVbxbmq
[00:18:33] <Gunduz> along with the array values at the bottom
[00:18:51] <Gunduz> i can get the machine to run with one rotor, and a reflector
[00:19:21] <Gunduz> but adding another rotor and a plugboard gives different input and output
[00:21:06] *** xiliax has quit IRC
[00:21:54] *** srm has joined ##java
[00:22:06] *** srm has quit IRC
[00:22:29] *** ojacobson has joined ##java
[00:24:09] *** arborist has quit IRC
[00:25:29] *** BeholdMyGlory has quit IRC
[00:25:44] *** BeholdMyGlory has joined ##java
[00:26:08] <whoever> i am having a recursion problem , line 19 x cannot be resolved, can some one take a look http://pastebin.com/nSXG8A1S
[00:27:32] *** grug has quit IRC
[00:27:55] *** karega has quit IRC
[00:28:30] <Planck_> whoever: Look VERY carefully at your for loop
[00:28:36] *** RDove has quit IRC
[00:28:46] <ojacobson> ~planck_++
[00:28:47] <javabot> planck_ has a karma level of 11, ojacobson
[00:28:51] <ojacobson> I didn't see that the first time past
[00:28:59] <ojacobson> you're right, of course
[00:29:02] *** BeholdMyGlory has quit IRC
[00:29:16] *** BeholdMyGlory has joined ##java
[00:29:20] <ojacobson> One of the reasons Sun's recommended style ({ on the same line) is nicer sometimes :)
[00:29:40] *** gtrak has quit IRC
[00:30:07] *** homie has joined ##java
[00:30:11] *** GFXDude has joined ##java
[00:30:15] <GFXDude> Can you do this.length?
[00:30:29] <GFXDude> of an array object
[00:30:55] <Planck_> In what cases could "this" be an array object?
[00:31:02] <Hyphenex> Howdy Everyone. Just a quick question, Struts and Spring kind of aim to do the same thing right? Would it be best to learn Struts or Spring?
[00:31:19] *** jesmon` has quit IRC
[00:32:21] <_W_> Hyphenex, Spring is more than Spring MVC, which I guess is what you're referring to?
[00:32:39] *** s3a has joined ##java
[00:32:42] <_W_> because if that's not what you mean, the answer is "no" to the first
[00:33:03] <_W_> (I don't know enough about Struts to answer the other question)
[00:33:10] <s3a> is it possible to set the vertical size (height) of a JTextField to a fixed constant? I'm using GridLayout for my panel
[00:34:02] <Hyphenex> _W_: I guess I'm referring to Spring MVC then
[00:34:04] <GFXDude> Planck, it's a weird set up
[00:34:18] <GFXDude> my class extends a custom expandablearraylist
[00:34:22] <s3a> i see getHeight but not setHeight inherided from JComponent
[00:34:26] <GFXDude> that makes it into an array
[00:34:33] <_W_> Hyphenex, it's not a given. You should probably do a little more research on your own.
[00:34:42] <ojacobson> GFXDude: no, it doesn't
[00:34:46] <ojacobson> 'this' is never an array type.
[00:34:53] <Hyphenex> _W_: ok, thanks. I was kind of hoping you'd say one was horribly outdated :P
[00:34:55] <ojacobson> You can't extend Foo[] for any type Foo
[00:35:16] <ojacobson> ExpandableArrayList is not, itself, an array
[00:35:23] <ojacobson> it may contain one, but it is not one
[00:35:40] <GFXDude> I know that, it creates an array of type AList_v2
[00:35:43] <GFXDude> another one of my classes
[00:35:54] <GFXDude> and in AList_v2 i need to get the length of it
[00:35:57] <Planck_> AList_v2 isn't an array either
[00:35:58] <GFXDude> so I thought this.length
[00:36:12] <GFXDude> Ok, i see now
[00:36:20] *** intuition has joined ##java
[00:36:22] *** intuition has left ##java
[00:36:23] <GFXDude> hrm...
[00:37:39] <Planck_> It may conceptually be a class that emulates array behaviour, but in the sense of the Java language, it isn't an array.
[00:39:36] *** ninjai has joined ##java
[00:39:41] *** Abhi347 has joined ##java
[00:40:00] <ninjai> is there any simple way to get the numeric position of a latter in the alphabet? IE: b = 2, c = 3, etc?
[00:40:46] *** disaster_02 has quit IRC
[00:40:49] <Planck_> Sure, for the usual English characters.
[00:41:30] <cheeser> 'b - 'a' e.g.
[00:41:58] *** amphtrox has quit IRC
[00:42:23] <Planck_> ninjai: You'll probably want to convert to a fixed case first (e.g. lowercase)
[00:42:40] <ojacobson> and be prepared for input outside the range 'a' through 'z'
[00:43:04] *** ernimril has quit IRC
[00:43:05] *** freeone3000 has joined ##java
[00:43:12] *** dangertools has quit IRC
[00:43:27] <GFXDude> Is there a method you can call on an array to get the length? like .length() instead of just .length
[00:43:27] <GFXDude> ?
[00:43:34] <Planck_> There's not a lot you can do with the less usual accented characters in English
[00:43:38] *** sbalmos has joined ##java
[00:43:45] *** dangertools has joined ##java
[00:43:56] <ojacobson> GFXDude: No, array types have no methods beyond what Object provides
[00:44:14] <ojacobson> they have no source code for those methods to be defined in, and the JLS doesn't define any magic ones
[00:44:23] <Cher> GFXDude: Why is array.length not good?
[00:44:33] <GFXDude> because there's no array in the class i'm working with
[00:44:43] <GFXDude> my class is extending expandablearraylist
[00:45:11] <GFXDude> and in that class, it creates an array of T
[00:45:19] <Planck_> ExpandableArrayList doesn't have a .size() or anything like that?
[00:45:41] <GFXDude> and in my AList_v2 (the class that extends it) I need to get the size of the array created by ealist
[00:46:25] * Cher feels a lot of *ouch*
[00:46:36] <sbalmos> so build a protected getter or make the array protected. Random-ass guess
[00:47:24] *** ninan has quit IRC
[00:47:45] *** freeone3000 has quit IRC
[00:48:14] <GFXDude> If I create an array[25] and add 3 items to it, if I do array.length will it return 25 or 3?
[00:48:35] <whaley> ~tias
[00:48:36] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[00:48:56] <Planck_> What do y ou mean "add 3 items to it"? Set 3 of its elements?
[00:49:03] <whaley> GFXDude: to be more exact you wouldn't be adding three items to it... you'd be changing the values of 3 of the 25 elements in the array
[00:49:30] <GFXDude> ok yeah that's what I thought
[00:49:35] <GFXDude> planck, yeah
[00:50:13] <GFXDude> so if I make a method in the ealist: getSize() { return list.length } it would return 25
[00:50:21] <GFXDude> list being the array
[00:50:29] <Planck_> Yes, arrays always have the same number of elements they were created with. All you can do it change what the values of the elements are.
[00:51:48] *** freeone3000 has joined ##java
[00:55:18] <GFXDude> Write a private void reduceArray() method that creates a new array that is three quarters the size of the current array and then copies the objects in the list to the new array.
[00:55:26] <GFXDude> That's what I was doing, but it tells me to make it void?
[00:55:43] <GFXDude> wouldn't I have to return the list for it to be of any use?
[00:57:21] <freeone3000> Yeah.
[01:00:39] <s3a> Is it possible to fix the height of a JTextField to a constant? If you know that it's not, that would be useful too.
[01:00:52] *** wolfman2000 has joined ##java
[01:01:19] <freeone3000> It's possible to set its minimum, maximum, and preferred size to the same value. LayoutManagers which honor any of these properties (basically, not GridLayout) will keep it a fixed size.
[01:02:28] <s3a> freeone3000, ok so basically i need to find a better suited layout manager?
[01:03:04] <freeone3000> Sure, why not. JComponents generally don't have a fixed size, though.
[01:03:14] *** Behold has joined ##java
[01:04:26] <tokam> all already importet org.apache.commons into my project. is there somthing nice for computing json included? which api to use to compute a json input well. I'd like to decode it to an array.
[01:04:30] *** BeholdMyGlory has quit IRC
[01:04:30] *** Ademan has joined ##java
[01:04:38] <ojacobson> ~json parsing
[01:04:39] <javabot> To process JSON, consider using com.zwitserloot.json (http://bit.ly/gelTQK), gson (http://code.google.com/p/google-gson/), Jackson (http://jackson.codehaus.org/), or the example code from json.org.
[01:05:00] *** rretzbach has quit IRC
[01:11:26] *** ernimril has joined ##java
[01:16:31] *** gucko has joined ##java
[01:16:34] <gucko> hi guys
[01:17:03] *** ariaxu has joined ##java
[01:17:36] <gucko> I want to create a diagramming tool, but I don't know how can I implement the algorithm for the lines that links between the diagrams...I hope you understood what I mean
[01:17:46] <gucko> how such a thing can be solved?
[01:17:54] *** ariaxu has left ##java
[01:18:04] <gucko> I don't want the lines to be over each others
[01:18:09] <ernimril> gucko: that question makes no sense at all
[01:18:29] <gucko> ernimril: have you used Dia?
[01:18:46] *** hex` has quit IRC
[01:18:52] <ernimril> gucko: if you have a graph and want to lay it out in way that minimizes crossing lines, then there are a few different options
[01:19:07] <gucko> ernimril: exactly :)
[01:19:14] <gucko> ernimril: please how?
[01:19:14] <ernimril> gucko: many graph packages already have such options, have you looked at jfreechart?
[01:19:24] <gucko> I will look now
[01:19:37] <ernimril> ~jfreechart
[01:19:37] <javabot> ernimril, jfreechart is http://www.jfree.org/jfreechart/
[01:19:46] <paissad> guys, i have a ResultSet 'rs' which exists already and not null ..... now, i would like to create a database and a table from that ResultSet 'rs'
[01:19:47] <paissad> is that possible ?
[01:20:07] *** Gunduz has quit IRC
[01:20:26] *** the_cyber_guy has quit IRC
[01:20:30] <ernimril> paissad: normally it is easier to just run the sql "create table foo as select a, b, c from bar;"
[01:20:33] *** Mkop has joined ##java
[01:20:42] *** Wicked has joined ##java
[01:21:08] <paissad> ernimril, actually, i have this:
[01:21:08] <paissad> ResultSet rs = Csv.getInstance().read(_csvFileName, null, _csvCharset);
[01:21:35] <ernimril> paissad: sorry, you need paranthesis: "create table foo as (select a, b, c from bar)"
[01:21:38] <paissad> ernimril, that's why i cannot create the db/table in a "standard/common" way
[01:21:48] *** Blub\0 has quit IRC
[01:22:04] <gucko> ernimril: is it difficult to implement it without jfreechart? I wonder is an algorithmic issue or what?
[01:22:07] <ernimril> paissad: 1) make sure the table exist, 2) loop over rs and do an insert for each line
[01:22:15] *** [[thufir]] has joined ##java
[01:22:44] <ernimril> gucko: there are many different algorithms, I do not remember the exact names, try using google
[01:22:49] *** Blub\0 has joined ##java
[01:23:05] <s3a> freeone3000, so what do normal people do? It's really ugly to have text fields with one row of text be a super large white rectangle
[01:23:14] <ernimril> paissad: if your database supports batching it may be better to batch the inserts, but it is a little bit more complex code to get right
[01:23:22] <gucko> ernimril: I'm not asking because I want to build an application, rather to learn how such things are implemented. Can you provide me with keywords to use it in Google please?
[01:23:25] *** cbeust_ has quit IRC
[01:23:29] <whoever> Planck_: is it that i'm calling x from within loop
[01:23:56] <ernimril> gucko: graph layout algorithm
[01:24:09] <freeone3000> s3a: Use a layoutmanager which doesn't force components to fill space beyond their preferredsize.
[01:24:28] <whoever> Planck_: should't i send it dir .. but the i get the resolve error still
[01:24:41] *** L-----D has joined ##java
[01:24:48] <gucko> ernimril: found it :D http://en.wikipedia.org/wiki/Force-based_algorithms_(graph_drawing)
[01:24:50] <s3a> freeone3000, gridbaglayout?
[01:24:53] <gucko> thanks :D
[01:24:56] <freeone3000> s3a: Never.
[01:24:57] <paissad> ernimril, loop over rs and do an insert for each line (indeed, that's what i wanted to know ... how to proceed ?)
[01:24:57] <paissad> i only know Statement.execute()/executeBatch() ...
[01:24:59] <ojacobson> paissad: Remember when I suggested liquibase? It also has tools for populating tables from CSV files.
[01:25:05] <s3a> freeone3000, lol it's bad?"
[01:25:08] <freeone3000> Yes.
[01:25:25] <paissad> ojacobson, yes, i remember liquidbase, i have it in my considerations
[01:25:25] <ernimril> ~~paissad jdbc
[01:25:26] <javabot> paissad, jdbc is is the Java Database Connectivity API. It's the standard java API for communicating with databases using embedded SQL commands. See http://java.sun.com/javase/6/docs/technotes/guides/jdbc/index.html - and for some drivers: http://jdbc.postgresql.org/ http://dev.mysql.com/doc/refman/5.0/en/connector-j.html
[01:25:31] <s3a> no offense but you people hate a lot of things such as applets, what's good?
[01:25:40] <ernimril> paissad: read the tutorial, learn how to use prepared statements
[01:25:51] <paissad> ah ok, thanks
[01:25:52] <freeone3000> s3a: Webstart, in that case.
[01:26:19] <ernimril> s3a: some of us do not hate applets, you can actually run our system as an applet if you want (most people use webstart though)
[01:26:37] <tokam> ojacobson & channel, we have are trying to decode a nested json with gson and we have a problems with it. as result we get an exception: "com.google.gson.JsonParseException: Type information is unavailable, and the target object is not a primitive" how to do this best?
[01:26:52] <ernimril> s3a: but that I make sure that we can run our application as an applet does not mean that I also want to support your java<->browser interaction problems
[01:26:52] <whoever> Planck_: still here
[01:27:28] <ernimril> s3a: if you want to do applications that can be started from a web page, do a webstart program
[01:28:46] *** demifuror has quit IRC
[01:28:47] <s3a> actually, i'll look into that later because i want to focus on one issue at a time
[01:29:16] <s3a> freeone3000, any layout manager in java.awt?
[01:29:23] <s3a> please no external stuff
[01:29:29] <s3a> i'm not advanced enough for extra problems
[01:29:32] <freeone3000> s3a: All of them are in java.awt.
[01:30:13] <ernimril> s3a: GridBagLayout is pretty good if your layout is non-trivial. BorderLayout may work for some things, FlowLayout works fine for a line of buttons, ...
[01:30:29] *** terranova has quit IRC
[01:30:36] <freeone3000> GridBagLayout is terrible, especially if your layout is non-trivial. You end up with more lines of code messing with the layout constraints than you do messing with your components.
[01:30:40] <svm_invictvs> Hola
[01:30:55] <svm_invictvs> I've never found borderlayout particularly useful
[01:31:12] *** ExtraSpice has quit IRC
[01:31:17] <freeone3000> GroupLayout is better, but it's much easier to just use BorderLayout, GridLayout, and FlowLayout, nested appropriately.
[01:31:34] *** diegoviola has left ##java
[01:31:44] <freeone3000> BoxLayout and SpringLayout also have their places.
[01:32:58] <s3a> wait i'll read up 2 secs
[01:33:02] *** robbyoconnor has joined ##java
[01:33:46] *** Dux has joined ##java
[01:34:26] *** Flueworks has quit IRC
[01:38:41] *** r0bby has joined ##java
[01:38:42] *** robbyoconnor has quit IRC
[01:38:54] *** ojacobson has quit IRC
[01:39:01] *** ojacobson has joined ##java
[01:40:50] *** eyesUnclouded has quit IRC
[01:42:30] *** tieTYT2 has joined ##java
[01:43:02] <tieTYT2> i'm seeing a timestamp in my xml file that looks like this: 2011-03-02T00:38:40Z What's the deal with that Z there? Is this an invalid date?
[01:43:37] <cheeser> no
[01:43:38] <freeone3000> Timezone.
[01:43:47] <tieTYT2> yeah but it doesn't say the timezone there, that I see
[01:43:50] <sbalmos> Zulu
[01:43:52] <tieTYT2> does that mean it's UTC or something?
[01:43:56] <sbalmos> ya
[01:44:31] <tieTYT2> ok thanks
[01:44:52] <GFXDude> if I typecast a double to an int does it know how to round mathematically?
[01:45:00] <sbalmos> tias
[01:45:02] <GFXDude> i.e. 4.3 rounds to 4 and 4.8 rounds to 5?
[01:45:40] <ojacobson> tieTYT2: it's shorthand for ZULU, which is shorthand for all-zeroes (US military parlance, IIRC), which is shorthand for UTC+0
[01:45:47] <ojacobson> Hope that helps
[01:45:55] <ojacobson> (Either US Mil or NATO, I don't remember which)
[01:45:59] <tieTYT2> ojacobson: cool, thanks
[01:46:05] <tieTYT2> http://wwp.greenwichmeantime.com/info/zulu.htm
[01:47:17] *** tewecske has quit IRC
[01:47:24] *** Bilz has joined ##java
[01:47:56] <Bilz> hi guys. what would you recommend to use (layout manager wise) to code the GUI for a card game? where each player has a hand of cards say...
[01:49:18] <freeone3000> One that allows overlap. None in the SDK do.
[01:51:11] *** explodes has quit IRC
[01:51:13] <Bilz> crap
[01:51:28] *** neuro_sys has quit IRC
[01:51:43] *** cbeust_ has joined ##java
[01:52:13] <bearded_oneder> Bilz: you could use Java 2D.
[01:52:35] <Fanook> ~~ GFXDude tias
[01:52:36] <javabot> GFXDude, Try it and see. You learn much more by experimentation than by asking without having even tried.
[01:52:56] *** tilerendering has quit IRC
[01:53:32] <GFXDude> I'm getting:
[01:53:33] <GFXDude> location: interface list.BetterList<java.lang.String>
[01:53:33] <GFXDude> System.out.println(myList.size());
[01:53:49] <GFXDude> but there's nothing about strings in betterlist
[01:54:46] *** matsebc has quit IRC
[01:55:16] <freeone3000> Okay. You got everything there except what error it is.
[01:55:28] <GFXDude> I've got: public int getSize() { return list.length } in ExpandableArrayList, public int size() { return getSize(); } in AList_v2 which extends EAList, and myList.size() in my test class
[01:55:51] <GFXDude> Lab07.java:75: cannot find symbol
[01:55:51] <GFXDude> symbol : method size()
[01:56:28] *** Gracenotes has joined ##java
[01:56:40] <GFXDude> but there's no reason it can't see size()
[01:56:42] <freeone3000> Paste your code.
[01:56:54] *** werdan7 has quit IRC
[01:57:19] <freeone3000> (Random guess: The reference is of a type more general than AList_v2)
[01:57:35] *** DJClean has quit IRC
[01:59:29] <GFXDude> Test Class: http://slexy.org/view/s20HPtPoLj EAList: http://slexy.org/view/s21LqeBggv AList: http://slexy.org/view/s2xdrePUrh
[02:00:20] *** eyesUnclouded has joined ##java
[02:00:39] *** karega has joined ##java
[02:00:45] *** teralaser has quit IRC
[02:00:47] *** TheSchoolinator has joined ##java
[02:00:52] *** ojacobson has quit IRC
[02:01:50] *** surial has quit IRC
[02:02:41] *** plugandplay has joined ##java
[02:04:04] *** echosystm has joined ##java
[02:04:11] <echosystm> is it safe to put passwords in JNDI?
[02:04:23] <echosystm> ie. comp/env/password
[02:05:03] *** BeholdMyGlory has joined ##java
[02:06:00] <_W_> echosystm, safe from what?
[02:06:07] <echosystm> mainframe hackers
[02:06:21] <dmlloyd> no, it's not, IMO
[02:06:25] <_W_> I have no idea, I don't know what "mainframe hackers" are
[02:06:30] <echosystm> i need a place to put all my webapp config
[02:06:35] *** surial has joined ##java
[02:06:45] <echosystm> somewhere that sits outside the war, so it doesnt need to be rebuilt all the time
[02:06:52] <_W_> echosystm, do a proper evaluation of scenarios
[02:06:59] <dmlloyd> how about a keystore
[02:07:09] <echosystm> keystore?
[02:07:17] <_W_> how likely is some subsystem to be compromised, and what damage would it otherwise do?
[02:08:05] *** Behold has quit IRC
[02:08:13] <_W_> I would think someone able to access your JNDI (assuming it is not otherwise exposed to the outside world) would be equally capable of hooking into the code that uses the passwords
[02:08:19] <echosystm> i guess the question is this - is JNDI any less secure than a file on the disk?
[02:08:36] <_W_> echosystm, I can't see how
[02:08:41] <echosystm> i'm not too familiar with how JNDI works - is it accessible over the network or anything like that?
[02:08:55] <freeone3000> It can be. But then, so can files.
[02:09:06] <_W_> echosystm, then why bother making decisions without getting such details?
[02:09:26] <echosystm> how would jndi be accessible over the net?
[02:09:34] <echosystm> isnt it just setting environment variables on the jvm?
[02:10:19] <cheeser> ~jndi
[02:10:19] <javabot> cheeser, jndi is http://java.sun.com/products/jndi - Java Naming and Directory Interface.
[02:10:22] <cheeser> read that
[02:12:46] <plugandplay> is it possible to set JDK_HOME by an ANT property ?
[02:13:21] *** gelignite has quit IRC
[02:13:40] <plugandplay> i run ANT from a Java program with org.apache.tools.ant.Project class
[02:14:18] *** eyesUnclouded has quit IRC
[02:14:35] <cbeust_> plugandplay: you can't change the global environment from Java. You can pass parameters to forked JVM's though
[02:15:13] <plugandplay> cbeust_, yes but ant can't give "jdk home" from another way than JDK_HOME environment variable ?
[02:15:48] <cbeust_> plugandplay: indeed you can't. What are you trying to do?
[02:16:00] <Planck_> whoever: Look carefully. Your use of 'x' isn't actually within the loop.
[02:16:53] <Planck_> GFXDude: What is the BetterList interface?
[02:17:05] *** Fanook has quit IRC
[02:18:05] *** _controller has joined ##java
[02:18:50] <_controller> Hello, how can I get the amount of matches found by a Matcher without doing something among the lines of "while(matcher.find()) count++;"? Is there a function within the class that returns this value?
[02:19:40] <tokam> hey dudes I am sitting here since hours. is anyone comfotable with the GSON api? I am trying to decode the following json: http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=hello&q=world&langpair=en%7Cde
[02:19:44] <plugandplay> cbeust_, i generate source file from a java program and i want , clean and run , after java file generation
[02:20:16] *** jpk has quit IRC
[02:20:35] <surial> _controller: while (matcher.find()) is it. matcher.find() is lazy.
[02:20:49] <_controller> crap..
[02:20:51] <_controller> ok thanks
[02:22:23] *** optraz has joined ##java
[02:22:30] *** Fanook has joined ##java
[02:23:05] *** placydo has joined ##java
[02:23:54] *** matsebc has joined ##java
[02:24:28] <tokam> what is the correct data type for json objects which are listed in brackets like [
[02:24:35] *** Bilz has quit IRC
[02:25:09] <freeone3000> Object.
[02:25:29] *** ojacobson has joined ##java
[02:25:55] *** eyesUnclouded has joined ##java
[02:26:39] *** pantokrator has joined ##java
[02:26:49] *** Sliker has quit IRC
[02:26:59] *** rgr has quit IRC
[02:30:07] *** mhahe has quit IRC
[02:32:15] *** belugs has quit IRC
[02:32:27] *** eyesUnclouded has quit IRC
[02:32:38] *** wliao has joined ##java
[02:32:47] *** matsebc has quit IRC
[02:33:14] *** Luc1fel has quit IRC
[02:35:58] *** plugandplay has quit IRC
[02:36:15] *** Behold has joined ##java
[02:36:28] *** _controller has quit IRC
[02:38:15] *** L-----D has quit IRC
[02:40:15] *** BeholdMyGlory has quit IRC
[02:40:15] <Abhi347> When I am trying to compile any java program from command prompt, its saying illegal character to every character of the code. What could be the problem??
[02:40:35] <freeone3000> Your encoding's screwy. Java programs should be ISO-8859-1.
[02:40:59] <Abhi347> err.. what it means, I am just 2 week old to java programming
[02:41:14] <ojacobson> ~unicode
[02:41:14] <javabot> ojacobson, unicode is #unicode, also Read This First: http://tinyurl.com/qph9 (Joel on software) - next read this: http://tinyurl.com/2l9mlv (javadoc on unicode representation) - and for reference: http://www.unicode.org - and for unicode conversion/troubleshooting:http://rishida.net/scripts/uniview/conversion
[02:41:17] <freeone3000> Yeah. Same issue. Chances are, your native encoding is some foreign one that places latin characters not where ascii puts them.
[02:41:43] <freeone3000> Save Java files as ISO-8859-1, or UTF-8 (and restrict yourself to the latin1 plane).
[02:42:00] *** hoverbear has joined ##java
[02:42:23] <Abhi347> oh I got it, but I am using edit plus, how to do that there, I know about notepad
[02:42:23] <ojacobson> That, or you copy and pasted code that uses something other than SPACE for spaces
[02:42:34] <hoverbear> Hey all, Trying to set up an iterator class nested inside of my main class. How would I go about calling a method from within that parent class?
[02:42:45] <freeone3000> hoverbear: Did you try just calling it?
[02:43:08] <hoverbear> .... I must have misspelled it wrong last time.
[02:43:11] <hoverbear> Thanks freeone3000
[02:43:54] <Abhi347> I typed the code into edit plus, and saved it, but I don't know how to save it as UTF-8. Notepad gives option when saving, edit plus don't :(
[02:44:07] <hoverbear> Abhi347: Try notepad++
[02:44:18] <hoverbear> It's like notepad with syntax highlighting and such
[02:45:59] <Abhi347> Well my coach uses Edit plus, and he insists using the same, so as to learn one editor first, then move to another. So is there anyway to set UTF-8 as edit plus's default encoding?
[02:46:13] <hoverbear> Check options and such
[02:49:37] *** werdan7 has joined ##java
[02:49:40] *** tieTYT2 has quit IRC
[02:49:48] <Abhi347> oh it gives option on saving, it was unicode and i changed it to UTF-8, now there's no error. Thanks :D
[02:49:55] <hoverbear> =D
[02:50:20] <Abhi347> \o/ my first program on Editplus :D
[02:51:06] *** virgomoon has joined ##java
[02:51:36] *** eyesUnclouded has joined ##java
[02:51:54] <virgomoon> good evening, all
[02:51:58] <hoverbear> Evening
[02:52:15] *** ormaaj has quit IRC
[02:52:29] *** tyebud has joined ##java
[02:52:38] <ojacobson> Abhi347: Generally, you need the source encoding (which I bet was UTF-16LE, since "Unicode" isn't an encoding) and the compiler encoding to match
[02:53:07] <ojacobson> For ASCII-safe text, most common encodings will all produce the same file (UTF-8, Latin-foo, CP-1252, and most OEM codepages all have ASCII as their first half)
[02:53:28] <virgomoon> I have a JTable in a dialog I'm using for data manipulation and input .. problem is, when you enter text into one of the cells, then go straight to the 'OK' button, that entered text is ignored .. can someone throw me a bone on how to capture that entered data? I was thinking some sort of focus listener, but if the data isn't committed, that wouldn't do any good, would it?
[02:53:33] <ojacobson> javac's default encoding is platform-dependent, but you can tell it what encoding to use with a command-line flag
[02:53:42] *** kermit has joined ##java
[02:55:01] <konr> To use a jar from maven, I had to download other two. Shouldn't a jar be self-contained, not requiring the program to deal with dependencies?
[02:55:05] <konr> *programmer
[02:55:10] *** eidolon has joined ##java
[02:55:12] <kba> what's easiest way to store a list of key and their values when I need the values sorted by their keys?
[02:55:18] <ojacobson> konr: It'd be nice, but no
[02:55:30] <virgomoon> kba, that'd be a TreeMap, right?
[02:55:31] *** ormaaj has joined ##java
[02:55:36] <ojacobson> If JARs contained their own dependencies, dealing with conflicting transitive dependencies would be an even bigger pain
[02:55:39] <freeone3000> konr: Maven resolves transitive dependencies. Maven builds are packaged without depends, because it's expected anyone using a single maven jar is using maven for their jar.
[02:55:44] <eidolon> ojacobson: your companies' product is pretty awesome. just started using it.
[02:56:00] <ojacobson> eidolon: What's your URL? I can spot you some bonus provisioning :)
[02:56:23] <ojacobson> (Company's)
[02:56:23] <eidolon> just the first word in my company name
[02:56:43] <ojacobson> stonekeep or
[02:56:46] <eidolon> yea
[02:57:01] <eidolon> could use a few more customers :)
[02:57:09] <ojacobson> I refuse to believe that you'd own an email address that starts with 'shellstar2004'
[02:57:13] <ojacobson> therefore I must have the wrong URL
[02:57:15] <eidolon> unlikely.
[02:57:16] <hoverbear> eidolon: What's the product? :)
[02:57:17] *** McMAGIC-- has joined ##java
[02:57:18] <kba> virgomoon: is that automatically sorted by value?
[02:57:32] <virgomoon> kba, you said sorted by key, right?
[02:57:53] <kba> woups, well, I meant the other way around
[02:58:00] <kba> my keys are unique, my values are not
[02:58:14] <virgomoon> hmmm
[02:58:26] *** cdg has joined ##java
[02:58:53] <kba> it seems like a lot of hassle to make a new Object just to contain these two values, make an ArrayList and a comparator
[02:59:01] <kba> that's the best way I can think of, but it can't be
[02:59:08] <cdg> I'm having this weird problem. I have both JDK7 and JDK6 installed and I have my windows PATH pointed to the jdk6 bin dir but for some reason 'java -version' keeps reporting the JDK7 version. Where else does it read which binary to use?
[02:59:31] <ojacobson> hoverbear: My day job is at a web shop that does SaaS invoicing for small businesses
[02:59:32] <virgomoon> kba, I was actually thinking of a double TreeMap/HashMap implementation, though that's a lot of maintenance
[02:59:35] <freeone3000> cdg: Java installs a java.exe binary into System32.
[02:59:44] <hoverbear> ojacobson: Neat. :)
[03:00:15] <virgomoon> do the keys on a hashmap have to be unique?
[03:00:20] <cdg> freeone3000: ooooo
[03:00:20] <eidolon> yes.
[03:00:29] <virgomoon> well, piss .. that won't work, then
[03:00:29] <eidolon> that's sort of the point of a hashmap :)
[03:00:35] <kba> virgomoon: well, here's my actual scenario: I get an iterator with a lot of HashMap<String, String>'s in it, and I need those to be sorted by one of the values in my HashMap
[03:00:38] <virgomoon> lol .. true
[03:00:39] <ojacobson> multimap?
[03:00:40] <virgomoon> nevermind
[03:00:46] <eidolon> if you want multiple objects use an arraylist or something
[03:00:47] <ojacobson> map<K, List<V>>?
[03:00:52] <eidolon> or create a unique key
[03:00:53] <hoverbear> You know, I really, really don't get along well with netbeans :S
[03:01:14] <ojacobson> So use something else
[03:01:15] <eidolon> hoverbear: it's not you. netbeans hates everyone.
[03:01:18] <virgomoon> I'm hardly a guru .. just thinking out loud there
[03:01:27] *** ormaaj has quit IRC
[03:01:28] *** cdg has quit IRC
[03:01:32] <hoverbear> Oh great.
[03:02:09] <cbeust_> When I don't get along with someone, I break up with them
[03:02:11] <surial> ~~hoverbear eclipse
[03:02:11] <javabot> hoverbear, eclipse is an open-source IDE for Java and a number of other languages. See http://www.eclipse.org/ . It's the most used java IDE, and it's free. Some people in ##java use in Eclipse, but questions regarding it would best be answered in #eclipse. Also ask me about IDEs for alternatives.
[03:02:16] <surial> ~~ hoverbear idea
[03:02:16] <javabot> hoverbear, idea is an open source Java IDE that has free and non-free versions. See http://www.jetbrains.com/idea/
[03:02:22] <kba> ojacobson: how can I use a map<K, List<V>>?
[03:02:28] *** devkhadka has joined ##java
[03:02:33] <surial> kba: The same way you use any other map, pinky.
[03:02:51] <eidolon> ~surial++
[03:02:51] <javabot> surial has a karma level of 160, eidolon
[03:02:53] <hoverbear> I'm a vim guy I just haven't found am adequate form of on-the-fly error catching or debugging that netbeans can offer to go along with vim
[03:02:56] <kba> So tonight we take over the world, surial?
[03:02:57] <eidolon> for PatB references.
[03:02:59] <surial> though pragmatically speaking you probably want guava's Multimap.
[03:03:09] <surial> kba: Yes. with.... uh, maps!
[03:03:10] *** L-----D has joined ##java
[03:03:15] <ojacobson> For those of you who missed it earlier: http://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Maven+Repository+Server
[03:03:18] <kba> Anyway, What I meant was: How can I use it here! I don't understand why I need a List inside a Map
[03:03:23] <ojacobson> (testing now... time to scrap my hudson instance anyways)
[03:03:23] * eidolon clix
[03:03:37] *** ormaaj has joined ##java
[03:03:41] *** Caleb-- has quit IRC
[03:03:41] <eidolon> hah. that's pretty cool.
[03:03:47] <cbeust_> It's a map where each key is associated to a list. Very common and convenient.
[03:03:47] <eidolon> i don't have anyone who would use my product that way, but it's neat.
[03:04:10] <surial> hoverbear: Eclipse has a vim plugin. There's also a really weird amalgamation of ductape that lets you edit stuff in vim itself and have vim relay it all back to eclipse, then get the errors and such back in your vim, but, if that works well at all or is still supported (or what itscalled!) - dunno.
[03:04:15] *** karega has quit IRC
[03:04:24] <ojacobson> eidolon: I'm using it to replace my webdav-based snapshot repo, I bet
[03:04:37] <eidolon> *nod*
[03:04:54] <hoverbear> surial: Interesting. The main reason I use vim is because I have a shellbox and no laptop, so i'm stuck using the colleges (lame) computers
[03:04:58] <eidolon> had a client send me a Jira plugin today that patched a problem they had. it was blahblah-version-SNAPSHOT.jar
[03:05:05] * eidolon did the O.-
[03:05:08] <ojacobson> heh
[03:05:10] <eidolon> "I know where THAT came from."
[03:05:19] <surial> hoverbear: Yeah. After a few months its faster to flip some burgers and buy a laptop than suffer through all of that.
[03:05:45] <ojacobson> one laptop per college student
[03:05:46] <ojacobson> who's with me
[03:05:50] <ojacobson> charitable foundation, come on
[03:05:58] <surial> OLPCS?
[03:06:00] <hoverbear> surial I have the money on hand, just it's part of my college savings so I'm not too keen on dipping into it.
[03:06:01] <ojacobson> right
[03:06:12] <whaley> surial: eclim
[03:06:13] <surial> ojacobson: Well, with an acronym like that, this can't possible go wrong.
[03:06:18] <whaley> surial: I tried it, it is shit
[03:06:22] <kba> unless I can come up with something else, I'm going with an ArrayList<Item>() where Item is an object just with just two variables: key, value, and then I use a comparator.
[03:06:26] <surial> eclim, that's it. Not that that's going to help the 'I'm poor' angle.
[03:06:29] <kba> can anybody think of a better solution than that?
[03:06:43] <surial> kba: Yes. A Map<String, List<String>>.
[03:06:50] <eidolon> wait, waht? what about OLPC?
[03:06:56] <whaley> surial: it's about what you'd expect from fronting a great general purpose text editor by proxying commands to a headless eclipse through a hackjob of pipes behind the scenes
[03:06:56] <hoverbear> surial: Once I get past all my stupid midterms in the next 2 weeks I'm gonna apply around to try to get an income. I'm really thinking of getting one of those Thinkpad T420 laptops coming out.
[03:06:58] <kba> surial: What should the List contain?
[03:07:00] <surial> kba: The real question is: What are your usage scenarios, and what's the dataset look like.
[03:07:17] *** jesmon has joined ##java
[03:07:23] <Abhi347> here's my pastebin with error http://eugeneciurana.com/pastebin/pastebin.php?show=43904
[03:07:25] * eidolon did a bunch of work for OLPC for a while.
[03:07:43] <hoverbear> You sir are a hero, eidolon
[03:07:44] <Abhi347> how to remove ambiguity in implementing interfaces :)
[03:07:45] <surial> kba: example: It's got 100,000 entries, for example ["Chicago", "Illinois"] and ["Boseman", "Montana"], and my use case is looking up the state for a given city.
[03:07:48] <whaley> I hear it is great for pr0n
[03:07:54] <surial> kba: Without some exposition on this, we cannot advise you at all.
[03:07:58] <eidolon> whaley: not so much :)
[03:08:01] <whaley> bringing pr0n to teenagers in africa - such a noble cause
[03:08:16] <eidolon> http://www.flickr.com/photos/planet-geek/2179501130/ <— that's my son on his XO when we first got it.
[03:08:48] <surial> Abhi347: non-methods in interfaces are implicitly public and static.
[03:08:50] <kba> surial: well, it's product IDs and sales, I want them sorted by sales, so I can see which products have earned me the most
[03:08:59] <hoverbear> I love how I have a method returning a Comparable, then I try to put that into a Comparable array, and I get an error because it's apparently an Object.
[03:09:00] <kba> the IDs are unique, but naturally the sales havent
[03:09:02] <surial> Abhi347: You are thus referring to a static member (namely, 'x'), using an instance. This is horrible style. Don't. Use I.x or J.x.
[03:09:08] <kba> but naturally the sales aren't unique*
[03:09:15] <surial> kba: So you want a database. Great. Use that.
[03:09:37] <surial> kba: And for Map<K, List<V>>, with that, K = product ID, V = a single sale. duh.
[03:09:45] <kba> I'd love to just shove it all into a MySQL database and do a SELECT, go to bed and be happy. But I'm not allowed.
[03:09:55] <freeone3000> Well, why not?
[03:09:59] <surial> kba: Then it's time to leave the channel.
[03:10:01] <surial> ~~ kba why no homework
[03:10:01] <javabot> kba, We understand you aren't asking us to do your homework. That's not why we don't answer. We don't because 1) You usually don't comprehend the answer and we get stuck in an endless loop of 'why', 2) You will understand, but you'll retort with "my professor doesn't want me to do it this way'. That's frustrating. 3) Homework questions are boring questions. We don't get paid. Your prof does.
[03:10:05] <surial> See #2.
[03:10:18] *** plarsen has joined ##java
[03:10:35] <surial> kba: Also, mysql? No. Just no. Postgresql.
[03:10:37] <hoverbear> Those darned professors
[03:10:42] <surial> hoverbear: Quite.
[03:10:56] <Abhi347> ok let me try again then
[03:11:15] <surial> hoverbear: Every friday we have Two Minutes Hate, just for them.
[03:11:25] <hoverbear> Bahaha
[03:11:30] <hoverbear> I like my CS prof
[03:11:32] <kba> I guess I should have went with "I get my data from an XML cloud, so putting it into a database just to extract it is inefficient"
[03:12:26] <surial> kba: Your use case doesn't add up. The data representation you need to query "Most profitable item" or whatnot is NOT storing each individual sale per item.
[03:13:00] <surial> kba: Instead you'd have a Map<ProdID, Double>> and loop through all entries, updating its entry in the table using oldValue + salePriceOfCurrentItem.
[03:13:08] <surial> s/>>/>
[03:13:36] <Abhi347> so there's no way I can use a.x in the B class :(
[03:13:46] <surial> Abhi347: You should never use a.x, ever.
[03:13:54] <cheeser> cbeust_: there are 900 classes in testng?
[03:13:56] <kba> You don't understand, it's not my database, I can only get information from it though some unsorted XML
[03:14:14] <kba> I agree the way it's stored is bad
[03:14:14] <surial> Abhi347: As I said, you're NOT accessing an instance variable, so your code is actively misrepresenting what its doing.
[03:14:25] *** eyesUnclouded has quit IRC
[03:14:26] <surial> kba: I understand perfectly well. You don't, though.
[03:14:51] <Abhi347> ok got it, I got this as homework, now I know what to answer hehe
[03:15:05] <surial> ~~ Abhi347 homework
[03:15:05] <javabot> Abhi347, 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.
[03:15:26] <surial> Is all homework due on thursday this week or something? Cripes.
[03:15:52] <surial> Abhi347: Also, 'x' should be capitalized.
[03:15:55] <surial> ~~ Abhi347 conventions
[03:15:56] <javabot> Abhi347, conventions is http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html , or "ThisIsAClassName, thisIsAVariableOrMethodName, THIS_IS_A_CONSTANT_NAME". See also http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
[03:16:05] <surial> (x is a constant, as its implicitly public static final).
[03:16:22] <Abhi347> yeah I forgot, silly me
[03:16:28] <kba> actually this I'm just doing for fun as an extension to what I actually had to do.. which isn't due until about a week.. and I'm done with it
[03:17:14] <kba> now I'm just extending it, and I ran into this problem and figured it was weird that there is no simple solution to something I'd say seems like a very common problem: Sorting a key-value pair by value
[03:17:34] *** TheSchoolinator has quit IRC
[03:17:55] <surial> kba: Isn't it obvious? values aren't unique. Thus there's no total ordering. Unless of course the keys ARE unique - in that case, just use a bimap, ask for the reverse list, and sort that.
[03:18:06] <surial> ..by shoving it into a TreeMap along with an appropriate comparator.
[03:18:23] *** Auv5 has quit IRC
[03:18:39] <surial> kba: You also said / implied you wanted a map linking ProductIDs to sales, but apparently what you relaly want / have is Product ID to Sale Total. A very different story.
[03:19:20] <kba> well of course the keys are unique, they're product IDs :)
[03:20:03] *** neuro_sys has joined ##java
[03:20:08] <kba> and I don't really understand what the difference is between productIDs to sales and ProductID to sale total
[03:20:15] *** t0rc has quit IRC
[03:20:29] <surial> kba: productIDs to sales means that given a product ID I can look up each sale.
[03:20:31] <kba> I jstu want a list that says: I sold 10 bikes, 8 cows, 4 cats, 2 shoes, 0 shirts
[03:20:33] *** t0rc has joined ##java
[03:20:53] <kba> that's not what I want, I want a list that I can print out and then it's ordered
[03:20:56] <ojacobson> Sure seems like a Map<String, Integer> to me
[03:21:13] <kba> ojacobson: but can I sort that by value?
[03:21:14] <surial> kba: You can't sort without a total ordering.
[03:21:24] <ojacobson> What's the "value" here?
[03:21:30] <ojacobson> I would assume the values are the number of sales
[03:21:30] <surial> ojacobson: 10. As in, 10 bikes.
[03:21:36] <kba> ojacobson: Yes
[03:21:40] <ojacobson> in which case: yyyyyy sort of. It's not hard, though.
[03:21:59] <cbeust_> cheeser: yes approximately 900 classes, why?
[03:22:06] <cbeust_> cheeser: 40 kloc
[03:22:07] <ojacobson> new ArrayList<Map.Entry<String, Integer>>(sales.entrySet()); and sort the resulting list using a comparator that compares by entry.getValue()
[03:22:18] <surial> No, that'll fail.
[03:22:25] <cheeser> cbeust_: just surprised. seems like a lot
[03:22:25] <ojacobson> Sorry, sorry, way too simple
[03:22:25] <surial> For obscure and crappy reaons.
[03:22:35] <ojacobson> (Collections.sort has glue for sorting a list by an arbitrary comparator)
[03:22:37] <cheeser> i wonder how many grizzly has...
[03:22:41] <cbeust_> cheeser: It's a complicated product :) JUnit has about 10 kloc
[03:22:54] <kba> ojacobson: well that was pretty much initial idea, except I wanted to create some object type to hold my key and value
[03:23:12] <cheeser> cbeust_: true. just took me by surprise.
[03:23:14] <surial> ojacobson: Depending on map implementation, there's only 1 Map.Entry object. Each call to .next() simply writes to the fields in the same object (as in, == equals). Trying to pump these into a list as-is is not going to result in what you'd think. Every entry would be equal to the last thing in the map, which itself, unless the map is linked, is random.
[03:23:32] <ojacobson> surial: code sample or IDH
[03:23:39] <surial> IDH?
[03:23:42] <ojacobson> It doesn't happen
[03:23:49] <cbeust_> ojacobson: I prefer http://imgur.com/mllx2
[03:23:56] <ojacobson> That's a fairly strong (and surprising) assertion, please support it
[03:24:00] <cheeser> 1005 for the record
[03:24:02] <cheeser> 8^)=
[03:24:03] <surial> Devoxx 2010. From the mouth of Josh Bloch. Who wrote the fucking library.
[03:24:11] <whaley> ~ cbeust_++
[03:24:11] <javabot> cbeust_ has a karma level of 2, whaley
[03:24:16] <whaley> ~ cbeust++
[03:24:16] <javabot> cbeust has a karma level of 14, whaley
[03:24:19] <surial> ojacobson: It's, uh... I believe EnumMap and IHM.
[03:24:32] <ojacobson> For once I agree with cbeust
[03:24:32] <_W_> ojacobson, I don't think it has to be supported - as long as the Map and Map.Entry interfaces don't specify otherwise in their contract, you shouldn't rely on it
[03:24:34] <surial> ojacobson: Damn. Don't have java sources on this machine to check it out. I'll write up a sample.
[03:24:36] <whaley> surial: did he wear a ghostbusters outfit too?
[03:24:50] <ojacobson> _W_: technically true
[03:24:59] <ojacobson> Sun's generally been pretty good about the principle of least surprise, though
[03:25:10] <_W_> and what's this obsession about avoiding a custom value type anyway?
[03:25:11] <ojacobson> I didn't say it couldn't be true, I just said I wanted to see evidence :)
[03:25:35] <_W_> (not accusing you, I see this all over the place)
[03:26:04] *** akkad has joined ##java
[03:26:09] <ojacobson> In this case it's less "avoiding a custom value type" and more "using the appropriate data structure", though
[03:26:13] <_W_> if you have sales summaries you want a list of, make a SalesSummary and have a List<SalesSummary>
[03:26:24] <surial> ojacobson: Believe it, man.
[03:26:25] <akkad> is there some runtime configurable java specific option/limit for max sockets?
[03:26:42] <surial> ~pastebin
[03:26:42] <javabot> http://mysticpaste.com - Paste the final url after you've pasted your stuff there.
[03:26:53] <surial> ~info pastebni
[03:26:53] <javabot> I have no factoid called "pastebni"
[03:26:54] <surial> ~info pastebin
[03:26:54] <javabot> pastebin was added by: cheeser on 11-16-2010 at 3:04 PM, EST and has a literal value of: <reply>(http://eugeneciurana.com/pastebin|http://rifers.org/paste|http://mysticpaste.com|http://pastie.org|http://ideone.com/|http://paste.pocoo.org/) - Paste the final url after you've pasted your stuff there.
[03:26:56] <_W_> akkad, don't think so - the OS will of course have one
[03:27:25] <ojacobson> _W_: of course, if I were going to have a salessummary type that I needed to look up by name, I wouldn't make the name part of the sales summary object
[03:27:26] <ojacobson> (probably)
[03:27:44] *** eyesUnclouded has joined ##java
[03:27:46] <ojacobson> The case where foo.get(k).getName() is not equivalent to k is weird and undesireable
[03:27:54] *** eyesUnclouded has quit IRC
[03:27:58] <ojacobson> and I don't see a reason to privilege one name over others :)
[03:28:12] <akkad> yeah the problem is that ulimit/rlimit is much higher than the number of open files/sockets we have
[03:28:35] <_W_> akkad, are you sure you are measuring the right thing?
[03:28:38] <surial> ojacobson: http://ideone.com/MwijH
[03:29:00] <surial> ojacobson: There you go. e1 = it.next(); e2 = it.next(); assert e1 == e2; <-- true.
[03:29:03] <_W_> (e.g. using lsof)
[03:29:05] <akkad> lsof/netstat seem pretty good at listing open sockets
[03:29:23] <akkad> we do see a leak for CLOSED_WAIT but no where near enough to exceed 1024
[03:29:24] <surial> ojacobson: Also see class name. I'm always right :P
[03:29:31] <_W_> akkad, to know for sure, read the source
[03:30:30] <ojacobson> Messed.
[03:30:39] <ojacobson> I do believe you now, though. Thanks.
[03:30:49] *** tyebud has left ##java
[03:30:50] <surial> Isn't it? One of the more obscure and WTF-raising puzzlers.
[03:30:56] <akkad> yeah I am decompiling the linux kernel to be sure. as I can't get a kernel build with matching symbols.
[03:31:13] *** L-----D has quit IRC
[03:31:13] <_W_> akkad, I meant the Java source
[03:31:29] <surial> ojacobson: Don't quote me but I believe the ones in java.util that do this are EnumSet and IdentityHashMap. Who knows which other impls do this stupid stunt?
[03:31:30] <akkad> well have to start at ring 0 and work my way up :P
[03:31:35] <_W_> akkad, as your original question was about java
[03:31:39] <surial> s/EnumSet/EnumMap
[03:33:14] <kba> surial: "memory: 213440 kB" what the? :)
[03:33:32] *** symptom has joined ##java
[03:34:06] <surial> kba: I don't have the 20 minutes necessary to explain why the default memory load measurement of your standard OS introspection tool reports ridiculously inflated numbers.
[03:34:46] <freeone3000> Because `java` requires loading literally every system library your system has, and even though most of them are already loaded, your OS will report them again.
[03:34:57] *** L-----D has joined ##java
[03:35:00] <surial> I guess 20 minutes was overstating matters somewhat.
[03:35:10] <kba> just a quick one then: is it because of the JVM, is the number actually a lot lower or it doesn't know, or is it something completely else? If it's the ladder, you're off the hook :p
[03:35:23] <surial> kba: What freeone3000 said.
[03:35:45] <kba> thank you both
[03:35:56] <surial> kba: It includes the system itself because a shared library is reported in full by every process that uses it. Eventhough 95% of that was most likely already loaded by bash / explorer.exe / kernel / core / etc
[03:36:48] <surial> kba: There's no sane way to report mem load without already knowing which libraries can safely be passed off as irrelevant due to always being loaded anyway. Dividing a library's load amongst the processes that use it doesn't work, becauase it would mean java on a blank machine uses 150MB, but on a machine with lots of apps running it uses only 30MB.
[03:37:20] <surial> So, you need to know which set of libraries shouldn't count to your total. But these apps (top, taskman, activity monitor) aren't written with hardcoded lists in mind, of course
[03:37:20] <kba> I've never thought of that before
[03:37:47] <kba> I feel enlightened! And now spotlight crashed
[03:38:41] <hoverbear> Spotlight?
[03:39:04] <kba> OSX Search thingy
[03:39:05] <freeone3000> OSX's copy of WIndows Instant Search that they invented years before.
[03:39:07] <hoverbear> Oh
[03:39:09] <freeone3000> Darn telepaths.
[03:39:10] <surial> kba: Modern architectures are WAY more complicated than the simplistic models 99% of all programmers keep in mind when thinking of 'the machine'. Same shit happens all the time with micro-optimizing idiots fresh from C land. Processors don't just "run 1 opcode a cycle" anymore. Not even remotely close to that. For example.
[03:39:20] *** blbrown_win3 has joined ##java
[03:39:30] <surial> Yes. Spotlight. OSX's copy of locatedb that linux invented years before.
[03:39:31] <hoverbear> Like nemopunk for KDE?
[03:39:32] <kba> freeone3000: OSX's copy? Wait? Who are you saying invented it first?
[03:39:33] <freeone3000> One opcode per cycle? We got rid of that back in Comp Org. Heck, *MIPS* doesn't even do that.
[03:39:39] * surial is now waiting for someone to mention locatedb's pre-linux history.
[03:39:52] <surial> kba: GNU.
[03:39:54] <akkad> pre-linux? like minix?
[03:40:02] <akkad> Hurd?
[03:40:07] <hoverbear> kba: Not everything (or really, anything) Apple does is "NEW"
[03:40:10] <whaley> spotlight is shit
[03:40:12] <whaley> ~next
[03:40:12] <javabot> Another satisfied customer. Next!
[03:40:21] <kba> surial: grgrr.. :) I meant Windows or OSX, it sounded like he said Windows made it first
[03:40:39] *** Behold has quit IRC
[03:40:45] <surial> Yes, jesus, because if it wasn't shitted out by apple or microsoft it just didn't exist.
[03:40:48] <kba> hoverbear: I know, I've used locate way before I ever touched a Mac, and way before Windows had that instant search :)
[03:40:52] * hoverbear is a formed Mac Lover turned Mac hater. :S
[03:41:06] <hoverbear> former*
[03:41:22] <kba> how come?
[03:41:27] * surial is a computer user, hates violance, and loves life. And hates fucktards that use 'lover' and 'hater' terms for no good reason.
[03:41:29] <hoverbear> But that was back when I waslike 14 and those iPod things hadn't been invented.
[03:41:50] <freeone3000> Hyperstudio was ahead of its time.
[03:41:54] <hoverbear> kba: I like having my freedom thank you.
[03:42:06] <freeone3000> Imagine how awesome it would be to have to sit through Hyperstudio presentations instead of Powerpoints.
[03:42:07] <surial> hoverbear: So, linux then?
[03:42:19] <kba> hoverbear: I assume you hate Windows even more then?
[03:42:24] <sproingie> hyperstudio any relation to hypercard?
[03:42:32] <hoverbear> surial: Linux when I'm not in school, I use windows right now just because I'm addicted to Starcraft 2.
[03:42:42] <surial> hoverbear: You fucking hypocritical assbag.
[03:42:52] <surial> Stop preaching about freedom when you clearly don't give a flying fuck about it.
[03:42:55] <kba> surial: and regarding what you said earlier, I know, but that's mostly because of stuff like JVM, right?
[03:43:08] <hoverbear> kba: I'm ok with windows, at least they don't actively try to prevent me from installing 3rd party apps on my devices.
[03:43:32] <surial> probably because neither windows nor OS X has any relation to 'devices'.
[03:43:32] <kba> can you even install software on Zune?
[03:43:44] <sproingie> in fact you can
[03:43:47] <surial> This is not going to end well.
[03:43:49] <kba> It's not fair to compare a mobile OS to a computer OS, compare MacOSX to Windows
[03:43:50] *** surial has quit IRC
[03:43:57] <freeone3000> sproingie: Same format, similar features, cheaper license. The WordPerfect to Word 98.
[03:44:10] <sproingie> freeone3000: ah
[03:44:10] <kba> also don't hate MacOSX, because you don't like iPhone OS - that doesn't make sense
[03:44:25] <hoverbear> Mac OS X is fine, it's Apple that sucks.
[03:44:28] <whaley> this has fuck all to do with java, please stop now
[03:44:35] <hoverbear> o7
[03:44:56] <kba> hoverbear: so why are you using Windows over MacOSX if MacOSX is fine?
[03:44:57] <cheeser> i think what whaley means to say is
[03:45:00] <cheeser> ~boring
[03:45:00] <javabot> this isn't even slightly interesting please take it somewhere else.
[03:45:05] *** merma has joined ##java
[03:45:12] <kba> Right
[03:45:19] *** merma is now known as madprops
[03:45:20] *** Gracenotes has quit IRC
[03:45:29] <hoverbear> kba: Because as much as I hate microsoft, I hate apple more. :-P
[03:45:43] <hoverbear> PM me if you want to talk more because "Shhhhh"
[03:45:46] <kba> Just don't preach freedom when talking about Windows ;) Let's end it
[03:45:53] <kba> nah, it's fine, I have work to do
[03:45:57] <hoverbear> Same
[03:47:44] <sproingie> how about "don't preach"
[03:48:05] *** Furyhunter has joined ##java
[03:48:37] <Furyhunter> hello
[03:49:14] <Furyhunter> quick question: given a socket's outputstream, how do I write an array of bytes and have it actually send
[03:49:26] <Furyhunter> for some reason, output.flush(); doesn't send the written data at all
[03:49:40] *** gucko has quit IRC
[03:49:47] <cheeser> it does
[03:49:52] *** tokam has quit IRC
[03:50:52] <Furyhunter> well, the server end doesn't seem to be getting the appropriate data, because it's not responding the way it should...
[03:51:27] *** Gracenotes has joined ##java
[03:52:29] <Furyhunter> very curiously when I close the client program, which writes "<policy-file-request/>\0" and flushes, the server finally responds
[03:53:16] *** Bosox20051 has joined ##java
[03:53:25] *** zemanel has left ##java
[03:53:35] <cheeser> might double check how you're reading it.
[03:54:58] <Furyhunter> hrm
[03:55:02] <sproingie> methinks you're waiting for EOF
[03:55:04] <Furyhunter> yeah I think I see the issue
[03:55:13] <Furyhunter> I'm actually using a scanner to read (not wise, I know)
[03:55:23] <Furyhunter> and using nextLine() which is waiting for a newline, now that I realize this
[03:55:32] <Furyhunter> the client never sends a 0x0d...
[03:56:05] <Furyhunter> what kind of reader should I use to get this?
[03:56:32] <freeone3000> You shouldn't be using .nextLine(). .read(), possibly.
[03:57:45] <Furyhunter> alright, I'll try
[04:01:07] *** ojacobson has quit IRC
[04:02:54] *** immibis has joined ##java
[04:03:33] *** Maynel has quit IRC
[04:04:17] *** s3a has quit IRC
[04:04:58] *** Abhi347 has quit IRC
[04:06:31] *** Matuku has quit IRC
[04:06:41] *** notk0 has joined ##java
[04:07:11] <notk0> hello, when oppening a file in java, and reading chars from it, say using a formatter, does it assume the encoding is ASCII by default?
[04:07:32] <cheeser> using a formatter?
[04:07:46] <freeone3000> It assumes the encoding is platform native. You should always specify encoding.
[04:10:18] <notk0> freeone3000: I see, thank you
[04:10:29] *** ojacobson has joined ##java
[04:10:41] *** akkad has quit IRC
[04:11:12] <notk0> freeone3000: do you have an article on how to d that?
[04:11:36] <echosystm> in a servlet app, how do you make the default logger log to like... a database?
[04:11:43] <echosystm> or anything else
[04:12:03] *** rjohnson19 has quit IRC
[04:12:45] <cheeser> you configure your logger with the right appender
[04:16:22] *** Spencer_tt has joined ##java
[04:17:07] *** brig has quit IRC
[04:17:13] *** brig has joined ##java
[04:17:34] *** Adremelech has joined ##java
[04:17:53] *** immibis has quit IRC
[04:18:51] *** notk0 has quit IRC
[04:25:25] *** Spencer_tt has quit IRC
[04:26:07] *** lamdk has quit IRC
[04:27:55] *** CodeWar has joined ##java
[04:28:02] *** ojacobson has quit IRC
[04:28:46] *** madprops is now known as Craigsmv
[04:28:59] *** ian_mac has joined ##java
[04:31:12] *** jpk has joined ##java
[04:33:27] *** tokam has joined ##java
[04:35:50] *** sbalmos has quit IRC
[04:39:33] *** Ruudjah has quit IRC
[04:41:00] *** multi_io has joined ##java
[04:44:01] *** CodeWar has quit IRC
[04:44:43] *** lenard has joined ##java
[04:45:12] <lenard> is there a JMS channel?
[04:47:45] *** ormaaj has quit IRC
[04:49:31] *** ormaaj has joined ##java
[04:51:04] *** symptom has quit IRC
[04:53:30] *** Cymage has quit IRC
[04:56:40] <cheeser> aren't they called topics in JMS?
[04:56:43] <cheeser> 8^)=
[04:57:14] <lenard> life!
[04:57:53] <lenard> yes, cheeser, i stand corrected :)
[04:57:54] <tjsnell> lenard: what JMS lib?
[05:02:35] *** sensen has joined ##java
[05:04:02] *** jesmon has quit IRC
[05:06:00] <lenard> tjsnell: javax.jms package
[05:06:26] <lenard> tjsnell: i need to send an image file over JMS
[05:06:32] <tjsnell> that's the package but what library is implementing it, activemq is one choice
[05:06:36] <tjsnell> send it where?
[05:07:01] *** drindt has quit IRC
[05:07:15] <lenard> tjsnell: send over a network to another machine
[05:07:17] *** Error404NotFound has quit IRC
[05:07:26] <tjsnell> who controls the other end?
[05:07:38] <tjsnell> who's running the JMS broker?
[05:08:11] <lenard> what i have is a broker on one end, and a pubsub client on the other
[05:08:20] <tjsnell> you have a broker?
[05:09:03] <lenard> i have a broker running on one machine, and usually (ive been doing this with text messaging only so far) and a pubsub client on the same machine and on a second machine talking to each other
[05:09:37] <tjsnell> so what JMS lib is the broker using?
[05:09:48] *** Yusdan has joined ##java
[05:09:53] <lenard> plz note that i am a beginner, and so my language may unfortunately be imprecise. i welcome suggestions for improving that
[05:10:06] <lenard> sorry 'please'
[05:10:17] <phix> ah JMS, I remember those days, having to pull my hair out while trying to get IBM WebSphere MQ to work
[05:10:54] <lenard> i can do it with text, i'm just trying to find a good tutorial or one example on line to see how it is different to send a binary file
[05:13:28] *** c_axis has quit IRC
[05:14:01] *** fuzzygroove has joined ##java
[05:14:12] *** fuzzygroove has left ##java
[05:14:34] <lenard> the broker I am currently using is actually written in C++
[05:15:33] <lenard> The Clients are using Java
[05:16:13] *** Craigsmv has quit IRC
[05:18:20] *** guidj0s has joined ##java
[05:18:35] *** freeone3000 has quit IRC
[05:19:53] *** hmmmm has joined ##java
[05:21:20] <hmmmm> hello, i am getting the error "Exception in thread "main" java.lang.NoSuchMethodError: main" from this code: http://pastebin.com/4zYN0aRy
[05:21:35] <hmmmm> i simply run javac Regex.java && java Regex
[05:22:02] <cheeser> arg needs to be String[]
[05:22:18] *** Error404NotFound has joined ##java
[05:22:20] <hmmmm> OH
[05:22:21] <hmmmm> thanks
[05:22:25] <cheeser> np
[05:22:32] <phix> :D
[05:22:34] <phix> hey cheeser!
[05:22:40] <cheeser> what up, yo?
[05:23:14] <meeper> cheeser: you do any android dev?
[05:23:34] <cheeser> no but i have some projects i want to do
[05:23:37] <phix> Hey not too much, just thinking about creating a user feedback / error repoting app in Java
[05:23:46] <cheeser> just need to get past TSSJS
[05:23:59] <meeper> phix: already done ;)
[05:24:06] <meeper> cheeser: lemme know if you like it
[05:24:13] <cheeser> 8^)=
[05:24:32] <phix> meeper: DCC :)
[05:24:58] <meeper> phix: no, not really. got a web service that does that. course it's geared towards mobile apps
[05:25:05] <phix> meeper: I have been playing around with android as well
[05:25:13] <cheeser> mv cheeser /dev/bed
[05:25:45] <phix> yeah I could use web service / web based however the common user problem is spyware has changed proxy settings in IE so that won't really help :)
[05:25:59] <meeper> cheeser: night
[05:26:06] <meeper> phix: how would you get around that?
[05:27:26] <phix> meeper: Java frontend submits directly to a local server with a SQL server on it
[05:27:46] <meeper> phix: but how to get data off the local sql server?
[05:28:31] <phix> meeper: JMS or email
[05:29:10] <phix> assumes Internet is up yes, but is not affected by malware on clients system (mostly since sql server will be locked down and running Linux)
[05:29:27] *** racarter has joined ##java
[05:30:31] <meeper> phix: email will work for a while at least, then the spyware guys will catch on
[05:30:49] *** sensen has quit IRC
[05:31:09] <meeper> phix: you might try some kind of raw socket connection
[05:31:27] *** Bosox20051 has quit IRC
[05:32:26] <phix> meeper: perhaps, but that will happen later :) just as long as there is high change that the report will be sent offsite to me or even stored on central server so I can ssh into it and look at it
[05:33:34] *** disappearedng has joined ##java
[05:33:53] <meeper> phix: is this a consumer app? or just for a select group of users?
[05:34:37] <phix> I manage a few sites so it will be for my use and my clients
[05:42:46] <meeper> phix: interesting
[05:45:23] <phix> basically I want to reduce those phone calls or emails that have (My computer isn't working) as the body of the message. and when asked "What did the error message say", they respond with "I dont know i closed it"
[05:45:38] <phix> so I can efficiently resolve issues
[05:45:53] <phix> ( = "
[05:46:35] <phix> I am thikning about using the Robot class to take some screenshots of their screen too and attach to error submissionm should be great
[05:47:37] <meeper> phix: how will this work, they'll run the java program and it'll send you an email?
[05:49:36] <phix> more or less
[05:50:09] <phix> I havnt decided on the transport method yet, I might add in a couple / use services mechinsm and confi file to decide which one to use
[05:50:37] <paissad> i wonder whether or not it is necessary to load the h2 database into the memory .. actually, it's an embedded database with a single table for desktop application
[05:50:37] <paissad> But if i understand correctly, i would have to create the db/table & load it to the memory every time that the application is launched, right ?
[05:50:41] <phix> I am thikning about pooling them on a local server first, then the server is responsible for getting it to me
[05:51:24] *** disappearedng_ has joined ##java
[05:51:25] <phix> paissad: shouldn't be too hard, if you are using JPA that will recreate the schema for you
[05:51:30] <meeper> phix: perhaps not even wait for user-initiated action. a service that does it every week might be easier
[05:51:41] <disappearedng_> Hey how come for int length = buffer.getInt(); I am getting Exception in thread "main" java.nio.BufferUnderflowException
[05:52:15] <meeper> disappearedng_: that should be obvious
[05:52:25] <phix> meeper: yeah, but like I said I am not going to put much thought into the transport method atm, I will just abstract it for now and create an implementation class later
[05:52:32] <phix> I will probably create a simple one for testing
[05:52:48] <disappearedng_> meeper: meaning that the buffer has nothing right?
[05:53:11] *** bindaas has joined ##java
[05:53:29] *** [[thufir]] has quit IRC
[05:56:28] <disappearedng_> Hey given a string, what's the most convienet way to split it by length of 500?
[05:58:12] <Fanook> looped calls to .substring()
[05:58:39] *** Spencer_tt has joined ##java
[06:00:49] <phix> disappearedng_: or you could use regex :)
[06:01:02] *** bojo has quit IRC
[06:01:21] <Planck_> I wouldn't call that very convenient
[06:05:53] <phix> Pattern p = Pattern.compile(".{500}"); Matcher m = p.matcher(someString); while(m.find()) { doSomething(m.group()); }
[06:06:05] <phix> hmmm maybe that pattern isn't correct, but you get what I mean :)
[06:06:11] *** Spencer_tt has quit IRC
[06:07:01] <phix> could even put that Matacher stuff in the pre / init part of a for loop, meh
[06:07:23] *** zemanel has joined ##java
[06:09:44] *** Bombstone has quit IRC
[06:10:24] *** Sdw195 has joined ##java
[06:10:30] *** Sdw195 has left ##java
[06:10:57] *** nickjohnson has joined ##java
[06:11:11] <nickjohnson> Quick servlet question: Is it possible to map a servlet to '/'?
[06:11:47] <Fanook> for(i=0; i<str.length; i+=500) { int end = i*500+500; if(end > str.length) end = str.length; doSomething(str.substring(i*500, end); }
[06:12:42] <Fanook> er, i got the increment wrong there, but you get the idea
[06:13:31] <phix> hey it's my pal Fanook!
[06:14:18] *** tokam has quit IRC
[06:15:13] *** tokam has joined ##java
[06:15:44] *** nickjohnson has left ##java
[06:16:26] *** ninan has joined ##java
[06:16:36] <whoever> can some one help i don't see what i am missing i get x can't be resolved to a variable on line 18 http://pastebin.com/w5GBYFvP
[06:16:36] *** mistik1 has quit IRC
[06:17:02] *** Furyhunter has quit IRC
[06:17:02] <Fanook> whoever: your for loop ends at the ; on line 16
[06:18:26] <whoever> Fanook: thx, but still have the same error
[06:18:42] *** mistik1 has joined ##java
[06:18:46] <Fanook> then you fixed it wrong
[06:19:07] <whoever> Fanook: i deleted the semi colon
[06:19:20] *** bojo has joined ##java
[06:19:36] <Fanook> pastebin it, and fix your indentation
[06:20:43] *** Spencer_tt has joined ##java
[06:22:09] <whoever> Fanook: http://pastebin.com/8uePBY2N
[06:23:13] *** lenard has quit IRC
[06:24:11] *** dyurds has joined ##java
[06:24:13] <Fanook> whoever: make sure you actually recompiled and are running the new version of your code
[06:25:52] <whoever> Fanook: isn't run in eclipse the same as recompiling and runnin'
[06:26:08] *** devkhadka has quit IRC
[06:27:00] <whoever> Fanook: because now when i try to run it i get an error message "selection does not contain an applet"
[06:28:14] *** konr has quit IRC
[06:29:08] *** BoF has joined ##java
[06:31:37] *** eidolon has quit IRC
[06:34:43] *** dextro_ has joined ##java
[06:35:05] <Fanook> that sounds like user error
[06:35:39] <whoever> Fanook: ya i'm fairly new to eclipce
[06:36:04] <whoever> Fanook: do you use eclipse? can you help with it
[06:36:13] *** bojo has quit IRC
[06:36:21] <whoever> it is a project , not just a class
[06:36:26] <Fanook> nope, and even if i did, i don't deal with applets
[06:36:45] <whoever> ok
[06:36:50] <whoever> thx
[06:37:11] *** irn has joined ##java
[06:39:25] <dextro_> when using PreparedStatement do i need to quote the ? when its a string or does it already wrap it in string when i s.setString()
[06:39:57] <Fanook> PreparedStatement handles all quoting for you. That's one of the major reasons for using it
[06:40:01] *** zuxqoj has joined ##java
[06:40:24] *** Spencer_tt has left ##java
[06:45:19] *** wyvern has joined ##java
[06:45:22] *** bearded_oneder has quit IRC
[06:46:18] <paissad> i have another question: ... knowing that the embedded h2 database is stored somewhere in the hard disk, it is possible somehow to load into memory for better access performance ? (because the database is read-only ^^)
[06:47:56] *** nibin has joined ##java
[06:48:40] <tjsnell> are you having performance issues?
[06:52:02] <sproingie> you can have an in-memory database in h2
[06:54:44] *** BoF has quit IRC
[06:56:36] *** oTToRoCk has joined ##java
[07:00:27] <paissad> tjsnell, hmm, currently i don't really have performance issues (the database/table is created in 10-11 sec in my system ... obviously, that will vary in other systems)
[07:00:27] <paissad> but, i only wondered if that would be more interesting to make in in-memory or not ^^
[07:00:57] <paissad> sproingie, yeah, i know about the mem: subprotocol of h2
[07:01:20] *** Mkop has quit IRC
[07:02:14] *** tokam has quit IRC
[07:04:21] <tjsnell> Why don't you not waste time where you don't know there's an issue for now?
[07:04:54] <wyvern> paissad, if you have the memory to spare your kernel will keep the data in memory anyway
[07:05:03] *** EuroTrash has quit IRC
[07:05:52] <paissad> ok
[07:05:57] <sproingie> h2 is ripping fast as it is
[07:06:03] <wyvern> ~h2++
[07:06:03] <javabot> h2 has a karma level of 2, wyvern
[07:06:12] <wyvern> so convenient to use for embedded stuff.
[07:06:15] <paissad> oO
[07:06:22] *** ernimril has quit IRC
[07:08:26] <sproingie> i was using h2 just up til recently til i switched to neo4j (cuz my data is a big graph anyway)
[07:08:38] <sproingie> had no probs whatsoever with h2 tho
[07:09:31] *** ernimril has joined ##java
[07:11:02] *** ninan has quit IRC
[07:17:17] *** rretzbach has joined ##java
[07:17:19] *** plarsen has quit IRC
[07:17:33] *** irn has quit IRC
[07:17:58] *** EuroTrash has joined ##java
[07:23:09] *** ninan has joined ##java
[07:23:52] *** McMAGIC-- has quit IRC
[07:25:31] *** t0rc has quit IRC
[07:25:55] <VooDooNOFX> how can I output to the console only if my program is being run in debug mode within eclipse?
[07:26:02] *** platzhirsch has joined ##java
[07:26:33] *** [[thufir]] has joined ##java
[07:27:59] *** ExtraSpice has joined ##java
[07:30:04] *** epalm has joined ##java
[07:32:50] <ztj> VooDooNOFX: your program won't know that it is in debug mode or in eclipse, so you'll need to set a system property or pass a parameter or something similar to trigger it to do what you want under that condition. This is commonly accomplished when you use proper logging frameworks by simply providing some config override when run in eclipse.
[07:33:45] <VooDooNOFX> ok, can you recommend a "proper" logging framework I can use then. I'm tired of using system.print, blah :)
[07:35:15] <blbrown_win3> sl4j and log4j
[07:35:42] <blbrown_win3> ~sl4j
[07:35:42] <javabot> blbrown_win3, what does that even *mean*?
[07:35:52] *** echosystm has quit IRC
[07:35:56] <cbeust_> ~~ slf4j
[07:35:57] <javabot> The syntax is: tell nick about factoid - you missed out the 'about', cbeust_
[07:36:02] <cbeust_> ~ slf4j
[07:36:02] <javabot> cbeust_, slf4j is the Simple Logging Facade, an abstraction layer for different logging systems. see http://www.slf4j.org/ and the #slf4j channel on this network.
[07:36:08] *** choongii has quit IRC
[07:36:33] <VooDooNOFX> thank you
[07:44:57] *** glcrazy has joined ##java
[07:49:45] *** devkhadka has joined ##java
[07:51:10] *** ztj has left ##java
[07:51:12] *** ztj has joined ##java
[07:51:34] *** epalm has quit IRC
[07:51:40] *** rigved has joined ##java
[07:52:43] *** platzhirsch has left ##java
[07:53:29] *** Cogito has joined ##java
[07:55:48] *** Busata has joined ##java
[07:57:18] <Busata> hellow, I'm using a jtable together with an extended abstracttablemodel class. That class has an arraylist with the objects that I want it to show, now if I want to retrieve the object that the user selected, should I add a getRow(int index) on the tablemodel, or are there better ways?
[07:57:58] *** McMAGIC-- has joined ##java
[07:59:28] *** Engin has joined ##java
[08:05:45] *** benoitdo has quit IRC
[08:07:06] *** homie has quit IRC
[08:07:18] *** Error404NotFound has quit IRC
[08:07:31] *** beasty_ has joined ##java
[08:07:34] <beasty_> morning
[08:08:14] <beasty_> is there a alternative to swing where i can build layouts by using a xml file ?
[08:08:18] *** hmmmm has quit IRC
[08:10:19] *** oTToRoCk has quit IRC
[08:11:15] *** robinsmidsrod has quit IRC
[08:11:20] *** Zta has quit IRC
[08:12:24] *** Zta has joined ##java
[08:14:26] <whoever> is there a way to set the directory to the directory the application is in
[08:14:39] *** Busata has quit IRC
[08:15:02] <VooDooNOFX> beasty_: I'm no expert, but i'm currently looking into e4/xwt for exactly that
[08:15:05] <racarter> i know this isn't java specific but, does anyone here use git?
[08:15:19] *** coalado has joined ##java
[08:15:30] <whoever> i have imported a dir to my projet and would like to only search the dir, i have tried ./ but that giges me a leve above what i want
[08:15:54] <racarter> specifically I'm looking to find out how I can ignore all files starting with "." (linux hidden file convention)
[08:16:00] <racarter> with git
[08:16:09] <beasty_> whoever: os ?
[08:16:30] <whoever> linux, but will also run on windows
[08:16:43] <cbeust_> racarter: git-ignore(1)
[08:16:43] <whoever> beasty_: but and building on linux
[08:16:55] <racarter> cbuest_: what?
[08:16:57] <beasty_> whoever: and what are you trying to search ?
[08:17:03] *** Myth17 has joined ##java
[08:17:37] <whoever> beasty_: what i am recursivly searching for .pdfs
[08:17:49] <Myth17> How can we sort a part of Arraylist without writing a custom 'sort' function?
[08:18:07] <whoever> beasty_: but with ./ i get all my other projects too
[08:19:18] <beasty_> cd dir ; find -name "*.pdf" .
[08:19:35] <cbeust_> racarter: look up git ignore
[08:20:03] *** rchern has quit IRC
[08:20:09] *** rchern has joined ##java
[08:21:13] <whoever> beasty_: cool, i thaught there was an arg i could give ie . just to limit file output to the project dir
[08:21:17] *** Adremelech has quit IRC
[08:21:50] *** Myth17 has quit IRC
[08:21:57] <whoever> beasty_: from within java ! bash
[08:22:18] *** rchern has quit IRC
[08:22:24] *** rchern has joined ##java
[08:22:32] *** tewecske has joined ##java
[08:24:01] <beasty_> whoever: http://stackoverflow.com/questions/1384947/java-find-txt-files-in-specified-folder
[08:24:03] *** parasol has joined ##java
[08:24:30] *** Yusdan has quit IRC
[08:28:17] *** rchern has quit IRC
[08:28:20] *** Error404NotFound has joined ##java
[08:28:22] *** rchern has joined ##java
[08:28:58] *** DJClean has joined ##java
[08:29:16] *** LouisJB has quit IRC
[08:30:07] <whoever> beasty_: cool, is there a way to prevent the folder names that i have created from being alterd, but still allow files to be added
[08:30:39] <whoever> beasty_: i was thinking java.util.security, but havn't tried it yet
[08:31:25] *** wolfman2000 has quit IRC
[08:37:09] *** mischief has joined ##java
[08:38:05] *** dyurds has quit IRC
[08:38:24] *** Yusdan has joined ##java
[08:38:47] *** scruz has joined ##java
[08:40:31] *** rretzbach has quit IRC
[08:40:35] <scruz> hi. is there a way to do reverse lookup on a map? i mean, get the key using a value?
[08:41:13] *** Ch30ps has joined ##java
[08:42:31] <beasty_> scruz: http://www.rgagnon.com/javadetails/java-0564.html
[08:42:50] *** huntercool has quit IRC
[08:43:21] *** racarter has quit IRC
[08:45:23] *** rchern has quit IRC
[08:45:56] *** rchern has joined ##java
[08:46:15] *** parasol has quit IRC
[08:47:50] *** vengeancex32 has quit IRC
[08:48:02] *** vengeancex32 has joined ##java
[08:48:34] *** Yusdan has quit IRC
[08:48:41] *** mazzachre has joined ##java
[08:49:42] *** rchern has quit IRC
[08:49:48] *** rchern has joined ##java
[08:50:25] *** Sambler has joined ##java
[08:52:33] *** fuzzygroove has joined ##java
[08:52:35] *** Sliker has joined ##java
[08:52:43] *** Sambler has quit IRC
[08:54:27] *** cbeust_ has quit IRC
[08:57:27] *** fuzzygroove has quit IRC
[09:01:10] <Bombe> Good morning.
[09:01:23] <coalado> morning
[09:01:27] *** placydo has quit IRC
[09:02:11] *** Error404NotFound has quit IRC
[09:05:49] *** placydo has joined ##java
[09:06:23] *** supercosmonaut has quit IRC
[09:06:27] *** Sliker has quit IRC
[09:08:38] *** Yusdan has joined ##java
[09:09:47] *** Yusdan has quit IRC
[09:10:32] *** jonkri has joined ##java
[09:10:37] *** eitch0000 has joined ##java
[09:11:27] *** vengeancex32 has quit IRC
[09:12:27] *** vengeancex32 has joined ##java
[09:12:58] *** devkhadka has quit IRC
[09:13:28] *** aLeSD has joined ##java
[09:13:37] <aLeSD> is it a good abit to access the private attributes directly within the class ?
[09:14:25] <pr3d4t0r> aLeSD: Yes. That's kind of their purpose :)
[09:15:00] <aLeSD> ok .tx
[09:15:06] *** robinsmidsrod has joined ##java
[09:18:28] *** sphenxes has joined ##java
[09:18:53] *** sprobe has joined ##java
[09:19:59] <nibin> scruz: apache commons collection Bi diMap [ http://commons.apache.org/collections/apidocs/org/apache/commons/collections/bidimap/DualHashBidiMap.html ]
[09:20:11] <scruz> ok. thx nibin
[09:20:35] <ztj> I just took about 20 minutes to port some db code that worked with Derby to work with H2 instead and without any special tuning, and even using H2's derby compatibility mode (so as to not have to rewrite queries today) it's four times faster. FOUR TIMES. *sigh*
[09:20:52] * ztj hopes this "proof of concept" convinces the bean counters
[09:23:10] *** rigved has quit IRC
[09:23:15] <aLeSD> someone know if there is a circular list in java ?
[09:24:15] *** Metallon has joined ##java
[09:24:48] *** vdv has joined ##java
[09:28:04] *** ech0s7 has joined ##java
[09:28:11] *** lycy has joined ##java
[09:28:31] *** mah01 has joined ##java
[09:29:27] *** lycy has quit IRC
[09:44:15] *** aLeSD has quit IRC
[09:44:36] *** lycy has joined ##java
[09:47:17] *** Sliker has joined ##java
[09:49:59] <mitch0> you mean something like a circular buffer?
[09:54:29] <mitch0> aLeSD: http://pastebin.com/bnpJcNXv
[09:56:25] <dreamreal> morning
[09:57:21] <mitch0> o/
[09:58:21] <mischief> hello, how could i make a jtable that can have elements deleted by double-clicking?
[09:58:43] *** mufasis has joined ##java
[09:59:32] *** selckin has joined ##java
[09:59:50] <mufasis> anyone have a good online guide for learning java
[10:01:53] *** mufasis has left ##java
[10:01:55] <mitch0> ~tutorial
[10:01:56] <javabot> Please see http://download.oracle.com/javase/tutorial/
[10:02:30] *** SickSince has joined ##java
[10:02:41] *** xiliax has joined ##java
[10:03:01] <SickSince> good book for java ?
[10:03:51] <dreamreal> ~tutorial
[10:03:52] <javabot> Please see http://download.oracle.com/javase/tutorial/
[10:04:30] *** selckin has quit IRC
[10:06:07] *** FrozenKnight has joined ##java
[10:08:16] *** disappearedng_ has quit IRC
[10:11:17] *** deSilva has quit IRC
[10:11:30] <SickSince> ~tutorial
[10:11:30] <javabot> Please see http://download.oracle.com/javase/tutorial/
[10:11:53] *** Sliker has quit IRC
[10:13:10] *** aLeSD has joined ##java
[10:14:14] <aLeSD> hi... I have to se a static list .. when I add a value at the end I have to remove the first. is it better to use a LinkedList ?
[10:15:40] *** zuxqoj has quit IRC
[10:15:55] <dreamreal> sure, why not
[10:16:44] <aLeSD> dreamreal: a vector is more expensive. is it ?
[10:16:57] <dreamreal> okay, what?
[10:17:11] <aLeSD> mmm
[10:17:15] <dreamreal> aLeSD: why are you asking this? Have you tried and had a problem?
[10:17:34] <aLeSD> dreamreal, I am tring to optimize ...
[10:17:47] <dreamreal> Why?
[10:17:49] <aLeSD> dreamreal, I am coding for smartphone ..
[10:17:57] <dreamreal> so? Have you seen a problem?
[10:18:11] <dreamreal> And besides, on JME, Vector is probably your one choice.
[10:18:14] <dreamreal> move along.
[10:18:26] <aLeSD> no no .. no problem with both .
[10:18:50] <dreamreal> what kind of phone is it?
[10:18:58] <aLeSD> android
[10:19:08] <aLeSD> I know.. darvin is not java
[10:19:25] <aLeSD> but I am asking about general stuff in java
[10:19:27] *** Simath has quit IRC
[10:19:38] *** teralaser has joined ##java
[10:19:39] <dreamreal> IN GENERAL, have a problem before you bother optimizing.
[10:21:20] <Metallon> there's nothing wrong with trying to write more efficient code, even if you're not experiencing problems with your current solution.
[10:21:49] <aLeSD> usually a Vector have to malloc, copy on resizing
[10:21:55] <dreamreal> aLeSD: shhh now
[10:22:09] <dreamreal> Metallon: sure. The problem is: are you smarter than the JIT? Usually the answer is no.
[10:22:12] <aLeSD> well .. if Vector is an array
[10:22:14] <aLeSD> :D
[10:22:25] <dreamreal> even for members of the brain trust like aLeSD
[10:22:37] <aLeSD> lol
[10:23:19] *** Simath has joined ##java
[10:23:20] <aLeSD> Really ... the stuff that JIT has its own decisions scares me
[10:23:44] <aLeSD> like now ... I really don't know which is the best solution
[10:23:51] <dreamreal> aLeSD: and in most cases, the pissant little optimizations people focus on get completely and totally overridden by JIT.
[10:23:51] *** passwordoff has joined ##java
[10:23:55] <mitch0> dreamreal: well, the jit can't really optimize away O(n) to O(1) [in the wast majority of the cases]
[10:24:00] <dreamreal> Plus: malloc is fairly rare in java.
[10:24:03] <passwordoff> set default browser for JRE
[10:24:12] <dreamreal> mitch0: right. THIS. IS. WHY. YOU. TEST.
[10:24:31] <dreamreal> Once you have a problem, THEN you optimize. Otherwise you're pretty much masturbating over your own code.
[10:24:33] <mitch0> dreamreal: I agree with you on _micro_ optimizations
[10:24:42] <aLeSD> ok ... let's try another way
[10:24:57] <dreamreal> mitch0: heck, the process is the same regardless
[10:25:00] <mitch0> I don't agree with that attitude for choosing the correct algorithm, data structure
[10:25:04] <dreamreal> get it working, then fix it
[10:25:22] <mitch0> I prefer: think, get it working, fix it :)
[10:25:23] <aLeSD> if there are implementation of List interface. I hope it means different costs. Bacause the features are the same
[10:25:25] <aLeSD> ok ?
[10:25:41] <dreamreal> mitch0: well, here's my approach: "let me get it working. Then I will test. I will have a reasonable expectation of what performance should be. if the test shows it is not meeting that expectation, optimize."
[10:25:42] <aLeSD> I don't see anyother reason
[10:25:48] <dreamreal> aLeSD: sure.
[10:25:51]
[10:26:04] <aLeSD> I am searching the best implementation for my case
[10:26:19] <dreamreal> aLeSD: here's the thing: for lists < 100 elements, you can choose the worst possible list for your operation, and unless you're doing it A REALLY LOT, it won't matter. At all.
[10:26:59] <aLeSD> I am changing the vector each 50ms
[10:26:59] <mitch0> dreamreal: *shrug* obviously if the expected data size (n) is small, I don't sweat much about fast algorithms / fitting data structures, but go for the easiest. but if I know that n will be large, I'd rather think in advance
[10:27:02] <dreamreal> sure, you can break that assumption: "I'm doing get(int) 10000 times per second on a list of 4100 elements, LinkedList won't hurt, right?"
[10:27:04] *** supercosmonaut has joined ##java
[10:27:25] <dreamreal> mitch0: quick question: do you really think I'm advocating coding blind and stupid?
[10:27:33] *** drindt has joined ##java
[10:27:48] *** thpar has joined ##java
[10:27:49] <dreamreal> I just wonder because, well, it might be the case since you seem to be missing something crucial in what I'm saying
[10:28:25] <mitch0> dreamreal: I know you (as best as one can know another based on irc :) so no, but I think your comments came out as if you were (for the "newcomers")
[10:28:30] <mitch0> hence my objection
[10:29:00] <dreamreal> mitch0: the newcomers aren't going to know how to "think." Supporting point: aLeSD.
[10:29:05] * aLeSD I will ask to c
[10:29:24] <dreamreal> aLeSD: jesus christ. You know nothing about data structures
[10:29:25] <dreamreal> ?
[10:29:39] <aLeSD> yes . everything
[10:30:09] <aLeSD> but I don't belive very much to JIT
[10:30:11] <dreamreal> I mean, really. You are asking a retarded question: "Does a Deque act like a Deque? Can I use some other kind of list?"
[10:30:18] *** Metallon has left ##java
[10:30:21] <dreamreal> aLeSD: then you really need to stick to C
[10:30:31] <aLeSD> it seems to me that there's someone that try to help me
[10:30:40] <dreamreal> JIT's been a core part of Java, battle tested and functional, for years now
[10:30:50] <dreamreal> aLeSD: believe it or not, I'm trying to help you too
[10:30:54] <aLeSD> dreamreal: simply I don't know it
[10:31:09] <dreamreal> and I'm trying to help you for the future, by trying to focus your work on stuff that matters
[10:31:39] <mitch0> dreamreal: I need a short nice sounding domain name. give me one!
[10:31:50] <dreamreal> mitch0: haha
[10:32:08] <mitch0> already taken
[10:32:12] <mitch0> next?
[10:32:16] <dreamreal> next.com?
[10:32:29] <mitch0> that's definitely taken (unless it expired ;)
[10:32:38] <mitch0> I remember fondly working on NeXT
[10:32:40] <dreamreal> I dunno, man
[10:32:42] *** Metz has joined ##java
[10:32:46] <dreamreal> You had a cube?
[10:32:53] <mitch0> no
[10:33:00] <mitch0> it was like a pizza box
[10:33:05] <dreamreal> heh
[10:33:13] *** SickSince has quit IRC
[10:34:19] <mischief> can anyone help me set up a jtable that removes elements on double-click?
[10:37:09] *** Sliker has joined ##java
[10:37:35] *** espeed has joined ##java
[10:38:36] <mitch0> I wonder if the $1.99 / year domain registration works if I pre-pay 10 years or so
[10:40:53] *** espeed has quit IRC
[10:42:16] *** Metz has quit IRC
[10:43:28] <mischief> can someone look at this double-click handler for a jtable? http://slexy.org/view/s2DXflmfOA
[10:47:46] <deebo> whats ideas "format this file/selected area" shortcut? cuoldnt find it in the menus
[10:48:06] *** la00 has joined ##java
[10:48:09] <la00> hello
[10:48:26] <deebo> eclipses was ctrl-shift-f i think
[10:48:30] *** mapreduce has joined ##java
[10:48:57] <la00> Got a *.csv file as an InputStream..wich is the best way to process this file?
[10:49:20] *** rigved has joined ##java
[10:49:26] <mitch0> la00: google for some csv reader implementation
[10:49:27] <la00> dunno know how to get something like readLine(); tokenize()
[10:49:51] *** Sliker has quit IRC
[10:50:31] <mitch0> la00: try this, for example: http://techblog.ralph-schuster.eu/csv-utility-package-for-java/
[10:50:35] <la00> BufferedReader br = new BufferedReader( new FileReader(strFile)); <---how to do this with an InputStream
[10:51:05] <mapreduce> InputStreamReader.
[10:51:11] <reisi> continuing on yesterdays xml schema validation w/ jaxp (xerces2); could someone guide me to get that unique contstraint to make the doc invalid: http://pastebin.com/9N7v3z78
[10:52:26] <la00> mapreduce> and how to read a line?
[10:53:03] <mapreduce> Wrap a BufferedReader around it.
[10:53:33] <la00> InputStreamReader isr = new InputStreamReader(f.getInputstream()); BufferedReader br = new BufferedReader(isr);
[10:53:40] <scruz> yup
[10:53:46] <mapreduce> In fact, that's what you should do for Files, avoiding FileReader, as FileReader uses the OS' default character encoding, rather than letting you set it.
[10:53:54] <mapreduce> WORA my ass.
[10:54:21] <la00> mapreduce> tks :)
[10:55:23] <mapreduce> nprblms
[10:58:24] <reisi> mapreduce: suppose you had a program reading user supplied text files (common enterprise apps :D) wouldn't it make sense to read them using platform encoding?
[10:58:41] <reisi> mapreduce: as in notepad only outputs some strange win codepage etc :)
[10:58:54] *** scruz has quit IRC
[10:59:30] <mischief> can someone look at this double-click handler for a jtable? http://slexy.org/view/s2DXflmfOA
[10:59:51] *** supercosmonaut has quit IRC
[11:04:16] *** frangiz has joined ##java
[11:04:18] *** zuxqoj has joined ##java
[11:04:50] <aLeSD> mmm ... if I set the reference of a List to the n element ... all the element from 0 to n-1 are freed by Garbage collector ?
[11:04:55] *** tilerendering has joined ##java
[11:05:59] <reisi> mischief: sounds rather strange (i havent done swing programming but looking at javadocs); does this happen on the first or second doubleclick on row after app startup?
[11:06:08] <aLeSD> well .. I jhope so
[11:06:50] <reisi> aLeSD: you mean List#set(int, Object)?
[11:07:06] <dreamreal> aLeSD: the GC isn't magic. If you have a noncyclic reference to an object, that object will not be garbage collected.
[11:07:31] <mischief> reisi, seems to be the second
[11:07:48] <reisi> mischief: read the JTable#remove(int) javadocs
[11:07:56] <aLeSD> dreamreal, buyt the element(0) will be unreferenced
[11:08:02] <reisi> mischief: you are missing something rather important
[11:08:18] <aLeSD> dreamreal, so GC ... then the element(1) ... because element(0) doesn't exist
[11:08:21] *** sveajobb has joined ##java
[11:08:27] <mischief> remove is not a method of JTable, it is inherited
[11:08:31] <dreamreal> aLeSD: if it's unreferenced, then it will be collected. There is no contradiction here.
[11:08:32] <aLeSD> dreamreal, is it ?
[11:08:42] <aLeSD> ok
[11:08:44] <aLeSD> thanks
[11:08:46] <reisi> mischief: still, there's a notion that you must call validate or something like that
[11:08:52] <sveajobb> Is it possible to use blocking channels with .register + Selector ? I keep getting a nice little java.nio.channels.IllegalBlockingModeException
[11:08:55] <reisi> mischief: and i believe that's the source of your problems
[11:09:33] <mischief> i don't understand reisi, i don't see anything mentioning that in remove's docs
[11:11:04] <reisi> mischief: see the "Note:" part http://download.oracle.com/javase/6/docs/api/java/awt/Container.html#remove%28int%29
[11:12:59] <mischief> oh. huh.
[11:13:58] <mischief> reisi, i added a call to validate() after remove(), but the exception is still thrown and the element isnt removed
[11:16:10] <mischief> reisi, it appears JTable.remove is not the answer. ((DefaultTableModel)t.getModel()).removeRow(row); is, however. ^^
[11:16:37] *** supercosmonaut has joined ##java
[11:27:08] *** Sambler has joined ##java
[11:29:00] *** lunatik210 has joined ##java
[11:33:05] *** zuxqoj has quit IRC
[11:36:51] *** pen has joined ##java
[11:37:17] *** lycy has quit IRC
[11:40:51] *** zuxqoj has joined ##java
[11:41:17] *** matsebc has joined ##java
[11:41:55] *** Thorsten[Nexus] has joined ##java
[11:42:27] *** frangiz has quit IRC
[11:42:40] *** McMAGIC-- has quit IRC
[11:43:12] *** tonique has joined ##java
[11:43:42] *** frangiz has joined ##java
[11:43:43] *** McMAGIC-- has joined ##java
[11:45:35] *** Sambler has quit IRC
[11:47:22] *** horte has joined ##java
[11:47:44] *** Sambler has joined ##java
[11:56:04] *** lunatik210 has quit IRC
[11:56:40] *** konr has joined ##java
[11:58:46] *** knxville has joined ##java
[12:00:07] *** Abhi347 has joined ##java
[12:01:56] *** wliao has quit IRC
[12:06:27] *** hyppias has joined ##java
[12:06:33] <FauxFaux> I'd like to @Autowired SomeBean<SomeT> aField; but SomeBean needs a Class<T> to "construct"; surely Spring has some way to do this?
[12:06:53] *** Thorsten[Nexus] has left ##java
[12:07:36] <dreamreal> FauxFaux: factory?
[12:09:32] <dreamreal> FauxFaux: can you describe the problem more fully?
[12:10:31] <jink> I'd like to create a method that would do something like public static T sumValues(Map<?, T extends Number> map) but I'm not sure that's possible. Basically I want it to sum all the map.values() and return that.
[12:10:50] <FauxFaux> dreamreal: Uh... I want to write SomeBean<String> aField = new SomeBean<String>(String.class); // but SomeBean has fields that I would like Spring to inject?
[12:11:20] <dreamreal> FauxFaux: <context:spring-configured /> is your friend
[12:11:47] *** frangiz has quit IRC
[12:12:54] *** frangiz has joined ##java
[12:12:55] <FauxFaux> I frequently find that aspectj is not my friend. :)
[12:14:16] * FauxFaux goes with the initial plan of @Autowired BlehFactory bleh; private final SomeBean<String> b = bleh.make(String.class); // or whatever.
[12:19:52] <reisi> FauxFaux: you can also ask spring to configure you a bean; see ApplicationContext#getAutowireCapableBeanFactory() and AutowireCapableBeanFactory#autowire(Object)
[12:21:37] <FauxFaux> Mmm, that's pretty cool; thanks.
[12:22:11] <reisi> FauxFaux: if you need more dependencies (like ones from BeanPostProcessors), afaik you can ask applying bean postprocessors before/after even *without* a beandefintion, the beanName parameter is used just for the BeanPostProcessors
[12:22:15] *** zuxqoj has quit IRC
[12:22:29] *** topriddy has joined ##java
[12:23:54] <reisi> FauxFaux: just note that returned bean might not be the same you asked AutowireCapableBeanFactory to apply postprocessors to; Object possiblyWrapped = bf.applyPostProcessorsBeforeInit..(myBean, "myBeanName"); Object ready = bf.applyPostProcessorsAfterInit...(possiblyWrapped, "myBeanName");
[12:24:03] <reisi> FauxFaux: that ofc depends on your configuration
[12:28:19] *** fr0ggler has joined ##java
[12:28:50] *** pantokrator has left ##java
[12:28:57] <FauxFaux> It's a reasonably simple case (assuming hibernate is simple (ho ho ho)) and only in tests anyway, what could possibly go wrong. :)
[12:30:28] *** Cher has quit IRC
[12:30:35] <hyppias> A general question about this channel: sometimes I see a lot of people suddenly dropping off the channel. What is going on then ?
[12:31:09] <deebo> a netsplit most likely
[12:31:18] <hyppias> what is a netsplit ?
[12:31:33] <wlfshmn> It is not a channel-specific issue, but one inherent in IRC. Two servers lose contact.
[12:31:45] <wlfshmn> It is more apparentl in channels with a large number of inhabitants however.
[12:32:42] <hyppias> so an IRC server going off line ? aserver via which THAT lot of people are connectiong ?
[12:33:00] <_W_> hyppias, just google "netsplit" and stop the silly questions ><
[12:33:36] *** guidj0s has quit IRC
[12:33:50] *** pht has quit IRC
[12:36:24] *** terranova has joined ##java
[12:36:31] *** terranova has quit IRC
[12:37:04] *** terranova has joined ##java
[12:39:11] *** delfis has joined ##java
[12:39:15] <delfis> hello
[12:39:39] <delfis> i need an element from tinidad, to add to them partialTriggers, but to avoid <table in source
[12:39:48] <delfis> it crashes design
[12:40:23] <deebo> i think youre looking for #javascript
[12:40:29] <delfis> no
[12:40:42] <delfis> *trinidad
[12:40:56] <mark-a> t
[12:41:09] <dreamreal> trinidad is a JSF component suite. It's java.
[12:41:31] <deebo> Now I know! Knowing is half the battle!
[12:41:44] <delfis> <tr:panelHorizontalLayout partialTriggers="risk_address_name">
[12:41:51] <delfis> it works, but it gives me <table..
[12:41:59] <mapreduce> The second half of the battle takes 4 times the time than the first half.
[12:42:11] * mapreduce --more-grammar &
[12:42:35] *** hyppias has quit IRC
[12:47:10] *** rgr has joined ##java
[12:48:31] <delfis> so?
[12:50:55] *** Sambler has quit IRC
[12:52:27] *** Peej has quit IRC
[12:52:33] *** Peej has joined ##java
[12:52:38] *** Shambat has joined ##java
[12:53:04] *** rgr has quit IRC
[12:53:13] <Shambat> what is the underlying data structure of java.util.PriorityQueue? is it a binary heap?
[12:53:49] <Bombe> Who knows.
[12:54:03] <mapreduce> "An unbounded priority {@linkplain Queue queue} based on a priority heap."
[12:54:04] <mapreduce> docs++
[12:54:20] <Bombe> Oh noes, the documentation knows!
[12:54:26] <Bombe> Who would have expected THAT?
[12:54:34] <Bombe> I for sure wouldn't.
[12:55:05] <dreamreal> It's an array at the last.
[12:55:13] <dreamreal> Not even looking at docs, just the source code.
[12:55:17] *** Farmer_ has joined ##java
[12:55:23] *** bn` has quit IRC
[12:57:33] *** pipeep has joined ##java
[13:00:30] *** RLa has joined ##java
[13:03:46] *** paulweb515 has joined ##java
[13:05:04] <RLa> what tools i could use for generating bytecode without first generating java source, i'm currently using jasmin but i need intermediate step to compile jasmin to bytecode
[13:05:15] *** L-----D has quit IRC
[13:05:34] <mapreduce> ~asm
[13:05:34] <javabot> mapreduce, asm is a library to read, manipulate, and create class files. It's visitor based, so, for example, you can read in a class, and create a visitor that gets a ping for each field in it. You can then even rewrite these fields, remove them, or create new ones. Same for methods and other class file properties. BSD-ish open source. http://asm.ow2.org/ (Competitors: Apache BCEL).
[13:06:27] <jink> So, I have 2 methods: "private static double sumValues(final Map<Integer, Double> map)" and "private static int sumValues(final Map<Integer, Integer> map)". On _my_ machine (32-bit 1.6.0_18) that seems to work, while on my colleague's machine (64-bit 1.6.0_22) it complains about the methods having the same erasure. WHY!? :(
[13:06:40] <RLa> mapreduce, have you used it yourself?
[13:06:41] <_W_> ~~ jink erasure
[13:06:41] <javabot> jink, type erasure is the notion that all generics info *FROM INSTANCES* is gone [the String in List<?> x = new ArrayList<String>();], as well as generics info being irrelevant for method signatures (void foo(List<Integer> x) and void foo(List<String> x) cannot co-exist in the same class).
[13:06:42] <topriddy> mapreduce: for generating java source files from templates? i'll probably need velocity???
[13:06:57] *** kieran491 has joined ##java
[13:07:08] <RLa> topriddy, how is it going
[13:07:10] <_W_> jink, it doesn't work on your machine either - you're just doing something else wrong that is masking the error
[13:07:14] <kieran491> Hi is the netbean website down or is just my computer?
[13:07:21] <jink> _W_: Yes, I know, and I understand. It makes sense. But then why does it even work on my machine? :S
[13:07:22] <mapreduce> RLa: I think I did a hello world with it.
[13:07:25] *** delfis has quit IRC
[13:07:31] <_W_> jink, it doesn't
[13:07:36] <jink> _W_: Ah, that might be it. I'd expect to see a compile error, though.
[13:07:46] <RLa> ok, thanks, will look at it more closely
[13:07:52] *** matsebc has quit IRC
[13:07:52] <mapreduce> topriddy: When I generated Java source I did it from Scala.
[13:07:57] <_W_> jink, perhaps the error is that you have a typo in the name of one of the methods on your end
[13:08:03] <_W_> jink, perhaps a case difference
[13:08:19] <mapreduce> 50 lines of Scala generating 3000 lines of fully Javadocced boilerplate-tastic Java.
[13:08:26] <RLa> topriddy, why you need to generate java source?
[13:08:44] <RLa> maybe you can do directly bytecode as well
[13:08:50] <topriddy> mapreduce: open source efforts? would like to take a look.
[13:08:51] <jink> _W_: It's all versioned (svn), and what I wrote above is an actual paste of the two signatures."
[13:09:16] <topriddy> RLa: fine sir. using wicket+guice+warp-persist. my jersey didnt integrate well with guice so i just implemented a simple rest service myself. but am looking at jersey-guice project hosted on google ATM
[13:09:28] <_W_> jink, pastebin the code from your machine then
[13:09:36] <_W_> I'm sure some of us can spot the problem
[13:10:09] <RLa> topriddy, you got warp-persist working? with which version of wicket? 1.3 or 1.4 or 1.5?
[13:10:36] <RLa> topriddy, or with what version of guice
[13:10:41] <RLa> that matters more
[13:11:01] <RLa> and what did you choose as jpa provider?
[13:11:03] <topriddy> RLa: wicket 1.4.9, guice 2.0, i used legUp X_X
[13:11:05] <_W_> jink, thought the error might even be that you're not compiling that file - e.g. some error in your compilation setup/caching/whatever
[13:11:14] <jink> _W_: I think it's Eclipse fucking up. I'll try and write a more generic Double sumValues(Map<?, Number> map) version to just make it a single method.
[13:11:32] <_W_> jink, why not make it a generic method?
[13:11:33] <jink> _W_: I just did a clean build, but that didn't work, I guess.
[13:11:36] <topriddy> RLa: hibernate. it works actually fine. save i had to edit the hibernate to use my db native query lang
[13:11:37] <RLa> topriddy, if it's new project, try 1.5 too, it's been out for over a year
[13:11:52] <topriddy> RLa: the demo is online but not public yet.
[13:12:14] <_W_> <T extends Number> T sumValues(final Map<Integer, T> map)
[13:12:19] <topriddy> RLa: okay will look at 1.5. just that i call same classes/methods in both versions.
[13:12:32] <jink> _W_: It started out with Doubles only, then I wanted Integer, so I just added that, assuming it would work, and since Eclipse didn't seem to mind, I totally forgot about erasure. I'll just use your signature and fix it properly. Thanks. :)
[13:12:42] <RLa> i think 1.5 has rewritten ajax mechanism, most api should be compatible to 1.4
[13:12:55] <jink> _W_: Can't return T, can I?
[13:12:59] <_W_> you'll still have to either go the way through double (or some other specific number implementation) or do instanceof checks
[13:13:20] <jink> I'll just return Double, I guess.
[13:13:23] <mapreduce> topriddy: Not open source, and I don't think I have it anymore.
[13:13:40] <mapreduce> I deleted it after my boss left, as I no longer needed 3000 lines of boilerplate.
[13:13:40] <topriddy> RLa: the hibernate and dao files look really similar some few lines with only name changes...i dont need to implement any method body for daos, daoImpl, SO i want to create a package where i dump all my entities(i manually hard code or generate from uml), then run my custom made utility on it.
[13:13:41] *** frangiz has quit IRC
[13:14:20] <topriddy> mapreduce: is there a way to avoid boilerplates? cos what i hear is dont code to Impl.
[13:14:24] <mapreduce> I hadn't been bold enough to check the generating side into svn at the time.
[13:14:38] *** frangiz has joined ##java
[13:14:48] <mapreduce> topriddy: If you have an interface with only one implementation, chances are you can inline the interface without losing anything.
[13:14:54] *** matsebc has joined ##java
[13:15:12] *** pen has quit IRC
[13:15:29] *** kieran491 has left ##java
[13:15:40] <RLa> topriddy, also the alternative to dao's is using named queries, as was pointed out in this channel some time ago
[13:15:59] *** VJTachyon has joined ##java
[13:16:30] *** hyppias has joined ##java
[13:16:30] <dreamreal> Well... I use named queries *in* DAOs, but hey
[13:16:38] <RLa> oh
[13:16:44] <fr0ggler> likewise
[13:17:04] <deebo> ive grown to like what play framework does with domain objects
[13:17:06] <_W_> chances are if you have a layer that *only* calls down to a layer below, that layer is useless
[13:17:13] <deebo> public static methods for searching and querying
[13:17:31] <RLa> deebo, turning jpa into active record?
[13:17:35] <deebo> MyDomainObject.findAll().from(10).fetch(10);
[13:17:47] <dreamreal> i use DAOs as an abstraction layer, my service objects either dispatch calls synchronously or async, or use the DAOs
[13:17:57] <RLa> deebo, does it build criteria query behind the scenes?
[13:18:10] <deebo> altho i also like having domain objects just as simple dumb objects :) depends on the situation
[13:18:25] <deebo> RLa: yeah
[13:18:44] <dreamreal> anemic models are okay, the main advantage they give is some insurance against object versioning
[13:18:51] *** Metz has joined ##java
[13:19:33] <RLa> deebo, does it also automatically build metamodel?
[13:19:44] *** Metz has quit IRC
[13:19:59] <deebo> i do some EAI/messaging stuff so the anemic model fits there, so i can just load data as an object and not care about its weird dependencies to database sessions etc
[13:20:03] <RLa> or uses string shortcut in criteria queries
[13:20:20] <RLa> hm, wait
[13:20:24] <deebo> not familiar with "metamodel"
[13:20:37] <RLa> does it use hibernate or jpa criteria queries?
[13:20:39] <jink> _W_: There, I fixed it. :P Thanks. ^__^
[13:20:42] <tonique> hmm 2,5 million entries in a LinkedList is that a good idea ?
[13:20:54] <RLa> i'm not sure if hibernate one has metamodel at all
[13:20:55] <deebo> i think play uses hibernate but as jpa provider, not hibernate specific
[13:20:59] *** la00 has left ##java
[13:21:12] <_W_> tonique, usually LinkedList isn't a good idea to begin with
[13:22:06] <_W_> tonique, why not describe your circumstances so we can better advice you?
[13:22:25] <tonique> i have x,y and r,g,b
[13:22:39] <tonique> multiplied by eg 1024x768
[13:22:54] <RLa> deebo, metamodel is used for specifying which fields you want to fetch, without metamodel you cannot refer fields safely (not using their string names)
[13:23:07] <deebo> then you use a 786432 sized array
[13:23:20] <tonique> but the size is not defined ..
[13:23:25] <deebo> and access it via screen[y*1025+768]
[13:23:49] <deebo> erm +x :)
[13:23:51] <_W_> deebo, *1024 you mean
[13:23:54] <deebo> that too
[13:24:10] <tonique> it can be 1024* 27
[13:24:21] <tonique> or 27*768
[13:24:26] <_W_> tonique, so?
[13:24:27] <deebo> cant you just use some Canvas thing?
[13:24:35] <deebo> since youre clearly talking pixels
[13:24:49] <_W_> or BufferedImage
[13:28:05] <tonique> and then getpixel ?
[13:32:57] <tonique> another thing how do i get int back from the linkedlist .. linkedlist.get(i) returns object
[13:33:08] *** [[thufir]] has quit IRC
[13:33:21] <hyppias> I'm working with JAXB. Now I hear Sun's JDK1.6 has an implementation that is used by default. I need JAXB2Basics library functionality (that I downloaded from http://confluence.highsource.org ) together with JAXB 2.2 library. But how do I get my project to use that other-than-default lib instead of JDK's?
[13:33:31] <deebo> ~tell tonique about generics
[13:33:31] <javabot> tonique, For a tutorial on generics, please see http://javachannel.net/wiki/pmwiki.php/Main/Generics
[13:34:08] *** Pozejdon has joined ##java
[13:34:13] <deebo> hyppias: theres some weird parameter like -Dsun.xml.DocumentFactoryImpl=your.lib.DocumentFactoryImpl
[13:34:24] <deebo> or the jar has to define it provides those implementations
[13:35:32] *** [[thufir]] has joined ##java
[13:43:51] *** frangiz has quit IRC
[13:44:52] *** frangiz has joined ##java
[13:45:11] *** gnu_d has joined ##java
[13:47:26] *** saby has joined ##java
[13:47:33] <RLa> hyppias, or use those libs directly
[13:48:03] *** Abhi347 has quit IRC
[13:48:18] <saby> hey, i need to create a simple java class to open the google news webpage and extract the title, time, url & the small news give
[13:48:24] <saby> any idea how i should go about it
[13:48:25] <saby> ?
[13:49:06] <mapreduce> First, you need to translate "the small news give" into English.
[13:50:18] <gnu_d> Hi, how do I connect the sqlite wrapper to my project, this is the wrapper http://www.ch-werner.de/javasqlite/ and this is the code I use: http://www.pasteall.org/19622/java. The problem is it raises an SQL exception, I don't know why, the database is ok.
[13:50:54] <saby> sorry for that typo, the brief news given on the news page below the title
[13:51:37] *** psst has joined ##java
[13:52:03] <RLa> maybe there are web services by google for that functionality
[13:52:15] <saby> i had done some searching, but most of them are using xquery
[13:52:44] <saby> RLa google only provides RSS functionality but that doesnt include the time
[13:53:12] <mapreduce> Yes, it does include the time.
[13:53:17] <mapreduce> http://news.google.com/news?ned=us&topic=h&output=rss
[13:53:31] <RLa> also, maybe you can take time as the first time the article appears in feed
[13:54:01] *** Metallon has joined ##java
[13:54:02] <saby> i actually need the time as it shows on the news.google.com page
[13:54:18] <saby> so that is why i would need to do screen scrapping of the html file
[13:56:28] *** defascat has joined ##java
[13:56:49] *** defascat has left ##java
[13:57:17] <RLa> why not use time when it appears in the rss?
[13:57:32] <mapreduce> Because he needs to scrap the screen!
[13:57:40] <RLa> if you poll it using 5 min interval, it should be quite close
[13:57:42] <RLa> oh
[13:58:33] <saby> ya
[13:58:44] <saby> and i would like to use inbuilt packages if possible
[13:59:22] *** pen has joined ##java
[13:59:43] *** CallToPower has joined ##java
[14:00:55] *** glcrazy has quit IRC
[14:05:59] *** djbpython has quit IRC
[14:07:15] *** CallToPower has left ##java
[14:08:14] *** mazzachre has quit IRC
[14:09:28] <RLa> aww, why Date has no method to add/substract days, months etc.
[14:09:41] <_W_> because Java's date/time API sucks?
[14:09:47] <_W_> ~jodatime
[14:09:47] <javabot> _W_, jodatime is an excellent date/time implementation for Java, particularly useful if you need to do time arithmetic and work with time intervals. Open source. Available at http://joda-time.sourceforge.net/ - it is also the basis for the new date/time system that'll be in java 8. See: https://jsr-310.dev.java.net/
[14:09:47] *** BeholdMyGlory has joined ##java
[14:09:59] <mitch0> aww: Calendar has
[14:10:07] <mitch0> erm, Rla
[14:10:10] <mitch0> ;)
[14:10:15] <mitch0> parse fail
[14:10:23] *** CallToPower has joined ##java
[14:10:24] <mapreduce> Damn cross-compile nonsense.
[14:10:44] <RLa> oh yeah, create new calendar each time you need small operation on date
[14:10:44] <mapreduce> A Linux JDK, not too surprisingly, doesn't have include/windows
[14:10:57] <mapreduce> RLa: What's wrong with creating a new Calendar?
[14:11:04] <RLa> bit verbose
[14:11:06] * DroidAgent wonders why someString.replace("x", getVar()); still calls getVar even if there's no x in someString.
[14:11:11] <mapreduce> RLa: So use joda-time.
[14:11:33] <mapreduce> DroidAgent: Because Java evaluates method parameters before calling the method.
[14:11:35] <RLa> DroidAgent, java evaluates arguments before calling the method
[14:11:39] <mapreduce> It's a strict language.
[14:11:49] <DroidAgent> Hm ok, makes sense, I guess.
[14:11:49] <RLa> joda time looks good
[14:12:23] <DroidAgent> So would it make sense to do a if(x.contains) first before making unnecessary function calls?
[14:12:47] *** virgomoon has quit IRC
[14:13:06] <DroidAgent> Or would that be overoptimization, if there's not a lot of heavy lifting going on in getVar()?
[14:13:11] <_W_> DroidAgent, Java, when compiling the code you mentioned, does not know what the method actually does - you could have swapped out the String class to do something eltirely else
[14:13:34] <_W_> DroidAgent, optimize when you see a performance problem
[14:14:44] *** frangiz has quit IRC
[14:15:14] <RLa> if it did not evaluate before calling you could have other problems
[14:15:38] <RLa> and debugging would be nightmare
[14:15:58] *** ptoth has joined ##java
[14:16:09] *** frangiz has joined ##java
[14:16:48] <DroidAgent> I would have guessed that, since getVar() returns a String type, the compiler would be able to figure it out.
[14:17:24] <ptoth> paulweb515 hi are you here ? :
[14:17:40] <RLa> mapreduce, how to convert joda's LocalDate to normal Date?
[14:18:27] <paulweb515> ptoth: sorta ...
[14:20:52] *** caverdude has joined ##java
[14:21:35] *** topriddy has quit IRC
[14:23:13] <mapreduce> RLa: Dunno.
[14:23:22] <mapreduce> ~google joda-time localdate java.util.date
[14:23:23] <javabot> http://letmegooglethatforyou.com/?q=joda-time+localdate+java.util.date
[14:23:26] *** ojacobson has joined ##java
[14:23:31] <ptoth> paulweb515 just quick simple questions, what is advantage of using Fest with JUNIT? I am new to testing so I would like to know it from someone who is using it
[14:23:33] <RLa> yeah, looks like it's not that easy
[14:23:44] <RLa> gotta rewrite lot of code to start using it
[14:23:50] <RLa> tho it should be worth it
[14:23:59] <RLa> since i have lot of date calculations
[14:24:13] *** gucko has joined ##java
[14:25:25] <mapreduce> .toDateTimeAtCurrentTime().toDate()
[14:26:52] <paulweb515> ptoth: just ask in general
[14:27:00] <paulweb515> ptoth: I don't use FEST, only JUnit
[14:27:28] <saby> hi, i have this "import org.webharvest.definition.ScraperConfiguration;"
[14:27:37] <saby> in a sample java app
[14:27:49] <saby> how do i get this and use it ?
[14:28:05] <dreamreal> by learning java
[14:28:12] *** gtrak has joined ##java
[14:29:04] <ptoth> paulweb515 for testing swing? I heard that you can test swing with JUnit
[14:29:22] <saby> dreamreal thats what i am doing :P
[14:29:32] *** [[thufir]] has quit IRC
[14:29:38] <dreamreal> are you really?
[14:29:48] *** [[thufir]] has joined ##java
[14:29:49] <dreamreal> That question should be answered pretty much second or third thing
[14:29:50] *** Dux has quit IRC
[14:29:54] <RLa> mapreduce, thanks
[14:31:07] <paulweb515> ptoth: for testing anything that needs testing
[14:31:27] *** O1athe has joined ##java
[14:31:37] <ojacobson> saby: Find out what library offers that class, download JARs (and any dependencies), add to -classpath for your compile and run steps
[14:31:48] *** rigved has quit IRC
[14:31:52] <ptoth> paulweb515 what is a point of using Fest then?
[14:31:53] <ojacobson> ~~ saby import
[14:31:53] <javabot> saby, import is http://download.oracle.com/javase/tutorial/java/package/usepkgs.html
[14:31:55] <ojacobson> ~~ saby classpath
[14:31:56] <javabot> saby, The classpath tells Java or the compiler in which jar files and folders to look for classes and resources. Use the -cp/-classpath run-time options to specify the classpath (does NOT work with -jar!). Also see http://is.gd/j4gM [sun.com] for more info. If you're on windows see: http://is.gd/9qq26 [sun.com].
[14:32:29] <paulweb515> ptoth: you can use JUnit to test Swing, although certain scenarios are hard to set up and there's probably a lot of code involved
[14:32:38] <paulweb515> ptoth: I don't know, what's the point of using Fest then?
[14:32:41] <mapreduce> ptoth: Fest gives you relatively easy ways of non-interactively driving Swing GUIs.
[14:33:13] *** Johannes13 has joined ##java
[14:33:18] <paulweb515> ptoth: that would be my guess, they've done a lot of the boiler plate,messy setup so you can get to specifying your Swing tests
[14:33:27] <mapreduce> What you then do with it is none of Fest's business. Use JUnit if it makes sense for what you want to do.
[14:33:31] <ptoth> mapreduce ok so I just need to make sure that I won't loose time to using fest it self
[14:33:47] <mapreduce> ptoth: How long have you been programming in Java?
[14:33:51] *** gigasoft has joined ##java
[14:34:06] *** Sambler has joined ##java
[14:34:07] <ptoth> sort two years but I had more then year long break
[14:36:25] <dreamreal> haha
[14:36:28] <dreamreal> still on FEST?
[14:36:32] <dreamreal> Is this day three or four?
[14:36:33] *** madrax has joined ##java
[14:36:36] *** chomping has quit IRC
[14:37:36] <ptoth> mapreduce is there any general rule about if use JUNIT with fest or not. Ihmo because I will work on different project I think I should use JUnit
[14:37:53] <ptoth> dreamreal *hug*
[14:37:59] <dreamreal> you shouldn't use junit either, you should use testng
[14:38:12] *** drosophila has joined ##java
[14:38:24] <mapreduce> ptoth: If you're writing automated tests, use a fucking test framework.
[14:38:35] <dreamreal> and use a camera.
[14:38:47] <tjsnell> dreamreal: does cbeust pay you a kick back too!?
[14:38:48] <mapreduce> JUnit is a test framework.
[14:39:09] <dreamreal> tjsnell: no, junit is just so much a piece of crap that it offends me when people don't look down on it like they should
[14:39:16] <tjsnell> heh
[14:39:16] <mapreduce> I pay cbeust to disparage at least one non-Scala project a week on his blog.
[14:39:22] *** [[thufir]] has quit IRC
[14:39:26] *** dasilvj has quit IRC
[14:39:29] <tjsnell> I'm kidding :)
[14:39:31] *** [[thufir]] has joined ##java
[14:39:33] <mapreduce> I think yesterday's was clojure.
[14:39:40] <tjsnell> I'm converting a project to testng right now
[14:39:46] <dreamreal> tjsnell: I'm not. incidentally, still working on that damned osgi thing
[14:39:55] <tjsnell> one module just hit 92% coverage
[14:40:00] <dreamreal> but I've other priorities.
[14:40:09] <mapreduce> Heh, his blog's really broken.. http://www.jroller.com/cbeust/
[14:40:11] *** sbyrne has quit IRC
[14:40:13] *** [[thufir]] has quit IRC
[14:40:18] <mapreduce> $macros.showWeblogCategoryChooser()
[14:40:27] *** [[thufir]] has joined ##java
[14:40:45] <tjsnell> that's not his blog
[14:40:52] <tjsnell> http://beust.com/weblog/
[14:41:06] *** thpar has quit IRC
[14:41:17] *** gigasoft has quit IRC
[14:41:25] <mapreduce> ah
[14:41:36] *** plarsen has joined ##java
[14:41:49] *** neshaug has quit IRC
[14:42:02] *** neshaug has joined ##java
[14:42:05] *** LouisJB has joined ##java
[14:42:35] *** dasilvj has joined ##java
[14:42:45] *** gigasoft has joined ##java
[14:45:05] <ptoth> dreamreal why should I use testng?
[14:45:18] <dreamreal> ptoth: because it's automated testing, done properly.
[14:45:34] <ptoth> and JUnit is not?
[14:45:42] <dreamreal> JUnit actually uses a lot of the concepts from testng now, because they realized how idiotic their way was. So they naturally went about 20% of the way to doing it properly.
[14:46:10] <mapreduce> Don't worry, Kent will refactor it later.
[14:46:13] *** frangiz has quit IRC
[14:46:14] <dreamreal> ptoth: I don't think I need to answer that, honestly
[14:46:21] *** frangiz has joined ##java
[14:46:31] *** thpar has joined ##java
[14:46:33] <dreamreal> "So you prefer solution A to solution B. Are you suggesting that solution B might not be as good as solution A?"
[14:47:37] *** ptoth has quit IRC
[14:47:43] <mapreduce> Punchbowl B had a turd in it. We have removed it now.
[14:47:58] <dreamreal> hahaha
[14:48:16] <dreamreal> except not quite all of it, a couple of tiny bits are still there. But they're harder to see if you're looking elsewhere!
[14:48:35] *** epalm has joined ##java
[14:48:52] <mapreduce> Damn it, how do you cross-compile JNI stuff?
[14:48:53] *** fist has joined ##java
[14:49:36] <fist> hey, why is this program okay? i got the same parameter type (void) for deepClone .. but different return types: http://pastebin.com/zWCpQXtZ
[14:49:40] <FauxFaux> The same way you cross compile other stuff?
[14:51:06] <mapreduce> ~~ fist covariant return types
[14:51:06] <javabot> fist, what does that even *mean*?
[14:51:13] <mapreduce> How would he know?
[14:51:49] *** tonique has quit IRC
[14:51:51] <FauxFaux> fist: As of modern Java, overloading methods can return subclasses.
[14:51:52] *** jaska^ has quit IRC
[14:52:14] <cheeser> by modern, he means as of 5 years ago or so
[14:52:26] <fist> ah
[14:52:31] <mapreduce> I can't find a readable reference to covariant return types.
[14:52:47] <FauxFaux> I couldn't remember if it was Five or Six.
[14:52:51] *** jaska^ has joined ##java
[14:53:00] <mapreduce> It was Seven of Nine.
[14:53:07] <fist> thank you very much
[14:54:00] *** Cogito has quit IRC
[14:54:21] *** fist has quit IRC
[14:54:55] *** glcrazy has joined ##java
[15:01:33] *** fist has joined ##java
[15:01:51] <fist> hey, its me again .. so in java Integer is not a subclass or Long .. isn it?
[15:02:13] <fist> because http://pastebin.com/tjBteqaL does also not work .. line 33
[15:02:14] <dreamreal> fist: hmm, I wonder if there's a way to test.
[15:02:15] <cheeser> ~javadoc Integer
[15:02:15] <javabot> cheeser: http://is.gd/ji5nq [JDK: java.lang.Integer]
[15:02:23] <cheeser> just read the docs and see
[15:02:51] *** topriddy has joined ##java
[15:02:54] <topriddy> anyone tried injecting a Dao into a web service(Jersey) class using guice container into a Wicket page? My daos arent injecting into the web service classes but injecting into web pages
[15:03:34] <fist> cheeser: thank you
[15:03:37] <fist> now i got it
[15:03:39] <cheeser> please don't crosspost, topriddy
[15:04:17] * topriddy shrugs okay
[15:04:23] <fist> had a gap between my unterstanding of int and long and the implementation in java
[15:04:41] <ojacobson> fist: int, Integer, long, and Long are four different things
[15:04:52] <Metallon> cheeser: crosspost?
[15:05:01] <topriddy> fist: think in terms of storage, number of bytes used.
[15:05:06] <cheeser> int and long are primitives. you *can* cast from one to the other with those although you'll get truncation from long->int
[15:05:11] <cheeser> Metallon: postingin multiple channels
[15:05:13] *** adamisme has joined ##java
[15:05:17] <Metallon> aaah
[15:06:31] *** saml has joined ##java
[15:07:36] <Metallon> Okay so on an unrelated note, I've been trying to figure out how to display a picture in a window. I have a window with three tabs (each tab is a JPanel) and I need a picture in on of them. I've been tearing through the Java API doc and read multiple tutorials. It... is not quite working.
[15:08:10] <dreamreal> Metallon: what format are the images in?
[15:08:21] <Metallon> dreamreal: .jpg
[15:08:52] <dreamreal> so the problem centers on.. what? getting the image in the panel, or switching between the tabs, or what?
[15:08:54] *** Sambler has quit IRC
[15:09:26] <Metallon> getting the image in the panel.
[15:09:28] <Metallon> Or even displaying it
[15:09:39] <Metallon> example: http://pastebin.com/BFTLLLp8
[15:09:49] <dreamreal> so let's focus on that. How are you loading the image?
[15:10:00] *** tombee has joined ##java
[15:11:04] *** jesmon has joined ##java
[15:12:10] *** ztj has quit IRC
[15:12:41] <GFXDude> Is "this" final?
[15:12:43] *** ztj has joined ##java
[15:12:49] <dreamreal> heh
[15:13:41] <Metallon> GFXDude: no
[15:13:59] *** caverdude has quit IRC
[15:14:10] <GFXDude> ./list/AList_v2.java:86: cannot assign a value to final variable this
[15:14:10] <GFXDude> this = reducedList;
[15:14:33] <dreamreal> hahaha
[15:14:37] <RLa> in eclipse it shows up as static final field
[15:14:53] <dreamreal> GFXDude: that IS funny, though
[15:15:06] <GFXDude> i don't even know if I can do that lol
[15:15:11] <dreamreal> You should be congratulated. (Next: Man Bites Off Own Neck!)
[15:15:33] <RLa> i have seen checks this != null in code
[15:15:48] <dreamreal> written by people with any competence?
[15:16:09] <RLa> sample code by programming teacher
[15:16:17] *** frangiz has quit IRC
[15:16:35] <gtrak> how do you get access to the keystore tomcat uses? I want to perform certificate validation manually.
[15:16:37] *** Gracenotes has quit IRC
[15:16:41] <Metallon> okay so, where in the API doc do I look for simply loading an image?
[15:17:36] *** frangiz has joined ##java
[15:18:29] <GFXDude> well what i'm doing is: if my array is much bigger than the amount of values that get entered into it, I create a new array of 3/4 size, copy the same values into it, and I want to make whatever calls it use this new array
[15:19:18] <RLa> use ArrayList instead if you need to change size
[15:19:26] <GFXDude> Yeah but that's not the assignment
[15:19:31] <RLa> oh
[15:19:36] <GFXDude> My professor is a dick
[15:19:40] <ojacobson> ~why no homework
[15:19:40] <javabot> We understand you aren't asking us to do your homework. That's not why we don't answer. We don't because 1) You usually don't comprehend the answer and we get stuck in an endless loop of 'why', 2) You will understand, but you'll retort with "my professor doesn't want me to do it this way'. That's frustrating. 3) Homework questions are boring questions. We don't get paid. Your prof does.
[15:20:00] <ojacobson> You've been at this for three? days straight. You have become boring.
[15:20:00] <GFXDude> and makes everything retartedly unnecessary
[15:20:29] <GFXDude> ojacobson, they build on themselves
[15:20:35] <RLa> you cannot modify size of existing array, instead of array, give them some intermediate object that has reference to array
[15:20:40] <gtrak> can you assign to this?
[15:20:44] <gtrak> I know you can in C++
[15:20:44] <GFXDude> My professor doesn't teach it, the api doesn't explain it.
[15:20:57] <GFXDude> because we're implementing shit my professor concocted
[15:21:10] <ojacobson> See point three.
[15:21:26] <GFXDude> lulz
[15:21:48] *** topriddy has quit IRC
[15:24:23] *** RLa has quit IRC
[15:24:25] *** DerHorst has joined ##java
[15:24:27] <cheeser> sometimes doing things the hard/stupid way is the point of the homework. less bitching. more coding.
[15:24:41] <paulweb515> LMAO
[15:25:36] *** rgr has joined ##java
[15:25:43] *** jdolan has joined ##java
[15:26:22] *** pen has quit IRC
[15:27:00] *** tombee has quit IRC
[15:27:25] *** eyesUnclouded has joined ##java
[15:27:31] *** al80 has joined ##java
[15:28:11] *** tombee has joined ##java
[15:29:50] *** djbpython has joined ##java
[15:30:23] *** FireSlash has joined ##java
[15:30:43] <al80> I need to send a message to a remote JMS destination. How can I get a reference of the destination object?
[15:32:00] *** luneff has joined ##java
[15:32:00] *** Tempoe has quit IRC
[15:32:17] <tjsnell> depends on your broker a bit and how it's setup
[15:32:30] <Metallon> so no one can point me in the right direction? Loading an image in Java?
[15:32:57] <ojacobson> Metallon: ImageIcon + JLabel = you're done
[15:34:06] <Metallon> ojacobson: I'll try that, thanks!
[15:34:25] *** luneff has quit IRC
[15:34:42] <drosophila> ImageIO
[15:35:15] *** luneff has joined ##java
[15:36:32] *** harry_ has joined ##java
[15:38:08] *** harry_ has quit IRC
[15:41:40] *** CallToPower is now known as CallToPower|away
[15:43:41] *** matsebc has quit IRC
[15:43:45] <DroidAgent> Is there any point in using a Builder if you have lots of required values that can't work with defaults?
[15:43:58] *** Peste_Bubonica has joined ##java
[15:44:06] <dreamreal> *shrug*
[15:44:07] *** gremmachook has joined ##java
[15:44:46] *** karstensrage has joined ##java
[15:45:17] <DroidAgent> That's it... *shrug*? :P
[15:45:23] <dreamreal> Sure, it's up to you
[15:45:38] <dreamreal> I can see where the builder wouldn't add much to a system that didn't have reasonable defaults
[15:45:48] *** eyesUnclouded has quit IRC
[15:45:50] <DroidAgent> The danger I see is forgetting to set a value, where stuff will break.
[15:45:52] *** bearded_oneder has joined ##java
[15:46:15] <whaley> DroidAgent: it's about the only way you can create an immutable object without having a clusterfuck of constructors for object with a sizeable number of fields
[15:46:24] <whaley> *objects
[15:46:49] <dreamreal> DroidAgent: the constructor or execution method can check that
[15:46:57] <DroidAgent> Right now I'm using a model that relies on inheritance, which is somewhat annoying with variables since I can't override superclass variables and refer to them from the subclass.
[15:46:59] <dreamreal> "is my state suitable for use? no? Throw an exception."
[15:47:21] <DroidAgent> But my current model has the advantage of getting checked by the compiler.
[15:47:29] *** frangiz has quit IRC
[15:48:09] *** matsebc has joined ##java
[15:48:50] <DroidAgent> In my case, another layer of inheritance might reduce boilerplate *eek*
[15:48:50] *** frangiz has joined ##java
[15:51:17] *** saby has quit IRC
[15:51:53] *** terranova has quit IRC
[15:54:03] *** savage- has joined ##java
[15:54:07] <savage-> Anyone from Poland? :)
[15:54:58] <mapreduce> savage-: Are you?
[15:55:03] <dreamreal> someone surely is. Dunno if they're on channel, though.
[15:55:18] <savage-> mapreduce: Nope, I just need to find someone who is.
[15:55:23] <dreamreal> why?
[15:56:06] *** jesmon has quit IRC
[15:57:55] *** Matuku has joined ##java
[15:59:03] <cheeser> "daddy horny, michael."
[15:59:05] *** savage- has left ##java
[15:59:21] <whaley> that was. odd.
[16:00:19] *** gnu_d has left ##java
[16:00:29] *** freeone3000 has joined ##java
[16:00:31] *** monty_hall has joined ##java
[16:00:40] <drosophila> ?
[16:00:49] *** eidolon has joined ##java
[16:01:16] *** mindCrime has joined ##java
[16:01:30] *** makkalot has joined ##java
[16:02:04] <makkalot> hi,can someone tell me how can i change the bin adress in mvn tomcat:run ?
[16:02:45] *** gcristian has joined ##java
[16:02:59] <makkalot> *bind
[16:04:13] <freeone3000> Have a plugins section with tomcat plugin configuration where you specify the bind address.
[16:04:20] <freeone3000> Should bind to 0.0.0.0 by default, though.
[16:04:46] *** jesmon has joined ##java
[16:05:02] *** l3dx has joined ##java
[16:05:47] *** gremmachook is now known as gremmachook|away
[16:06:05] <l3dx> I need advice for how to create a WS client. Is everything I need availible from the JDK, or do I need a 3rd party framework?
[16:06:20] <al80> Do I need to configure a cluster to access a remote JMS destination in Glassfish?
[16:06:21] <makkalot> freeone3000: i want to change that bind adress , is it possible ?
[16:06:32] <freeone3000> makkalot: Yes, just takes some pom editing. See above.
[16:06:41] *** pen has joined ##java
[16:08:24] *** Metallon has left ##java
[16:10:06] <drosophila> heh everytime I see the word 'pom' I read 'porn' ...
[16:10:30] <whaley> you coul argue that a pom is xml porn
[16:12:30] *** pen has quit IRC
[16:13:41] <aLeSD> is there a functon that gives me the time in milliseconds in float ?
[16:13:52] *** Nibato has joined ##java
[16:14:02] <freeone3000> Float doesn't have that sort of precision.
[16:14:09] *** bitterman has joined ##java
[16:14:33] <freeone3000> So no, but there's one to give it to you as a long, and you can cast (and lose the precision).
[16:14:43] <mapreduce> 16777216F + 1 == 16777216F
[16:14:46] <freeone3000> l3dx: No. However, lots of third-party libraries are freely available.
[16:14:54] *** r0bby has quit IRC
[16:15:07] *** benoitdo has joined ##java
[16:15:08] <mapreduce> drosophila: That's one reason fixed-width fonts are great.
[16:15:21] *** Myth17 has joined ##java
[16:15:45] <drosophila> yea
[16:15:58] *** tommytastic_ has joined ##java
[16:16:19] <drosophila> aLeSD: System.nanoTime()*(1e-6f)
[16:16:29] <gtrak> I have a pom addiction
[16:16:37] <aLeSD> I will try
[16:16:38] <l3dx> freeone3000: from what I've found out (since asking) is that wsimport is part of java SE
[16:16:38] <dmlloyd> nanoTime() is only usable for calculating durations
[16:16:41] *** luneff has quit IRC
[16:16:45] <dmlloyd> it might return a negative number, for example
[16:16:46] <freeone3000> l3dx: Really? Okay.
[16:16:47] <drosophila> yea
[16:17:08] <l3dx> freeone3000: yup :) from what I can see, this is all I need in order to consume a ws
[16:17:16] <l3dx> http://download.oracle.com/javase/6/docs/technotes/tools/share/wsimport.html
[16:18:35] *** frangiz has quit IRC
[16:18:56] <tommytastic_> If I am using Spring's RestTemplate with JaxB Marshaller, the Rest Service that I am consuming returns either an <usefulobject/> or an <exception/>. How would I go about configuring Spring so that getForObject() will marshall and return the correct bean type?
[16:19:00] *** Alkhi has joined ##java
[16:19:06] *** frangiz has joined ##java
[16:19:51] *** thpar has quit IRC
[16:20:03] <tommytastic_> do I need to write a customConverter?
[16:20:16] <drosophila> aLeSD: what do you want to do with time>
[16:20:18] <drosophila> ?
[16:22:37] *** chomping has joined ##java
[16:22:50] *** matsebc has quit IRC
[16:22:51] *** bojo has joined ##java
[16:23:07] <aLeSD> drosophila: take the time I am drawing a point ... nanoTime works . Thanks
[16:23:25] *** warali has joined ##java
[16:23:41] <drosophila> aLeSD: and what do you do with that time?
[16:24:04] <aLeSD> abscissa
[16:24:09] <aLeSD> in a graph
[16:24:31] <drosophila> heh..
[16:25:34] *** gremmachook|away is now known as gremmachook
[16:25:38] *** arborist has joined ##java
[16:26:07] *** pen has joined ##java
[16:27:15] <warali> anybody here want to help me out with a project and make some extra money? i am porting something to basic and I am having some difficulties translating from java
[16:27:19] *** cbeust_ has joined ##java
[16:28:04] <whaley> warali: $115/hr and I'll help
[16:28:15] <cheeser> porting *to* basic? 1. wth is wrong with you? 2. try ##basic
[16:28:18] *** benoitdo has quit IRC
[16:28:28] *** passwordoff has quit IRC
[16:28:59] *** robpblake has joined ##java
[16:29:04] <robpblake> Hi
[16:29:13] <warali> I know basic, on the other hand i don't know java :)
[16:29:19] <robpblake> Can anyone offer some help debugging JVM crashes on Ubuntu 10.04?
[16:29:39] *** nitish has joined ##java
[16:29:42] <gtrak> write a jvm in basic
[16:30:18] <warali> because that won't take as much time as porting my project to basic
[16:30:48] <gtrak> inevitably, you'll have to port all the java libraries your project uses
[16:30:54] <gtrak> sounds painful
[16:30:56] <fr0ggler> to... BASIC? do you have some unbridled access to VIC-20s?
[16:31:15] *** supercosmonaut has quit IRC
[16:32:01] <gtrak> if your only motivation is you already know basic, I say learn java
[16:33:05] *** Myth17 has quit IRC
[16:33:18] *** paissad has quit IRC
[16:33:25] <cheeser> there are 0 jobs (worth having) that use basic.
[16:33:53] <tommytastic_> :w
[16:34:28] <whaley> ~~ tommytastic_ ls
[16:34:28] <javabot> tommytastic_, wrong window pal!
[16:34:37] <whaley> ~vim++
[16:34:38] <javabot> vim has a karma level of 13, whaley
[16:34:38] <warali> okay that really isn't the point, I just don't know java and I need someone to tell me in plain english what it is doing so I can recreate it in a different project...
[16:34:44] <mapreduce> I'd disagree. You could be part of the team at MS who write the VB compiler or Visual Studio integration for VB.
[16:34:45] <mapreduce> :)
[16:34:53] <mapreduce> Other than that, yeah, it's for idiots.
[16:35:08] <mapreduce> (but not by idiots, which is its main distinction from Java)
[16:35:12] <mapreduce> just kiddin'
[16:35:20] *** paissad has joined ##java
[16:35:29] <tommytastic_> sorry :)
[16:36:16] <gtrak> warali, I think this is beyond the scope of what you can do, even if we tried to spoon-feed. Even if you knew both very well, I'd say it'd be terribly hard to get a java program ported to whatever basic platform you're talking about
[16:36:34] *** pen has quit IRC
[16:36:39] *** jesmon has quit IRC
[16:36:48] <gtrak> java as a platform is huge
[16:36:54] *** pen has joined ##java
[16:37:33] <gtrak> maybe a better question for you to ask is how to do what you're trying to do?
[16:37:43] <warali> gtrak: well you haven't even looked at the project, it's doing some simple string manipulation and I just can't figure out how to format whatever data it's being fed and recrate the output
[16:38:27] *** EvilPenguin has joined ##java
[16:38:31] <gtrak> ah, you can always look at the source code for all the string methods
[16:38:31] <monty_hall> I have to assume 0 karma is neutral, -karma is bad. But on what scale. Karma on on a scale of 10? Karma +1, is that negligible?
[16:38:47] *** barq has joined ##java
[16:38:48] *** shiranpuri has quit IRC
[16:39:05] <whaley> monty_hall: it's meaningless and stupid, but we do it anyway
[16:39:16] <gtrak> ~eclipse--
[16:39:17] <javabot> eclipse has a karma level of -379, gtrak
[16:40:01] <warali> All I need is maybe a half hour of time for someone to read through the code and explain what it does to me, which I can pay for because its work related and I am getting paid for it anyhow
[16:40:15] *** VJTachyon has quit IRC
[16:40:38] <gtrak> I recommend reading the source code and seeing how far you get, then asking specific questions
[16:40:41] *** Olathe has quit IRC
[16:41:05] *** pen has quit IRC
[16:41:18] *** lunatik210 has joined ##java
[16:41:23] *** VJTachyon has joined ##java
[16:43:14] <gtrak> it sounds that would take less time than explaining to a person what you actually want to do
[16:43:53] <warali> what is "getTarget"?
[16:44:14] *** la00 has joined ##java
[16:44:16] <gtrak> the name of some method in a class
[16:44:29] <cheeser> oh, dear lord.
[16:44:36] <cheeser> please learn java.
[16:44:52] <la00> strLineSplit = strLine.split(";",-1); <- I'm doing this to split a CSV file
[16:45:02] <warali> I don't want to :(
[16:45:10] <cheeser> la00: use supercsv
[16:45:27] <cheeser> warali: we're not about to sit through you fumbling through java code here if you're not going to bother to learn.
[16:45:37] <warali> I got like 3 hours to finish this
[16:45:45] *** adamisme has quit IRC
[16:45:49] *** supercosmonaut has joined ##java
[16:45:52] *** tuxybuzz has joined ##java
[16:45:59] <la00> but got a nullpointerException....
[16:46:02] <cheeser> best of luck with that then
[16:46:14] *** DerHorst has quit IRC
[16:46:19] <tuxybuzz> hey people anyone got experience with the Xuggler API's?
[16:46:24] <Candle> ~~ la00 npe
[16:46:24] <javabot> la00, NullPointerExceptions are easy to spot and deal with. For some tips on dealing with them, please see http://is.gd/ha7A and http://is.gd/n3kP
[16:46:25] <cheeser> ~anyone
[16:46:25] <javabot> Chances are someone has, so why not just ask your question and save some time? If someone knows and wants/has time to help, perhaps he/she will.
[16:46:32] <warali> Where in this channel can I find a java programmer for hire, that can help me out now?
[16:46:39] <Candle> la00: But, yes, use SuperCSV
[16:46:50] <whaley> warali: you only have three hours to finish? what is this... homework?
[16:46:51] *** Shambat has quit IRC
[16:47:01] <warali> no this is work work
[16:47:02] <la00> the split 1; does [1, ] or [1]
[16:47:03] <la00> ?
[16:47:06] <gtrak> how do we know we can help until we already waste an hour
[16:47:08] <gtrak> ?
[16:47:20] *** bitshuffler has joined ##java
[16:47:57] <warali> what?
[16:48:09] <tuxybuzz> may I get involved..whats going on?
[16:48:17] <whaley> la00: why not use the split method without specifying a limit?
[16:48:29] <whaley> what's the point of using -1 there?
[16:48:34] <gtrak> tuxybuzz, warali wants someone to save his ass
[16:48:43] <warali> I need someone to save my ass
[16:48:45] <mapreduce> warali: This is not the channel you are looking for.
[16:48:47] <la00> if second case how to get the first case?
[16:48:51] <cheeser> to port his java codeto basic in the next 3 hours.
[16:48:52] <tuxybuzz> haha..
[16:48:55] <cheeser> in short, he's SOL.
[16:49:04] <tuxybuzz> oh lol..BASIC
[16:49:12] <warali> oh no
[16:49:13] <whaley> la00: wait, what?
[16:49:16] <warali> it's Assembly
[16:49:17] <tuxybuzz> BASIC to Java might still be possible..
[16:49:20] <cbeust_> It might not even be possible to port Java to Basic
[16:49:21] <warali> I need it ported to assembly
[16:49:25] <whaley> ...
[16:49:30] <fr0ggler> tuxybuzz, of course it's possible.
[16:49:38] <tuxybuzz> i meant in 3 HOURS
[16:49:40] <tuxybuzz> 11
[16:49:44] <warali> No that's not the point, I just need someone to explain to me what is going on so I can understand the code
[16:49:55] <warali> and recreate it myself
[16:49:58] <tuxybuzz> i dont know BASIC..:D
[16:50:09] <warali> you don't have to know anything other then java to help me out
[16:50:11] <cheeser> warali: try rentacoder.com
[16:50:15] <cbeust_> What does this Java program do, warali ?
[16:50:18] <warali> i already posted on freelancer
[16:50:20] <cheeser> you're clearly not going to find help here.
[16:50:41] <tuxybuzz> ok give us some details
[16:50:44] <warali> cbeust_: string manipulatio
[16:50:48] <warali> ions
[16:51:14] <tuxybuzz> hmm..in java? what sort?
[16:51:46] <fr0ggler> warali, if you want help, pastebin the code
[16:51:52] <tuxybuzz> yup
[16:51:53] <fr0ggler> someone may then help you
[16:52:05] <gtrak> we could at least tell you what it does
[16:52:21] <cheeser> and please take it to pm.
[16:52:57] <mapreduce> Though if the language is Turing-complete, it may be impossible to tell you what it does.
[16:53:19] <mapreduce> In a finite time, at least.
[16:53:24] *** la00 has quit IRC
[16:53:25] <drosophila> ...
[16:53:38] <gtrak> ~pedantic
[16:53:38] <javabot> gtrak, what does that even *mean*?
[16:53:58] * mapreduce bows.
[16:53:59] *** balor has joined ##java
[16:54:02] <tuxybuzz> lol bots talk?
[16:54:12] <warali> wait
[16:54:15] <warali> turns out
[16:54:19] <warali> I was in the wrong channel
[16:54:19] <mapreduce> I'm being silly, sure, but it's a real problem. You don't know that you're going to understand the code.
[16:54:22] <fr0ggler> for those interested, if anyone wants to port java to basic, maybe start with java, not javascript.
[16:54:52] <gtrak> lol, wow
[16:54:53] <balor> If I run my application like "java -cp deps.jar -jar main.jar" then it should find the classes inside deps.jar right?
[16:55:00] <mapreduce> balor: Nope.
[16:55:03] <fr0ggler> balor, no
[16:55:07] <fr0ggler> ~classpath
[16:55:08] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes and resources. Use the -cp/-classpath run-time options to specify the classpath (does NOT work with -jar!). Also see http://is.gd/j4gM [sun.com] for more info. If you're on windows see: http://is.gd/9qq26 [sun.com].
[16:55:10] <balor> ah
[16:55:24] * mapreduce mutters something about the IBM JVM
[16:55:42] <tuxybuzz> noone use Netbeans?
[16:55:45] <tuxybuzz> lol
[16:56:14] *** pen has joined ##java
[16:56:19]
[16:56:21] *** eitch0000 has quit IRC
[16:56:39] <warali> so
[16:56:49] <warali> what is the difference between javascript and java?
[16:56:54] <gtrak> ~javascript
[16:56:55] <javabot> Java is to javascript as ham is to hamster. http://www.ericgiguere.com/articles/javascript-is-not-java.html See ##javascript
[16:56:56] <warali> one has script in the name
[16:57:04] <warali> wait, that was a retorical question
[16:57:11] <warali> I was going to answer it myself
[16:57:21] <freeone3000> milligan: You've got the charset set wrong somewhere. MySQL calls it a "collation".
[16:57:28] <tuxybuzz> yes
[16:57:33] <tuxybuzz> make sure its UNICODE
[16:57:35] <milligan> freeone3000, so the problem is the collation of the DB?
[16:57:42] <warali> Okay thanks for your help, I am 50% of the way there now!! :)
[16:57:53] <freeone3000> *Could* be the collation of the DB. Could be you're writing it as some other charset.
[16:58:09] <freeone3000> I believe MySQL's JDBC driver defaults to ISO-8859-1.
[16:58:11] *** Luc1fel has joined ##java
[16:58:15] <cbeust_> At least converting from Javascript to Basic makes a bit more sense that Java.
[16:58:21] <cbeust_> than*
[16:58:22] <milligan> freeone3000, the collation of the tables in the db are set to latin1_swedish_ci ..
[16:58:23] <freeone3000> cbeust_: Not especially.
[16:58:25] *** monty_hall has left ##java
[16:58:37] <tuxybuzz> ok Iam a noob..Charset is that UNICODE, ASCII etc.. right?
[16:58:42] <cbeust_> Well, he's probably trying to port some browser side code from Javascript to VB.net
[16:58:46] <freeone3000> tuxybuzz: That's a very short list.
[16:58:49] *** matsebc has joined ##java
[16:58:54] <tuxybuzz> yeah i mean
[16:58:54] <mapreduce> I want a JVM option to throw a HeyYouScrewedUpError when I try to take a lock when on the EDT.
[16:59:00] <tuxybuzz> i know theres a lot more
[16:59:04] <mapreduce> And a pony.
[16:59:14] <cheeser> omgponies!
[16:59:15] <wlfshmn> milligan: I wonder if swedish defines the collation of danish or norwegian characters
[16:59:17] <cbeust_> mapreduce: Android will let you know if you miss with the EDT
[16:59:17] <tuxybuzz> but just confirming if it was what i thought it was
[16:59:24] <cbeust_> s/miss/mess
[16:59:42] <freeone3000> milligan: And what're you writing as? And does it support those characters in the DB? And why aren't you using UTF-8?
[16:59:45] <mapreduce> cbeust_: How?
[16:59:58] <Candle> milligan: You also need to check that the communication between the client and mysql server is done in UTF-8 or similar.
[17:00:25] *** knxville has quit IRC
[17:00:29] <milligan> freeone3000, this is how I define the connection string, String url = "jdbc:mysql://"+ip+":3306/"+database+"?useUnicode=yes&characterEncoding=UTF-8
[17:00:52] *** bn` has joined ##java
[17:01:02] <freeone3000> Okay, so you're sending UTF-8 characters to a latin1 database. Do you see a problem here?
[17:01:03] *** cythrawll has joined ##java
[17:01:33] <freeone3000> Database collation should probably be changed to UTF-8 as well.
[17:01:37] <warali> It's so quiet in ##javascript
[17:02:06] <fr0ggler> warali, that's a bonus. they could be talking about javascript.
[17:02:19] <Candle> warali: Noone uses javascript.. :)
[17:02:28] <milligan> freeone3000, yeah.. changed collation to utf8_swedish_ci .. same problem.
[17:02:43] <warali> Candle, except everyone.
[17:02:45] <fr0ggler> Candle, apart from the internets, but noone uses that.
[17:02:54] *** barq has quit IRC
[17:02:54] *** tewecske has quit IRC
[17:02:59] <freeone3000> milligan: Reinsert the data. Same problem?
[17:03:11] <mitch0> ditch mysql
[17:03:19] <milligan> freeone3000, yep
[17:03:40] *** cpc26 has joined ##java
[17:04:10] *** bojo has quit IRC
[17:06:02] <tuxybuzz> ~classpath
[17:06:03] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes and resources. Use the -cp/-classpath run-time options to specify the classpath (does NOT work with -jar!). Also see http://is.gd/j4gM [sun.com] for more info. If you're on windows see: http://is.gd/9qq26 [sun.com].
[17:06:29] <tommytastic_> If I am using Spring's RestTemplate with JaxB Marshaller, the Rest Service that I am consuming returns either an <usefulobject/> or an <exception/>. How would I go about configuring Spring so that getForObject() will marshall and return the correct bean type?
[17:07:47] *** coalado1 has joined ##java
[17:08:52] <milligan> freeone3000, the text is stored in a blob .. that shouldn't affect the problem in any way?
[17:09:04] *** bojo has joined ##java
[17:09:09] *** coalado has quit IRC
[17:09:23] <freeone3000> BLOB is used for arbitrary data. It's unaffected by collation, because it isn't considered text.
[17:09:49] <freeone3000> You probably want "text".
[17:10:18] *** eyesUnclouded has joined ##java
[17:10:42] *** bearded_oneder has quit IRC
[17:10:45] <warali> Math.pow(2, parseInt(map[fieldId]));
[17:10:49] <warali> wrong window
[17:11:14] <milligan> freeone3000, that fixed it :)
[17:11:15] <fr0ggler> pow!
[17:11:29] *** magentar has joined ##java
[17:11:46] <al80> Do I need to configure a cluster to access a remote JMS destination in Glassfish?
[17:11:54] <al80> I need to send a message to a remote JMS destination. How can I get a reference of the destination object?
[17:12:45] *** asfdd has joined ##java
[17:12:48] *** Ch30ps has quit IRC
[17:13:08] <asfdd> how can i get how big a viewport is without the scrollbars?
[17:13:29] <asfdd> in swing
[17:13:36] *** bitshuffler_ has joined ##java
[17:14:13] <mapreduce> pane.getViewport().getSize()?
[17:14:46] *** pen has quit IRC
[17:15:00] <asfdd> that includes the scrollbars
[17:15:19] <asfdd> should be a method to just get the actual viewable area
[17:15:30] <asfdd> i guess i can get the scrollbars, then subtract that from getsize
[17:15:40] <asfdd> and the same for the border
[17:15:49] <asfdd> but seems like i should be able to just get the size
[17:15:58] <asfdd> somehow
[17:16:28] <fr0ggler> ~enter
[17:16:28] <javabot> fr0ggler, 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.
[17:16:38] *** zemanel has quit IRC
[17:16:51] <makkalot> can someone tell me how can i change the bind adress in mvn tomcat:run (still couldnt find)?
[17:16:58] *** bitshuffler has quit IRC
[17:17:39] <freeone3000> makkalot: http://mojo.codehaus.org/tomcat-maven-plugin/configuration.html
[17:18:21] <makkalot> freeone3000: a looked at it , there is nothing about it
[17:18:54] <ojacobson> makkalot: Then it's not supported. However, it looks like you can provide your own server.xml.
[17:19:02] <ojacobson> (Which would let you configure connectors however you want)
[17:19:20] <ojacobson> "I can't find the feature I want in the docs" usually means that feature doesn't exist
[17:19:21] <ojacobson> usually
[17:19:38] <makkalot> probably
[17:20:50] *** cpc26 has quit IRC
[17:21:08] *** cbeust_ has quit IRC
[17:24:01] *** genupulas has joined ##java
[17:24:25] *** bojo has quit IRC
[17:24:38] *** pen has joined ##java
[17:24:45] <genupulas> I have a problem with java console can any one help me please
[17:25:31] *** hyppias has quit IRC
[17:25:37] <FauxFaux> ~~ genupulas asktoask
[17:25:37] <javabot> genupulas, ask to ask is asking a useless question before your main question. For example, "Anyone use eclipse?". If I answer "Yes" and can't answer your followup question, we just wasted each others time. If I answer "No", I wasted your time and annoyed everyone else in the channel a little bit by adding pointless noise. So just ask the question you were going to ask as if someone already said yes.
[17:25:37] <genupulas> Please its emergency friends
[17:25:50] <FauxFaux> It's causing the dispatching of emergency friends?
[17:25:57] *** cschneid has quit IRC
[17:26:16] *** abhijain has joined ##java
[17:27:54] <genupulas> Ok . . . When i run a jsp application through the glassfish server . The java plug in for browser not working properly . . .may be it could be the reason , i don't no exactly
[17:28:02] *** shiranpuri has joined ##java
[17:28:37] <freeone3000> Why would the Java plugin have anything to do with JSP?
[17:28:57] *** cschneid has joined ##java
[17:29:03] *** rtdos has joined ##java
[17:29:08] <eidolon> ~not working
[17:29:08] <javabot> eidolon, what does that even *mean*?
[17:29:16] <ojacobson> ~doesn't work
[17:29:16] <javabot> ojacobson, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions)
[17:30:17] *** abhijain has quit IRC
[17:30:31] *** gelignite has joined ##java
[17:30:41] <genupulas> I had run my project through glassfish server . I need java plugin help while running that application . My project done by java .
[17:30:58] <ojacobson> genupulas: what does the java plugin have to do with server-side apps?
[17:31:03] <ojacobson> The java plugin is for *client* apps
[17:31:18] <ojacobson> (stuff that runs inside the browser, rather than on some web server somewhere)
[17:32:40] <genupulas> I'm doing irc from mobile . Problem at my system . I am unable to use paste bin .
[17:32:51] <ojacobson> Good luck with that.
[17:33:02] <genupulas> I don't no how i have to say . .
[17:33:13] <genupulas> About my problem
[17:33:27] <freeone3000> So you can access a nonstandard port with arbitrary data, but can't operate a web browser. Amazing technology, that.
[17:33:50] <ojacobson> ~easy to help
[17:33:50] <javabot> Make yourself easy to help and more people will help you. See "~testcase", "~doesn't work", and "~newbie ides" for suggestions.
[17:34:23] *** xianny has quit IRC
[17:34:33] *** Cymage has joined ##java
[17:34:36] <genupulas> Ok i am from india . Is there any indian here . So i can call him and i will explain about my problem . Please
[17:36:20] <FauxFaux> I keep reading the space-before-punctuation as "STOP", as in telegrams; it's very amusing.
[17:36:23] <genupulas> Ok
[17:36:24] *** Matuku has quit IRC
[17:36:38] *** genupulas has left ##java
[17:37:16] <ojacobson> IRC as a phone directory
[17:37:19] <ojacobson> that's a new one on me
[17:38:55] <FauxFaux> I guess he meant PM as apposed to actually 'phone, STOP.
[17:39:52] *** bitshuffler__ has joined ##java
[17:41:25] *** ech0s7 has quit IRC
[17:42:06] *** teralaser has quit IRC
[17:42:30] *** xianny has joined ##java
[17:42:54] *** bitshuffler_ has quit IRC
[17:45:05] *** Sivam has joined ##java
[17:45:18] <Sivam> Hi
[17:45:31] <cheeser> oracle, eh? what team?
[17:45:36] * cheeser <-- glassfish
[17:45:48] <Sivam> I have a very big class path. I need to search for a class in this classpath. Is there any tool ?
[17:45:53] *** pc_magas has joined ##java
[17:45:54] *** freeone3000 has quit IRC
[17:46:03] <cheeser> what do you know about the class?
[17:46:19] <pc_magas> Hello Guys How can I make An applicatrion that is able to be networked?
[17:46:24] <cheeser> and what are you trying to find out exactly? where it lives on the disk?
[17:46:32] <FauxFaux> Sivam: Use your IDE.
[17:46:34] <cheeser> ~~ pc_magas networking
[17:46:34] <javabot> pc_magas, networking is http://java.sun.com/tutorial/networking
[17:46:47] <Sivam> FauxFaux, I dont have any ide of now
[17:47:00] <FauxFaux> Fix the first problem first.
[17:47:09] * cheeser eyes FauxFaux
[17:47:34] <FauxFaux> I was just trying to emulate the typical "IDEA? Unf, unf, unf." mentality in here.
[17:47:52] <dreamreal> FauxFaux: meddle not in the affairs of oracle employees, for they are subtle and mostly really quick to anger
[17:47:57] *** terranova has joined ##java
[17:48:14] <FauxFaux> So long as they're on the closures team I don't care.
[17:49:12] <dmlloyd> I don't think there are any oracle employees on the closures team in this room
[17:49:20] *** magentar has quit IRC
[17:50:56] <cheeser> none that i know of.
[17:51:18] <Candle> ~~ Sivam javadoc Class.forName(*)
[17:51:19] <javabot> Sivam: http://is.gd/0LRdSc [JDK: java.lang.Class.forName(String)]; http://is.gd/1II8wC [JDK: java.lang.Class.forName(String,boolean,ClassLoader)]
[17:51:35] <cheeser> dreamreal: "love" the trolling, btw.
[17:52:04] <Sivam> see I am getting an exception for a class which is not found
[17:52:10] <Sivam> I have a very big classpath
[17:52:17] <cheeser> apparently not big enough
[17:52:18] <Sivam> I need to search through all the Jar files for that class
[17:52:26] <Sivam> I tried to use jarbrowser
[17:52:26] <cheeser> or you're mistyping the class name
[17:52:30] *** Kamaran has joined ##java
[17:52:51] <Sivam> But jarbrowser asks me to enter a particular path. It does not takes the CLASSPATH
[17:53:39] <fr0ggler> Sivam, have you googled for the class you're missing and found the package it's supposed to be in?
[17:53:42] *** RLa has joined ##java
[17:54:13] <fr0ggler> (if possible_
[17:54:48] <Sivam> fr0ggler: its specific to an application. so can't google
[17:54:57] <Candle> Sivam: unzip all the jars into one directory and look there!
[17:55:04] <cheeser> ewww
[17:55:17] <Sivam> cheeser: any idea ?
[17:55:37] <Candle> cheeser: I know it's not pretty. but it should work :p
[17:55:49] <cheeser> jar+grep+bash == find class
[17:56:08] *** bojo has joined ##java
[17:56:20] <ojacobson> grep == find class, really
[17:56:27] <ojacobson> the TOC for JARs is not compressed, so grep can see it
[17:56:38] <Sivam> jar -tvf jarfilename | grep classname ?????
[17:56:56] <Candle> ~ Sivam tias
[17:56:56] <javabot> Candle, what does that even *mean*?
[17:57:02] <Candle> ~~ Sivam tias
[17:57:02] <javabot> Sivam, Try it and see. You learn much more by experimentation than by asking without having even tried.
[17:57:03] <ojacobson> grep -l com/example/MyHardToFind.class your jar files here
[17:57:08] *** bitshuffler has joined ##java
[17:57:10] <RLa> or if you use eclipse, press ctrl+t and type in class name
[17:57:18] <ojacobson> ~~ rla 5 minute rule
[17:57:19] <javabot> The user rla is not on ##java
[17:57:24] <ojacobson> ... really
[17:57:32] <cheeser> case issues.
[17:57:46] <cheeser> i suppose i could fix that now since java.net has shit itself.
[17:58:14] <RLa> java.net?
[17:58:19] <cheeser> yes
[17:58:57] <ojacobson> java.net?
[17:59:15] <RLa> it doesn't work
[17:59:19] <cheeser> no shit
[18:00:03] *** sprobe has quit IRC
[18:00:20] *** bitshuffler__ has quit IRC
[18:00:21] <RLa> hm, they are migrating to kenay
[18:00:25] <RLa> kenai
[18:00:31] <cheeser> have been for months now
[18:00:39] *** nitish has quit IRC
[18:00:53] <RLa> how can it take so long
[18:01:06] *** pc_magas has quit IRC
[18:01:06] <dreamreal> RLa: incompetence.
[18:01:18] <cheeser> thousands of projects to move over: VCS, mailing lists, issue trackers.
[18:01:19] <RLa> kenai.com is down too
[18:01:22] <cheeser> dreamreal: stfu
[18:01:32] <cheeser> you have no idea what you're talkinga bout
[18:01:41] <dreamreal> cheeser: :)
[18:02:17] <tjsnell> since when has that been a requirement here?
[18:02:55] <RLa> the only incompetence is giving non-informative error page
[18:03:27] <cheeser> if you're even getting that, you're getting more than i have all morning.
[18:03:37] <dreamreal> that does sound like competence, I guess.
[18:03:45] *** cheeser sets mode: +b dreamreal!*@*
[18:03:48] <cheeser> enough of the trolling
[18:03:52] <cheeser> i'm not in the mood for it
[18:04:25] <RLa> nice, just got page loaded
[18:04:53] <RLa> it's bit slow tho
[18:05:26] <RLa> www.java.net works
[18:05:37] <RLa> without www it doesn't
[18:05:39] <fr0ggler> RLa, thanks for your running internet commentary. now all we need is Quantum_Ion for some screenshots.
[18:06:32] *** chomping has quit IRC
[18:06:59] <RLa> aww, lot of (most) links point to java.net which is not working
[18:07:01] *** chomping has joined ##java
[18:07:11] <cheeser> we get it RLa
[18:09:13] *** patson has joined ##java
[18:10:22] <mapreduce> Where can I find the actual bit of code that decides where a JComboBox's drop-down appears?
[18:12:39] *** cbeust_ has joined ##java
[18:12:40] *** wad has joined ##java
[18:12:42] *** tuxybuzz has quit IRC
[18:12:51] <ernimril> mapreduce: probably the comboboxui?
[18:13:44] *** teralaser has joined ##java
[18:14:12] <mapreduce> I'm in BasicComboBoxUI now, looking at getBaseline.
[18:14:41] <mapreduce> I'd like to do the same thing; on multiple monitors my drop-downs don't always appear correctly.
[18:14:48] *** Cpudan80 has joined ##java
[18:14:57] <Cpudan80> Hello folks
[18:16:09] *** bitterman has quit IRC
[18:18:03] *** ExtraSpice has quit IRC
[18:18:15] *** cythrawll has quit IRC
[18:18:17] *** Engin has quit IRC
[18:18:26] *** fist has quit IRC
[18:18:32] *** ziggles has joined ##java
[18:18:40] *** ziggles has joined ##java
[18:20:03] *** jonkri has quit IRC
[18:20:29] *** Luc1fel has quit IRC
[18:20:42] *** cythrawll has joined ##java
[18:22:55] *** cheeser sets mode: -b dreamreal!*@*
[18:25:14] *** choongii has joined ##java
[18:25:18] *** balor has quit IRC
[18:25:39] *** fuzzygroove has joined ##java
[18:25:55] *** fuzzygroove has left ##java
[18:26:04] *** rretzbach has joined ##java
[18:28:40] *** alexandernst has quit IRC
[18:29:31] *** horte_ has joined ##java
[18:29:40] *** al80 has quit IRC
[18:30:09] *** ziggles has quit IRC
[18:30:58] *** dEVOted has joined ##java
[18:32:28] <dreamreal> a man had a dream, of two dogs, one named rufus and the other rufina...
[18:32:42] *** horte has quit IRC
[18:35:49] *** alexandernst has joined ##java
[18:36:02] *** dEVOted has quit IRC
[18:36:42] *** rgr has quit IRC
[18:37:14] *** coalado1 has quit IRC
[18:37:14] *** gremmachook has quit IRC
[18:37:15] *** Pozejdon has quit IRC
[18:37:51] <RLa> so what the dream was about?
[18:38:06] <ojacobson> two dogs fucking, apparently
[18:38:17] <cheeser> ~interesting
[18:38:18] <javabot> this is all very interesting (not really) but please take it somewhere else.
[18:38:18] * dreamreal grins to self
[18:38:27] *** dEVOted has joined ##java
[18:39:07] <whaley> way to screw the pooch, guys
[18:39:10] * whaley ducks
[18:40:35] *** fr0gprince_ has quit IRC
[18:42:01] *** Frogprince has joined ##java
[18:42:20] *** sebersole has joined ##java
[18:42:20] *** warali has quit IRC
[18:43:21] *** Core-Dump has joined ##java
[18:45:05] <milligan> I'm using JCalendar as my "date picker" .. but I also need a timesheet to schedule appointments etc .. any suggestions to freeware beans I can use, or do I have to make my own ?
[18:47:13] <Cpudan80> So I am wondering if any of you know how to use the Singleton JEE bean
[18:47:23] *** mdunham918_ has joined ##java
[18:47:23] <Cpudan80> How do I access the singleton from the bean?
[18:48:05] <mdunham918_> hey guys im wanting to build a custom desktop application for myself that will contain quiet a few heavy features such as you'd find in an IDE
[18:48:33] <mdunham918_> i want to use java since its cross platform but what languages is better Java Swing/JavaFX
[18:48:37] *** Sliker has joined ##java
[18:48:55] <mdunham918_> and is javafx really a strong application languages that can work fast
[18:48:59] <mdunham918_> i need good preformance
[18:49:01] *** homie has joined ##java
[18:49:07] <dreamreal> mdunham918_: javafx is no longer a language on its own
[18:49:09] <drosophila> netbeans platform
[18:49:16] <dreamreal> javafx is becoming a set of APIs in java
[18:49:20] <RLa> or eclipse platform
[18:49:36] <RLa> dreamreal, is it becoming more general purpose?
[18:49:48] <mdunham918_> i want to create my own ide with a better UI netbeans and eclipse rock netbeans more so than eclipse but its just an experiment really
[18:49:49] <RLa> or less?
[18:49:50] <dreamreal> RLa: I doubt it, it's pretty focused on UI issues IMO
[18:49:52] *** mah01 has quit IRC
[18:49:53] <mdunham918_> im wanting to get better with java
[18:49:54] <dreamreal> and that's good
[18:50:04] <mdunham918_> like what was netbeans built on
[18:50:07] <mdunham918_> anyone know
[18:50:12] <drosophila> netbeans platform
[18:50:37] <mdunham918_> i want to start from a blank canvas nothing prebuilt
[18:50:37] <RLa> mdunham918_, language support will be hardest thing to get right
[18:50:41] <cbeust_> RLa: Forget about JavaFX and NetBeans, learn Eclipse
[18:50:44] *** jplacerda has joined ##java
[18:50:53] <mdunham918_> im only supporting php/html/js/css
[18:50:57] <drosophila> why eclipse?
[18:51:04] <mdunham918_> but forget what im trying to build
[18:51:15] <RLa> mdunham918_, want advanced autocomplete?
[18:51:17] *** wolfman2000 has joined ##java
[18:51:20] <mdunham918_> yea
[18:51:34] <RLa> i could join on that
[18:51:36] <cbeust_> Because the Eclipse ecosystem is huge and built on a decent GUI API (SWT/JFace)
[18:51:44] *** matsebc has quit IRC
[18:51:51] <drosophila> Eclipse's gui looks bad
[18:51:53] <mdunham918_> but thats not the question im just trying to figure out how to start a project that will end up a decent sized application
[18:51:56] <mdunham918_> like netbeans
[18:52:12] *** brundlefly has joined ##java
[18:52:14] <cbeust_> mdunham918_: Eclipse RCP
[18:52:19] <mdunham918_> if you were going to build a java based "dreamweaver cs3" how would you start it
[18:52:36] <RLa> mdunham918_, i'm also interested in special-purpose minilanguages that are not dsls as bolt onto host language
[18:52:47] *** realtime_ has joined ##java
[18:52:48] <mapreduce> mdunham918_: With a gun aimed at my own head.
[18:52:51] <fr0ggler> mdunham918_, i'd consider my options, and probably not start it.
[18:52:55] <cbeust_> If I wanted to build a complex client app in Java, I would build in on the Eclipse RCP
[18:53:00] <mapreduce> That's a good starting point for such a project.
[18:53:01] *** sproingie has quit IRC
[18:53:07] <mdunham918_> wow dude shut the f up fr0ggler i hate ppl like u
[18:53:10] *** Sivam has quit IRC
[18:53:16] <drosophila> fr0ggler: lol
[18:53:22] <RLa> basic ui is really easy to get working on java
[18:53:26] <mapreduce> cbeust_: Why's that?
[18:53:36] <mdunham918_> but i've heard a lot of termoil lately on java
[18:53:39] <mdunham918_> swing/fx
[18:53:43] <RLa> mdunham918_, if you do from scratch you must first choose ui toolkit
[18:53:53] <mdunham918_> i have used swing a lot but i see a lot about fx
[18:53:54] *** bojo has quit IRC
[18:53:55] <fr0ggler> mdunham918_, just being realistic. if you want to *really* make a start, then look at one of the existing offerings as advised, and go from there.
[18:53:56] <RLa> so you want to use swing?
[18:54:21] <cbeust_> mapreduce: there is just too much useful stuff that comes in the RCP to ignore. Preferences, workspace management, window management, OSGi, etc... It's that much that you don't have to implement yourself
[18:54:27] <mdunham918_> you guys would know more than i would where is java heading from what i can tell its heading towards FX
[18:54:32] <RLa> mdunham918_, what about swt?
[18:54:37] <cbeust_> mdunham918_: Java FX is dead, ignore it
[18:54:41] <dreamreal> mdunham918_: javafx is a set of APIs for Java, in the future.
[18:54:41] <mdunham918_> really
[18:54:42] <mdunham918_> ok
[18:54:43] <fr0ggler> mdunham918_, and thanks for the offensive nature of your response. i was just being honest.
[18:54:49] <mdunham918_> thats what i was wondering thanks RLa
[18:54:53] <mdunham918_> i mean cbeust_
[18:54:57] <dreamreal> mdunham918_: you might as well say something like "java is heading towards the collections API"
[18:55:05] <mdunham918_> so to build a good desktop app
[18:55:12] <balou> i'm using junit4.7 because i want to run my tests in parallel. Using something like TestNG is unfortunately not an option. I have managed to run tests in parallel from the command line via maven, but haven't found a way to run my tests in parallel from eclipse. Does anyone know how?
[18:55:16] <mdunham918_> java/swing/swt
[18:55:27] <dreamreal> balou: why is testng not an option?
[18:55:43] <balou> crap team decisions that are not in my control
[18:55:44] <RLa> last time i used swt couple of years ago and it was less verbose then swing
[18:55:44] <dreamreal> mdunham918_: java is a constant there. Pick one of Swing or SWT.
[18:55:53] <dreamreal> JFX will end up being part of Swing.
[18:56:10] <cbeust_> balou: I would be able to help you if you were using TestNG. Good luck running your tests in parallel with JUnit, some of my friends who tried have been committed to a mental institute.
[18:56:18] <mdunham918_> thanks a lot dreamreal i'll start looking into the differences between swing and swt
[18:56:28] <dreamreal> aaaand junit sucks. JUnit is Eclipse to TestNG's IDEA.
[18:56:29] <balou> I'm working on getting people to accept TestNG because it is much better for what we want (imo), but have failed as of yet.
[18:56:29] <mdunham918_> are both suitable for large desktop apps
[18:56:30] <RLa> dreamreal, can you compare jfx and qml
[18:56:35] <dreamreal> RLa: no.
[18:56:59] <RLa> they look similar but i wonder if jfx is same feature-incomplete as qml
[18:57:09] <RLa> it even has no tables
[18:57:17] <dreamreal> RLa: I'm not familiar with QML at all, and I'm not THAT familiar with JFX
[18:57:22] <dreamreal> I am allergic to UI
[18:57:26] <mdunham918_> lol
[18:57:31] <cbeust_> RLa: Again, just ignore JavaFX. Take a look around and see who talks about JavaFX, you will see nobody except Oracle employees. It's a dead technology.
[18:57:56] <RLa> mdunham918_, your option could also be qt java bindings
[18:58:14] <mdunham918_> never heard of those
[18:58:15] <mdunham918_> hmm
[18:58:26] <RLa> mdunham918_, i currently have large qt project and the api is a lot more usable than both swing and swt
[18:58:27] <mdunham918_> i've only built a few small java apps and they were using swing
[18:58:40] <mdunham918_> i'll check it out thanks RLa
[18:58:41] *** LouisJB has quit IRC
[18:58:52] <mdunham918_> the reason i came in here and asked about jFX is because of this: http://amyfowlersblog.wordpress.com/2010/09/21/a-heartfelt-ramble-on-swing-javafx/
[18:59:06] <RLa> mdunham918_, and it has its own painting engine so you do not depend on win/x11 apis so much
[18:59:26] <mdunham918_> RLa: is it fast?
[18:59:26] <RLa> mdunham918_, it's killer feature is stylesheets, almost complete css3 support
[18:59:37] <mdunham918_> i always hear how java apps are sooo slow
[18:59:37] <RLa> mdunham918_, it's written in c++
[18:59:50] <mdunham918_> NO SHIT
[18:59:50] <mdunham918_> wow
[18:59:55] <mdunham918_> css eh
[19:00:18] <cbeust_> mdunham918_: Amy works on JavaFX and at Oracle. See any pattern?
[19:00:35] <RLa> css3, for example, you can do round corners with single border radius property
[19:00:35] <mdunham918_> aw i see
[19:00:38] <dreamreal> mdunham918_: java apps haven't been slow for a decade or so
[19:00:42] *** VJTachyon has quit IRC
[19:00:45] <mdunham918_> RLa: thats exactly what i need
[19:00:48] <RLa> Amy?
[19:00:50] <mdunham918_> im planning a very nice ui
[19:01:01] <dreamreal> amy fowler, yum
[19:01:04] <cbeust_> What she says in her blog post is half true, by the way. What she doesn't say is that the Swing team has been completely eviscerated by Sun to staff JavaFX, so there is a lot of internal turmoil there. It's a big mess.
[19:01:09] <mdunham918_> the whole reason for building my own simple IDE is to do a much nicer modern ui
[19:01:13] *** bojo_ has joined ##java
[19:01:16] <RLa> mdunham918_, so make a test projects with java and qt bindings
[19:01:39] <Sou|cutter> cbeust_: that's a damn shame
[19:02:04] <mdunham918_> thanks guys been a big help, not you fr0ggler
[19:02:10] <mdunham918_> :)
[19:02:28] <cbeust_> Amy is just singing the party line "everything is fine, Oracle is fully committed to Swing, JavaFX", etc... but it's all propaganda. I wouldn't be surprised to hear in a few months that she transferred to Adobe or something like that. I'm surprised she's still working there at all, to be honest.
[19:02:31] <dreamreal> classy.
[19:02:39] *** tuxwet has joined ##java
[19:02:57] *** Caleb-- has joined ##java
[19:03:03] *** tuxwet has left ##java
[19:03:15] <RLa> where is her cv?
[19:03:16] *** Echidna has joined ##java
[19:03:22] <Echidna> hi
[19:03:26] <dreamreal> RLa: amy fowler? She's been around sun/java for ever
[19:03:34] <Echidna> is there a way to get the absolute path to a file within a jar?
[19:03:45] <dreamreal> she's an old smalltalker, was on the original swing team, helped create JSF
[19:03:49] <Caleb--> btw, does Java's interperter only interpret the bytecode generated by the compiler? or is there an interpreter that also interprets java code directly?
[19:03:54] *** _W_ has quit IRC
[19:04:02] <paulweb515> Echidna: you mean a path from the root of the jar?
[19:04:06] <fr0ggler> mdunham918_, you're welcome.
[19:04:08] <dreamreal> Caleb--: the interpreter works on bytecode. For a little while.
[19:04:10] <cbeust_> Caleb--: Java stopped being an interpreter a long time ago. Look up JIT and Hotspot.
[19:04:11] *** mirkochip has joined ##java
[19:04:26] <mdunham918_> RLa: ywhen you say QT bindings you refer to quicktime right
[19:04:27] <Echidna> paulweb515: including the path to the jar
[19:04:29] <mdunham918_> qtjava
[19:04:44] <RLa> Caleb--, dreamreal, cbeust_, java scripting should actually have java as scripting language built in
[19:04:50] <dreamreal> RLa: shhh
[19:05:03] <paulweb515> Echidna: you can represent a file in a jar using a URL ... there's no such thing as an absolute path, though
[19:05:19] <mirkochip> Hi guys, my name is Mirko, i have a little configuration trouble between tomcat and glassfish, maybe somebody of you can help me ?
[19:05:26] *** Abhi347 has joined ##java
[19:05:32] <dreamreal> ~ask
[19:05:33] <javabot> The Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.
[19:05:50] <Echidna> paulweb515: loading an xslt sheet via JDOM, to be precies
[19:05:51] <Caleb--> cbeust_, dreamreal, we haven't covered that material yet. but i had a homework question that asked true/false about: 1) "The Java Interpreter checks code syntax" and 2) "The Java Interpreter reads files with the .class extension", i've answered false to both
[19:05:59] *** Sivam has joined ##java
[19:06:05] <dreamreal> Caleb--: is the test from 1998?
[19:06:05] <mdunham918_> RLa: I cannot find anything on java qt bindings any idea of a good search term for google?
[19:06:11] <dreamreal> mdunham918_: qtjava
[19:06:17] <Caleb--> dreamreal, no, it's the first h.w. assignment
[19:06:22] <RLa> mdunham918_, or qt-jambi
[19:06:37] <dreamreal> Caleb--: maybe the class is from 1998. Java interpreters haven't been significant for 13 years.
[19:06:43] <cbeust_> There is no thing as "The" Java interpreter, there are many, many interpreters, each with different implementatinos.
[19:06:52] <Caleb--> dreamreal, it would make sense for them to talk about "interpreters" because we've only covered Scheme in the last semester
[19:07:00] <RLa> Caleb--, dreamreal, cbeust_, see what languages ScriptEngineManager supports by default
[19:07:02] <dreamreal> Caleb--: do they talk about C interpreters, too?
[19:07:05] <mdunham918_> that was it thanks RLa, again
[19:07:08] <mdunham918_> i found this
[19:07:08] <mdunham918_> http://qtjambi.sourceforge.net/
[19:07:09] <paulweb515> Echidna: JDOM is what you are doing?
[19:07:19] <mdunham918_> searching qtjava returned abunch of junk links
[19:07:26] <cbeust_> As for the questions, they're pretty ambiguous and shouldn't be multiple choices, but I would say that 2) is mostly true
[19:07:37] <Caleb--> cbeust_, oh ?
[19:07:42] <Caleb--> sorry
[19:07:48] <Caleb--> i meant that i answered TRUE to the second
[19:07:57] <RLa> mdunham918_, check for licenses, qt comes as gpl, lgpl or commercial
[19:08:06] <cbeust_> Interestingly, Amy hasn't posted anything on her blog since that entry in September.
[19:08:15] <cbeust_> So much for "everything is fine, we'll keep you posted".
[19:08:26] <RLa> mdunham918_, some qt bindings use gpl
[19:08:46] <Caleb--> cbeust_, so let me be perfectly clear: the "interpreter" (jvm) cannot read Java code directly, and it only reads bytecode?
[19:08:46] *** Abhi347 is now known as Kool
[19:09:12] *** Engin has joined ##java
[19:09:33] <cbeust_> Caleb--: Right. THe interpreter never sees source code, but it does see bytecode coming from the .class file.
[19:09:41] <Caleb--> i see, thanks.
[19:10:13] <RLa> Caleb--, but there is no problem why source could not be directly interpreted
[19:10:46] <mdunham918_> hm
[19:10:53] <RLa> Caleb--, also, if you look at bytecode instructions you will see that java is trivial to compile into bytecode
[19:11:02] *** kermit has quit IRC
[19:11:15] <RLa> so it could be done on-the-fly as well
[19:11:16] <Caleb--> RLa, the issue here is not whether it's trivial or not. the issue is whether it's being done by the java interpreter or not :)
[19:11:42] <RLa> most language interpreters use some kind of intermediate code
[19:11:53] <cbeust_> There is really no such thing as a "Java interpreter", there is a "bytecode interpreter". And that interpreter can run code that initially came from Java, Scala or any other JVM language.
[19:12:15] <Caleb--> i see
[19:12:16] <mirkochip> which .*jars I need for call EJB on Glassfish from Tomcat client?
[19:12:36] *** kermit has joined ##java
[19:12:53] <mirkochip> gf-client.jar seems not enough
[19:13:10] <RLa> is it missing those javax. annotations?
[19:13:26] <cheeser> mirkochip: look up Application Client Container
[19:14:18] *** brundlefly has quit IRC
[19:14:22] *** lamdk has joined ##java
[19:14:40] <mirkochip> no, i have problem with the initial context lookup
[19:14:53] <mirkochip> thanks cheeser, i go to read it
[19:15:11] *** Ivellina has joined ##java
[19:15:52] <mirkochip> i am running glassfish and tomcat in the same host
[19:16:07] *** VJTachyon has joined ##java
[19:17:35] *** tewecske has joined ##java
[19:17:58] *** kercyr has quit IRC
[19:18:14] *** kercyr has joined ##java
[19:18:50] *** dEVOted has quit IRC
[19:20:15] *** jmgalloway has quit IRC
[19:20:38] *** queequeg1 has joined ##java
[19:22:40] *** ojacobson has quit IRC
[19:23:00] *** fisted has joined ##java
[19:23:43] *** gelignite has quit IRC
[19:24:18] *** pen has quit IRC
[19:26:37] *** zatan has joined ##java
[19:28:34] *** fr0ggler has quit IRC
[19:28:50] *** menace has joined ##java
[19:30:00] *** LouisJB has joined ##java
[19:30:18] *** chomping has quit IRC
[19:30:48] *** chomping has joined ##java
[19:31:18] *** zatan has quit IRC
[19:31:25] *** ojacobson has joined ##java
[19:32:24] *** Engin has quit IRC
[19:32:31] *** Bof_Off has joined ##java
[19:36:56] *** zemanel has joined ##java
[19:37:18] *** RLa has quit IRC
[19:37:31] *** teralaser has quit IRC
[19:37:32] *** zatan has joined ##java
[19:38:40] *** robpblake has quit IRC
[19:39:24] *** VJTachyon has quit IRC
[19:40:02] *** Bombstone has joined ##java
[19:41:08] *** mrhota has joined ##java
[19:41:51] *** Dux has joined ##java
[19:42:15] *** queequeg1 has quit IRC
[19:43:47] *** Core-Dump has quit IRC
[19:44:39] *** Bof_Off has quit IRC
[19:45:42] *** VJTachyon has joined ##java
[19:46:42] *** zemanel has quit IRC
[19:46:50] <Cpudan80> Ive setup a JEE Singleton using the @Singleton tag --- do I just make a new object every time I want to access it?
[19:47:04] <Cpudan80> Like normally you would do MySingleton.getInstance().method()
[19:47:21] <ojacobson> No, @Singleton stops *the container* from creating multiple instances (it's effectively pooled with size = 1)
[19:47:27] *** homie has quit IRC
[19:47:32] <ojacobson> You use normal dependency injection to get your references
[19:47:41] <Cpudan80> mmm
[19:47:52] <Cpudan80> I'm new to J2EE - do you have an example or anything off hand?
[19:48:19] *** homie has joined ##java
[19:48:45] <ojacobson> From callers' points of view it's identical to how you'd do it without @Singleton
[19:48:48] <ojacobson> Nothing changes there
[19:49:19] <Cpudan80> So I still neeed to add a getInstance method and such?
[19:49:23] <ojacobson> No.
[19:49:57] <ojacobson> The container still creates the one instance it will create the normal way (via the () constructor, normally)
[19:50:19] <ojacobson> If you want to manually create more instances, nothing's stopping you, but those won't be part of the EJB - they'll just be loose objects
[19:50:24] <ojacobson> (with no dependency injection, to boot)
[19:50:49] <ojacobson> To get the container's one managed instance you inject it into another managed component with @EJB (or other annotations as appropriate), just like you would with a non-@Singleton service
[19:51:00] <ojacobson> (Or look it up in JNDI yourself)
[19:51:38] *** espeed has joined ##java
[19:52:21] *** Metallon has joined ##java
[19:52:30] *** homie has quit IRC
[19:52:45] *** Will123456 has joined ##java
[19:53:16] *** gelignite has joined ##java
[19:53:18] *** homie has joined ##java
[19:54:38] *** jtrally has joined ##java
[19:56:12] *** fisted has quit IRC
[19:57:48] <kercyr> given two treemaps (of Strings keys and values, say), how do you generate a (optimal?) sequence of inserts,updates, and deletes to mutate one into the other?
[19:58:23] <realtime_> *** homework question detected
[19:58:32] <realtime_> :)
[19:58:39] <FauxFaux> Sounds like some set operations like intersect and etc.
[19:58:46] <dmlloyd> well they're treemaps, so they're sorted
[19:59:03] <dmlloyd> if they're sorted with the same criteria you can iterate them both simultaneously and do it all in O(n)
[19:59:09] <ojacobson> Sure sounds like an edit distance problem
[19:59:20] <FauxFaux> dmlloyd: Premature optimisation.
[19:59:31] <dmlloyd> what?
[19:59:34] <dmlloyd> it's the simplest solution
[19:59:37] <dmlloyd> premature my as
[19:59:38] <dmlloyd> s
[19:59:58] <dmlloyd> algorithmic optimality is not the same as premature optimization
[20:00:01] <dmlloyd> it is mature optimization
[20:00:09] <ojacobson> Gotta agree with dmlloyd here
[20:00:36] <Sou|cutter> I second that motion
[20:01:16] <FauxFaux> The chance of getting the iteration over two containers at the same time right (noting you'll have to use iterators without foreach (my god!)) compared to using the pre-written intersection etc. methods.
[20:01:33] <dmlloyd> really? it seems pretty simple to me
[20:02:01] *** fisted has joined ##java
[20:02:23] *** vitorlobo has joined ##java
[20:02:31] <Sou|cutter> FauxFaux: if you're worried about screwing it up, write a test first
[20:02:35] *** vitorlobo has left ##java
[20:02:35] * Sou|cutter shrugs
[20:02:47] <Echidna> paulweb515: oh sorry, i didnt scroll down. using JDOM to load an xslt sheet which is within a jar
[20:03:33] <Sou|cutter> seems straightforward to me too, fwiw
[20:03:56] <kercyr> so... the actual problem is that I have an AbstractTableModel that is backed by a List<T> (for some T). Sometimes I need to change some things in the List<T>. I'd like to issue the delete/update/insert fire events somewhat optimally.
[20:04:18] *** mrhota has quit IRC
[20:04:46] *** frangiz has quit IRC
[20:04:54] <kercyr> The naive thing (fireTableDataChanged()) makes the JTable lose its selection state.
[20:05:33] *** frangiz has joined ##java
[20:05:55] <kercyr> realtime, I used to be a teacher... like to ask good questions.
[20:06:37] *** mirkochip has quit IRC
[20:07:22] *** mhahe has joined ##java
[20:08:30] <paulweb515> Echidna: can JDOM take an InputStream for the style sheet? that's easy to get with class.getResourceAsStream(*)
[20:09:48] <Echidna> paissad: yes
[20:09:53] *** bduncan has joined ##java
[20:10:00] <Echidna> err paulweb515
[20:10:10] <paissad> :)
[20:10:15] <Echidna> sorry
[20:10:25] *** Scorchin has joined ##java
[20:11:20] <Echidna> paulweb515: what exactly do i give as a parameter? jar:file:/..../file.jar!/sheet.xsl?
[20:12:49] <ojacobson> getResource(*) returns a URL rather than a stream
[20:12:52] <ojacobson> use that
[20:13:17] <Echidna> it returns null in my case
[20:14:26] <ojacobson> Then either you're passing the wrong path (missing leading slash, probably) or your resource is not anywhere in your classloader heirarchy
[20:14:33] <paulweb515> Echidna: if you package your xslt file as a java resource, then you're just using getResourceAsStream("/sheet.xml") (if it was in the root of your jar and that's on the classpath)
[20:14:52] <paulweb515> if ... JDOM will take an InputStream
[20:15:37] <Echidna> paulweb515: it's in the package src/resources
[20:17:52] *** progme has joined ##java
[20:18:33] <Cpudan80> ojacobson: I did your standard @EJB private mySingleton theSingleton; then theSingleton.someMethod() and I get a null pointer at that line ...
[20:18:35] <Echidna> paulweb515: and the inputstream i get makes JDOM try to find the file in project root in eclipse or in tomcat root when deployed
[20:18:41] <Cpudan80> You're sure I dont need a new or anything in there?
[20:18:49] <ojacobson> Cpudan80: Does it work if you remove @Singleton
[20:19:10] <Cpudan80> And replace it with what?
[20:19:12] <ojacobson> (Note that container-mediated dependency injection only happens to objects the container manages, too -- what's 'this' in that context, and where did it come from?
[20:19:18] <ojacobson> Presumably nothing
[20:19:22] <Cpudan80> ehh
[20:19:25] <ojacobson> I assume you're annotating an existing EJB
[20:19:34] <ojacobson> or other container-managed component (message listener, whatever)
[20:20:17] <Cpudan80> ojacobson: Im trying to access the singleton from an entity bean
[20:20:37] *** Will123456 has quit IRC
[20:20:41] *** LouisJB has quit IRC
[20:20:42] * ojacobson sighs.
[20:20:45] <ojacobson> I should've done this in the first place.
[20:20:47] <ojacobson> ~show us
[20:20:47] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[20:21:03] *** Sivam has quit IRC
[20:22:06] *** FireSlash has quit IRC
[20:23:59] *** matsebc has joined ##java
[20:24:46] *** maxo has joined ##java
[20:24:57] <maxo> hi, I have strings such as "This is some text - and some more, and something else - Some source" - I need to remove the "- Some source" bit - is there an easy way of finding the last hyphen and removing everything after it?
[20:25:48] <wyvern`> maxo, String#indexOf
[20:26:46] *** em has quit IRC
[20:27:29] *** wchun has quit IRC
[20:28:28] *** eyesUnclouded has quit IRC
[20:28:37] <maxo> wyvern`: thanks, I'll try out lastindexof
[20:28:46] <maxo> I thought I might have to use regex, but that looks easier
[20:31:39] <Echidna> paulweb515: also, this isnt an external jar within the classpath of my app, i'm trying to access the file from a class that's in the same jar
[20:31:55] <Echidna> i gtg home now but i'll check here when i#m home, in case you answer
[20:31:58] <ernimril> maxo: someString.replaceAll ("-[^-]*$", ""); might work
[20:31:58] <Echidna> thx so far
[20:34:16] <Cpudan80> ojacobson: http://www.pastie.org/1625745
[20:34:24] <Cpudan80> Sorry it took so long
[20:34:39] *** [[thufir]] has quit IRC
[20:34:44] *** homie has quit IRC
[20:34:51] *** SDGathman has joined ##java
[20:35:35] *** [[thufir]] has joined ##java
[20:35:37] *** homie has joined ##java
[20:35:37] <ojacobson> Ok, so it's not an EJB. Do you see any evidence that the container is deploying your object?
[20:35:48] <ojacobson> (I'd be surprised if you did, since it's not marked as any kind of container-managed object)
[20:35:53] *** homie has quit IRC
[20:36:06] *** Fisiu has joined ##java
[20:36:07] <SDGathman> I'm new to JDBC, and I'm trying to implement Connection *sharing*. I've seen "pool" libraries for Connection *reuse*, which could be important also.
[20:36:16] *** menace has quit IRC
[20:36:23] <ojacobson> SDGathman: What does *sharing* mean?
[20:36:27] <ojacobson> And why do you remind me of the Orz?
[20:37:00] <ojacobson> Cpudan80: excuse, didn't read it closely enough, @Singleton does in fact define a component
[20:37:09] <Cpudan80> no worries
[20:37:29] <ojacobson> What's the class with @EJB?
[20:37:29] <SDGathman> Our apps have a dozen or do "Dataset" objects which manage one query each while managing scrolling, updates, etc.
[20:37:43] <Cpudan80> ojacobson: the class wtih @EJB ?
[20:37:45] <SDGathman> All use the same database.
[20:37:58] <Cpudan80> ojacobson: I posted the whole of the two files ....
[20:38:11] <ojacobson> hmm
[20:38:27] <ojacobson> I'm not sure JPA entities are subject to component injection
[20:38:32] <ojacobson> they're not components themselves, I don't think
[20:38:41] <Cpudan80> hmmm
[20:38:42] <SDGathman> ojacobson, so I think I can share the same connection - assuming that supports multiple active Statement and ResultSet objects.
[20:38:59] *** xianny has quit IRC
[20:40:11] <SDGathman> ojacobson, I'm studying org.apache.commons.dbcp, but that seems to support saving a Connection when you close it, and reusing the next time you open one.
[20:40:38] <ojacobson> Do you have a particular reason to ignore the clear, obvious, and sensible conventions?
[20:40:53] <ojacobson> Long-lived Statement and ResultSet objects are somewhat unusual
[20:41:13] <SDGathman> ojacobson, yes, I am emulating another API on top of SQL.
[20:41:42] *** eyesUnclouded has joined ##java
[20:41:56] *** em has joined ##java
[20:42:08] *** Kool has quit IRC
[20:42:49] *** wh1t3 has joined ##java
[20:43:18] <SDGathman> ojacobson, the prototype simple opens a Connection per Dataset, and it stays open for the duration of the app. I suspect that a single Connection, or one per Thread, could be shared among the Datasets.
[20:43:46] <ojacobson> Cpudan80: What's the code that loads Machine instances look like?
[20:43:46] <SDGathman> But I'm trying to find out the "rules" for SQL. The initial database is Postgresql.
[20:44:05] <Cpudan80> ojacobson: I'd have to go and find it
[20:44:10] <Cpudan80> lemme look around
[20:44:28] <ojacobson> Importantly, (A) is it a component and (B) is it the place that calls ...some method...
[20:45:20] *** magn3ts has joined ##java
[20:46:21] <SDGathman> ojacobson, if connection *sharing* is unusual, then perhaps I am not reinventing the wheel. I was trying to use one of many connection pooling libraries, but they only support reuse.
[20:47:16] <SDGathman> So far, I think that there needs to be a Connection per Thread (and per database, of course).
[20:48:09] <Cpudan80> ojacobson: Yeah ... doesn't look like entity beans can do what I was trying to do
[20:48:33] *** bojo_ has quit IRC
[20:48:47] <ojacobson> Sure, but if you can answer that last question I might have a suggestion anyways
[20:48:55] *** ogl92 has joined ##java
[20:52:41] *** bitshuffler_ has joined ##java
[20:55:01] <SDGathman> ojacobson, MS-SQL says that in manual transaction mode, there can be only one active Statement per Connection. (Implying that there can be multiple in auto-commit mode.)
[20:55:48] *** makkalot has quit IRC
[20:56:02] <milligan> I have a class that extends a JFrame . In the class the user can perform some searches etc. How can I make the class return an object when a user clicks a button ? (Or doubleclicks elsewhere...)
[20:56:09] <ojacobson> Yes, it's up to the driver whether to allow multiple in-progress statements (and resultsets, since resultsets are closed when the statement that created them are closed)
[20:56:18] *** bitshuffler has quit IRC
[20:56:36] <ojacobson> You're almost certainly better off creating, executing, and closing statements as needed rather than trying to use ResultSet as a long-lived view of data
[20:56:57] <ojacobson> (and if you do that, you can use a connection pool to manage connection lifecycles, rather than connecting and reconnecting every time, which solves the sharing problem too)
[20:57:07] <SDGathman> The API being emulated is Cursor based. It is a reasonably close match to SQL Cursors.
[20:57:34] <SDGathman> The applications depend on opening Cursors, and traversing the data using the Cursors.
[20:58:05] <SDGathman> (Except the Dataset objects manage the Cursors in the API being emulated.)
[20:58:16] *** LouisJB has joined ##java
[20:59:00] <SDGathman> I don't seem to be the first to want long lived ResultSets, because that is the point of SQL Cursors.
[20:59:11] <ojacobson> Some drivers support it some of the time
[20:59:14] <SDGathman> (And ResultSets are Cursor based with the right options.)
[20:59:17] <ojacobson> Read the docs for the drivers you plan on supporting
[20:59:29] <ojacobson> JDBC does not place very many constraints on this
[21:00:16] <SDGathman> Fair point. We just want to be able to swap in a 3rd party database without changing apps. Requiring Cursor support is reasonable.
[21:00:50] <SDGathman> I supposed, worst case, we fall back to a Connection per Dataset.
[21:01:43] *** jor has joined ##java
[21:02:00] <SDGathman> I'll work on a good test case for multiple active Statements on a shared Connection.
[21:06:08] *** nmx has quit IRC
[21:07:08] *** vdv has quit IRC
[21:08:58] *** cyphorious has joined ##java
[21:09:12] <ernimril> SDGathman: multiple statements ought to work with most modern databases as long as you are on one thread only. Using the same connection from multiple threads will give you lots of problem
[21:09:31] *** monty_hall has joined ##java
[21:09:55] *** Pozejdon has joined ##java
[21:10:33] *** nmx has joined ##java
[21:11:30] *** monty_hall has left ##java
[21:12:12] *** monty_hall has joined ##java
[21:12:29] <Pozejdon> I have 2 java class library projects open, one is Server with one package and 2 files in it and the second one is Client with one package and one file with main method in it
[21:13:01] <Pozejdon> Problem is when I want to call getName() method from Server, it is in one file in Server
[21:13:07] <Bombe> Have you still not read any tutorial about basic java development?
[21:13:19] <Bombe> You have been asking that same question over and over again for a week now.
[21:13:21] *** Willy has joined ##java
[21:13:26] <Pozejdon> I did
[21:13:32] <Pozejdon> no
[21:13:35] <Bombe> I doubt that.
[21:13:40] <monty_hall> just curious, I have objects that I would like to serialize to xml. Doesn't seem jaxb is what I want, but it does look like XMLEncoder would do the job. Are there other alternatives?
[21:14:06] <monty_hall> or just stick w/ xmlencoder....
[21:14:07] <ernimril> monty_hall: why do you want to serialize to xml?
[21:14:11] <monty_hall> no reason.
[21:14:14] <monty_hall> just wondering.
[21:14:17] <cheeser> ~~ monty_hall xstream
[21:14:17] <javabot> monty_hall, XStream is a simple library to serialize objects to XML and back again. It can be found at http://xstream.codehaus.org
[21:14:25] <cheeser> xstream also suppots json
[21:15:19] *** Sivam has joined ##java
[21:16:14] *** kvarley has joined ##java
[21:19:05] *** hanstech has joined ##java
[21:19:22] <SDGathman> ojacobson, http://stackoverflow.com/questions/838518/what-is-a-connection-in-jdbc seems to indicate that I can just track Statements and ResultSets in my Datasets, and use a single Connection for them all.
[21:19:42] <ojacobson> Instead of trusting randoms on the internet, why not read the JDBC spec?
[21:19:51] *** dmiles_afk has joined ##java
[21:19:54] <ojacobson> It's not actually very long, and it lays out what features are required from drivers
[21:20:07] <SDGathman> It is ok if some drivers don't actually support it. As long as some do.
[21:20:13] <ojacobson> Then, if and only if the features you need are neither required nor forbidden, check the drivers you plan on supporting
[21:21:23] <Bombe> SDGathman: Using a single connection will most probably not work. Been there, done that.
[21:22:48] <SDGathman> Bombe, even for a single Thread?
[21:23:15] <Bombe> SDGathman: Yes. You have to completely process the ResultSet before creating a new one, otherwise all hell breaks lose.
[21:24:08] <SDGathman> Bombe, well, yes, but I'm not sharing Statements.
[21:24:31] <SDGathman> I know that executing a new query on a Statement resets the ResultSet.
[21:24:33] <Bombe> SDGathman: No, but the Connection.
[21:24:50] *** Sambler has joined ##java
[21:24:55] <SDGathman> What driver was that?
[21:25:30] <Bombe> That was probably some Oracle driver, back in 1998… :)
[21:25:50] <Bombe> I think Oracle 8 was all the rage back then.
[21:26:02] <SDGathman> I don't plan to ever support Oracle.
[21:26:23] <SDGathman> Postgresql, Mysql, and possible MS-SQL.
[21:26:50] <ojacobson> Mysql doesn't even support one concurrent resultset
[21:27:00] <ojacobson> MySQL's JDBC driver sucks the entire resultset into memory
[21:27:05] <ojacobson> protip: don't support crappy databases
[21:27:37] <SDGathman> According to their tech site, you can set the JDBC driver to "cursor" mode, and then it will support multiple concurrent resultsets per connection.
[21:27:53] *** brundlefly has joined ##java
[21:28:45] <SDGathman> ojacobson, I would never voluntarily support MS stuff. But sometimes clients insist.
[21:28:57] <ojacobson> SQL Server is fine
[21:29:02] <ojacobson> MySQL, however, is a piece of crap
[21:29:05] *** gucko has quit IRC
[21:29:31] <SDGathman> ojacobson, I've already run into the problem that it doesn't support quoted identifiers.
[21:29:46] <ojacobson> It does, just with a gratuitously different quoting syntax (backticks)
[21:30:02] <SDGathman> For real?
[21:30:08] <ojacobson> For real.
[21:30:15] <ojacobson> There's a config parameter you can set to make it less stupid.
[21:30:20] *** wchun has joined ##java
[21:30:35] <ojacobson> Half-assed transaction support, no constraints other than unique, not null, and foreign keys (sometimes), ad-hoc changes to data to make it fit into storage types rather than returning errors, wacky date and time types
[21:31:07] <ojacobson> Lots of gratuitous incompatibilities with ANSI SQL
[21:31:08] <ojacobson> (ISO)
[21:31:23] <SDGathman> Well, that is why I'm initially using Postgresql.
[21:31:29] <ojacobson> Sure. That's a pretty good database. :)
[21:31:39] <ojacobson> Just, don't expect "oh, and MySQL support" to be any fun afterwards
[21:31:40] *** gigabytes has joined ##java
[21:31:40] *** mrhota has joined ##java
[21:31:44] <ojacobson> ~mysql
[21:31:44] <javabot> ojacobson, mysql is a network-attached spreadsheet used by pr0n sites and other dodgy entities across the Internet. You can learn more about it at http://www.mysql.com - free download of the open-source version, including JDBC drivers.
[21:31:53] <SDGathman> But one client likes Sun stuff, and was pushing for MySQL when it was Sun.
[21:32:09] *** gigasoft has quit IRC
[21:34:11] <SDGathman> None of our clients is likely to be big enough to justify Oracle.
[21:35:01] <SDGathman> (Their free evaluation is a stuffed turkey, but I assume it scales well.)
[21:36:32] *** sebrock has joined ##java
[21:36:35] *** terranova has quit IRC
[21:36:47] *** cbeust_ has quit IRC
[21:38:38] *** cbeust_ has joined ##java
[21:39:02] *** BoF has joined ##java
[21:39:20] *** cbeust_ is now known as cbeust
[21:39:40] *** cbeust has quit IRC
[21:40:09] *** cbeust has joined ##java
[21:44:19] *** bduncan has quit IRC
[21:44:44] *** Optic has joined ##java
[21:45:42] <Optic> I need to store tens of thousands of counters, some of which are updated frequently (a million updates a day, or so). Any data storage hints? I'd default to RDBMS, but I don't know if that's optimal.
[21:45:48] * Optic looking for CS hints ;)
[21:45:50] *** _W_ has joined ##java
[21:46:15] <ojacobson> Optic: http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/
[21:46:56] <Optic> oh, I forgot to mention, reliability is important.
[21:47:04] <ojacobson> dammit.
[21:47:20] <push[RAX]> lol
[21:47:34] <ojacobson> That's only 10 a second or so, though
[21:47:53] <ojacobson> What's your plan when your counting system is unavailable? Stop operations, or continue without counts?
[21:47:57] <ojacobson> (when.)
[21:48:11] <Optic> I was thinking something like journal-and-playback
[21:48:25] <ojacobson> rabbitmq might be decent at this actually
[21:48:29] <push[RAX]> I'd go with a JMS broker and a scalable number of consumer nodes
[21:48:43] *** drosophila has quit IRC
[21:48:43] <ojacobson> intake on rabbitmq is pretty zippy even when it's backlogged
[21:49:19] <Optic> but, how to store? rdbms with a transactional select-update cycle?
[21:49:49] <ojacobson> once counting is decoupled from storing the counts you have a lot of options; an RDBMS is one way, or you could spew them straight into rrdtool
[21:49:59] *** maxo has quit IRC
[21:50:01] <saml> why not use log file?
[21:50:06] *** balr0g has joined ##java
[21:50:14] <saml> and count the number of lines each day before rotate?
[21:50:14] *** wolfman2000 has quit IRC
[21:50:33] <saml> are loggers "reliable" ?
[21:50:56] <Optic> hmm, a log file is an option
[21:51:12] <Optic> I'd rather not have a batch process
[21:51:29] <saml> what are you trying to do? why thousands of counters?
[21:51:29] <ojacobson> syslogd?
[21:51:31] *** Gracenotes has joined ##java
[21:51:32] <balr0g> hello guys, having issues writing a file... im using this: http://pastebin.com/w2MRJ5f4 but it seems to put at the beggining of the file the new information... what is the best way to just re-write the entire file ?
[21:51:37] *** plarsen has quit IRC
[21:51:48] <saml> do you need counters always up to date any given second reliably?
[21:52:21] <Optic> saml: it's audit data for a distributed system... they don't have to be up to the second, though
[21:52:44] <saml> wait.. you need a centrailized counter for distributed system?
[21:52:50] <Optic> yes, for billing :)
[21:53:08] *** eyesUnclouded has quit IRC
[21:53:19] <mapreduce> Money spoils yet another perfectly good design. :)
[21:53:26] <saml> no idea how that should work.. if reliability shoudl be guaranteed.
[21:54:21] *** KeithChester has joined ##java
[21:54:36] *** madrax has quit IRC
[21:55:16] <KeithChester> OK I am hitting my head against a wall here - on one side im writing a URL Connection that writes strings out - on the other I'm reading on an HTTPServlet using request.getInputStream(). The URL connection can connect and read from the servlet fine, but the servlett isnt reading from the URL connection's outputstream at all.
[21:55:25] <SDGathman> Optic, distribute counts to smaller counters round robin. Hash the key to reduce database size to easily fit in memory. Combine counts at the master node as needed.
[21:55:34] <saml> if it's only millions a day, maybe a web server with a log file
[21:55:40] <KeithChester> it seems no matter what I try I'm just getting "null" from the inputstream reader
[21:56:13] <Optic> yeah
[21:56:34] <cheeser> ~~ KeithChester show us
[21:56:34] <javabot> KeithChester, Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[21:56:52] <KeithChester> sure cheeser one sec. ill use pastebin
[21:57:26] <KeithChester> here is the url connection/client writing out and reading.
[21:57:26] <KeithChester> http://pastebin.com/tKnLSEDj
[21:57:58] <KeithChester> here is the http servlet doPost.
[21:57:59] <KeithChester> http://pastebin.com/sE5EsVNS
[21:58:15] <KeithChester> note that the commented out code are other methods ive tried, thats simply the most recent version. i was hoping i could just read() into a string and be done with it.
[21:58:43] <mapreduce> Why do people feel the need to initialise variables with nonsense like ""?
[21:58:46] *** AgentisDave has joined ##java
[21:59:13] *** realtime_ has quit IRC
[21:59:21] *** Versuchen has joined ##java
[21:59:48] <KeithChester> i apologize that i did not meet your expectations, mapreduce . rest assured, seppuku is now on my todo list
[21:59:59] <KeithChester> ;-)
[22:00:07] <mapreduce> Excellent.
[22:00:27] <KeithChester> anyway, if anyone sees anything glaringly wrong with how i'm writing or reading, please feel free to point it out. im just getting null no matter what i do
[22:00:33] <mapreduce> You met my expectations, don't worry. It's just that they're quite low.
[22:00:38] <cheeser> that should be while read != -1
[22:00:50] <KeithChester> ill make the change and run a test cheeser
[22:01:06] <KeithChester> what line are you talking baout?
[22:01:08] <mapreduce> cheeser: Why's that?
[22:01:14] <KeithChester> while ((bytesRead = bufferedReader.read(charBuffer)) > 0) { ?
[22:01:36] <mapreduce> I don't see that line, guess I missed a paste.
[22:01:46] <KeithChester> http://pastebin.com/sE5EsVNS
[22:01:50] <cheeser> mapreduce: a read of 0 bytes does not indicate the end of stream
[22:01:50] <KeithChester> http://pastebin.com/tKnLSEDj
[22:01:52] <KeithChester> are the two pastes
[22:02:06] *** caverdude has joined ##java
[22:02:42] <KeithChester> cheeser - still null
[22:02:54] <cheeser> where do you see the null?
[22:03:09] *** Engin has joined ##java
[22:03:30] <saml> KeithChester, maybe connection.getResponseCode()>=400 ?
[22:03:44] <KeithChester> saml - it is connecting, as later i print out information and i get that information fine
[22:04:21] <KeithChester> plus on the servside, where i system.out.println(body), im still getting a blank printout on the console
[22:04:43] *** Johannes13 has quit IRC
[22:05:52] <saml> so are you sure server response is success?
[22:06:06] *** mindCrime has quit IRC
[22:06:11] *** mrhota has quit IRC
[22:07:01] <KeithChester> how do you mean saml?
[22:07:13] <KeithChester> as in am i sure that the server response printwriter is working?
[22:07:25] <saml> no.. check connection.getResponseCode()
[22:08:10] *** plarsen has joined ##java
[22:08:17] <KeithChester> got 200
[22:08:50] <saml> can you log or system.out.println at the beginning of doPost()?"
[22:08:57] <saml> does it get to that doPost()?
[22:09:02] *** balr0g has quit IRC
[22:09:04] <saml> or set a breakpoint..etc
[22:09:18] *** Cymage has quit IRC
[22:09:29] <KeithChester> yes, the dopost is indeed firing off
[22:09:44] <KeithChester> im looking at system.out.printlns from it, the printwriter DOES return stuff later in the program
[22:09:53] <KeithChester> but the part that reads from the urlconnection simply returns... null
[22:10:24] <saml> out.println(body); so body is not null?
[22:11:01] <saml> can you use curl?
[22:11:13] <saml> i mean try to hit the servlet using command line
[22:11:16] <KeithChester> its blank - up until recently when i switched to the stringbuilder/buffer method it was just printing null
[22:11:23] <saml> to verify the error is in the client code
[22:11:30] <KeithChester> i dont know curl
[22:11:57] <saml> what do you haev to POST?
[22:12:19] <saml> curl -F foo=bar http://localhost:8080/path/to/your/servlet -u yourid:yourpassword
[22:12:25] <KeithChester> right now im just posting strings- i need to get a generic function prepped to post data on an http post.
[22:12:31] <KeithChester> the hope is to pass json'ed objects
[22:12:31] *** gigabytes has quit IRC
[22:13:32] <saml> or maybe try apache httpclient?
[22:14:25] <saml> System.out.println(body); what does this print to console? nothing?
[22:14:27] <KeithChester> cant switch connection types now
[22:14:32] <KeithChester> it prints a blan kline
[22:14:32] *** dEVOted has joined ##java
[22:14:39] <saml> so stringBuilder is empty
[22:14:53] <saml> in the else block, do stringBuilder.append("ASDFADFASSDASF")
[22:15:04] <KeithChester> also
[22:15:07] <KeithChester> the curl command you gave me
[22:15:08] <saml> do u know how to use debugger? step debbuging might be useful
[22:15:09] <KeithChester> also prints a blank line
[22:15:21] <saml> so your server code is wrong
[22:15:24] <KeithChester> mmhmmm
[22:15:39] <KeithChester> ive tried like 20 different implementations so far, dont see what im doing wrong on serverside
[22:15:46] <KeithChester> ranging from string builder to a simple in.read()
[22:16:08] *** blbrown_win3 has quit IRC
[22:16:20] *** Sambler has quit IRC
[22:16:21] *** jor has quit IRC
[22:17:55] <mapreduce> Perhaps you can pastebin enough that someone can actually run your code.
[22:18:10] <mapreduce> (wouldn't be me, btw)
[22:18:44] <KeithChester> theres really nothign else to it
[22:19:49] *** dEVOted is now known as michiel_an_jello
[22:19:50] *** [[thufir]] has quit IRC
[22:20:07] *** [[thufir]] has joined ##java
[22:20:35] *** michiel_an_jello has left ##java
[22:21:25] *** eidolon has quit IRC
[22:22:52] *** Gracenotes has quit IRC
[22:23:07] *** freeone3000 has joined ##java
[22:23:12] *** freeone3000 has quit IRC
[22:23:22] *** KeithChester has quit IRC
[22:23:38] *** Metallon has left ##java
[22:23:50] *** bitshuffler_ has quit IRC
[22:26:36] *** neuro_sys has quit IRC
[22:29:59] *** harry_ has joined ##java
[22:30:59] *** neuro_sys has joined ##java
[22:32:20] <saml> so req.getInputStream() is null
[22:32:52] *** wolfman2000 has joined ##java
[22:33:31] <saml> can you try req.getReader() ?
[22:33:34] *** ZeuZ has joined ##java
[22:33:37] *** choongii has quit IRC
[22:33:39] *** harry_ has quit IRC
[22:34:18] *** matsebc has quit IRC
[22:35:38] *** kvarley has quit IRC
[22:35:59] *** harry_ has joined ##java
[22:37:40] *** ZeuZ has quit IRC
[22:37:44] *** zatan has quit IRC
[22:40:42] *** syphar has quit IRC
[22:41:29] *** jplacerda has left ##java
[22:41:39] *** bindaas has quit IRC
[22:41:53] *** lunatik210 has quit IRC
[22:44:44] *** werdan7 has quit IRC
[22:45:35] *** VJTachyon has quit IRC
[22:45:46] *** VJTachyon has joined ##java
[22:48:36] *** homie has joined ##java
[22:48:47] *** sphenxes has quit IRC
[22:49:47] *** forneus has quit IRC
[22:49:58] *** BeholdMyGlory has quit IRC
[22:51:10] *** Soliah has quit IRC
[22:51:55] *** harry_ has quit IRC
[22:53:07] *** Auv5 has joined ##java
[22:53:24] *** frangiz has quit IRC
[22:54:02] *** sebrock has quit IRC
[22:58:14] *** Gracenotes has joined ##java
[22:58:23] *** mark-a has left ##java
[22:58:53] *** ian_mac has quit IRC
[23:00:20] *** Cymage has joined ##java
[23:03:02] *** Cher has joined ##java
[23:04:06] *** FishEee has joined ##java
[23:04:22] <mapreduce> ~ping
[23:04:22] <javabot> Pong
[23:05:18] <SDGathman> Bombe, DatabaseMetadata.getMaxStatements() returns number of concurrent Statements per Connection supported.
[23:05:52] <SDGathman> ojacobson, ^
[23:05:52] *** harry_ has joined ##java
[23:06:18] <SDGathman> Unfortunately, postgresql-jdbc-8.3 supports only 1.
[23:06:36] <cheeser> really? that doesn't sound right.
[23:07:26] <SDGathman> There might be some parameter to select "cursor mode" like in SQLServer, but I haven't found it yet.
[23:08:31] *** FishEee has quit IRC
[23:08:34] *** FrozenKnight has quit IRC
[23:08:54] *** FrozenKnight has joined ##java
[23:09:02] <mapreduce> Is it IDEA Ultimate that lets you do code coverage for the stuff you run?
[23:09:17] <mapreduce> I can't see the options in IDEA Community but I could be looking in the wrong place.
[23:09:34] *** terranova has joined ##java
[23:10:10] *** rjohnson19 has joined ##java
[23:10:14] *** terranova has joined ##java
[23:10:18] <tjsnell> in the run config, it's a tab
[23:10:26] <tjsnell> never have run community so no idea there
[23:10:35] <mapreduce> Damn, definitely missing then.
[23:10:43] *** Cymage has quit IRC
[23:10:54] *** Cymage has joined ##java
[23:10:59] * mapreduce wonders whether he can get maven to do it.
[23:11:05] *** c_axis has joined ##java
[23:11:13] *** saml has quit IRC
[23:11:38] *** Cymage has quit IRC
[23:11:49] *** Cymage has joined ##java
[23:13:11] *** Kamaran has quit IRC
[23:13:13] *** shaunren has joined ##java
[23:14:42] *** Pozejdon has quit IRC
[23:14:54] *** matsebc has joined ##java
[23:16:10] *** SDGathman has left ##java
[23:16:43] *** jdolan has quit IRC
[23:18:29] *** epalm has quit IRC
[23:18:47] *** Cymage has quit IRC
[23:19:10] <cheeser> mvn cobertura:cobertura
[23:19:24] <cheeser> though you might need slight pom tweaks if you want to configure anything.
[23:19:53] <tjsnell> sadly that doesn't show up in idea though :)
[23:19:58] <tjsnell> love the integration
[23:21:18] *** Scorchin has quit IRC
[23:21:20] *** Cymage has joined ##java
[23:22:34] *** gdoko has joined ##java
[23:22:40] *** defascat has joined ##java
[23:23:23] *** epalm has joined ##java
[23:23:32] *** Cymage has quit IRC
[23:24:16] *** c_axis has quit IRC
[23:24:53] *** ninan has quit IRC
[23:25:25] *** gdoko has quit IRC
[23:26:38] *** cyphorious has quit IRC
[23:27:19] <Cpudan80> I want to do a big SQL query (ie. SELECT * FROM table WHERE id = 1 or id = 2 or id = 3 or ....)
[23:27:32] <Cpudan80> Whats the best way to do that (without having to put a giant where thing..)
[23:28:50] *** gelignite has quit IRC
[23:29:10] *** epalm has quit IRC
[23:30:24] *** intuition has joined ##java
[23:31:05] <intuition> hey, I'm getting a java.lang.InterruptedException on certain machines when I invoke java.net.URLConnection.getContentLength... any ideas why this might be happening or how to deal with it?
[23:31:35] <intuition> It concistnetly happens 100% on one machine in our office, and never happens on others
[23:31:42] <cheeser> is there an error message with the exception? pastebin the stacktrace.
[23:32:16] <intuition> http://pastebin.com/W0byvMFy
[23:32:30] *** choongii has joined ##java
[23:32:32] <intuition> not sure how much of the output is relevant
[23:33:13] *** nchaimov has quit IRC
[23:34:03] *** balr0g has joined ##java
[23:34:19] *** Sivam has quit IRC
[23:34:49] *** Sivam has joined ##java
[23:34:50] <balr0g> hello guys, having issues writing files, im using this method: http://pastebin.com/w2MRJ5f4 it seems to put new info at the beginnig... what is the best method to just re-wrrite entire file?
[23:35:13] *** servo has joined ##java
[23:35:45] <ojacobson> Jesus. Why are you using URL (and URLConnection) for this?
[23:35:59] <ojacobson> I don't see anything here that looks like it needs URLs
[23:36:29] *** [[thufir]] has quit IRC
[23:36:31] *** Cymage has joined ##java
[23:36:36] <ojacobson> ~javadoc File
[23:36:36] <javabot> ojacobson: http://is.gd/3okTU [Wicket1.4: org.apache.wicket.util.file.File]; http://is.gd/iHD3J [JDK: java.io.File]
[23:36:39] *** [twisti] has joined ##java
[23:36:40] <ojacobson> ~javadoc FileOutputStream
[23:36:41] <javabot> ojacobson: http://is.gd/oLPEWb [JDK: java.io.FileOutputStream]
[23:36:48] <ojacobson> ~conventions
[23:36:48] <javabot> ojacobson, conventions is http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html , or "ThisIsAClassName, thisIsAVariableOrMethodName, THIS_IS_A_CONSTANT_NAME". See also http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
[23:37:07] <intuition> ojacobson I assume you're talking to balr0g
[23:37:16] <intuition> ?
[23:37:25] <ojacobson> Yes.
[23:37:54] *** ninan has joined ##java
[23:37:55] <[twisti]> hey, i have a JDialogue with setFocusableWindowState(false), but when i try to click something in it, the first click is still "eaten" by it getting some sort of hidden focus, any way i can turn that off without manually forwarding the click ?
[23:39:16] <intuition> @cheeser did that help at all?
[23:40:24] <cheeser> sorry. was on the phone.
[23:40:28] <intuition> no worries
[23:40:52] *** servo has quit IRC
[23:40:56] <cheeser> no. made no sense to me.
[23:40:57] <cheeser> 8^)=
[23:41:06] <intuition> if this is a plugin related problem no worries... i'm posting this on an applet forum right now
[23:41:09] <balr0g> ojacobson, im developing Java ME
[23:41:13] * cheeser kicks intuition in the ball.
[23:41:25] <ojacobson> hahaha ahahahaha haha and you think you have *files*?
[23:41:26] <intuition> singular!? awww...
[23:42:25] *** VooDooNOFX has quit IRC
[23:42:30] <balr0g> ojacobson, yes, im accessing the FS, and need to write info there
[23:42:57] *** wils has joined ##java
[23:44:21] <balr0g> ojacobson, why do you laugh? is there another term for files in ME?
[23:44:36] <intuition> @cheeser basically... assuming that this WASN'T an applet, what could cause getContentLength() to be interrupted, and how do you deal with it?
[23:45:45] *** Engin has quit IRC
[23:46:29] *** BeholdMyGlory has joined ##java
[23:47:39] *** ojacobson has quit IRC
[23:49:01] *** Quantum_Ion has joined ##java
[23:49:20] *** sromah has joined ##java
[23:51:14] *** sromah has left ##java
[23:51:31] *** hanstech has quit IRC
[23:52:50] <cheeser> intuition: run the same app as a not-applet on that machine.
[23:52:58] <cheeser> if you get the same error, there's a problem.
[23:53:04] <cheeser> if you don't, then it's an applet problem.
[23:53:32] <intuition> yeah.. it's an artist box. I'm going to have to set up our dev environment on it
[23:53:56] *** Behold has joined ##java
[23:54:27] *** BeholdMyGlory has quit IRC
[23:55:12] *** glcrazy has quit IRC
[23:56:12] *** progme has quit IRC
[23:57:58] <dextro_> when you have a chunk of code selected and hit tab it indents it all
[23:58:15] <dextro_> how do you remove intentation from a chunk of selected code (usually)
top

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