Archive for September, 2007

I have a set of objects each associated with a connection The object only contains a channel and an Integer field

can anyone look at this and tell me why a ParseException is being made?
http://pastebin.ca/647375
I can’t see any reason why the SimpleDateFormat class cannot parse that string, but for some reason it gives an ParseException

how are you passing the date in the string?

eh?

nevermind
hadn’t looked at code yet

lol, you got the pastebin then
g[r]eek: turns out that if I set the locale to new Locale(“en”,”GB”) instead of Locale.getDefault() it works fine
my locale here is spanish, I think maybe it has a problem with this date format

must be.
i have no clue otherwise

in addition, because the month Aug, does not match the locale settings abbreviation for August, in Spanish, August is Agosto, it doesnt parse correctly

oh well there’s the cause then
well spotted
waht does getAvailableLocales() give you

mmm, this wss4j project for ws security is little out of date, isn’t it?

hmm?

i’m checking Mule’s security… it uses WSS4J
I think nobody uses that anymore…

ah. are you a committer?

he, no

popular project i must say

wss4j?

oh crap. i read emule
my bad
and i was sitting here scratching my head wondering why you’d need wss4j with emule

maybe its because axis2 now has its own wss implementation

yep, and CXF also…

app server?

“Axis2 comes with a module based on Apache WSS4J [1] to provide WS-Security features, called “Rampart”"

yes

ah, jboss i presume
ah, jboss host i presume
hey cut it out

hey

Exception ApiException is not compatible with throws clause in Object.toString()
can someone help me please?

hi, i’ve an issue. i created jList1 via Netbeans, everything is fine except one – my problem is that each row is small – height about 2milimetres… i tried to set up bigger font, but it didn’t help… how can i make “bigger” rows?

test case in pastebin?
~tell gothicNafik about test case

gothicNafik, Provide complete, compilable Java SOURCE CODE that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)

ok, i will paste it on a web…. give me a second

bbl

~pastebin

http://eugeneciurana.com/pastebin

ResourceBundle.getBundle(“../../Hello”); finds Hello.properties fine, but “../../foo/Hello” doesn’t find foo/Hello.properties.

http://eugeneciurana.com/pastebin/pastebin.php?show=3501 starting on row number 130

yikes, that is not nice-looking code…
no comments? what is this class supposed to do?
too long lines, that paste has lots of extra line breaks in it …
you do not close your readers in a finally-block

my eyes! the googles! they do nothin!

your indentation seems broken at line 136
a test case should not be in a package, it just complicates testing by others.
when I run that class the jvm exits directly
did you try that code yourself?

compilation and build is ok

yes, the code compiles, but with an empty main(…) it will not do much

And classes should start with a capital letter

gui.Main();

according to sun:s java code standard. You do not have to follow it (but I do in this regard)

program works fine, except that small rows

Exception ApiException is not compatible with throws clause in Object.toString() — how to handle that

that your method names are not english does not help, reading your code is not easy for me…

Sure, you don’t _need_ to follow it. But if you don’t (and mix both english and someLangeuage in looong lines) help is a lot harder to get here, imo. At least from me.
Hmpf. You beat me to it

when I add a Main() call in main(…) I get a window, with two white boxes, the left has a tree with one root and two nodes

i am sorry about that, next time i will write all in english

agreed

yes

but I myself do not follow the sun code guide regarding ‘(‘. I always put a blank before it (and make sure my pre-commit hooks checks for it)

and the second one (on the right side) is jList
but that jList has very small rows

the right contains nothing.
it is about 3 cm heigh

you are not right, jList1 contains data

could be because I do not have the valhala-data directory?

damn. I can’t make toString() function throw my own exception?

lines 130-134

No

you can make it throw a RuntimeException, but not a checked one
(or subclass of RE of course)

i can see rows in jList with text… that’s everything fine… i just want to make take rows bigger
on height

provide a test case that works for more people and do not depned on files that only exist on your hard drive

setFixedCellHeight() ?

g[r]eek: and this is method of jList?

g[r]eek: that is not the problem…

Neither do I (following the guideline completely). But a common base for “code that I want others to look at” is really needed and sun is closest here, imo

that setFixedCellHeight() works, thank you

maybe, but I do not care much as long as the code is using only one style guide

blank before ‘(‘ everywhere, including method calls?

yes
“new Foo ()” as well as “fooFactory.newInstance ()”

yuck

that was what I used in C/C++ a long time before I started doing java….
why should I think about what is a constructor/if/for/… or a method call

I’ve never had to think about it

http://www.firebox.com/product/1861?src_t=sbk&src_id=armyknife ???

neither do I… :-)

[krustofski]: heh. dunno. never seen it
it does use the word ‘ridiculous’ in the description, so they’re not trying to be serious
[krustofski]: there’s plenty of chatter. it looks real

that knife is only needed when you have to open a shitload of chardonay underfire

ok mr williams, shhhh

haha

well, you gotta admit, being under fire is when you really really want your chardonnay!

lol

yo!

yo homeslice.
wassup, bit-o-lemon?

5am. that hte javax.print library sux0rz. just generate a pdf and call acroread to print

why is there no Collections.synchronizedDeque() I wonder

heh

adobe’s command line optiosn

I can see that

g[r]eek: you betcha. i even know what it is. acrord32 /h /p foo.pdf
*zing* off she prints.
i spent, oh, a good 12 hours trying to print a GIF from java web hosting via the javax.print library. it was horrifying.

o/~ move me on to any black square, use me any time you want… just remember that the goal is to capture all we want… o/~

mm, yes.

o/~ diddit diddit diddit diddit diddit diddit diddit di-dah o/~

*shookahshookahshookahshookashookashookashookashooka*

I’m still in the hammond bit
so HA HA HA

the shooka’s are before the hammond. neener yerself.

o_O

shooka? Oh, the shakers

it made me think of “sound chaser”

that series of albums from Yes ranks among my favorites

Going for the One

yah, the shakers are in the first few versus, behind the dittit-dittit parts.
you listen to radioparadise?

mmm

erm… no bells ringing

ah, you should. you’d like it.
http://www.radioparadise.com/

I’m listening to Arcade Fire a lot lately, though, which is very uncharacteristic for me and thoroughly enjoyable

I’ve been meaning to pick up tormato and topographic oceans, just to round things out

tormato and oceans are just too indulgent for me… after Going for the One, Yes kinda went “no”
90125 and Big Generator were good, but they weren’t really YES

one thing RP does is you can rate a song as it comes along. look at my ratings here – you get an idea of the sort of stuff they play:
http://www.radioparadise.com/content.php?name=Members&file=userinfo&u=12619

yeah, I actually have a separate classification in my ipod for Rabin’s Yes
Drama was OK iirc
I don’t have that one either

Drama wasn’t yes either… sorry, without Jon Anderson it ain’t yes

that article by weiqi gao… what a load of carrots

yeah, it was mostly the buggles iirc
the buggles with squire and white

ever listen to Anderson Bruford Wakeman and Howe? (yes-not-yes) ?

and rabin’s yes… it was sort of like what someone with a hell of a lot of skill would imagine Yes as being had they never heard it
g[r]eek:
yes

eidolon, yeah – my favorite bassist (tony levin) played with them

yes, THAT group rocked… all they needed was to replace Levin with Squire and you’d have had Yes… and since Howe was the driving force behind Yes anyway, it was closer

but yet – they were kinda so-so

Bruford was playing an electronic kit.. I never enjoyed that much

all hail bill bruford.

yeah it sounds really… artificial

so if you’re a classic Yes fan, I highly recommend Spocks Beard.

It’s wierd, for a band that was supposed to be so far ahead technologically, Yes really wasn’t all that brilliant on the effects/synths front

but I do listen to the resultant live album quite a bit

Pink Floyd was the same way

they didn’t need to, and thank goodness for that. their ahead-ness was in arrangements and pure unadulterated skill.

for all their reported brilliance as technologists, they relied on the farsi organ a hell of a lot

gonna have a hard time finding any better series of musicians than squire, how, anderson, and bruford
howe.

is that a new java lib?

I saw the last tour though, they had the “classic” lineup again
was excellent

Rush has gotten more technologically reliant mostly because the arrangements finally went into eight-musician territory, which three musicians just couldn’t do live

brb.

yeah

hrm. must’ve stumbled into ##oldmusic by mistake.
weird.
damn mondays.

lol

the “ladder” tour was so bad that I almost didn’t go this time but I’m glad I did…
bthe “ladder” tour was so bad that I almost didn’t go this time but I’m glad I did…/b
and that’s all I’ll say about that

the House of Yes recording was really good.

somebody must have a case of the mondays :|

and I liked the Homeworld track… the rest… bleh

i have a case of the idontwannaworks

but that’s kinda my feeling for all Yes post-BG

“Talk” was at least as good as BG imo

You know, I haven’t heard Talk

~fap cheeser

Is that sad?

pick it up, it’s quite decent

right, so, here ya go. classic music that was ahead of it’s time, IMHO
Moody Blues – Question

rabin actually tried to get wakeman for it, but there was some contractual problem

yeah, wakeman and contracts have never worked out
for such a wanker, MAN was he awesome in concert

yeah…
brilliant

but he caused more problems for Yes than anyone else has
put the band into bankruptcy when he JOINED

they’re supposedly touring again next year
40000th anniversary or some such

only 40000th?

have you guys ever coded/designed a system and then when its just about ready to goto production you realize that you coul dhave improved on it with just some more time?

I hear they’re the reason that Java went with a “long” for timestamps instead of an “int”

almost every time
no, if that was the reason, java would have had long longs

ug im having to rush to get this system out and now im wishing i had more time to revamp some things =\

Aradorn, don’t worry about it – if it meets the requirements, it’s as good as it needs to be

yeah

learn for next time

its 10000 times better than the previous version
ive completely rewritten it in about 4 months

g[r]eek: that weiqi gao post has gotten me a lot of flack

i’m not surprised.

it’s funny for me, because people didn’t get what I was actually saying

i figured you were saying “don’t hire this guy. anybody. ever.”

changes are weiqi himself missed it
g[r]eek: what’s funny is that weiqi is a really bright guy

is there a simple stringy object/method for string substitution like “hello %name%, how are you on this lovely %day% ?” or something similar. in .NET and ol’ C it’s prety easy.

yes

that’s what i like about publishing an article on tss. it can either make or break you. if it makes you however, then what a way to earn a rep

g[r]eek: yeah… although a large part of me frets about what I’m doing to myself and my future employment possibilities

hehe

what’s the name ?

PrintWriter

perhaps a tad taboo, but what are your thoughts on infoq

jottinger thanks i’ll javadoc it

pm welcome

g[r]eek: *shrug* not taboo, I think it’s good for what it is
I think it has some fundamental challenges ahead of it, many of which I think the cult of personality will help evade
but I hope – for Floyd’s sake – he never loses that cult
bbut I hope – for Floyd’s sake – he never loses that cult/b

i guess that’s your experience in these matters talking. from my point of view, all i see is a jack-of-all-trades attempt with one helluva interface

g[r]eek: you like the interface?
you should be a fly on the wall for floyd’s and my conversations

yes. that’s not to say i think it’s superior to tss’s.

we’re good friends, of course, and I plan to keep it that way
g[r]eek: InfoQ’s interface is WAYYYY better than TSS’
I’m terrifically glad infoq is there, it’s helping drive the TSS rewrite
and yes, there is one

So you are spending all your spare time rewriting the TSS interface?

I’m working on a final revision of the requirements doc today, in fact
god no

tss’s does it’s job well. infoq’s is more web2.0′ish

g[r]eek: for our audience, we need web 2.0-ish
the average TSS reader considers himself ahead of the curve (like all drivers, they consider themselves to be above average) and they expect their tech sites to be ahead too

but like i said, i like that fact that tss is java full stop.

g[r]eek: *nod* that’s likely to change slightly… but we’re never going to abandon the platform

has bitten off a big chunk…

the language and platform are changing too rapidly for us to stay just java (language and platform)

lets hope they chew well.

we’ll slowly integrate groovy, ruby, python

g[r]eek: infoq allows you to filter out some of the ocntent yo migh tnot wat though, doesn’t it?

g[r]eek: They’re not doing what they’d like to do, I think
only with coarse filters

sure, that’s what makes their interface great
interesting i’ve never really given the filter an in-depth analysis. i don’t bother much with non-java material

how do I read from an URL if I’m behind proxies?
http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html

for a tech media company, our technical acumen blows

http://pastebin.ca/647461

there is a company behind TSS?

is tss your full time job?

however, after the error messages, I do get the contents

g[r]eek: yes, among others

kids?

yes
g[r]eek: and other consulting
Rod Johnson actually asked me how I found time

hmm, I never knew.. not that it changes anywathing..

Well, it does, in some ways

Heh. That’s putting it mildly

i like the idea of making a living from managing a popular news board / blog

we’re backed by a huge media company, which is good and bad… good because we have funds to push forward, bad because it’s a media company and not a tech company
[TechGuy]: putting what mildly?

Having a media company behind you is good and bad

[TechGuy]: ah, yeah
well, having a three-year project shut down due to requirements – when you have domain experts in house and screaming to let them help – is baaaaaaaad

been there, done that

some of the questions I managed to get were staggering
they were planning on using a JCR product… and pondered using an in-house search library or google

nice

(for the illiterati, JCR includes – and mandates – a full-text search solution.)
they also wanted to avoid ajax because it wasn’t seo-compatible

Yeah, we’re going to use JCR, on top of Hibernate, with Lucene
heeheheh

that’s probably my only fear in growing my software company – reaching the stage where it’s not longer simple to redesign something / enjoy a good hack. bureaucracy is a necessary stench
*no longer

g[r]eek: well, the key is to keep your business’ goals in mind

My business goal? Get big. Make money.

Interface21 uses drupal, for example, which is PHP

goal #1 – no employees

mmm, drupal.

I blasted them for that, but their response was correct – their goal isn’t to use java, it’s to use something that works
that said, Rod’s remembered that I said that for years now… and he brought it up last time we met

hi. im stuck

mostly because SOMEONE mentioned backing TSS with cakePHP (not me)
get some lube.

breath in, and try to move.

breathe out surel
who designed the infoq interface?

inside toString i’m throwing checked exceptions..

g[r]eek: floyd, I think…
floyd and alexandu popescu

you guys on ‘good’ terms?

g[r]eek: yes

Don’t do that then

we IM on a fairly regular basis, we consider each other good friends

cool. you guys are like a mini version of gates and jobs
well, not quite. impulsive idea that sounded neat at first

Exception ApiCheckedException is not compatible with throws clause in Object.toString()
im stuck here

~jottinger

was that a compliements, or..

I guess the factoid ‘be jottinger’ might be appropriate:
There are no stupid mistakes, only stupid people.

bleh
++

~literal be jottinger

replyThere are no stupid mistakes, only stupid people.

i created two classes of exceptions, ApiCheckedException and ApiUncheckedException

~literal api war

I have no factoid called “api war”

~literal apiwar

I have no factoid called “apiwar”

~be g[r]eek

Feta is to cheese what Ferrari is to cars.

~api wars

I guess the factoid ‘be api barbie’ might be appropriate:
Javadoc is *hard*!

start api war ?

darn it~

~smack jottinger

~start api war

but inside toString I need to throw checked exceptions

I guess the factoid ‘backwards compatibility’ might be appropriate:
the operative word in “backwards compatibility” is “backwards”!

it doesn’t let me

damn it

We already told you, you can’t

~ide war

jbuilder 0wnz

there~

why do you want to do that?

~literal ide war

reply(netbeans|eclipse|idea|jbuilder|vi|notepad|jedit|emacs) (rocks|is cool|sucks|is shit|0wnz|is teh suckz)

ernimril, i created two classes of exceptions, ApiCheckedException and ApiUncheckedException

forget be jottinger

I forgot about be jottinger, jottinger.

ernimril, for my api

no, why do you need toString() ?

hm.. ernimril, i’m using in it some reflection

for what? why not use some other method instead?

be jottinger is reply(There are no stupid questions, only stupid people.|Darn you all to heck!|I hate you.|I don’t hate you, just everything about you.|Everybody dies.|Everybody dies, and that’s GOOOOD.)

Okay, jottinger.

~be jottinger

There are no stupid questions, only stupid people.

~be jottinger

I don’t hate you, just everything about you.

yay!

~leave
:|

would developing a locally focused (why bother competing with the big guns) add value and what sort of content would be necessary?

where do i put the applicationContext.xml, web.xml, xfire-servlet.xml; normally they go in war/WEB-INF/ but in this case mvn is looking for it in /home/username/workspace-3.3.0/ApplicationName/target/ApplicationName-0.0.1/WEB-INF/web.xml which gets wiped on every mvn clean

a locally focused… missing noun?

ernimril, http://rafb.net/p/FznwLr39.html

erm, yeah, i meant to say something along the lines of “focused on local happenings” as opposed to internationally viable

that does not say anything?

Narada put resources in project/src/resource under mvn

src/main/webapp/WEB-INF

g[r]eek: I’m still missing a noun… you mean a locally focused site?

ernimril, i need some format in toString

Wha… *anyone* can tell the bot to leave?

resources even

[TechGuy]: don’t ask me, I didn’t code the damn thing

*doh* yeah, a site

ernimril, i’m checking if the values of the fields are set or not

like a mini-tss – a place to share technical articles and the like

g[r]eek: I dunno, it can be useful, you just need to be aware of what people in your area need

ernimril, if not append NOTSET.. otherwise append value.

using toString and expecting it to do what you want is not good, if you need a method that returns a string that is well formed, then add a getWellFormedString() in some interface and make your class implement that interface

BTW, l10n is one of the requirements for the new TSS

[TechGuy] yeah…. The author frequently gets asked to leave too.

and pass the more popular ones upstream to your site etc

Do that in the constructor or whereever you create the object.

umm is it src/resources or src/main/webapp; i’m getting conflicting answers
this is a service not a webapp; do i still need to put it there

resources.

Hi, Is there a channel for JSTL or is this one good for that too?

Throwing an “I don’t have X, so I’m useless” exception in toString() is quite – nasty. Stupid?

Maven in fascist about some things.

like it would be interesting to have smaller technical blog sites that can be moderated, and the most popular articles get fed through to tss for potential publishing

anyone know of a plugin similar to firebug for ie?
(off topic i know)

if it is a module it will land on classpath:

well, if it’s war host pacakge, webapp makes little sense ;9

g[r]eek: yeah, could be

but that kinda defeats the purpose of writing with a specific community (locality) in mind
interesting idea though. i’ll give it some more thought

src/main/resources right? i put it there but it still complains; anything else i need to do

is it necessary that I create ApiUncheckedException ?

an example that comes to mind – i’d be very interesting in reading articles from indian companies that provide outsourced development services

if it is there and you have a build that is correct it should be fine.

gawd excuse my english

ernimril, but I’m using String class alot

g[r]eek: That is how they would begin.

good point

you can use String, but you should not rely on toString() to return what you want

I see. but getWellFormedString() will return a String no?

since I do not know what you are trying to do it is kind of hard to tell y ou…
yes

how come i can’t cast an object i created with Object object = new Object[]{new Object[]{something}} like Object[][] test = (Object[][]) object; ?

reflection is in most cases the wrong answer

=(

how can I read from URL and avoid java.security.PrivilegedActionException

g[r]eek: no worries

thanks that worked; resources didn’t

sign your applet…

g[r]eek: what you’re talking about can be done, but it’d be very difficult
not technically, mind you

ernimril, it’s not an applet
ernimril, http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html

ok.. webstart run in a similar sandbox, so sign your app then… or are you using some other sandboxed environment?

I’m writing this

Good morning.

ernimril, I’m using a proxy server… maybe that is the problem

if tss somehow spawned regional sub-sites, each with their own editor in chief for supervisory purposes, and each allowing the moderation of locally produced articles, with the best being fed through to tss global. something along those lines

you have not really said what you try to do or how, provide a test case…

doAsPrivileged

what about log4j properties etc; same place?

Yup

at least that way we wouldn’t have to worry about guys like Gao

fmarceau, oh, let me read about that

g[r]eek: haha

AccessController.doAsPrivileged(subject, action, null);

g[r]eek: I don’t like your idea, I’d be irrelevant and my goal is to BE KING OF ALL OF THE EARF

you obtain the subject via the LoginContext (JAAS)

editors can be female

ernimril, in to many toString functions of my classes i’m returning MyMethods.outString(this.getClass(), this);
s/to/so

of course they’d be moderated into position too

fmarceau, login?

jottinger’s techno-harem

I do not care what your toString-methods return, I know what I expect of toString…

ernimril, i’ll take your approach as the first solution to the problem.. [interface]

http://www.jaasbook.com/

because they are different types

but I’m not logging in anywhere ^^;

note that if you could describe your problem on a high level, then maybe you could get better directions…

then, one day, when anyone needs a technical article, they can search global tss for things like “java 1.5 jboss 4.0.5 thisThatException” and some bloke in panama will have written up a solution

joedj, is there a way to nest arrays and then cast back?

as it is now you say like “my toString-method does not work”

wait this is beginning to sound like google.

g[r]eek: heh

http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
only the URL is different

ernimril, I have a class with so many fields (and it extends another class with 5 fields too).. and i needed to output the fields in toString if they’re not null.. using if/else so many times kind of suck so i decided to use reflection..

does that example work for you (when it is as on the website, no edits)

fmarceau, I’m not sure if jaas is what I want since I’m not really trying to log in anywhere

only if you create it like new Object[][]{new Object[]{null}}

ernimril, collecting the non null fields in a buffer and printing them..

bbl

joedj, if you have to specify the [][] then how can it be done dynamically?

ernimril, this is mainly why i had to use reflection in toString

ok, that does not need to throw any exception….

joedj, is there a way to use reflection?

you don’t have the choice since you’re not gonna change the policy file on each machine the applet will run on

it is not what I would do, if a field is null, then I want to know that

InvocationTargetException, IllegalAccessException
hmm.
ernimril, you could know that.. but there are so many fields

1) do not use reflection 2) catch the exceptions internally and handle it

http://pastebin.ca/647461

if you have many fields then chances are that your class tries to do too much

fmarceau, I don’t have an applet

ernimril, i’m setting the non null or empty fields to NOTSET

use reflection to do what, exactly?

instead of “null”…

err
i’m setting the null or empty fields to NOTSET
i meant to say that.

joedj, a function based on a counter that can nest arrays and return something that can be cast to the n demensional array that was created, i don’t see how though if one has to specify the [][]..

ok, it looks like you need to tell java to use your web proxy then

euh sorry… i though i’ve read that

NOTSET instead of null, NOTSET instead of empty.

Which one of the java datastructures is a sorted list. I for instance want a sorted list of Integers. Then I want to do: instanceName.getFirst()

ernimril, and as I said earlier, I get [for both urls] the page, but before that I get a huge pile of exception info
ernimril, how do I do that?

It should also have a map type structure, with key=value pairs, and sorted by value.

ernimril, methods 2) seems what I need.. but in that case ignoring a new interface.. and not covering all the exception in ApiException.
method*

Oh, heck, who knows… Something like this?

you google, I do not use a proxy so I am not sure… (I think you do something like “java -Dhttp.proxy=…. ” or similar)

~tell fifo_ about javadoc SortedMap

fifo_, please see java.util.SortedMap: http://java.sun.com/javase/6/docs/api/java/util/SortedMap.html

isn’t there a list of java datastructures in the docs?
I can’t find such a page

ernimril, isn’t there a way to tell an application to use a proxy from within the code?

why do you care about dynamic when you want to use a cast like (Object[][][]) anyway?

I would probably still question your use of toString(), it is not a method that you should use to format data for the end user
you can probably use System.setProperty to do that…
but you still need to google for the correct property

joedj, because you just said when i create it i can’t just use an array of an array of array, etc.. i have to do array[][]{array[]{}} etc… how do i do that without knowing how many demensions it starts with?

ernimril, but my toString calls outString(this.getClass(), this), and inside that I use StringBuffer to form the output.

thanks, ernimril, now I know a bit more what I should be looking for

again, why do you need to use toString?

how do you do the cast without knowing how many dimensions it starts with?

joedj, the person outside the function would do the cast on the returned object

ernimril, because mainly i’m dealing with Strings.. and it’s a function of Object.. overwriting it is nice..

heh, assenta is really cool but is absolutely slaughtering MS outlook performance… and outlook wasn’t that great of a performer in the first place

why do you need to use Object? why not use SomeInterface with a well defined method that returns a string?

too much work!

ernimril, so back to your solution # 2

I still have very few clues about what you are trying to do, but I guess that it is what I would do

you can do it with Array.newInstance
e.g. (int[][])Array.newInstance(int.class, new int[]{10, 20}) creates a 10×20 2-dimensional array

joedj, ah ok, thanks that helps a lot

man i love maven; it’s so much less work compared to ant

mvn rocks for sure

mmm mant.
er
mmm, ant.

ernimril, fmarceau, I tried both the -DproxySet=true… and System.getProperty().put(“proxySet”, true);… but I still get the exact same exceptions

Is there an easy way do a lookup on a collection using it’s hashcode?

huh?

ernimril, ok well now getWellFormedString() calls my static function that performs the reflection stuff and i’m able to throw ApiCatchedException in it. nice.

I have an object X, which has a field Y. I want to be able to lookup X in a collection using either X or Y, because X returns as hashcode Y.hashCode().

no, fifo_

dmlloyd :/
So I would just have to create an instance of X everytime?

seems like you need to set proxySet, proxyHost and proxyPort, did you set all 3=
s/3=/3?/

How heavy is instance creation?

ah, I think I know what’s the problem

it depends

ernimril, yes of course, that what the “…” was there for

fifo_, quite cheap if the objects are small and don’t live long

ok, I am out of options, google more and see if you can find anyone else that has that problem…
(since it works well for me)…

I have a set of objects (each associated with a connection). The object only contains a channel and an Integer field (used for sorting by activity). I want to be able to do a lookup on a SortedSetThisObject, using the channel. I figure by your statement this would be cheap/fast?
These lookups happen often

maybe you want a Map

dmlloyd, it has to be sorted

the use a SortedMap

I basically want to retrieve the least active channel
dmlloyd, thats what I am using
dmlloyd, oh

a LinkedHashMap works for doing LRU type things
works well

dmlloyd, but SortedMap sorts by Key.
dmlloyd, LRU?

least-recently-used

LRU…oooo

ernimril, is there a way to “disable” exception messages?

I wonder if that would work

catch the exception and ignore it..

ernimril, can’t do that

(but if you ignore it then put a good comment in the code)
most sorted maps can take a comparator to sort by

PrivilegedActionEdception can’t be caught from the body
or something
I tried that earier

so you can sort by the value

How do I make ant tell me what my current working directory is? I just want to echo it right now.

“java.security.PrivilegedAction is never thrown in the body of corresponding try statement”
ernimril, so I don’t knwo what to do

i have downloaded as2ant_2.2.zip and apache-ant-1.7.0-bin.zip from sourceforge I am trying to build as2ant which has inbuilt swfmill mtasc and things like that. but when i run ant from it bin as ant build in as2ant dir i get swfmill error . i think i need some advice on build.xml . i am on
command line without access to eclipse. and i cant sudo apt-get

ernimril, but the comparator supplies the key. So unless you have a field in the key, which contains a reference to the value – you can’t. or am I missing something

you are correct

i have changed build.xml to build flowplayer.swf
can anyone have any pointers

I guess that the main reais is for when the key does not implement Comparable
s/reais/reson/

Anyone know how to get ant to echo a pathelement? I just want it to spit out the string for the directory

is this correct? public class NITFItem extends Item implements WellFormedString

anyone

b0r3d, yea

damn not

Assuming that Item and WellFormedString exist/are imported… yeah.

So I have the SortedMap. Htf do I query it to get the 2nd/3rd from the top?

but WellFormedString has getWellFormedSting(), and in NITFItem I’m not implementating it, eclipse doesn’t complain!
implementing*

does Item implement it?

hell yeah

then thats why :P

err not.
hmm. NITFItem extends Item too.

and then your “implements WellformedString” is superflous

Use javac. Nuke eclipse from orbit. That’s the only way to be sure.

hehe

meh.. silly people..

This isn’t working.

I think I have to put implements WellformedString explicitly for the subclasses

b0r3d, what do you mean?… if its superclass implements it it is not needed..

subclasses always implement whatever the base class implement

but I need a local implementation of the subclasses

then just override the method?

oh no, everything is screwed.
lol

ehm, …

And the SortedMap/Set doens’t update itself, nor provide an update method.

why is it screwed?

It relies on the structure it builds when the object is added to the list

if you mutate the key objects in a map you are in big trouble

ernimril, yeah – not if the hashCode stays the same
but the SortedMap doens’t even use the hashcode for some reason
at least – in a HashMap i mean

no, it uses compareTo only…

System.out.println(_n2.getWellFormedString()); doesn’t return anything anymore
no exception no nothing

ernimril, which one does? the SortedMap?

b0r3d, and what class is _n2? and from wich inheritance does it get its implemenetation of getWellFormedString?

TreeMap (the easiest way to get a SortedMap)

hi .. this is very basic question but i dont understand why is Interger i = new Integer(10) same as Integer i = 10;

loesh, NITFItem extends Item which extends Entity. I have implements WellFormedString for each of them.

it is not the same

i think he’s asking why they’re not the same

they both contain 10

“Integer i = 10″ is sytactic sugar for “Integer i = Integer.valueOf (10)”

b0r3d, ok, but which class actually implements the methoid?

they both contain 10, one uses the shared Integer instance, one is a new created
so they ought to be equals but not ==

loesh, all.

thanks

it’s nice just to sit here and read what people like ernimril writes.. and learn a little java :P

b0r3d, ok, then if _n2 is a NITFItem the method getWellFormedString() in NIFTItem should be called when doing _n2.getWellFormedString()
so how does that implementation look?

loesh, public String getWellFormedString() throws ApiCheckedException { return MyMethods.outString(this.getClass(), this); }

Can anyone tell me how to make ant echo a path? I have a path with a pathelement set to . and I’d like to echo it so that I can see the path on the screen….

try echo

I need to convert HTML file to text file

yeah, did that

html is text…

it just prints out ${path.element}
I Want it to print /home/user/path

b0r3d, ok, and then what does MyMethods.outString(…) do?

you can try this, but it only works for well formed pages: String plainText = page.replaceAll (“.*?”, “”);

I tried that, it doesn’t print out the actual path, it just prints out the name of the variabble

ernimril, html has all sorts of tags

loesh, http://rafb.net/p/t6nj6o52.html,

or use a html-parser to get all text-nodes

does echo not support variables?

i would be willing to bet that programmers are the backbone of most companies in the world today

can you only echo string literals? that sounds useless.

?

ernimril, plus there are many characters in the HTML like “ü”

[echo] ${some.path}
again

they are harder tro translage

loesh, i uses reflection to get all the values of the class and append the value if set otherwise NOTSET.

hearing this I just love make more :-)

or in this case it returned : [echo] ${path.element}

are you sure the property is set?

no kidding

I use make for all my projects

loesh, it’s going into an infinite loop and get killed by JVM or something..

b0r3d, yea i see..

loesh, why?

thtas probably because it calls getWellFormedString

yeah, I declare a path with the id=”some.path” and inside i create a pathelement and set it to .

do you get a stackoverflow?

lol
no nothing
the program just terminates

after you check that its not the getClass method, also check that it is not getWellFormedString ….

loesh, I can make it not call getWellFormedString
yeah that’s it.. let’s see.

because that would give you an infinite recursion

http://pastebin.com/m4fed11d8

thanks man you’re the best

it works?

property name=”output” refid=”path.ref”/echo message=”${output}”/

loesh, yes it does

nice

ah! so it has to be a property? echo won’t work for pathelements?

so it seems

so do I wrap my pathelement in a property?

http://ant.apache.org/manual/CoreTasks/property.html

i have downloaded as2ant_2.2.zip and apache-ant-1.7.0-bin.zip from sourceforge I am trying to build as2ant which has inbuilt swfmill mtasc and things like that. but when i run ant from it bin as ant build in as2ant dir i get swfmill error . i think i need some advice on build.xml . i am on
command line without access to eclipse. and i cant sudo apt-get

loesh, i thought something went wrong with eclipse for instant.. heh

b0r3d, well if you are uncertain, allways try running stuff from the commandline

the property type doesn’t support a nested path element…

eclipse is very nice but well it might mess things up..

what do you mean? it says so right in the docs

http://pastebin.com/m3c14b577

why do you need it to work that way?

haha

what’s wrong with declaring the path, and then referencing it by ID

I just want to echo the directory. That’s all. I don’t care how it happens.
I need to use the directory to make a decision later also.
so it’d be nice if I could branch based on which directory I’m runing from.

path id=”duh”pathelement location=”.”//pathproperty name=”dir” refid=”duh”/echo message=”${dir}”/
though for the record I think that’s just going to print “.” :-)

Thannks… don’t understand why you have to use a refid, but that works great!
no wait… I DO understand why I have to use a refid… learn something new every day….

Is it essential to declare enum as public ? I am trying to access enum Type from my class but enum has default accessor type

What is the best way for me to read a file using ANT?

hello, i want to learn java programing and development.. I do not have a programming background at all though I am very good at web design and web development. I heard that java is the way to go if I want to learn programming and I have already started with the tutorials on the Java website
and I was just wondering my being new to programming is there a better guide or another source i should seek out to learn java or should i stick to the w

$diety I hate this policy of not beeing allowed to delete files from projects after first commit to the release tree

Nope.
You’re doing the right thing.
You may want to find a book that covers object-oriented programming in a language-neutral way. To understand the concepts.

crap… Been thinking about this… Since getting a resource from the classloader means you can’t use a File object, is there a way to ask the classloader (or Tomcat in general) for the directory path of the deployment root, so I can build a File object?

ok cool, someone had told me i shold get “java for kids” or “java for dummies” books but the website seems to cover things quite well

Nah.

I’ve got a config file in WEB-INF that I want to periodically check the file modification time to see if I have to reparse it

As a non-programmer, you should be more concerned with OOP basics than Java calistenics.

[TechGuy]: or you do some ugly hack to inspect the url you have…

any ideas on where i can learn that stuff? Books? website?

This is in a background processor thread spawned from an init servlet. It’s not called from a URL

Books.
Some websites may cover it well. Google for object-oriented programming concepts or similar things.

[TechGuy]: getResuorce gives you an URL, it was that url I meant that you can inspect, if it is a file:///foo/bar/webapp/… it is quite easy to get a file (, but ugly)

indeed

nivekc1, maybe not the right level, but there’s a series of books called “How to think like a computer scientist”
nivekc1, and there’s one for Java too

Was just trying to think of different ways to get to a file modification time

oh also I am a Windows free user (I hate windows) is it going to be ok going ahead with this in Linux?

nivekc1, the best part of that book is that it’s entirely free, in PDF format

thanks ill try that out

Sure.
daredemo++

daredemo has a karma level of 1, pr3d4t0r

Wrong nick complete
You’re mean

Hrm… something must be wrong with my keyboard today.
Have a nice day

http://greenteapress.com/thinkapjava/

I won’t any more
You ruined it you meanie! *throws fit*

ie blows….

cool thanks! and just to clarify on my last question there this is ok to go ahead with being that I am a Linux user and will not even consider Windows

sure

java works fine on linux

nivekc1, I think youre safe [Mac user]

public class Err{ public String name; Err(){} public void getName(){return name;} private int hour; } Why will this class not compile.. I am doing practice test and I do not have java installed. Thanks

Install Java

http://www.innovation.ch/java/java_compile.htm

great you guys have been very helpful, I’m sure I’ll be back later after I begin reading and i’m stuck in a “huh?!” part lol.. thank you.

thanks thats gr8 erni

nivekc1, it also helps if you have a “problem” to solve
nivekc1, if you just read the books… I find it hard to learn, I have to have something real to solve

what do you mean?

How do you add an external resource to a jar through ant? such as a configuration file?

grumblefuck
Monday mornings.

nivekc1, like “OK, I need to get the files from a server; how do I do that? to save on my computer”

oh i see
I was told to begin a project, and as i learn new tings update my project as i go and then once i am finished i should have a working program
sound right?

nivekc1, exactly

that and get a nice IDE to start
such as eclipse

O_O dont start with using an ide

~newbie ide

newbies shouldn’t use IDEs. http://weblogs.java.net/blog/editors/archives/2007/02/you_better_get.html and http://weblogs.java.net/blog/gsporar/archive/2007/02/tools_that_do_t.html

what the bot said …

you can also make small projects, and write class files for those small projects and then make the final project that uses the class files from the smaller test/projects

what they should use Emacs, VI?

totic, well yea, or something simpler…

no..

any editor is fine

with the two Integer objects? or perhaps an Integer and an int?

totic, any text editor

Just the jump to learn Vi or emacs should scare them enough

then go for a simpler one
or well both emacs an vi are extremely easy to use at a basic level
open emacs and start typing your code
and he said he vas a linux user, my bet is that he should be familiar with at least some decent text editor…

loesh, but I find it always going crazy [since I press control key in wrong places and times]

daredemo, hehe yea but eventually you learn to do it right…

~tell gaillard_ about autoboxing

gaillard_, autoboxing is http://java.sun.com/j2se/1.5.0/docs/guide/language/autoboxing.html

[krustofski], thanks

loesh, like opening a new buffer in the same window and you can’t see the original anymore and you get a heart attack since you last saved in the morning

haha i see that any text editor will do right? ill just keep to my basic text editor in ubuntu i use it for html coding should be good enough?

daredemo, oh well emacs might not be the best choice if you are not willing to take some time and learn it…

for learning, that should be sufficient

nivekc1, the added value of some text editors is that they close “(” and “{” and so on

oh i see

loesh, I finally learned it this summer

yea and well it is a nice benefit to have one with syntac highlighting, makes it easier…
daredemo, yea i picked it up not that long ago either…

such as python?

now i use it for all my coding..

loesh, had tried it many times before, but got seriously lost, but since the new version has a Mac native version, it was much less scary

well i basically took the time to go trough the tutorial

nivekc1, python?

and i try and look things up as i stumble upon them..

loesh, my first trouble was that I didn’t understand the tutorial :P

it is a programming text editor that is made for linux and can be found in the default repositories

hehe..
python is a language?

loesh, it was talking about modifier keys and whatnot, and I “didn’t have such key” feeling

yea it is a bit strange until you get used to it..

nivekc1, python is a very good programming language [because I use 3D app called Blender and all scripting has to be done in python in there]

How do you add an external resource to a jar through ant? such as a configuration file?

update the jar

but at build time?

im not talking about the language there is a text editor call python too made for programmers it does what you said closes ( and { and what not after you select the language your using

add that resource to fileset

thanks everyone for your help, i have to go to work.. bye

a stupid question, does java have a way to run .java without compiling .class?

erm… no
you can certainly compile on use, if you need, but… ick

jottinger, well, is there a compiler for mobiles? :p

in an interface what attributes are allowed ?
public / private?

none
everything is public

like this? fileset dir=”${classes};${basedir}/default.xml” /

though … maybe protected is supported.
~tell totic about tias

totic, Try it and see. You learn much more by experimentation than by asking without having even tried.

is default.xml a file?

I already did and it didnt work
yes

does not work

well there you go

heh

public String name; did not work either..

it accepts method definitions

only?

I thought that would be an easier way for you to say no, it has to be like “blah”

I sometimes find myself in a bus… and can’t take out my laptop… so, I wonder if there would be any way to use java on a mobile [nokia], use in the sense of writing code and testing

String name = “I can never be changed because i’m a ‘constant’”;

yes?

target name=”build” depends=”compile” description=”package the .class files as a .jar file”
jar destfile=”${basedir}/jars/${ant.project.name}.jar” update=”true”
fileset dir=”${classes};${basedir}/default.xml” /

/target
crap
sorry..

String name;

http://rafb.net/p/3lwMBx97.html
that whave I have now
it works without the xml file
I am using gaim

because an xml file isn’t a dir.

right…

and fileset

You’re not being the pedantic kick-ass this morning?

[TechGuy]: i’m cranky enough that any such displays would likely be unfairly punishing morons in here for the offenses of those in the office.
8^)=

how would i cache jdbc access transparently if there are no pojo domain objects; can’t use ehcache because there are no pojos as such and not using hibernate; any ideas

~coffee cheeser

yum

use hibernate.

i can’t; this legacy db schema is horrific to say the least; and we don’t have the time to model it; it’s quite big

Heh

how are you accessing the tables? (I mean, are you using a DAO?)

uh, you want to cache it without modeling it? somehow, that doesn’t make sense.

Hm. I’m tentatively impressed with IDEA

yeah there wasn’t a data layer in the previous implementation by someone else; but i am rewriting it so now it has dao interface and jdbc implementations

why?
then memoize based on the primary key. And, BTW, I’m so sorry.

haha

Just the UI so far.

Could you elaborate a bit I don’t understand what you proposed.

in the dao… have a map of primary key/object

First impressions of it seem more usable than those I’ve seen previously. I’m very prepared to change my mind though.

and never ever let anyone access the DB except through that map
and never use more than one process to access the DB
if you violate those restrictions, you might as well… use hibernate, because you’ll be rewriting it at that point

haha

thats what ive done
Narada im in your boat

and you’ll pardon me, I’m sure, but I think Gavin did a better job than either of you will

well i havnt rewritten hibernate (its way more advanced) but i have a nice OR mapping framework that allows me to write nice litte apps pretty quick

Couldn’t he use ibatis and map the old cruft?

they said they couldn’t model, or some crap like that… plus, ibatis won’t cache

jottinger sometimes its easier to ryo framework than fight with the server guys to get some new thing installed like hibernate

to clarify by primary key to objects you mean an arbitrary key to access that result set and the result set?

two strikes then….

I’m familiar with it

im sure you are

there are no domain objects in this case; just maps and strings

If I have a path like ‘/path/to/file’ how can I tell java to give me back just ‘file’?
It’s a string..

~javadoc File

cheeser, please see java.io.File: http://java.sun.com/javase/6/docs/api/java/io/File.html
cheeser, please see java.io.File: a href=”http://java.sun.com/javase/6/docs/api/java/io/File.html”http://java.sun.com/javase/6/docs/api/java/io/File.html/a

rellis, or you can split the string, and take the last item from the array

not GOOD ones, but…

cheeser/daredemo: thanks

what do you mean by primary key; are you talking in table context?

yes

gwt++

mele-: it’s pretty nice, innit

Very nice see the GWT-Ext?
http://gwt-ext.googlecode.com/svn/trunk/site/samples/Showcase/www/com.gwtext.sample.showcase.Showcase/Showcase.html#foo

i’ve seen most of the extensions

mele == gwtTr0ll

Very clean and nicely done
joed

mele-: spent half a week with the Author of GWT in action

Where at?

MN, Code-fest

Nice

objects; …

get a free copy?

whats the wasiest way to convert JSPs to JSPX?

Signed even.

any interviews with him?

yes

yeah there was never any doubt on that nor will there ever be

anyone?

Mixing GWT with other frameworks isn’t hard

Nope.

unclean feet cannot touch the balls.

Wicket++

RootPanel.get(String) makes it easy

~jottinger++

would an ehcache interceptor work on the daos for example

jottinger has a karma level of 136, joed

Taoist?
has been studying Tao Te Ching

mele-: Jew.

with a touch of I Ching

I prefer the Ka-Ching

Not the book of change?
Cao Cao says Study the land and screw the girls.
Master Sun says fight now not later!
Sun Tzu++

joed, i think it was you who helped me an hour or two ago but it might have been joedj, anyways do you know if there is any way to put objects with the array returned by Array.newInstance?

Well, Go rin no sho did not really say that

heh
you’ve read the book of five rings?

Yeah, a few times.
Several years ago now.

hah!
jottinger:
Yes – Starship Trooper
(on radioparadise
apropos of this mroning’s convo

haha, yeah

Avg. Rating: 7.5 (Total Ratings: 173)
lamers voting a 1 on this. what idjits.
http://www.radioparadise.com/content.php?name=songinfo&song_id=30931

*objects in an array with it being returned by Array.newInstance is what i meant sorry

I need to find a new streaming radio station. Live365 got tired

they probably don’t realise how it influenced the industry, such that morons like britney were made possible

RadioParadise good for soundtracks?

not for soundtracks, no. [TechGuy], try radioparadise for a day or three. give it a try. it’s by far the best music station i’ve ever listened to.
‘eclectic radio’
the guy who runs is (bill goldsmith) is awesome. a total music buff, and not a young wanker who thinks Coldplay is DABOMB.
http://planet-geek.com/archives/000666.html

waitasec, waitasec
coldplay isn’t da bomb?

no.

How can I find the last element in a string array?

dafook!
arrayname[arrayname.length-1]
bomb…

Nifty, thanks.

rellis, that works with all arrays [not just String[]]

cool

although it relies on the ability to determine how long an array is!
so be careful!

Yeah, I have to get into some halfway-tolerable recent music. Soundtracks have burned me out

jottinger, unless the string is null, would there be problems? I mean, rellis is splitting a string to get an array
jottinger, unless the string is null, would there be problems? I mean, rellis is splitting a string to get an array

[TechGuy]: the guy who runs this mixes it up. he’s got a huge range of music. anyone who’ll play some classic REM, then josh shikaburo, then Beethoven… ahhhh
he also _NEVER_ hits shuffle.
-ever-
he organizes his playlists very very very carefully.

perhaps something like this? http://www.theserverside.com/news/thread.tss?thread_id=20180
hmm wait it costs and it’s a driver replacement; not ideal

after I include a file in a jar, do I have to extract it to use it? (I just want to pass it into the a java file as its configuration file)

k. I practically skipped the 90s and most recent years. 3/4 or more of the rock music I just passed up, couldn’t really listen to it.

heh
you didn’t miss much
i really do credit RP for introducing me to stuff i would -neve-r have heard before.
nickel creek being a good example.

nickel creek is a really good band

nickel creek?

yeah
instrumental band, bluegrass IIRC

hey vulture c++ geek
;p
is that him? not sure ;/

vulture!
Yeah, that’s him.

true, hehe.

Yeah…
It’s also a bird.

anyone know of any good references for history tracking within a database?

you mean, like a DB journal?

How long does it typically take a JSR to get adopted into the core language API after a final approval?

MarkT-: 8 months at BEST
ooo, core language is even longer

look at generics
i think it was the last to go in

yeah, closures will take even longer

closures will be in java 7, won’t they?

maybe

language changes are ssslllooowwwww
not necessarily
java justifiably resists language changes… 1.5 was a surprise with that

blah

I was talking about a JSR that’s just an API, not a language change.

jottinger not really sure what you mean. essentially i need to track for example an account record and its various “states” so whenever it gets updated i have all previous versions

MarkT-: which one?

the system i have right now is alright, but wonder if there might be a better way that i just cant find

why not use explicit versioning?
hibernate et al support that out of the box

actually an aop interceptor that caches on method signature should work

because i cant use hibernate =\

JPA?

atleast at this time

a lot of jsr’s are just API’s.

MarkT-: I’m familiar with the JCP, dude.

Or were you asking which jsr _I_ was referring to specifically?

yes.

yes. duh.
8^)=

sorry… (slow)

no worries.

JSR 231

haha
that one will be a LOOOONG time if ever
progress has been rapid on it, though… but as a core API? Probably never.

Why do you think, jott?

OpenGL isn’t something the platform can rely on.

http://www.forbes.com/home/technology/2007/08/02/recruiting-silicon-valley-tech-cx_bc_0803talent.html

~jsr 231

aditsu, jsr 231 is http://www.jcp.org/en/jsr/detail?id=231

opengl is fairly ubiquitous… I can’t think of a single graphical platform that isn’t obsolete and doesn’t have it.

groan. Ya know, screw this tracking of file modification time

heh

i’m not sure why there needs to be a JSR for that.

MarkT-: not knowing what you said, you said it.

I’ll just reparse the config file at every iteration (30 seconds). It’s not that bad

so many of those JSRs are more product requests than actual infrastructure issues

would having opengl bindings actually help java?
i seriously doubt we will see a game in opengl anytime soon, and what other industry would use it?
er not opengl games but java games

anyone have a guess at the most popular java gaming platform?

JEE?

hahaha! No!

JME!!!!

cell phones?

dingdingding

ah.

MarkT-: ever see a cell phone with opengl?

opengl

Puzzle Pirates

ever see a cell phone with directx that you could afford?
me neither!

directx is a windows-only thing.

puzzle pirates

Oh wait, you haven’t answered yet
MarkT-: note that there are handhelds that run windows….

my desktop can intercept radio waves.. does that count?

okay…but it’s a noteworthy title written in Java

sure it is

opengl is cross-platform. directx isn’t.

dosnt matter

Doesn’t matter why?

the gaming industry relies on the windows platform

/ignore Aradorn
not all of it.

that’s the _current_ state of things, yes.

the big studios do

Like Blizzard?

like id?

Oh, except they have a Mac build of their games.
You lose again.

well, I don’t really want to drift from the topic being about java here… so I’ll refrain from arguing.

build platform != runtime platform

anyhow.
What’s up all?

MarkT-: in any event, opengl isn’t likely to become part of the java distribution.
the jre is too bloated as it is, anyway

the jogl bindings are pretty easy to use.

Not opengl itself… just the api.

no need to make it worser.
that has 0 to do with it.

they are adding a whole bunch of stuff in java7. Some of it’s pretty cool.

Comments off

well i have a object stream going between a servlet and an applet The applet is dynamically resized with the

bLike “This all makes me realise that it isn’t a problem that Common Lisp’s OO support doesn’t include private. That might actually be a good thing.”/b

There are far worse ways that Java could go than becoming more lisp like.

Nah. It’s not perfect, but we don’t need yet another lisp dialect

;

How does java decide whether to use RasterPrinterJob or PSPrinterJob when printing?

I’m not saying there aren’t better ways it could go as well.

is there a truly cross platform 3D library I can use for java? JOGL requires compiling for all sorts of architectures, and Java3D appears to be the same way, unless I’m misunderstanding something

um….how isn’t jogl cross platform?

you need native libs, unless you want software rendering :P

OpenGL is a portable library.
Rather, implementations seem to exist in several OSs

but don’t I have to include binaries for a whole bunch of architectures?

yea but thats the same way for anything

yeah, you do

you have to do same thing with JDBC, iirc

Can’t make a magical jar file to add to my build path?

You’ve gotta provide the dll/so that supplies the JNI boilerplate code.

you can make a loader that will provide interface to the libraries you need though.. and that will decide, based on environment, which libraries to use

yeah

so the rest of the code will be oblivious to which library you’re using, as long api is same.

And implementations of OpenGL are pretty consistant across the board…

I was hoping to avoid something like that, because right now my program is neatly packaged into one jar host file

So?

google stuff up.. maybe someone did already that for opengl

ok

I think the classloader can somehow load the native lib, iirc.
er, no Runtime.
What is the app?

It’s for working with Chemistry. There’s a portion of it where I’d like to feature some 3D graphing (very simple point plotting, line drawing)

opengl might be overkill then.. i think someone mentioned along the lines of java3D in the past
~java3d

dfr, java3d is an api to add an extra dimension to your application, see https://java3d.dev.java.net Also see JOGL for hardcore openGL coders.

OpenGL is fun!

oh, i bet.. i never played with in in OO though

OO?
Object Oriented?

ya
the best i did is using it from C++ a few years back.. and i think it was quite and quite C

eh…? It’s not really object oriented.

I’d imagine that the java wrappers provide some OO-ness though

It’s a bunch of functions, but it has some elements of object oriented ness.
no, it doens’t.

duh.

It’s pretty much a big class called GL that’s got a shit load of static methods.

duh
that blows.

not really.

frankly, I’m not 100% sure about openGL structure, so it might be okay.

It’s sort of stack oriented…

but i kinda prefer to avoid mixing OO with procedural style

meh
OO is overrated….

and underdefined

I’m not saying that OO is the shit, I just advocate not mixing the styles too much.
unless you _really_ know what you’re doing.
of course, that’d imply that no one else knows what you’re doing :P

so… if anybody here is in the Triangle (RTP, NC) area, feel free to join us over in #trijug (Triangle Java User’s Group). :-)

anyone know if there is an official standard behind locale strings such as en_US, fr, … ?
i know these strings consist of ISO 639 language codes and ISO 3166 country codes, but i mean a definition for the whole string

goodnight fellas

peace-keeper: Unicode.org?

peace-keeper: at least the ones used by Java are defined somewhere in the javadocs
peace-keeper: but perhaps that’s not official enough

peace-keeper: http://www.faqs.org/rfcs/rfc1766.html
There
There’s not degrees of officiality…

is it a know problem with sending a bunch of booleans in serializable’d class over sockets?

What’s the problem?

well, it seems the data is not what i sent
i’m sending like a event structure
of my movements in a game
i have this event structure and processes it localy (it works fine) and then i send this event structure over sockets to my ‘enemies’

Booleans? Movement? Like “Left? No. Right? No” etc?

yeah
and somethimes it reacts very strangly, for instance my up and down could make the player go left
it seems that the booleans gets scrambled or something along the way
it seems like the other datatypes works fine, for instance i have a byte with a id

maybe you could log the bools that go on one end and that come on the other end and diff them
to make sure the problem is with serialization.

ive logged them to the extent that i print out what i get, and it differs
keyhandler.process(player, playerState);
Networker.getInstance().sendPlayerState(playerState);
what happens when they get the playerState object is that they run the keyhandler.process on the object
but as i said, the data is different when it arrives.
worth mentioning is that i’m testing this on my loopback interface, so there shouldn’t be any problem with external things

and I add “Foo”, stringArray to it…if I later change something in stringArray…does it change in the HashMap? I guess my question if it is passed by value or reference

eckser, yes

Okay, so it will change?

everything is passed by value, but not the value by which you are thinking

gotcvha

and yes, it will change

objects are effectively references.

gotcha* thanks

which are passed by value.

I have one more question…is there anyway to only put the keys in and not the values of those keys (array of strings)?

null is a valid value.

read the javadoc for HashMap

Thank you

however, be careful with it.. since if a key doesn’t exist map.get will return also null.. meaning it will give same return whether there’s no key or there’s a key with value “null”

God damnit
PVCS is the worst version control ever.
If I took a shit in a box it’d be better than PVCS.

you should go do that and use that then

Hello, anyone here?

no
who are you and what do you want?

It’d probably be cleaner too!

I’m a human being, like the rest of you and want to one day come to this channel and not feel like it’s full of stuck up teenagers.
;-)

huh?
as far you’re concerned, I’m 12yo
=P

no 12 isn’t a teenager

and we are no human beings

dfr

ouch, damn. fine, 14

Sorry, tarring you with the same brush
I’ve encountered at least 10 right stuck up pricks in this channel though, so I steer clear usually
apologies for generalising
I’m sure they’ll turn up shortly and start being patronising, immature and elitist biggots soon.

are you sure you didn’t visit efnet #java?

no, I find them guys to be really laid back actually

lol, that explains much

but you guys seem to do a lot more java web host talk here
but I must say, the channel is hilarious, and I keep it open just for entertainment, if I don’t have questions.
bbut I must say, the channel is hilarious, and I keep it open just for entertainment, if I don’t have questions./b

i try to keep dickery to a minimum here. if you have a problem with someone let me know.

Anyhow, after being so rude to you all, I don’t expect an answer, sorry for that, if you read the transcripts, you’d know why my back is up here, but still my bad.
how do I configure what port spring listens to for servlets, and can I configure different servlets to listen on different ports (1st question is essential, 2nd is kind of desirable)
bhow do I configure what port spring listens to for servlets, and can I configure different servlets hosting to listen on different ports (1st question is essential, 2nd is kind of desirable)/b

spring isn’t a servlet container…

I think the servlet host container might be tomcat. Would I have to configure it there then?

Aye.

ok. Thanks.

there’s a #java on efnet? Hmmm… that ought to be interesting…

yeah, I’ve been kicked there several times for being correct

what is today

hah!

today is same day as this morning

(new Date()).toString();

several popular operating systems even include the ability to display the current date

wow
Do I have to buy an enterprise license for that
?

You can clone Strings with Date for multiple installs

how do i deal with “unchecked cast ” warnings?
I have like 200+ warnings in my project.

You cast

ya check the cast…

SortedMapObject,Object[] sm=(SortedMapObject,Object[]) appdb.selectGvmWithNumber(getLoggedUser(),currentRowActionParam).getRows();

what type does getRows return?

result in “unchecked cast from object to SortedMap”

If you know that they are useless:
@SuppressWarnings(“unchecked”)

regarding that he doesn’t know what causes them, supressing them is a bad idea.

Uhm.. His casts may be completely valid. IF(!) he doesn’t know what they mean I agree.

the .getRows() method returns a SortedMap[] ; while I need SortedMapk,v[] . how can i fix this?

sleepster++

doesn’t matter. use unchecked cast

you return SortedMapk, v[]

you can not fix it… you can supress the warning though…

yes

hola
can anyone suggest tools for isolating memory leaks?

~tijmp

ernimril, tijmp is a small, fast and easy to use memory profiler for java/6 and later. See http://www.khelekore.org/jmp/tijmp/

that is mine, it is what I use…

I’ve seen JProbe, but was hoping there might be open source alternatives.
thanks, I’ll check it.

http://digg.com/world_news/Bullies_drown_six_year_old_boy

how is that java?

Cheeser, sorry. Wrong channel.

8^)=

Cheeser, by the way, how are you doing?

not too bad. kicking ass and taking names here at work. you?

Relaxing.

just committed a major piece of functionality.

what features?

some complicated reporting on user activity.
tracking workflow through an app, basically.

ah, any fun stuff?

software patriot act implementation?

actually, yeah.
i should be so lucky. 8^)=

I wonder how nice chatzilla on xulrunner is…

when should a method be declared ’static’ ?

~static

cheeser, static is http://java.sun.com/docs/books/tutorial/java/javaOO/classvars.html, also see http://mindprod.com/jgloss/static.html

~paste

http://eugeneciurana.com/pastebin

on line 55, why cant it call the constructor VerbDyadic? why is it looking for a method? http://eugeneciurana.com/pastebin/pastebin.php?show=3608

new VerbDyadic () ?

oh,
but it’s saying the public type VerbDyadic must be defined in its own class
when I put public in front of the class name
public class VerbDyadic

well, only one public class is allowed per java file

public *top level* class
public inner classes are fine.

oh I didnt know that
so I could make it protected or something?

you could just put it in its own file like a decent human being.
8^)=

you can also leave it package-private (the default without a keyword)

lol

though, I think it is good practice to stick with one toplevel class per file

yeah. anything else ust gets wonky

or is there any reason to do otherwise?

i’ve never needed one.

http://eugeneciurana.com/pastebin/pastebin.php?show=3610 … the call to apply() on line 56 is freaking out… “This method must return a type Double”

Does anyone know about joal?

~anyone

Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.

metaperl, you need to “return retval;” at the end of the method

Not the call freaks out, you do

lol
ok thanks bogard

Where can I found build joal for linux?

https://joal.dev.java.net/

no they don’t have there…
wait
i found it

What was that tss competing news site with the 2.0ish interface again?

it works! http://eugeneciurana.com/pastebin/pastebin.php?show=3611
it works! a href=”http://eugeneciurana.com/pastebin/pastebin.php?show=3611″http://eugeneciurana.com/pastebin/pastebin.php?show=3611/a
it works! a href=”a href=”http://eugeneciurana.com/pastebin/pastebin.php?show=3611″http://eugeneciurana.com/pastebin/pastebin.php?show=3611/a”http://eugeneciurana.com/pastebin/pastebin.php?show=3611″http://eugeneciurana.com/pastebin/pastebin.php?show=3611/a/a

anyone do .NET SOAP ?

~smack happy_broccoli
~anyone

Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.

I’d like to see a plugin for C# in eclipse though..

resharper. 8^)=

(There are some, but no debugger support etc.)

i’m outta here.

Too expensive.

What’s this attack?

When i had a added an caret listener to a textfield how can i determine if the caret position were changed by the user or the programm(for example by setting another text)

You must’ve pissed someone off because you had someone send 7,000 messsages to you in less than an hour.
You and lunk.

In what form?

Email.

I don’t use your email service.

Someone knows ricky AT myserver.com and knows that you’re ricky_clarkson.
The messages had your /nick in the subject line.

The only thing I use it for is to forward mails from my work account to gmail – I’ve never given the address to anyone.

They came from a number of spam zombots, mostly in the US.
Check at work then.
Someone may be infected.

If you can disable incoming mails to that account, that should fix it.

Is there a way to flush/reload an audiostream so that I can play it more than once?

I only run a cronjob to do the forwarding, once per hour.

I didn’t want to disable anything without checking with you first.

And that’s on lavender anyway (or whatever it’s called now).

mh, would need a hint on a good book on recent design patterns

I put a filter in front of it, so your normal mail will still get through. I was just freaking out about a potential DOS.
lavender.cime.net is still there.

Head First web design Patterns is a good intro

4 varenka postfix/local[24081]: BE3613A8C34: to=ricky AT varenka.cime.net, relay=local, delay=101881, delays=101804/73/0/4.7, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/bin/maildrop: Unable to create a dot-lock.
I have tons and tons of those. The maildir lock is disabled so email can’t be delivered now.

whaley, thanks

Any idea what’s in the emails?

Gack.
Probably a virus. It’s coming from spambots.

spambots!

It could be done automatically, given that my name ricky_clarkson is linked to my homepage on cime.net in a few places, e.g., reddit.

Im trying to get a SOCKS5 implementation to work. I call OutputStream.write(0×05) then 0×00, then flush the stream to register. The server closes the connection and my packet sniffer shows only 0×05 as being written. Where’s my freaking null character :P

..it might be unrelated to IRC.

Just FYI – if you see yourself getting yanked from varenka just log back on again as rclarkson. I’ll move the account to something else.

Same password?

It started with someone from IRC.

ricky_clarkson is back!
lol

Set up an RSA or DSA key instead andI’ll move that to the new account, if I have to move it at all.

you’re a tit again.
oops, typo.

?

haha

It’s spelled “boob”.
2] jjava2 | boob (1 of 20): (noun) (1) a goof, a jerk-off, an

What about “breast?”

That’s a homonym.

Ok, well, don’t worry too much if you have to disable the account.

hm

We have lots of users on varenka now (ls /home).
I don’t mind but if I see something affecting everyone I like to take action. I also just wanted to give you a heads up.

Vale, gracias. Me voy para dormir.

SO making the chooser a private member of the action keeps it from hanging, just makes it take forever for the program to load, hehe.

If I wind up moving the account over and you don’t have the DSA/RSA key set up just ping me here or in the private channel to get a new password.
Buenas.

Just while I’m here, what’s your opinion on Lisp/Scheme?

jfilechooser still sucks

Remove that emacs file from your home too when you get a chance
Very nithe languageth both.

Oh, did I install emacs there?

I dunno. But you have Emacs sitting in your home dir.
If you need anything installed let me know and I’ll have Ubuntu take care of it.

hmmm, send a patch when you get it working…

Things like emacsen and lisps work quite well without global install.

^_^

it works well for me, on several different computers, mostly linux boxes though…

or was

Anybody know of any libraries to export SVG files?

~batic

ernimril, I have no idea what batic is.

~batik

ernimril, batik is a set of Apache libraries for manipulating SVG documents.

Cool.

^^^ that is what we use at work…
I have not worked with it, but I think you get a Graphics2D that you can “draw” on…

I was thinking it’d be cool to expot the results of JSizer to an SVG.

ernimril, wow, really? you draw to a graphics2d and it magically becomes an svg?
that’s pretty slick

more or less, that is also how iText work for pdf-images

(using batik)

I have only looked at the code once, a long time ago…

just fop

itext is really much nicer…
it is also faster and uses way less resources…
if you are drawing a geographical map then itext is definately more fun, just get a PDFGraphics and paint your component

yeah, I wouldn’t use fop for drawing graphics… different problem domain

Why am I such an SWT whore?

because you suck, obviously

NO U!

do you create any large documents with fop?

ernimril, I haven’t tried anything longer than maybe 10 pages
generating telecom invoices from xml invoice data

ok, we do, or rather we tried, got OOME (I told them so from the beginning, but they still tried to use fop… damn sometimes I hate being right…)

that and generating my resume
ernimril, and yes, you’re right, I wouldn’t want to generate huge (as in hundreds-thousands of pages) documents using fop
for smallish documents, it makes sense
I wouldn’t publish a book with it, I think…

lol
I just jsizer’d the beta version of my code here.

I try to stay away from xml and xslt…

can one ssh into a machine that’s behind a NAT
ugh wrong channel

um…?
Yes.

did you read about the iphone bills? some people get 100:s of pages (even when all the items cost them 0 due to fixed montly cost…)

yeah, I saw that

Blackwell!
yes
forward the correct port

pm?

buttsecks?
must be trying to cut back?

no, i just wanted to ask him something

http://icanhascheezburger.files.wordpress.com/2007/04/invisible_buttsecks.jpg

lol

that is cute.
that cat is really going at it.

r0bby:

What’s with all that cats recently? Strange..


invisible buttsecks?

cats are adorable

the ‘failed’ cat is the best

Which is?

yup.
fail

http://img378.imageshack.us/img378/4934/failtx2.jpg

Failed cat?

It makes you laugh and cry at the same time.

LOL!!!!!!
FailedCat++

lol
poor cat
lol

that’s an awesome pic…sad yet hilarious

~MAVEN

svm_invictvs, MAVEN is a build tool similar to ant based on the idea of a project object model (POM). See http://maven.apache.org/ for details

Every time I see “pom.xml” the font on my computer makes it look like, “porn.xml”
bEvery time I see “pom.xml” the font on my computer makes it look like, “porn.xml”/b
patspats?

like how your grandma might pat you to comfort
except i do it in a codesending way

Anyone else ever have issues with Javadoc dieing in Eclipse? I’m using Eclipse 3.1.2 with Java 1.6

ah

eclipse 3.3 is current

I know, I have to use 3,1,2 thanks to a specific plugin.
3.1.2*

what specific plugin?

PHPEclipse

yuck

yeah, it’s kinda shitty, but the best PHP IDE thats uh…free

good thing I don’t need php

indeed
hmm can you have two JDKs installed? You can right?

yes

Is using an xml based configuration file perticularly a bad thing?

no

xml-based config file is trash unless you have some sort of well-defined schema
and you have a good reason for it
otherwise, why not .properties, etc.?

Ther reason being it needs to have scope like structure.

Properties classes can also read a xml prop file :P
its really basic tho

It needs to be read in C++ and Java. And parsers for XML are easily available in both languages…

almost all java frameworks use xml as conf files
atleast the one ive worked with
just make a clear schema or dtd so you can validate easily

is there any way to get a jax-ws enum method parameter to not have minOccurs=”0″ in the generated WSDL/xsd?

no
generate the wsdl yourself

doh

because java itself does not have a “NotNull” declaration

I don’t see why the @webparam not have an option for it
saying if its required or not

yeah, a well defined schema helps…
So that the parsers in both languages actually can enforce some set of rules.

any swing gurus around?

ask your question and find out

I have one textfield per tabbed pane and when I switch tabs, i want to put focus on the textfield. I do this by using a change listener. stateChanged() calls a method which tries to set focus. This fails.
So, I tried having the method statechanged() calls create a new thread that sets focus and i put this thread n the gui thread with SwingUtilties.invokeLater(). It still fails.

darn that was going to be my suggestion

I’m not sure I can’t get focus on the text field… is anyting obviously wrong in what i descriobed?

why are you using a thread?

because gui drawing takes place ina swing thread so i set focus in another thread, using swingutilities should guarantee it happens at least after the tab is displayed

first of all
you need no threads

ok. can you tell me what’s wrong with my design?

stateChanged() { EventQueue.invokeLater(new Runnable() { pv run() { field.getFocus() } });
second of all,you need to describe wtf is “it still fails”
~tell jdroid- about doesn’t work

jdroid-, 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)

what else would “it still fails” mean if i’m saying the text field isn’t getting focus…
;P

you could be saying you’re getting an exception
we don’t have ESP
you also aren’t describing the method by which you are requesting focus

requestFocusInWindow() sometimes returns false. when it returns true, the item doesn’t get focus
urequestFocusInWindow() sometimes returns false. when it returns true, the item doesn’t get focus/u
why event queue and not SwingUtilities?

because EventQueue is the proper place for invokeLater, SwingUtilities is simply retained for backward compatibility

the code you wrote is essentially what I had, but using swingutilities, which also IS a thread, it’s just the swing gui thread

no, it’s not a thread

ah, ok.

you are just specifying a piece of code to run
different semantics

sure it is. you’re runnable gets run in the gui thread.

you aren’t creating any thread
you are just requesting a piece of code to run
anyway, sounds like maybe you aren’t getting enough delay by using invokeLater

ok. my terminology was wrong before…

you might really want to *create* a thread sleep a short amount of time and then call invokeLater

i haven’t tried EventQueue. But the error I described happens with SwingUtilities.

there is no error
the behavior of using SwingUtilities and EventQueue is the same

hmm… So I’m confused why if the tab being clicked initiates the creation of the runnable which is invoked later, why does it not happen sufficiently late enough?
i was under the impression gui drawing happens in one thread where my runnables are run in sequence with anything swing is doing on it’s own

simple, because it’s likely there are other events that occur after your “invokeLater” which draw focus away
it’s an “event queue”

i need some pointers for obfuscating a war file with proguard, anybody able to help out?

that means items are queued for execution
sebr obfuscate first, pack war later

ok

sebr and don’t obfuscate the main entry points, servlets, filters, etc.

well i’m not upto that yet
don’t really know how to create the ant task

sebr then you can’t obfuscate

sure

ok. if I have a window listener and window focus listener and that’s it for listeners, do you think they are interfering?

jdroid-, has nothing to do with the listeners

hmm… do you have a suggstion for how i can look for other events that might interfere then? or maybe something i could read that’d help explain the stuff going on here?

jdroid-, if you don’t understand what’s going on, it’s best to see if you can hook into the event queue and see what events are being passed

oh, hmm… i’m not sure how to do that

jar basedir=”$build.home” jarfile=”${dist.home}/${app.name}.war”/

should be some info in documentation in EventQueue

should i create a new target obfuscate between compile and dist?

k. thanks.

obfuscating the necessary classes then call dist?

what’s up?

pm?

sure

What does Java heap space mean? My application crashes and gives me some out of memory error message

try giving more memory to the vm

whitelist me?

the vm defaults to a certain amount of memory and won’t go past that. even if your machine has more free memory

done

where do I do this jdroid- ?

~tool docs

when you start the vm. check out -Xmx or vmargs

cheeser, tool docs is http://java.sun.com/javase/6/docs/technotes/tools/

for a servlet is it nessesary to setContentType for the response? i will be sending serialized objects

if it’s not html, yes.

hm

I’m trying to find implementation of native method java.awt.Windows.WPrinterJob.textOut(long,String,font), how can I find this method in the SCSL code distro?

~filereader

tieTYT, filereader is of limited use because almost NOBODY KNOWS ENCODINGS PROPERLY and it doesn’t let you set one. Reader reader=new InputStreamReader(inputStream,”some encoding here”); is generally better. inputStream would probably be a FileInputStream

cheeser, ok, thanks

meow

cheeser, gaillard_ no, it isn’t necessary if you control the client
it’s good practice, though

pfn, ah ok, good that will safegaurd me what would the content type be anyways for an object? multipart?

whatever you want
application/x-java-serialized-object maybe
or maybe as simple as application/octet-stream

cool ok thanks

can i ask socket help ?
can anybody see on line 20 rong cod ? Warning: socket_read(): unable to read from socket [54]: Connection reset by peer in /home/y_s.php on line 598 http://www.pastebin.ca/657629

heh ask to ask

is more php write

why would we answer a php question?
gaillard_, of course, “whatever you want” assumes that you are in complete control of the client

its my applet and my servlet itscommunicating with so i hope i am!
bits my applet and my servlet itscommunicating with so i hope i am!/b

anyway have an opinion on spring mvc vs gwt?

they address different problems
spring mvc does not address ajax, gwt does
end of discussion

I was told that mvc could have the ajax http callback placed in the mvc?
but this seems like a “workaround” rather than core functionality

like I said, different approaches

so gwt is pretty unique?

I would guess so

Im verrrry impressed with it… but you ahve to keep your options open
Im verrrry impressed with it… but you ahve to keep your options open
uIm verrrry impressed with it… but you ahve to keep your options open /u

sure, as Json, XML or something like it.

When you’re starting with a clean slate like I am, its hard to choose an EE framework/platform… spring vs seam vs struts vs portlets vs jsf… *sigh*.

ahughes, it’s not hard at all
you just and choose the best pieces
spring for the backend along with java ee5

wicket++

then you’ve got seam and wicket
I think are your top contenders

there is not necessarily a best, though =P

pick the best for your needs, obviously
if you need an ajaxy front-end use gwt or whatever makes ajax work out easily

You can always integrate Gwt with Wicket if you want.

why not portlets?

Or just use the built-in.
Why?

because portlets aren’t a framework
portlets = servlets

THey are handicapped WebApps

except they’re made to be rendered on the same page with other portlets

And a cludge to get to intercommunicate…..

what’s so kludgy, use an external mechanism, jms, etc.

right.

jmx normally

I’ve done it with DWR, I’m talking of updating one from the other.

jmx is “wrong” from a semantic perspective

Which is being addressed in JSR268

we’ll Im no closer to deciding… I think its really Portlets as a container or Seam + gwt for the AJAX/JS.

seam seems to get a lot of publicity

coversations are cool

lately, I’ve just written WS and use a XUL application to access it directly
screw webapps
write for firefox or xulrunner and call it a day ;-)

WS? XUL?

WS = webservices
XUL = xml ui language

I want to create a client and a server which send each other some strings with the use of the http protocol. could you please provide me with some reference or examples?

no, that’s what google is for

I don’t know what to search for

it sounds like you know what you want to do, just not how to do it… rfc will help with http

fredy22, http protocol, network, socket, server, client
fredy22, sounds like you have the keywords already
you could probably do away with “network” and “socket” and still come up with reasonable results

thanks
jdroid-: I have already read the rfc

then what aspect do you not know?

just what i was gonna type…

what exactly are you looking for

If I use seam, how can I add something like a CMS to our site, and a Wiki? becasue this is the advantage of portlets… plus the security container

ahughes, how is that an advantage of portlets?
in your pages, just include the “CMS” component
as an include

my female coworker just said she’s “working for pennis”

or the wiki as an include

I have read the rfc, but I have no idea how to implement it. I haven’t dealt with java networking in the past

like a jsp include?

fredy22, then it sounds like you need to read the tutorial there

or an iframe?

~tell fredy22 about networking

fredy22, networking is http://java.sun.com/tutorial/networking

ahughes, your choice
fredy22, so using servlets, etc. is out of the question?
~tell fredy22 about javadoc HttpURLConnection

fredy22, I don’t know of any documentation for HttpURLConnection

eh?

Javadocs down for now.

well i have a object stream going between a servlet and an applet. The applet is dynamically resized with the browser window with a bit of javascript, and it also calls a method in the applet to let it move things if need be, its one big applet for the window. Someone please give me a compelling
reason not to use this as a very very interactive website?

http://java.sun.com/javase/6/docs/api/java/net/HttpURLConnection.html
javabot should say so

I guess the factoid ’sensayuma’ might be appropriate:
ain’t you got no sensayuma?

it’s an assignment for school, the specifications didn’t mention servlets

fredy22, if you’re using java6, cheat and use the built-in http server

java 1.4.2

if it’s an assignment for school, you’ll probably lose points by using the built-in http server…

http://java.sun.com/javase/6/docs/jre/api/net/httpserver/
java 1.4.2?
people still use that crap? ;-)
GET http://java.sun.com/javase/6/docs/jre/api/net/httpserver/spec/

I have seen the HttpUrlConnection class but I cannot use it from the server’s side, I can only use Socket class. That is my main problem

use that then
fredy22, well then, you have the networking tutorial
you have the http rfc

any opinions on doing what i wrote?

you’re done
gaillard_, applets suck

?

pfn, why?

fredy22, your problem is solved by combining the two
gaillard_, accessibility, ease of use, ugly gray boxes, etc.

pfn exactly..could you please provide me with some advice?

I have

It’s homework, you are supposed to do it.

I have given you the networking tutorial
and you already know about the http rfc
what more do you expect?

pfn, accessibility? ease of use is up to me to make good as well as ugly stuff right?
pfn, if i were to do it well isn’t it much more capable then anything out there?
pfn, full graphics library and such

I can’t combine socket class and httpurlconnection class. that’s the point I need advice

gaillard_, depends on what you’re doing, but flash tends to be more capable…
fredy22, httpurlconnection = client
duh
fredy22, you write the server

pfn, may i ask just what the main points are? (not dabled in flash)

smaller runtime size, faster loading, better media and animation support

my problem is that in the server programm, I can’t use the HttpURLConnection class and its convenient methods on HTTP elements…
is it possible?or not?

fredy22, the httpurlconnection class is *ONLY FOR CLIENTS*
I’ve already given you your answer
1) use the builtin java6 http server
2) use your knowledge of the http rfc + java networking tutorial to write a simple HTTP server
3) use HttpURLConnection to communicate with your simple HTTP server
use 1 or 2 and combine that with 3–assignment done
any further questions will fall upon deaf ears

thank you a lot but 1) is not possible because we work with java1.4.2
anyway thanks

pfn, you sound like a microsoft rep haha

then your answer is 2 + 3
done deal

1.4 … man when will people move on

pfn, would you mind commenting on the strength of flash over an applet?

Is it possible to hide all JDialog objects made out of a class at once?
I mean the setVisible(false)

well flash is more pervasive than the java plugin for browsers

pervasive?

http://www.adobe.com/products/player_census/flashplayer/

http://en.wikipedia.org/wiki/Pervasive_developmental_disorder

use a static List to track the new objects. use a static method to hide them

never eat an asperger

static lists–

my workplace has a great email filter. blocks .zip files, but not .piz files

what’s a piz?

zip backwards

well that’ll stop 99% of zip viruses i’m sure
and that’s the point
i hear gmail’s is smarter though and to get around it you password protect your zip

nice
that’s good to know
8^)=

when i meant stop 99% of viruses, i meant 99% of viruses propogating from grandma’s opening it
np but remember that’s what i heard. You may still have to rename
bnp but remember that’s what i heard. You may still have to rename/b

grandma is such a rascal

fucking grandma
always looking at porn popups apparently

hi all
is there a way to configure the default fontsize for the cross platform gui? I forget its name

swing

javabot tell myrkraverk about swing

myrkraverk, swing is a windowing toolkit for Java. Tutorials: http://java.sun.com/docs/books/tutorial/uiswing/ and http://www.swingwiki.org/ also check out ##swing

hmm, yes, I know what swing is; only, in applications I *don’t* write — can I still tune the default fontsize?

setFont().
er…you didn’t write it — the program has to provide the ability to do so.

~look and feel

cheeser, look and feel is java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel your.fine.Program

oh, I was hoping I’d be able to twiddle with some config file ;/

which probably doesn’t *quite* get you there.

that is, specifically, I’d like to increase the menu and button size of the netbeans UI

How do i make my method execution to interrupt for a given time?
need to get reference to current thread?

Thread.sleep(long)

nice
thanks!

i’d pull the javadocs, but i think the bot’s still broken

long is ms
ie 1000 = 1 second

i’m working on that now.

yeah, i know. any eta?

i mean. i’m actively writing code right now. not just considering it.
8^)=

heh

i don’t get it. i can see it running just fine here.
maybe i’ll push up another version and see.

can’t be much worse than what we’ve got now

indeed

what are you doing to it exactly?

trying to figure out why it works locally but not on the server.

smartass–

dumb questions– ?
what did you want to know?

so, i ended up using a ByteArrayOutputStream
i write all the primitives with a tag and a packet size and then send it across the wire
and decode it similarly on the other end, seems to work great in the tests i’ve done so far

nice

the only thing that threw me for a loop was that when i grab the incoming packets i have to queue up the data because they don’t necessarly fall on the same boundaries as the packets i’m trying to reconstruct
but once i realized that it was smooth sailing

Sou|cutter, http://sports.espn.go.com/sports/boxing/greatest/news/story?id=2815643

Can i instantiate object using reflection with my custom constructor?

yes. see Class.getConstructor(param types) and Constructor.newInstance(args)

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#getDeclaredConstructor(java.lang.Class…)
erm, Sashlik rather

use getDeclaredConstructor if the one you want isn’t public

i was just about to start reading what the differnce was between the two
ui was just about to start reading what the differnce was between the two/u

Fanook, thanks

Hola.

sup

hiya pr3d4t0r

ahoy

Hej.
Hangin’.
Playing with my new Apple Keyboard and eating organic fresh heirloom tomato.

i had to look it up too, but it’s a pattern in java’s reflection classes. the getXYZ only searches public stuff, the getDeclared XYZ searches everything

making me envious…. i’m still at work and am probably settling for take out thai

how’s the new keyboard feel?

Great. Like you’re typing into thin air.
Very responsive. Oddly, the keys have a nice travel feedback.
Come work for us…
:*
For several weeks I had a mysterious crash on my servers and gateway at home.
I couldn’t figure out what was causing it until two Tuesdays ago.
It was the server-seeking housekeeper attack.

haha

heh

turning off the computer you accidentally left on?

More likely: Accidentally turning off the computer he intentionally left on.

So I asked her this morning to go around the server area with care, etc. Problem solved. She was a bit too diligent at cleaning the area and turning OFF the boxes that “you forgot to turn off, señor Ciurana.:

heh

orange80++

working on that :-)

;-)

you fergetted the ~

~orange80++

i took javabot down to fix it.

oh

it’s weird. the process command just returns. nothing in the logs.
not even the debug i put in.
8^)=

Is she hot?

ghosts in there

i noticed that it doesn’t log when i tell it to either
It logs when it matters though

gremlins are obviously causing this problem.

No, she’s 60.
Short.

Ahh.

pheh, there’s no such thing as gremlins

Indigenous looking.

orange80 might be into that

it’s ghosts

I might, but… I’m not.

I had a really hot one about 2 years ago. She couldn’t do shit around the house but was very nice to look at
..

It’s always a trade off, I guess.

Brazilian girl, around 24.

you tend to want somebody to clean good

Nice arse, small tits, pretty face.
Indeed.
The one I have does a fantastic job, is responsible, punctual, humble, and loyal.

That’s the best kind of worker

She didn’t even realized that I’d given her a raise until a week ago.

That’s all you need :-)

She tried to return the “extra” money today then I explained to her that it was for a good job over the course of her first year, etc.

That’s _AWESOME_
honesty is the best trait.

I also gave her family a bottle of spumante and a ham for Thanksgiving, and she gets a little $$ for Christmas.
uI also gave her family a bottle of spumante and a ham for Thanksgiving, and she gets a little $$ for Christmas./u
Yeah. She has keys to my house — I gotta have trust.
The Brazilian chick was pretty nice, honest, loyal, etc. but did a lousy job.
She only cleaned well when I took the day off to hang out around the house and monitor her. Otherwise she would be done in 30 minutes.

it always sucks to fire people, but…

I rather keep good people motivated.
My intern is going back to the university next week.
We hired her half-time.
And she just bought a new MacBook Pro.
We have a “bitching jar” at the office: if you whine, you put a dollar in the jar. We’re using the money we collected in the last 40 days to buy her a Speck MacBook shell as a farewell gift.
She doesn’t know about it.

unless she’s one of the 235 people who hang out here

She sort of is, but she isn’t on-line yet.
She hasn’t fully groked IRC.

well, if university is good for one thing, it’s getting a person on to IRC :P

I would likely have filled that jar up

at least, so it was back in my day

Otherwise she’s pretty tech adept.
I’d had you transferred to another team.

:’(

I only complain if there’s something worth complaining about
since I’ve started working on jboss remoting, I’ve not had a one, really

Better than being fired ;-)

anybody have a tutorial on how to obfuscate a webapp which is running in Tomcat?

. . .

i know, it’s a big ask

Isn’t your code hard enough to read as it is?

obfuscation is a fool’s errand

what if you are deploying to a clients server?

that’s what licensing is about.

you are asking for a technical solution to a social problem
talk to the NANAE and spamcop people about how well that works

To start my anonymous implementation of Runnable i should call run() ?

yes, considering that’s the only method Runnable declares

~tell Sashlik about threads

calling run() doesn’t start anything though

stupid bot
8^)=

you call start() on a Thread object to start a thread running.

it does. just not in a separate thread

yeah, my point is that it’s just a normal method invocation. Typically when somebody says “start” they mean kicking off another thread

mindCrime but i have an instance of Runnable, not Thread

you’d be better off doing new Thread(new Runnable(){/* your stuff here */}).start();

are you trying to run some code in another thread, or are you just packaging stuff up as a runnable?

if you want a thread spawned, pass your runnable to the Thread() constructor

Fanook ok will do that

and then call start() on the thread object

ojacobson run some code in another thread

if you don’t actually want it to run in a separate thread, then it doesn’t matter. :-)

Then you need to create a Thread wrapping your Runnable, as has been suggested, and call “start()” on that thread.

thanks, i will wrap

repetition++

maybe i could anonimously implement thread instead of wrapping runnable?

Don’t do that.

why?

you could subclass Thread yes, but it’s not really a good practice

It ties your code to being run on a new thread, making it less flexible

Fanooks suggestion is a best practice, right?

yes.

ok, thanks

and concrete inheritance when the subclass isn’t really a specialization of the super class is just silly

single inheritance kicks asses

:-)

you can always delegate thread-functioning instead of inherit it, however
well, not always )

look. javabot.
..

~javadoc Thread

I don’t know of any documentation for Thread

orange80++

orange80 has a karma level of 5, pr3d4t0r

~javadoc String

I don’t know of any documentation for String

hrm

-_-

~javadoc java.lang.String

I don’t know of any documentation for java.lang.String

Bite me.

cheeser’s working on the javadocs

That’d be me
forget bite $1

I forgot about bite $1, r0bby.

bites chomps down on $who’s leg…mmm chicken

bites chomps down on $who’s leg…mmm chicken anyway, r0bby.

O_o

does javabot do an http search of the APIs?

you look like very smart

I guess the factoid ‘make like a tree’ might be appropriate:

:|

no: javabot indexes the javadoc jar

ah, much more sensible…
if not more complicated, tho

the entire source code is open source.

oh, nice.
where is it, by chance? I’d like to take a gander

http://javachannel.net/wiki/pmwiki.php/FAQ/RunningJavabot
tutorial on how to get up and running.

with slight errors
8^)=

oh, svn. nice

mine runs okay, i don’t touch javadoc

it has nothing to do with the javadoc.
the instructions have slight errors.
e.g., you can’t edit admin info online yet.

ah yes

heh. with @ annotations as well…

you can *ADD* an admin
you can’t *EDIT*

i swear i just said that.
8^)=

hm, the existing Arrays wasn’t good enough?

what do you mean?

w00t
Gracias.

Heh.

oh, that class.
look at the API

The new keyboard requires me to look down at it once or twice to ensure that my fingers are placed atop the right keys

I half-learned JavaScript before java, and was rather disappointed to find split(String) but not join(String)

Fix the javabot wiki entry’s errors!

join the club
8^)=
if it weren’t some weird combo of text and images i might.

I fixed it.

and I could argue i have more pressing things to fix inre the bot
8^)=

str+str2

Heh.’

i fixed that admin bit noted that it is not possible to edit admins currently

this would be String[].join(String). As far as I’m aware, not possible in Java.

ah, THAT join

yep

any other inaccuracies blaring?

fwiw python spells that s = “some string”, s.join (someIterable)

hm, that would be nice.

What would that do?

{“a”, “b”, “c”} joined using “,” is “a,b,c”

Hey everyone; I’ve been looking for a zip or jar with the API javadoc for the MySQL Connector/J package, but I can’t seem to find it anywhere. Does anyone know if such a thing exists (it should, right?) and where it can be downloaded from? Thanks

Ah.

thank you for pointing that out
I didn’t even see it
jt

have you tried looking in the connector/j zip?

Yes, but I couldn’t find it.
Not in the doc/ folder

the javadoc isn’t there, but the source is. You could probably convince ant to spit out javadoc for you in very little effort.

Hmm, perhaps, except that will require me to install a great deal of dependencies. But I will do that if I have to

um, use the javadoc tool

~javadoc String

I don’t know of any documentation for String

hrm.
~javadoc String

I don’t know of any documentation for String

Ooh, it worked

did it load into the table?

Thanks, Fanook.

~tell apetrescu about be fanook

apetrescu, javabot nods wisely then pours the bit bucket down apetrescu’s shorts

o.o;

This is just too comfortable and nice.
http://eugeneciurana.com/galereya/view_album.php?set_albumName=Apple-Keyboard

holy..that’s a thin bugger, ain’t it

Yup.
Very comfortable.
I can type faster than on the original Apple keyboard.

I really don’t like straight line keyboards
main kb is a very old MS Natural

waz, I have one of those too. Don’t want to replace it.
(I ruined my spare with spilled beer, alas.)

that’s ms’s split style kb, right?

yeah

Their newer model doesn’t feel nearly as sturdy. Keys are shallower, with no mass to them.

i tend to prefer those too…. my fingers get cramped on the regular kbs

ditto
I don’t have pr3d4t0r’s dainty hands

aight, how many of you assholes are using model Ms? Show of hands? C’mon, let’s see those monster forearms.

i use them for curls at the end of a workout :-/

If I had my way and some mechanism to connect it and work well with a Mac, I’d be using an IBM clicky 101 keyboard.
I’d rather use that than the Keyboard.
But given the choices, this is much better than the old white or black keyboards.

I never even open those

The Keyobard is heavy.
Have you used one yet?
The biggest attraction to me was how easy it is to keep it clean.

pr3d4t0r, this Keyboard is capitalized for a reason?

White keyboards only survive so many trips through the dishwasher
That’s the name of the product.

welcome back

make a trademark out of the single most obvious common word for the product.

I somewhat doubt it’s trademarked, it’s just the name of the product
I wouldn’t be surprised if the exact rendering of the word, colouring, font, and all, is a trademark, though.

im looking to get into java programming and im trying to start learning by diving into coding where can i go to help out with coding projects in java or is this not the correct way to get into java programmning any advice will be apreciated
?

~first cup

http://java.sun.com/docs/books/tutorial/getStarted/cupojava/

~beginners bibles

1) Sun Java Tutorial (http://java.sun.com/docs/books/tutorial) 2) Bruce Eckel’s “Thinking in Java” (http://www.mindview.net/Books/TIJ) (Get the 3rd edition, the 4th is only freely available up
to chapter 7.)

Who’s powercycling the bot?

It’s not trademarked.

me

cheeser. he’s trying to fix it

/kick ojacobson.

Ow.

shit
wtf?

no wai!

hey cheeser

hey amnesiac

Hi, I on starting a masters project this semester and I haven’t programmed in a lot of Java since my undergrad. However, I am really wanting to do my project in J2EE and use databases (to get some more DB experience)… Does anyone have any suggestions?

why jee?

A masters project is basically a full ground up implementation of some type of software
Figured it is pretty in demand and I want to make myself more competitive in the job market

be more specific about what the system is gonna do

And the language I have the most experience in is Java

war wizard, what does the “web module” field correspond to in reality and why, whenever I input something, it says module not recognised?

~javadoc String

cheeser, please see java.lang.String: http://java.sun.com/javase/6/docs/api/java/lang/String.html
cheeser, please see java.lang.String: a href=”http://java.sun.com/javase/6/docs/api/java/lang/String.html”http://java.sun.com/javase/6/docs/api/java/lang/String.html/a

Really, the project can be any ground up implementation of a software application

yay!

So I’m open to anything

http://www.javachannel.net | Javascript is in ##javascript | No applets. | Do not paste more than two lines. Use “~pastebin” to list options.

ground up like chuck meat? :P

haha
exactly
)

~javadoc String.split(*)

cheeser, please see java.lang.String.split(java.lang.String): http://java.sun.com/javase/6/docs/api/java/lang/String.html#split(java.lang.String)
cheeser, please see java.lang.String.split(java.lang.String, int): http://java.sun.com/javase/6/docs/api/java/lang/String.html#split(java.lang.String,%20int)
cheeser, please see java.lang.String.split(java.lang.String, int): a href=”http://java.sun.com/javase/6/docs/api/java/lang/String.html#split(java.lang.String,%20int”http://java.sun.com/javase/6/docs/api/java/lang/String.html#split(java.lang.String,%20int/a)

so start from scratch.. or anythign really significant whaley

~javadoc Date

Fanook, please see java.sql.Date: http://java.sun.com/javase/6/docs/api/java/sql/Date.html

better than the old version.

Fanook, please see java.util.Date: http://java.sun.com/javase/6/docs/api/java/util/Date.html

the old one didn’t find that second method.

I would love to be able to turn it into an open source project

!cheeser++
~cheeser++

cheeser has a karma level of 372, Fanook

off by one error

~cheeser–

cheeser has a karma level of 371, meeper

Just thought I’d check if anyone had any ideas

shrug… I dont know what to tell you to do, as long as it interests you

hey guys
ever heard of sharesource
http://www.sharesource.org
great site

Yea, thats all good whaley.. I know I need database experience and J2EE.. just having trouble thinking of a good idea for a proj that combines both

you can try writing a movie recommender system like netflix *shrug*

what?

not bad idea at all

aye, make sure you’re interested in whatever topic you pick. for example, my master’s project examined a variant of the bin-packing problem, specifically, the arrangement of images in a finite space so that similar images are closer together

livejournal

:o

start with the datasets at grouplens.umn.edu
they are small and adequate for getting a mock system going

Yea, I agree.. I will dot hat, I know what type of project I want but not what exact project

http://sharesource.org/
posted the wrong site :/

isn’t that the microsoft open source license?

www.sourceforge.net

I’ll check that out whaley, thanks

http://developer.berlios.de/

what?

erm… that’s sharedsource, not sharesource, nm

i c

javabot tell gikid about aolbonics

gikid, aolbonics is talking like a retard using speech as if you were on AIM or using single letters for you, are, you are, you’re, see, etc. Talking like this is frowned upon in ##java and may result in you being silenced. You have a full keyboard so use it. We don’t care if you talk like an
idiot with your friends but we don’t want to sit through stuff like this: http://forums.oracle.com/forums/thread.jspa?threadID=499980&start=0&tstart=0

aww too slow

Fanook–

hrmm, that’s new. better factoid too

robby haha
r0bby*

thanks for your help Fanook, whaley and gikid

thanks!
8^)=

gotta hit the bed… night!!!

:O

you’re welcome
nm

i helped somone?

sure, why not

Hello everyone
I would like to tell you all about a very nice free service for you open-source projects

baleeted!

It’s called ShareSource (sharesource.org), and it provides free SVN, and countless other features

o rly.
Someone want to sledgehammer these two spammers?

I can;t tell you much, other than that it’s bloatd with useful features, and you should definitely consider hosting you projects there

Ah… generating the video for tomorrow.
Try: ~ops
That way we see the highlights.

~ops

cheeser, pr3d4t0r, jottinger, Javageek, jor, Logi, Sou|cutter, {aaron}, kinabalu, flippo, and joed. If you have an issue with channel operations, contact any of the above.

yeah, it wasn’t that urgent

holy hell….
cheeser, theres a bug in javabot…

pr3d4t0r!

What’s the time cost of computing arcsines?

relatively not cheap

org.apache.jasper.JasperException: Cannot find any information on property ‘id’ in a bean of type ‘product.ProductBean’ — any idea why im getting this ?

Does it use numerical methods?

as compared to say, primitive math
probably. the source for Math.arcsin() is out there
er, fine. Math.asin()

pastebin~

can’t the FPU calculate it?

dunno. i’m not up on my assembly or cpu/fpu capabilities

I’m not sure, but I think it wants to find a property called “id” in your ProductBean class

I want to get the source code. Should I get the 100M+ source jar or the 2M Binaries for source?

i think it’s expecting a getid/setid method pair
binaries != source

getId and setId, I’d say

does it assume camelCase? (never done beans)

in my experience, yes

sup nzuhdi

http://papernapkin.org/pastebin/view/1289 here’s the bean
hey dude

I was just wondering if they have some good compress on the source. When I go to the source page. I saw “JDK Binaries for Source Build 6u2″

which project has 100M+ source and 2M binaries?

binaries are the programs/tools you run. they are built from the source
jdk, although i don’t remember seeing a…oh wait, the online installer

that’s not your real class, is it? Those imports are really suspicious if it is.

opss, ignore those imports

http://download.java.net/jdk6/

those are probably binaries used for building the source; the jdk binary download is 60MB+

maybe. any way, I’m downloading the source jar.

and the source download is 100mb
mainly because it includes source for windows, linux, and mac

Any good ideas on setting up Eclipse to find the source whenever I want it?

set it up in your prefs-java-installed jre’s

if you just want the api sources, they’re included in the binary jdk download

are they? i didn’t see them last time i installed

I want the source for arcsine

the page you were looking at has the sources for the jvm
yes, src.zip

hrmm, coulda sworn i put that there post-install. *shrug*

Math.asin calls StrictMath.asin which is a native method

really? that’s…interesting

oh…

it’s probably implemented in C

I added it to the place but F3 can’t find it

you told eclipse to attach the source to the system libraries?

What’s up?

I did what you told me prefs-java-installed jres
Oh no. When I open that page again, it disappeared from the jre list

that’s because it’s not a jre. you need to edit your installed jre

pr3d4t0r, oh nothing

How to edit it?
I see…
No. It still can’t locate it

oog. the strictmath implementations make my head hurt
select your installed jre. then look to the right

why? they’re so straightforward, just calling native methods

no, i mean the native methods

Do I need to add “source attachment” to each of the jars in the list?

yes

well, that’s just like jni
does jni make your head hurt?

no, complicated maths do

haven’t found any complicated maths yet..
still looking for the asin impl.

even a naive implementation of asin should be constant time, with a fairly large constant factor, at least. The constant factor depends on how many terms of the taylor series you use.
you might find it easier to profile than to read the sourd
source

It doesn’t work. I can see the source jar in the “attached source”, but F3 can’t locate it

Comments off

q i got an object in javascript and would like to link the call of several functions eg var a = new myobj amyfct1myfct2myfct3

Is there any javascript function, that I can place in the foo() arguments, so that it passes the id of the element?

Placinta , just say “foo(this)”

I’l try it now

ok

undefined
ah, my bad
it works
ty

How can I change the text in a div using a mouseover? I see this page is doing exactly what I want: http://www.webmonkey.com/webmonkey/98/04/index3a_page3.html but it is using forms. I need it as simple divs.

q. is there something simple to test javascript host from a ’shell’, aka using it like ruby/python, without a web brwoser ?

hello all

use the JavaScript console in Firefox’s Error Console or Firebug

can i change an object’s data value using javascript ? i.e. documet.getElementById(‘odj1′).data.value=”http:/url”; ???

ok thanks

“an object’s data value”?

object
an html object
i want to design so that when a user clicks a button it changes the data value within an html host object

is it possible to scroll to an anchor so that brwser sets that anchor to the center of the page not to top ?

not sure about that, Pretoriab
yes – google it (I don’t remember)

i.e document.write.getElementyId(‘obj1′).data.value=”http://url“;

wtf Pretoriab

i dunno

document.write = “foo” doesn’t make sense

which bit lost you

if anything, you would want getElementyId(‘obj1′).data.value = “http://url“;
document.write is entirely different

if you want to change value, you don’t need document.write

okay thanks
let me go try a few things

decide if you want to change the value or html
if value, then document.getelementbyid(’smth’).value = ‘value’

hmm not working for me
i have a flickr slideshow that i want to play in my webpage – this is embedded as an object

link?

i want to provide a few buttons so users can click the button and it play a different slideshow in the same object

hmm
another q
similar
can i get the current position of the page ?

http://gbmotorsport.net/testing.php
ok mikk36 that is the working page now
any ideas where i am going wrong ?

sry, too busy on thinking about my own solution

anyone know the syntax to change docment.getElementById(‘obj1′).data.value=’http://url“; please?

document.getElementById(‘form1′).update_id.value=val1

google object

this one works for me

of course i m trying that

val1 is a variable there

thaks
anyone know how to change the data value of an html object please?

what exactly do you want to get working there ?

http://www.gbmotorsport.net/testing.php
see the values that pop up when you click on the button
i want to change the slideshow object data values to those

on which button ?

the big two above the slideshow

well
the left one is working
the right one, hmm
datachange() is the function you’re trying to get to working ?

dataChange() yes

oh
hmm, no idea about changing the data field
quick search didn’t give anything good either

ok thanks
must be a way surely

although
you might want to change html directly
that might help maybe

??

http://www.codeproject.com/jscript/dcontent.asp

is there a way to prevent the browser reloading an iframe when switching its position by insertBefore()? (pls don’t ask why iframes…)

i think i done it

When making ordinary python objects into JSON in django views, should i use something like simplejson, or is there something in django.core.serializers I can use which _doesn’t_ work on querysets, but rather regular python lists?
damn, wrong channel, sorry.

this is it mate
http://gbmotorsport.net/testing.php
i used iframe.src in the end easy money !!!!

How can I seperate onmouseover scripts?

write a function and pass parameter
gotto go to a job now – nice talking here, back soon i hope

How do you compare if string A, includes string B?

-1

thank you

Is it possible to know when someone did a “Ctrl”+”Click” in an onclick event? and “Shift”+”Click” for that matter

NP.

like does the click event send which keys were pressed aswell?
If I can know what keys were held down as part of the event object supplied to the onclick event
then I can know when someone did a shift+click
or a ctrl+clicl

yes, you can find out.
however I am pretty sure it’s not passed as part of the onclick event. Instead you need to monitor all keypresses and keep track of anything pressed. Then check it when the click event comes in
KeyManager.isKeyDown(CONTROL); or something

grrr
Thanks
How is tracking keys supported? Browser wise?

it’s painful.
document.keydown document.key up are the two events you want to capture
I use YahooUI so my event object is the same across browsers so function myKeyDown(e) { e.keyCode } always works

`js ref

the problem is the following key codes are DIFFERENT depending on browser (IE/Safari/Konq/FF/Opera) Semicolon, Equals, the entire numpad, comma, period, slash, back quote, open bracked, back slash, close bracket and quote.

well… I’m looking to a paper that teaches me how to integrate js within a form

I spent some time figuring them all out

Sembiance, prototype does that for you :p

Sembiance, hey. I found a way

How do you delete something with javascript? I have a select with several option’s, and I want to delete the options

Sembiance, onclick=”catchEvent(event)”. then in catchEvent(e), e.ctrlKey, e.shiftKey, e.altKey
So it does supply those events

What line do i need so i can make best of 2 worlds? i want older browsers like IE 5.5 to use the .gif instead of the original .png

those options are NOT standard options. No standards apply for those, it looks to be a microsoft invention.

“ID Conditionnal Comments”
oops
“IE Conditionnal Comments”

You *may* that other browsers might support those properties, or you may not
You could look into Prototype as VistaBear said

– END IF –

thanks

(this is not the right syntax, but it looks like)

oh ok, becouse uealy the pictures are in css! so then i just clone them and add an * in front but this time the png is in html so i dunno how to solve

How can I unforce the next character in js? In php if I wanted the ” to not be parsed, I would do \”

q. is there a rss parser in javascript ? i want to get parse a rss from javascript. is that possible ?

What’s the best hosting way to delete all the options in a select-element (html) except the first one? When I try to loop and do selectbox.options[1] = null;, it only deletes a few of them, not all .. weird

for jquery there is jFeed

ok looking

how can I remove a “,”-character from a string
do I have to split, and then concat minus the char or is there a slick method for this somewhere in the realm of JS?

is there a way to get a list of the keys in an array?
oh wow, it ‘just works’

‘dfdf,dsad’.replace(/,/g,”);

could someone help me with YAHOO.util.Connect.asyncRequest, it doesnt seem to be doing anything o_o, the callback function never gets excecuted

what say Firebug (NET=XHR) ?

seems fine
so I guess im doing something wrong to handle the callback?

Zee1ot what typeof is your callback ? a functrion ?

var callback = { success:sendFileCallback, upload:sendFileCallback }

I think it must be a function (not the a name of the callback function). but I’m not sure.

alright I’ll try a few more things and be back =P
thanks

no.. you are right. it must be an object

hmm
ok it works but it’s not sending the form now…it should be sending a file
YAHOO.util.Connect.setForm(fileForm,true); and var cOBJ = YAHOO.util.Connect.asyncRequest(‘POST’,'processUpload.php’,callback);

if I do location=”?foo©”, blody IE puts a copyright sign in my url… anyone know a workaround?

all ampersands should be & inside an html hosting document

they are
onclick=”location=’?foo&copy’”
lol… onclick=”location=’?foo&copy’” works…

hmm
can’t help with that i’m afraid

ok…

hi
document.writeln(‘bthis is the page, it’s a cool page/b’); doesn’t work, I guess it is because the dash
how can i solve it?

Do document.writeln(“br /bTHis is a page, it’s cool page”);
Or document.writeln(‘br /bThis is a page, it\’s cool page’);

I have an onclick option, that has 2 functions that enclosed.. I want the first function to complete 100% before moving on to the second, does anyone know how to do this?
(i.e. onClick=”dothis(); doThisNext();”

enum, why wouldn’t what you just said work?

it does them both at the same time, causing the second to fail
I’m not sure why

dothis() will anyways complete before doThisNext(). If no then wrap those two functions in a function and call that function.

enum, no, it doesn’t. but if you think that’s the problem, have dothis() actually call doThisNext as its last act

I reffered to google, but I think my search term is probably too generic. It doesn’t give me any help
hmm, ok.. I will wrap them, I could swear that was the problem though.. oh well thanks for the insight!

why make a whole new function when you can just call doThisNext from doThis…

Yes, he can even do that.
Both are valid.

unless there’s a time when doThis doesn’t need to call doThisNext

is there a simple ad-hoc way to get querystring values that doesn’t involve 50+ lines of code?

is array.length being computed every iteration in for(i=0, iarray.length,i++) loop ?

yes

so i would rather put it to variable ?

typically for( var i=0, mx=array.length; imx; i++){}
var the mx

so it’s not computed if placed in first part ?
i mean computed once

the variable is assigned at the setup of the for loop

i see, thanks

length is a field and will be accessed like any other variable like mx
Its not a function call.

that makes sense, didn’t consider that – just answered as if the max where a DOM element property that could be changing due to the contents of the loop

JLearn so it doesn’t slow down the loop, if i just put it as for(i=0, iarray.length,i++) ?

No, its the same as accessing any other variable.

JLearn cool thanks

hey all – just looking at teh Google Maps API – looks like internet explorer uses VML To render GPolyLines and Overlays – which seems to be preventing rendering

Hello
How do I make a simple slideshow in javascript so that when I click a ‘next’ button (which is an image), I move to the ‘next’ image? I was thinking of doing it with arrays, but how? Same thing for ‘previous’.

had anyone any experience with the above ?

fio what are you talking about ? rendering of what ?

any up to the challenge of a regex querystring extraction?

GoogleMaps renders lines (in this case an ellipse) as a GPolyline – in Internet Explorer, (I don’t know why) it uses VML to render the shape where Firefox requests a PNG from the Google servers, that is then overlayed – in IE7 VML doesn’t work properly

fio hm i didn’t notice that, I thought it just loads png

so subsiquently – I can’t get it to work in IE7
and I can’t test IE6, as this is a Vista machine
and I’m a mac user

0_o

hoho

the IE3/4/5/5.5/6 standalone kit doesn’t work doe me

disbale VML rendering

was just looking at how
mm, might be a CSS hack to do it :-D

fio I’m working with dojo.gfx currently, it distincts between browsers and loads SVG/VML correspondingly

nice one
we use jQuery -
with massive additions to the jMaps plugin
(support Yahoo! and Google maps)
but we’ve gone back to basics here, and it’s still not working

dunno

ack
I wonder if VML is already disabled, somehow

maybe you can redefine some method

that sounds complicated :|
heh

http://erxz.com/pb/4068?tx=on&submit=Format+it%21 — Why does this only work in Opera and not in MSIE, Firefox and Safari?

hello. anyone around?
need some help with objects *sigh

that’ll work fine in Firefox and IE
and probably Safari, too, though I haven’t personally tested

i dont see a problem with it unless its in your other functions

But… it doesn’t!
Hrm.

probably some other code interfering, or you’ve implemented it improperly, yadda yadda
link

According to Windows, “window” is undefined.

the OS is talking to you?

Hehe
reisio++

Yes…
I ran the .js file on my Windows XP.
And Windows/MSIE ran its JS engine.
And gave me that error.

so IE’s debugger
we’ve already told you it’s fine

paste the entire code which we can run.

if you want more help, we need to see more code

But why did it say that “window” is undefined if it’s fine?

More code…

where can I get an IE JS debugger ?

http://rafb.net/p/4l3GFo35.html

i read you can only get he script debugger with Office 2002 ?

It’s built into the OS…
Sorta…

?

hi @all can somebody help me please with document.getElementById it does not work i’ve tried a very simple code in FF … THX :-)

need to see code
/topic

Err..you know loops, right?

how’d I get at it ?

I know loops yes.

so why in your code you have — return true; i = i + 1; ?

Because I would increment the element index each time, passing on to the next pic?

Statements after return are not executed. By writing ‘return’ you actually return from the function
and BTW what is ‘this.length’ ?

http://rafb.net/p/arDkA825.html

That would be the current document’s array length.

document is an object not an array. It doesn’t have length property. Maybe you intended to write document.images.length?

it also does not work with dojo.byId( “test”)

Entire code, not just snippets….

talk to the channel

I just want to do a simple image slideshow.

Your concepts seem to be suffering a lot…

You don’t even know me.

I have read your code. I am not commenting on you but your code. Face it.

http://rafb.net/p/M9FRQE37.html

It still doesn’t work. I declare an array. I put elements in it. I link images to these elements. I declare a var i that is set to 0. I make a function ‘Next()’, in this function I increment i, and set the current document.src to myimages[i].src.
So. I don’t know why it won’t work.

where is your test.js file? On your local machine?

well first off “return true; i = i+1;” i=i+i never gets executed, second off… you set i to 0 at the start of that function call, making any kind of incrementation useless previous to that

JLearn in same folder like html file in root folder
the script gives me back null for the function call getElementByID

which is wrong? Instead use script src = “test.js”/script

Why would it make it useless?
I set it to 0, and after that, I increment it plus 1, meaning setting it to 1 higher.
i = 0
i += 1
i = 1

But the next time you call your function, your i again is 0 and then 1.
The same thing continues.
Keep ‘i’ as the global variable and increment it inside the function.

Oh. Yeah.
Always those damn scope mistakes.

also… nothing after return gets executed
seeing as the function returns

I have already tried to convince him that…

http://rafb.net/p/doAIDi36.html
And it still doesn’t work.
Grr.

guitarPics[12].Guitar.src = “img/vol.jpg” shuld be guitarPics[12].src = “img/vol.jpg”

Ah?
Weird.
Still no cigar.

what are you trying to do exactly?

An image hosting slideshow.
http://treval.kicks-ass.net:8080/Dev/HTML/Treval%20Time/home.php?page=myguitar

How do I change the action of a form in JS. This is assuming I have passed this.form to my js function.

this.form.action = ‘yourURL’;

Just curious, if I make a ajax request to a url that uses SSL, the browser will handle all the encryption and javascript doesn’t have to worry about it right?

hawk-: ofc, the security lies in the transport https.

Thanks, JLearn
JLearn, is that a temp set? I mean I set the action at the start, then each onchange sets it to the same ( but different ) location. When I finally hit the submit button if the onchanges have been hit on the way through the form, which action will it use? The original, or the
changed.

fatbrain, i thouht so, thank you

The recently changed one.

Hello..
I’m having problems with a CSS attribute

Okay, one more question. What if I wanted to assign the form action to an iFrame. Do I have to go through the entire getElementById() thing?

Whenever I add “font-weight: bold;” it doesn’t seem to work properly and crashes my pl file.
The text is “.cf_error { color:#8B0000; font-weight:bold;}”

form action to an iFrame? I don’t get it.

put the command in an iframe instead of a form

JLearn, Let me try to type it out Heh. I have a Monster form. Incase the session gets terminated or PHP form validation fails I want to save a user’s form data so they dont have to retype it. I have onchange events for each form field which fires off to a javascript function which temporarily
changes the action of the monster form to my iFrame which contains php webhosting processing code that takes all $_REQUEST variables and saves them in
the session.
So incase form validation fails and / or some unseen error occurs they can still have their data.
JLearn, so that is why I want to have the action point to the iFrame, so it can process the form.

but would the customer know what the session id is?

Why would they need to?

and is the id encrypted?
you mean, the customer logs back in?

Session repopulation happens upon logging in, yes.
This works.

and you want to do this and put it in an iframe?
take out the form completely ?

No No all the iFrame does is populate the session each time you change fields
It updates the session with your current form data each time you change fields

AFAIK, I don’t think you can have an HTML element as action, only web resources and iFrame is an Element.

Ah! Hm. .. must find a way around this.

You can keep hidden fields in iFrame.

I thought about this. But it doesn’t solve the problem of session termination or timeout.

Use AJAX

you may be able to use a cookie to store the info…. but im not 100% sure that would work

in a tr?

of course

table.rows[rownum].cells
its an array

Yes, use DOM.

Will I have to cycle through each TD in a loop?
“document.getElementById(id)” will get me the parent tr

you can access them by index iirc
dont see why not

What if I wanted to change the background color across the board?
I guess im looking for a .children or something?

well thats possible

idk if you can change the BG color on a tr, but you could loop through the row cells and do it
of course, if possible just changing it at the TR level is easiest

Well im trying to do this without having to loop

overtop of them

any specific reason your trying to avoid a loop?

there’s a .childnodes or something

If I can it with a peroid and a keyword instead of a loop shouldn’t I?

ehhh, idk, i have no problem with loops hehe

how can I select an option in a huge list box after it has already been generated?
(or any list box)

.selectedIndex
thats by index of course, there is also .selectedValue, however idk if that will set the entry

Should I do “onLoad” or “onload” in DOM?
I know it’s apparently “onload” in JavaScript, but why?
It usually does camelCase, soWhyNotInThisCase?

what is a simple and reliable way to test a character-typed variable to see if it contains a number?

you want to test 1 character to see if it contains a number
?

( n + 0 == parseFloat( n ) ) ? “number” : “not”

n + 0 might actually give “string0″
even if its number

i want to know iwhen var x = “123″ that x is a number but when var x = “foo” that it is not

only parseFloat isn’t enough ?

how do you do it?
n * 1 == parseFloat( n, 10)
duh, a regex match on numbers

Bluuu, Yeah, I never got that. I’ve seen it referred to as onLoad more than once as well.

i have a button that submits a form. how can i open a new window at the same time so that the results of the postback are returned into the new window?

So it’s onLoad in DOM and onload in JS?
By DOM, I mean the HTML attribute.

Probably. That distinction always seemed like a fairly weak one to me.

( teststring.match([^\.-\d]) ) ? “not” : “number”
am i missing anything?
damn, commas

if(isNaN(new Number(str))) { alert(“Not a number”); }

that’s even easier, thanks

or alert(isNaN(parseInt(str)));

doesn’t parseInt( “123abc”) return 123?

I thought you wanted to distinguish between pure strings and numbers
In that case, use new Number()

i am trying to automatically determine if I should wrap a value in a string delimiter before passing it to sql via named parameters – if it’s a string yes, if it’s only a number then no delimiters

quick and stupid question….if I have txt = createTextNode(“blah”), how do I change the text value?

can i create a “global variable” inside a function?

Just use a variable without prepending it with a ‘var’

Percivall, Even better declare the variable with var in the top level scope first.

Percivall – even better, declare a globally scoped object with a unique name and store your data as properties of that

Percivall, Even better, use namespaces.

lol
with all those ‘even better’ i’ve got confused ;d

haeuhaeuheauhaeuheauhea
wait, wait!
hmm… ok, i will create a global var and put my values inside..
global array
but my problem is because i need create a new var inside my function when he called

grimeboy – do you have a url for what you mean by namespace?
nm – googled it

On the other hand I don’t see any reason to over namespace in your own scripts
I think using anonymous functions to create new scope is a good idea though.
Why’s rhino so much more popular than spidermonkey?

Why i don`t see height of this block? http://sh.id.lv/tmp/height.htm

not sure, but Rhino is Java which some corporate types seem to think is good

If I have a confirm() on a submit button how do I make a click on ‘cancel’ stop the form from submitting?

you know how to stop a rhino from charging ?

is there a built in javascript function / method of turning a javascript object into a JSON string ?

I suppose rhino is a better name.

return false

Make the validate function return false if the confirm is cancelled otherwise true.

Yes, JLearn is much more verbose.

Thanks.

shal3r, Because it’s no declared inline. If you want the style in a stylesheet you need to use getComputedStyle

No problemo

shal3r, getComputedStyle(box,”).getPropertyCSSValue(‘height’).cssText;
That’ll be in pixels though

thanks

I have a function in a class that I want to run every second but with setInterval it tells me the function doesnt exist, how do I do this?
method or w/e its called..
when I call it normally it works fine, when I put it in setInterval it doesn’t find it

sounds like you’re “doing something wrong” (TM), paste a test case in a pastebin (or provide a link to your page if its publicly available)

q. does javascript support function overloading ? like in c++, where you can do fct(param1, param2) *and* fct(param1) and have 2 disctint functions

no

ok thanks

you can pass anything you want in the param list, generally the last func with that name will be called (dont count on this though — just have one such function)

ok

and using the implicit “arguments” variable is a clean way for dealing with methods that can have different types of param lists, google it

ok i will

does c++ have varargs? i dont remember. js param lists work like that
yes i know it does actually, like printf

varargs is rather C, but supported by c++

Code please…

http://pastebin.ca/660152

The paste 660152 has been copied to http://erxz.com/pb/4069

When that string of code is evaluated, it’s evaluated in the top-level scope. There’s no `update()` function.

right so how can I have update run on an interval on that specific object?

What you want is to use a closure rather than an arbitrary string of code: var self = this; function init () { setInterval(function () { self.update() }, interval) }
(You need the `var self = this` gymnastics because JavaScript won’t let you close over `this` directly, IIRC.)

hmm
trying to understand that lol

A closure is a function that remembers the values of lexical variables.
I’d explain further but it wouldn’t be as effective as if you looked up closures yourself.

yea I will
thanks I will give it another try

The reason for not being able to close over this directly is that this is a keyword so will be ‘overwritten’ with the window object by default.
Not really overwritten as such but.

WHAT YOU SAY?

WE GET SIGNAL

Something to do with a bomb?
Or a zag or something.

Good evening gentlemen you have no chance to survive make your time.
And now good night gentlemen.

hello, im using http://rick.measham.id.au/paste/html2dom.htm to build my dom JS, and the onclick isnt converting right…. it produces this whitch should be right div_0.onclick = function(){addLi(this.parentNode)};
that same onclick code works in other things
and ive tried div_0 as a div and a a

Scotepi, What is the height of the div
If the div only contains floated object it has not height and therefore can be clicked.
It needs something to clear them.

I have crappy bold text and I need help..

What’s crappy about it. What about #css?

i dobut thats the prob.. my css is prety much blank

:-|
it’s only in IE6, and I’m using CSS

So does the div definitely have height in firebug?
agamemnus, No, I mean the channel #css.

idk

Scotepi, Honestly though I’d need to see the source otherwise I’m obviously only going to be able to generate wild guesses for you.

computed styles shows 16px

Well, yeah that should probably be clickable.

grr.. why do all paste sites turn into a POS after 6 months
http://pastey.net/72293
grr… i change the JS so that wont work anymore…

doesnt have a onclick

i tried div_0.onclick= ‘addLi(this.parentNode);’; but no luck with that either

It’s Sentence by the way. No, onclick is always a function.
hmmhesays, I seem to remember having problems in some browser with adding event handlers before adding stuff to the main dom tree.
Maybe you could try adding the handler after it’s in the main tree?
That’s all I can think really.

In global namespaces, this always refers to the window object. The window object has no attribute by the name of parentNode

Err.. Scotepi I mean
JLearn, this refers to the element triggering the event in event handlers.

hmmm i copy and pasted it back from pasty and it works now
oddd

JLearn, http://www.quirksmode.org/js/this.html
JLearn, a href=”http://www.quirksmode.org/js/this.html”http://www.quirksmode.org/js/this.html/a
Oh well.

firebug still doesnt show the onclick=”" though

I didn’t see the event handler.

Scotepi, You won’t get an onclick attribute in the html tab. Look in the dom tab to see your handler.

doh, its a dom object so it should show in html

JLearn, functions assigned to on* properties of elements are event handlers.
JLearn, http://www.quirksmode.org/js/introevents.html

Yes, I know that.
It was a visio.
Typing – typo : vision – visio

Oh, okay.

hi again i ‘ ve a new problem :-) how can i iterate over json objects ??? :-D

wait a sec here..

Cyball, Json objects? There’s no such thing in native javascript.

do you want to iterate over the elements of an array? or iterate over the properties of an object?

/tag

That they do. Unless you’ve got one of them fancy: “self-closing” tags.

i want to iterate over the object properties :-)

Or one of them implicit tag closes.

hmm

Cyball, for (i in my_obj) {my_obj[i]}

^^ what grimboy_uk said
use that notation for iterating over properties of an object, use the “classic for” when iterating over elements of an array
i.e. for(var i = 0; i array.length; i++) { //do stuff with array[i]… }

ohh thx very much …. is there a possibility to get also the iterated keys ???

now ur asking too much
take him out, boys

um isnt that the default?
i is the key, foo[i] the value

ohhh sorry
i was to fast on my keyboard faster then thinking at this late hour :-D

0 in the afternoon what are you talking about
(i’m american, dont bother trying to explain time zones)

:-)

one question

ok, but only one!

why if I define an Image object, with two event handlers (onLoad, and onError), both are executed no mater what

q. i got a string “http://localhost:4500” and would like to replace the first :// by /, where should i look ?

paste a testcase to a pastebin, or a link to your site
at documentation about using regular expressions
matching double slashes should be super fun

http://www.w3schools.com/jsref/jsref_obj_string.asp

http://www.nopaste.com/p/azvC1vtG0

ok do you have a function name. any distinctive i could goodle

vinse, look

thanks looking

in the context and after calling check_server_availability, siup will be always true, even if the image is not found
vinse, onLoad is called every time.. that’s odd

um you’re explcitly setting it to true every time …
switch around the onerror and onload lines, you’ll see it’s false every time instead

vinse, but if the image is not found, onerror must be triggered and set it to false
yes I tried it
then how can I do it?

ah
someFunction() is the *result* of the function, someFunction is the function itself

ok, so I must call it without (), or any arguments

hertzel, status(false) should be function(){status(false)}

dont do someElement.onfoo = someFunction(), do someElement.onfoo = someFunction

vinse, graphikz cool

hertzel, If you want to pass arguments to status

I was really confused about this, now its clear

cool

let me try and see
brb

question
XHTML or HTML?

tates great or less filling?
s/tates/tastes/

tastes great, low fat

http://www.webdevout.net/articles/beware-of-xhtml

i see

agamemnus, html5 ftw!
Mark Pilgrim did a good article as well.

graphikz, vinse , http://www.nopaste.com/p/alpG9m2qP

?

Seriously, xhtml2 is ridiculous.

wrong person =p

Tab completion!

opera sux

http://www.w3.org/TR/xhtml2/

Scotepi, Cause that’s not a mimetype
agamemnus, No it doesn’t.

btw, does anyone here know how to use Perl.exe/XAMPP/execute perl code inside a web browser?

well the proper one for xhtml
text/xhtml+xml i think

application/xhtml+xml
You can’t use it because older browsers and IE don’t support it.
And xhtml is moving in a stupid direction.

im just amazed ie doesnt… but thats what ie does

tag

ok, now that is dumb

Well it’s what the w3c want.

there is no attribute “LANGUAGE” in html hosting 4.01 strict..

They’re making all attributes apply to all tags and removing tags like crazy.

hey, got a strange problem, I’m simply just trying something out like, var obj = document.getElementById(“main”) and then doing obj.style.border = “1px solid red”, but in firebug it comes up as obj has no properties?

does main exist?
rather

yeah, i set the div’s id=”main”

cozby, Yeah, console.log(obj)

does it exist after you said “var obj”…
right after*

why wouldn’t it?

it’s not loaded?
do alert(obj)

alright

noriX, alert() is evil.
Use console.log since you’ve got firebug.

don’t listen to grimboy_uk
and who is noriX?

hrmm.. yah shows up as null.. so wait make it execute on window.onload then
bhrmm.. yah shows up as null.. so wait make it execute on window.onload then/b
bbhrmm.. yah shows up as null.. so wait make it execute on window.onload then/b/b

not sure if that was a question..
ok, if I am using HTML 4.01, strict or transitional?

cozby, Yes

tag…

no, but, putting the function in a window.onload would solve it i think

agamemnus, Use html5.

there is no HTML5.

agamemnus, !DOCTYPE HTML
Yes there is.

W3C doesn’t agree

http://www.whatwg.org/specs/web-apps/current-work/
W3C aren’t the only people who are allowed to make standards.

ok ok but if i had to use 4.01?
transitional, right?

WhatWG is run by Mozilla, Opera, Apple and Google
Why do you have to use 4.01?

since strict doesn’t support language
so ie6 can support it i guess?

s/onError/onerror/ ?

IE6 does support html5
It does even go into quirks mode.

i have some Li’s that i’m moving up and down in a list… but when i move them the css .squar ul li:last-child input { doesnt get applied

and the w3 validator doesn’t.

at the top of the page.

Jesus, what did I tell you. The w3c is irrelevant.

IF I HAD TWO CHOICES between 4.01 transitional and strict, what should I do?

NEITHER

use strict

NOOO

ok, but then what should I do about language=”javascript” not being allowed?

vinse, I found something surprisingly interesting let me create a test case for you

type=”text/javscript”

insin, What’s your problem with html5?

ahhh
thx

s/javscript/javascript/
I wasn’t aware I had one

Although that way you can’t specify the version number.
You do. Everyone wants to argue with me!
but it’s cold and damp in here

tags should be placed as late in the body as possible. This reduces the effects of delays imposed by script loading on other page components. There is no need to use the language or type attributes. It is the server, not the script tag, that determines the MIME type.

that’s from www.crockford.com, excellent js info there

i know that, but if i wanted them to be loaded before..
ok, here is another onr
one*

yeah that wasnt my point really, just meant that you dont need langauage OR type attribute

but how would it know anyway?
and i don’t always have an src= there
anyway….
the name attribute
should I remove it?

vinse, look here….

it’s not compatible with 4.01

vinse, http://animenakama.com/js.html

but I read somewhere that it should be used anyway…
for some reason
I don’t need name tags, do I?

the onerror event is evaluated after a while, that’s why my test was failing

is there a trim() function in javascript that will make ” string ” into “string” ?

I was asking for siup, before onerror

agamemnus, Name tags? Do you mean name attributes?

http://www.w3schools.com/jsref/jsref_obj_string.asp
grimboy, you know….. img id=”myimg” name=”myimg”….
yes name attributes
remove them?

vinse, interesting isnt it?

what the hell, onfocus isn’t allowed in strict 4.01?
what can i replace it with?
and if it isn’t allowed why is it in the dtd?

is it posable to force a css rerender with JS?

rerender?

can anyone tell me why this function doesnt work :X
http://pastebin.com/mc2c0fbd
its to delete a post in my ajax notes system

yeah
“php mysql_query(“DELETE FROM

oh
drop..

that’s not the only one either

that im moving values around and after the value are moved the styles are messed up… not becuse of JS but becuse the browsers doesnt apply :first-child

hehe sorry – my friend wrote this

“php mysql_query(“DELETE FROM
oops
+” LIMIT 1″); ?”);
2 of them as far as i can see

k
whats wrong with the LIMIT 1

scotepi, I have no idea

its unnecessary – but it shouldnt affect it

cup, same problem

what problem

you close the string too early

OH
i should have done single quotes
XD
i knew that was the problem
thank you

no
you shouldn’t

http://pastebin.com/m23f9aeee
i think

oh okay

you need to either use some double combination so it is allowed,
or do something like q = ‘”‘
your php statement needs 2 types of quotes

okay
ill do the query =

http://pastebin.com/m72d7c6a7

that won’t work

hm
im confused
i need 3 quotes actually..
wait

How are ajaxing “Please Wait” things done usually, which prevent user input while AJAX goes and retrieve then displays some information/

replace the inner ” with “+q+”
the two inner “
and set var q=’”‘

http://pastebin.com/m31dc1ac8
?

oh, those inner quotes aren’t ‘
they’re `?
and that’s allowed?

does there exists javascript code that prevents punctuation when typing?

“ is for mysql
`

ah ok so u have 3 types

yes
those shouldnt make a difference

maticode…..

infact I could remove them and the sql would still work

?

you can go and check when the user presses a key in a textarea
and then if the text has chars you don’t want, you can return false
afaik

ok thanks

yourtextarea.onkeypress = function() {}
I think

ok, so when I make an Ajax.request to my server, i only get about half
the results before javascript executes the remainder of my function,
is there anyway I can make sure that ajax waits until the server has
responded with all the data?
yikes, bad past job

fozze – use SJax

fozze
yes there is
of course, if you are getting too much data,
then it will crash or the user will cry

you don’t really want to use a synchronous call via xhr

someone else can help me to understand why onerror and onload asigned to an Image object are not functioning like they should?

we have already learned that lesson the hard way

please try this example to see the problem
http://animenakama.com/js.html

miked, there is nothing wrong with it

“agamemnus” at 71.6.194.243 pasted “synchronous xmlhttp call” (47 lines) at http://erxz.com/pb/4071

hey…
hertzel
it is the second alert

agamemnus, why?
why onerror have that delay?

can someone define “too much data”?
is 10 kb too much data?

no
1mb might be

For what?

because sometimes my request for 10kb works and sometimes i only get about 3kb of data..

synchronous hmlhttprequests
hertzel, i don’t know

Ahh

fozze, i am talking about synchronous ones
you don’t want too much data with synchronous ones

ok

asynchronous ones should be fine, i don’t know why it’s not working with u
…probably because you force the call to use your data before it’s loaded

well, when you say synchronous are you meaning doing something with the transport data onSuccess or onComplete?

no
idk even
i get confused
the one that’s linear is synchronous isn’t it?
or is that asynchronous?
i think i got it all backwards

one step after another i thought was synchronous

that’s what I thought too
lolz

okays
well, this sucks

just look at my code
with “one step after another” you don’t need onsuccess or oncomplete
that’s what I mean at least
and that’s what my code dose
does
maybe it’s asynchronous then
the one that doesn’t need onsuccess or oncomplete
yeah it’s asynchronous.
or not.
IDK!
i do know that my code doesn’t wait
well
it does wait, in the same function
it gets the data, waits for it, and then loads it in

agememnus
i got it to work thanks
except i took out limit 1 and accidentally deleted all the notes XD

=|
is that bad?

nah
all the notes were just along the lines of “TEST”

arite

hm
nevermind
must have been some weird glitch
the table was emptied
but the delete buttons dont work..
anymore
http://pastebin.com/m1a94009d
a href=”http://pastebin.com/m1a94009d”http://pastebin.com/m1a94009d/a

is it possible to access size information from the resizable textareas… cause firefox and safari let you resize textareas… and i’d really like to have access to the size information but rows and cols arn’t being updated

what delete buttons?
tomisina, i am sure they are
it is*
tomisina, rows and cols is really defaultrows and defaultcols
isn’t it
i think you need a different variable name

ummm… i mean grabbing the element you just have to call .rows and that should give you the value for the number of rows in that textarea

and it always stays the same?

yeah
2

would it be better to have a page load 5 JS files or have a php script that compiles 5 JS scripts into 1? im guessing php

and you are resizing it how?
by adding more text?
scotepi, how about pasting them together

no i mean dragging the bottom right corner as firefox and safari allow you to

scotepi, have it load 5 files, less load on the server

becuse i like working with them sepertly
wouldnt that be more time for the request/responce
and the same ammount of load becuse it still has to read the 5 files

resizing this way: http://www.css3.info/preview/resize.html

scotepi, your php script is server side remember?

i wouldnt think reading 5 files an echoing them would be much work

why can’t I resize anything, tomisina?

your browser probably doesn’t support css3

scotepi, well it’s not, unless you do that thousands of times
with hundreds of lines
tomisina, i am using firefox 2.0.0.6
it’s not resizabl
but if you drag the box, it changes the width and height probably

textareas dont have a width and height

sure they do
width: 100px;
height: 100px;
in the example you showed me

that’s css width and height
they dont have an html width and height
but you’re saying it might update the style width and height
i’ll check
it might

style.width
etc

yeah

hmmm… yeah i guess including them into a php script would also make debuging hard

ja, true.

howdy javascript studs. I think I’m doing this right, but it seems not to be doing what I want. I have an array foo = ["this", "that"]; and then am doing foo.splice(0, 1); Shouldn’t that leave “that” in the array?

just add them in separately.
aji-dahaka, what happens instead?

the array seems to stay as it was

good call… yeah it’s updating the css i can use that
thanks

str = ” j(‘ “; str.search( “(‘” ); SyntaxError: unterminated parenthetical
how do I escape the ( that’s causing the error…?

oh, bah…sorry, javascript is working right and I’m working wrong
I’m readding the item to the array because I haven’t cleared the checkbox yet…sorry for the noise

tomisina, it might update some other property as well like maxcols or something
no problem, aji-dahaka

\ seems to fix it.

q. i got an object in javascript and would like to ‘link’ the call of several functions. e.g. var a = new myobj(); a.myfct1().myfct2().myfct3(); is this possible ? in c++ it is possible if myfct1() return this. but when i try in javascript it fails. any suggestion ?

The parenthetical error is back, any idea why this fails in firebug? r= “\(‘”; e = ”; e.search( r );

hmmm…. var a = eval(‘(‘ + getCookie(‘fsquar’) + ‘)’); syntax error ()

see if this is what you want, http://erxz.com/pb/4072

cool looking

the output is ‘func s()’

zorglu_, return this.myfct2

well sometime this is a.myfct1().myfct3()…

hmmhesays, I’m not sure if that was what zorglu_ what referring to. I don’t see how that is chainable.

er i think i misunderstood the problem

I mean moside
zorglu_, Yeah, you should just be able to return this.

yep i was trying to understand your example

Sauce?

and i am
ok returing this worked

function Moo(){}; Moo.prototype.baa = function(){ return this }; a = new Moo(); a.baa().baa().baa()

{ }

Oh good.

i tried before and it failed. im new at javascript so the error wa slikely somewhere else

Fair enough.

anyone familer with the json json.js? am i using this right? setCookie(‘fsquar’, a.toJSONString()); there a is a multi dimentional array

I didn’t know javascript had multi-dimensional arrays. How do you make one?

I have a new idea
for a story:
for want of a \, the Kingdom was lost.
grimeboy:
a = new Array();

every good language does :]

a[0] = new Array();

of course, if it doesnt, use a delimeter

a[0][0] = 1;
it’s not strictly an array.
it’s 2 arrays

a[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0] = 1

Oh, that’s not a proper multi-dimensional array.

0_o

r= “\(‘”; e = ”; e.search( r ); — why is that not valid JavaScript?

“\(‘”
“(\’”
hm, sorry

bkruse, Well apparently javascript doesn’t. (Neither does python, natively).

might be that you’re searching an empty string for a value? not sure

no it is not because of the empty value
it has to do with the ( even though i escaped it correctly

var r=”\(“; var e=”; e.search(r)

i need the ‘ in there, it is part of the string i’m looking for

( doesn’t require escaping

that’s the issue then lol

i can’t search for ‘ ?

What’s the error?

unterminated parenthetical

just var r=”(‘”

is there a this.GetTagName()?

does anyone here have IE7?

Scotepi, ele.tagName

same error

Scotepi, this.tagName

Well you’ve opened a pair of brackets and not closed them.

hm

i need someone to test something out in IE7 quick

too late

i’ve put a ( in a string…
the brackets are closed

thanks

try \’ instead of just ‘

Oh

same error

hm

no one has ie7…

i do but it’s being weird and not working [go figure]

umm…. realy odd… t.parentNode has no properties

I’m typing this in to the firebug console

nm

same here lol

agamemnus, I have a hacked version of ie6 with the ie7 engine running under wine.
But that’s not exactly ‘the real thing’.

\ is the proper escape character so i don’t understand

you dont need to escape parenthesis, or a single quote in a double quote
this is odd, if i change ( to () it’s fine

yeah i know that but why is it giving me trouble then!
there must be a way to search for a single (

it has to do with searching for the (… it’s not the ( itself but the search for it

so it is a problem with the search function?

well, no, with how it’s being call i guess

well then how is it the correct way to call it to search for a (
i’m only aware of the one way.

Is it possible to add new constructors to existing builtin JS objects, such as Date() ?

there must be some simple solution to this.

”.search(/(‘/); is the same thing – gives me issues also

well i hope we are not the first to discover this

yea, search just doesn’t like parenthesis

that is very bad…
i see no reason why it should not accept them

should ids be in quotes?

yes
i dont know, might be something to do with how it’s implemented in the system

tag and I’m searching for the start of a function called findGems(‘ so I thought the search function would do well. is there a workaround?

have you tried it on an actual page?

yes and it gives the parenthetical error

hm

and this sounds very much like a bug…

did you test it in IE/Safari/Opera/etc.

just firefox because that is what i use to develop
i would like a firefox solution but it sounds like they have a bug… :[

should names and types always be in quotes?

might want to ask the guys in #developer or #firefox on irc.mozilla.org
or #extensions i think

ok, thanks I will pop over there
i think i can just write my own search function for now in another language.

tf ?
wtf:
_

I agree.

hey is there a way to execute my external js after my window.onload?
like, loading the .js file after the page has loded, or do i have to setup the window.onload yadda yadda typ thing

you can create a script element then append it to the head of the page

does anyone here have IE7
please please I need help

Hi
I really dont know how to ask this question :/

agamemnus, Uh, I said I had an "almost IE7". Why not just paste the url?

Ok, Im messing around with Active Desktop for Windows, and was wondering if I can use JS to create my own windows, and minimize them, and control where they minimize?

Ick
umanghc, likely not.
Oh crap, I've got non-tab autocomplete on.
What I mean was um, likely not.

to me?

you mean you want to run "mini" js apps w/o a browser?

element then on mouse out delete it?

yeah

you can do it with a framework like konfabulator, dunno hwo that relates to active desktop

like...http://www.users.muohio.edu/pestroja/proofofconcept/desktop/

active desktop is a nightmare though, seriously just disable it now
i dont think i get what you're showing me ... you want a desktop in the browser?
you want icons that open browser windows on your desktop?
i'm confused about just which concept that is proofing

why? its so fast ^^
ok, lets go this way. I want a desktop in my browser, if I can learn that, ill apply that to active desktop. From there, Ill see if I can manipulate windows's explorer, you know the window, and minimize it

no i still dont get you
active desktop runs js?

yup

ah
ok i'm not gonna touch this then
so there's wierd hooks that let you get at os-level stuff from the js? tha'ts gonna be unique to active desktop and i'm not even gonna guess

:o

http://des.virtualplastic.net/menu.png

and vb

How do i get the mouse's current x, y?

And I wanted to know if I could get rid of explorer, and make my own explorer with js
that way I could make my own minimize functions, and have it minimize into a pic or something, right on my desktop
vinse, ever used fvwm?

How can I get my current mouse x, y coordinates?
Hello is anyone here?
Why does FireFox have a problem with offsetX ?

Anyone know how to get an array of all elements that share the same id? getElementsById doesn't work in IE.

Anyone know how i can get the X Location / Y Location of my mouse in both IE and FF
Hi there, can anyone help me, im trying to understand how handlers work and how i can pass it through to a function.

is there a way toi manipulate an iframes dom from outside the iframe?

hello

Can someone help me with this problem? http://pastebin.ca/660541 Problem description is in the paste, it's about class variable assignment and accessing it in 2 functions

profoX`: The paste 660541 has been copied to http://erxz.com/pb/4073

never mind I understand the problem..

can someone help me on this javascript
it works in IE but not In Firefox
http://takashimaya-ny.com/
http://takashimaya-ny.com/product_detail.php?productid=16236
anyone here ?

Byan, iframe_elem.contentDocument
alex^_^, Works for me in firefox.
If you're talking about the lightbox?

no
the javascript validation
what i want to validate is. User must choose atlease one Product to Submit
are you still there?
can anyone help me on this js validation
http://takashimaya-ny.com/product_detail.php?productid=16236
what i want to validate is. User must choose atlease one Product to Submit

is there any way to tell how much cpu/memory JS is taking up?

why do people always call me byan
thanks grimboy_uk

dont start your nick with a _
mae it esier to autofill

well i dont normally but freenode wouldnt let me take my real name at the time

...

so isnt the _ suposed to be after?

sorry i wasnt aware of the irc nick name convention

i have this http://216.195.183.252/ws/tools.scotepi.dev/four_squar/
and right now it saves to a cookie every onkeyup=""
whats a better way to manage saves?
onunload doesnt alwase run

hey guys
is there anything wrong with this?: var root = xmlobject.getElementsByTagName("rss")[0];
because it works in firefox but in IE it returns as null

just brake it in 2, var root = root[0];
should be fine

still returns null

it could be that you cant use root

its, not a reserved word the last time i checked… but then again its IE ..XD… so i’ll try renaming it
nope, still returns null

don’t know, ive never checked my scripts in IE

ohcrap

..

thats stupid
i figured it out

element, so in IE its not returned as an Array, but a single object

great now i get to spend the next 20 minutes trying to get IE to agree with the rest of the world…

could you just do if (root[0]) { } else { var root2 = new Array(); var root2[] = root; root = root2; }

foo[] = bar; ?

nope

I have to use push()?

cdomigan use push
foo.push(bar);

for you need var foo = new Array()

js has such sexy object and array literals, you’d think it could do this
I can do: var foo = []; though right?

yeh unfortunatley not, Scotepi theres no need for the new Array()

can anyone help me on this js validation
http://takashimaya-ny.com/product_detail.php?productid=16236
what i want to validate is. User must choose atlease one Product to Submit

dont know i just alwase do new Array
how else are you suposed to do it Byro1

cdomigan [] is fine
var foo = [];

ta

kiwi mate

hehe. Christchurch. You?

Timaru

close!

just south of you
good to know other kiwis appreciate js’s sexy object literals

Now I trust you are jQuery follower…

indeed

excellent

cdomigan or Byro1 can you guys help me on my javascript validation?
i can’t seem to get it working on firefox
it only works in IE right now

cdomigan, check out my plugin if your interested http://jquery.com/plugins/project/appendDom

do you have time ?

Will do. You can check out mine too: http://www.trendskitchens.co.nz/jquery/contextmenu/

how can you find out the top of the client area so you can find out where things are positioned absolutely on the screen?

alex^_^ sorry not much time @work

it seems all coordinates are relative to the client area itself

client area?

Where the HTML starts being displayed
Like, clientWidth and clientHeight

in relation to what?

the screen

you mean like where the browser is located on the desktop?
you dont mean that do you?

I need to communicate the coordinates of something in the DOM over to a java applet

cdomigan, niiice and i acutally needed something like that

vinse, yeah, that

nfi if it can be done, i’d guess not
js has no real concept of what goes on outside the browser

except for screen.width and height… seems to be the only thing

Ha yours is cool. Very handy
alex^_^: Are you using a library, or just raw?

i suppose an applet could interface with the os to find out the browser position, then you’d have an offset to use with values js can get you

have a look at this simple function i wrote a while ago http://pastie.caboo.se/88490
cdomigan thanks
duity, ignore me

hi cdomigan

misread ur question

im just using raw
what i need is just simple js validation script

alex^_^: which function on that page should I be looking at

that validates user must select atlease 1 quantity
isSomethingChosen()

cdomigan, i tried to make it parallel the the existing dom api

It works on IE, but doesnt work on Firefox

Yeah I see that. How does your plugin compare to the other couple of ones that do DOM stuff like that?
alex^_^: I’m not sure if Firefox exposes the forms array like IE does
alex^_^: may be wrong though…

so do you have something that I can use for this validation?

Well if it was jQuery, I could do it in one line
But raw, I can’t really remember lol

cant be more than 3 even w/o

alex^_^: do you have firebug?
alex^_^: I’d check if inputElements is being assigned correctly

yeah i have firebug
so is it my syntax is incorrect?

hey! i have popups from a calendar, is there a way to refocus the window when i click a second event?

alex^_^: Your syntax looks fine, but you probably need to do some debugging to see what’s happening. So I’d start with the inputElements va
*var

sorry im no sure what I need to fix here though

alex^_^: do people really buy $5k lucite necklaces?

cdomigan, well compared to flyDom its 1.2kb compared to 15kb and… the way flyDom works is really ugly imo

isnt lucite another word for “plastic” ?

alex^_^: That’s why you need to debug. So you can see what’s going wrong. Try console.log(inputElements) to see if anything’s being assigned
Does yours user innerhtml or dom objects

pure dom

it gave me this ” [] ” in firebug

and of course another thing is the attaching event handlers cant be done with any of the others

so i guess there is nothing get assigned

alex^_^: Yeah. I’d use document.getElementById(‘orderform’), and then do your input search within that node
alex^_^: Just make sure you’ve given your form an id

cdomigan, i’ve actually considered using innerHTML because it would probably be a bit faster
but attaching event handlers would be a bit harder that way

how do use a link to refocus a different window
?

Have you heard of jsonT? It’s pretty sexy too

cdomigan, no i havnt got link? check out this example (codes a little messy) http://dev.byron-adams.com/jquery/plugin/appendDom/

Wow very nice! Cool effect too
Link is http://goessner.net/articles/jsont/

I added id=’orderform’
but it still not working thouhgh

thx, Byro1

alex^_^: Replace var inputElements = document.forms['orderform'].getElementsByTagName(‘input’); with document.getElementById(‘orderform’).getElementsByTagName(‘input’);

duity thats what you where after?

nope, but thanks for trying

cdomigan, jsont looks a little more extensive than mine like the svg manipulation

heh

duity yeh i thought so

it’s a wierd requirement, what is it you’re trying to do?

Yeah, you can come up with some really complex transformation rules – very powerful

json is nice, but I want something that’ll do the method calling for me to
xml-rpc can do that

but again mines only 1.2kb :P

Yeah

still doing the same thing though

ok i see, interesting … ok just kidding — what?

vinse, I have an applet that is small and in the corner. It shows messages right now right in the applet window. The messages aren’t being noticed by users, so to make them more visible we’re putting them in an undecoracted hovering little box and want to make the box look part of the web app.
Need to find out where the stuff in JS is located relative to the screen because that’s what java/swing understands

is it my if else is wrong? What I want it user must enter at lease”1″ in one of the product

vinse, google xml-rpc
You can call a method implemented in PHP or any other server-side language from JS almost as if it were local inside JS.
uYou can call a method implemented in PHP or any other server-side language from JS almost as if it were local inside JS./u
We could probably create a div, then in the applet call JS that just populates the div

well then you need to get the “os level” via the applet
err “os level info”
like the browsers position on the screen

*nods* java doesn’t have something like that built-in

yeah you’d need to use jni — i cant help thinking its way too much work for making a pop-up more noticeable

any idea why still not working?

alex^_^: just looking

ok

vinse, agreed, I’ll check out the div

alex^_^: I think your markup is invalid. You can’t nest a form in a table like that. Try putting it outside the table tags
alex^_^: And I was wrong before, you CAN use .forms[] in firefox
alex^_^: But much better to grab it by it’s id

forms is cross browser compatible.

so what should i do?

It works in all browsers AFAIK.

alex^_^: formtable…/table/form

Comments off

What kind of object do I have to create before using writeStartDocument

You are really innovative. teralaser++

hehe

hi folks
who knows about Seam framework ?

hi , all when i try to access a class static final member i get the error of java.lang.NoClassDefFoundError exception
it’s a runtime error

any idea?

~show us

Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options.

Most likely cause is that your classpath is wrong.
And that accessing the member is trying to load a class for the first time only to discover it’s not there.

Hello. What kind of object do I have to create before using writeStartDocument()?
Why cannot I use it with a Document?

Comments off

if an object of class A needs to have a reference to an object of class B and that is required and should not

Cheeser, true.

ignorance is a bit difference from just being wrong

not public?

for the base class

should it be protected all the way up
oh

deep complex data structure are not really going to be cloned if you do it manually, unless you really know hwat you’re doing in your copy constructor.
sleepster, you have to understand about shallow and deep object copy.
but no… it is not a bad thing, just a thing you have to implement carefully (if not implemented).

dude come on

meeper, yes?

I have a factory class that generates these classes.. would it be better to add a method in my factory that takes in the object and creates a duplicate copy?

there is no reason to ever use clone()

or would it be more intuitive for the copy constructor approach

meeper, YOU tell me why not..

if you want to indicate an object is copyable create a ctor that takes the same class.
why would I do that?

you’re too dumb to understand.

meeper, then don’t tell me that clone is useless.

not a base class, or a child class, the exact same class

if you have no valid reason to prove so

amnesiac++

amnesiac has a karma level of 2, cheeser

from that you can figure out the rest
yeah, that works for me
of course I’m not telling you anything, I’m telling sleepster

good.

good!
hehe

good!!

Meh.

Hola, Dalila.

public myClass( myClass A) { super(myClass); // assign fields here }

*sam*son

stop asking stupid questions

okie
I like asking stupid questions
people pay attention to me that way
WOAH!

Sanson lol hello

meeper is gone!
forever?

just muted

ugh.. thank god…

oh, why muted?

Sanson i love long haired men though

maybe if he stays here without talking he’ll finally learning something.

Damn.

are we muting him for being mean to me?

What if the hair is on my chest and I’m in good shape? Does that count/
?

Sanson i wouldn’t cut your hair if you had

sleepster, no, you have to learn as well..

haha

sleepster, read why Josh Bloch says clone is BAD if it is implemented in the wrong way…

pr3d4t0r WOW.. that’s so hot ( hair on the chest )

Ah, mis esperanzas se esfumaron.

well I read his book and I recall that he says people don’t always obey the contract so it stinks

nah. we’re muting him for being an all-around dick.

oh.. but also for being mean to me

sleepster, that’s the thing, now… he tells you that there are properly clone methods implemented in several Java classes and frameworks
sleepster, for example, he mentions (for obvious reasons) the java servlet hosting Collections Framework

http://eugeneciurana.com/galereya/view_album.php?set_albumName=baby_pr3d4t0r – that’s what a pr3d4t0r looks like when he’s got hair on his head but not elsewhere.

oh I see..

Anyway.

~javadoc JFrame

I don’t know of any documentation for JFrame

Nos vemos, Dalila.

tee hee hee

pr3d4t0r i don’t speak spanish …

sleepster, now, his words are not the final veto on Java development, but he’s wise when he tells you about CAREFULLY do whatever you’re doing..

Aw?
Where are you from, with that spelling?

he works for Google now I believe

pr3d4t0r i’m an arab girl my name’s Dalila

Ah.
~tell Dalila about welcome.

Dalila, http://eugeneciurana.com/galereya/view_photo.php?set_albumName=Humor&id=welcome

pr3d4t0r, nomas andas viendo dónde picas :P

pr3d4t0r Dalila is an arab word ( adj )

Te da envidia, güey.

hahahah, right.

What does it mean?
OKi, SP2 is installing.

pr3d4t0r a “dalila” woman is the woman that knows how to seduce her man or BF in a classy way, it means also that she is a very loved and sexy woman. ( hell, what’s this channel about ? java or what ? lol

:O

Dalila++

dalila has a karma level of 1, pr3d4t0r

Dalila++

dalila has a karma level of 2, pr3d4t0r

Dalila++

dalila has a karma level of 3, pr3d4t0r

pr3d4t0r loool

ora ora barbero…

That was one karma point for classy, one for love, and one for sexy.

pr3d4t0r thank you so much :P

Dalila, that it easy, those guys see girl one time by yeard
*take

pr3d4t0r, tendrías que ir hasta su país árabe a chingartela…
pr3d4t0r, plus… quien sabe como esté :P

Ah, te dicen el fino…

hahahah

joaop well i don’t know if i’m supposed to laugh or cry when i hear a such thing :P lol

I actually have a tendency to have several girls around, usually models or artists of some sort; I’m not as starved for female companionship as these kids.

pr3d4t0r i like spanish and italian but i still can’t learn some of them, would you teach me ?

So my interest is purely linguistic about the Dalila word.

pr3d4t0r well take it easy man, we’ ve been kidding

Sure!
:*
I’m going to take a nap now and leave you with the usual suspects.

pr3d4t0r, es tornillo… hahahaha

amnesiac sort of speaks Spanish too.
He attended a bad school but otherwise is a nice guy.
.. o O o .
Don’t tempt me. censored will get jealous

pr3d4t0r censored ? who is that ?

http://eugeneciurana.com/galereya/view_album.php?set_albumName=owned
She’s a ##java regular that hasn’t been here for a while; she now hangs in our private channel.
We hung out the last time I was in London
Anyway.

pr3d4t0r you’re brit ?

No, Mexican.
I get around, though

woow cool
enchantée

Enchantée ;_

i’m a tunisian muslim girl. :P

Nice! I’ve seen some photos from your country (my French friends go there a lot). Beautiful place.
What brings you to ##java?

pr3d4t0r tell me we’ll not be fired if we carry on talking out of the topic ?
or kicked

pr3d4t0r is one of the ops, so you’re fine

You’re fine.

Logi heh, thanks

the rest of us might get jelous, though, and kick you ;-)

You’re more likely to get /kicked for staying on topic
/kick Logi.

Logi unfair :’(

jelous, excuse the spelling

Plus it’s always nice to learn about cool exotic places.
Anyway.

pr3d4t0r tunisia is a cool place yeah.. i would never leave it if i could.

I have a party later.
Nice.

pr3d4t0r nice

It was nice meeting you — see you on-line at some point.
Z z .

sup pr3d4t0r

pr3d4t0r nice to meet you too, thanks
pr3d4t0r you there ?

Sorry, I was going to take a nap. What’s up?

i used to be _S0cKeT-

Ah.
I don’t reall your /nick

reall ?

Really.
Dalila:
Anyway. Nap time.
See you later.
Z z .

pr3d4t0r i know, i chose my first nick when i was looking for a java channel.. socket is related to java. anyway
see you later

Dalila is cooler
:* See ya.

pr3d4t0r :*

it’s sunday

hmm? You’ve never been to a busy channel then

go to a sex channel
of course, most of the traffic in chans like that are 40-yo truckers looking for love in all the wrong places, but hey

well informed hein jottinger ? hehe

I knew you got around, but didn’t know you were a trucker

so i hear you know lot about trucks..

sure, why not
actually, studies done on truckers show that they’re a hell of a vector for disease

know as the “looser age”

it’s made worse by the concept that driving a truck is “manly”
so they tend to hide illicit liaisons
makes research really difficult

heh wtf are you talking about?

truckers as disease vectors

stupid barbs!

trucker gets disease X from a stop on his route

jottinger, you seem to have a lot of experience with truckers

well considering the car runs on twelve wheels, its arguable that there is space to hide stuff in it..

~javadoc DataSource

I don’t know of any documentation for DataSource

if you haven’t been able to read, I’m talking about research, not infatuation

~javadoc java.lang.Throwable

cheeser, please see java.lang.Throwable: http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html
cheeser, please see java.lang.Throwable: a href=”http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html”http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html/a

jottinger, hehe…whatever

disease kinda sucks, esp with diseases like AIDS lurking about
and truckers are some of the last bastions of the one-off pick-me-up
along with college students, go figure
and pr3d4t0r

you probably don’t know a thing about truckers except that their gross income is higher than yours

*shrug* Okay. I’ve been talking about research, not lifestyle; why so touchy?
I mean, I’m not saying I know all about truckers; I’ve been talking about *one* *thing* affecting them

*yawn*

I don’t see any comments about truckers until I say something in the channel

Being at work on a Sunday sucks balls.

I didn’t know you were even in the channel.
in fact, I didn’t even say anything about it until five minutes after you’d greeted pr3d4t0r
get over yourself; you’re not that important.

lol ya, maybe you didnt know that I’m a trucker

who d’you think you are? meeper?
*shrug* makes no difference to me either way.

could I remove that “be r0bby” factoid? :-x

my main concern is that if you’re a trucker, that you stay away from me, ya diseased hommasexshul! ‘Cuz hommasexshul diseases fly through the air, you know
and if you can’t detect sarcasm in that statement…. there was a lot of sarcasm in that statement

lies. I saw no opening or end tags for it.

life isn’t SGML.
life isn’t even ABOUT SGML.

I’m not a homo, but your worried about catching a diesease from a homo?
I’m not a homo, but your worried about catching a diesease from a homo?

THIS is why I said there was a lot of sarcasm there

nono, he was just talking about disease infested truckers.

what about all the disease infested computer programmers, can we talk about them too?

yes
except diseases tend not to travel over TCP/IP
only UDP
seriously, caverdude, chill out some
nobody A) knew you were a trucker; B) cares; C) assumed you were a homosexual; D) cared if you were, in fact, a homosexual

unless there was another trucker in the challen, lurking for love in all the wrong places
in the *channel even

who you screw and how isn’t any of my concern

haha

~be r0bby

FileNotFoundException is a subclass of IOException; Exception won’t directly catch that.

w00t

i’m not gonna do it, i view that as some sort of punishment, deserved it

well it looks like I’m going to continue as a trucker for a while, I’m hoping to start college again in september or next january. But I hope to cut my hours to 40 by january which should give me more time for java servlet hosting
again
heck even if I finished a degree I’d probably still drive a truck

i understand. Its so manly.

not only that it pays well

its the pure leather of the drivers seat on the naked body ?

you own your own rig?

you know people from India, China can’t drive trucks right now. And at least for now Mexican’s can’t that may change later but I hope not
nope, I’m actually a “trailer jockey” right now at a local warehouse

*nod*

trying to get in a position to finish my associate degree at least, then maybe MIS degree.

well, I gotta jet.
Later all.

Are there any plans to implement a QT look and feel in Swing?

do you have any ?

Poor IDEA.

it refuses to open the ant build file
okay stopped acting up..

Was Solaris programmed purely in Java?

no…
I’m sure there are no java bits in the OS itself. There may be some admin aps in java, but I don’t know.

Have any of you guys seen constructors that have more than 10 parameters?

Yes, but it was in an application that followed the detestable Immutable Object pattern.
I mean, value objects were immutable, so you could only access their fields from their constructors
“FileNotFoundException is a subclass of IOException; Exception won’t directly catch that.” This is false, isnt it?

Okay, NandoFlorestan.

~forget said: “FileNotFoundException

“filenotfoundexception, MickMcMack.

what the hell just happened?

you failed

I failed?

BotIOException

arent you guys enigmatic?

it is false
i said that

usually seldom

and well, it’s gonna be there forever

if you want to hit on us, hit on the trucker..

I cant, my Beetle would be crushed

which one? john’s quite stout

g[r]eek, how well do you know his beetle? Forget it, I dont really want to know

whose beetle?

g[r]eek, you said john’s Beetle was stout.

no, i said john’s quite stout

You people speak a mysterious language.

idle banter that went unnoticued i’m afraid.
*unnoticed

flippo, I wanted to speak Java here, but some ppl think this is #truckers or something

(Actually, John was a bit anorexic in later years. He didn’t like being identified as the fat one.)

~flippo++

flippo has a karma level of 70, g[r]eek

my double whammy by virtue of sarcasm

g[r]eek, was I the only one to decode it?

i believe so

now look who is speaking a mysterious language

but you said “enigmatic”, isnt that generally considered a pickup word ?

around blondes

hey does anyone in here play nethack?

gosh been asked to tender for the design and development of a large(ish) enterprise system. wtf happened to iterated development.

well “florestan” sounds like some kind of substance used for whitewashing hair..

reminds me of flotsam

wow, humorous as that is, it occurs to me you must have no life
I mean, come on, joking on #java on Sunday evening

i eat nandos for breakfast

heheheheh

its 2am here. Hardly a evening.

don’t insult him.

1am. Woflborg: eastern europre?

g[r]eek: Finland is EET, yes

1am @ gmt+2 (south africa)

g[r]eek: oh, and it’s EEST while it’s still summer here, so +3

heh, here i was thinking finland is to the west of, well, the longitudinal line going through southa frica

lies, i have life. And life 2.

you have second life?

g[r]eek++

g[r]eek has a karma level of 9, r0bby

g[r]eek: nay, i mean “life 2″, i got it after i reached level 50..

epic levels?

theres no epic levels in final fantasy six

wow. i’m only on level 23. *scratches head* what’s the future of software oh wise sage?
ffvii is my favourite of all time

ah.. youngsters..

“angel-headed hipsters”

mmm, final fantasy
I’ll get around to XII one of these days

g[r]eek: Finland seems to coincide with South Africa pretty well

Those are sissy games, men play Duke Nukem 3d

cool. i’ll be sure to spend some time there when next in europe. i love not suffering from jet-lag

g[r]eek: jetlag shouldn’t be too bad inside Europe – the clocks only range from +0 to +3
and for +3 you have to go quite far east

you guys are just coming out of summer correct?

hi again
Does any one use hibernate or just JDBC classes?

g[r]eek: up here in the north it’s still summery-looking, but the evenings are already growing colder
in Central Europe thisis the summer holiday season

Because i am coming from .net world and using Datasets sucks.
Also here in Egypt

yes, some people use Hibernate

~tell _Kariem about anyone

_Kariem, Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.

No i am just making a survay that will help me weather to use Hibernate or anything else like raw JDBC or OODBMS
wether*

lol, in which case
~tell _Kariem about tias

_Kariem, Try it and see. You learn much more by experimentation than by asking without having even tried.

heh, i long for the day when javabot parses comments and replies autonomously

I used NHibernate much for apps

every question should boil down to rtfm :P

He does parse all comments… he just ignores most. :P

supposedly NHibernate is just a .NET version of Hibernate

But in Java EJB strongly present
no Ejb in .net

no EJB in Hibernate either, unless you want them, and then it’s not really Hibenate anymore – just another EJB implementation

well, heh, with ejb 2 there were enitity beans :P
(hell on earth beans)

My question is does orm is a standard in java world

“is orm a standard” – sure it’s popular. use the tool that suits the job at hand

there is no such thing as “java world”

understand your options. understand your domain. decide

_Kariem, I have a feeling most large projects use Hibernate.

I say java hosting world because .Net has very limited options

and most small projects should be open source and use db4o

Java world is wide – I’m fairly sure that people who do software for mobile phones don’t use Hibernate, for example

Db4O is GPL

dude, i’m still not sure what your question is. try ask it in a single to-the-point sentence

i don’t think my client would be happy if i released the source code

only if you don’t wish to pay

Is hibernate used in any Desktop applications?

I wont be dragged into a license discussion here.

But there is many OODBMS alternatives in java

all have their ups and downs. what are you trying to do?

Big comnpany accounting and warehouse managment system with desktop interface

hi guys i need some help, i am trying to make a program for a palm, now it needs to have an option so i can send some data from that programa to a desktop or laptop, connecting the palm. Is it possible?

why desktop interface? why not do it via browser?

Suppose the application is deployed on a single machine,Is that would be good?
Because i have really asked myself this question many times.

anyone please?

what kind of Java do you have on Palm?

you said “big company” – that generally implies multitple users. it might be better (in this particular situation) to website design a server side jee app and serve its interface via any networked computer with a web browsr

the default that comes with it. i have netbeans on my desktop for making the program

Well, in that case _Kariem , forget Java, learn Python and use TurboGears

Or thin client interface

thin client is exactly what i described above

Why the hell i use those?

just what are you doing ni ##java again?

On Palm, I think the only good VM available is the IBM one, right?
The one that’s like $5.00 a copy or something?

hell no!

how do you plan to establish communication between the desktop/laptop and the palm?

It is actually good idea to use Web browser.

thats the problem, thats my big problem, it could be easy if it was networked or something using the inet, but i dont know how

in this situation sure it is.

Web browser + AJAX = Done

~javadoc JFrame

I don’t know of any documentation for JFrame

what options do you have, anyway?

~javadoc JFrame

cheeser, please see javax.swing.JFrame: http://java.sun.com/javase/6/docs/api/javax/swing/JFrame.html

w00t!

~javadoc HttpSession

I don’t know of any documentation for HttpSession

still no jee
:~(

i’m working on that.

usb

found a bug in the javadoc parsing

what could i do from the browser?

sadly, the bot is kinda spammy…
~javadoc Element

cheeser, please see javax.lang.model.element.Element: http://java.sun.com/javase/6/docs/api/javax/lang/model/element/Element.html
cheeser, please see javax.swing.text.Element: http://java.sun.com/javase/6/docs/api/javax/swing/text/Element.html
cheeser, please see javax.swing.text.html.parser.Element: http://java.sun.com/javase/6/docs/api/javax/swing/text/html/parser/Element.html
cheeser, please see javax.xml.bind.Element: http://java.sun.com/javase/6/docs/api/javax/xml/bind/Element.html
cheeser, please see org.w3c.dom.Element: http://java.sun.com/javase/6/docs/api/org/w3c/dom/Element.html

heh

damnit

not sure how best to limit that.

~tell javabot about pastebin

javabot, http://eugeneciurana.com/pastebin

other than always push javadoc responses to PM

2 or something.

i don’t think the rare occassion where spammy responses occur warrants such a move. imho

unless you get dickheads who just want to spam the channel
but i suppose that’s what +b is for
8^)=

that’s what we have you ops for

any ideas?

ok. time to give the baby a bath.
just wanted to update that javadoc

awww. how old?

besides combing through possible device-specific APIs, not really

babies rock

um… 10 months.

I suppose you know where to find those better than I do

sleepless nights? or the quiet type?

mostly quiet. wakes up once or twice to nurse but pretty quiet overall.
bbl

chiaz

be sure not to throw away the baby with the bath water, though

usb? that’s not really an “option” for what you describe

heheheheheh

?

i know didly squat about palms, but surely they have wireless or bluetooth or something along those lines?

:’(

thanks
g[r]eek: ok i will try to find out
g[r]eek: no wireless or bluetooth

refresh my memory – what is the problem that you’re trying to solve?

does any palm support java?

didn’t answer my question. what are you trying to do?

g[r]eek: i want to make a program i can run from a palm, it should write some files and i should be able to get those files later in some desktop
ok, i have this palm TREO 650
it has bluetooth and infrared port

it has bluetooth there you go
i gotta run
bbl

ok so where do I go if I have a question about applets? Why arnt they allowed in here?
anyone?

can i do applications for windows in java? like delphi?

jmoncayo, go to wikipedia and read about java virtual machine
the answer is yes, but it runs on a java virtual machine
i.e. an interpreter

lets say i have the program.class how could i run that

jmoncayo, type “java” in your console and see the usage
java program.class

No, no class.

ok time to download Netbeans hosting or eclipse

Well, you can ask, you’ll just get answers varied and mostly telling you to use webstart because applets are an overly restrictive containment environment with browser-dependant support for some features.
Which *really* makes for happy fun time when you’re trying to support them on The Internet.

i
Whoops.

he’s right java ClassName
you’re executing _CLASSES_ not files

I think sun’s forums have an applet section
if it’s AWT/Swing related (and not a security issue), you can still ask it here

Dumb quesion…but does anybody know or had any success working with ant for using it to build non-java applications?

how’s things?

svm_invictvs, I’ve seen it used to compile JNI code for java projects. Or to call scripts to do all sorts of random things.

~pastebin

http://pastebin.stonekeep.com

http://pastebin.stonekeep.com/638 – Hm? I guess. I dont know

How do use mod on java
like C’s 5 % 4

same

oh okey, thanks

How do I implement ActionListener in a public void

ActionListener is an interface. You implement it like all other interfaces.

that question does not make sense

wow my code doesnt make any sense any more.

hey all

Fanook, okay I wrote this code myself and this makes 0 sense
Fanook, http://pastebin.stonekeep.com/639

perhaps you should spend some time on designing your program

Fanook, …

does anyone know of a RXTX download mirror?

Fanook, I did.

the download link on the RXTX site seems broken atm

ok, so what are you confuzzled on?

hehe
http://pastebin.stonekeep.com/640

correct. you did not implement the required method or declare the class abstract

Fanook, why would I need to do that…
Fanook, whats abstract about it?

because you are implementing an interface. when you do so, you must either implement every method declared in the interface or make the class abstract
~interfaces

Fanook, interfaces is http://java.sun.com/docs/books/tutorial/java/concepts/interface.html

Good to know. And is that an easy fix?

go read the interfaces tutorial

anyone using RXTX?

sayers, sure, if you know how to implement the method.
sayers, if not, you’ll have to figure out what to do with an abstract class

flippo, should I drop my book and read the site?

sayers, you should learn what interfaces are for, and how to use them. Try both.

Guys, what good book do you suggest I buy
Maybe John Smiley’s Learn to program in Java

Killer Game Programming Java Ramihg

~tell ramihg about beginner’s bibles

ramihg, I guess the factoid ‘beginners’ bibles’ might be appropriate:
1) Sun Java Tutorial (http://java.sun.com/docs/books/tutorial) 2) Bruce Eckel’s “Thinking in Java” (http://www.mindview.net/Books/TIJ) (Get the 3rd edition, the 4th is only freely available up to
chapter 7.)

I am a C programmer, not a beginner so i dont need a total beginner’s book
I read the sun java tutorial
I need a book since I am lacking in many stuff

Ramihg, then I’d read the language specification.

check out TIJ. feel free to gloss over the basic programming concept stuff

TIJ isn’t just a beginner’s book.

Thanks for the help
I will ready everything in the ‘beginners bibles’

If you’ve only done C, then you may want the beginner’s material on objects

I’ve done lots of languages. never got into java. its a shame really
I still need to pick up a beginner’s book though. To explain the basic java stuff (ie about byte-code compiling etc)
thanks for the help

~tell Ramihg about firstcup

Ramihg, firstcup is a beginner’s tutorial for getting started with Java available at http://java.sun.com/tutorial/getStarted/cupojava

that’s the best host tutorial to “get started” with java

Yea hehe I read that one
I’m currently reading the rest of the tutorials on the java website
They’re pretty nice

yeah, java’s tutorials are among the best out there

There’s one thing i googled a lot but never really understood

With public void actionPerformed(ActionEvent evt){ how can I determine what was pressed?

whats the difference between the enterprise edition and the standard edition
is it more libraries?
more _security_.. ?

Ramihg it seems that nobody knows

Ramihg, that’s pretty easy to google

From what I understand from google is that EE has can make web applications

sayers, evt.getSource()

EE can**

Enterprise edition has additional libraries in order to make your acronym soup of a web application work.
You can also use SE for this. But then you don’t properly leverage your assets with persistance frameworks. Cuz it’s not enterprise.

You can repurpose your standard technologies for greater shareholder value

I’m afraid I won’t get the difference till after a few months, till I _know_ what SE can do first ,hehe

Everything.

Ok.. I think I’ll forget about EE for a while

kamoricks wins at buzzword bingo!

phus, trying to intergrate that but cant

EventObject.getSource() returns the object that the action occurred on. Alternatively, you can set unique ActionCommands for each of the objects your class is listening to and differentiate your actions based on that

Fanook, I think I had a brain-dea
Fanook, if(evt.getSource() == stats){ does not work

~doesn’t work

Fanook, 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)

~javadoc CharSequence

cheeser, please see java.lang.CharSequence: http://java.sun.com/javase/6/docs/api/java/lang/CharSequence.html

~pastebin

http://eugeneciurana.com/pastebin

still pondering the javadoc bugs?

Fanook, http://eugeneciurana.com/pastebin/pastebin.php?show=3668
Fanook, line 56

hey guys if i want to start learning java, what should i download?

stats is local to your constructor. how do you expect the actionPerformed method to find it?

java dev kit

~tell jmoncayo about download

jmoncayo, download is http://java.sun.com/javase/downloads/index.jsp

get the jdk

Fanook, because its a button
and I added a listener to it

why should that matter? it’s only visible INSIDE YOUR CONSTRUCTOR
~tell sayers about scope

sayers, “A variable’s scope is the region of a program within which the variable can be referred to by its simple name” – http://bioportal.weizmann.ac.il/course/prog2/tutorial/java/nutsandbolts/scope.html Also see http://mindprod.com/jgloss/scope.html

well there arent any tutorials on event listener

~swing

Fanook, swing is a windowing toolkit for Java. Tutorials: http://java.sun.com/docs/books/tutorial/uiswing/ and http://www.swingwiki.org/ also check out ##swing

~tell sayers about events and components

sayers, events and components is http://java.sun.com/docs/books/tutorial/uiswing/events/eventsandcomponents.html

we beg do differ
s/do/to

its all lies, there really are no tutorials for anything, its all kept low under and hush hush..

I’m guessing javabot is written in java and/or is opensource :P

*down low even

yep

which bugs?

~tell Ramihg about about

http://javachannel.net/wiki/pmwiki.php/FAQ/Javabot

Ramihg, and hes a mean bot

i already fixed a big on tonight.
er, big one

which one?

Fanook, another link you send me that isn’t relevant. That link says nothing on action event listeners.\

ALL event listeners are done the exact same way
they just listen to different things

Fanook, which is?

thats right, listen to the small voice telling its all for naught, its telling the truth!

the javadoc only doc’d the java.* packages

ah. that’s a nasty little oops
~tell sayers about events and components

sayers, events and components is http://java.sun.com/docs/books/tutorial/uiswing/events/eventsandcomponents.html

go read. i already linked this to you before. i will NOT do so again

dont click the link, he just wants to eat your brains.

Fanook, your wasting your time sending me useless links. That page has nothing relevant. Where does it say action event listener

gee, maybe the link saying “How to Write an Action Listener”

Jesus every time I decide to code my new live in girlfriend wants to blow me

and with that, you’re going back on the ignore list. i can only tolerate so much insert grumbling here

thats on the side
Fanook, +2 ego points?

its all lies, theres no “event” in there, they just want to keep you down!

~Woflborg–

woflborg has a karma level of 1, Fanook

~Fanook++

fanook has a karma level of 35, Woflborg

sayers, did you add an addActionListener to your button?

phus, Yes.

That link is 100% relevant, you actually have to read.

or what ever thing your trying to trigger on

yes. he’s just trying to refer to a method-local var from another method

Does javabot take away karma points too?

r0bby, I was reading the main body not the side.

read the whole page.

bs, its also in the main body.
ofcourse you need to learn the basics first, like scope, before you can leverage the page.

~barbie learning

barbielearning is hard!/barbie

but its alll for nauuught… it wont come to anything… better give up now!

hmm, i think that factoid needs a *giggle*

http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html
to help you.

I swear to all that is good and pure in this world, the next time I get instakilled due to poison from a soldier ant, I am going to throw this monitor out the nearest window. :@

~fluffle MickMcMack

I guess the factoid ‘mickmcmack, mickmcmack’ might be appropriate:
Fanook, mickmcmack, mickmcmack is http://www.me-online.me.uk/me.jpg :O!

heh

I should change that.

remember that whatever you spoonfeed to it, will come out of the other end, so I hope you like to change them diapers too..

aww, MickMcMack’s exceeded his bandwidth

Fanook, MickMcMack’s anti spam filter webmail host excedes his bandwidth. ._.

-_-

I’m trying to get this actionlistener button to change the color of the editorpane but all I can get it to do is change the panel color.. what can I do?

show us code?

I’m trying to get this actionlistener button to change the color of the editorpane but all I can get it to do is change the panel color.. what can I do?

~tell ticnailer69 about repeat

ticnailer69, Please don’t repeat yourself, it annoys people and rarely produces results. Try rephrasing or, failing that, come back in a good while when there are different people here. Meanwhile, google is your friend.

ok

What should you use and make your standard, the StringBuilder, or the String objects?

thanks

standard what?

I mean which should you use
Do developers usually use StringBuilder or String?

it depends on what you’re doing. if you build the string over several statements, StringBuilder will be more efficient
if you do string cats in a single line, the compiler will use a StringBuilder behind the scenes for you

Ah

uhh
how could I post code without flooding?

use the pastebin

~paste

http://eugeneciurana.com/pastebin

thanks

Hi Guys. How are you guys coping with the windows vista ‘virtualstore’ folder in your app? My program is supposed to save files to its cprogram files\myapp\data folder. But now everything is really saving to the HIDDEN virtualstore folder per vista security
This is making it impossible for the normal user to find the files
How are you guys coping with this?

i’m refusing to move to vista

Not using it, but that’s a useless answer

http://eugeneciurana.com/pastebin/pastebin.php?show=3670
could I just change anything in the colorAction class?

what are you calling setBackGround on? You need to call it on a specific object

to get the color to change in the editor pane

i don’t see how that could ever work. ActionListener doesn’t inherit a Component
and seeing as how you haven’t defined a setBackground to set the background on a Component, i don’t even see how that’s compiling

its setting the background based upon a menu item

This is just driving me nuts! I just spent 2 hours thinking I was crazy. From within my program I could click open file and the filechooser would show files that if I browsed to with explorer wouldn’t exist. I finally searched all hidden files and found that vista has a driver that redirects
all user level writes to the virtualstore folder

setting the backgound of WHAT? ActionListener doesn’t have a setBackground method and you haven’t defined one

ok

call setBackground() instead on the object to which you’re changing the background of

I’ve used this code in a similar program I wrote. The program was designed only to change the color of the panel.Let me show you…

lemmie guess, the class inherited from JPanel?

yeah
I used that in the program that I was about to show

which DOES have a setBackground method and so has meaning. you need to tell the compile hosting which method to set the background on
s/method to/component to

this is all new to me
ok

There doesn’t seem to be a lot of documentation on java and virtual store
or java and UAC

so then if I cant use JPanel b/c it will just color the panel than is there another thing I can do?

objectYouWantToChangeTheBackgroundOn.setBackground(someColorGoesHere);

cool
thanks bro
ur the coolest

keep in mind, you WILL need a reference to the object in your class

javabot tell ticnailer69 about aolbonics

ticnailer69, aolbonics is talking like a retard using speech as if you were on AIM or using single letters for you, are, you are, you’re, see, etc. Talking like this is frowned upon in ##java and may result in you being silenced. You have a full keyboard so use it. We don’t care if you talk like
an idiot with your friends but we don’t want to sit through stuff like this: http://forums.oracle.com/forums/thread.jspa?threadID=499980&start=0&tstart=0

ok

I’m trying to extend a class Book with another called CheckBook. When I try to compile my new class, it claims it’s not able to find the constructor in the original Book class, though the constructor is present. Why would this be?

it’s not public or protected

it’s public…

~tell Bogaurd about paste

http://eugeneciurana.com/pastebin

alrighty.
http://eugeneciurana.com/pastebin/pastebin.php?show=3671

and the error is…?

CheckBook.java:11: cannot find symbol
constructor Book()
class Book
public CheckBook (String auth, String titl, String isb, int per) {

also, you may not realize this, but you’ve duplicated all your class members.

hmm
you mean the String’s author, title etc?
only need to be declared in the original class?

Right.

yes, but you either need to make them protected members or create setters/getters for them

hmm, why’s that?

protected members are available to subclasses

becaure things marked private are only accessible to that class, not to any other classes

ah, I see
alright, i’ll modify that now

javabot tell Bogaurd about access specifiers

Bogaurd, I guess the factoid ‘access modifiers’ might be appropriate:
Bogaurd, access modifiers is http://java.sun.com/tutorial/java/javaOO/accesscontrol.html

^^

thanks :-)

the compiler is complaining because you only get a free default (no-args) constructor if you don’t define any other constructors. either add a no-args constructor to the Book class or use the proper super(…) constructor call
~tell Bogaurd about super

Bogaurd, super is http://mindprod.com/jgloss/super.html

why do this and super have to be the first line in a constructor?

eh? this?

because the JLS says so

javabot tell JohnCC about jls

http://java.sun.com/docs/books/jls/

only super needs to be first

but why did they make that decision?
is it totally arbitrary or is there some reason behind it?

the inherited state needs to be created first
then if you need to cahnge that state you can.

this calls need to be first too

otherwise the parent classes can trample our changes
oh, this(blah)

yeah

thanks for your advice – it seems to be compiling fine now. I’ll pastebin my code to show you what I did

yes. the dependent constructors have to go first

so, for example, if you were going to access a inherited variable, it would have to call the other constructure to initialize it first?

right. though you shouldn’t access inherited fields directly

pshaw. future-proofing is for indecisive people

is it?
P^)=

i’m not sure anymore

hello, how do i invoke a method from a javabean for a html form?

eh?

http://eugeneciurana.com/pastebin/pastebin.php?show=3672

in a JSP?

yes in jsp

it works Bogaurd?

eh. i don’t use JSP.

seems to r0bby :-)
did I do it correctly?

ah shucks

wicket++

usually the form action is set to a .jsp page right? i wonder can it be triggered by a method

I should hang up a sign in my cubicle for the boss that says, “I’M IN UR OFFICEZ…POLISHIN’ UR TURDZ”

*snort*

LMFAO
find a nice cat picture, caption it, then put it on his door

How do you declare a variable in an ant build “script”

property

thanks.

sure
ant.apache.org/manual

is there a way to arbitrarily add/remove objects from an array, as well as check if an array contains said object, or does this require an arraylist?

i should really take some time and learn ant

They should call it variable or something that makes sense.

no, if you remove an item from an array, you’ll be replacing it with null. use an ArrayList

thanks Fanook. if a create an arraylist 10 elements long, and I add another element at the begining, will it remove the last one?

~tell Bogaurd about arrays

Bogaurd, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html

yeah

thanks cheeser

no, it’ll grow the list. if you want a fixed-size list, you’ll have to write your own
i think Queue might have a fixed-size version, not really sure offhand

alrighty
thanks

not that it’s really all that hard to write your own

what does it mean if the java compiler says that a class uses unchecked or unsafe operations?

that’s its way of telling you that you should be using generics
~tell Bogaurd about generics

Bogaurd, generics is http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html Generics tutorial: http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf FAQ: http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html

you should finish gosling because ant pisses me off ^_^
lol

i’m hoping to get back to that next week

I acutally look forward to seeing it in action, it looks neat
from what litte bit of the code Ir ead.

k. bed time.
later…

lates

good god.. why do linux distros insist on shipping broken implementations of java

Because it’s FREE!
….Like the GPL isn’t…

hmmm

afaik, I wouldn’t mind, but they install it as /usr/bin/java
afaik, /usr/bin/guava wouldn’t be a problem. It wouldn’t be mistaken for java.

is objectoutputstream / objectinputstream fifo or lifo?

update-alternatives-java: command not found
cant find it orse, I installed sun java via apt-get, but
sorry bout that

update-alternatives java
Since there are a lot of alternatives you can update, and java’s just one of htem.

I get “unknown argument, java”

Err, update-alternatives –config java
Cuz it needs the –config for some reason.

heh… I installed sun’s java via apt-get, but seems I still have gij. And removing it via apt-get insists I remove any java applications installed via apt-get
oh thanks
sweetness

That’s because there are two java packages – “”Free” java, and “”commercial”" java (nevermind they come under the same dang license). ANd most things depend on “free” java.

i am getting a clear lifo behavior with objectinput and output streams, but it is supposed to be fifo right?

oh, but is it truely free?
FREE as in FREEDOM!?

kamoricks, I think you’re having flashbacks.

hi, i’m looking for an open source lib for doing visio-like operations, i.e. adding widgets to a white-board-like interface and dragging them around and associating them by lines, etc. … anyone know of anything like this?

I think the license debate is over, except for a few font rendering libraries

LOL @ “diseases tend not to travel over TCP/IP” … not yet anyway

yeah, the only non-gpl stuff in java6 was graphics-related, mainly font rendering

. o O ( and yes, I realize that covnersation was hours ago )

can you provide a test case?

Has java6 leaked down to deb testing yet?

and yes, streams are FIFO

Fanook, its a couple writes and the subsequent reads from an applet to a servlet and back
so i think that would not be very clear to send the source over..

I know I asked before…
but how do I get one ant task to depend on a task in another buildfile?

use a depends=”…” attribute
ant.apache.org/manual

exponentially? On what scale?
Don’t you hate seeing technical words misused just for the way they sound?
My personal peeve is “parameter,” which seems to have been taken by pundits everywhere to mean “constraint.”
“We need to make sure this new program falls within the financial parameters.”

what, you don’t hear the implied “acceptable”?

I hear someone who is thinking “constraint” and should have said “We need to make sure it doesn’t cost too much.”
Or “bounds” or “limits”

DeVries must die…

Chocolate makers, or PR agency?

game programming college

Ah. Taking poor children’s money, pretending they’ll get a job playing games.

and i use ‘college’ in the most loosest sense possible
that was a bit redundant, wasn’t it…

I should start a college where people can study the effects of cocaine first hand.
Might need to put that offshore somewhere, maybe on a boat…

DUDE! Robot Chicken Mythbusters!

we’d love to show you the next great video game
there’s just one problem…

there’s no way in hell we’ll produce it

my boss at work was like ’so i was talking to an old friend yesterday and apparently her son is majoring in ’simulation and game programming’”
and i was like ‘haha he isn’t going to devry is he?’
and he was like ‘yeah actually, that was the name of it’ and i had to apologize because i was laughing uncontrollably

It will prepare him perfectly for a life of disillusionment and poverty.
Good grief. Those guys are everywhere.

i feel bad for the students, i really do.

This is very sad, indeed.
They seem to have a great many lawsuits against them too.

so on the other hand it’s hard to feel bad since two seconds of googling will reveal what a scam it is

I guess they don’t require familiarity with the internet as a prerequisite.

good point.

hm, not that easy to tell from googling

a recruiter made fun of MY school and it’s an actual accredited university with a well respected comp sci program. i can only imagine trying to get anywhere with a devry ‘degree’
google ‘devry scam’ and it’s painfully obvious that the validity of their program is in question at the least

ah, definitely that. the site seems to whore the initial google results with its subdomains, however

there are days i think programming should be a certified profession

Wow, not that i’d ever touch devry, but wow.

eh, who would do the certifying? The government? /me shudders

the problem isn’t always so much the programmers but the process.
we sometimes get hardware in one day and it ships out the next

treat it like engineering

the code runs on it? great! that’s life in a startup

hm… that’s not so bad of a system.

half the problem is that “programmer” is a pay grade in some companies

when you’re trying to get product out there so you can raise more funds, it makes sense. but it doesn’t guarantee stable firmware :P

sweet leaping jesus, devry’s wikipedia article even mentions it

haha

http://www.secinfo.com/dsvRm.v9xh.htm#8051
that
’s failure right there

hm
In ant…
if I run another ant task inside this file…
do I inherit taht ant file’s properties?
And if I do, how do I reference them?
${ProjectName.propertyname}?

“The company claims that these legal procedures are incidental due to the nature of this business.” yes, the scam business does lend itself to that

Bell and Howell…that’s surprising to see there

it’s amusing.
why did he quit to say he was away?

does anyone know where the default classpath is defined in ubuntu?

you shouldn’t rely on a global classpath

how would i change it for something like tomcat?

in the configuration.

i really don’t want to change it, i’m mostly curious where and how it is set

java -cp .:path/to/file1.jar ClassName
javac same thing

maybe i’m misunderstanding java, itself… how does the vm and compiler know what classes are available to it?
the ones that come with the jdk

you tell it via the classpath

~tell jerbear about classpath

jerbear, 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

the standard libraries are automatically found. everything else needs to be on the classpath

so something installed separately like derby, would need to be added to the classpath?

the “.” means look in the current working directory the colon is the delimiter for seperating jars

on unix

it’s ‘;’ on windows i believe

yep

he’s using ubuntu, which is why i used the colon specifically
but jerbear, read that link

which? both?

both
http://java.sun.com/javase/6/docs/technotes/tools/solaris/classpath.html

derby/javadb is available via apt-get in ubuntu, but it’s not available without adding it to classpath… just making sure i’m not doing something wrong
thanks guys

svm_invictvs, gently rub your temples and think of a pleasant country scene

~comfort svm_invictvs

how do you reference a property in a different ant file?

this is a silly and masturbatory question, but what’s the best way to find out how many lines of java exist beneath a subdirectory on linux?

wc -ls $(find subdir -name ‘*.java’)
that should do it
of course, that doesn’t strip out comments or empty lines
does that help. __david
?

yes
sorry
I got distracted

cool

I had this, so far:
find . -name “*.java” -exec wc -l {} \;|cut -f 1 -d ” “

that’ll do it except you don’t get a summary count

wait, no
-s is invalid
hm
or maybe it worked

if you have many, many, many files, then my method will fail due to exceeding maximum number of command line args

it worked! thank you

np

not that many files
but its 8.3k lines
and I wrote it all by myself

nice work

thanks
thank god for ide’s, though

lol

without “find usage,” i’d be useless
have you ever used groovy?

hm. find usage is javadoc, no?

i have not

gracenotes, it’s an ide function
you right click a field/function/class/etc, and it tells you every other file that refers to it
and it knows about scope, and it searches nearby contexts for comments too
I’ve been investigating groovy

ah… the API usage charts are non-automatically generated

i use it for internal checking
like, I make a map, and i want to reverse the param order
so i find usage all the code that touches it
and i can hunt down all the references in every file that uses it
Here’s a least-worst practices question
I’ve got a variable which is currently static
public final static
and I want it to be loaded from a config
what’s the best way to do this?
it is used in 23 places, so a rewrite is out of the question. The users can recompile if they want to change it that bad
would a static{} block be horrible?
or would it be better to integrate into the framework?
(the program has a framework)
actually, it cannot go into the framework directly, due to a one-way dependency
so would an interface abstraction be acceptable?

this might work:
public static final ClassType obj = loadObject();
private static ClassType loadObject {
and then code, closing brace, etc.
not sure if that works for you. .
s/loadObject/loadObject()

the problem is this:
The gui code needs a number to render itself
it is currently hardcoded (the number, that is)
The only configurable stuff is stored in the model code, which doesn’t touch the gui
the gui could store the code in the model, but the dependencies would lead to even more astoundingly ugly code

if an object of class A needs to have a reference to an object of class B, and that is required and should not change, is it better to have a B argument to the A constructor, or have a default constructor and a setter for the B object?

both
do this:
public SomeObj(A foo){ doStuff(foo);}
public SomeObj(){ this(new A()); }
and add a setter
it’s 3 lines more

um.. I mean public A(B foo)

A(){this(new B());} A(B foo){doStuff(foo)}
you can chain constructors
so that you only fill in the most advanced one

new B() in A’s constructor is not acceptable

and the other just call the more advanced ones w/ defaulted arguments

B may be an interface

the “new B()” is just a mock
so that A can properly initialize
does A _always_ need a reference to B?

if A has a default construtor, it can not construct a B object
well, it may not need it immediately

if A always must have a reference to B, then disable the default constructors

A can have a start() method

what does the start() method do?

it means A has to be initialized before calling start()
so setting the B reference can be deferred to a setter

can you come up with a usage scenario where it would be useful to defer setting B?
b/c A does some pre-init work, or something?

I’m thinking IoC
I’m not sure there is such a scenario, but I’m wondering if I should allow for it

(p.s. i hate working in complex VMs, where you have to create scoped global, static states)

~pastebin

http://pastebin.stonekeep.com

in a complex situation, both A and B may need a reference to each other (although that may be an indication of bad design)
and that can only be done by using setters

hmm
i would use the constructor form
one must be created before the other

anyway, doing both is an idea, to have the greatest flexibility

I generally err on the side of flexibility

then I can change my mind later

it’s a small cost
but in the future, you may appreciate it

yeah

I have 8-10 object deep dependency cycles
it’s horrible
i feel dumb, until i assure myself that it’s okay b/c they’re so deep that they were impossible to predict

so.. A(){//the B ref is left null} A(B foo){this(); setB(foo);}

that would work
you may want to do it the other way, however
generally, the constructor w/ the most arguments should get the code
and all the others pass it fakes (incl. nulls)

well, I can’t create a B out of thin air
oh

just check if B is nonnull before acting on it

that can work too

so you have A(){A(null);} and A(B foo){if (foo != null {doStuff(foo);}}
which is more verbose
but if you decide A needs another argument
you just add it to the A(B foo) constructor, create a new 1-arg constructor, and fix the zero-arg one

it will eliminate future code-duplication or icky-refactors in the future

Why would my compiler reject something like this.map.getFoo()?

no ;

“[Interface type] cannot be dereferenced.”

The eclipse compiler seems to find it okay.

how did map get its value?

initialized in the ctor

ctor…i’m not familiar w/ this abbrv

Constructor

if the eclipse compiler finds it okay then which compiler rejects it?
also, pastebin

this might sound dumb
but try a clean & build
those fix a lot of weird, weird bugs

javac
Unfortunately, I cant’ paste the code

ant is imperfect, and clean fixes it
assuming you use a partial rebuild tool

“Recompile with -Xlint:unchecked for details”

you could make a simple test case; anyway, try clean

What is -Xlint

lint tells you more errors
-Xlint:unchecked tells you about things that normally don’t matter
or sth
it’s nice
you get more information on the error, regardless

I’m wondering why the hell this fucking doesn’t work
I’m gonna just manually javac it..

did you clean and build?

it warns you about unchecked conversions, I think they happen with generics

yes

did you use xlint:unchecked?

mabe the eclipse compiler is configured to be more tolerant.

Yes…
Well, waht is is is really bad code.
Because it was written by a fucking idiot.

no raw types, svm_invictvs? :

paste the output of xlint:unchecked here

(configured as in compilers settings for the project)

So, it works with eclipse, but javac doesn’t like it.

that statement makes no sense to me
I thought eclipse uses javac

What makes no sense?

when it compiles things

and perhaps you have a java level version difference, too, so one compiler goes for java 1.4, while the other goes for 1.5

no, eclipse has its own compiler

it has it’s own compiler as far as i know. hence the difference in error messages between the two.

it doesn’t even require the jdk

are you using any of the following: generics, runtime-loaded stuff, introspection (reflection)
and are you sure you can’t pastebin the code after a bit of obfuscation, or only give us 2-3 lines of context? surely, not all of it is sensitive info

Yes, generics. Let me show you a snipped of what the code basically does.

possibly related: http://www.google.com/search?hl=en&q=eclipse+configure+compiler+warnings&btnG=Google+Search

does entering a try{} block cost anything? i.e. if if(){try{}} or try{if(){}} any different if the if block is never executed?

http://rafb.net/p/NBKmVZ88.html

you could profile it

That’s what’s doing,
Forcing a downcast w/ genericds.
I didn’t write this fucknig code.

that cast needs some more brackets

That’s not the problem.

So…. what’s a good free book on java?

It’s failing on when I actually use taht function get()

A get()”

also the method doesn’t return anything

I dont’ know, I ddin’t fucking write it.

you should only need the “A”

in the method signature, the error may dissappear

try that, i think it will work

tried that

unless the code has a deeper zen i’m not currently grokking
what’s the error when that goes away?

It’s failing not compiling that.
It’s failing when I use a function that dangerously downcasts like that.

hmm
you should be abl
you should be able to cast it since it’s explicit
are you sure that every Super is a Sub?

yes, I’m sure

you might use an if (blah instanceof SubClassType) return getItem else throw exception

That’s what doesn’t make sense
You can’t use generics in an instanceof operation.

I hate generics
you use the get
get an object
see if it is a subclass, too
if it is, return it
follow?

did the manual javac also fail?

http://rafb.net/p/dGU2QV24.html
i’ll assume for a moment that what I posted fails too
clean build, and try again
then, tell me if it still fails, and if it does, on which line?

that will only work with one subclass type

what is the get method doing?
is it returning different things based on how it was constructed?
if so, i don’t know enough about generics to continue

i seem to recall a discussion about generics which concluded in “generics are straightforward if you use the provided generifed classes. if you create your own it becomes slightly more complex”

yes

can you make a test case? that is, complete and compilable (by eclipse)?

Comments off

nimopal could you please just give me a hint what exactly do you mean You mean that as a quote missing or issue

I have serialized data that wont get unserialized.. what could cause this?

any change to it at all

or “picnic” error problem in chair not in computer

ID10+

eye dee ten tea problem

ID10+ or ID 10 T as ID10T

the data should not be changed :/ the weird part is it works sometimes.. and when it dosent pressing f5 for 30 seconds or so and it works again for a while

didn’t knew EBKAC yet

something is causing it

obviously

reduce it to a minimal test case

lal, Layer 8
strange, Layer 8 is used in the cisco OSI
in fact, cisco goes for 12 layers
iirc

kinda hard .. its a template engine for typo3 thats messing up
*sigh*

been a while since I did that exam _

debug the path which the data takes. So at each point check the data can be serialized and find out where it is being corrupted.
debug the path which the data takes. So at each point check the data can be serialized and find out where it is being corrupted.
You really should base64_encode the data though, to be sure that the characters in the string aren’t being “escaped” etc
Sounds like you’re making you’re life very difficult though
try finding a better way of doing what you’re trying to do
your*

true, if you can pass the serialised thing about, you should be able to pass the structure itself

indeed, you should only serialize when going into a database

Mace[work]: It’s not me.. its templavoila – a template engine I have to use – that’s doing it.. and its being serialized when going into the database and it wont be unserialized when it comes out it seems

it’s probably being escaped or such. base64_encode it

Hi everyone
does anyone knows how can i show a div only if /file.php?div=on is set?
thanks

omg read reciepts parsing is a bitch

Mace[work]: if it was only that simple.. I can’t *just* make changes to templavoila.. and even if I could it would be huge task to change the way it stores its template structures

you’re telling me that templavoila requires you to send serialized data that hasn’t been base64_encod’ed to the database? bull****

Mace[work]: I’m trying to load a template IT has stored which wont load… I’ve traced it back into templavoila where it actually fetches the data from the database and unserializses it
and no, it dosen’t base64 encode it

what happens when you copy the string out of the database and try to unserialize it in a clean environment?
i’m not surprised these things are often not worth the time – what i meant was it won’t prevent you from doing so

Mace[work]: ill try…

guys is there something to render an XML object obtained with simplexml_load_string back to string ?

did you try echo’ing it?

f00li5h, it doesn’t work

oh well

hrm, anyone have (or know of) a code library that can generate rich text -like inputs (e.g. a blogging application) ?

*nuke include one, i forget what it’s called though.

i could write one, i just dont really want to spend that much time on it.
i was thinking about checking out wordpress
and doing the appropriate amount of raping/pillaging
just wanted to know if anyone had suggestions, before i get too far involved in this project, and run out of liquor.

spaw.

?
nm, i jfgi’d.

it’s not that hard to type whole words.

yeah, but i would have probably been banned for the ‘f’ in that acronym.
i know, i op in allnitecafe on undernet, i spend 3/4 of my day teaching people about the difference between ‘ur’ and ‘you’re’

and the difference between something in single quotes and a parse error?

touche.

2

Liquid-Silence: mktime()
and subsequently, date()

Liquid-Silence, take also a look at strtotime()

Anyone recommend a good dedicated hosting provider?

me

Noparse, exportal.pl

I need one that accepts paypal and could setup a 3-server cluster with load-balancing for me.

anycast?

if a checkbox on an html form is never touched, then isset will return false right?

Anycast?

Noparse, check servage.net
they do custom clusters

hi

the browsers submit the value of checked checkboxes only

Nomark, 1 router, 1 IP, connections are ballanced over the 3 servers behind the router

any php form generator people recommend

dingo, yeah, look at the end of your arms
I’ve been using the “Hands 1.0″ form generator for years

so if it is untouched then it won’t exist int the get or post objects at all and thus will be unset, correct?
*in

Would prefer a hardware balancer but whatever works.

Noparse, whats your budget?

I want a quote.

I belive that is the system most DCs will use

of course not

Money isn’t really a issue.

but not unset – it just does not exists – that means undefined

hi guys, i’m having issues with www:dlashneta.com/work/magura … problem is a session var, but problem only shows up in ie. could someone please assis me further? i don’t wanna start explaining the problem in one whole line
www.flashneta.com/work/magura *

it’d be easier if we could see the source

i will pastebin it … one sec
http://pastebin.ca/647303
i can paste you the whole thing … but i think it’s useless

how much does a php web hosting programmer earns in england ? or europe?

mooooo

what’s happening is … i check if index.php is called with additional get vars, if so … i compare them to values in an array, if no match is found a default value is set, if the get var is not set but the session var is … the session var gets unset
i do this because i display content in index.php wether the get var “cat” is set or not

are you calling session_start before accessing the session?

yes

k
thats cool

i call session_start right at the top
of the code …

yeah thats good gotta use that

i allso call session_start(); in prod_details
Undefined index: cat in dwork\magura\site\prod_details.php on line 4
$d = dir(“./img/produse/mari/”.$_SESSION['cat'].’/');
so i’m just using the session var
however it appears to be a problem only in IE
sounds pretty illogical to be since php code is server side
if i comment out the if(isset($_SESSION['cat'])) unset($_SESSION['cat']); line in index.php … the code works errorless
but then i won’t be able to get back to the homepage ever …

!tell Suskcelom about enter

ow … um .. .yeah … sorry about that.
so, this is the issue i’m facing, any ideas guys? i ran out of them … i would apreciate a solution for it … workarrounds i could find on my own … or if there is no solution at least an explanation why this is happening. thank’s a lot

before reading $_SESSION['cat'] gotta ask if isset($_SESSION['cat]‘)
it could be a new session, so cat won’t be set yet

prod_details.php is not called anywhere else on the website but from that spot, i could do a if(!isset($_SESSION['cat'])){die(‘bla!’);}
but that still wouldn’t solve the problem.

php is saying ‘cat’ doesn’t exist with that error

and to get to that spot … where you have to products list, you have to first click on a product, this implies setting the session var
yes
but how come it’s saying that only on IE?

maybe sessino_start isn’t set somewhere

it is set in both files

is IE accepting the cookie?

there is no coockie
or at least i;m not setting any coockies … (does $_SESSION set any coockies?)

yeah session_start normally arranges for a cookie to be sent at the end

well i can change the prefences of google.com and keep them stored on my comp .. .guess it’s accepting coockies the way it should be.

Hey! What else could be a cause for getting syntax error, unexpected $end in line xxx besides missing curly brackets? (I have all bracetks in pairs so this I belive can’t be it)

unbalanced quotes

while the file is being saved it can also happen

and it can read the session vars pretty ok .. because the same $_SESSION['cat']-using code in prod_details.php works if i comment that unset line in index.php
so the problem must me there somewhere …. but i don’t get it

nimopal, could you please just give me a hint what exactly do you mean? You mean that as a quote missing or issue with single and double questes (or god forbid both possibilities?)?

matic, yeah like missing a closing quote

Okay, I’ll recheck for that, thank you

might it help if i pastebin the full code of both pages?

yeah Suskcelom
Matic`Makovec, sometimes it can be good to just delete chunks of code till the error goes away
then u know where itis

so here is index.php: http://pastebin.ca/647316
and here is prod_details.php: http://pastebin.ca/647320

I’m actually commenting it out right now but yeah

so u click index.php, select a category, then select a product.. rite

ya, when selecting a product i got to prod_details.php … so it shoudn’t unset anything
i don’t know … it’s at least weaird for me … :P
weird*

yea weird
seems like IE isn’t taking your cookie

like i said … if i comment out that unset like … it’s working … so the coockie IS beeing set …

somehow you are reaching prod_Detail.php without clicking a category.. or you’re hitting index.php in between

hm, ok, but how, when? i mean physically i don’t … that’s obvious
anyone alive in here except nimopal, i could use anyones opinion on this…

what is the function that can sanitize HTML.

strip_tags() htmlspecialchars()

i could set another get var and only unsert $_SESSION['cat'] when that var is set, but i didn’t want to set another var for this thing only … when it fould have been done like this …
could*

AlexC_ thanks

nad besides, it’s allso interesting to know what’s cousing the problem …

http://www.pennergame.de/ref.php?uid=1521

createthumb(‘img/$userid/$name’,'img/$userid/thumbs/$name’,100,100);
is this ok?
to call a function?

no, logik-bomb

meow ~.~

hey ^^

hey AlexC_ :P

how should I do?
echo?

the arguments sent will be just that – img/$userid/$name – you want createthumb( ‘img/’.$userid.’/’.$name,

logik-bomb: variables in ‘ are not replaced

how are you, foutrelis?

any ideas on doing a regular expression check on a string containing newlines ?

Pretty good. :] And you?

thanks

sismeiro_ olá

^^ I’m good, yeah I’m working on getting the forums up :P

ol
aola
ola
:P

estás no escritório?

yap
está cá o BIG

eu seu
eu sei
com a galega
:-D

yap

ah, nevermind

createthumb(‘img/’.$userid’/’.$name’,'img/’.'$userid’/thumbs/’.$name’,100,100);
ok?

no, logik-bomb
re-read the example I gave

ok
createthumb(‘img/’.$userid’/’.$name,’img/’.'$userid’/thumbs/’.$name,100,100);
:X

logik-bomb: You need a dot after $userid

and no single quotes around the vars

logik-bomb: And after $name

syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

logik-bomb: ‘this’.$foo.’bar’.$car;

logik-bomb: get an editor that has syntax hilighting

vim
vim vim vim vim
im a vim advocate :P

createthumb(‘img/’.$userid’/’.$name,’img/’.$userid’/thumbs/’.$name,100,100);
i think is this

createthumb(‘img/’.$userid.’/’.$name,’img/’.$userid.’/thumbs/’.$name,100,100);

thanks

np, now get vim so you wont have this problem again

:set ft=php
:syn on

with the right vimrc syntax should be automagically setup once u load the file
uwith the right vimrc syntax should be automagically setup once u load the file /u

Comments off

newbie question what is the difference between global and static variables only that global ones I understood

linux is full of nice and useful apps

Yup!

extract all inks from the page, replace them with a hash, then stash the hash-to-url mapping in the session

f00li5h, nah, all the content, just output the javascript to decode the content
with hashed urls

@f00li5h – The memory usage of all the sessions would kill my server o.O

why have javascript?

so that content based blocking on the proxy won’t work

@HarryR – Perhaps I should just use SSL?

I’m on Linux now
I’m on linux host now
What was the name of the programm i should install?

how can I remove extra newline character which i am getting from DB

Although then that limits it to things that can use the https protocol :/

exactly Tobias|

why does it limit you to https?

because if an organisation has a strict proxy policy, they might stop https as well, or proxy the https and do content filtering on it anyway

SSL works on the https protocol

yes, but that doesn’t mean you have to limit the things you proxy to https, does it?

?
Nonono
We’re talking about running the actual proxy on the https protocol

nah, it means that it limits people accessing your site to those with unfiltered https access to your server

yes, i know that

ssh -ND port_number

kregexpeditor

thx

It should help you writing regex.

ok, thx

Anyone here familiar with SPL?

anyone here PRO in php + mysql (update a table)
?

what is your question?

quite long to explain here

Lol

try a pastebin then

http://pastebin.ca/644206 – this is working fine
i want to update another table , so i just go there , change all the values that i want to my table , and i can’t put it working

how does safe_query work?

1 moment
http://pastebin.ca/644207

how does that make it ’safe’?

that’s not really the questoin is it?

and why do you die if when there is a union?
actually, i ask for a very simple reason, you’re not escaping $id

i know , but i dont mind on security now
i just want to put that working with another table

it’s not about ’security’ it’s about your software ‘not sucking balls’
you can’t even accept things with ’s in them without your application breaking
and since that’s used all the time in english, you should fix it

ok , u’ve made ur point , now table?

i just re-read your question for the 5th time, and I still don’t know what you’re talking about
(wow, look at all those ’s)

f00li5h’s point is very good :P

that’s right.

i didn’t said anything against that

what is your question?

that this is updating prefix_linkus right?

yeah, should be

i want to update prefix_movies

so you have to run a second update statement
no, fix your sql hosting injection crap first

“mysqli_prepare() returns a statement object or FALSE if an error occured.” how do you find out what that error was?

call mysql_error()
boop

I’ll try that
exactly right, thank you

sure thing

Hi
am I right to see that FastCGI and an Accelerator are two different things, and for optimal performance I should use both?
or are there some incompatibilites?

more or less, yeah
fcgi keeps a single php web hosting instance running
the accellerator will cache compiled scripts in memory, so php doesn’t have to re-parse them

ok
what accellerator is recommended?

APC is the only one that comes to mind

exit

ok thanks f0
f00li5h

ive found that xcache runs pretty well older (crappy) code

hmmm is authentication that simple? http://www.php-mysql-tutorial.com/user-authentication/basic-authentication.php I mean just one session variable? :P

yes foutrelis.

w00t! :P
nice

knowing who someone is the easy bit, it gets more tricky when it comes to deciding what they’re allwoed to do (authorisation)

How does myspace assign http://www.myspace.com/MEMBERNAME to a profile? is it through Apache? or PHP?

You’re right. I’m trying to do a basic login/logout script for the moment :P
s/for/at/

it’s likely done with mod_rewrite

thanks for pointing me in the direction

they’re not

hmmm

the cookie is a unique hash, which php maps to a session file on the webserver
it recovers all the session cruft from in that file (on the webserver) where the user can’t get it

oh I see. Cool

you should still avoid keeping sensitive stuff in the sesion though
(like creditcards, passwords etc)

foutrelis, i am a newb, but the “changing” — that could only be done on the machine where the sess_ files are at, right?
or if i am over my head its cool lol ill come around

Thanks for the explaination f00li5h. I’ll read some more on php.net/manual/en/ref.session.php
:P

How hard is it to compile php?
I’m used to apt-get’ing it but I need support for fastcgi

its probably in apt-cache search cgi|grep php -i
i prefer to compile hosting apache. i still dont entirely understand how myself but it works. like
compiling as cli first, then recompiling as cgi

yes, they can only be changed on the server

I’m not sure, but f00li5h pointed out that the session files are stored on the server

but an exploit in your code could allow people to read them out

xeon9_ php5-cgi ?

yea
ive never installed apache and php web hosting as binary
from aptget
but i guess it can work too

so I should diss libapache-mod-php5
ditch*

i wouldnt mind running apache2 and php5 and php5-cgi all binaries from apt’s repository… as long as it was secure

and install php5-cgi which is used for mod_fcgid ?

where if there was a vulnerability it’d be included in apt-get update
but things can get complicated w/ custom apps so thats why i just compile apache and php myself
manually
and dont use that shit from the distro

so how hard is it to recompile?
compile*

you compile crap from source on a package managed distro?
not at all…
wget $source && cd $dir && ./configure && make test && make install && make clean

ah yes, that sounds familiar
but I’ll need to know all the options then though?

hello, newbie question… what is the difference between global and static variables? … only that global ones. I understood global can be reasigned and static are like global but only can be set once. is that the main difference ?

then use the one from your package manager

Hi all. Is php5 web hosting considered thread-safe?

yeah, but the extensions aren’t always

so mostly threadsafe

is oci8 ts?

hrm? sure

actually my problem is more apache2 related…
I need multiple XMLHttpRequest from the same host to be executed concurrently.

why concurrently?

so I need worker MPM (I think), so I need PHP with ts Zend

why not just run the 2 queries in the same transaction

because I want the page to load dinamically
it presents data that can be read by user independently, but full batch queries would take too long
call it AJAX
I’m not even sure worker MPM could help, really

ste, apache can handle multiple connections

they’ll still be waiting the same ammount of time

ste, your client-side stuff just sends off two asynchronous requests, and the web server will likely handle them in parallel

no, pre-fork doesn’t

yes it does..
what’s your reasoning that pre-fork doesn’t then?

you compile crap from source on a package managed distro?

theres no one way to do things

no, really. If a pre-fork is busy with a request from host A, it will block any other request from A until the first is finished

and i am perfectly happy to run debian w/ custom kernel and custom compiled apache, php

ste, most web browsers allow 2-3 concurrent connections to the same server, which means that you’ll have 2-3 apache children or threads handling requests

by ‘block’ I mean it ‘hangs’ them

if you go over that limit, it’s likely the web browser stopping you from initiating more connections

there is, but why even use debian if you’re going to ignore apt?

not in pre-fork, which is not multithreaded

ste, *sigh*
apache it’self can handle hundereds of connections from the same ip address/client if the client allows it

uhm

prefork can handle multiple connections because it spawns of X number of workers, instead of X number of threads

I’ve read that it’s prefork that handles requests from the same host with the same worker
browser is not involved

you’re misinformed then…
if it did that then most load testing applications would be useless

Comments off

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »