i/j #netbeans
oops
eclipse
http://www.pastebin.ca/567552
Exception: com.mysql.jdbc.Driver
r0bby, Netbeans works for me
..you should check it out 5.5 is a preety neat version
nahhh
Egonis, did you completely ignore me?
Egonis, pastebin an entire transcript of what you're
doing
after the incident with IDEA, i'm not _TOUCHING_ another
IDE.
what incident?
IDEA incident?
r0bby_, how about seeing another IDE
not touching it
I did something, managed to delete my entire project
and I had alot of code ;(
backup++
oooo
0.o
I had all the code working too!
it parsed the file and everything
you figured out that issue with the 2nd and 2nd to last
lines?
Hahahaha
how the hell do you manage to delete your project
sounds like PEBKAC
i love that acronym
no idea
comma after the last value and white-space at the end
(of the file)
hehe
but, all the values inside a nice HashMap
screw backups, just have everything stored in some sort of
version control
and I suppose you can back up that repository
i've just been reading an into to java, and i'm not entirely
clear on what they call package access, they say that it means that
a class with package access is only visible to other classes in the
same package...but i don't quite know what that means
~package
Fanook, package is http://java.sun.com/tutorial/java/interpack/packages.html
and some example http://javafaq.mine.nu/lookup?254
~access modifiers
[krustofski], access modifiers is http://java.sun.com/tutorial/java/javaOO/accesscontrol.html
packages are what java
hosting uses to organize your classes
Sulis, a package is a namespace
that groups classes together
much like a class is a namespace that groups methods and fields
together
I'm going to set it up
r0bby, cpan install SVK
:p
svn
r0bby, there's several reasons why I don't like using svn
directly...
why?
1, .svn folders are a bane
2, merge tracking is suckass on vanilla svn
etc.
ahh, i understand now, thanks
pffft, glassfish' lifecycles still bite
evening
http://www.pastebin.ca/567583
-- full description of issues and command output
[TechGuy]: it's sad how many things have to be done through the
command line with glassfish
I almost care
~tell Egonis about classpath
Egonis, The class path tells Java or the compiler in which jar
files and folders to look for classes. Use the -cp/-classpath
run-time options to specify the class path. Also see
http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/classpath.html
and http://mindprod.com/jgloss/classpath.html#ANACHRONISM
True.
Egonis, read more, type less
I am not yet fully impressed with GF's admin system. It's
like the admin control panel is still half-baked, compared to BEA
WL for instance
And GF *still* doesn't have a Windows service installer or
scripts
[TechGuy]: yeah
hrm... glassfish doesn't, but sjsas9 does
Because GFv1 is a release.
insert random "it's still beta" references here
but the admin console is quite good for about 80% of the tasks
you'd actually perform
Yeah. It's okay.
I wish it was nicer for deployers though
I like how WAS' console allows you to resolve JNDI host refs at deploy time through
the console
I like how WAS's (or hell even JBoss's) console actually
tells you what the damn JNDI object is, rather than saying it's a
Reference
heh
well... yeah
but GF *is* correct, after all........
WAS' console lets you do that?
you mean WLS?
no, websphere
Yeah... well...
[TechGuy]: just happens to be 100% useless in that case
jottinger, oh, you mean "fill in the blanks"? I didn't find
that so nice...
I mean, yeah, at least it lets you fill in the blanks
it'd be nicer if there were a way to actually browse jndi to
find what you're looking for
(assuming that it's a pre-existing resource)
I wish that the refs would at least call the games in the NBA
finals
they
they've done a horrible, horrible job -- even considering their
goal is just to let 'em play
"Oh, that's just a piddling over-the-back call... let's skip
it"
and "Reach-in? Not on our watch!"
And "Hey, there's only blood on the floor... no bone, no foul!"
and they're not being really good about actually being fair with
the calls
yeah, would be nice
run through deployment, instantiate the JNDI hosting
refs, then allow resolution with the configuration file data as
defaults...
data as defaults...
are the cavs blowing it again?
they're up 10-5
mike brown FINALLY left larry hughes out of the starting
lineup
hmm, they'll fix that
"duh"
-- cleveland area non-sports type
ooo, he didn't play in game 3 either
but as soon as I saw that last non-call in the fourth, I knew the
cavs had lost
z does a good job rebounding...
nice shot, 12-8
heh
"Gregg popovich wants a timeout, so he calls the VERY TIMEOUT
THAT NBA RULES FORCE HIM TO"
hahaha
the commentators are so full of it
and they're ex-coaches, so they HAVE to know
you could give espn's gamecast a run for its money
[krustofski]: woo
except they'd fire me for being honest
clearcase stupid stupid
lebrons got one hell of a honker
[krustofski]: and a hell of a player, too
he's gotten shafted this series
not gonna help tonight when the sweeps over
[krustofski]: true dat
parker is da man!
yeah, the spurs have the cavs outclassed
almost every phase of the game... best player on the spurs is
better than the best hosting
player on the cavs, better team d, better team O, better head
coach....
better three shooters, better paint players...
the list is endless
I love your screenshot paster.
next year or two, maybe the cavs will have it... but not
now
At least they made it for the first time in franchise history,
so they're still working on it
holy
the cavs are better at offensive rebounding...
you see little parker take that?
now that was a transition breakaway
yeah
he's touch
I'm pretty sure his french accent is fake
q@#$@#@#$#@
wait... that was 2???
yeah
spurs are grinding them apart as usual
what up, yo?
r0bby, heh, no need to kissass... paste anything
interesting?
GOOD SEQUENCE!
Got the foul
but blew the FT!
gotta blame the net
Ibet they called that on James
im trying to intiate two arrays in Polygon() and iv tried
this Polygon(4, [123], [987]). Polygon is set up as this
Polygon(int num, int x[], int y[])
Polygon[4, [123], [987]) does not work and im unsure y
because that's not how you define arrays
new int[]{123}
you've gotten that from a different programming language haven't
you? i know that would work in python
ginobilis got butter fingers
krust has peanut butter
extra crunchy
jack = new Polygon(4, int[]{0123}, int[]{987});
that doesnt work
oh brother...
sorry
~tell doctorwhite about arrays
doctorwhite, arrays is
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
Re-read Fanook's line *carefully*
note the location of the colon!
where it always was!
thankfully!
I have a semicolon. Maybe that's why I'm so cramped
then my question is how do i mix the arrays with an int
parameter?
all on one line
i declared them already, im just intiating them in main
doctorwhite, first of all, you need to tell us what you're
trying to get
doctorwhite, then describe to us what you're doing and how it's not
working in relation to your requirement
ok i created a new object jack from the class Polygon.
Polygon has three constructors.
how you're going about getting help is completely wrong
I just hate you all
jottinger, I just hate that you're getting paid to hang out
with eidolon on irc ;-)
paid? to irc? huh?
i am suppose to intiate x-y values in main by using the
Polygon constructor Polygon(int num, int x[], int y[])
Ha! Ha! Ha!
doctorwhite, ok, now what are you trying and what is not
working
thats the quite the puzzler.. i dont know if java can handle
it
hmm
is there an initialization list for a constructor?
similar to that of which c++ has
hi, is there a way to have like file output stream.. then output
some text... then like go to the beginning of the output and and
prepend some text?
is there an easy way to do that?
no
just initialize the variables in the constructor
like ... what? like?
ok
haha, i thought franco was OJ
heh
wtf happened with the game clock?
i want more control over how i output text to a file.. i want to
output text to the beginning of a file and to the end
hi
Anyone know any tutorials which deal with using rsync in
Java?
in what way?
Liek syncing all your files from a certain directory to what the
server
has.
so does anyone know how i can just add text to the beginning of
a file
I can't think of why there'd be a tutorial for using it in
java
tell gcbdm about io
gcbdm, io is http://java.sun.com/tutorial/essential/io
use it the same way as not in java
maybe with RandomAccessFile
or are you wanting to implement rsync?
ok ty
I just want to use thr rsync command to sync what I have with
the server.
anyonw know any "tutorials" to learn java if you already know
C++, oop, and algorithms (you just don't know java)...
~rbi
[krustofski], rbi is http://java.sun.com/docs/books/tutorial/reallybigindex.html
the java tutorial is
great
just read up on Runtime
tell Pegazus about tij
~tell Pegazus about tij
Pegazus, tij is Thinking in Java by Bruce Eckel, see http://www.mindview.net/Books/TIJ/
for the 3rd edition (free download, published in 2002) or see
http://www.mindview.net/Books/TIJ4
for the current edition which covers Java 5 features.
ok, thx
if you just need the syntax, rbi will give you that
what is rbi?
look up about 10 lines
k
any page with tells the difference between c++ and java by
chance?
i'm sure there are some on google
theres a wiki host on
it, its quite neat
but a complete one
c++ sucks, java servlet
hosting rocks, what more do you need to know?
Hey all...I'm working at learning Servlets, and was kinda
curious about the web.xml file used - specifically about the
url-pattern. I'm trying a very simple site, and want everything /
wise to go go the servlet, but say the /static directory, which I'd
like to well...host the CSS and all that. I"m using the Wicket
framework to do all this, is this the right thing to do, or is
there something different I should be doing for this?
covering all features (including advanced one)
karstensrage, That's a loaded statement.
i would be tempted to ask why... but forget it...
im being sarcastic
k...
java is very rich with API support for almost everything you
could imagine
c++ you have to go searching far and wide and it may not even be
there
c++ templates are nice and compiled in
java 5 has generics which semi-accomplish the same thing but are
compile time only then thrown away
mostly thrown away
c++, IMHO, is syntactically ugly
java, IMHO, is very nice looking
I'm not sure how IO can help me sync to a server.
i thought java resembled c++ code very closely indeed
C++ has multiple inheritance which is enough rope to hang
yourself with
well, you're reading and writing files so ...
java has only single inheritance
for classes
i meant subtle difference... the big ones i know them...
isn't c++ faster because it compiles to machine code whereas
java is an intermediate language that requires
interpreting?
ehhh programming languages are programming languages
there are numerous documents that outline differences but I
doubt any of them outline them all.
no
a language isn't faster than another language... An
implementation of certain language may be faster than another
implementation of some or another language...
not necessarily, java runtime is very heavy weight and goes
right to OS level very fast
one that is quite complete?
i don't know of one.
but doesn't c++ go right to the processor?
yes. c++ is typically compiled to native code.
there are things that require really exact and hand made
memory managment... you can't acomplish some of those in
java...
for certain things one may be faster than the other
sure but how often do you require exact and hand made
management?
i've never done it...
ok then
in fact i've never handed memory by hand in c++
but anyway.... it's possible to do it...
how can you not handle memory by hand in c++
...
using the appropiated things...
That is ...
like smart ptrs, and containers...
just understand the rules!
with new comes delete
smart pointers suck
with malloc comes free
hi all. i interviewed for a java/j2ee job the other day at a
major bank and they didn't even give me a technical interview ...
does that say anything about the company or department?
i can have garbage collector in c++ if i want...
chrisjw, it becomes much more complicated when you're using 3rd
party libraries
no
Exact memory addresses with pointer manipulation (e.g. CFoo* foo
= new (0x234242)CFoo()
Pegazus, all based on reference counting, which suckass
have a look at http://www.idiom.com/~zilla/Computer/javaCbenchmark.html
and google "java vs c++"
i almost never use new or delete in my c++ programs...
[TechGuy], yeah, you have fun with that ;-)
do you use your own allocators?
sometimes...
You seem to be asking about language differences that are
pointless to your usage.
Sorry to interrupt your debate-- but what's the function[s]
required to remove the default keyboard handling of a JScrollPane?
Like, when the user presses the arrow button, I don't want the
scrollpane to move.
Java is now nearly equal to (or faster than) C++ on low-level
and numeric benchmarks? O_o...
java doesn't have functions
methods!
i was just answering to some things someone said...
look in the javadocs for the _METHOD_
ScottishPig, InputMap and ActionMap
ScottishPig, remove the default keybindings from there
pfn, Thanks.
r0bby, Sorry for insulting you with procedural-speak.
sorry for attacking you
pr3d4t0r?
Yo'.
it's member function
=P
hey pr3d4t0r can I PM ya?
how does java compare to the .NET framework?
Sure.
it seems very similar
They aren't.
.Net is Windows-only.
they both use JIT
hmm, Mono?
Mono is not .Net.
Well.. .NET has the potential to be operating system
dependent
mono is .NET
No, it's not.
Mono is a compatible .NET clone
I know what it is.
http://www.mono-project.com/Main_Page
it says it there
And no, it's not .Net.
Just like gcj is not Java.
I said .net clone
pr3d4t0r knows his shit
don't argue
ugh, I hate how java caches dns lookups forever
hmm
is that ever going to be fixed...
There is a major difference between implementing a language,
and truly calling yourself that language
.NET isn't actually a language, but ok
.NET is a framework
framework or runtime or something
s/language/platform/
.Net is a framework designed by Microsoft to run on
yeah, that, platform
Windows.
mono claims to work well on the platforms that it's implemented
on....
Mono is a clone not endorsed, licensed, or otherwise related to
.Net beyond attempting compatibility with it.
running on the Common Language Runtime
Yeah, but it isn't .Net.
I tested a few .NET only programs on Mono and they worked
about as working as wine
And if Microsoft wants to break it, they will.
no one is calling it .Net anymore
they aren't?
pr3d4t0r, of course, there's always that problem, but .net is
also an ecma standard...
I mean here and now
OKi.
ok so other than compatibility.. what is the advantages of java
over .NET
pr3d4t0r, ms also tried to screw up java by breaking it...
chrisjw, java is ported to more platforms
*sigh*. The *CLI* is an ECMA standard
the CLI?
anything other than compatibility
Common Language Infrastructure
Common Language Interfac.
common language interface
Er, Infrastructure.
ok, in that case, it sounds utterly worthless
That's a tiny part of .NEt.
nothing else about .net is standardized?
C#
The Base Class Libraries (part of the CLI)
Otherwise, it's an MS marketspin
Just like MSIL is really CIL
so is a .NET application slower than a java application?
does .Net have anything like the JVM?
Does .NET have a smaller set of libraries?
That's the CLR
#dotnet can tell you all about it.
We don't know, or care, really, beyond the standard marketroid
speak.
.NET uses some kind of pre-startup-JIT, IIRC, I dunno what Java
does
Debatable. The CLR's JITer is less advanced. But most Windows
.Net is pre-compiled to native code with NGen
You're welcome
Anyway.
hmm
if i am doing something such as "chello"
[TechGuy]: as if
is there any way I can do something like
r"chello"
wtf is it resolving 'lnxec395' to 127.0.0.2, while dns says
9.30.155.251
and have it ignore the escape sequences?
similar to python
[TechGuy]: maybe a drunken charles barkley could keep up
;p
no
18 PDT] 00000031 BuildDispatch E Unable to connect to host
lnxec395, error=Connection refused to host: 127.0.0.2;
nested
b18 PDT] 00000031 BuildDispatch E Unable to connect to host
lnxec395, error=Connection refused to host: 127.0.0.2; nested/b
127.0.0.2??? wtf
local VPN tunnel
?
no
hmm, I wonder if nscd has anything to do with it
is it possible to iterate through a collection using some
kind of for each loop?
collection) { ... }
~tell chrisjw about foreach
fooList) { foo.setBar(baz); } " more at http://java.sun.com/j2se/1.5.0/docs/guide/language/foreach.html
ok, it wasn't nscd... wtf is going on
Evening all.
Doncha just hate it when you need to hack and, for whatever
reason, you're restless and want to do anything but?
usually that's me at 2:30am
hiya puff
re all.
puff whats worse is waking up at 5am and going straight to
the computer and pulling 5 hours
upuff whats worse is waking up at 5am and going straight to the
computer and pulling 5 hours/u
.
idiot..I was trying to read a HashMap w/o reading the actual
file into it
what's a HashMap?
it's a piece of paper that tells you where you left your
stash
ok
The piece of paper is *made from* your stashj
oh man this is good
If anyone is familiar with Wicket, I'm really having some
issues here. I'm trying to include a stylesheet, and I've read at
least 5-6 different articles and wiki stuff trying to get it. As
stated, I put site.css into the same area as my java files, and
added this line: add(new StyleSheetReference("sitecss", getClass(),
"site.css")); and modified the front.html to handle it. The problem
is that the browser won't include the .css file,
and it gives me the link doing this, of which doesn't work - it
just executes the servlet anyways...so the browser won't ever see
the css file. Any suggestions on why this is happening? My guess is
the web.xml, but I also googled information on that, and others
with the css problem fixed their problem and still had a similar
web.xml as me.
wtf?
hmm?
look at HeaderContributor
I'll relook that information up, unfortunately I read parts of
that already and may have tried it - but will do so again and
check.
pr3d4t0r
http://wicketframework.org/apidocs/wicket/behavior/HeaderContributor.html
look at forCss()
pr3d4t0r because youre lazy... heres a round robin for the site:
http://eugeneciurana.com/pastebin/pastebin.php?show=2410
.. heres it working: http://beerwench.net/rr.php ...
and here are the images its using: http://beerwench.net/logos.html
Looking at the following swing example is it good practice to
use invokeLater?
http://java.sun.com/docs/books/tutorial/uiswing/examples/start/HelloWorldSwingProject/src/start//HelloWorldSwing.java
I've usually just called my GUI classes from main
but not sure if this is a good method or not
updates to the GUI, and ONLY updates to the GUI, should be
done on the event dispatch thread.
Yeah, been to those api docs already, sometimes helpful,
largely speaking with my knowledge of this framework it's not that
helpful. Spending more time reading wiki docs, but still googling
for that again, trying to find where I last read about
it.
although if no components are realized yet it doesn't really
matter.
that's the method you should use
actually that's not true. you should always do that stuff on the
EDT
there are issues, e.g., on solaris that can lock things up.
really? hmph. well, screw solaris! i always use the EDT anyway,
but i did not realize that could be a problem
really? hmph. well, screw solaris! i always use the EDT anyway,
but i did not realize that could be a problem
cay horstmann just blogged about it.
nmx so is that a good example or no?
should I dispatch my UI's like that?
yes. it is correct.
never ever work with swing outside of the EDT.
weird I didnt learn it that way in school
man college sucks
you were taught wrong
what are the benefits of dispatching the UI from EDT?
read this:
http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html
it's not a benefit. it's a requirement.
~edt
Well, none of these options are working. The link given from
the link css source location file, which is proving to be the same
regardless of whatever option I use, is not working - it gives me a
link, if I throw that into the address bar it will not work - it
just launches the servlet like normal.
yes. it will go through the wicket servlet.
At the moment, static content won't load either is my guess,
images and pictures and so on.
I just tried this idea here just a min ago in hopes it'd work:
http://cwiki.apache.org/WICKET/adding-javascript-or-css-using-a-resource.html
do you know a page on which I could play some video
presentations of this or that technology in Java????
java.net has a few, rife has a few
rife?
rifers.org
tss has a few videos from eugene
From the URL given the the HTML, I should be able to throw
that in the location bar and get the CSS - the browser of course
needs this, but when I do that - it launches the servlet itself. My
url pattern is just url-pattern//url-pattern, the rest is pretty
much from the quickstart itself.
oh, thank you
Do most java developers know swing?
probably not
i mean like is it something that every java dev should
probably learn
I like swing but its so complex
well not complex but large
is there a way to setup a runtime type constant ?
a what?
a unchangeable variable at run time
swing has a lot of 'stuff' but it basically all works the
same way.
i have done very little swing programming and i've been using
java for almost 11 years now.
i've done a ton of swing programming personally but it just
depends on what you're doing
swing is a lot nicer than the alternative
although its still ugly
any ideas on a runtime constant ?
a final variable?
sounds that way
yes but thats a compile time constant final static string
i need to set the constant after my program start
are you just throwing words together now?
i didn't say 'compile' 'time' 'constant' 'static' or
'string'
public static final String MYSTRING = "TEST";
we all know what that is right?
:: yawn ::
read what i said again.
Ah, my article about the iPhone for TSS is coming along
great.
http://eugeneciurana.com/pastebin/pastebin.php?show=2411
add the round robin for the images
yay! more non SS stuff on TSS
your right i got retarded there for a second and started
seeing things
No.
I'd do it if you took it seriously.
im confused
if its final i can assign it once... but if its static I can
not?
static final.
are you going to get an iPhone?
nmx in this example I see awt eventQueue
http://java.sun.com/docs/books/tutorial/uiswing/examples/learn/CelsiusConverterProject/src/learn/CelsiusConverterGUI.java
No.
It's a bad deal.
should I use the awk or swing invoker?
the awk?
and it's only available for GSM/EDGE
That's wonderful.
err awt
no, you can still assign it once. either when you declare it,
or in a static initializer block
GSM is where it's at, baby!
CDMA is growing. Only Europe rejects CDMA.
static initializer block... hmm
CDMA is projected to overtake GSM in China and India
swing is based off of awt. use swing.
CDMA phones generally use SIM cards outside of North America,
too
hi. i am using ubuntu feisty with locale en_US-UTF-8, and
working with netbeans, now trying to internationalize a project
into Chinese, but cannot get it display correctly. it should be
problema of encoding of the properties file, but tried to encoding
it into UTF-8, but no lucky?? somebody give me a tips
please??
so the handsets are migratable between CDMA networks in Asia,
etc.
I'm a eurocentric kinda chap.
also, not every awt class was refactored into the swing
packages. only the ones that needed to be
use a CharsetEncoder
how do you get a static initializer block in main....?
http://www.cdg.org/worldwide/index.asp
Europe is a complete hold-out
Except for Ireland, Scotland and Portugal
I'll get an iphone and report the good and ugly
~tell KWhat about google java static initializer block
KWhat, http://www.google.com/search?q=java+static+initializer+block
Europe, Mexico, and the US are where I'm interested on having
phone service.
not totally convinced the good will out weigh the bad
And all those are GSM.
I basically wanted to take a cli arg and set its value to a
constant
waz:
i think Europe should get CDMA
You'll like my article tomorrow.
cool
CDMA is way fucking faster than GSM..
If and when
GSM/Edge Maxes out at 1mbps
CDMA can exceed 7mbps
If my phone gets faster I'll sound like Minnie Mouse.
then you're SOL. use a read-only field instead.
I just want to *talk*.
If I want speed I go WiFi.
not to mention that GSM's single-channel capacity is like 25
conversations, and has shit handoff
pr3d4t0r apparently never leaves civilization
CDMA has like, hundreds of conversations per
single-channel
try #cellphones for all this
GSM--
heh
And I know as a fact that the fucking carriers (in the US) cap
the speed so they don't have to beef their infrastructure up.
No. What do you think, that I live in Indiana or
sumethin'?
uNo. What do you think, that I live in Indiana or
sumethin'?/u
Nah. He thinks you live in Ohio
Fanook, thx... loooking at it now
plenty of coverage here but I get the chance frequently to do
things like hang out at a lake but only if I can do some
work
and there's no wifi or high speed
but my phone saves me
telus here doesn't cap. :P
I live here.
http://www.mvflex.org/mikes/EVDO-Wirelesstest.jpg
And again, I don't care. When I'm there it's never for more
than a few days.
sure. if i went to Europe a lot. i couldn't have a CDMA
phone
and actually, that might be the case soon. which will be very
annoying
you think it would be a bad idea to use System.setProperty? What
I would like to take at runtime is a path to some config files so
the bin can run in /usr/bin or somewhere and config could be in
~/config or /etc/config
cbrock: please take this somewhere else.
we're done
my phone is J2ME-based.
:P
J2ME is another joke, and also thanks to the US carriers.
And in small measure, thanks to the handset manufacturers.
not if you have a Blackberry. which you hate.
the Blackberry OS is 100% j2ME
Crackberry?
The BES system is an abomination of code
:: shrug ::
J2ME is still a joke.
I have never seen such a shitty server system that doesn't
work for inexplicable reasons
tis over, ginobili just sealed it
you're in san fran right?
Right.
Left
openmoko, baby.
:P
hey, i'll finally get to go to JavaOne on somone elses dime next
year (so I'll go)
:P
Nice.
OKi, dinner fixin' time.
that's the only way to go to J1
just not worth the money
yep
well, i basically HAVE to go now. so it's part of the
job.
cheeser... heh
Fanook, i had to use native2ascii tool to covert the properties
file
Anybody is there, for generating Report which tool is best for
java
~tell E-nnovative about jasper
E-nnovative, I have no idea what jasper is.
grr
No factoid for Jasper?
jasperreports
nope. Not in there either
[TechGuy], Jasper is free and opensource?
depending on your definitions, yes
[TechGuy], where can i download?
Jasper is the tomcat JSP compiler...
and what a marvelous JSP compiler it is!
~tell E-nnovative about google jasper reports
E-nnovative, http://www.google.com/search?q=jasper+reports
~Jasper
jasper reports != jasper fwiw
E-nnovative, I have no idea what Jasper is.
~jasperreports
cheeser, I have no idea what jasperreports is.
you suck
A tool is only as good as its user. Tool.
Bite me
See, now the bot sounds a bit British
"I bit down on me own leg!"
He, he, he...
ignore++
question, why is it when i import ava.awt.Point .. and i
create a new point i can set and get the x and y variables in the
object with just pointObj.x
how did they do that? :s did they just make that variable public
or something?
Because pointObj is a POJO with public object references.
The object is used as a "record".
i thought you always had to do .. .getX() and .setX() type
things :s isnt making the variable thing public like um .. not good
or something .. lol
Objects like these tend to be unambiguous too, so exposing
the internals carries no harm, and they tend to not have any
methods.
oh okay ty very much, i didnt know you could do that .. that
makes things so much easier .. ive always been doing set() and
get() crap when i could just have it as a public variable
lol this way is a lot nicer ...
DO NOT JUST HAVE PUBLIC VARIABLES.
nop? :s
That's for very specialized cases, as I said.
If you have a non-trivial object, accessors are the way to
go.
okay so if i had a class that had an int i would be accessing
a lot you say that pancakes.totalVal wouldnt be a good way to edit
/ get the variable?
i mean if it would make sense to have a variable public would that
be okay? i mean i never had any of my variables public before .. im
jusst wondering if there's any case where i could, you
know?
Whether it's an int or a window or a jiraffe makes no
difference.
int total = panckakes.getTotal();
What makes a difference is the semantics of the object.
~encapsulation
Fanook, encapsulation is well-defined in a language-neutral
paper at:
http://www.tattvum.com/Articles/2002/2002-03/2002-03-24/Ramu-SE-20001228-OOP=E+P.html
The only reason why Point and Dimension are *sort of* OKi
doing that is because there is no ambiguity in defining them as
records with exposed public members.
ALWAYS encapsulate as much as possible
unless you have an explicit reason to not do it, always do
it
x is an unambiguous attribute that only has *one* use and
it's not likely to change because of the implementation of Point or
Dimension.
only exception is constants
Go learn some OOP basics
~tell koshe about oo
koshe, The term "object-oriented" has different meaning to
different people; in a Java context it refers to a combination of
polymorphism, interface inheritance, and behavioral inheritance.
See http://java.sun.com/docs/books/tutorial/java/concepts/
for more info. In general, saying things like "good object-oriented
design" doesn't really mean anything and is not conducive to
constructive conversation.
read that
Then you'll understand why, although this breaks
encapsulation, it's sort of OKi as an exception to the
rule.
In general it IS NOT OK. It's just NOT SO BAD in this
case.
when you make a variable public anyclass that you create the
object the variable is pretty much global in the entire class in
all methods?
Uh... yes.
Whatever I think you said -- yes.
the reason for encapsulation is this: say I have a field, and
certain methods rely on that field being within certain
constraints, and a client changes that to a value outside of those
constraints, bad things will happen
So don't do it.
okay .. lol .. you just needed to say that i figured thats what
you guys meant .. you dont need to give me a whole freakin book on
what oop is
Actually, yes we do :0
You're here asking for help. We're willing to give it to
you.
we're not here to teach you
Don't blame us if you shoot yourself in the foot
o/
*glee* toho's releasing the original versions of the godzilla
movies
we're here to _HELP_ you
..
don't get the two mixed up
Part of helping you is telling you "dude, you need to learn
THIS or THAT". After all, except for meeper, assume that people
here are more experienced and may know better how to do
things
And slava and dibblego, on the random full harvest moon that
they're around
don't listen to them, all you need is a a public of static
methods an a few arrays.
Damn.
err
i'm too tired
"Legend Stan Lee developing Paris Hilton animated series for
MTV."
Scary.
WTF
haha
*sigh*
heh
I'm actually wearing steel-toe boots.
~tell cbrock about pulp fiction
cbrock, I'm sorry. Did I break your concentration?
comon. that was a little bit funny.
i just asked a question about one specific thing .. i started
learning java like last fall you dont need to assume i know nothing
else about the language :/
He told me to!
cbrock:
we handed you resources
~literal pulp fiction
reply(You feel that sting, big boy, huh? That's pride FUCKIN'
with you! You gotta fight through that shit!|Say what again. SAY
WHAT AGAIN. I dare you, I double dare you, motherfucker. Say what
one more goddamn time.|English, motherfucker, do you speak
it?|Zed's dead, baby. Zed's dead.|Well, let's not start sucking
each other's dicks quite yet.|I'm sorry. Did I break your
concentration?)
Do you see a sign out front of my house....
encapsulation is there for the safety of your object's
state
well, i'm telling you to kick r0bby.
zed is not dead!
for having a 0 in his name instead of an 'o'
like pr3d4t0r ?
i'll excuse the double standard for you
you expect people to read some entire tutorial on a link you
just throw up r0bby? when that has barely anything to do with the
question they asked :s
look at his nick, that'd make him a hypocrite
k i get it
here we go...
/kick r0bby
oh brother...
lol
~w00t
w00000000000000000000000000000t!!!!!!11!!!!!!!!
It didn't work. This gizmo is broken.
/kick r0bby
Hrm...
Let me try on someone else.
Hahaha
lol
hey that worked
HAHA
I guess.
lol
alright. i hate all of you.
lol
We do too
~tell cbrock about Russian roulette
cbrock, click
~tell cbrock about Russian roulette
cbrock, click
~tell cbrock about Russian roulette
cbrock, bang! - you're dead
You can find hte door
its ok, dude
American components, Russian components... All made in
Taiwan!
[TechGuy]: Fuck that movie. Fuck ben Afflack...and I'd fuck Liv
Tyler
whoa
public class SlotMachine { private double money; ... } now in
the case of that example, what happens if the machine has a
NEGATIVE value for money?
it makes no sense
private? And double?
~ridicule r0bby
WAT!
then the pancakes wouldnt be hot
throw an exception?
crap
why not private and double?
~smack r0bby
what the fuck is wrong with a private double?
yeah
dude i know that if the variable requires logic before being
accepted you need to have accessor methods ...
thats pretty obvious ..
~smack [TechGuy]
I'm assuming you wanted it to be a public field to show off
why koshe's approach would be problematic
[TechGuy]: no i did that intentionally
you cant have a negative pancake
*shrug*
unsigned double?
i like negative pancakes
I have negative pancakes right now
:o
-pancake = waffle
oui!
of course not, BUT ALWAYS use accessor/mutator methods
getMoney
setMoney
if you don't chuck norris will beat you down
POJO
and trust me, when he beats you, you'll wish he was your
daddy...I lost my train of thought
a public member variable
?
is that what koshe wants to do?
yes
why do you think i'm explaining why encapsulation exists?
i was wondering why Point class uses pointObj.x and pointObj.y
karstensrage ......
java.awt.Point
i never used a public variable before and i was wondering what
cases you could use one in
there are sometimes appropriate times to bypass the
encapsulation paradigm. i doubt kosche has stumbled on one of them.
on the other hand, java 1.5 and better has accessor-erasure as a
basic optimzation now.
and everyone else is all like BLAHBLAHBLAH YOU DUMB read the
basics of oop /me throws a random link up with javabot
oh
~POJO
svm_invictvs, POJO is Plain Old Java Objects, as opposed to
things like EJBs.
im guessing cause getX and getY return the double values
I thought POJO was some kind of chineese food....
and you cant have overloading with different return
types
more like bean
but I would guess thats a very rare example
AWT is even cruftier and odder than Swing
lol swing is pretty strange o_O
For a job interview question they asked me, "What is
Swing?"
was it yesterday? :s
many JDK classes use direct field accesss internally.
particularily the collections classes.
sometimes you can that; not use encapsulation. But in general,
Don't. If you do, I'll show up at your door.
hostile ..
"Uh...Java's UI framework..."
Something you push your kids on at the park
Isn't that sort of a broad qusetion.
me like swing
[TechGuy]: A style of music commonly associated with the big
band genre?
Indeed!
I play in one
They asked the most painfully simple questions for this job
interview.
"What is inheritance?"
"What is a class?"
hopefully a lot
did you walk out of the interview, after taking a poo on the
desk?
no
a place for students to sleep
It was on the phone.
did you poo on the phone?
Inheritance is something you get when people die
that's the OO way to get rich.
Swing? It's what Benny Goodman was the king of.
I heard that joke someplace
I said, "To be truly pedantic, a class defines a data
structure and the operations on that structure. And an object is an
instance of a class."
was this a job interview for writing OO for dummies
He goes, "Well, I was gonna ask what an object is....but
we'll move on."
~Profilers
A profiler is a tool to find performance bottlenecks. jmp and
ejp are free; jprofiler and jprobe cost money. Some more are listed
here: http://javafaq.mine.nu/lookup?169
also see http://yourkit.com (not
free)
I walked out of an interview once, because they were quizzing me
on specific Swing API shit.
heh
I had an interview where somebody asked me to explain
private, public, etc.
I did.
This guy asked, "What happens if you have two threads access an
array list at the same time."
Then they said "and what about package"?
I just said, "Undefined Behavior."
And I said, "Well, package is, well, package."
And he goes, "And...what happens then?"
lol
after undefined
I would've said "at the *exact same time*?"
An Exception is thrown and the program blows up
The phone went silent for like 30 seconds.
He had a bit ego, I think he felt threatened by me. :-).
What's unclear about Undefined Behavior?
well, if both threads are just reading, nothing bad
happens
yep
That's where you say, "Well, it depends on your JVM
implementation and your underlying threading platform. Do you
understand how the java memory model works?"
It's undefined, thus unclear.
well did you get the job?
no, whatever exactly he asked he was refering to a situation
where you end up invoking UB.
based on the question, nothing happens. everything is fine.
he didn't say the threads was modifying the array.
Actually, that's would have been a good answer, "Well, if it's
*my* code, an excpetion is thrown, because I don't allow that sort
of thing."
"fuck you. next question."
UB?
Undefined Behavior
undef behavior
oh
I got a second interview but declined.
undefined behavior is fun. any answer you give is technically
correct
Come to think of it, two or three interviews ago I had to
argue with their chief architect about why double-checked locking
was broken :-).
uCome to think of it, two or three interviews ago I had to argue
with their chief architect about why double-checked locking was
broken :-)./u
OR rather, he didn't understand why it was, so I just shrugged and
said, "well, you can ask Doug Lea about it."
OR rather, he didn't understand why it was, so I just shrugged
and said, "well, you can ask Doug Lea about it."
red hat didn't really ask my anything technical in my
interview.
what did they hire you for?
Then he brought up, I think it was the volatile keyword,
which I didn't get into but yes, these days you can use that
keyword to do double-checked locking safely, but in performance
terms it's a wash in the end, costs as much, and now your code
isn't as clear.
Fortunately, I didn't really want that job.
Double checked locking?
i don't think anything related to the actual *act of
programming* ever even came up
what?
the best interviews ive had is where the guy brings an actual
problem hes trying to solve and we both brain storm on
it
Sr. Software Engineer
Yeah, that was my last interview.
don't use volatile to do double checked locking. that's just
stupid.
and they hired you?
I wasn't the one suggesting it :-).
yeah, i start in a few weeks.
I just looked it up...
nice
Unfortunately, the problem he was trying to solve was a
classic.
unfortunately?
It was "well, business has signed on to do this deal which
means we have to have this project out the door in 60
days.
though it makes me doubt even more redhat's intent to do
serious tech instead of just selling support
oh
oof
i work on OSS projects, and the interviewer was familiar with
my work.
forget that
And the fun part was he had no clue about the app.
what projects?
they didn't need to ASK me about my competency
Double Checked locking...
~double checked locking
I guess the factoid '-xlint:unchecked' might be
appropriate:
Basically, private-branding an existing app that stock
traders at this bank used internally, to be used by another
bank.
svm_invictvs, -xlint:unchecked is a compile-time warning. For
more details,
http://qa.jtiger.org/GetQAndA.action?qids=70&showAnswers=true
well, this is the real one that got my hired: http://mvel.codehaus.org
So okay, how many classes is it? Dunno. How many LOC? Dunno.
How many screens? Dunno.
:-).
ah well that's that then
Okay, you know what a singleton is?
lol
Yeah, I'm reading about it. This article from IBM.
something seems just not kosher about if(foo == null) {
sync(obj) {if (foo==null) { ...} } }
You wrote mvel?
you're gonna work for red hat?
today I spent 2.5 hours discussing whether the email subject
should be (karstensrage) your shit failed
You're correct.
or your shiit failed (karstensrage)
no?
It's a stupid dodge for questionable gains, and likely to
work quite nicely 999,999 times out of a million.
YES
i signed my employment contract today
awesome
congrats cbrock
I wouldn't have been able to actually call that out as
"double-checked locking"..
Sorry, misunderstood your "this is the real one that got my
hired" comment.
It's overoptimization...
well, this is the real one that got my hired: http://mvel.codehaus.org
Well, there's a semi-famous (in certain circles) paper titled
something like "Double-Checked Locking Is Broken", signed by a
bunch of concurrent programming luminaries, including Doug
Lea.
http://www.ibm.com/developerworks/library/j-dcl.html
puff karstensrage == cbrock, it is a conspiracy.
?
Yeah, but what I'm saying is why the fuck not just do public
synchronized static getInstance() { if instance == null return
instance = new Foo() }
that's what you should do. the problem is geeks are
stupid.
Most likely, since all threads are sharing that object anyhow
the objet itself is going to have copious amounts of synch blocks
as well.
Here's the thing about that style; the java memory model
basically does not guarantee that the if / initailziation lines
will come in sequence.
they think if they can squeeze out an extra 3% performance it's
worth introducing subtle, unpredictable bugs into their program.
It's the whole stupid male we-can-make-it-bigger-stronger-faster
mentality that obsesses about performance
That is, the initialization may only be half-completed when the
reference is returned.
a better solution to the DCL problem in Java is just to have
the instance method stored in a seperate class all together
err
the instance field
that's not a better solution
Factory Pattern?
My work here is done ;-).
http://rafb.net/p/UqLen131.html
or in most cases that will probably just do fine...
the structure of java's memory model makes the ... if (inst ==
null) { synchronized (this) { ... // initialize; } }
idiom safe
good night
if the instance is physically in another class
so
it's still stupid
back up why meeper.
if (HolderClass.inst == null) { synchronized (this) {
HolderClass.inst = new Instance() } } return
HolderClass.inst;
given the way Java's memory model works
it is a somewhat acceptable work-around
well let's see, it's unclear, it's class bloat, and it's the
silly kind of performance optimization which never translates into
any real gain. it's masturbation.
That always leads to satisfaction
...
what's your solution?
http://rafb.net/p/LeUUMP20.html
or just do taht because most likely calling getInstance() isn't
going to be a fucking bottleneck anyhow...
the other reliable option, is to your ThreadLocals
which are umm... not the most performant solution
It's just somebody being a ricer with java code.
it is perfectly 'performant' because the gain of DCL is totally
neglible
DCL is a total waste unless you're using jdk 1.1
I mean...this isnt' eaxctly java....but in some languages
memory allocation has to be protected by a mutex...
like I think in C, you can only have one thread calling malloc()
at a time.
does meeper have rabies?
he's foaming at the mouth.
he just thinks on a different level.
no that's not true, though I imagine some C implementations
may sync mutex
yeah, but it's implementation specific
cbrock, meeper thinks on a different level
rabies, no, zero patience for stupidity, yes
and yes, I think on a different level
it's like the fifth dimension. you're familiar with the fifth
dimension?
And even if you, the application programmer, dont' have to
protect malloc with a mutex that's not to say that malloc itself
wont' block out other threads...
my two cents...
malloc is threadsafe, whether it uses a lock or not doesn't
really matter tho I think most malloc impls do use a global
lock
that's a pretty bold statement.
I think on a different level
in fact, malloc() and free() are not neccessarily threadsafe...
at least in glibc unless _REENTRANT is defined.
dude, they're threadsafe. I'm sure you can do magic to make them
not threadsafe, but in reality malloc is always threadsafe
they are either threadsafe of they are not. if there are
scenarios by which they could not be threadsafe, then they are
not
this war was fought long time ago. the silly C++ programmers
who wanted to make malloc not threadsafe for "performance" were
fought off
there is no such thing as "mostly threadsafe" or "generally
threadsafe in most situations"
hi
hey
well yes, if you'redumb. but like I said, in reality they are
always threadsafe
meeper how old are you? You strike me as an old man
gone senile
stuck in his eyes
s/eyes/ways/
!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate
Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
has two separate things in quotation marks after public?
net split? :s
awesome
ah nop :s where's everyone going then?
hi use to program in gcc now I want to learn java I have some
question regarding this
:O you ended your sentence with a preposition
hello there
~tell dhakatel about getstarted
dhakatel, getstarted is http://java.sun.com/tutorial/getStarted
there's your answer.
he hasn't even asked his question yet .. _
I read this articales
ah
okay, then just ask
but I don't get my answers
you assume too much mister
where is select poll (io multiplexing in java)
where is fork in java
where is pipe named piple fofi in java
for something like select, check the nio package and async
sockets
where is share memory in java
anyone aware if you can setup a functional junit test to mess
around with the database with a service object, do some stuff and
just roll back all the writes?
basically I need to port a program to gcc to java
~tell dhakatel about nio
dhakatel, nio is http://java.sun.com/j2se/1.5.0/docs/guide/nio/
and http://java.sun.com/docs/books/tutorial/essential/io/nio.html
and http://gee.cs.oswego.edu/dl/cpjslides/nio.pdf
I don't think java has fork, it's a unixism, but you can have
multiple threads and launch other processes
junit. but you'll have to write the code yourself and first try
it with a stub
there's something called dbunit, don't know much about it
though
http://papernapkin.org/pastebin/view/599
thanks
thinking of doing something like this
is there any exec function in java?
and you can use a memory database (a mockup of the real
database)
~tell dhakatel about javadoc Runtime
dhakatel, please see java.lang.Runtime: http://java.sun.com/javase/6/docs/api/java/lang/Runtime.html
aditsu, rollback keeps failing on me
I don't know about "piple fofi" and shared memory
pipe named pipe
fifo
http://forum.springframework.org/showthread.php?t=11658
if you can switch from multitasking to multithreading, you
can replace these with direct data access
it was a spelling mistake
yap
I think Java cheats and just exposes named pipes as files.
But I've not really done anything with them.
so there is no inter process communication in java except socket
?
java has threads, it doesn't need i[c
err ipc
Oh, Java does have pipes after all. I think they're just for
interthread communication though.
whatever you're doing with ipc can probably be done
cheaper/faster/better with threads
there's some kind of direct inter-jvm communication, don't
know much about it though
if you need real ipc, then use jms, specifically activemq,
google activemq
Is there? Everything I've seen is built on top of
sockets.
thaks a lot
*thanks
no there's not, aditsu is drunk
a jvm is a machine. there is no inter-jvm communication but
sockets, that is the communication between machines
I heard about it
As much as I hate to, unless you can be more specific I'm going
to side with meeper on this one.
why don't you completely rewrite the application, rather than
converting line by line?
yeah, I'm looking for more info before smiting meeper
Even if he does that, it's probably still worth translating
some of the concepts rather than coming up with a completely new
architecture.
that's what I have to do as per as this discation
There are worse things to do than diving in and getting your
hands dirty with NIO.
ah
hehe, I know this like the back of my hand
there are two ways to pass info between jvms, sockets and memory
mapped files and nobody with half a brain ever uses memory mapped
files
sun has repeatedly emphasized this, a jvm is a machine
there have been countless proposals for true shmem within jvms
but sun is all like, the network is the computer
There are a bunch of abstractions for JVM interaction like
terracotta (yes meeper, I know you don't like it. We don't need to
hear the rant again), but they're all just built on top of the
lower level primitives like sockets. Maybe you're thinking of one
of those.
terracotta terracotta terracotta pie!
Hmm. I'm glad this code isn't going to be reviewed by anyone
but me.
I'd get shot for the amount of package private access modifiers
I'm using.
why is that?
that's a bad thing?
what time is it? Don't you sleep?
6am for him
package private is nice until you move a class out of the
package, then stuff starts breaking ;P
ah
how can I use syslog form java
I like it too, but people laways complain about it.
and?
~Logger4j
r0bby, I have no idea what Logger4j is.
~Log4j
r0bby, Log4j is a logging system for java. See http://logging.apache.org/log4j/docs/index.html.
stuff usually does when you randomly move things around without
updating references
there we go
It's 7 AM. My body has decided recently that I'm not allowed
more than about 5-6 hours sleep. Previously I'd been failing to
sleep until 4, but I@ve managed to shift the sleep period about 5
hours back.
who complains?
People in here mostly. It seems to be grouped with * imports
and static interfaces as 'bad practices' which I like.
well anything that gets in the way of their bassackwards
hackery
HEY! no killing him
he's my friend
wow people actually use java
hey, you still got me babe
not the same :'(
granted, i'll be asleep, but still ;P
you people are SPOILT
hell, i SHOULD be sleeping now, need to be at work in 6 hrs for
a morning of db2 seminars
like eggs
ok, I guess I was misinformed (either that or it was
something to do with memory mapped files)
however, claiming I'm drink is just stupid
drunk*
i'd say that clinches it
So is he, so it's okay
Hi!
i need some help
Heh. I think it's mostly an argument about what the right
level of granularity for a program is. Some people seem very hung
up about program granularity being class centric, and I think where
a number of these complaints come from (particularly the 'moving a
class to another package' one. Private fields are bad too - they
stop you moving methods to other classes.)
~ask
The Ask To Ask protocol wastes more bandwidth than any version
of the Ask protocol, so just ask your question.
actually i am making a remote administeration client, which
will have emulated terminal, service management, and alert system
in java
heh, bad-timed typo
what do you think, how much ram should a mobile phone have to
support that? and what about disk space?
~tell Cursed_6_Ds about j2me
Cursed_6_Ds, j2me is the Java Micro Edition. It is used for
embedded devices such as cell phones and PDAs. See http://java.sun.com/javame/index.jsp
and #j2me
yup
there is a channel more specialized to j2me
Hmm. ANd the compiler suddenly goes batshit insane. Yay!
define "batshit insane"
It's refusing to accept covariant return types and is
complaining that I cannot apply operator == to MyClass,
nulltype.
Oh, how dull.
It just somehow got really confused by a missing import.
DRMacIver, wow
in C++ you'd be lucky if thats all the compiler did
batshit instame
insane...
there is no one there to helkp me enough
In C++ you're lucky if the compiler doesn't break into your
house and kill your children.
and your cat
I hope the compiler kills the one that scratches me all the
time
the other one is nice
(cat)
I thought you were talking about Java. I had a club in my
hand ready to act. :P
um, its not a club, even if your gf tells you that to make
you feel better
That's just mean.
tell her not me
I wonder if Java has been ported to syllable yet. Hmm.
whats syllable
A hobbyist OS.
Sort of like Amiga was back in the day.
I think sun is going to get right on it
I wasn't referring to Sun.
I say do it when you least suspect you'd do it. Like waking up
at 3am prior to your trip just to open it and then go back to
sleep.
uncork it now, because it may get lost on your trip
pr3d4t0r
I hope not.
This pen has too many adventures to tell.
Well, technically it isn't the same pen anymore, but
nevertheless the original's soul lives in this one.
The original was stolen, along with my wallet, last 17.Sep. The
police found it and got it back to me around 3-4 weeks ago.
The manufacturer replaced it at no charge to me, to thank me for
being a good customer.
It was a hell of a gesture, considering that the pen hasn't been
available to the public since 2000 and the remaining ones out there
are all collectibles now.
So I'm a bit reluctant to fill it with ink and start using it. I
don't want to lose it again.
well it's a pen after all.
Then again, sitting in its box away from the limelight isn't
doing anyone any good
exactly.
right time to go and add SAP a/c's for norway :/
Heh.
I'm going to Oslo in September
Yey!
nice, and barcelona as well i hear
there are a lot of flamers in oslo
maybe i should set all thier passwords to flamers so.
anyway, gtg
You should know.
Nice... 888 views so far.
pr3d4t0r, I almost didn't get out
pr3d4t0r, http://www.gimpel.com/html/bugs.htm
Heh.
pr3d4t0r, its surprisingly fun
arg hsqldb does not have boolean?
*sigh* WARNING - USERS.ACTIVE data type (16,
ëBOOLEANí) not recognized and will be ignored. See FAQ
for more information.