Archive for Uncategorized

how often will your average english author were talking fiction or news papers or blogs or something not math

because i want reliable data

native language is not encoded, you do not have to decipher your native language

There are tons of databases people buy

so my client can buy it and i can be confident i didn’t make him buy crap

brian, coords to miles is a constant, you can either use a cricle or do approximation with outer/inner squares

you *do* have to decode symbols with computer programming, like / means division

rofl… you don’t decode/encode the english language? :-p

that’s an extra step during the reading/writing/understanding/creation process that does not occur with natural language

ekneuss, i suck at math

When you hear the. you don’t have to decode the context?

it’s an *extra* step

ekneuss, i mean, i’m not very well educated in math

dude, look up the definition of code some time

There are 10 extra steps in native languages…. take into account the source, the pitch, the tone, the context, etc.

just the word code, in general

ekneuss, what type of algorithm should i be looking for in google

brian, well, you’ve an X and Y coordinate, square approx means that the difference between the two X and Y ccords have to be less than Z (calculated)

whatever, you just don’t wanna see my point. i see yours.

I see yours.. I just don’t agreee?

X – Y Z?

ok then we’re both right, ala einstein
together the answers we have conflict, but the only truth lies when both answers are correct, but i don’t really wanna do the math right now

sqrt((X1-X2)^2 + (Y1-Y2)^2) but also more difficult to compute

lol abstrakt it’s fine I see your point.

k

brian, no, ABS(X1-X2) Z && ABS(Y1-Y2) Z

i’m just not sure how to store the data

just to beat a dead horse, you’re telling me it’s just as easy if not easier to understand “sqrt((X1-X2)^2 + (Y1-Y2)^2)” as it is to understand “hello john”

and implement it programatically

that’s math..

that’s language man

math is it’s own language.

computer language
exactly

I am going to come up with a solution I’m sure…

hold on.

math, a language to describe them all! :]

computer language includes not only the language of logic and flow but the language of math as well

I just want a good database of US city and state longitude and latitude coordinates

http://www.duxbury.com/statistics_d/templates/student_resources/0534377556_woodbury/artfinal/Formulas/Formula%205.jpg

I’d prefer if the database hosting was from a US government agency

that trumps c# or php or most languages you do in a computer
and that is not a comptuer language

not really, because you can do all that *with* C# if you want to

is a constant like a variable which you can’t change the contents of?

computer languages have the inherrent capability to express mathmatecal language too

drkm, basically yes, it has a different scope too

How does that support your language? English has that capability too?

some have “more capability” than others sure, but still

drkm, and you can’t store anything you like in a constant, only scalars

I wis the post office had longitude and latitude data
if anyone has correct data for us city and states and zip code it’s usps

think of it like this.. native languages both support and encompass ALL other languages and levels of communication. Thus making it the MOST complex, robost, and scalable language to ever exist

how often will your average english author (we’re talking fiction or news papers or blogs or something, not math texts) use or have a use for math language like that? now how often will your average computer programmer have a use for mathematical language constructs?

Without native languages you wouldn’t have programming and without them you couldn’t explain programming.

whats a scalar?

So is your debate that a programmer is more intellegent and mathmatically inclined than an author? Or that one language is more complex than another?

whatever, you’ve gotten in to semantics, i was expressing a simple point that makes perfect sense and that point was meant for a specific person.

drkm, take a look at php.net/constants

my point is that reading a computer program is much more difficult and requires much more mental processing for your average person than does reading a fictional novel

I agree that programmers are usually more intellegent; but complexities of languages…. native tongues take the cake.
I agree whole heartedly.

you’re getting all nitpicky on the fact that i said “complex”

that’s the only reason i said otherwise in the first place

how can I call on an class and have a switch within that class to call on an extension of it?

It takes more brain power to learn english then it does php webhosting syntax.

and in that sense that i just described… yes… computer language *is* much more complex than the language in a fictional novel

now to be a good programmer… that’s another debate.
NOT THE LANGUAGE :-p
Programming is more complex than authoring.

in all the other senses yeah sure, definition, denotation, context, subtext, implication, tone, voice, audience, purpose, intention, etc etc

mathematica gives you programming language that allows you to do a _lot_ of maths, now is maths more complex than native languages ? I believe so

i think math is the most complex language to exist.
but i have a hard time rationing that since native tounge inspired & encompasses math
na mean?

dude, just in the sense that I’m talking about, yes computer language is more complex because it is basically a form of math that deals with the logical progression of events and values

take out language and substitute computer with programming :]

and there’s an extra level of encoding and decoding that people have to do that they don’t have to do with their native languages
k, programming language

your killingme

joshteam, well, put the checmical reactions that produce language into equations, and we obviously have a winner

there, now it’s done

?

EVERY language has encoding/decoding… EVERY single one.
english, german, php, music, math, etc.

but there’s an extra level in programming language
yeh and there’s an extra level in music and in math

i have read it + i also know Depesz’s method (all connections) and i don’t know

is it possible to use php as a wrapper for a script written in different language?
a* different

which language?

levels that are beyond your *native* language, and in the same way there is an *extra* level in a language that is NOT your native language

it’s in perl

why would you want to wrap perl w/ php?

joshteam and it’s a module for my forum

e.g. if you’re a native english speaker and you learn chinese, there’s an extra level of encoding/decoding that’s going on

Exactly absstr

joshteam that’s because my forum takes php scripts only and i have no idea how to force perl in there

robboplus, you sure can get the perl result “under the curtain” by using shell_exec and the like

joshteam while it would take a while to rewrite it in php

i don’t really care discussing more; just agree to disagree

yah, i’m with you on that at least

robboplus, what are you trying to do with perl

ekneuss hm so shell_exec would be the “wrapper” allowing me to run anything

hmm – I have included a .php file within an existing one, though the text is just being outputted, and not processed….

brian i’m accessing mysql several times and doing some fancy stuff with the data, then returning results

robboplus, you can call whatever interpretter you like with that, and fetch its result, yes

are you sure you’ve got php inside your include() file?

robboplus, why not just make the perl script run indepdent of the PHP

ekneuss thank you, i will read on the syntax and try to wrap the thing
brian hm
brian the forum engine accepts just php hosting files or at least i think so

not to mention it’s often perfectly desirable to have an include() produce output

it wants me to give the full path to my .php script – name and all that

robboplus, don’t worry about the forum engine.

include ‘file.php’;
one sec…

brian do you think that i would be fine just forcing blah.php on actual perl script?

robboplus, no

hm

robboplus, i don’t think that would work very nicely

Hello, I get debug error “Creating default object from empty value” at line 100 in the following code — http://pastebin.ca/638403 . I am new to php, any hints? Thanks.
$this-replaceable_data[$i]-string is wrong?

robboplus, why is the script in perl?

brian but then you said that i shouldn’t worry about the forum engine

robboplus, what does the script do?

$tmp_string is not empty, I can see in the debugger

brian that’s because i use perl more often and it’s easier to use perl for me
i just adopted some work i had done last year – took me 10 mins

robboplus, ok well

it basically talks to mysql and does some fancy stuff after

adapted?

robboplus, don’t wrap perl in php

yes, adapted

robboplus, let the perl script be independent of the php and ask #perl if you need help running the perl as a CGI

hm
brian it’s not exactly about CGI

I added it, and it nows works. weird how it was referenced in another file, and outputted fine…

robboplus, how do you figure
robboplus, you are making this a lot more complicated than it actually is

brian let me explain

… so it was supposed to output? or it wasn’t supposed to output?

robboplus, explain then

in the other file it sent output and then in this file it sent output and then you were confused that it sent output in this file?

it is going to work as a module for a php based forum script (vB)… and what i have to do is to give the full path to the php file which does the job… so what choice do i have?
it just wants me to show the module and the file has to be .php

!tell robboplus about g10
call vBulletin support

in both file1.php and file2.php (in different sections), I had: include ‘extra_code.php’;

abstrakt that’s beyond their support
abstrakt reading up…

well it’s beyond our support too

extra_code.php didn’t have and ?, though it worked with file1.php, though not file2.php

we don’t support vbulletin host or things like it

abstrakt that’s absolutely wrong what you just told me

you’re asking a question that only the vBulleting devs can answer for you?

doesn’t matter.. i asked a simple question – how to efficently wrap other language with php, right?

wtf? what exactly did i tell you that was wrong?

and you are suggesting that i’m HACKING something, i’m not

sure but your question is vBulletin specific and has to do with the fact that this situation has arisen because you’re using vBulleting
wtf? you are way off base man.

… n/m

i told you one of our chan guidelines: we don’t support scripts

i don’t want your support for a script
i asked nicely how to wrap a perl script with php code

if you are hacking (in the sense of modification as opposed to cracking) vbulleting and you have a direct question about the PHP code that you’ve written we’d be glad to help

what’s wrong in this?

robboplus, i told you not to worry about the forum engine
robboplus, this is a perl question not a php webhosting question

abstrakt man… i’m WRITING my OWN module
i have a legal copy etc.

what’s wrong is you don’t have any code yet to show us and you don’t actually have a question about PHP code that you’ve already written
good for you, show us the code and tell us where the problem is

you talk too much and it really doesn’t make much sense, that’s pure flaming what you are doing now

then we can help

robboplus, you are breaking the rules buddy

um, no it’s trying to get you to ask a question we can actually support

you don’t even understand what i’m doing and you make false assumptions

and you seem to be the one getting angry about it

robboplus, we know what you’re doing

no we don’t understand because you haven’t shown us any code

robboplus, your problem is vBulletin-specific

brian so again, what’s wrong with shell_exec?

brian++
vbulletin specific
nothing, you tell us… then maybe we can help you

robboplus, you shouldn’t run perl within vbulletin

brian and why not?

robboplus, you should run it independent of vbulletin as it’s own CGI script and it’s a perl question to be asked in #perl

it’s all about a simple mysql job in there
ok thanks brian.

robboplus, can you stop overcomplicating this problem?

dudes, calm down :] robboplus, with the functions at http://php.net/exec you can execute whatever perl script you want and get its output as well

doing a “simple mysql job” is pretty darn simple in PHP

robboplus, and i really don’t recommend executing perl within php

foutrelis that’s what i needed to hear and those guys are trying to confuse me, many thanks foutrelis

i know PHP and i’ve had to modify perl before, but i didn’t go and try to get Perl to run PHP, i just learned Perl
they’re very similar languages

abstrakt, he wants to do it the stupid way so whatever

yeah obviously… so whatever
heh, sighs even

abstrakt, we can’t get everyone to use good practice i presume

but there’s a particular digitory sign i could think of that would be appropriate for this situation
just more proof that #perl is assholes :P

When testing if a certain button was pressed in a HTML form, how come i see all the examples use isset($_POST['button_name']), when one simply can evaluate if the key “button_name” in the POST array exists? I don’t see why this is a problem, unless people assign the value of the submit button
to false (which makes no sense?)

my guess is “writing the script with PHP” and not “wrapping a perl script with PHP”
um… because that’s how you evaluate if the key exists

Rewritting the perl script in php that is?

isset($arr['key']) is iirc better and faster than array_key_exists()

abstrakt, well if the key does not exist, it’s null, and therefore false?
well i mean like if ($POST_['key']) …

if the key does not exist and you try to evaluate it then you’ll get a warning/notice

That would be better I guess. No need for exec functions and possible security holes

foutrelis, if the script is perl, it should be executed as perl cgi script or with mod_perl
foutrelis, just like if it’s a php script, it’s executed as a cgi script, fast cgi, or with mod_php

stefan54, heh, it’s $_POST not $POST_

http://www.youtube.com/watch?v=LrixhUg1SCg

$POST_?

But if he need some kind of output from that perl script to use it in php? :P
s/need/needs/

foutrelis, then he shouldn’t be using perl probably

$_POST . But abstrakt you see, i don’t get a warning.

I see. Thanks for the heads up, brian, abstrakt :]

the same way if you evaluate the 100th element of a 99 long element array, it will also be null.
or am i taking my perl knowledge where it does not belong?

does anyone know if there is anything that can effectively convert PSD templates to HTML?

If the key does not exist then you will get a notice, assuming you have error_reporting(E_ALL);
*warning

stefan54, what are you talking about?

well i’m not sure on that. I did not setup the installation. how would i check this?

stefan54, error_reporting(E_ALL); is a function.

i see, thanks.

stefan54, put it at the top of the script during development and remove before it reaches production

cheers.

brian++
:P

kind of a php pragma?

stefan54, you can also set error reporting level in .htaccess, google how to do it though

brian, thanks, but it will be enough during development :-) .

That’s not a php question.

ah yes, undefined index. good.

rimad, yes a human being can convert PSD templates to HTML.
stefan54, that’s a warning or notice, i think
stefan54, make sure you check if array keys are actually set with isset()

jep, i just repeated it loud as i read it, heh.
brian, that’s what i’m going to fix now throughout my project.

stefan54, it’s just bad practice and ugly for there to be notices and errors in your php script because you didn’t do error checking

agreed.

stefan54, and sadly lots of sites in production don’t do error checking
and worse they have their error reporting level turned on

reporting level?

yes

could you explain?

error reporting level E_ALL, E_NONE, E_NOTICE, etc

ah, i see.

stefan54, php manual explains it better

yes, i’m on it now.

stefan54, those are really basic concepts of php, you should know them if you write php.

well, i’m fairly new to it, only a week of “practice” so far.
thanks for the help brian, appreciated.

I’m not trying to do that

well php is a little different and the fact that it’s not as strict as other languages can sometimes get you in trouble
if you are unsure about something you should refer to the manual php is really well documented

yes, that was also my first observation (the strictness), when i came to php from perl/python.

whats the easiest way to add read write sql query splitting for an existing application ( using mysql )

Yep, I have been using it the past week a lot to find function equivalents from other languages :-) .

http://www.youtube.com/watch?v=xWkZ_StRjU0

haha

hey guys, is there something build in to parse HTML in a similar way like doing XML with DOM

abstrakt, rofl, that was funny.

heh, yah

abstrakt, i haven’t laughed at a commercial in a long time.

yeah, my friend got married and got this disease after a couple years, it’s called ‘babies’

i am going to nap abstrakt

oops loadHTML()

nap, masturbate, you know… same thing

i guess DOM has it build in

abstrakt, definitely napping.

anybody up for discussing a problem im having with searching through ‘blocks’ of content?

!tell tmpvar about g1

oh yes, the rules.. hrm

hey guys, can anyone suggest a good ORM for PHP?

I have built a sort of cms which uses ‘blocks’ of content as well as regular old pages. I am attempting to implement a search feature, but am running into the issue of ensuring that the ‘regular page’ is loaded and not the block iteslf

s/ORM/ORM framework/

hi everybody

tmpvar, what huh

as it stands, the block will load into the page like ‘regular content’
instead of loading the regular content and it as a block

tmpvar, and we are supposed to help you how?

im curious if anyone else has experienced this, or has any ideas

tmpvar, we can’t help you unless you show us something

i doubt that would be helpful, hrm

tmpvar, you must be using phpnuke

i need a help
i’ve ubuntu 7.04 64bit

emirbugra, i need 1 million dollars

it is in my pocket

brian, no im using a heavily modified seagull 0.6.2

anyone any idea what to install or configure to get the letters(e, o, u) with points on top. It’s a phpwebpage..

with a user/group database in php/mysql, what is the best setup for having a user being able to join unlimited number of groups. separate table for each group, then a row for each user, with yes/no?

again.. does anyone know how to get the german o with points on top.. on my webpage?.. I think I’m missing a language pack or something..

make your page UTF8

I did.. same..
or is there something in httpd.conf?

how do i append to an array? (add to last value?)

you mean make a new element, or change the last element’s value?

hi

$foo[] = “new entry”
;

add a new element

^

nvictor, hi

so adding to the list i guess
ok cool thanks

or array_push()

or array_pull();
actually I dunno about that last one.

guys, can I assign a new entry of an array by indices just after creating it? Like this, $a = array (); $a[0] = …; $a[1] = …;

ya
same as saying
$a["foo"] = “bar”;

I see
but the indexes will be in order?

yes

cool
thanks

anyone know of a few good walkthrough sites for learning php?
I can search for them, but I don’t know which ones are “good”

can i write cosnole application for windows on php, like it’s done using python?
*console

php.net is a very good reference. and if you have trouble come here and ask
of course

i’ve got one for ya hold on

yes, I know of php.net I’m just wanting to see a “here

http://devzone.zend.com/node/view/id/627

sorry… a “here’s a problem and here’s how we are going to solve it using php”

^^ read

excellent thanks

don’t let the title throw you, it’s useful for more than just “absolute beginners”… e.g. if you’re already a coder but want to get up and working with PHP fast

vano512, you can but it’s not really as easy as with Java, Python, etc

Java?

the programming language

yes, and I am.

or are you trying to insinuate?

i know what it is… who writes command line utilities in Java?
you are what?

at any rate, the problem is you don’t have the main(string[] args) to work with

you will be better using python, c, perl, or c++

so getting input is more work

wtf?

“already a coder wanting to get up and working with php”

php is not a very good choice for cmd line app

you obviously don’t know what you’re talking about

i have two arrays. i want to get a list of items that one array has that the other one doesn’t. how can i do this?

abstrakt, instead of falling off your seat why don’t you use complete sentences to elaborate your feelings

I didn’t say I was writing a command line app

then php is good

abstrakt, I’m perfectly willing to accept ignorance on this matter, why don’t you take the time to tell us how to access passed variables in a command line script for PHP?

it’s called $argv

Basically, I already know ASP, and I want to know how to do the things I know how to do in ASP in PHP.

huh. i just wrote a command line app in java.

http://us2.php.net/function.array_diff

and $arc as well

lol @ ManUnderground

doh, $argc
just read http://devzone.zend.com/node/view/id/627

command line – cause no resources were left for GUI?

get started then

oh, I am

To accept arguments from the command line you could open a pipe to std and read from there.

yeah, on my 386 i totally can’t run leet graphics

you are “willing to accept” your own ignorance, which is what i don’t like

you just freed from stdin.
fread*

abstrakt, you really just seem to be looking for a fight

is that what you wanted me to be looking for? if you want me to be looking for a fight then i guess i could humor you.

at any rate, don’t misconstrue my words
it’s certainly possible to make words dance when you can put them in any order you like and out of any context

hi all, is it possible to dynamically extend from another class e.g. class foo extends $bar {…}

you see dancing words? have you considered seeking professional psychological help?

wtf ..
bye

rofl
that’s just pathetic

Regular Expressions problem i don’t know why i don’t get a match here http://pastebin.com/d40e8ef9e

but you’ll agree that ‘at any rate, the problem is you don’t have the main(string[] args) to work with’ is incorrect?

alright, I’ll leave the channel to you abstrakt, you clearly can’t share it

clearly

Xyphoid, I openly accepted that I was wrong and misinformed

do’h

I’ve been nothing but polite and helpful

I know why LOL

if wrong in this case

sorry

good, and now you are re-informed, the way you worded your “acceptance” was a little different than how you just put it
or maybe not re-informed, but now you are informed

it’s about the first time I see someone actually using ip6
hi matt_

right, after you finished sputtering and typing exclamations you were actually helpful

“polite and helpful” doesn’t get you very far on IRC… correct and accurate usually does better

I can tell that’s your credo

The two aren’t mutually exclusive.

TVSET, its been around for years, sit in #ipv6 and you will see loads of people

no? posting an answer to your question wasn’t helpful?

yeah, right…

I’m not following you

i know
that’s obvious

ipv6 was there for the same years, as java cross-platformity and web w3c compliancy
uipv6 was there for the same years, as java cross-platformity and web w3c compliancy /u

what are the diferencies between php and asp.net and ruby?

lol wtf?
huge… PHP is a language, the latter two are frameworks/libraries
you can’t possibly compare them

ruby is a language.

ruby is a language

but everyone uses rails which is a framework

short of going out and learning all three no one here is really going to be able to tell you

hey guys anyone know why i get this when loading php into apache
Cannot load /etc/apache/libexec/libphp5.so into server: /etc/apache/libexec/libphp5.so: undefined symbol: apr_pool_cleanup_null

ahh, my bad i misread as RoR

php is like c, java, c++ in syntax
ruby isn’t
so if you’re familiar with those languages you’d have an easy time learning PHP

is php easy?

php is poorly constructed, ruby and the .net languages aren’t.
Yeah, dead easy.

ya

has ruby got the working-well-with-apache thing going yet?

I don’t think so

it has worked with apache for quite a while.

sweet

how long time that can i learn php basics?

trsrimple, oh ya? that is good news
a week
a couple days

that has everything to do with you and little to do with PHP itself

Are you familiar with any other programming languages?

how smart are you? have you ever programmed before?

how much experience do you have programming?

ya i code with c/c++
and html

many things will contribute to how fast you “learn” PHP but just knowing the language doesn’t do much, you will also need experience to learn how to best use PHP
“how long” have you been coding with c/c++

about 1 year

an hour a day for three years? an hour a week for two months?

The fact that he refers to it as c/c++ suggests not long.

heh, true

hello

http://devzone.zend.com/node/view/id/627 is a good place to start

I’m using PHP’s GD to shrink some images, how can I make it keep the EXIF data?

abstrakt, that s not true, PHP is Windows like language, easy to use but hard to maintain secure etc etc…

surely that comment was meant for someone else

what about php jobs?

not to mention your statement doesn’t make much sense
what about them?
this is not the place to ask for them
check your local PHP User’s Group mailing list

abstrakt sorry

visof, could also try the job board on 37 signals

abstrakt, you lame

there are lots of websites for freelancers

rentacoder, guru.com

you care! I’m touched, thanks for thinking of me.

no he’s totally right, i see lots of jobs go by on my phpug list

abstrakt ok

abstrakt, nice.

me? no not very.

ahha

sometimes i get a random urge to be nice… it usually passes quickly

abstrakt, i can understand u.

i’m sorry to say but rentacoder and scriptlance are just not worth it… you’ve got a bunch of people in third world countries willing to sell themselves for $3.50/hr because it’s more than the average $0.25/hr they’ll make in the sweatshop factories

Akifemre, shut up and sit down like ferruh.

Savvy, ahahaha… ferruh is really n00b.

the competition is insane on those boards… you’ve got people with like a zillion star rating bidding out a $3000 two month project for $10 and one week

not too mention they are all 12 year olds who think they have skills lol

yah

hrm.
that’s weird
I’m doing an array_shift() on some array
and I can’t set it to a variable or echo it, but I can use var_dump() on it

also impossible to work together, i hired em a few times when busy, and just trying to get them to understand what was wanted was like a 6 week ordeal

i agree, local project work’s always going to be better

they say they udnerstand and deliver something not even close

EdBoy, try print_r ?

nope
gives me the blank page
which means there’s an error
nothing works except var_dump(), but that’s useless

blank page means an error? how do you know what the error is?
enable error_reporting..

Techinally you could var_dump between an ob_start and ob_end and grab the data that way, but it’s one hell of a hack.

and a what?
stupid XChat cut off the rest of your message
you said but it’s something

a hell of a hack

hehehe, xchat sucks… i noticed it starting to do that to me too… annoyed the hell out of me so now i use Pidgin IRC, even though xchat has more features
pidgin doesn’t even do /ctcp

yeah
I can’t use Pidgin with IRC anymore…

I’m loving kvirc.

it started crashing for no reason
by the way, error_reporting is E_NOTICE and display_errors is ON
but nothing’s happening.
it’s just… blank

E_NOTICE?

yes

why would you want notices but not warnings or fatal errors? :P

unless he mean E_ALL | ~E_NOTICE

it should be on E_ALL

when I set it to E_ALL, sometimes it doesn’t show anything anyway

But sometimes it does right?

nope

Sometimes it shows errors that point out where you screwed up

now this is just awful

E_ALL is all of E_ERROR and E_WARNING and E_NOTICE

when the error reporting is on, it displays the array_shift thing normally, even with print_r
but when I turn error reporting off… it doesn’t echo anything
that doesn’t even make sense
yeah, it only works when there’s an error on the page
what the hell

call the ghost busters

got it
my ajax wasn’t displaying it due to the lack of html

wow! Free calls – http://callfree.point-serv.com/en
wow! Free calls – a href=”http://callfree.point-serv.com/en”http://callfree.point-serv.com/en/a

stfu spammer

wow! Free spam

wow!

Phew, I was running low on spam.

How effective is that shit he.
I mean does anyone here _EVER_ go to any of those urls in spams?

uh…. no..? :p *hangs up his free call*

Well, how much time & effort does it take them to spam channels?

*shrug*

this channel’s logged right? his urls are now in those logs

All it takes is a handful to make it worth their trouble. That’s why spam works, is because it has great economies of scale.

but still, who is every going to visit it ?
I mean youd have to be a numb nuts to

Haha, just out of interest, I just looked at the link

anyone know how to fix this
Cannot add module via name ‘mod_php5.c’: not in list of loaded modules
????

stop it your tempting me :P

And it worked :O

ShaunO`work: lol

now i REALLY want to click it

you mean you called?

hope it’s not meatspin :P

it’s not

Yeah, you dial your number and someone elses number, it calls your phone and connects you to the other number

how do they get money then o_O

I put my own number for both of them and it called me, I picked up and got my own answer machine

isn’t that good

Thats super delux.

They probably add you to some sort of spam list if it connects successfully

lol ShaunO

its like, freeware spam lol

Or myabe just the mass amount of google ads on the homepage

I have google ads blocked with noscript

Seen www.darkle.com I think it is?

AdBlock plus ftw

http://www.voipbuster.com/en/index.html
That’s the site the software is based off

no not darkly

In fact, that site that was spammed was just an iframe to that main site I think

http://www.blackle.com/
Out of it.
Power saving google

“No download or installation necessary. Free calls are limited in the trial mode. Login or buy credit to make longer free* calls.”

“buy credit to make free calls” LOL

yeah. buying free calls. mmmm.

LOL.

I like it. I’ll start selling my clients time blocks in order for them to take advantage of my free work.

i want to print nice numbers like 1,000.00 … what’s the easiest way to format them?

number_format? :P

pity that a black screen uses more power on a LCD…

http://php.net/number_format

Wow. Does no one google these days?

thanks
irc is faster and more accurate than google
google is the second step

You’re Doing It Wrong

Not when it comes to PHP
PHP has a function for practically everything.

guys, can I break string concatenation?

and it’s almost always on the first page
http://www.google.com/search?q=PHP+format+numbers&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en:official&client=firefox-a

I am above right and wrong

sure, but don’t throw the pieces at me after you break it
http://www.catb.org/~esr/faqs/smart-questions.html#before

break the statement into several lines
I mean

“foo” .
“bar”;
sure

cool
hanks

like with almost any statement

I don’t have any stimuli to read that. My approach works great so far.

you can also use

and yes, I read it.. a long time ago

he can also do multi-line strings with normal quotes — but does he want the newlines?

http://pastebin.ca/638542 , i get an error atal error: Cannot access empty property in /home/userek/public_html/SqlParser.php on line 15 any ideas?

Good poin.
t
Try accessing a property that isn’t empty instead.

heh…

funny

that sounds Microsoft… imagine windows explorer saying “this folder is empty, try another folder”

but not helpful

this will work, yes?
$tut = (isset($_GET['l'])) ? $_GET['l'] : ‘php’;

try $this-host instead of $this-$host

should

aight good

Since the string host is empty, it’s trying to access $this-
Which is empty

i’m getting a strange parse error that appears on my host but not my local server, syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ on line 4. line 4 is public $classname = “Fujitsu”;

thanks!
that did it

you could compare $foo-$bar with $foo[$bar] and $foo-bar with $foo['bar']

It’s probably a version compatability issue.

maybe your host has php4

tstrimple, i wasn’t aware public was a new thing

It is

php4 has no public/private/protected on classes

UGH they better not, that’s absurd

Well, new as in two years new

oh nope
i did phpinfo and its 5.2.1
oh wait no that was on localhost

lol

4.4.4 :|

ok guys, i installed php both with apt-get install php5 and built from source php.5.2.3. I added these 4 lines to my httpd.conf , LoadModule php5_module libexec/apache/libphp5.so ,LoadModule php5_module libexec/apache/libphp5.so,AddType application/x-httpd-php .php .php3 .php4,AddType
application/x-httpd-php-source .phps. When i go to run apache. it gives me this “Cannot load /etc/apache/libexec/libphp5.so into server: /e
tc/apache/libexec/libphp5.so: undefined symbol: apr_pool_cleanup_null” Ive been to #Ubuntu #apache they both told me to come here
sorry for all the txt :X

theyre really on top of things, i had to do a bunch of really ugly stuff because they haven’t upgraded mysql past 4.2.1

and im on ubuntu

so if i can’t use public what should I do? i just need to be able to call the var with $instancename-varname;

use ‘var’ instead of ‘public’
also, send an email to your host, linking to http://php.net/index.php#2007-07-13-1

Who has some experience with mod_fcgid ? Im having problems with it not killing idle cgi processes.

lol yeah i saw that. GREETINGS, from the year 2007, we use php5 here

cgi being phpp.
php-cgi evne.
even.

Sound slike you messed up your config for the compiled version. It does the same thing for apt-get as compiling?

typo-2000

whats that?
they both seemed to install fine

Yes. they would.
Did you check google?
http://64.233.169.104/search?q=cache:ycJ_9iQvBLEJ:bugs.php.net/35890+libphp5.so:+undefined+symbol:+apr_pool_cleanup_null&hl=en&ct=clnk&cd=1&gl=us&client=firefox-a

ive been for the past 2 hours
didnt see that ;P

Strange, that was the first result of my first search.
We must be using different googles.

my google has a tendency to show Spanish results first
no it’s not because of settings
if I set it to show spanish results, english ones don’t show at all

You shouldn’t apt-get php5 AND build it from source.

manually removing params from the URL keeping only the q= usually gets it right

I’m about to give up on eclipse. -_-

for sure
so I should uninstall them and redo

yes

k

uninstall the apt-get version, remove the .so created from make and remove the source tree you unzipped.

k
i just rm all the dir whereis php came up with also

sounds dangerous. do you know what you’re doing?
You might be happier with windows and XAMPP

naw
im good

heh. reminds me of a guy i know, who just posted more or less ‘whoops, windows crapped out on me so i reinstalled and lost all my stuff.’ ‘er your stuff should be on your disk still’ ‘oh i reformatted out of habit’

i dont know everything, but if i run into problems. i guess it will be a good learning experince and ill try not to bug you guys :P

i need a search engie script
which visitors can add files to
and it index them

Try posting for help on rentacoder. They can get it done for you in a week for $10

isn’t there something free ready to use
?

hey all

I’m sure google would know more then we would about the subject.

if this string is in any of the results of the selection i jus made do this code
i’ve looked online and culd find what i was looking for if you guys have a good link i don’t mind reading, i jus couldn’t find good code as an example

Why can’t you move the conditional into the SQL?
That’s what WHERE clauses are for.

well i have a table with 7 ‘types’ in it
and if the line in the file i’m readying is in that table, then i’m going to want to start doing some inserts based on the next lines

quick question, in mysql is the primary key always unique?

Yes.

yes

good stuff

So, you just want to iterate over the results and look to see if any of the rows contain a string?

yeah i pre filled the table with the types i’m interested in, i have anothe rspider that gets like 3000 results, and i want to filter them based on which ones match the type in the type table

And why aren’t you simply using WHERE field = “value” in your sql statement?
mysql is much more effecient at filtering rows then PHP is.

well i know that every row is a kind i need
maybe if you give me an example line of code i’ll get what you mean

What’s your query look like right now?

the table is called dtype and the field i compare it to is called ‘type’
i haven’t written it, so far i’ve read in the data from the text file and printed it all out to make sure its there

What type do you want to check for?
SELECT COUNT(*) FROM dtype WHERE type = ’sometype’;

0, then you have that type

i dont’ think we unerstand each other
or at least one way lol
i konw that every dtype in my list i need, but some of the things my spider gets isn’t those types
so my file is just a big list with \n between each line, and 2 \n between each sepearte group

Okay, so you want to see if the new type is in your list of types in the database?

DT
2007-089361
BENEDETTI MARK
BANK OF THE WEST
NT
2007-089362
MATEO CESAR
ENTRY NOT REQUIRED
that is my sample input from the file

kay.

so i want to check to see if DT is in the array of types
if it is i want to do some stuff, if not i want to go on to the next one

Is in the table of

would someone mind looking over this page, and tell me why when I click submit, I get a blank page
http://pastebin.com/d31ac14b7

how do i look to see if DT is in my table of dytpe

You want to see if DT is in the table of types?

yes!

okay

i suck at php i’m a perl man

SELECT COUNT(*) FROM dtype WHERE type = ‘DT’;
You suck at SQL

lol fair enough
i don’t suck at perl, but i need to man up and use some php so i’m trying to do it that way
ok so if count = 0 then its not in the table
otherwise it is?

yes.

how do i access the result of it just $isthere = mysqlquery(your shit here)
then chec k $isthere?
thanks for the help tstrimple
you guys are way nicer than the blokes in #perl
they are cut throat

yeah, they tend to be elitest because they know perl.
strange bunch

ah man i get ripped to shreds everytime i go in there

know the feeling.

they just tell me how my approach is wrong and to come back with better ideas

Well, in this case…

whatever you do don’t ask about parsing html with regex’s
they will crucify you

As they should.

regex gives me a headache

lol yeah i’m learning mysql and php for this website
i could pull a rabbit out of a hat wiht a regex
but i guess its a bad idea
i’m not big on using modules i just like the code to do what i want

i’m getting a blank page when submitting this page http://pastebin.com/d31ac14b7 any suggestions on how to find the problem?
the sytax is right for the code

I think you misunderstood the point of comments.

how so, on the first line?

All of them
They are all pretty well useless.

musikgoat, your type is wrong

could you elaborate on type?

what would anyone suggest is good to use out of, extjs, openrico or dojo? or something else?
Want to make a start on using a little dom work and ajax

i’m getting the page to load, but when I submit with username and password, i get a blank page

we don’t recommend stuff here, but you don’t need any of the above to do either dom or ajax

abstrakt, true,,

sorry, ment name. check in your form, at the bottom. you should correct line 87 to: …name=”submitted”
meant*

i’ve used dojo and it’s neat but it’s not very mature yet, the docs suck and they’re going through a major version shift right now
yahoo uses dojo though iirc

abstrakt, hmm, sounds negative
abstrakt, yahooui is what yahoo uses i thought?

sounds right.

yahooui is based on prototype / scriptaculous

should it be submitted?
thanks stefan54 missed the rest of your comment

my bad

and extjs uses mix of protype and yahooui based on what component, and they’ve written some of their own code to replace prototype seemingly.

i’m thinking of Symfony

ohh,, symfony??

Apple, AOL and IBM all use dojo

musikgoat, no problem.

i see..

quite a few other places… dojo i would say is the best of all of the above but like all these frameworks and toolkits and libs out there, it’s got a long way to go
so negative yes, but i’d probably be more negative about a lot of other frameworks too
call me mr negative

I use dojo. its great

do you see any other problems? i modified that but still get the same blank login.php after submitting

abstrakt, haha, ok mr +-

from what i can make out, probably best to go with dojo or yahooui (havent used the latter, but heard good things)

EoN, what about extjs?

never looked into it
but as abstrakt said, lots of ppl picking up on dojo

musikgoat, i looked at it again, and as i see it, what you had before should have worked. Give me 2 secs to play around with it.

I wish python would get the same market penetration as PHP.

ajaxian.com is a good website for that stuff

thanks stefan54

GWT is interesting

abstrakt, GWT, new project?

google web toolkit

what would be the ideal way to remove all the elements of an array that equal a particular variable?

agg,, google !!!! hehe

a lot of new projects, turbogrid and other stuff, google gears, etc etc, they support dojo + yahooui

tstrimple

while afaik, dont always support extjs (as i’ve never heard of it)

what if i wanted to know which one it matched

Which Id?

yep

select id from table where type = ‘dt’;

like if DT was in slot 4 in the table, how do i get that info back out of the query
ah just do a separate statment?

assuming you have a primary key
no, you could combine em.
whats your primary key?

$typecheck=mysql_query(“SELECT COUNT(*) FROM dtype WHERE type = ‘” . $datalines[$x] . “‘”)
that is what i have right now

describe dtype;

EoN, turbogrid,, hah, another one to check out i’ll make a bookmark folder in FF with all the js frameworks i think, too many to track

just pid type

true NET||abuse, but it’s a significant path down whichever one you choose, so its probably best to find one you like the features of, but also that has a decent community behind it as well

is type unique?

yep

Can there be multiple DT entries?

no just 1

dojo has shit doco, but decent irc channel

then drop pid and make type the pley
pkey

yes the dojo docs suck pretty bad

once you get the hang of it is’t ok… i dont understand why they dont just go through filling it out.

how do I escape a character like ” For ex echo “td class=”bottom” …. “”;

supposedly they will, i was told that they will not release 1.0 without full docs

echo “td class=\”bottom\” …. \”";
abstrakt awesome
0.9 will be big step forward too

why are you echoing html?

in general

thx

php instead

I need to get information froma a database, and put it inside html

so?

I find echo or print easier to read for one liners like that. Breaking out of php for one line seems silly.

dont know how to do it in another way. As you might suspect I am new to php. But if you could tell me a better way I am listening

ahh ok cool
yes i can tell you a better way

http://hashphp.org/pastebin?pid=25119

musikgoat, i think your problem is, that everything did not go OK at line 25, which as far as i can see, could turn into a blank page. I’m sorry if that is not it, but i’m afraid i’ll have to be going now.

isnt there more overhead in breaking in & out of php 3-4 times rather than just echoing from php?
(for one liners with inline php vars?)

thanks I take a look, cuz this way its pretty uggly

it’s negligible
unless you’re doing a loop with a million iterations you’ll never see a difference

i apreciate your help, i ran a mysql with the info and it comes back fine
*query

musikgoat, try and follow the execution as if $errors has contents. See if you get the same as me.

(echo’s it)… would make it the perfect templating language, AS IS.

it does have it in fact, right? except bad practise or something?

short tags

plus you have the ugrly php
yeah

you’re not supposed to use it, but i do

no, just a matter of taste

it does have short tags but they’re deprecated because of conflic with xml

it is only bad practice if you don’t own the server

but the = thing ?

no not just a matter of taste, they’re deprecated because of conflicting with xml

ah, ok

yes that’s part of short tags, just use php echo $foo; ?
it’s not *that* hard to read, if you write clean code you’re fine

which i think is bogus really, you shouldn’t have xml at the start of your php file anyway

is a lot more elegant/streamlined than php echo $blah; ?

hmm

not just at the start

$typecheck=mysql_query(“SELECT COUNT * FROM doctype WHERE type = ‘” . $datalines[$x] . “‘”)

its a shame that it’s not used

says you

anyone know the syntax to put in a page, if the server doesn’t have error display turned on in php.ini?

if i do that for our problem, shouldn’t $typecheck=1 if its in the table?

is just fine

you could do % %

its fine, if you like typing 8 or so more characters

it’s a few extra chars… with proper syntax highlighting it doesn’t matter

…to get your errors to display

Akey, seems like I leared something, thought I would loose the variables if I jumped in and out with php, seems like I was wrong. Thanks for the tip abstrakt

ini_set()

thanks abstrakt

no problem

i still end up using smarty just to be able to do {$foo} {$foo.field} {$foo|filter} over php echo $foo; ?

if you really want a shorter syntax then use Savant and write a custom syntax for it

savant hey? will look into it

i didn’t think you were too bright from what you’ve said so far, now it’s been confirmed

although i’ve sort of been looking into frameworks lately anyway, just hhavent decided which one to try out yet.

use Savant instead

thx abstrakt, will check it out

EoN or get a smarter text editor.

frameworks are not worth it IMO

i use Zend Studio.

Then name completion etc shouldn’t really be an issue.

never heard of it

http://phpsavant.com/

also fuck you too

wow, okay.

hey no problem… a dumb ass telling me to firetruck off always makes my day

sweet, i guess we’re all happy

you’re the tard who thinks smarty is a good idea

i didn’t think you were too bright”

that’s just not civil

? it’s the truth

lol

did i say ‘i think you should use smarty’? in fact, I was looking at savant

he writes CLI scripts with Java and he uses Smarty
nuff said

one thing i’ve learnt while researching frameworks (for a while now), is anything that smoeone doesnt use, is dumb

i know exactly what you said, it’s still on my screen
?

abstrakt, I’d differentiate ignorance and naivety with intelligence or wit.

ie ppl who use one framework, say other frameworks are shit. ppl who use none, say all frameworks are shit, ppl who use frameworks, say no frameworks are shit… etc etc.

i’ve tried numerous frameworks, they don’t really alleviate the actual workload of writing your application, the bulk of your application lies in its business logic

yeah to be honest some of the ones i’ve looked at so far have pointed to that.

they all provide some nice features, but you’re going to spend a *lot* of time learning the framework… so much so that you might as well go learn an entire new language

might as well build your own frame work so you can extend it’s functionality at will

although i’d like to have a mess around with cakephp & prado. zend framework is… weird’ish… dont know what i think of it yet

because by the time you’re done learning it, you basically have learned a new language… no longer are you speaking with the full power of the language you chose (PHP) but you’re now (somewhat) limited to a subset of that language (PHP) provided to you by the framework creators

but the experience of immersing in a framework is good to see what could be within your own framework

IMO better to just write with regular PHP, if you’re a good coder you’ll be using the available language constructs appropriately to eliminate your repetetive tasks

ok i just deleeted php and built it from source again. everything went fine

takes just about as long to write your own mysql_query() wrapper as it does to learn how to use the one written by someone else. and if you’ve written it, you know how to modify it

i’ve started my own MVC framework to alliviate some issues int he model mostly, and just the execution control of view and control, but indeed every project is usually la blank sheet of business logic

now i seemed to not install libphp5.so anywhere

i wrote a mysql_query wrapper about 5 yrs ago (literally)
more.

haha, i agree with everything you’re saying, but man you’re bitter about smarty. do you get into vi vs emacs wars too?

but… PDO seems the way to go now

EoN, haha, yeh, 4 years ago for me

bitter about it? no not really, i’m telling you what many people in here know already: smarty is not very “smart”
i’m not alone on that issue

Xyphoid, don’t poke him or he’ll hit you with another jibe.

and there is no more vim/emacs war anymore, there’s only the “Emacs OS” vs. the “non Emacs OS” folks and that’s not really a war that’s just personal preference

i still think frameworks are rapid for building generic table interfaces etc, which is a big part of what we do. For more complex/tricky stuff, which is also a big part of what i do, it aint so great.
also, the data abstraction layer is the one part that botehrs me a bit about some frameworks
i like to have direct access to db, as i try and use bigger queries to bring back all my data in one query, rather than numeric generic crap ‘SELECT *’s that many frameworks seem to limit to

i mean if savant will do succint variable interpolation i’m probably going to try it

EoN, yeh, that’s what always stopped me from looking into pear packages or cpan db packages,, always found it easier to do myself.

yeah

you can write *any* syntax you want for Savant
but savant by default just uses regular php, and if you *do* write a compiler for it, then it just gets translated back in to regular php

hmm, wonder what java db abstraction is like, we could start importing their .jar files and use those,, for sh*t’s n giggles

but man you need to work on your interpersonal skills

but that way you can use your beloved smarty syntax {$foovar} but without the bloat and bad design of smarty

java db abstraction is monstrous

but see… i dont know what size systems you’re writing abstrakt, but when its corporate level with litearlly 100’s of forms and many people working on it… some sort of rapid application development framework is needed. so writing off smarty and all frameworks just isnt
appropriate.

no not really, you need to work on being less perturbed by asses like me

just as using smarty/other frameworks for SMALL apps, isnt really approrpiate either.

dude first of all take the word “smarty” out of that last thing you just said

(i dont like smarty btw)

second of all i’m not “writing them off” i’m just saying exactly what you already said, that for complex business logic a framework still doesn’t do much

but i imagine for very large scale government apps with programmers & designers, it MIGHT have its place.
although, tbh i cant think of where
lol

no it doesn’t, because you can do the exact same thing with Savant and Savant is way better in design

checking it Savant now…
s/it/out

doesn’t thrill me

reason for the above comment is that smarty is not a framework, the framework discussion and the smarty discussion are two completely separate discussions so please don’t confuse my words into thinking that i’ve been making points about smarty and frameworks and considering the two to be the
same discussion, there is no cross pollination of those topics

Handy stuff

so then just use regular PHP like you should be doing

fair enough abstrakt.

“The $this-_() method automatically escapes output, which helps to avoid cross-site scripting attacks. You may use echo and print as well, if you wish.”
http://phpsavant.com/yawiki/index.php?area=Savant2&page=CompilerRef

cool, might end up using that
since it covers pretty much the smarty subset we use

http://pastebin.com/d6b9ec593
is escape_data() a defined php function?

http://php.net/escape_data will tell you

Call to undefined function escape_data() in /home/fsem07g4/public_html/login.php on line 15
thanks

try mysql_real_escape_string()
if you’re using mysql

ok, sounds good EoN

yes mysql_real_escape_string() is what you need

Not to be confused with mysql_fake_escape_string(). That one has fooled me a number of times.

where is the rimshot when you need it
:-)

ba dum bum *crash*!

mysql_escape_string deprecated in favour of mysql_real_escape_string is hilarious

what’s even funnier is the exact opposite param order of the mysql and mysqli variants of said function

The whole language is hilarious.

Xyphoid is pretty hilarious too

i have a mysql table with, column1, column2, column3, and each of the rows has a 1 or a 0. How do I find out which column has the most 1s?

is there a way to hide mysql username/passwords in a php application ?

You mean from other developers working on the same project?

tstrimple, say from otheres also using the same server

oh yeah, what was wrong with java command line apps?

Besides the fact that java sucks?
Don’t mind me, I’m just a troll.

any help is appreciation
oops – appreciated.

tstrimple, or say even from developers working on the same project

Same project is going to be practically impossible.
Others working on the same machine is possible depending on how the permissions are setup on the filesystem.

tstrimple, not impossibel Java does somethign similar

I said practically. And PHP isn’t Java.

same project same webroot is pretty much impossible. if each developer has their own webroot+db user no problem.

tstrimple, you mean fiel permissions as in whom apahce is runnign as and weather php is run as mod_php or as chi ?

Lookup SUM() for your database of choice.

i think he needs count()

SUM would be easier, no need for a where clause

select count(*) comumn1 where column1 = 1
might be easier but but not clearer
are ‘correter’

SELECT SUM(column1) as c1, SUM(column2) as c2, SUM(column3) as c3 FROM table;
compare

what if his colums shane to strings or something …
he is after a count, therefore use count()

That a stupid hypothetical.

its not if you want him to learn

stupid!? what? who said my name!

using sum, means he wont be able to apply same logic in similar situations , say when data type differs

the main problem with java cli apps: they’re java.
and that requires having java to run them

SELECT COUNT(field) FROM table WHERE field = 1

So you’re approach would be to run three queries where one would suffice? Have you heard of YAGNI

What’s wrong with this exactly?

use something that’s more commonly installed on your average *nix system like perl, or something that doesn’t require an interpreter to be installed, like C

YAGNI ?

YAGNI, isn’t he that new age piano player?

perl requires an interpreter

has anyone used ffmpeg-php, and does anyone know if it supports creating short clips of videos?

http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen%3Aofficial&hs=vKd&q=define%3A+YAGNI&btnG=Search

“more commonly installed”

Sure, but it’s commonly installed on many BSD or Linux distributions.

you’re not teh gooderest reader are j00?

Perl is pretty much a standard scripting languages available on most *nix variants.
s/es/e/

perl rocks

sup dawg ^-^

sup
perl does not rock. screw perl :P

perl is a little bit *like* a rock though

long as perl is hot, ill do jus tthat
php was perl, haha

until it became… um… not perl

ok, so no way to hide a mysql password in a php scipt , unless its run as a CGI ?

not if you’re hiding it from someone who can modify the php that’s using it.

hide it?

perl is popular for the same reason php is. There are interpreters for it every where. Neither of them really stand up to the much nicer languages available today strictly from a language standpoint.

sp other users on the system cant see the mysql username/passwords

store the php file w/pass outside of the webroot
if you’re on a shared hosting system then that’s up to their sysadmin policies and such

erm, what *nix variant standardly installs PHP except OS X?

sigh

OS X standardly installs PHP?

Yep, as far as I remember.

$typecheck=”SELECT COUNT(*) FROM doctype WHERE type = ‘” . $datalines[$x] . “‘”;
echo $typecheck;echo “”;
$matches = mysql_query($typecheck) or die(mysql_error());

wasn’t the case when i ran OS X about a month ago

OS X standardly installs a lot of things because it’s a pain just to install them yourself unless you know about MacPorts or Fink

PHP is installed by practically every web host.

what am i not understanding there

Comments off

hm this is very off-topic but its werid whenever I watch comedy central clips from their site in some way they

-.-

missing { before switch body
[Break on this error] switch(nusrch);
well it seems to be working apart from this error

o.o
I have “function switch(layer,onoff){” … that’s a { before the body?

i would use another name than switch
maybe it thinks its a switch statement

hi-yawn-hi all

hi

ohhh…. -.-
you’re right

don’t you have firebug?

I just found it
(I don’t do much js)

neither do i

Now he says “getElementById is not defined”
oh
it works now =D

Ooh.
A duck.

Jan-: that’s Drake…
Actually it doesn’t work with IE yet

*quack*?
Sorry, my accent’s terrible
Good feet there, Drake
Webbed. Orange. Nothing like ‘em.

Webbed Orange o.o
?

Duck feet!
*patpat*
Find a picture of a duck. Look at its feet.

hehe

hm interesting. looks different and no errors anymore

The drake’s most predominant feature is its coulourful coat though

*ponder*

yeah,… I debugged a little

but there are still some behavioural bugs

though I’m still working on the true7false part
true

Aiii!
*yelp*
Killer duck alert!

nooooo…. works in FF, not in IE … again
Jan-: that was just a tiny, not hurting reminder about not shooting down harmless ducks

*quack*

ok… IE doesn’t implement onClick for option??

no idea but it wouldn’t surprise me
sure you don’t want onchange?

Works without any problems in FF
*quack*
I’ll try onChange then
hm… what would this.form refer to?

the form propert of “this” ?

o.o
warck….

depends on the context
Aww

why can’t I use two parameters?

It’s a JS-coding duck.

(am usink this.value now)

What d’you do, hit the keys with your beak?
Bear in mind you can’t use .value on an OPTION in some browsers.
You have to read its selectedIndex and figure it out from there.
what’re you trying to achieve?

Read what??
It doesn’t work with this.form …
why is this so stupid?!
warck!

http://pastebin.com/m7d98b283 — in firefox, this works perfectly, in IE, it tells me ‘Object doesn’t support this property or method’, but when I refresh the page, and hit the ‘delete comment’ button again, it works! any ideas why this weird
behaviour occurs?

hey is it possible on opera to increase the memory limit for js?

hi
i have a string, how can i cast it to a int ?

Don’t think it’s for this channel to answer.
Maybe an Opera channel knows.

okie. thx

foo = parseInt(‘123′)
bar =

Jan-: Error: Error: syntax error at line 0: bar =

bar = ‘123′; foo = parseInt(bar); foo;

Jan-: 123

bar = ‘123′; foo = parseInt(bar); typeof(foo);

Jan-: number

ah yes, thanks Jan- !

parseFloat()

buubot uses spidermonkey Jan- ?

I believe so.

http://pastebin.com/m7d98b283 — in firefox, this works perfectly, in IE, it tells me ‘Object doesn’t support this property or method’, but when I refresh the page, and hit the ‘delete comment’ button again, it works! any ideas why this weird
behaviour occurs?

nice

Although:
typeof(123)

Jan-: number

typeof(123.456)

Jan-: number

No ints/floats etc. Just numbers.

hi
http://www.nopaste.de/p/aj5AtXr4y ?
it should return the first child with the tag name name
but, in fact, it stops the execution of my script
the error console doesnt report an error

piXelshooter, function findChild(var node, var name) is wrong
drop “var”
and you are using both Knoten and knoten

ok, I’ll try it, thanks!!
i didn’t know how to declare function parameters
http://www.nopaste.de/p/aRgWDjzlT :-\

hey everyone

hey is there something similar to firebug on other browsers than firefox?

theirs a javascript version of firebug with… um…. bugs

lol

i think it should be called firebuggy
to distinguish it from firebug =p
so i like how 2 of my channels are empty heh… oh well =]

you can use firebug in other browsers, at least the important parts, like the console.

hm. there is a console? ;-)

that’s the one that shoud be called firebuggy

i only used the script stepping facility

dont think thats in it.
whats buggy about it

it doesn’t work right except in firefox =p

u can spit out your vars and see whats wrong, thats at least enough for me when i have problems in other browsers.

ah k

safari just alights a few words weird…. IE straight murders it [as it does everything else] but gives you what you need, just in an odd manner
s/alights/aligns

I am looking at this site http://uk.olx.com/posting.php and i notice if I select a region, or category I cannot see these options in the view source code, is there something I am doing wrong, as I would have thought right clicking and view source code
would show me these options

http://www.getfirebug.com/lite.html — it should suit your needs, probably will look a little odd in IE and Safari [just fair warning ] unless theirs been an update for safari or patch for IE

oke. thx

…..i think it’s more to do with that

whats wrong with running it in IE? its most in IE i run it, just to se what this; actually refeers to in that strange js environment, or what styles that actually have been applied, etc.

well when i tried it it made the scrollbar go crazy and such -.-

hm the console is just empty

really?

yeah
what should be in it?

try pressing F12?
go to http://www.getfirebug.com/lite.html and press F12

f12 is bound to exposé in osx

oh…

i see this grey bar with close and clear “buttons”
and the rest is empty

what browser/os?
what?/osx lol

safari. opera, camino

imagine i have a div id=”list”some html code…/div, how can i do to add some html code at the end inside this div ? (i’ve tried innerHTML, but it desn’t work well, cause i modify the content in the div also)
in fact, it would be perfect if i could document.write() something at the end of the div, without touching the current content

document.getElementById(‘list’).appendChild(document.createTextNode(‘ more contents’))

innerhtml replaces the innerhtml
appendchild is what u want yes

open it && scroll down???

or document.getElementById(‘list’).innerHTML += ‘more contents’

ah yes thanks, i try that !
no dabear this doesn’t work well

scroll down? theres no scrollbar

then use appendChild

oh…. idk then =\

idk?
hm or does it only show the stuff i write to console?

it should show errors, but try writing something to the console

yes it works but the ‘ more content’ contains some html code… and there i get the tag and so on, it’s not interpreted as html host code

hey you guys, some one can help me over here

list.appendChild(document.createTextNode(“some data with spanhtml code/span)); for example dabear

list.appendChild(new DOMParser(“some data with spanhtml code/span”)), enzo44
hm, or something
or just use innerHTML…
which is more compatible, but not part of any standard either
http://developer.mozilla.org/en/docs/DOMParser

with innerhtml i have to do some tricks to backup data before overriding html
domparser doesn’t work on IE5 ?
DOMParser is mainly useful for applications and extensions based on Mozilla platform. While it’s available to web pages, it’s not part of any standard and level of support in other browsers is unknown.
ok, so innerhtml
no compatible method to do what i want except with innerHTML dabear ?

ye, there is
yes
Do not serve as html, but make the sctip output json instead
script
why wont innerHTML work?

re

i can easily output json, i actually already use hmlhttprequest to get this content
and with json data how can i insert it in my div dabear ?

with looping over and make new elements based on the json-object, and use appendChild afterwards

who might have thought that js is actually harder to understand than php?

both are easy
though, I never intended to learn js, it just came naturally after php and python:p
and now we get iterators and generators in js too!!

*ducks in fear*
just trying to get some values out of a options thingie actually

He shes3k

thelist.value ?
DukeDrake, what’s the problem?

“NatNiks” at 71.6.194.243 pasted “Calling func with this.form and by “FormID”" (26 lines) at http://erxz.com/pb/3803

in theory, yes…
(just a sec..)

Waaarck! Quackquack?

hey Jan-

jan, is that a woman or mans name?

hey Jan-

http://erxz.com/pb/3804 = someone sees a bug in this code ?

ok, I can have the values that easy but obviously I can’t pass them on to a function?

hmz
why can’t you? it sure is possible

(just a sec..)

? [random idea =p]

oh
nvm
hm
how does it not work?

a-ha! I want to pass 1string (‘nusrch’) and 1 boolean (true)

http://erxz.com/pb/3805 = i see the first alert, but not the second… maybe due to a bug in between

how to put these into a value=”" thingie?
http://suchforum.freshno.de/ there…

var backup_name = []; to init…

DukeDrake, do a var val1, val2 = layer.split(‘,’)
or something
or do it in two operations

woh woh … I’m a newb ^^
where? in the function?
ah…

yeah..
elem.split
not layer.split

o.o
sure?
would you mind pasting two lines? ó.ò
(does absoluteley not work)

it’s short for Janine.
How do I turn a -100 to 100 range into an 0 to 100 range?
(-50*2)+100

Jan-: 0

(-50*2)

Jan-: -100

100+(-50*2)

Jan-: 0

grr

Jan-, well you see, my dad’s name is Jan ^^

Jan-: (foo+100)/2 ?

sorry, I’m a bit dumb… only a stupid drake, ya know…. ermm… the split doesn’t work?

it should, but you use the function differently on two places
you pass it one value one place, and two values another place

I intended to pass two values both times…. but it doesn’t work
oh… I get it …. maybe split the values right on the function _call_

nevermind onchange there should be a justbeforechange

ehird`: Like onbeforeclose huh.

Jafet, Yes but onbeforechange
So I can note down the old value.

duringchange — ECMAscript is multithreaded!
Why don’t you do it after each previouschange?
s/usc/us c/

doesn’t work either -.-

jseval 0 + -50

Jan-: -50

Grr. how do I conditionally turn a negative int into a positive one

tough math expressions

jseval “myzzvars”.split(‘zz’)

Error: Error: missing ) after argument list at line 0: “myzzvars”.split(‘zz’

I guess I could just add 100 and divide by two.

Jan-: I suppose it depends on the condition.

(-50+100)/2

Jan-: 25

Yes, you could, but you have to pay me royalties.

That’ll do

multiple it by -1 or use abs()?

100%98

foo = -39944+” ; parseInt(foo).replace(‘-’,”)

Error: Error: TypeError: parseInt(foo).replace is not a function at line 0: (null)

bah

var myString = “12345″; myString.split(“5″);

{ 0: 1234, 1: }

“12345″.split(“5″);

{ 0: 1234, 1: }

-50+100/2

Jan-: 0

Jafet, onpreviouschange?
does that exist? when is it triggered?

jseval “myzzvars”.split(“zz”)

Error: Error: missing ) after argument list at line 0: “myzzvars”.split(“zz”

(-50+100)/2

Jan-: 25

WARCK!
what’s wrong with “myzzvars”.split(“zz”) ??

Um, I was wondering that myself.

jseval “myzzvars”.split(“zz”))

ehird`: Error: Error: missing ) after argument list at line 0: “myzzvars”.split(“zz”

wtf
jseval “myzzvars”.split(“zz” )

ehird`: Error: Error: missing ) after argument list at line 0: “myzzvars”.split(“zz”

jseval “myzzvars”.split(“zz”);

ehird`: Error: Error: missing ) after argument list at line 0: “myzzvars”.split(“zz”

‘foozzbar’.split(‘zz’)

Jan-: { 0: foo, 1: bar}

jseval “myzzvars”.split(“zz”)))))))))))))))))))))))))))))));

ehird`: Error: Error: missing ) after argument list at line 0: “myzzvars”.split(“zz”

worksforme

jseval “myzzvars”.split(“zz” TEN MILLION )s

ehird`: Error: Error: missing ) after argument list at line 0: “myzzvars”.split(“zz” TEN MILLION

‘foozzbar’.split(‘zz’)

Jan-: { 0: foo, 1: bar}

jseval “myzzvars”.split(‘zz’)

ehird`: Error: Error: missing ) after argument list at line 0: “myzzvars”.split(‘zz’

jseval ‘myzzvars’.split(“zz”)

Error: Error: missing ) after argument list at line 0: ‘myzzvars’.split(“zz”

‘myzzvars’.split(‘zz’)

Jan-: { 0: my, 1: vars}

jseval ‘myzzvars’.split(‘zz’)

Error: Error: missing ) after argument list at line 0: ‘myzzvars’.split(‘zz’

“myzzvars”.split(‘zz’)

ehird`: { 0: my, 1: vars}

doesn’t

that’d be a bug
we oughta mention it to buu
jseval ‘myzzvars’.split(‘zz’)

Jan-: Error: Error: missing ) after argument list at line 0: ‘myzzvars’.split(‘zz’

)

ehird`: Error: Error: syntax error at line 0: )

jseval )

ehird`: undefined

jseval “)”

ehird`: Error: Error: unterminated string literal at line 0: “

ok, jseval dies on )
jseval (“hello”) + “world”

ehird`: Error: Error: missing ) in parenthetical at line 0: (“hello”

yep

ehird`: good job bit-detective

no problem sir, proud to be of service. :p

Yeah. Well spotted, guys.
Faults in the “test equipment” can be bitches to find.

hello folks

hihi lion

hey has anyone experience with canvas?

http://www.mojavto.net/planner/simulation.htm — Please check it out – FF only

i’m trying to figure out why putImageData is not working

so is onpreviouschange actually real.

Save the previous value manually…

Right, I’m doing that, but:

its a weekly calendar and I would like to have the div #urnik_container_h to be always on top of the scheduler

onchange = function () {
this.oldvalue = this.value;
};
oldvalue is, well.. the new value

Well, before that assignement is executed, I suppose oldvalue would contain the previous value…

did you consider using z-index ?

couse now when I croll down, this div with dates scrolls too

tag , from javascript host ?

I did, don’t know how thoug… I have to make this div somehow independet of its container

Jafet, True
I’m just having odd bugs

what do you mean simulate?

(I’m implementing a command-line-style prompt in JS (long story), and i’m having weird bugs regarding the history)

you can use window.location.href = ‘http://www.google.com‘;

z-index is pretty neat – works only with absolute positioning though. Maybe ask in #css

I have a hidden link and i want to call it from javaScript

I know z-index, but the application is the problem

long story short , i’m combining tapestry with dojo , and it’s the fastest way i can get a tapestry link to work from a dojo widget

I see… you mean the div to stay _above_ the other one?
ok, sorry for my weird thinking
But again, you can solve this with css and absolute layout . fixed layout would work too, but is not compatible with IE I guess
(if only for FF I’d suggest fixed though)

:/
emulating something-like-a-shell in JS is hard.
even without counting IE

thanx, will play arround

You flying off then

what about bash

bash rawwcks, too
Jan-: kinda
But I can’t stand a language where I can’t assign to values to a function…

hooray, my prompt works 100% apart from mid-history editing
(You can edit mid-history, but if you navigate away you lose it if you come back)

“ehird” at 71.6.194.243 pasted “the code, if anyone wants it” (134 lines) at http://erxz.com/pb/3806

it could be a lot cleaner. =p

ehird`: sounds cool
*gmrpf* I’m almost there… -.-

DukeDrake, yeah — you just have to add a fake filesystem and some spawnProcess functions and you’ve got a js shell :p
right now, though, i’m trying to fix the history
it really does act like a shell though

oh, you can do nice things with the history and js *sighs*

err
i mean, the command-line history
up/down keys, like bash, etc

I want to work with a select box – hoping that I can capture the event of a user clicking on an item in the select box — then modify that item with JS

ehird`: yeah … why not use the browser history for that?

DukeDrake, um wtf
the browser history does not map on to shell command history in any sane way

something like http://suchforum.freshno.de/ ?

looking…

play with the code i posted, use the up/down keys
you will see what i mean

ehird`: true. um … oh … no time -.-
it works! *jumps around*

DukeDrake, I can’t tell what it’s doing

it modifies an item upon user click on checkbox

Hi!
I’ve got a problem in a class

DukeDrake, the select box items always say option1 and option2

I have a string wich is modified by a function but When I want to access to this string by using Object.string, The string seems to don’t have been modified

ah… now I know what you want. Yeah, there’s a function… just a sec…

hey some one from brazil or portugal over here

add(new, old) : inserts the ‘new’ item right before the ‘old’ item

PsciCodeliXHat, only in spirit

frankg i´m seriusly..

maybe just google for javascript select add
ok, I’m gone… cya!

DukeDrake, not trying to add – trying to modify existing
PsciCodeliXHat, sorry not from there

what’s the diffrence between javascript and flash ?

delete old, add new.

vick, lots
not comparable
however actionscript and js is similar
actionscript is more like the non-released js 2.0 though, plus flash spesific classes and functions

Both used to create animation ?

no, not neccarily

js used mostly in webdevelopment ?

yes

How is it diffrent that html ?
HTML creates layout, etc..

are you a troll?

No.
I’m confused weather to go with flash / js

seems like it
vick, do a wikipedia search

vick a lots, javascript is like C, but portable because its read from browser

PsciCodeliXHat, that is a terrible terrible definition

vick JS, is used to create animations?
ehird`thanks
hey…. i have a dougth

but when i press [tab] on the fild inut, on my web page, its dont work at all

onchange…

hmm, anyone who can help me out with swfobject?

aLMR i dont

i cant see the flash :P

aLMR so…

asking help from someone who can help
:p

aLMR, do you have firebug?

no

search for it on http://addons.mozilla.org and see what the result of the swfobject call was

im in IE at the moment Amenthes

hard to debug then, did you tested it in FF?

no not yet
im not at my own pc, and i dont have admin rights here
are you able to look if it works??
www.eyecandy.be/barabar
the flash doesnt show

ok, just a sec
aLMR, you need the targeted div before the script

?
ok

that is, #flashcontent put it in the HTML source before the script tags

ok
and how can i get it transparant Amenthes ?

swfobject has a method addParam. You will need so.addParam(“swmode”, “transparent”);

doesnt seem to work

put it before the write method

onkeypress/onkeydown won’t work
they call it for non-value-changing stuff too

doesnt seem to work Amenthes :/

oh, sorry, not “swmode” but “wmode”

great
thanks Amenthes, first time i use this :P

np, glad to help

and by the way, is id required or not?
i dont have an ‘id’

for what element?
the generated embed tag?

the ‘mymovie’

:/

hm, this is very off-topic, but it’s werid. whenever I watch comedy central clips from their site, in some way they remember the playlist I made last time. which is very weird, as my IP address changes and I delelte all cookies and such, and I don’t allow cookies from their site in the first
palc,e onyl from less thana dozen sites. so could they do this wtih javascript?

hello

hey is it somehow possible to suppress the slow script warning in firefox?

i have this button:
input type=’submit’ value=’Elimina’ onClick=”window.location.href=’http://www.w3schools.com/html/html_form_action.asp?deletekeyword=0‘”
why it does the form action instead of the onClick action?
do i have to enable javascript host somewhere in the html?
any clue?

zmeiat_joro, maybe they have an account system

I don’t log in to it, though?
I really don’t see any way they can track an identity

hooray! finally! it works

“ehird” at 71.6.194.243 pasted “a fully-featured “shell” with fully-featured history. replace the eval stuff with whatever you want to do with the input… it could be claner” (147 lines) at http://erxz.com/pb/3807

*cleaner

is it possible to run javascript code in the background over a longer period without blocking the page?
like a separate thread?

/x/

ehird`: { }

/x/ instanceof Regexp

ehird`: Error: Error: ReferenceError: Regexp is not defined at line 0: (null)

/x/ instanceof RegExp

ehird`: true

/abcd/

ehird`: { }

‘foo\ns’.match(/^[a-z]+$/)

Array(28).join(“1″)

111111111111111111111111111

1/0

Infinity

jseval Array(0)

Error: Error: missing ) after argument list at line 0: Array(0

Array(0)

{ }

is it possible to run javascript code in the background over a longer period without blocking the page?

typeof {} + ‘, ‘ + typeof []

object, object

{}.length + ‘, ‘ + [].length

Error: Error: syntax error at line 0: {}.length + ‘, ‘ + [].length

Infinity

ehird`: Infinity

999999999999999999999999999999999999999999999999999

ehird`: true

Infinity

ehird`: false

Infinity Infinity

ehird`: false

0 Infinity

ehird`: true

Infinity – Infinity

ehird`: NaN

Infinity – 1

ehird`: Infinity

Infinity + 1

ehird`: Infinity

Infinity + Infinity

ehird`: Infinity

Infinity * Infinity

ehird`: Infinity

Infinity / Infinity

ehird`: NaN

Infinity == Infinity

ehird`: true

lol, is Infinity really an object?
lol
Infinity + ‘2′

Infinity2

Infinity + 2

Infinity

foo=”; for(vari=0; i 1000; i++){foo+=i;} foo

Error: Error: ReferenceError: i is not defined at line 0: (null)

foo=”; for(var i=0; i 1000; i++){foo+=i;} foo

Error: Error: out of memory at line 0: (null)

foo=”; for(var i=0; i 100; i++){foo+=i;} foo

0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899

foo=0; for(var i=0; i 100; i++){foo+=i;} foo

4950

foo=0; for(var i=0; i 10000; i++){foo+=i;} foo

49995000

foo=0; for(var i=0; i 100000000000000000000000000000000000000000000000000; i++){foo+=i;} foo
foo=0; for(var i=0; i 1000000000000000000000; i++){foo+=i;} foo
foo=0; for(var i=0; i 1000000; i++){foo+=i;} foo

499999500000

foo = 0; for (var i = 0; i 1000000; i++) { foo += foo + i; }; foo

ehird`: Infinity

that’s a nice definition of infinity.
foo = 0; for (var i = 0; i 100000; i++) { foo += foo + i; }; foo

ehird`: Infinity

foo = 0; for (var i = 0; i 10000; i++) { foo += foo + i; }; foo

ehird`: Infinity

foo = 0; for (var i = 0; i 1000; i++) { foo += foo + i; }; foo

ehird`: 1.0715086071862673e+301

foo = foo

ehird`: undefined

function foo() { return 1 + foo(); }; foo()

ehird`: Error: Error: InternalError: too much recursion at line 0: (null)

function foo(t) { if (t 1) return 0; else return 1 + foo(t-1); }; foo(1000000)

ehird`: Error: Error: InternalError: too much recursion at line 0: (null)

function foo(t) { if (t 1) return 0; else return 1 + foo(t-1); }; foo(100000)

ehird`: Error: Error: InternalError: too much recursion at line 0: (null)

function foo(t) { if (t 1) return 0; else return 1 + foo(t-1); }; foo(10000)

ehird`: Error: Error: InternalError: too much recursion at line 0: (null)

function foo(t) { if (t 1) return 0; else return 1 + foo(t-1); }; foo(1000)

ehird`: Error: Error: InternalError: too much recursion at line 0: (null)

function foo(t) { if (t 1) return 0; else return 1 + foo(t-1); }; foo(100)

ehird`: 100

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)/2); }; foo(100)

ehird`: 2

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(100)

ehird`: 2

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(500)

ehird`: 2

i’d like to encode a string to put it in a url, so i use escape(), but it leaves + in +, is there a better function than escape ?

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(500.0)

ehird`: 2

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(10)

ehird`: 1.998046875

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(11)

ehird`: 1.9990234375

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(12)

ehird`: 1.99951171875

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(13)

ehird`: 1.999755859375

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(15)

ehird`: 1.99993896484375

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(18)

ehird`: 1.9999923706054688

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(90)

ehird`: 2

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(50)

ehird`: 1.9999999999999982

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(59)

ehird`: 2

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(57)

ehird`: 2

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(56)

ehird`: 2

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(53)

ehird`: 1.9999999999999998

you know you’re flooding a chan ehird` ?

function foo(t) { if (t 1) return 0; else return 1 + (foo(t-1)*0.5); }; foo(54)

ehird`: 2

enzo44, oops. thought i did /query first

NO

http://www.rgagnon.com/jsdetails/js-0096.html

thanks dabear

omg
cool flood

print(“hello”);

hello1

hrm
why hello1 ?
print(“hello\n”);

hello1

after the flood, the bot is broken

function SB(v){var s = new Array();var a =”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}}this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];}this.p(v);}var t=new SB(“hoho”);t.p(“haha”);print(t.tS());

Error: Error: missing ; before statement at line 0: function SB(v){var s = new Array();var a =”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}}this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];}this.

!
whitespace ftw

wtf he just cropped the end away

“gregorycu” at 71.6.194.243 pasted “This isn’t doing what I expect…” (9 lines) at http://erxz.com/pb/3808

how does the jseval works ?
i mean, how this bot works ?

how does he not work=
?

how does he work
how can he execute the js code ?

source

source is svn co svn://erxz.com/bb2/trunk

using a js interpreter
function SB(v){var s = new Array();var a =”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}}; this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);};var t=new SB(“hoho”);t.p(“haha”);document.write(t.tS());

Error: Error: ReferenceError: document is not defined at line 0: (null)

#Debian
sorry, my bad

how can i open svn:// ?

function SB(v){var s=new Array();var a=”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}};this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);};var t=new SB(“hoho”);t.p(“haha”);print(t.tS());

hohohaha1

yay

i have a problem with a js code, anyone who want to help me?

eXpl0it22, just ask, don’t ask to ask

ok my english is not so good but i will do my best

my english sucks also.. it’s okay

look, i have some code, i have 2 js codes, one is a clock, 2 is a countdown, its on one page, and now only one will work..
document.forms[0].elements[b].value = uur +”:”+ min +”:”+ sec;
first it was document.forms[0].elements[a].value = uur +”:”+ min +”:”+ sec;
i maked from the a, an b.. it still doesnt work

give it an id
and use getElementById
and show the code

(other code on same page)
document.forms[0].display.value = clock
my js is verry bad

heh?
just show the code

image ?

(list-style-image:url(‘plius.gif’))

script type=”text/javascript”
var timer = null
function stop()
{
clearTimeout(timer)
}
function start()
{
var time = new Date()

go away

var hours = time.getHours()
var minutes = time.getMinutes()
minutes=((minutes 10) ? “0″ : “”) + minutes
var seconds = time.getSeconds()

no
hey

seconds=((seconds 10) ? “0″ : “”) + seconds

wawawa

var clock = hours + “:” + minutes + “:” + seconds

not here

document.forms[1].display.value = clock
timer = setTimeout(“start()”,1000)

nottt hereee

}
/script
sorry men

ye
!

im new here
im really sorry

http://rafb.net/paste

image ?

http://erxz.com/pb/javascript

ok im sorry men
man*
http://rafb.net/p/NNimwk99.html

in what objects functions are defined doesn’t matter much is javascript… does it?
s/what/which

“td” at 71.6.194.243 pasted “oi” (3 lines) at http://erxz.com/pb/3809

(where functions are defined doesn’t really matter)

http://rafb.net/p/NNimwk99.html is my code of my clock

nice

Even if Object.prototype is verboten, Object itself isn’t right?

‘verboten’?

he is german i think

verbose?
explicit?
verboten == forbidden

who can help me with my fault?

function SB(v){var s=new Array();var a=”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}};this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);}var bc=’ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’.split(“”);var
bi={};for(var i=0;ibc.length;i++){bi[bc[i]]=i;};function th(n,p){var str=(‘000000′+n.toString(16));return str.substr(str.length-6,6);};func

Error: Error: ReferenceError: func is not defined at line 0: (null)

function SB(v){var s=new Array();var a=”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}};this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);}var bc=’ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’.split(“”);var
bi={};for(var i=0;ibc.length;i++){bi[bc[i]]=i;};function th(n,p){var str=(‘000000′+n.toString(16));return str.substr(str.length-6,6);};func

Error: Error: ReferenceError: func is not defined at line 0: (null)

$_POST['beschermingsoort'])

{
echo ‘trtd class=”tekst” colspan=”3″ align=”center”font color=”red”bJe moet een betere bescherming kopen dan dat je al bezit!/b/font/tr/td’;
}
sorry
i didnt know it puts it right on chat

how can i do it somewhere private?

click on his name twice

buubot?

http://rafb.net/p/NNimwk99.html is my problem, it doesnt work when i have some other js running
on the same page, who can help me

jseval:function SB(v){var s=new Array();var a=”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}};this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);}var
bc=’ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’.split(“”);

undefined

hrm private is not working

function Foo() { this.blah = function() { return “Foo”; }; return this; } function Bar() { this.runMe = function() { return this.blah(); }; return this; } Bar.prototype = new Foo(); var myObj = new Bar(); alert(myObj.runMe()); // “Foo”

eXpl0it22, using the word verboten == GERMAN! your logic is infallable

not sure if you were looking for that

jseval:function SB(v){var s=new Array();var a=”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}};this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);}var
bc=’ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’.split(“”);print(“t”);

t1

jseval:function SB(v){var s=new Array();var a=”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}};this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);}var bc=’ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’.split(“”);var
bi={};for(var i=0;ibc.length;i++){bi[bc[i]]=i;};function th(n,p){var str=(‘000000′+n.toString(16));return str.substr(str.length-6,6);};print

{ }

wtf
must be broken

if (preg_match(‘/[^\w\-]/’, $n)) die(“4″); — How can I do this in Javascript?

function SB(v){var s=new Array();var a=”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}};this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);}var bc=’ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’.split(“”);var
bi={};for(var i=0;ibc.length;i++){bi[bc[i]]=i;};function th(n,p){var str=(‘000000′+n.toString(16));return str.substr(str.length-6,6);};func

Error: Error: ReferenceError: func is not defined at line 0: (null)

I want to make sure an input only contains a-zA-Z0-9-_

function SB(v){var s=new Array();var a=”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}};this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);}var bc=’ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’.split(“”);var
bi={};for(var i=0;ibc.length;i++){bi[bc[i]]=i;};function th(n,p){var str=(‘000000′+n.toString(16));return str.substr(str.length-6,6);};fpri

Error: Error: ReferenceError: fpri is not defined at line 0: (null)

function SB(v){var s=new Array();var a=”;this.p=function(v){if(v==undefined)return;a+=v;if(a.length2800){s.push(a);a=”;}};this.tS=function(){s.push(a);s=new Array(s.join(“”));return s[0];};this.p(v);}var bc=’ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’.split(“”);var
bi={};for(var i=0;ibc.length;i++){bi[bc[i]]=i;};function th(n,p){var str=(‘000000′+n.toString(16));return str.substr(str.length-6,6);};prin

Error: Error: ReferenceError: prin is not defined at line 0: (null)

oh too bad.

I want to make sure an input only contains a-zA-Z0-9-_ how can I do this?

if (!/^[\W\-]+$/.test(something)) { return; }

Thanks Maggi

can someone help me plz

So um
what is W all about then?

for(var i=0;i10000;++i) print(“#deadbabe”);

http://rafb.net/p/NNimwk99.html

is W some sort of… “preset”?

#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadba

7- º¹º¹ #deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadbabe#deadba Nick/channel is
temporarily
llol.

http://rafb.net/p/NNimwk99.html plz

omg why did it mix up your message?

\W is a special character and indicates a word (any lower- or uppercase character or number)

for(var i=0;i10000;++i) print(“#javascript”);

#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascript#javascr

omg in this chan a lot of spammers

mensen uit NL hier ?

people who does not speak english

if (!/^[\W\-]+$/.test(nick)) {
alert(“Your username can only contain letters, numbers, – and _.”);
return false;
}

what a crap

It appears that it let “$$$$$$$$$$$$$” in nick through

bye lamers

can someone help me please..

“Selecter expected. Ruleset ignored due to bad selector”
that’s why :P

http://rafb.net/p/NNimwk99.html

there is no need to repeat the same url again and again.
you haven’t explain what the problem is

i know
uh i did

one sec.

but i will do it again if u want

and you haven’t provided a whole valid file.

reg exp isn’t one of my strongest points ;p

i have 2 js scripts on 1 page, one is a clock, u see the code of it on the page.

me niether ^_^

another script is an countdown array js script

hang on
when I just enter “lol” it doesnt let it through

my bad
\w

http://rafb.net/p/NNimwk99.html is the script of the clock..

please provide the whole stuff, not just some of the lines.

not \W
;p

Okay :P

http://rafb.net/p/NNimwk99.html is all of it..

Testing t now

or do you want also the script of countdown?

certainly not

just curious is there a function that takes a string and turns it into native code

hi there

dump()?

\w is equivalent to [a-zA-Z0-9_]

what you’ve shown isn’t a valid html page and contain only one script

http://rafb.net/p/DelUSQ46.html is the second script

for(var i=0;i10000;++i) print(” “);
mh
is he dead?

who

elvis

this still isn’t a testcase. If we cannot reproduce the problem with a whole file, how are we supposed to help you?

http://rafb.net/p/NNimwk99.html is the first script, the clock and http://rafb.net/p/DelUSQ46.html is the second, the countdown..
its in my index.php, its +- 300 rules

Google for JavaScript dump
there should be a few

print(“test”);

test1

print(” “);

1

my first page includes the second one..

i dont think dump does what i want it too

jseval:

Error: Error: syntax error at line 0: :

hmmm
my gears are turning

it either broke or you’re modifying it right now

someone knows my problem?

what is it

hey is it possible to let a browser run a javascript in the background over a longer time period without bringing up the “slow script” dialogue?

You can’t run javascript hosting ‘in the background’, browsers are single threaded

what are you trying to do
its possible

i have 2 js’s on the same page, it will not work.. the scripts are good if it was one a page, only i cant do that.. so it has to be 2 scripts in the same page..

hm. too bad. i got a script that needs almost a minute to finish its task. and i’m tired of clicking continue all the time

Oh?
I thought you quit lol

http://rafb.net/p/DelUSQ46.html is the countdown script (full) http://rafb.net/p/NNimwk99.html is the clock

you should be able to turn off the ‘long script’ warnings, if you’re just doing this for your own use (obviously you can’t expect others to do the same)

and where can i turn that off?

what you do is make an AJAX call to another page like a do.php?var=(your variables if needed) then what you do is make the .php have a .js script that onload does what you want it to do then spit out a json object in text and have the ajax call eval on the text to get a json object then use the
json object
asyncronys (err whatever) javascript

hm. sounds complicated. its just a little html file that has png files base64 encoded inserted into a jasvascript string. and the script that does the png decoding and drawing to the canvas is inline too. but its so bloody slow…
mainly because it has to do bitarithmetic for huffman decoding

can someone plz help me :’(

whats the problem
explain why the 2 need to be on the same page

i have 2 js’s on the same page, it will not work.. the scripts are good if it was one a page, only i cant do that.. so it has to be 2 scripts in the same page..
http://rafb.net/p/DelUSQ46.html is the countdown script (full) http://rafb.net/p/NNimwk99.html is the clock

is there a fast way to create large tables? i must build a table with 600×900 entries very quickly

i have 2 js’s on the same page, it will not work.. the scripts are good if it was one a page, only i cant do that.. so it has to be 2 scripts in the same page..
http://rafb.net/p/DelUSQ46.html is the countdown script (full) http://rafb.net/p/NNimwk99.html is the clock

hi
can someone tell me how to fix http://pastebin.ca/637307 it makes IE show the Privacy bar and wont let my page work

The paste 637307 has been copied to http://erxz.com/pb/3810

600×900 is going to be monster slow

Jan-: yeah it takes 55 seconds
Jan-: using innerHTML

Eeeew.
Tried it with DOM methods?

Jan-: and a special class that postpones string-concats
Jan-: dom methods where even slower

I wrote something that’d do 100×100 SPANs in about… eh, 8 seconds I think.
But 600×900 is truly huge.

Jan-:which is kinda weird cause with dom methods the browser has additional parsing to do

I found it was a lot faster to render columns of SPANs (so they auto-flow one below the previous) than rows of DIVs.
then you need one additional DIV per column to contain them.

please?
its like 5 lines of code and makes the privacy bar go up

Jan-: well i have tried that too, but on to me the table version was still faster

but i see this stuff all over

Blued, huh, that code doesn’t alter any toolbars..

I heard tables were quicker

i know, it just shows and hides a div

Jan-: building a 100×100 table takes me only 800ms

its not suppose to but it does

http://pastebin.ca/637315

The paste 637315 has been copied to http://erxz.com/pb/3811

buubot, you steal my code!!!!
:p

http://pastebin.ca/12384

i have 2 js’s on the same page, it will not work.. the scripts are good if it was one a page, only i cant do that.. so it has to be 2 scripts in the same page..
bi have 2 js’s on the same page, it will not work.. the scripts are good if it was one a page, only i cant do that.. so it has to be 2 scripts in the same page../b
http://rafb.net/p/DelUSQ46.html is the countdown script (full) http://rafb.net/p/NNimwk99.html is the clock

http://pastebin.ca/637315

The paste 637315 has been copied to: http://erxz.com/pb/3811

http://pastebin.ca/637315

The paste 637315 has been copied to: http://erxz.com/pb/3811

http://pastebin.ca/637314

The paste 637314 has been copied to http://erxz.com/pb/3812

Blued, did you try that code?

still pops up with the privacy bar

Hello there. I am having some trouble with JavaScript. When I set expiration to 14 days, Firefox in its cookie manager says it was set to the end of the session. Here’s my code. document.cookie = ‘remember2={$rm_pass}; expires=1209600000; path=/; domain={$domain};’;

could it be because im testing it locally?

Blued, yeah, try finding your self a domain name, dyndns.org , no-ip.com etc
Blued, or send me the code :p
I’ll put in on http://dabear.mine.nu/blued

make a testcase: a simple page, yet valid and complete, that use both script, so we can test it. There is no need in repeating again and again the same things.

cool, it works when on the site but not locally, weird
thanks dabear

FCK U ALL

lovely.

lol

function x(…) { if (cond) { x = function (…) { … }; } else { x = function (…) { … }; }; return x(…); }

ehird`: also too verbose.

Blissex2, but the most efficient way to implement a function that changes depending on a conditional
if it’s never called, that detection never happens, otherwise, it happens once

Hi there. I’m having some problems with setting cookies with javascript. If you check http://pastebin.ca/637333 you will see how I am doing it. In firefox under cookies it says they expire after the session ends but i set them to end 14 days after the
current day. It’s awfully strange.

The paste 637333 has been copied to http://erxz.com/pb/3813

/server irc.mozilla.org

He’ll twig in a minute

Um, wouldn’t that overwrite itself?
Was it a closure as well or something?

hey has anyone expirience with the canvas element? i’m trying to use putImageData but it throws some errorcode 12 all the time. i haven’t found any working examples either

“dd” at 71.6.194.243 pasted “fff” (1 line) at http://erxz.com/pb/3814

Conceptual question kinda. I have a page with a hidden frame without any src (blank at first). I have a form that targets that hidden frame. The form handling script sends back a header to redirect to a certain location, then it’s done. I set an onload function for that frame that would do
alert(document.getElementById(‘myframe’).location);

In Opera it worked great and gave me the location of the page I redirected it to, but in firefox it remained undefined.
How would I have gone about getting the location of that frame in firefox?
I’ve gone with a different solution now, but I’d like to know what I could have done

Does anybody know name of any good simply book for javascript ?

sorry, not i.

mikedoty, did you try src?

Yep, src was ” unfortunately
In both browsers

strange.. this is src
try to make it visible, just for the test
after you see it really load, try to javascript:alert(blabla.src) , just to check if src is really returing ” , because this is strange…
and show me the code

hi

Ok, iframe in upper-left, page it redirects to just says “success,” so it’s truly loading, then called a java to alert(document.getElementById(‘frameid’).src) and it shows blank http://imagebin.org/9583
I’ll try javascript:alert real quick

anyone doing freelance? what kind of contract are you using?

anyone i do work for owes me their life in servitude
thats my contract

How bout 50 bucks instead
:P

mmm..ok.. i’m hungry
anyone implementing encryption in their js?

that’s strange, mikedoty. 1 sec
psyjoniz, encryption?

yeah, encryption

what for?

It’s not a pressing problem shes3k, seeing as I found an alternate good solution, but I am curious as to why it didn’t work. Wonder if it had to do with not setting a src to the iframe or something

because not everywhere has ssl readily available

psyjoniz, so you mean with ajax ?

or passing in a form, but yeah, ajax too

okay… so… no, not me
w3schools is dead?

not loading for me either

?

http://www.quirksmode.org/js/iframe.html
I treat the iframe as if it were an object and change its src property:
document.getElementById(‘testiframe’).src
I have heard, but did not test, that Safari loads any page twice when you use this method.
he says that it works on all browsers
(that he checks on)

Hm
I set its src = google.com on first load thinking that having a src from the get-go might make it more cooperative, but after the form submission and the redirect in the frame, it still claims its src as google
I’ll play around with it later and see if I can’t figure it out, don’t want to spend too much time on a curiosity

hmmm.. interstring

It’s for an avatar upload thing, ajax-ish
I have a file input where you select the thing, and it targets the frame

hmm

success.php”) (assumign success of course)

what about calling a function from within the frame?

And that’s about that
Within the frame?

mikedoty, the Location header only takes an absolute URL

yeah, parent.upload_success()
yeah, parent.upload_fail()
or whatever

Ah, yeah, that’s what I’m doing now shes3k, my alternate solution

oh. cool
Twey, heh?
never heard of that
i’m using relative path for years… never had a problem

Well local locations work fine for me
I guess I might just consider myself a delinquent on that one :P

« The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For
3xx responses, the location SHOULD indicate the server’s preferred URI for automatic redirection to the resource. The field val

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

Aw *man*
My dvd is stuck in this DVD burner we just took out of my PC.
bMy dvd is stuck in this DVD burner we just took out of my PC./b

Fight the power! Stick with local redirects :P

lol
i’m with mikedoty

If I just connect up the power to this DVD drive, will it open?

Wow, yeah, let’s ignore the standards, it’s not like they’re there for a reason or anything

We’ve won Twey over!

Jan-: Unlikely

Twey, i don’t really see when they are telling to use full urls

Jan-: They usually have a little slot underneath that you can stick something in to open them
I just quoted it at you

i know, i read it

“The field value consists of a single absolute URI.”

still couldn’t find it. probably beacuse my english sucks
uri is full, not realtive url ?

“Absolute”

ooh, do they?
what form does this slot take, and into it would I poke what?

Jan-: Tiny little hole, you can just about fit a paperclip in it

Bummer.

Heh
Jan-: No paperclips?

well, that’s sucks

No hole, at least none I can find.
If it’s really tiny I might just not be able to find it.

It’s not so tiny you can’t feel it

I think I broke it.
There was this uneasy cracking sound, and now when I turn it upside down it rattles.
bThere was this uneasy cracking sound, and now when I turn it upside down it rattles./b

Haha
Oh dear
Oh well, they’re not *too* expensive.

Jan-,

image ?

I used it as plus symbol to extract my tree

huh?

Category li

I need to bind event which triggers click on plus.gif icon

don’t think that is possible directly
onclick would only work on the text

mm

you should rather use an img

ok.

http://pb.adullamirc.net/90 –anyone know why Ie hates line 15 of this?

http://pb.adullamirc.net/90
Hm, sorry, I haven’t used that syntax in Javascript before so I can’t say

what happens?
is the problem actually that line or what happens in the Tab constructor?
s/Tab/Tips/

any german speakers around?

Ich bien ein kartoffel

nein *chortle and guffaw*
Zweimal nack Munchen, hin und zuruck!
*nach
bah

achtung!

pero, hablo poco español..

hey everyone

Hola!
sup?

ingeting

Que bueno que estamos hablando espanol finalmente!

anyone have any idea why a method wouldn’t be able to write to a global var? or a variable instance in its object using this.variable ?

Ich doche meine grandfarter in das morgen.

I assume Pixelbeschleunigern is “graphics card”

cousinIt, coad?

I can write a sample of it. This is a large code base

mikedoty, sí, pero prefiero íngles, or whatever

Awww, creo que prefiero espanol, pero tristamente no se bastante palabras par charlar en general, mas menos hablar de programando
:P

okay, think I got the idea, but I speak English more fluently

Nobody was into me showering my grandfather in the morning? That took me *three years* of German classes.

Oh, if I’d tried I might have been able to piece that together somewhat

I actually understood all except “doche” :p

morning :P

Either that, or I woudl have guessed you gave your grandfather the mortgage documents

Whoo, I was still top of the express set.

couldn’t you try danish or swedish or something? :p

Swahelli!

“swahili”

Yeah, I suppose I’m meant to be able to spell foreign things now… bahh

http://pastebin.com/dd04612a

Jag heter Pär och er från Sverige!

and assume that before pobj new theres an obj new also

hello
anyonw know how to change the type property of a field using js in IE? In ff I just do document.formname.fieldname.type = “text”
but in ie it doesn’t work
anyone???
in IE I can get the type of a field if I do alert(document.formname.fieldname.type) but I just can’t set it

hi

Acs, use document.getElementById and set an ID on your form

dabear what for?
is there no way to just set it like in FF

and document.getElementById(‘foo’).field.type=’foobaz’

document.formname.fieldname.getAttributeNode(‘type’).value = ‘text

any idea?

thanks dabear and grimeboy

cousinIt, No sorry, I hoped with a paste someone else might have but it seems not.

grimeboy, or setAttribute() …

r1=/index\.[\S]*/i;

dabear, Ah, yeah, missed that one.

dabear I tried you document.getElementById(‘foo’).field.type=’foobaz’ and it didn’t work

it does work

also tried yours grimeboy and it also didnt work
dabear in FF

you, sir, are PEBKACing

works great but not ie
dabear I am what?

PEBKAC

don’t know what that is, just know that what you told me doesn’t work

verboz,
it’s a regex

yes
what does means

dabear it says it can’t get the property type

sample page, please

“index” followed by “.” followed by anything that isn’t \r,\n,\t or space
0 or more times

is an AMD Athlon 64 X2 6000+, 2Gb of 667MHz RAM, and an nvidia 8800 graphics card a “good PC”?
This week, at least?

`regex explain @ verboz

regex explain: Dissect your regular expression at http://rick.measham.id.au/paste/explain.pl

dabear http://privatepaste.com/47qeE9DDRp
I call the function on another part of the code that I don’t show there, but it wasn’t relevant
anyone?

Acs, that SHOULD work
what happens?

but it doesn’t
that’s the problem
it FF it works in IE it’s says it can’t get the property
and that the command is not supported

var elm = document.getElementById(‘contador_form’).contador_escondido; elm.removeAttribute(‘type’); elm.type=’text’
will that work?

let’s try it

:/

*tug*

only in FF
in IE it gives me the same thing

Aww, my feet are peeling at the moment too.
Acs, What are you running, IE3?

oh, mine don’t peel
I do too much walking for that
I have to grind it off with pumice stones and attack it with my fingernails.

Wait, I’m not walking enough?
Oh well.

are you overweight?

6.0.2900.2180
I know that there is version 7

Acs, then I suggest you remove the node, and append another with type set to text

but I am going to stay with 6 for awhile

I don’t count myself as overweight but I can’t tell anymore.

dabear remove the whole thing???

Maybe I’m actually humongous but in denial.

whats the time at yours

Acs, var form =elm.form; form.removeChild(elm) and then var input = document.createElement(‘input’);input.type=’text’;input.name=’foo’; form.appendChild(input)

Jan-, Anyway, you’re immense. A big bear strolling up hills.

… all this because IE is so stupid

I am?
Wow

damn

I thought I was five two and a bit, and a hundred and five pounds soaking wet.

Bah, pounds.

dabear thanks for the help

But fine, you’re a stumpy walker then.

I am algo going to bed lol
bye

I’m not *stumpy*
I’m *runty*

it’s 2 am here :p
*tired*

I’m sorry but those are the only two types of walkers.

erm.
OK,

And Christian/Nazi-hippy types, but they never last long.
They come out with massive backpacks and tracksuits and those funny sticks.

Don’t tell me.
You’re IRCing from a satphone in a clearing halfway down the Appalachian Trail

Obviously. If I knew where that was. See, I’m such a hardcore walker that I have completely discarded language.
I know only what the animals’ names for places and things.

human translator.

babelfish can do that?

The babelfish has very advance heuristics, and it only tingles after a while.

hmmm, i’m looking to use an onClick (on a thumbnail image) to display a larger image + some info in a medium sized div in the center of the screen over the top of my other data. can anyone point me to a nice tutorial or related document?
or if there exists a small, easy to insert script to do it that you know of, that would be cool too

I believe something called ‘lightbox’ does exactly what you’re asking. I’ve never used it, but I’ve seen others with it. You’ll have to google

k, thanks

hey everyone

hey, Woosta
how’s Aus

tags to the DOM — i want the method which adds that script to block until the script is loaded and prepared in the DOM, so that when the method returns, the things in the script it includes are available. is there any way to do this?

Hi everyone!
I have an IFrame in design mode, and need to know the HTML just before where the caret position is. I only need this in IE. I’ve tried using movestart on the selection range to no avail. Any other ideas?

var string = new String( “abc”); string.replace( /b/, “xx” ); alert( ‘after: ‘ + string ); # why doesn’t this work?

var string = new String( “abc”); string.replace( /b/, “xx” ); string

{ 0: a, 1: b, 2: c}

^^ because strings are immutable
you really want:
var string = new String( “abc”); string = string.replace( /b/, “xx” ); string

axxc

okay – thx

hi all
guys, is ok to javascript script try/catch block without braces?

Yes

thanks Twey

You could have tried it and seen, really

well I’m foolproofing a code
and they mix a lot of styles
with and without braces
2 spaces indents, 4 …
I’m trying to fix all that
thank again

As with any other block in most C-like languages, you can omit the brace where there’s only one statement

that’s what I thought
but still it was a try/catch statement wo wanted to be sure
*so

browser chat script with Javascript. Is AJAX the best way to go?
bbrowser chat script with Javascript. Is AJAX the best hosting way to go?/b

I don’t want to mess with flash. java or other plugins

Shadow_mil, yes
someone here is building ajax chat right now
i’m building one too, but it’s in very early steps

shes3k, ok then. Where is the readme for ajax or what ever, where do I start?

building one what, shes3k?

ajax based chat

Hello
I am having problems with a script
Would anyone care to help me?
I have no idea what the problem is, I have combed the code multiple times and nothing.

you have posted it somewhere to look at?

http://pastebin.com/m545a1649

is it possible to create your own objects in JavaScript that can be inserted in a DOM tree? Like I want to create a specialized object with all sorts of useful methods (a Slide, as in part of a presentation), and I want to replace a bunch of elements in the DOM with extended Slide
objects..

in the constructor of the prototype of my slide object, I’m able to recursively copy all of the properties from the element passed into the constructor, so for all ways I can compare, it is a perfect copy of the DOM element in question, but when I try to insert it into the tree I get bitched
at.

psyjoniz, any luck with my problem

change ‘Function’ to ‘function’ in your js

I’d create a DOM element first, then append to it any methods/properties I need

I’m trying to do that
you guys have a favorite paster?

Thanks psyjoniz
pastebin.com

np

pastebin.ca
I ahte that about coding

http://www.psyjoniz.com/irc/antihaxer/

Little stuff fuck up everything

if you care to see it work :P
totally

antihaxer.com/sort/

http://pastebin.ca/637639

The paste 637639 has been copied to http://erxz.com/pb/3817
The paste 637639 has been copied to a href=”http://erxz.com/pb/3817″http://erxz.com/pb/3817/a

Comments off

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

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »