Archive for Uncategorized

Ok this doesnt make any sense Anything wrong with this code onmousedown=return drag_onevent this function drag_onev

thanks

The first is an anonymous function, the second is an object

in my opinion, there is no difference between function & object in JS
because object is implemented by function

Eh?

I guess the 2 sentence have same effect
just guess, not sure

thanks so that is why I get the error message 'something?' is not a function when I use the newer library that uses somethingB format

is there a way to enforce proper floating point operations?, I use a document.write() to print the result of 4.2*3 but I get this: 12.600000000000001
what's with that 1*10^(-15) ?

not sure about in javascript, but in most languages floating points often have really small decimals at the end like that
floating points are just not super reliable
in most languages they say to use integers as much as humany possible and divide them by powers of 10 to turn them into floats if you really have to for some reason
or use rounding
lol

mmm

like to 42 * 30 instead in that example

kniolet, rounding would be sufficient if I use it in the future , suppose I use another high level language like C/C++, does it automatically does a defined decimal rounding?

in C/C++ you often have the trailing .000000000001 or such also

I see, gcc rounds the printf output to 12.600000

in javascript any number is represented as a 64bit floating point number

( 4.2*3 ).toFixed(2)

12.60

If you stringify a number, be specific about the stringification

jseval (function (){ 4.2*3; })();

Error: Error: missing formal parameter at line 0: (function (

:/
jseval (function (x){ 4.2*3; })();

Error: Error: missing ) after formal parameters at line 0: (function (x

(function (){ 4.2*3; })();

Error: Error: useless expression at line 0: (null)

(function (){ return 4.2*3; })();

12.600000000000001

(function (){ return 4.2*3; })().toFixed(2);

12.60

print "moo"

Error: Error: missing ; before statement at line 0: print "moo"

write "moo"

Error: Error: missing ; before statement at line 0: write "moo"

write "moo";

Error: Error: missing ; before statement at line 0: write "moo";

(function (n){ if(n==0) return 1; return (n * arguments.callee(n-1));})(5);

120

(function (n){ if(n==0) return 1; return (n * arguments.callee(n-1));})(3);

6

1*2*3

6

1*2*3*4*5

120

(function (n){ if(n==0) return 1; return (n * arguments.callee(n-1));})(12);

479001600

buubot++;

bored ? :P

hehe
that would require a y-combinator in most other languages :P

hiya all, I need to retrieve the height of an element (document.getElementById('foo').style.height) and the actual element doesn't have a height set - it's supposed to get its height from the amount of space its contents take up.
so, I need to get height from said element, what are alternate ways of doing so?

dav7, element.offsetHeight

oh
k
:P

`dom
`js domref
Anyone know of a good dom reference? .clientX is working fine in FF but not IE
Ok, this doesn't make any sense. Anything wrong with this code? onmousedown="return drag_on(event, this);" function drag_on(ev, el) { … drag_mousePos = [ev.clientX, ev.clientY]; … } ?
Works fine in Firefox, but not in IE, yet IE is supposed to support event and has supported clientX since v5
"clientX is null or not an object"

is there some way to return the class of an object?
so for the window object, to return Window

constructor ?

how would I do that?

object.constructor

window.constructor returns function()
altho, it looks like it works anyway…

function something else zaydana?
http://www.w3schools.com/jsref/jsref_constructor_array.asp take a look at the examples in the Try-It-Yourself section

I'm very new to javascript coding. Is it possible to tell this statement to append to what's already in place? document.getElementById('span_result').innerHTML = receiveReq.responseText;

jherrera - it works in firefox, but not ine IE. But I think thats to do with the fact i'm trying to change Window's prorotype. .constructor did work, thanks :-)

aagh, hey zaydana, does window.defaultStatus works in IE?

alert(window.defaultStatus) gives me a blank box
is that how i'd check? :-p

no
try this in body
script type="text/javascript"
window.defaultStatus="This is the default text in the status bar!!"
/script

works in IE, not FF

yep, I use Firefox/2.0.0.6, didn't work
does anyone know another way to change status bar besides window.defaultStatus ?
zaydana, I found how to do it in Firefox/2.0.0.6 if you're interested

found what? status bar?

change status bar text

ah right
how you do it?

http://groups.google.com/group/mozilla.support.firefox/msg/1e6f7285888c8b70

hmm, thats not *really* a solution :-p
but worth knowing anyway

it's not that FF doesn't support it, but the option is deactivated

yeah

however, I have one more problem though

link in status bar not the text I set in the function onmouseover

I doubt you'll be able to get around that
after all, the property is named defaultStatus
is there a plain "status" one?

kk, let me try it
nope
same result

ah well

well, there must be a way

I wish IE would let me touch Window.prototype :-(

I've seen this annoying websites that don't let you see where they are redirecting you when you hover like say an image, it just shows you another text

big, steep idea… but write your own window.prototype "HAL" layer for IE

oh god no :-p

lulz

its not that important

that's good then
:p

ah wait
OH YEAAAH, it works

what works?

forgot to refresh the website

~_~

but if I could change it, i'd be able to make a window.ondomload event which worked transparently with my events system

nice

looks like that aint happening though :-(

ehrm

:/
?

but I removed the href , so it doesn't matter

heh

dav7, I have this image that has an anchor, I want to set the text "MOUSE_HOVER" in status bar when the image is hovered

righty
right

dav7, so I have this function that is called when onmouseover event is triggered, well, it works if no href is set in the anchor
but what about if I have the href?

hm
a href="#" onmouseover="window.status = 'This message will display in the window status bar.'
oops
a href="#" onmouseover="window.status = 'This message will display in the window status bar.';" onmouseout="window.status = 'This message will display in the window status bar.';"link/a
^ jherrera
btw, just for the fun of telling you all, I implemented this drag-to-scroll system like Adobe Reader. the AJAX part isn't finished yet, just the UI, but take a look (and drag the test content):
http://dav7.net/ajaxreader/
xD

thats pretty nifty

dav7 nope, not working

0.o
zaydana:

http://pastebin.ca/653310 dav7

The paste 653310 has been copied to http://erxz.com/pb/3986
The paste 653310 has been copied to a href="http://erxz.com/pb/3986"http://erxz.com/pb/3986/a

hm
:P

looks good

I love how you can edit a file that doesn't exist
using Firebug
Woosta:

most browsers don't let you access the status bar by default anymore
You need to allow it specifically in the preferences
(Note too that FF3 will not have a status bar)

Woosta, yeah I did it, onmouseout works, I only have problems with onmouseover

If one works, but not the other, you have a fairly simple problem :-D

yep, Woosta, I've pasted my code, can you check it out for any error I'm missing?

Though it might be a more recent security fix
When you hover over a link, maybe they don't let you change it in order to stop phishing

mmm, yeah it's probable

AHh .. I see the problem

aha
I do too

You're linking to w3schools!

Woosta yeah, but what's the problem?

w3schools suck.

well. I definately like FF3's lack of a status bar, considering I don't use one myself in FF2

I'm guessing your browser knows that and is refusing to cooperate

hahahaha

html
head
/head
body
a href="#" onmouseover="window.status = 'This message will display in the window status bar.';"x/a
/body
/html
OOPS
GREAT

that's the reason it's gone .. it's a waste of real estate

_

Grrrrr

yep
sorrrry

NP .. accidents happen

I'm near the edge of coping with Windows' $*&%#*&^%#*&$%*�*%� clipboard… I'll be writing a program that clears it whenever anything goes into it if this keeps up
anyways

I use glipper/klipper

question. if FF3 isn't gonna have a status bar, what are all the status-bar-using-extensions going to do?
heh

the select text, then mid-click to paste is nice

yeah
I need a screen just dedicated to displaying my clipboard

See http://rick.measham.id.au/paste/status.test.htm — I'm guessing I was right

hah, back in my windows 98 days, I would do anything for having a screen just dedicated to display processes so to kill them and make the PC didn't freeze every x minutes

The second google link at the bottom shows how phishing can still happen :-D

Woosta href is showed, what about IE zaydana?

IE what?

ehrm 6/7
Woosta, which second google link?, I just see one

reload
IE is in a world of its own. I've no idea what it does

Firefox/2.0.0.6 show both google links in the status bar

But the second doesn't really go to google :-D

hahahaha, that sucks man

So the prohibition on status changes to ward of phishing is really rather pointless :-D

something weird happens though
if I press the backwards button, and hover on the second link, it shows me the real link
if I refresh, it shows me google again
so it actually shows me the real link, once I've been phised

yup
Coz what happens is when you click, JS changes the href
Then the new href is followed to yahoo
Click 'back' and the page hasn't reset. The href is still pointing to yahoo

does this channel have folks preparing for SCJP5?
anybody going for SCJP 5 ?

hey all whats the javascript command to say
alert('hi');
sleep(10seconds);
alert('10 seconds has passed');

alert('hi'); setTimeout(function(){ alert('10 seconds passed') }, 10 * 1000);
`dom ref setTimeout @ Fr0Gs
`dom ref window.setTimeout @ Fr0Gs
Bah, stupid bot

is there anything like instance.constructor that works in IE?

it works in IE too, for JS objects

not working for me?
at least, not on window, object, and other built in objects

DOM objects are not JS objects in IE

oh poo
that ruins my fun
so… does that mean theres no way to change them?

you can give them properties individually; they just don't have prototypes

ah right
well thats just fucked up my entire idea :-(

How can I "load" my base.tcl file from all my other tcl script files?
like, I want to do a "package require myPackage"

#tcl ?

ah
thought this was #tcl

it is, we just changed its name to #javascript to fool you

orly

test

if i'm using javascript to validate a form that is being included with include() ?, would that affect documents value in 'document.form.name.value' at all?

hello, it is allowed not to set maximal array length during array definition, like var arr = new Array(); ?

yes

Can array `key` be string, not number?

can anyone tell me why, if(document.formname.subofform.value == '') { } wouldnt return true when form is named, 'formname', & a member of it is 'subofform'?

Can i dynamically add array elements like in PHP - $arr[] = 'new element';

i thought maybe because the form it is being tested against is included & thatd affect the value of document.?

utopia_, try id="myfield" and document.getElementById('myfield');

cool thanks
ill try that

document.getElementById('myfield').value *

you can add elements to an array with push()

JanisB, is 'document' an array that takes on values if a file is included using php host so i could narrow down the prob ?
or is it treated just as one document?

`document` is an object
that contains a lot of trash, like all forms, they field values/names e.t.c…

ahh, day 1 learning JS
i guess ive alot of reading to do cas this isnt near working

which keycode is the enter key? 10?

ok got it, it's 13

google rox, yea

if I have a color, for example #FDAABF then can I get the opposite color by xoring this value?
bif I have a color, for example #FDAABF then can I get the opposite color by xoring this value?/b

Comments

she doesnt even know what shes creating and shes trying to create tables one of thosee tables being called calendar

s

is it MySQL? it's a TIMESTAMP datatype, or a DATETIME?

PovAddict, i haven't added the field yet, im neutral on that

I can't help you decide, sorry… I have had trouble with both :P

PovAddict, oh dear :O

aria2 is the *best* if you want to download, for example, a single multi-GB file from multiple mirrors at the same time… but I don't know of any multithreaded crawler (other than free (or paid!), closed source, and Windows only)

NemesisD go with integer and use time() function

heh

in php

unix timestamps ftw
especially if you use 64bits to avoid the Y2038 issue
Unix's version of Y2K bug

but what if i want mysql to do the work figuring out the timestamp?

to store current unix timestamp on an int field… set field=unix_timestamp()

its kind of a just in case field, no scripts will access that field

to store current time on a timestamp or datetime field… set field=now()

hello! i am trying to get image magick wrapper working with php on windows (xampp). does anyone here have experience doing that?
sometimes i wish i was using the same operating system as my host

dont say that
you dont mean it

that i should be running linux? hell yeah i should.. unfortunately it's so damn time consuming

oh nm i thought your host was on windows, and linux isn't too time consuming in my experience once you get everything going the way you like it
is integer literally a datatype?
PovAddict, should i use bigint or mediumint or what

int is 32-bit, mediumint is… I think it's 48 bit, bigint is 64-bit

who uses mediumint?

people that need to store really big numbers?

i think ive used it

i suppose.. i guess if i was ever in that situation i would go big

MEDIUMINT is 3 bytes according to php mysql web hosting website

… really?

wait mediumint is smaller than int
ooh burn

yeah so I got that wrong…
it's 24 bits
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

http://www.google.com/search?hl=en&q=24+bits+in+bytes&btnG=Google+Search

I usually seem to go with int(10) and I don't even remember what that means :P

PovAddict, but int is big enough for now() right?

now() won't give you something you can store on an int

oh wait yeah

it will store it in the format YYYYMMDDHHMMSS which is quite annoying to work with

yeah your living in the past

use unix_timestamp()

ill write a function for it
why

0 on january 1st 1970; works nicely on an int until year

and when does now() break?

1000000000000000…

first, if you want to use now, use a datetime field
and, arithmetic screws up
you need to use special mysql functions, you can't just substract 'em
how much is 20070101000000 - 20061231235959 ?

i don't really need to handle the timestamp, its just a precaution so if theres some sort of descrepancy i can look when something was added

it should be 1 second, but if you blindly substract them as numbers… :P

8869764041

281 years
fun-to-find bugs

Is it wise to store images in databases, or is it better to store its path and link to it?

not in db
that will take massive amounts of space

it is better to store its path and link to it
definitely

Each has its pros and cons

okay, thanks

store the path to it in the db

such as?

then you can just link it up

PovAddict, ok so INSERT INTO t1 (`foo`, `bar`, `timestamp`) VALUES ('oof', 'rab', now()); ?

No
unix_timestamp

yes, after you have created the table with timestamp being a timestamp or a datetime
if `timestamp` is an int, use unix_timestamp(), not now()

it will be datetime

now() will do then

i just want to call the field timestamp because it sounds cool

Eh, I don't have a list off the top of my head, but each one has its pros and cons but using a filesystem is adequate in most cases.

use 'foo', 'bar' and 'thingy'
will make things interesting in a few months when you try to figure out what they are

lol

haha, yea. I've done that before.. ooo the fun.

time 10:57pm
latin zone :P

and I named a column after a MYSQL keyword, which was oh so fun too.

1234567 && 987654 and so on

accidentally, of course, but I was lazy on quoting. Go go sql errors

Though the final choice is yours, I just don't see many people using datetime fields

Slynderdale, normally id do that but it wont have to be manipulated, its a field that will be ignored by all scripts and will not be manipulated
wait i shouldn't call the field timestamp then, doesn't that count as a mysql keyword

if you use `quotes`, I THINK you should be fine

And why not use timestamp instead? You never know when you might need to rely upon it in the future, but heh, its your script. Datetime isn't bad, just not as easy to work with.

I have seen arguments against TIMESTAMP
but well… isn't it good we have the choice…

Slynderdale, because unix timestamps aren't very readable from a simple query
select * from bleh;
which would seemingly be solved with datetime

rofl, i just created a new vhost, a directory i thought didnt exist, restarted
it was full of sql dumps XD

URL?

http://www.webmasterworld.com/php/3012922.htm That page has some example functions to convert datetime ysql fields into timestamps and so on
a href="http://www.webmasterworld.com/php/3012922.htm"http://www.webmasterworld.com/php/3012922.htm/a That page has some example functions to convert datetime ysql fields into timestamps and so on

Slynderdale, i will not be retrieving the timestamp/datetime field with php though

wow

poopy

wtf happened ?

chansplit

oh

netsplit actually

that was weird

it happens a lot

preg_split :P

http://www.youtube.com/watch?v=gG47XxbFGow&mode=related&search=
ha ha! revenge

hey does anyone know how to make text bunch up around an image?
like lets say i have a picture 89×290 (a long picture)
i want the text to stay with the picture without it breaking

how is that a PHP-related question?
are you editing the image host with GD?

sounds like an html/css question to me
try #web

it is but theyre all deeaaad

echo "img style='float:left;' /";

#css

hey its php

scragg, your so clever

"channel is dead" is no excuse to ask on another where it's offtopic

hmm when ##php is dead I should stroll on into ##csharp and ask

or not

how can I change the page, without sending headers?

why no headers?

because i've printed and echo'ed some stuff before

use output buffering

I want to change page, after all php work is done
in php.ini?

what is the best way to do this Select column from table where column = $title i want to know if there are any results i tried mysql_num_rows but then i get a warning

is that what you usually do?

ob_start(); echo stuff; send headers; ob_end_flush(); echo some more stuff…

huh
so do I have to define ob_start()?
or it's a built in func?

http://php.net/ob_start

thx
is this what you usually use?

Hello
can somebody tell me if there is an error please

est ce qu il y a une faute dans ce script

$headers="From: ".$email1;
mail($email2,$titre,$message,$headers);
include("anonymous2.html");
?

impossible to know from that
you tell us; is it working incorrectly?

no just if there is an eror in this code

Le-Moche, as you present it there are no syntax errors

cythrawll ok thank you

Le-Moche, how do you know if there is an error?

if that's the only question… Try It And See!

cythrawll don't know lol

php interpreter will tell you if it sees an error
better than us

is there in a site ?

Le-Moche, then I think you better re-evaluate your debugging!


you're coding PHP without having an interpreter?
"coding blind"?

PovAddict i don't code , it is only a friend who asked me ..

replace 'you' with 'your friend' on my previous sentences then

Pov, do you know if I can use ob_start(); all my code with echoes and other funcs 0b_end_flush(); send headers;?

ob_end_flush sends all the stuff you echoed

PovAddict i don't know if he have ..

you need to send headers before that

ok. my intension is that, when all the code with echos is processed, then send headers..

PovAddict
i want some thing like that
http://www.x-mindfreak.com/index.php

that's absolutely basic PHP
so go learn

I should probably just call a js?

Lol

what on earth does JS have to do with this?

well, I know I can do that with js,
but how do I do it in PHP?


JS is client side
PHP is server side
nothing to do

omg

btw, if you send the headers to redirect, the user will never see what you echo'd, so I really don't see the point

I need to change the page after the browser renders php outputs…

why? you first send content, then load another page? what is the content for if it lasts a second?

ic, well I though PHP would have some sort of time out function..

you're still mixing things up
PHP is server side

yes

j #pperl

you are right
so, basically if you are going to change the page, you can't output any message, like files uploaded successfully, changing page..?

that's not done with headers

so, how could I do that?

you can use either JS, or output a Refresh meta tag
in either case, automatic redirecting after a few seconds is a bad idea in concept

you say that a headr cant be used if php has posted some content?

everybody does it, but it's a bad idea

so how do I make a logged in bar
I want to have something like

ic, so, after all my code is done, I simply echo a JS?

the headers are sent before the contents…

Welcome, (username) (logout)

heh

we're talking about completely different headers

where username is obvious, but logout is just a link to the logout page
huh?

everybody is talking about different things
lol

i was not taking about YOUR conversation

hehe

I just set my attention to the channel just now
and am not aware of what youre talking about

then why do you comment about it? :P

you say that a headr cant be used if php has posted some content?

a quick scan in the buffer reveals you were talking about headers just as I had a header question
…a coincidence

oh

you see, I am working on my template, when its done, im pasting it in all the pages that require the user to be logged in
I just finished my menu placment
which was a pain
and now I need to add a way for the user to log out
because at the moment, they stay logged in indefinately
as a matter of fact
how can I set a time limit on how long they can stay logged in?

are you using cookies?

no, im using a session variable

ugh, no idea then

last time I tried to use PHP's builtin session stuff, I decided it sucked

oh it works quite well for the login stuff
i dont really need a time limit, tbh
now then

Pov, how can I check with php if a mysql query was performed?

so to display a variable value, i just use echo?

it's recommended that you use a time limit

mysql_query returns FALSE on error, like the manual clearly says

ic

have any idea how to do it with php sessions?
i dont want to use a cookie

sessions use cookies anyway

aye, but I mean using cookies in other ways
other than using the built in feature of session

uh
I assume you have checked the docs?

I dont think there is

where's php-bot :o

because cookies are the only thing transferred over pages

nice, 2.15 am
my parents will kill me :]

well, sessions can be implemented using GET requests
but i can't imagine that that would be the default.

I just thought of that

$_SESSION['username'] = $username;

try it and see?

hey guys, okay so sending an email. how to change the width of the word wrap. Is there a way? Discuss…
I'm guessing it's specific to the program, I'll manage it myself

please look at the PHP manual before asking questions on IRC.

anybody
help with GD image crop
imagecopyresampled($image_p, $image, 0, 0, 50, 50, 150, 150, $wo, $ho);
this code stretches only the original image to 150×150

specifically, the comments.
It took me very little time to find, excepting my slow net connection.

is there a way in a foreach loop to goto the next line without evaluating the rest, rather then putting everthing in an if statement ?

!+continue
!+func continue
Anyways, try continue;

you dont have to answer any question I ask. and if that manual was better put together, I would reference it more

thanks

i cant stand badly put together manuals. take the msdn site, for example. it was horrid to find the information you needed, but now they wisened up and its simple to find stuff
haha, and session_destroy() doesnt seem to work
oh wait
I forgot

You aren't very good at reading the manual. it took me to go through the table of contents, go to one page, go to the next, more obvious page, and read the first comment.

yes it does

If you don't read the manual, don't ask stupid questions.

'you arent very good at reading the manual' heh, that much is certain, and I am not you. just because you find the interface easy to navigate though doesnt mean I will
please do not compare what YOU are capable of doing with what I am

You can also quick loop up information like php.net/session_destroy oe php.net/sessions for that matter

just ctrl-f for expire on the session page…

heh I resolved my own question on that one

it doesn't take much intelligence, tbh

I have resolved the issue
nice
it works
whee

I hope you aren't using a messy solution. :/

not at all

the correct solution is ini_set("session.gc_maxlifetime", $time); , as the comments say, anyway.

you cant use session_destroy() without calling session_start() first.

scorch, I was fixing my logout page

last time I checked you were looking for how to set a time limit.

what are you talking about? no no I had set that issue to the side
haha
but, thank you

well you have the solution to it now

hi, how do I generate a random number between 1000000000,9999999999?
mt_rand(min,max); isn't working this way

in mysql, is there a way to automatically delete a row from a table, if one of the columns in the row is less than a certain number?
hamyai, I'm not sure its possible to have an integer that large

HaMYaI, php.net/rand

he is saying between a million and 9 mil…

no he isnt…

sorry

thats one trillion

heh

yeah, but from my searches mt_rand is better than rand

it doesnt matter
currently the largest number php can hold may be smaller than that
in that case, you are sol

it produces larger range probably
umm, in my case it's too big I believe
is there any other way?

thats what I just said
no

DELETE FROM tablename WHERE column certain_number;

I dont want to constantly run queries like that
I want mysql to automatically do it

i c, that i'm not aware of

when using the system() function is there a way to put the output of that command into a string, the only info i can find is if the command returns true or false

strstr(strtoupper(substr($_SERVER["OS"], 0, 3)), "WIN") ?
$sep = "\\" : $sep = "/";
i see "WIN" there. does that mean windows?

It's a terany operator.. strange one though. It's basically a one line if/else

the explination was saying something about it being platform independent
http://www.captain.at/howto-php-sessions.php
im trying to understand that

it looks like its testing the os of a browser probbly

if (strstr(strtoupper(substr($_SERVER["OS"], 0, 3)), "WIN")) { $sep = "\\"; } else { $sep = "/"; } would be one way of writing it, and yes, if the OS is windows the seperator is \ if it's something else, the seperator is /

ah ok

What someone probably wanted was DIRECTORY_SEPARATOR … heh.

yay
huh
directory_seperator?

Yes, it's a constant, already predefined for use.

Why donot use PHP_OS?

you mean that line can be rewrtten?

Yep… $sep = DIRECTORY_SEPARATOR; would be all you need.
Assuming I'm spelling it right.

seperator

See

i can include all that stuff in my config.php before the session_start(); function, right? or does that stuff need to be called only once?

hey can any1 help me

neo_, any1 is not here right now. Sorry.

hmm i dont think it would matter, as long as it is called before session_start()

hey i am really having a prob ,plz dont make fun

session_start must be called before any normal output is sent to the browser.

Then type properly and we'll help.

s/browser/user agent/

i am using a ubuntu x64
and i can't download flash

Does the exciting PHP part come in now with explosive blazing action, or what?

I suggest you try #ubuntu then. This is ##php - not a place to ask about downloading flash into Ubuntu.

ok

hahaha
that example does not work
i get 'permission denied'

What's the whole error message?

mkdir() [function.mkdir]: Permission denied in …/config.php on line 92

What OS?

OS X
Unix
darwin

Hmm… so permissions should be similar… well, you need to allow read/write/execute access to your web server's user so that it can create the directory.

oh thats right!
i created limited access for this user
but…
I was told to create limited access
should I give the user write access?
or is that not safe?

This "user" is the PHP engine?

oh wait
hah

If you're wanting to make a directory, then yes, the user will need write/execute access to the parent directory.

If you don't need the permissions, fine, you shouldn't grant them, granted.

im thinking of something esle
i was thinking of my mysql user
huh?

damn.. my english

you can't tear things apart with hammers
and besides

Sure you can.

no, you can only crush

It just takes much much much more patience.
And you need to use the pointy end.

wait i am confused

with an enter key?

is this the mysql server that is doing the folder creation?

nevermind.. my English suck.. keep making fun of me

You can also take things apart or crush things with an Enter key, but I would recommend a hammer…

the mysql user, yeah

so was I correct to say that I need to give the mysql user more access?
ah ha!

No, it's PHP itself, running as your web user.

?
youre givnig me conflicting information

which is the mysql user
and not PHP

ah I see

Er, how can you create a directory through MySQL?

afaik, anyway. My MySQL installation has its own user

soo what do you all think? is it safe to give the user access to create folders?

You don't. It does.

MySQL is not only for PHP *sigh*

No… really?!

mysqld is a service, BigE.
Well, which user?
It does not imply that the error is a PHP error.

that is easily explained by PHP being the program using MySQL

can someone explain the diff between == and ===

well, i have root, which has all access of course, and trunk, which php/mysql uses to save data

MySQL throws an exception, PHP relays it to the user

The manual can. Please read it.

Wow… okay, you're a bit off.

trunk has limited access

i searched the manual couldnt find it

mkdir() [function.mkdir]: Permission denied in …/config.php on line 92

Notice the message there… PHP message, not from MySQL.

I can find it. Perhaps you're not searching hard enough.

I thought we were talking about MySQL.
My mistake.

You were misinformed then.

What's the original problem again here?

Jafet can you give me the page i should be looking

No, not informed at all. I never read up, just went with the repeated references to a mysql user.

No pages matched your query

Now, back to the problem… to solve that error message, your *web* user that runs PHP needs write/execute access to the parent directory where you're trying to make a directory.

ok

classname

Comments

ive got an XML Document object it appears to have many of the same elements as a normal DOM document childNodes

I don't suppose it's possible to obtain the name of the variable used to hold "this" as returned from the constructor?

no .. that's .. kinda .. a bad question to ask

yeah. I'm looking at someone else's code, you need to pass the name of the variable (as a string) as the 1st argument

Does it read them back in and convert them to nulls?

Yes

becomes xml.foo === null

yeay

I know you'll kill me if I ever make it asymetric :-D

It seems to work

Oops .. sorry, xml.foo === undefiend

he does stuff like "addListener(m, "click", function(){ eval( myvar + ".lastmarker=m"); }

HMM?!

Maybe it's possible to do the same thing using closures and "this"?

addListener(m, "click", function(){ myvar[lastmarker] = m; }

sorry, "myvar" holds the name of a (global) variable which holds "this"

Pffft
Don't put 'this' into a global. Don't put (almost) anything into a global.

d'you have any experience with event:selector or lowpro? i'm dying here

not familiar with either .. even in a passing sense

no, it's like "function MyClass(nameOfVar) { this.myvar = nameOfVar; } myObj = new MyClass("myObj");

It's some really beautiful code. I'm a bit thick tho

myObj = new MyClass("MYoBJ"); // will break

Whatever you're doing .. you shouldn't be ..

I don't understand why you need to keep track of the variable name?
can you post a paste of some of the code?

"need to keep track of a variable name / insane"

Jan

he's also using it for $("el").innerHTML = "a href='javascript:" + myvar + ".doStuff()"…

karma insin funny

OK

http://www.econym.demon.co.uk/googlemaps/egeoxml.htm

pseudo protocol, single-quoted attributes ..

At the momement I've commented most of that stuff out, but it's starting to look like I'll need some of it.

single-quoted attributes?

onclick='doStuff("something")'

woot, my javascript soap client now has XSD support (for mapping return types)

sorry, no - my mistake:

- '

You're writing a soap client in JS??

eesh.

oh man

[pfnguyen@ares js]$ ls -l ws.js
1
hrm, it's kinda long

24 kb?
tiny

can you do corba next?

http://paste.hanhuy.com/ws.js
gmcinnes, no :p

aw

http://paste.hanhuy.com/ws-example.js
example code using the above

Do we assume it's not symmetrical right now?

how to type "tab" in textarea?

"test\ttest"

cut & paste ;-)

thanks
tab cab ne shown but i don't know how to type it with key kws
*keys

does anyone know how to get the firebug debugger to surrender the value of arguments passed into a function, when using its breakpoints? I see all the methods of the this object, and all its DOM info, but I don't see how to get args
does anyone know how to get the firebug debugger to surrender the value of arguments passed into a function, when using its breakpoints? I see all the methods of the this object, and all its DOM info, but I don't see how to get args

hi everyone

ahoy

Can i call a function if the url changes at all?
like #1 turns to #2 or anything?

set a new watch expression

holy crap firebug kicks ass.

yea it does lol

i just see now that in the script inspector, if I mouseover an element it shows me its value.

its indispensable

blows. my. mind.
there are $$$$ projects in other languages that don't even come close to the sweetness

So is there a way to capture if the url changes at ALL? of if someone hits back/foward?

josh[n00b]: 'window.unload'
Or something.

doesn't that just work if they are -leaving- the page?

josh[n00b], buu : window.onunload [not positive, pretty sure though]
josh[n00b]: you cant detect if they close the window, sorry
if you can it'll be extremely hacky and limited

I just want to determine if they hit the Back button or the Foward button

there is onclose, but i don't know when and where it's available

thats all

josh[n00b]: my bad, wnidow.onbeforeunload [window.onunload might work too]
josh[n00b]: erm…. you cant find out for sure….

i have a page that had blah.com/p.php#1 blah.com/p.php#2 blah.com/p.php#3

you can just know that they left the page, that's about all you get

and i want to know when they hit back.
shit
can i determine if the url changes at all?

yes
location.href = current url

how does that help me?
I need to fire an event/method if the url changes.

"Jan" at 71.6.194.243 pasted "Naughty!" (5 lines) at http://erxz.com/pb/3614

Naughty!
Oh. Hang on.

josh[n00b]: var old_URL; function updateURL(){ old_URL=location.href; } document.onload=updateURL; if(old_URL!=location.href){ /* it's changed */ }

Just er. Make that XMLIn at the appropriate point.
Arrogant whining stands.

josh[n00b]: idk if that'll work, that was just off the top of my head

but adding a different hash doesn't load the document.

josh[n00b]: you may have to resort to… *dun dun dun* … cookies
josh[n00b]: change location.href to location.hash then

uhhh I still wont know. Sense they never -really- leave the page.

=]
josh[n00b]: ^
location.hash !

the problem is… that document.onload only will run once.
not everytime the hash changes

josh[n00b]: var old_URL; function updateURL(){ old_URL=location.hash; } document.onload=updateURL; if(old_URL!=location.hash){ /* it's changed */ } — and run 'updateURL()' when they do certain things
bjosh[n00b]: var old_URL; function updateURL(){ old_URL=location.hash; } document.onload=updateURL; if(old_URL!=location.hash){ /* it's changed */ } — and run 'updateURL()' when they do certain things/b

old fashioned url?

Bloody expensive.
Don't do it. Cache your lookups.

I'll have to think about how to implement that… searching this XSD document is a pain in the ass

I only need to run it when they HIT the back button..

josh[n00b]: erm… so check if location.hash=='something_to_check_for'

Jan-: what do you get in outObj.bar?

josh[n00b]: you cant detect the back button, you can detect if they are where the back button would take them though

I think you are missing my point.
let's say client a goes to my site abc.com/index.php they click a link it takes them to abc.com/index.php#a now they click b: index.php#b - When they hit back the url will change back to #a … in all of this, the document ONLY loaded ONCE at the beggining.

josh[n00b]: sorry, but i'm nearly positive you cant detect when someone presses the back button [although i would *love* to have that] so i'm just throwing out alternatives

josh[n00b]: use setInterval to check regularly

josh[n00b]: yes, so use setInterval, or check when they click certain links or click certain buttons

there are no links on the page

can't use body onunload?

no.. because when they go from #c to #b … the document is not unloaded

it's not being unloaded

oh, you want to detect when someone is navigating through anchors?
nasty

josh[n00b]: do you use buttons? if so use onclick

The site is Flash. When they click something in Flash it calls a javascript that appends a #balsahda which then passes the hash back to flash. Flash parses the hash and goes to the corresponding keyframe. It ALL works, EXCEPT for if they hit the back button.. nothing happens, so i need to call
the as method via javascript host to reparse the url at that time.

o.o
….um

lol

i got it dude lol
you dont need to detect back button - you need to detect when the hash changes

exactly

-.-
ok hang on, i'll get a little something you can work with

I wonder if my soap client will work in IE…

you are a beautiful person

josh[n00b]: var old_URL; function updateURL(){ old_URL=location.hash; setInterval('updateURL()',5000); } document.onload=updateURL; if(old_URL!=location.hash){ /* it's changed */ }

how would I add a tag to right after the body via javascript?

josh[n00b]: woops, hang on i'll fix it up and pastebin it - i messed it up a bit
josh[n00b]: woops, hang on i'll fix it up and pastebin it - i messed it up a bit
windows is borked from day 1

ie7.com is funny

josh[n00b]: why aren't you using onclick handlers instead of doing that strangeness?

"When_I_Fall" at 71.6.194.243 pasted "here you go josh[n00b]" (9 lines) at http://erxz.com/pb/3615

because there is nothing .. to click

josh[n00b]: see above message from erxz_paste

josh[n00b]: why are you leaving flash, calling javascript, and going back to flash? what purpose does that serve? why aren't you just doing it all in actionscript?

josh[n00b]: did you looky at the code? lol

how would i save a page in a string, then rewrite it when you click on a link?

yeah, working with it now
one sec & thanks
Keeps freezing my browser

oh
dude how much crap do you have open? haha

lol, nothing and I am on a macbook pro
Wont this allow for race conditions?

anyone? :P

josh[n00b]: erm?
save a page in a string?
var page=document.getElementsByTagName("html")
gr

well.. what im trying to do.. is when you click on a link.. it reloads a small part of a page

var page="html"+document.getElementsByTagName("html")[0]+"/html"; — gives you the page
^ that might work, cant make any promises

where would i put that thou? :P

var page; function savePage(){ page="html"+document.getElementsByTagName("html")[0]+"/html"; } function getPage(){ return page; }

what if it was php? do i replace html with php?

erm… php!=client side

o?

php gives html or text t the browser
s/t/to/

but the file is a php fil
not a html

it's processed and returns html, no?

thou.. the contents ARE written in html

yes, but it prints the contents out as HTML or text
it's returned as html

your best bet is "container.innerHTML = new_html;"
new_html being the response from your async request

but where do i put that whole thing lol

what do you mean?
pastebin your code somewhere
i assume if you are "reloading a part of a page" you are doing an async request, correct?

well.. i just dont want to reload the whole page
when you click on a link

erm, that's the point of a link
link==goes to new page

PHP script runs on the server, generating HTML; the HTML is then sent across the network to the browser

it's a series of tubes

how long you been workin in PHP?

uhh not long enough lol
well..

lol

i know the stuff

http://php.net - your new best friend =p

but this is javascript stuff
anyways..
http://pastebin.ca/622532 index.php

The paste 622532 has been copied to http://erxz.com/pb/3616

but if it's a php host script it needs to load from the server to be updated

Does Array.push work by reference? If I construct an Array of DOM elements and then later call .parentNode.removeChild or somesuch on an Array element, will it change the document structure?

no its not a php script..
there are php things in it

that's a php script

if they're are PHP things in it it's a php host script

yes

fine fine

so i assume you want the news/show_news.php to be reloaded?

hmm no exactly
almost.. lol
when you click on say requests

in any case, you're going to need to do some reading on javascript and AJAX

it reloads that part

`enter

deltab, thanks.

yea i hate ajax

its better than your code

i know nothing about it, except it has xml, javascript etc

i send mostly JSON over ajax

http://standingdog.com/clients/stoneleigh/Flash/

ajaj

flash

Woosta, why is xml.simple alert()ing a lot?
it's in a "catch" block so I suspect it's bad

what's the message?

a variable
from the stuff Im'
er
from the stuff I'm parsing

that's in the encoding of entities?
What is the alert? What's the value that couldn't be entitized?

line 179
More or less everything.
But I may be feeding it gibberish. It seems to be getting the text of a function for some reason.
uBut I may be feeding it gibberish. It seems to be getting the text of a function for some reason./u

yes, you cannot XML-ify a function :-D

Does it with or without the ()

Jan-: the latter two mean the same thing

Yeah.

hi

Unfortunately, if I xml-ify foo, I get the text of the bar function.

the new operator creates an object, then calls the given function to initialise the object

yes you can!

Jan-: 0.120 shoudl fix it
but still .. giving it a funciton will be incorrect :-D

how can i call a function in a main page from a iframe???

should fix what

The alerts
You'll now get the string value of the function in your XML

that wasn't quite what I had in mind.

The real problem is something YOU need to fix

Yes.

My job is just to deal with what I'm given as best host as I can

I just want to create an object with a bunch of properties.
So I create a function with a lot of "this"es in it.
Then I go foo = new bar;
what's the big deal
Er. Where do I get 0.120

hmm, how silly, IE doesn't support getElementsByTagNameNS

Same place .. but I just uploaded 0.121

function bar() { this.jan = "rock"; } var foo = new bar; foo.jan

rock

no ..

I have a web page that loads off-site JavaScript. I want that off-site javascript host to be able to slurp a CSS file into the main document. Is that possible?

IE sucks for such XMLy things .. remember .. it STILL doesn't understand XHTML

Woosta, my problem isn't with XHTML :p
Woosta, this is in relation to my soap client

anyFunctionNS is an XML function

of course, I'm working with soap, so it is XML

Woosta, if I use a string which is composed entirely of numerals, it will come back as a number won't it.

Jan-: that's up to your browser's XML host parser

Shirker

IE knows about XML, but not in any context that it can execute javascript in
bIE knows about XML, but not in any context that it can execute javascript in/b

Jan- must be new to rhythm guitar
that's 90% of music

Anyone have IE in here?

Yeah, yeah. I know. One up on drummers, aren't we.

my ie7 is broken when run standalone

josh[n00b]: how do you NOT have it?

josh[n00b]: is this the set up for a joke?

Mac OS X

Get vmware/parallels/…
you need IE if you're going to be doing webdev

I need to know what you see on http://standingdog.com/clients/stoneleigh/Flash/#test If its a cheesy blue button or red test that says TEST!!!

http://paste.hanhuy.com/screenshot/ie7isBusted

yeah I have a parallels, just not set up yet :-p

Woosta, if I just comment out that alert, will anything I don't like happen?

Which alert?
Which version are you using now??

Same one?

*which* one?

hang on

use = 0.120

0.110 - Output nulls as null elements rather than empty
Ooer.

josh[n00b]: i see cheesy blue button, if i click on it i get the red button (IE6)
s/click/mouse over/

vinse.. does an alert come up when u click on it 'Clicked' ?

yes

OK, put you in the comment for 0.110

vinse does the button then go away?

no

and it say TEST!!! ?
damnit.
Flash and IE hate each other

and there's a js error

And I thought you didn't like me
I can't download 0.12 now

vinse, really? whats the js error?

Well .. there is that too

phil is playing with colorpoc.htm

heheh

josh[n00b]: with a totally unhelpful message, line 1 char 25 syntax error
ie error reporting is for suck

`iedebug
`ie debug @ vinse

ie debug: Best(Visual Studio): http://msdn.microsoft.com/vstudio/ , OK and Free(Script Debugger): http://xrl.us/sr7a , Leak Detector: http://outofhanwell.com/ieleak/index.php?title

learn ie debug = Best(Visual Studio): http://msdn.microsoft.com/vstudio/ , OK and Free(Script Debugger): http://xrl.us/sr7a , Leak Detector: http://outofhanwell.com/ieleak/index.php?title, or see `js firebug

OK

Damnit Ted__! I thought I told you!

that free option better than the ie firebug thingy? or about the same?

different

what?

nothin .. just messin' with yer head

oic

You know what, I *am* going to have to store functions, or at least refs, in XML.
uYou know what, I *am* going to have to store functions, or at least refs, in XML./u

This version of the Script Debugger is deprecated technology and is no longer supported."

Oh, by the way, I tried using the microsoft script encoder.
It broke my script.
Woosta is xml.simple supposed to put linebreaks between elements
or… you know what I mean

Jan-: I doubt it
There's no pretty-printer in it
(plus, technically those linebreaks have meaning)

they do?

yes, they are text nodes

Other than making it parsable by human beings and screenreaders?
I have to select all copy and paste code off your site too.
oritcomesoutlikethis

HELLO JAN

hi dave

JELLO HAN

HELLO DELTAB

mmm jello

for( var i = 0; i channel.nicks; i++ ) channel.nicks[i].capsLock = false;

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

http://www.stupidterminal.com/melodyGenerator/index.htm

channel.nicks.each do {|nick| nick.dont_shout }

ERROR: 31560: #SyntaxError: (eval):23: compile error(eval):23: syntax error, unexpected '|', expecting '}'channel.nicks.each do {|nick| nick.dont_shout } ^(eval):23: syntax error, unexpected '}', expecting kENDchannel.nicks.ea

ooooooooh
I didn't know about that

Woosta!
It is I!

10.times { puts "Muahahahaha!" }

Muahahahaha!Muahahahaha!Muahahahaha!Muahahahaha!Muahahahaha!Muahahahaha!Muahahahaha!Muahahahaha!Muahahahaha!Muahahahaha!10

lame

puts "/part"

/part

shucks

print Mu . ha x 16

Muhahahahahahahahahahahahahahahaha1

peepsalot, that'd work if it were an irc client :p

5.times { puts "JSBot: karma GarethAdams lame\n" }

JSBot: karma GarethAdams lameJSBot: karma GarethAdams lameJSBot: karma GarethAdams lameJSBot: karma GarethAdams lameJSBot: karma GarethAdams lame5
karma GarethAdams lameJSBot: karma GarethAdams lameJSBot: karma GarethAdams lameJSBot: karma GarethAdams lameJSBot: karma GarethAdams lame5

Guys

huhu

Theres to much sexual tension in here.

Kinky.

too

too*

alakazam(new Assistant());

you couldn't code your way out of a vat of hot sauce if your life depended on it! :P

=[
Send patch.

;_:

Khisanth

I noticed some weird buubot behaviour before. I forgot to make a note of it

Mmm… needs more Jan!
:P~

ah, I remember:
help!

Available Plugins: oeis jeval spell cpan shorten rt topic squeeze rbeval acronym change managementspeak reverse join translate bibleit core imdb insult tv help echo eval convert jseval mangle restart quit deparse part pyeval reload_plugins goobooblink heap_test rss

feature
squeeze buu

buu

well, I know I'm delicious and tasty, but *blush*

bug!

bibleit ?

15 See, I have set before thee this day life and good, and death and

how does it deal with significant whitespace for pyeval?

maybe, but surprising

bibleit What the hell does this do?

27 Daniel answered in the presence of the king, and said, The secret which the king hath demanded cannot the wise men, the astrologers, the magicians, the soothsayers, shew unto the

range(10)

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

http://www.sitepoint.com/forums/showthread.php?p=3477293#post3477293

peepsalot, so what's the melodygenerator for? just for fun?

__file__

Traceback (most recent call last): File "string", line 1, in ?NameError: name '__file__' is not defined Error: 32322: Error — py_eval raised an exception at plugins/pyeval.pm line 20.

foobar

raboof

foo bar

rab oof

reverse foo bar

bibleit | squeez
bibleit | squeeze
Useless goddamn bot.

bar foo

heheh

20 then said he, knowest thou wherfre i com unt thee? and now /w i ret to fight w/ princ of prsa: and when i am gon forth, lo, princ of grca

still broke

^

lol

managementspeak

Our partnerships targets bleeding-edge users. Though they innovate our world-class networks, they can synthesize its e-business architectures. Rather than we exploit my deliverables, they can engineer your value-added platforms, yet my web-readiness is reviewed. This portals are named as if
we counseled your intuitive deliverables. While we facilit

managementspeak | squeeze

if onl we acqured thi synrge, u/ world-cl e-srv commncat its e-cmmrce. mrve, bfre t/ visulze u/ eyebal, t/ _n innv our cuttng-dg prdigm. whra we transton our methodolge, t/ _n montze u/ stm, ntwthstandng thi bandwidth is dvlop. consqntly, as we harn my efcent mndshre, we _n scal our architctre.
t/ ned to incb our trn-key model bfre we driv thi fron

I see.

Does squeeze work in general | sqeeze
nup

echo Does squeeze work in general | sqeeze
Hrm.
echo foo

foo

Odd.

squeeze Does squeeze work in general

doe sqz wrk in gnral

insult Woosta

Woosta is a bilge rat!

/that

insult George W. Bush

Jan-: George is a land-lubber!

Hee, hee

is there a way to 'reload' dom?

what about bleeding EDGE users?

pfn, yeah, just for the hell of it pretty much. there is also a tone generator. http://www.stupidterminal.com/toneGenerator/index.html

tv Heroes

GarethAdams:
a class="default-image more" href="http://www.tv.com/heroes/show/17552/photos.html?om_act=convert&om_clk=summarysh&tag=showspace_links;image"
img src="http://image.com.com/tv/images/processed/thumb/c7/6b/35670.jpg" alt="Heroes" /More Pictures /a
GarethAdams:
div id="summary_fold" class="mt-10"
Heroes is a serial saga about people all over the

:-/

i, are js regexp greedy by default ?

yes

is there a switch for ungreedy ?

/ab/.

Error: Error: missing name after . operator at line 0: /ab/.

oops
yes, put a ? after the quantifier
..*? rather than .* for example
i forget it there's a per-regexp flag like in some languages

but note it can be very slow

since you seem to know all on RegExp: is there a back match like (?[a-z]).*

/(abc)+d/.match('abcabcd')

Error: Error: TypeError: /(abc)+d/.match is not a function at line 0: (null)

'abcabcd'.match(/(abc)+d/)

{ 0: abcabcd, 1: abc, index: 0, input: abcabcd}

Jan

'abcabcd'.match(/(abc)+?d/)

{ 0: abcabcd, 1: abc, index: 0, input: abcabcd}

Will you be departing shortly? :[

hmm
maybe I'm not so regex-leet
oh

:-)

['abcabcd'.match(/(abc+?)d/),'abcabcd'.match(/(abc+)d/)]

{ 0: { 0: abcd, 1: abc, index: 3, input: abcabcd}, 1: { 0: abcd, 1: abc, index: 3, input: abcabcd}}

bah

last was not good, + after c means 'c more than one time'
['abcabcd'.match(/(abc)+?d/),'abcabcd'.match(/(abc)+d/)]

{ 0: { 0: abcabcd, 1: abc, index: 0, input: abcabcd}, 1: { 0: abcabcd, 1: abc, index: 0, input: abcabcd}}

['dabcabc'.match(/d((abc)+)/),'dabcabc'.match(/d((abc)+?)/)]

{ 0: { 0: dabcabc, 1: abcabc, 2: abc, index: 0, input: dabcabc}, 1: { 0: dabc, 1: abc, 2: abc, index: 0, input: dabcabc}}

there, the difference between the 0 and 1 indexes

hi all
quick question
I'm having some problems with zindex and mouseout
http://celluloid.sourceforge.net/Screenshots.html
if you check the source on that, you can see what I'm trying to do

Is there a way to 'refresh' dom list?

the second image, I need the second row of tabs to take the highest zindex when moused over and also I need the image to reset to the default on mouseout

['abcabcd'.match(/(abc)+d/),'abcabcd'.match(/(abc)+d/U)]

Error: Error: invalid flag after regular expression at line 0: ['abcabcd'.match(/(abc)+d/),'abcabcd'.match(/(abc)+d/U)]

NekoKun, it should happen automatically

the code is all there, but for some reason it doesn't work

NodeLists are live, and always reflect the current state

any ideas?

Im using ajax… and a plugin that read all DOM after it is ready. once Im using ajax, it doesn't refresh…

what happens?

you get g, i and m apparently

it switches the tabs correctly, but they stay at the lowest z-index
and the mouseout event just doesn't work at all

i trustede http://gabrieljones.com/working-with-regular-expressions-in-javascript/ and tried the Perl's U option

http://www.regular-expressions.info/ is a great site

this one gives U as an option too:http://www.ninjavspenguin.com/regexp.html

strange then then actually running it with a U flag gives "Error: invalid flag after regular expression"
I know which one I believe

ok, js is definitely not worth as a language in regard to regexps ;-)
http://www.regular-expressions.info/javascript.html

Permission denied to call method XMLHttpRequest.openLine 0

hi
how can i access to the php room?

tell me the secret password

Rivos, not the place to ask, but you have to register first

why just the php?

php channel requires identifying before joining

Why are you asking us?

so nobody can help?

couse I was used to come in this channal

most likely you're requesting a document in a different domain

haha schoolwork

hey Woosta, would you like to see a screenshot of the program to which you are unwittingly contributing?
uhey Woosta, would you like to see a screenshot of the program to which you are unwittingly contributing?/u
www.1159productions.com/test182/shad_xml.jpg

http://extjs.com/blog/2007/07/10/css-selectors-speed-myths/

Cool! Is this for video-art performances?

Kinda. It's been commissioned for a movie theater to program their new digital projection system.
But, I'm trying to make it into a fairly general show-control system. It supports MIDI and RS232, as well, and we've ordered a USB (pretends to be RS232, handily) general-purpose I/O board with 32 input-outputs

very cool

So it can control the lighting system (midi), the projector (232) and the automatic screen masking and curtain adjustments (general purpose switching plus big mains voltage contactors)

I have a project on the sidelines that will need some similar stuff

You won't like my code.

:p

I won't be using it :-D
Mine wont bein JS

Jan, I think that's an understatement
Woosta, good shit.

I was lucky to find some nice low level activeX controls for MIDI and RS-232.
hands up if you think I'm nuts for doing this in Javascript

nup. not me .. I think JS is undervalued

I value JS at .2 dongs.

It's at least 0.3

I like it very much. It seems just smart enough to be clueful, without requiring a PhD.
Unfortunately, I now have to do some XML splicing.
In order to get "The Painted Veil" into the Events list, I had to manually paste it into the XML file that list represents.

buu! =]

Javascript is great if you can control the environment

DDDDDDDDDDDDDAVEMAN.

HEIL!

DAMN STRAIGHT.

^^

So. XML splicing.
*cough*
anyone?

if using DOM, appendChild

oh shit, it's not that easy, is it?
Phil is demanding prettification of the XML hosting

I accept patches and will consider applying them
you get what you pay for

He says I'm being paid :/
Happily I seem to have been bright enough to have my treeview control operate directly on the output of XML.Simple
Because XML.Simple is 100% guaranteed to be completely and reliably symmetrical, this should be easy.
uBecause XML.Simple is 100% guaranteed to be completely and reliably symmetrical, this should be easy./u
interestingly enough, while IE refuses to display wrongly encoded XML documents, whatever parser is used by XML.Simple does.
And since I presumed it was the exact same one, I'm confused.
Ah. Interesting problem.
If I create an object from a trivial XML document such as ab/a, then make that back into XML with XML.Simple, I inevitably end up with somethingab/a/something
since I probably gave XML.Simple the base name 'a', that means I get aab/a/a
….is it me or what

http://box32.reikan.com.br/ can someone give me an idea about this… Click in 'Galeria' and then in the image… it is supposed to load a lightbox but in Internet Explorer it doesn't work. The code should 'scan' the href elements and add an 'onclick'
event…

i'm so bad with javascript. onselect="document.getElementById('plate-image').src='document.getElementById('state').value'"

yo johnny5
how's the lawsuit coming along?

if I have a class and I add $var = new class(); is $var== this that is inside class ?
let me rephrase.. how can I have a member variable in the class that is equal to the new instance that it was created .. like $var = new class(); I want to have $var.member_var == $var

anyone know how i can use javascript to take out br tags in certain sections of my page?

give them ids and use document.getElementById('id').removeChild

give each br tag an id?

if they have a common parent (or grandparent), document.getElementsByTagName("br"); and removeChild them

this is the only way to distinguish between the tags .. or remove them all

someElement.getElementsByTagName("br") even
all depends what you mean by "certain sections"

i have a program that puts a list of navigational links in a list along the sides of the page but it puts in br tags that mess up my css

I have a custom object . I create a new instance of it using new. I implemented a mouseDown event.. on this event I want to call another method and pass to it the object's instance value that was returned by new.. is there a way to do that ?

i want to take those ones out but leave the ones in my text

I thought of something like $var= new myObject(); $var.setInstance($var); where setInstance(inst) { myInstance = inst;}
but I am not sure if this is the correct way to do it

is it posible to specify a div as the "someElement"?

that'd work, or you could do it in the constructor; but what's the point?
why have a self-reference in an object?

I am using svg to draw some rectangles .. I want to send its reference to another function on click
how can I do it in the constructor btw ?
each rectangle is an object

send a reference to another function from an object's methods?
they can use 'this'

let me rephrase, I have a controller class , and a rectangle class.. the controller object need to know which recntangle has been pressed to take some action. so I want to send the rectangle reference that has been pressed to the controller object
$myobject = new class(); is $myobject == this that is in class ?

what's with the $ signs? JavaScript has a real parser, you know ;-)

why do you want a circular reference anyway?

oops. I've been coding perl al lday hehe

'this' is set to the object a method is called on

for reasons I explained above

function Foo(){ this.obj = this; this.val=12; }; var X = new Foo(); X.obj.obj.obj.obj.obj.obj.obj.obj.obj.obj.obj.obj.obj.obj.obj.val

12

You want a heirarchy from the sounds of the rationale
Though I doubt I fully understand it

is that something different from not know what 'this' is?
controller.method(this);

function Foo(){ this.val = 12 } function Bar(parent){ this.parent = parent; } var X = new Foo(); var Y = new Bar(X); Y.parent.val

12

got it

But .. yourRect.onclick=function(){ controller.click(yourRect) }
looks like it's what you want

yes exactly

Though you may want to use the parent/child from above
yourRect.onclick=function(){ yourRect.controller.click(yourRect) }

http://rafb.net/p/H5m6Q348.html you'll find disasters, it is my first time using javascript and dom too… can you look at line 56, please ?

will this work? document.getElementById("myHeader").innterHTML = "test";
i mean innerHTML

TylerJGillies, if you're here, it must mean it doesn't

i havn't tried it, im just wondering if i even had the right idea

`js innerhtml sucks

If you have events on elements that are rendered via innerHTML they do not go away when you empty the innerHTML area. They may even crash your browser. You cannot use innerHTML for building items like tables in IE. You cannot use innerHTML for adding options to selects in some
..browsers. Form elements apparently added to forms via innerHTML do not get submitted with the form

function Foo(arg){ alert(arg); } function Bar() { this.test = function(arg) { alert (arg);} var X = new Bar(); var Y = new Foo(X);

Error: Error: missing ; before statement at line 0: function Foo(arg){ alert(arg); } function Bar() { this.test = function(arg) { alert (arg);} var X = new Bar(); var Y = new Foo(X);

what should i use then?

`js innerhtml @ TylerJGillies

js innerhtml: http://slayeroffice.com/articles/innerHTML_alternatives/

thnx
thats a cool domain name

when I do alert(this) in the rectangle class I get that it is of class X .. however after it is passed to another object and I do alert (argument) . I get undefined

how can i reference an object of a method/property within that method/property?

ok solved

anyone?

which i would like to completely remove via javascript

el.parentNode.removeChild(childNode)
el.parentNode.removeChild(el)
like this

can you explain me a little more plastic because i am javascript host retard
lets say i have:
var oldSpan = target.getElementsByTagName('span')[0];
how do i destroy it

oldSpan.parentNode.removeChild(oldSpan)

pro

: ) simple, huh?

thanks a lot man

np
i have harder question

yeah, i am just inbred when it comes to js

nobody can freaking answer :/

if it's php related i might be able to help

haha

but if it's js related i am complete retard

Your question is unspecific.

what specificity do u need?
i have object
i have method
need to reference parent-object
from within that method
arguments.calee references method itself
and i need object-parent
any ideas?

Uh
self.parent ?

hmm let me try

Unless it's explicitly stored someplace, such as .parentNode, you can't do taht.

i got another retard question, how could i enable all buttons of same class across all forms on page

it's like this myObj.prototype = {myMethod: function() {// this is where i need to call myObj}}
use library

Er, so.. call 'myObj'

zch
but myObj is a constructor

yes?
which one

i have no idea what it's called in the end when it's instantiated

But you just said you wanted 'myObj'
You're really confusing me.

ok look
myObj.prototype = {method1: function() { doSmth}, method2: function() {doSmthElse}}

function myObj(){}; myObj.prototype={myMethod: function(){ toWhateverWith(this) } }

i need to call method2 from within method 1 not knowing what myObj name is

Your object doesn't have a name. You name has an object.

my object is a constructor
i have no idea with which name it will be instantiated

OK, no probs. I see that you know more than me and are just sent to test me. I give up.

and this refers to smth else
lol

Uh, do you want 'self'
Or this or whatever.

dude i'm struggling with this shit forever… tried __proto__, prototype…
let me try parent

this.method2()

1 sec

Stop being a tard.

this refers to window
in that scope
i would use otherwise as normally

You're really bizarre.

he do no wanna listen good

umm
self.parent doesn't work
refers to window as well
as well as this

What the flaming fuck.

ok guys sorry
i'll keep trying

what do you mean by "parent object"?

var parentObj.prototype = {method: function() { doSmth() }}

can any of you point me to a good svg tutuorial? i'm trying to draw graphs from dynamically updated data

ok solved it

gratz

thanks
had to use apply
and then used this

http://box32.reikan.com.br/ When you click in Galeria and then in the thumbnail, it should open a lightbox with the image. It doesn't open cause the dom must be reloaded (the hook is Event.observe(window, 'load', initLightbox, false) can anyone suggest
me a way to make it?

I learned everything I know about svg based on these scripts: http://www.campbelljohnson.com/wade/projects/instruments/index.html

is there a "IE Happy" version of container.parentNode.replaceChild(newContent[i].firstChild,container);
of something that accomplishes the same thing

IE has no problems with that

IE disagrees with you

No, you just didn't do something correctly

no such supported interface
ok
what part of the code would you like to see

none
I don't do IE only help

so you're wasing my time?
and being kind of a jerk?

Not at all
I know what I'm talking about .. I just don't care about your IE-only problems

then why'd you open your mouth?

so yes, your being a jerk?

o/

would ie7.js help?

you wanted to know of an IE way to do it .. I'm telling you that IE has no problems with the code you produced so long as each of the arguments is what it should be

then what should they be?

you can think I'm a jerk if you want .. but you get what you pay for. I help where I want to help and don't help when I don't want to.

i don't know much about javascript
but vollmer maybe http://dean.edwards.name/IE7/ could help you
it usually solves all my ie6 related js issues, but then again i am javascript inbred

if you dont want to help in a subject, then dont talk
you can do that on IRC, people wont be mad

he wanted an IE way to do something that worked in IE. I told him that it worked in IE. That's helping.

see it wasn't helping because I know it doesn't work in IE
anyway if you want to help, what type of objects should these be?

`dom ref replaceChild @ vollmer

dom ref replaceChild: Replaces one child node of the specified element with another. (http://developer.mozilla.org/en/docs/DOM:element.replaceChild)

`dom syntax replaceChild @ vollmer

dom syntax replaceChild: replacedNode = parentNode.replaceChild(newChild, oldChild);

So inspect each argument individually and make sure it has the value you expect
debugging 101

they are both objects
and have the expected values

(1) I count three things required for replaceChild
(2) It needs nodes, not objects

looking for master to show me the ropes
22 yr old female blonde hair blue eyes
hello ?

hi people

"kuito" at 71.6.194.243 pasted "why does the first work and the second not?" (15 lines) at http://erxz.com/pb/3617

maybe someone could give me a hand on this, i'm not sure if its a problem related with JS http://www.sitepoint.com/forums/showthread.php?t=491685

there it is… http://erxz.com/pb/3617
why would the first one pass teh variables to the imported script
and the second not?

the onresize handler is being called for the body element under IE7 but not on FF2
hmm anyone there?

how do you make a page go to another page? pseudocode: newpage(){ //want to put location header here }

window.location="url";

thnx

i keep getting syntax error not sure why
string += "td onClick=\"location.replace(calendar.html?schedule_id=" + schedule_id + "&customer_id=" + customer_id + "&mode=add) onMouseOver=\"this.className='table_calendar_available_day_over'"\ onMouseOut=\"this.className=''\"p align=\"right\"" + day + "/td";
any idea why i keep getting syntax error

mod_cure, you're missing some quotes in the location.replace. but why are you doing it this way instead of using DOM methods and addListener?

at http://erxz.com/pb/3617 — why would the first bit pass the variables fine and everything work and the second would not?

how do I call an 'on load' event?

preaction, doing it that way also, picking at it. where am i missing the quote ?

mod_cure, as i said, in the location.replace

you want something to run onload?

Im using an ajax function and I need to call a js that is binded with window's onload

kuito, it might be that you're missing quotes in your type="", or it may be that the comments are there

but in ajax it is already loaded… so… well… Im tired of this shit… all i want is a fucking command to make that piece of shit reloading the dom tree

http://erxz.com/pb/3617

sorry the words… today is really a bad day for me

binded?

NekoKun, i've spent the last 12 hours wrestling with tree-building functions in javascript…

you have window.onload = function () { instead of window.onload = functionname; or something?

i put qoutes in it, still no go

I've toeated a powersuply after 10 hours trying to make windows see that the fucking ethernet cable was plugged

talk to the channel

function initLightbox() { myLightbox = new Lightbox(); }
689Event.observe(window, 'load', initLightbox, false);
this command is called when the page is loaded
but Im using ajax, so, the command isn't being triggered anymore
how to recall it in a way that Internet Explorer doesn't screw things up?

i'm talking to the channel.. but i also know you know what you are doing most of the time

mod_cure, your escaping is wrong. re-read it slowly

i did

mod_cure then do it again
you're looking for a \ in the wrong place.

preaction, i don't think those are it.. because i have tested what you said and it still didn't pass the variables

kuito, so why can you not use the first ones?
since… they work
realize also that "show_ad.js " is not the same as "show_ad.js"

the problem is the variables are not passing to the script
so the script runs fine
it's the top line that is the issue
and the problem is that an editor takes the top one and then reformats it to the second and then it doesn't work

an editor?

obviously the editor sucks.. but there isn't anything i can do but maybe retool the cut and paste code a bit
ya an editor

tags. i imagine that's the main problem

but i'm trying to figure out why when it reformats it doesn't pass the variables
you are recommending to take them out?
second i will try it

i'm recommending using a different editor

haha
i wish it were that easy

not be a problem in the first sample but would be in the second?

in the second bit and it works

you probably lose your linebreaks at some point

as I said, they're special, it's the fact that it's all on the same line

ok

They're not needed inside script tags since NS4

hehe thanks for that bit of information
you are the first person to mention ns since well a long time
haha

anyone
please
tell me a way to make internet explorer refresh it's dom tree

wtf does that mean?

Im using a script wich uses window.onload to initialize. Once Im using it inside of an ajax request, I have no 'onload', and then I need to use any other command. I've tried many options but none works in IE… any sugestion about what to do?

eh?

exactly
that's how I read to this error

NekoKun, i believe i got around it by running the window.onload myself. find out what code is being run and run it yourself
i had the same problem with the TinyMCE being loaded dynamically

elements in your XHR result and it isn't being executed?

I've tried… IE screws up always…

where's your code?

http://box32.reikan.com.br/
click in galeria
and then in the thumb
god… Im so pissed off that I can't even type properly
688function initLightbox() { myLightbox = new Lightbox(); }
689Event.observe(window, 'load', initLightbox, false);
that's how the script is called
but after it I use an ajax event, so, I need to recall the initLightBox… but by any weird reason Internet Explorer doesn't understand that it is to call a function
and all fails
nice… and everything gets back to mute…

i don't know what to tell you. did you try running the IE script debugger?
did you try the lightbox forums?
have you tried re-implementing the lightbox? it seems you only want a minor subset of its functionality

I was planning in sacrifice bill gates in some dark ritual…

and then you wouldn't need the init handler

preaction, i fixed it
string += "td onClick=\"location.replace('calendar.html?schedule_id=" + schedule_id + "&customer_id=" + customer_id + "&mode=add')\" onMouseOver=\"this.className='table_calendar_available_day_over'\" onMouseOut=\"this.className=''\"p align=\"right\"" + day + "/td";

in your ajax handler's success function call initLightbox()

good job, why do i care?

IE doesn't call it

eh?

morning

oops wrong string
string += "td onClick=\"location.replace('calendar.html?schedule_id=" + schedule_id + "&customer_id=" + customer_id + "&mode=view')\" class=\"table_calendar_expired_day\"p align=\"right\"" + day "/td";

eeewwww
don't you need to URL encode?

why do i get syntax erorr, my eyes are sore

"td onClick=\"location.replace('calendar.html?schedule_id=" + schedule_id + "&customer_id=" + customer_id + "&mode=view')\" class=\"table_calendar_expired_day\"p align=\"right\"" + day "/td"

Error: Error: missing ; before statement at line 0: "td onClick=\"location.replace('calendar.html?schedule_id=" + schedule_id + "&customer_id=" + customer_id + "&mode=view')\" class=\"table_calendar_expired_day\"p align=\"right\"" + day "/td

It just doesn't work in IE… Im wondering if I could refresh the dom tree

write("td onClick=\"location.replace('calendar.html?schedule_id=" + schedule_id + "&customer_id=" + customer_id + "&mode=view')\" class=\"table_calendar_expired_day\"p align=\"right\"" + day "/td")

Error: Error: missing ) after argument list at line 0: write("td onClick=\"location.replace('calendar.html?schedule_id=" + schedule_id + "&customer_id=" + customer_id + "&mode=view')\" class=\"table_calendar_expired_day\"p align=\"right\"" + day

OK, there's an error there
Start at the end and pull bits off until there's no error.
Once there's no error, you know where the error must have been
(though that error message does point out your error fairly plainly

p align=\"right\"" + day — think its that
when i take this off, i get no error p align=\"right\"" + day "/td"

So look carefully

Hey guys, I was told that some of you helped solve a problem with some javascript we were having a problem with on a pesky editor. The solution was removing the !– and –. Anyways, thanks! Gave me a semi heart attack to see that bug.

After all, that's where the parser things your argument list ended ..

hmm

If you still can't see it, go get a coffee and come back and look at it again

how can I parameterize something to create an object of a certain type? can you instantiate a new copy off a prototype of something? or just use a closure or?

whuhwhuhwhuh?

I want to parameterize an object to create a different type of object when a method is called

jseval: write("td onClick=\"location.replace('calendar.html?schedule_id=" + schedule_id + "&customer_id=" + customer_id + "&mode=view')\" class=\"table_calendar_expired_day\"p align=\"right\"" + day + "/td")

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

there we go
it was missing a +

please don't do that
(didn't I ban you??)

heh

do what?

i cant find error

hmm wait jseval came twice…

inkncoffee, nice combination

the point is to HELP people, not just do everything for them

of liquids?

Woosta your point being?

of liquids

phix, thanks they are two of my favorites. I shouhld try to fit beer in there though

so I'd just spent 5 minutes trying to help him find his own error

mod_cure, you forgot to a + sign after day

And rather than letting him work it out you decide to just point it out ..
Why do you do that?

Woosta, not my problem if i found the error before you did lol…

the point being that you're not really helping (long term) by helping (short term).. something about handing fishes and teaching to fish

thank you

WTF?
You think I hadn't found it .. ?

you said it took you 5 min
it took me about 3 min…

so I'd just spent 5 minutes trying to help him find his own error

if thats what you're upset about
thats very childish

READ WHAT I FUCKING TYPE MORON

help HIM find the error

Available Plugins: oeis jeval spell cpan shorten rt topic squeeze rbeval acronym change managementspeak reverse join translate bibleit core imdb insult tv help echo eval convert jseval mangle restart quit deparse part pyeval reload_plugins goobooblink heap_test rss

haha
bye

oh boy
here we again

see ya

bye

maybe there's a reason

'again' means I had banned him previously

any thoughts on my question?

I don't get the question
The closest I can come is you want to re-bless an object

I want an object to make objects of a certain type that can be set in the initial object's constructor.. sort of like a factory that doesn't know what it's going to make until it's created
I could pass in a closure. that's one way
but I was wondering if I could do it with prototypes or something
trying to find the js way to do it

So you want a function like; bless( Date, 2007, 07, 17 ) that will return a date object?

var factory = new FactoryObject ( SomeType ); var someType = factory.createObject(); someType is now an object of type SomeType (even though I know js doesn't have types in the traditional sense..)

function FactoryObject(type){ this.type = type } FactoryObject.prototype.createObject = function(){ return new this.type }; var factory = new FactoryObject( Date ); var someType = factory.createObject(); someType.getMonth()

6

6.5

^^ that?

Can someone do me a favvvvooooorrr?

NO

lol Woosta

install parallels

josh[n00b]: why can't you check yourself?

reading…

I have parallels, just not a windows cd around

Then go and buy one

ok, so types are first class objects in js?

There are no types .. only objects :-D

josh[n00b]: you're on Mac OS?

when you pass Date to the FactoryObject constructor, what are you passing?

Yes
os X

os x ftl

eh, i like it

The constructor .. a function object really

josh[n00b]: http://wang.yuxuan.org/blog/2006/11/3/how_to_install_ie_in_mac_via_darwine

I was mostly kidding .. I'm on my mbp right now

`ie4mac
learn ie4mac: Install IE on your mac (using darWine) http://wang.yuxuan.org/blog/2006/11/3/how_to_install_ie_in_mac_via_darwine

= value

Same. mbp.

learn ie4mac = Install IE on your mac (using darWine) http://wang.yuxuan.org/blog/2006/11/3/how_to_install_ie_in_mac_via_darwine

OK

`ie4linux
`ies4linux

IEs4Linux is the simpler way to have Microsoft Internet Explorer running on Linux (or any OS running Wine) — http://www.tatanka.com.br/

I just need to get a copy of VISTA and XP
Install it on my parallels

learn ie4linux = See `ies4linux

OK

Look at Internets

OK

Look at Interweb

OK

might want to include a note that the beta versions of ies4linux that install IE7 are hidden on the 'blog'/news page

thanks. that was a major conceptual breakthrough for me with js

yeah, I thought it was in the ies4linux comment
find blog

flash, js ajax problems, js closures, js oo, js oop, js xmlhttp, png gamma, ie4mac

it is in zofbot

yeah
learn ies4linux = Run IE 5, IE 5.5 and IE 6 in Wine Under Linux, (easy install script): http://www.tatanka.com.br/ies4linux/ check the "blog" section if you want to run IE 7 as well

OK

lol

didn't you have sort of a pieced together version of b0at's bot?

RTFS
notRTFS was a quick hack when RTFS first dissapeared
based on whatever we could collectively scrape from logs
jsBot is a fully implemented bot

hi, is there a way to find out the coordinates of where in an image the mouse was clicked ?

yeah just whip out a ruler and put it up against your monitor…
byeah just whip out a ruler and put it up against your monitor…/b

reisio, in javascript that is

it's been done thousands of times thousands of ways, I'd just search

i'm looking for a user-friendly way to add a button to this page that resizes the iframe to full screen when clicked, and shrinks it when clicked again: http://grey.colorado.edu/pdp/index.php/Ta/DataTable

hey anyone know of a customised select box widget?
hi
anyone know of a customizable select box widget

just make your own

yeah i could but its easier if its in some library like dojo or something
cos i need one in which i can modify stuff like the color of the selection etc.

you can do it with just CSS :p
:hover

is there any array appending functions? or is this a method of the array object?

ok..think i'll just do that
is it possible to remove scrollbars from a select box using CSS?

i've got an XML Document object. it appears to have many of the same elements as a normal DOM document (childNodes, nodeName etc.) i'm writing a dashboard widget so this will be running in the WebKit javascript implementation. i'd really like to be able to use xpath to query the document,
does anyone know of an xpath implementation for safari/webkit?

what for?

for example, i have 10 values but i only want to show the user the first 3, the rest can be viewed using up/down buttons but no scrollbar (makes it look ugly and doesnt fit)

give up on the custom select box? :p

i guess.. should i just use a div and then do the up/down functions myself?

probably what I'd do
mildly useful information:
hidden; to do that
not sure if it works in Opera, but who cares :p

i am doing a FF extension..so it doesnt matter
but overflow:hidden should hide the scrollbar rite? but it doesnt

hi, can i check on a function somefunct i've got to what scope it is bound? without having to execute it?
in other words, what is 'this' for the function??

http://pastebin.com/m67b60635 (very simple 2-3 line function) heh
i don't know JS, just trying to piece something together

do custom scrollbars work in FF? http://www.webdevelopersnotes.com/tips/html/css_scrollbar_textarea_html_elements2.html
it doesnt work for me..any idea why
?

not the ones that work in IE - that's proprietary CSS
you can make them with JS, though, of course

is there something in IE, that tracks the POST and GET that xhr does

how?

can someone tell me what's wrong with http://pastebin.com/m48e1c779

hi, can i check on a function somefunct i've got to what scope it is bound? without having to execute it?
in other words, what is 'this' for the function??

really simple..onclick change image function

why use this?
not sure if it will work.. just the element using getElementById

anyone? pretty please

I m loading flash file using javascript and it works fine on IE but not on Firefox on Linux and got error "window.document.step2_zoom3.SetVariable is not a function"
This is the line in script "window.document.step2_zoom3.SetVariable('myFunction',func);"

hi

anyone know how make IE stop caching xhr responses or any HTML except images for that matter.

'lo phix
Õx

lo
caching is in the HTTP header
sooo google javascript modify http headers
perhaps
you get your server side scripting language to set the caching headers
s/you/or/

phix, i know i can do that but is it possible to just cache images and nothing else. so far i can only find minimum caching info. do you know a good page to look up, like is there a standard page.

no idea
bbl

How can I redirect a frame from inside another frame with javascript?

whatever for

whoops
same question as I asked XD

Hi
I want the search results page to show up inside the company site instead of as a new window.Can I set the target of the results to be an iframe? If yes, what is the parameter and where would I change it in the code
http://pastebin.ca/622908

The paste 622908 has been copied to http://erxz.com/pb/3619

how do i deselect all options in a selcet box via js and havin gits object
having its*
al selectedindex = -1;
how come this.form odesnt work inside a span?

Only form elements hold a reference to their form

hi guys
how can I get coordinates of some object on the page ?

element

a few ways
mouse coordinates?

no-no
element coordinates

you can either give it an id or a name
or iterate through a list of DOM nodes

phix, I've get the element

if the object is a button you can specify a onclick="" attribute and pass this in it

how can I fetch x,y coordinates

event

?

use an evet
vent

var obj = document.getElementById('item') — here is my object

event!

how can I fetch coordinates ?

why?
ummm does .left work?
I don't know

no
obj.x, obj.y, obg.top, obj.left — nothing works

hmmm
no idea then
you could try event
var env = event;
env.clientX;
env.clientY;

I wonder that it is coordinates of my obj

Is it possible with javascript to retrieve somebody's Computername? I get Hostname like this: java.net.InetAddress.getLocalHost().localus.getHostName(); Or how ro get Computer name if this impossible…

it would be OS dependant, I would go by the hostname
the computer name should be the hostname any way

not possible at all

Hi ALL

thanks

HI! YOU LIKE CAPS LOCK TOO HUH!

sorry caps on

:P

I want the search results page to show up inside the company site instead of as a new window.Can I set the target of the results to be an iframe? If yes, what is the parameter and where would I change it in the code

Target, and you set it on the form

Yeah exactly
http://pastebin.ca/622908

The paste 622908 has been copied to: http://erxz.com/pb/3619

is my html code

I dont think you understood my answer

sorry for that
How can i set it in my html code

Whats the point of that table anyway?

ok
thats an existing code
we need to incorporate that code
only

:/

so based on my needs
I want the search results page to show up inside the company site instead of as a new window.Can I set the target of the results to be an iframe? If yes, what is the parameter and where would I change it in the code

You are rambling
I allready told you. target. and you set it on the form
Read the html specifications

Thanks a Lot
Munter
can you provide me some examples of target

my god

sorry for the trouble

it's html
it takes a day o learn

Munter is it FORM
TARGET="TargetFrame"
ACTION="../cgi-bin/mycgi.pl"
for example
is that correct

http://www.w3.org/TR/html4/#minitoc read

I got it
Thanks Munter
its a href="some_url.html" target="window_name"
that should work for me
right
Munter Just wanted to confirm is that correct

Then validate your page, or alternatively _test_

ok
I am having doubts
here
Munter is it ok to go ahead with my question

As long as you stop highlighting me. And ask your question in a channel that is relevant.

Actually I want yahoo.com search results and set the target of the results to be an iframe
so setting a href="some_url.html" target="window_name"
should work

Comments

So what the the difference between say createTextNode and setAttribute Within this script that im working on setAttribute

set act as replace if the key is already there?

ok, i'll search a little more then

you weren't so far off

this thing on?

holy cow it works

most people would agree that me coding something which works is indeed crazy

trying to figure out a simplexml problem, anyone able to help out?

Ask away, if someone can help, they will

memcache_replace($session_value,$session['serialized'],false,0) or memcache_set($Session_value,$session['serialized'],false,0);
that should work right?
sicne memcache_replace returns false if it borks

Well I am grabbing a xml document from the web, simplexml loads the document, creates the object and the arrays in the object, but doesnt populate them. Why would this happen?
bWell I am grabbing a xml document from the web, simplexml loads the document, creates the object and the arrays in the object, but doesnt populate them. Why would this happen?/b

how's that?

lol it made my session handler easy somehow, no clue how
i managed to optimize it like 10-fold

how do you remove the first letter from a variable?

$variable = substr($variable, 1)l
err, ); at the end. not the l, I typoed.

oh wow, this is cool"
str_replace('"', '!')
i like to fix my typos the cool way

some people regex
s/"$/!/
yea.. anyway _
hah

lol
my code is so obscene
For my session destroy function I have the comment "Time to destroy shit!"

omg
working with an ide is so much better
thx kairu

limp, yes, it is
limp, you're using pdt?

pdt?

http://www.zend.com/pdt

yes

PDT

i used to use aptana, but i got frustrated with it. i'll give it a couple months and try again

Eclipse

I've been coding 1 year and a half with scite
xD

i used to use Vi. now thats a pain

dreamweaver is for windows
i use ubuntu

all on linux

lol
I think ed is still the best text editor though

hehe
old school? :P

Sometimes I code PHP in ed for shits and giggles
it actually goes fast

I like context
really nice and easy to use

I enjoy emacs

plus you can import settings

anyone have a magicwand 1.0.4 windows dll i can use?
magick..

meh, dont tell me the project files *have* to be in the same directories as the project file

csc`: huh?

eclipse

yeah?
oh
dunno. never tried it any other way

thats…gay
im trying to create multiple IDE configs for a project
id like to have one copy of the source, not two :P

what does it mean if you have .=
$variable .=

$a .= $b; is the same as $a = $a . $b;

hmm, I'm trying to set my game up so when you challenge someone
then they accept…
it puts you into a fight with them
but I'm contemplating how to do it
what should I do?
when the person accepts, should I put all of the info into the database
then, I have the challenge list refreshing every 5 seconds
just check it in there?

hi. Somebody knows some library that help in the form validation? (a simple example is the field that only accept numbers/characters)

for the first person

hey what's the linux program for updating an dyndns?

Well I am grabbing a xml document from the web, simplexml loads the document, creates the object and the arrays in the object, but doesnt populate them. Why would this happen? — no one asnwered the first time

What do you mean it "doesn't populate them"?

so how do I set cookie to never expire? Also do I use setcookie more than once if I need the cookie to hold 2 pieces of info?
actually I don't care about the never expire thing I just set it to 30 days

Siristian
If you dont want a cookie to expire untill the web brower closes
then dont set the expiry date
if you want it to be forever (it can still be deleted by the user) then just enter a huge a big number.. :P
remove the extra a sorry

Ramihg, it's for login so I just have it at 30 days, do I need to check if it has been created before trying to create it?
also do I use the setcookie call twice to add in to bits of info

setcookie usually replaces the value of the old cookie

if (!isset($_COOKIE["user"]) && isset($_COOKIE["code"])){ setcookie stuff }
*!

if you dont want to replace the old value then yes
but that is the correct way to check if a cookie was created or not

what does &$foo mean in a function call?

yeah I'm having it hold a code that I give it then if they come back they show me the code and I check the IP if both correspond to what the DB says then I let them in since they chose to be remembered

erm function definition i mean in the arguments

$foo is a normal variable name
&$foo is i think getting by reference

ah ha!
i was thinking either by reference or optional argument but i am still not sure

$foo = "default value"

ah i see
thankers Ramihg

welcome

is it TRUE or $TRUE?

What's "it"?

how accurate are the mimetypes supplied by browsers?

ah i see no $

can I really trust them?

If I perform a select on a unique data is there a way to just get one row and not an array?

About as much as you can trust user agent strings, or referrers.

Jafet, I guess
so should I be running magic numbers on every file I accept
to ensure the content_type is accurate

Why would you want to do that?

Im reencoding based on content_type
passing the wrong content_type could really be inconvenient

like in my DB user is unique so $result = mysql_query("SELECT * FROM testdb WHERE user='" . $_COOKIE['code'] . "'"); will only return 1 row. Do I still have to access $result like an array and just grab the first index?
wait… $result = mysql_fetch_array(mysql_query("SELECT * FROM testdb WHERE user='" . $_COOKIE['code'] . "'"));

that'll work. but it doenst check for errors.

if I know user is unique is that the correct way to do it? Seems cumbersome?
EoN good point
meh, I'm remedy a solution

also, you should run mysql_real_escape_string() over $_COOKIE['code']

I'll*

otherwise you can have SQL Injection attacks.

huh?
have it look-up things it isn't supposed to?

Another clueless programmer.
Google.

yeah, or delete your database.

by using nested calls… I'll google

Meh, the API should use format strings anyhow.

*sets

here's one example — http://shiflett.org/articles/sql-injection — but google 'sql injection'

if he is running PHP5 it will be escaped
by default that is, i belive
but still insecure

http://us2.php.net/mysql_real_escape_string — explains it here
a href="http://us2.php.net/mysql_real_escape_string"http://us2.php.net/mysql_real_escape_string/a — explains it here
The server I'm using is php5, but still I've only been using PHP for 5 days. These things you guys keep telling me are useful

i don't mean to ask for a show of hands, but does anyone know the ratio of peple using php for their own personal sites?
people*
(out of all people that use php for websites)

EoN, so by using mysql_real_escape_string() alone it will make things safe? I don't have to pass in parameters?
I mean other than the string

by that i mean ratio of people that use php exclusively for their own personal websites out of all people that use php?

mysql_real_escape_string($_COOKIE['code']) — that would be good?

That is correct.

sorry for the delayed response… everything goes just fine, just the data from the xml document isnt populated in the object (many arrays, no keys, etc)

okay, I just realized I didn't do that on any of the my code. Good thing you guys told me

Does anyone have any experience with integrating Python and PHP code on the same website? I am curious if there is a good resource on the web with info about this kind of thing.

thanks!!

I am coming from the perspective of having a lot of PHP code, and wanting to integrate some python pages under the existing framework.

foutrelis, one last question do I have to use the . operator on mysql_query("SELECT * FROM testdb WHERE user='" . mysql_real_escape_string($_COOKIE['code']) . "'") or is there a better way?

im in phpadmin and want to fill a table with a csv file containing all my data. how do i do this

you dont have to keep putting things on the same line
if you get problems its harder to debug. and it's harder to read as well
seperating things is more clear & logical

TML?

EoN I know I did when I posted it in here

ahh ok fair enough

If you escape $_COOKIE['code'] inside the mysql_query statement, yes. If you store the escaped string inside some other variable (for example $test), you can use mysql_query("SELECT * FROM testdb WHERE user='$test'")

anyone ?

EoN umm does the query return something when it fails or just null?
foutrelis, okay I thought so

Sirisian use mysql_num_rows($result)
for example, http://tando.com.au/src/db3.phps

oh and if it equals zero then yeah

yep

can someone please help me

Do you have to use phpmyadmin for that?

well yea
the php server is on my web host

import.

not my local computer
im at import
i mean import only seems to work with sql commands

is a standard way of making my php session variables available for other scripts on the system?
by "other" i mean non-php scripts.

I doubt it.

I don't really use phpmyadmin, let me look.

You can, of course, use your own session handler that allows interfaces to other languages.

no, but you can create web services.

Well I am grabbing a xml document from the web, simplexml loads the document, creates the object and the arrays in the object, but doesnt populate them. Why would this happen?

ie create an interface that another web app can call, and your php will provide the variables it needs (maybe in xml)

What's the problem?

EoN, just making sure I'm doing this right, if I'm just comparing strings then there would be absolutely no reason so use the escape thing like in if($row['code'] == $_COOKIE['code']){//foo }
it's only for queries

kambie i have a somewhat large file (308k) of data thats stored as a csv and i want to import into a table
the database and phpmyadmin is on my database
oops
is on my web host

Navicat FTW

Am I still here?

what ??

Navicat is a MySQL client. Has import features and stuff

Am I still here?

no

Well, I have never used phpmyadmin, but I assume it wants you to upload the, yes?

i cant use navicat

that's a good idea. one question then : can the calling script get the cookie from the user that stores the session id, then pass that cookie to the php web service to get the data it needs? that would be relatively easy.
i am not familiar with exactly how the session cookie is encoded.

I should say, I have never used phpmyadmin to import a file. I have always done it through mysql CLI.

Is it sensitive data? If not, you can give it to me and I'll try to make you a nice sql dump.

what's an example of the information you'd want to transfer?

kambei, i used to have the database and phpmin running locally on a linux box and so i used the LOAD DATA local INFILE
command

right now, our framework stores the user id and permissions using session variables.
to start with, the called script wants to ask PHP, "is this user authorized to view this page?"
without having to authenticate independently again, of course.

foutrelis, will that dump result in many insert into table xyz commands ?

Right.

i think it woudl have to be stored in the database. then you'd make a page on your php web server webservice.php that can be called like: webservice.php?id=384&password=yourpassword (yourpassword would be something that only the calling app knows)
the thing is afaik it cant be from session… it will have to be from the db

now that its on my webhost i cant do that any more

thanks.

You 'll be able to import it with phpmyadmin

because if I have a session with your website (called 'dogface')… then ANOTHER website comes and requests dogface for information, that request is in a different session.. you know?

Btw, how many columns is it? -.-

let me see

well, i still have the problem of identifying the user to the webservice.
would i store a link to the session id in the DB with the user's IP address, for example?

foutrelis, its almost 4000 columns

Sorry for being late to this conversation. EoN, what would you like to do/

w00t! Are you sure that's not rows?

LandryRaccoon is asking the quesiton

err sorry
4000rows

sorry, LandryRaccoon
what is it that you would like?

Please join me in #asghjoadhgoadhgoeshg because this is ##php

foutrelis, 7 columns

Thanks. I have a python script that I want to integrate within our php framework.
The short version is, we store the user authentication, permissions,etc in session variables

ok, so, what issue are you having/

I want the python script to be able to ask PHP, "Is this user authorized to view this page?"
is there a simple way to do this?

well, it depends on what you mean by simple

EoN suggested using a web service, but I still have the problem that the Python script doesn't have access to the PHP session variables

you're launching this script via php, correct?

actually, no.

where's the process starting?
is it user-php-python?

the user could follow a link via their own browser
web.py

i was about to write the same ascii flow
hehe

the user work flow would be :

follow browser link to .py script

ok, so what's the usse?
you can easily authenticate via the php script

okay silly question is $_SERVER['REMOTE_ADDR'] the IP of the session? a 15 character string?

yes and yes
well
length depends

IPv4 I guess

can you give me an an example of how you'd do it?

and then redirect to the pyton script with some sort of secure process, or call the pythin processes natively in php
python*

I think that 'some sort of secure process' is what he's asking about.

I see
well, that depends on what you're trying ot do with the python script. Is the python script going to basically serve up content to the user, or are they merely functions that do something that can be called, and then served via php?

the python script serves the content
hence the difficulty

i guess you could pass some sort of private key to python, so that python knows that the request came from php? or even in python put 'ONLY RUN If the request came from this exact php page'

the python and the php share a common database, but atm that's about it.

hello

ok, you could do the following
you redirect to the python page posting the session_id, you create a cookie in php with that session_id, technically they should already have this cookie, then in python you can see if there exists a cookie named that session_id
the order should be
create cookie using session_id, after authentication
redirect to python page with session_id as data, you can even md5 it with some key
to make it more secure
then un encrypt on python
and check to see that the cookie exist with the session_id before serving up content

ah… i think that would work. i suppose i can add a redirect to a php page that does this to the python page, in case someone accesses it with a bookmark and it will still work.

well the bookmark should merely pass in some sort of a flag

so in PHP $ is a reserved character do you just use \$ if you want to use it?

to get you back to that content
don't let them bypass the login with a bookmark
if they logged in then the cookie should still exist
and you don't have an isse
you can use single quotes to
Sirisian
too*

need a suggestion about an important project… I have an application that's residing on what I call the master server. Basically, this application saves and edits data in a table, nothing more

what i mean is, if the .py page doesn't recieve an identifying cookie, it redirects to a PHP page which then authenticates and redirects back to the .py page

if you use single quotes php won't process the $

but yeah, makes sense.

yes
correct

DOM isn't documented very well.

thanks.
very insightful

no problem

ASnyde1, echo "form action=\"loginsubmit.php\" method=\"post\" name=\"frm\"" — should I have used single quotes around that?

yes

Anyhow, I need to be able to perform these operations also from remote servers; of course, I could connect to the same MySQL database, but I need to be able to perform these operations also if the master server is using a localhost connection not open to the outside world
bAnyhow, I need to be able to perform these operations also from remote servers; of course, I could connect to the same MySQL database, but I need to be able to perform these operations also if the master server is using a localhost connection not open to the outside world/b

but then you have the double quote problem
just do the following
same yourself some time
"form action='loginsubmit.php' method='post' name='frm'"

What exactly is appendChild in terms of DOM?

appendChild will add to the parentNode
whatever node you're adding
hence append child
so, consider the following structure

Please do write the structure! I really don't get DOM.

ok, so in conventional markup
if you had a div
so everything between the open div……/div
would be considered nodes of that div element

Yep

furthermore, ff you had a div in that div
anything within that div would be nodes of that inner div and so on

could be anything, anything at the top most level.

yes

What happens if you keep going into more levels?

but it doesn't make sense to appendChild to things that are not containing elementts like divs
you can get as deep as you like
certain dynamic sites can easily get hundreds of levels deep

So basically when we tell something to 'appendchild' in PHP, it goes down a level?

well you don't tell php to appendchild
php doesn't know what that means
your appendChild is a javascript function
well, it doesn't go down a level
you're saying you want to add something to that level

Oh I see. How does it know what level things are currently sitting on?

if you were to append to what you appended, then it would be the sublevel
well you do obj.appendChild

Ohhh

so whatever oj you're appending
obj*

Thanks for that I completely understand

it's a shame that google isn't very good anymore

I honestly read though alot of documentation.

I'm sure you did, I'm just saying google is terrible
I've been using my library more and more
usually my search results are filled with non-sense and I'll be forced to resort to my reference

Can someone look at this and tell me what I did wrong and what is right? http://rafb.net/p/06dxb748.html — what can be taken out.

Sirisian, give me a minute

So what the the difference between, say createTextNode and setAttribute. Within this script that i'm working on, setAttribute sets the year and CreateTextNode handles quotes and names. When you use the script, they both seem to be the same?

okay

Maybe its hugeness is slowly dooming Google.

You should really use single quotes when it's a constant string
it's faster than doublequotes
doublequotes need to check to see if there are variables within it

i dont find google terrible at all?

something I was wondering, if I use $con then require it in the file and access $con will it have the data in it from require script

it's terrible with javascript, that's because there's SO MUCH outdated and garbage information, not to mention NEW, bad practise information out there.

EoN, when you try to search for something somewhat general, or vefy specific, google can't return anything

adding 'dom' to your google javascript queries filters out a lot of crap.

yeah
I've even learnt the google syntax
doesn't help so much

ASnyde1, so wait I did the string stuff wrong?

no
well haven't finished reading
but I'm just saying

oh good

when you have the choice between doublequotes and singlequotes
always use single quote if it's a constant string

okay
good advice

just faster, technically
Sirisian, what is not working specifically?

ASnyde1, haven't tested it
just wondering if it looks sound

it's ok
I personally wouldn't do things that way

I'm an almost complete newb with php

well then let me give you some good advice

ah functions

use stored procedures
for database stuff

can you give an example?

I also highly recommend postgreSQL over MySQL
it's much better

Be beg to disagree.
**I beg

ASnyde1, I have it next to me. I have a ubuntu postgre server thing

But thats just my choice :P

I'm not trying to start a flame war
but, in terms of features
it's as close yoyu can get to a commerical db
without paying

why? i haven't used postgresql, only beause my hosting environments haven't offered it, but i thought it was commonly accpeted that postgres was better?

mature storedprocedures, triggers, sequences, arrays, etc, etc

my brother's server only has mysql, I'll be using postgre when I start work. I bet that scares you. Someone who barely knows PHP working on large projects… :P

hi

Well, Sirisian, your script looks like a standard php newb script
it's ok

I dont get the days of month with date correct for february - isnt date capable of returning it right?

you can technically break out on lines 34 to avoid the numerous echo

that's good, 5 days and I have registration, e-mail verification captcha and some other random stuff done. Just getting the basics in before I write my own library

why are you writing your own library?

wrapper I should say

there are many solid libraries out there
please don't write your own library

true, I should start looking that stuff up

I would recommend using a particular one, but it's not released to the public yet
currently, there are numerous various libraries, snippets of code
floating out there

what do you mean break on line 34?

to do things
break out of php

does php have a break; command?

just ?
then continue on, and then
?php
to continue
it's weird like that

oh cool
that would have saved me some time

look at the zend framework

Sirisian, break out of a loop?
or out of php code

php code

yea

just close your tag

Ramihg, yeah I was trying to think how to switch to html in the middle

I say don't

but I was thinking that would break my program flow before

it wont
its just like echo'ing one big string

ASnyde1, don't what?

switch to html

okay, I'll keep it all in php

no, I'm not saying that

Sometimes switching to HTML is very necesary
i do it all the time

I'm saying I suggest you use some sort of a model, template, text file etc

necessary*

is it better to query multiple updates in different query calls or 1 query call?

to separate your code and content
technically faster for one query

I don't think he wanted to get into that.

but, even faster if you use stored procedures
Don't you think it better to start best practices at the beginning?

One has to experience bad practices to know what good practices are

definately. I'm only a newb in PHP, I know C++, and many other languages.

if you know c++ you'll be fine with php.

I don't agree. What usually happens is that they become so used to the wrong way, that any attempt to change to the correct way becomes difficult.

I know, I haven't found many OO tutorials

Or, if it's project code, too late

I'm guessing since PHP5 is new?

it's not

its not that new…

oh

OOP was present in PHP4

php has php5 docs
that explain a bit

PHP4 oo was garbage though

it was in php5
ahh I remember that

PHP4 OO did its job for me :P

it was pretty decent there too

a lot of people are still on php4

had its issues with references
but decent

a lot of web hosts are only NOW moving to 5. because cpanel supported 4
only

ah

what are you paying for your host?
if you're paying more than 20
I recommend switching to a vps

i pay 7 a month. hah

I see

Actually
i dont have web hosting as of a week ago

I can't imagine not having root access

I'm lookin for a webhost that doesnt charge me 30$ startup and doesnt charge me anually

check this out

in AU, vps's/bandwidth arent as cheap as in US unfortunately

www.slicehost.com
they're awesome
read their mantra
you can scale up whenever, so great
it's like your own box
can do anything

www.akiraweb.com

I had a few dedicated before
and then switched to slicehost
so much less, and actually more powerful than most dedicated servers out there
the only downside is that you have to know the command prompt

well

and do everything yourself

VPS has one huge difference

What's that? I want web games :|

what's that?

In a dedicated server you dont share :P
That matters if you're running lets say, tomcat

in a a good vps

it eats up the CPU

it doesn't matter
they'l have an insane box with 16 processors
and tons of ram
with awesome virutualization
on the CHIP

i was supposed to get a lot of work tonight
lol
done*

I guarantee you it's far faster than a cheap celeron dedicted box

VPS = they don't shut your site down when you pass their %10 CPU limit :|

I was supposed to finish a project today. Then i got into IRC

I definitely recommend slicehost

That's how it usually goes Ramihg

A properly setup celeron box should perform better than a celeron box.

they're so chill

er
VPS

you can talk to the creators any time in the chatroom

Let me fix that
A properly setup celeron box should outperform a VPS

20$/mo is still to much for my VERY simple hosting needs
too*
But i'll definatly bookmark slicehost, who knows

i heared google give a free hosting?

you should look at the actual statistics in terms of machines, bandwith etc, I had 3 prp[erly setup dedicated boxes
and now have 4 slices
paying about 1/4
and my performance is farr better

You are limited as to what you can run on VPS

I used to work for a VPS provider.

the only drawback is storage space
not something like slicehost

We could fit more than 60 VPS per node
:P

On a dedicated box you can basically host a game server if you wish

jesus.

its your own

it differs from shared hosting, how?

Of course these are like 8-way Xeon MP servers with 32GB+ RAM

knownhost.com

well, a good company will only put 8-12 on a node

ahhh ok

They performed fine unless someone was running prime95 or something.

the problem is you can never tell how many they have per node hey.

You don't fit only 8-12 on a node because that won't justify the cost of the server for a very long period of time.

well, if they're using something like xen, and they're mantra is not corporate
it's a bit different

Hey i'm running php 5.2.3 on win32, and i'm trying to install the gd library. THe problem is it's showing up on php -m but it's not showing up when i run phpinfo() and none of the gd functions are recognized by php
I posted this awhile ago but never really found a solution

Did you uncomment the GD library in the PHP conf file

Can't help you with win32
sorry

yes i did
thanks anyway =p

Did you restart apache

yep
it's showing up with php -m but not on phpinfo
kind of strange

Heh. We're working on cluster hosting where I work now (different place from the VPS job). That will be sweet.

kinda like the amazon hosting service?

Are you sure the GD library is there (just a hunch)

that is pretty sweet

yep, the dll is loaded, and it finds it, no error when i just run php from command line
here's the config line from phpinfo
cscript /nologo configure.js "–enable-snapshot-build" "–with-gd=shared"
but there is no seperate 'gd' section

Yep. Going to be a pain in the ass to get setup, but whatever

in phpinfo

One of the things I specialize in outside of my official "job title" is systems design. I can make things large scale work very well.

Did you compile your own PHP or did you use a pre-built binary

pre-built binary, just unzipped it

^_^ I designed the system setup behind two major hotel portals and a few other sites.

I suggest you read about slicehost. They're very different

I'm familiar with SliceHost.

how many servers does a major hotel portal need?
do they get several racks
?

As many as you need.

Make sure the php.ini file phpinfo() says PHP uses is the same php.ini you edited

I suggest you start with one or two?
You can always add more.

how do i change "Configuration File (php.ini) Path "

sure

He was asking me :P

but the question was, is that what they do?

I see.

basically the avg load these companies expect ot begin with

Usually the default location is Windows\php.ini

Well the two that I had their own in-house solution set up. It was pretty much cruddy

If not, then just edit the php.ini that PHP is currently using

Imagine taking an ice cube tray and filling it, except, when it's full, keep going… that's what their solution was like.

a friend of mine had a heavily trafficked site, and was using three amd boxes running optimized tools etc

What's your favorite server distro?

They had uhm everything on one server
And when I got done with them they had 2 cabinets worth of equipment

he had about 200,000 visitors at one time
I use gentoo

Depends on what I'm doing.

started using gentoo about 3 months ago
pretty awesome
I love portage
and emerege

CentOS is a good platform for providing web hosting on, but for my own applications I tend to use BSD

emerge*
it solved the whole installing custom stuff

I see. Thanks for your answer.

the problem with fedora, cent, debian, others

Yup. NetBSD for Speed, OpenBSD for Security.

is that it's fine using binaries and prevonfigured stuff
but as soon as you want your own settings, or custom stuff
it becomes a management nightmare
so, gentoo for us

CentOS is fine for things that run cPanel or Interworx since they use precomiled binaries anyways, and unfortunately, shared and dedicated users demand either or

there's always webmin

But *BSD has the original ports setup, and I quite like it.

it's decent now
don't know why users demand cpanl, or plesk
they're really terrible
don't let you do anything

InterWorx is very nice.

really? I've never used it
find myself locked more and more in the command line nowadays
as much as I would love a good gui tool
they all tend to fall short
or need everything done their way
any deviation and your system falls apart

btw ASnyde1, if SliceHost felt so inclined to, they could fit as little as 64 VPS per system, as much as 256 VPS per system.
InterWorx is very very cheap

Lets make our own system managment utility

I would totally go for that.

In 4 or 5 years we'll be famous and rich

But I want it based out of shell, not browser.
That would be so awesome

KairuMaiku.. hmm.. java?

I'm sure, but they won't
nooo java
noooooooooooooooooo

I 'll stick with my CLI I guess ^_^

Hahaha, its more platform-independed than using lets say C++

I was thinking C++
lmao
lol

do if php strings start at index 0 or 1

The web browser can just be the front end

depends
towlieban

With lots of perl/C++ scripts doing all the work

depends on what

are you doing something like this

Hmm. Yup.

$temp = 'someString'

Too bad I don't know how to code perl.

$somestr="foobar"

then $temp[0] would be 's'

hmm

perl's straightfoward

Neither do I.

it's just rambling on a line
less structure, more code
just do what you like really

ok this is my code http://pastebin.com/m21e01ccc

Ugh cPanel licenses are so expensive. We just got a discount of like $3 from them per license and saved $2,800/yr

I don't like Perl's syntax

the problem is that when using the explode function all the " in my strings are escaped with a backslash

me neither, but it's interesting

Interworx = Mega cheap

what are you doing towlieban?

parsing data from a csv

webmin = FREE

I see your point.

Hmm damn now I really want to code one.
It's even cheaper when you have bulk licensing

Instead of using substr, use string[position]

hey perhaps someone can help me

Shoot

Perhaps. Perhaps not.

supplied argument is not a valid MySQL result resource

Damn you. Now I want to code it, and I need to get my site done

maybe there's a better way to do what you're doing
what are you trying to do?

long story

Are you using the variable returned from mysql_query?

im trying to parse csv data

that's because it's not a resource
nnu:

yes

Are you sure the query was successful?

towlieban stripslashes or disable magic quotes at runtime…. - n00byansweraed

meaning that the mysql_query($connect, $query)

rather, ill check again tho

is not returning a resource

Oh trust me, I'd love to do one too

What does this line mean? $quote = $dom-createElement('quote');

But work is really… annoying.. and I'm writing a byte-compiled language on the side

swell it would not be $dom-.createElement
as JavaScript does not use $
but what that means

:-\ I have to finish this site before school starts. lol

and it would be $obj = someObj.createElement('type')

I have to write a modules-type system for the front page too so users can rearrange it

I'm using the DOM class in PHP.. $dom's a variable.

What do you study in school?

I'm in HS. Junior year.

obj = document.createElement('DIV')

What does what does it do? 'createElement'

you're creating the node

Amazing, and you know all these stuff?

so, it's a way of dynamically creating an element in Javascript

HS as in high school right?

Learned over the years. Yup, high school.

rather than needing to have hardcoded strings of div/div
you can programmatically create dynamic elements

I know on a network, a node is a single machine. What does it mean in terms of DOM?
Or on a tree.. The place on a stem where the leaves or branches are attached.

think of the dom as a tree structure
so, it's made up of nodes
and if you know anything about trees
it all makes sense

I'll make a note to learn about trees before programming :P

well it's very important

does php have tools to handle bencoded data?

there are many good books out there
tutorials are one thing

bencoded data?

but actually knowing concepts is completely different

the type used in .torrent files

I'm sure this is wrong, does createElement 'create' a level and appendchild assign to it?

it just creates the element and returns it
you then have to do something with it

no, however, i have bencode classes if you are willing to offer something to me

so, for instance in that previous example we now have a div object
in the obj variable

i'll just google arround

:P
alright.

or make some

you would then append it to some node

i got ideas on how to do it

so do someNode.appendChild(obj)
Thomasporter
take a look at the YUI toolkit
you won't have to worry about much of this non-sense

Imagine a node as a branch, and each branch can either have leaves, or more branches stickin out

they have deteiled references

But theyre all connected to one tree

tutrials, and even quick reference sheets on their library
that will handle all this stuff for you
Thomasporter

I'm starting to understand. So basically we are 'creating' a 'branch' with 'Create Elements'… and then adding 'leaves' with say createTextNode

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

This is like lecturing in greenpeace

Lol
That link is PERFECT. Thank you.

Wikipedia links are "PERFECT"?

Perfect like me

Most of the time I find them to be the most helpful resource on the web.

Same
ONE of the most
with IRC/Discussion Boards/Asking your professor being on the top too

http://search.cpan.org/src/ENNO/libxml-enno-1.02/html/XML/DOM/hierarchy.html
friendlier example using a table as an example http://www.jalix.org/ressources/internet/dom/_webcenter/part1/drawtable.html

im getting an error #1136 - Column count doesn't match value count at row 1 when doing an insert. i counted the # of clumns and its the same as what my database has. any know of anything else that can cause this ?

towlieban, would you happen to have a code snippett/

yep
INSERT INTO temp (`songname`, `artist`, `album`, `genre`, `time`, `track`, `year`) VALUES ('"Rose","A Perfect Circle","01 - Mer De Noms","Hard Rock",03:26,3,2000');

missing a quote there

where

Thanks heaps

('"Rose","A Perfect Circle","01 - Mer De Noms","Hard Rock",03:26,3,2000');

where is there a missing quote

with the date

well its all wrong

Comments

hi i developped an app which use many librairy I want to generate a jar file so im trying to edit the manifest

surial, yes already
surial, ignore the method references, since that wasn't the important point of the annotation

pfn, it won't run your processor if it's not on the processorpath

Indeed. (I didn't see your line until after I hit enter) ALL i want is this: private @Getter @Setter int someField; //generate the simplest getter/setter for me here.
If I need a getter/setter that does something fancy, I'll just write it.

ah those java experts

dmlloyd, it won't even compile if the processor isn't on the processor path, since the annotation must be in class path

or just @Property would be nice

cheeser, right, and that's what I've done

the processor path is not the same as the class path

dmlloyd, the processor path is implicitly the classpath

except that usually I don't want a setter, and by splitting them it's easy to specify different access levels. private hosting @Getter @Setter(Access.PROTECTED) int something;

surial, @Property(readonly=true) or something like that was my option

fair enougn. but i'd prefer pfn's approach

broke`: yeah, v0.11 no docs, no site, i dont think so

That's a lot more work compared to just @Getter, and as a rule, just a getter ought to be the default, not both.
then I'd rather have @Property(writable=true) if you must

surial, doesn't work in many cases, e.g. JAXB
and jax-ws

except you'd waste a lot of people's time

jax-ws requires both if you want to properly serialize your object

Well, in those cases, toss a setter in there too.

hello. what would be a recommended structure to use for storing objects and then searching through them for their attributes later? vector? linkedList?

Never Vector.

you're make the noraml case more work.

multiple maps.

lol

most frameworks can work directly with private fields

surial, but yeah, my code isn't actually used, since there's such poor IDE support

depends on how you search. could be you want a Set, not a list.

how do i get jax-ws to generate the parameter names in the generated xsd as defined in the method signature instead of 'arg0' 'arg1' etc ?

meeper many, not most

Except that I consider the normal case to be just a getter.

the special cases should take the extra effort and the normal case the default.

meeper I reiterate jax-ws and jaxb as those that can't :p

really?

you're in extreme minority.

meeper and yes, I use JPA + private fields

any framework that can't work with private fields ought to be taken out and shot

I doubt that.

meeper spring as well

Immutables are Good.

meeper spring is javabean-style only

I agree with surial, immutable objects are common

they can be, sure. but they're not the normal case.

unless 2.1 is addressing that

well spring is all types of retarded. but jaxb should be able to work with fields. lemme check

just because a lot of J2EE stuff thinks otherwise.. I think in J2EE land, setters are the norm, and in J2SE focused stuff, they are not.

I make more immutable objects than mutible

sure they are

setters are the norm everywhere

more importantly though, the importance of immutable is a rising tide, not a waning one. Thus it is asking for future trouble by making 'mutable' the default.

the JEE/JSE distinction is ambiguous and largely irrelevant
i just don't buy it.

well i have an object of MP3 let's say, and i want to store the MP3's and then see if an MP3.getId() (it's id) is in a list or set or whatever of other MP3's.

and all that's beside the point anyway.

dmlloyd, anyway, I repeat–classpath is enough for anno-procs

I think you can add an @XmlAttribute to a private fgield in jaxb

and yet I see it everywhere. Lots of J2EE focused tech uses setters intrinsically (e.g. beans), whereas in J2SE (as in, stuff that does not really mesh with the jboss hosting defined interfaces), immutables are very common.

common doesn't mean the normal case.

but efficiently i suppose because it will be done often. so not really liking the idea of iterating through every memeber of the list/set

meeper possibly so–my only real interaction with JAXB comes through JAX-WS

in my own work, i see very few immutables.

In mine, I see many

In my work, I see… let me do a quick search here.

any case where there's thread-safety
issues

of course jaxb is evil anyways because it depends on xml schema. you should use http://jibx.sourceforge.net/

~evil

only morons use the word "evil" to refer programming practices, IDEs, etc.

0 setters, 915 getters.

tho I don't think jibx supports annotations yet

meeper I'm ok with xml schema–did you not hear? I wrote an entire soap stack for javascript using js dom :p

well you'
well you're going to hell. such a terrible thing stains your very soul

the new Time/Date API will have a large number of immutables

mmmmmm

setters should take a good, deep thinkthrough. In cases of doubt, the preferences goes to where the auto-pilot behaviour is less potentially dangerous.

meeper, http://paste.hanhuy.com/wsproxyfactory.js
heh…

though XML host schema is really very evil. I have yet to see it not make everything complicated and hoopy

well, some sort of schema is nice

it's not evil, that's silly

~ty

AlphaOmega, ty is the creator behind the fad-tabulous beanie baby craze of the nineties.

it's definitely complex

relaxng sounds interesting

har har har

but it's harder to parse than xmlschema
"harder to parse" since it isn't xml

wel time/dates, being immutable values, it makes sense. but the vast majority of objects aren't immutable.

hi pr3d4t0r

what's that about?

hola pr3d4t0r!

pr3d4t0r is pr3d4t1ng

a welcome-back-to-the-keyboard-kick?

I heard a cry in the wilderness demanding that.

Cheeser, you should really do something about that lieutenant of yours.

like what?

I dunno. Explain to him the nuances of random kicking.

feel free to do so.

.jj

i don't believe in empowering people only to dictate to them.

meeper anyway, I prefer there be some sort of schema
meeper xsd fills that niche

Thing is, he doesn't really listen to reason.

:*
It was done with love.

why? just to satisfy soap/wsdl?

meeper any time you have any automatic negotiation/validation occurring, in any sort of ESB
not just for soap
but yes, xsd seems rather vital for soap
I don't see how you'd get by on any rpc/message-passing system without some sort of IDL up-front

rpc tends to be annoying with static languages.
Unfortunate.

it's not that hard. you just implement the messaging system and do validation in your parsing code

meeper and you want to implement that validation for every permutation of your messages?

I've found schemas to be almost a complete waste of time except sometimes they have value as documentation
well yes

instead of defining common contracts?

yes…
most of the time (1) writing a correct schema is impossible since xml schema is horribly limited (2) schema validation is very slow and breaks down completely if you're doing a few hundred messages/min (3) it's a nightmare to maintain

but jax-ws seems to produce some pretty reasonable schema

so I don't even bother with it, and spend time ripping it out of a lot of places

gn8

1–not really, 2–if you're constantly referring to the XSD DOM, 3–not really

you think schema is not limited?
you can't even do a random set of elements. it's impossible to write schema for the simplest formats like rss

schema shema.
That doesn't really work

meeper depends on your concept of limited, I don't see it as limiting, I don't want to have a random set of elements

mein gott

if you have a random set of elements you can't have a schema

i like xml used in configuration, maps, lists, all that, i dont like xml when its used as a programming language

that's like saying you want an rdbms table with random column names

well yes, though there's nothing wrong with a random set of elements. the problem is schema's total inapplicability

as for rss… it sure does seem so simple with rdf, dc, etc.
ugh

you really need to grow up and stop privmsging me. I couldn't care less what you think.

And where do you think XML validation falls? app programming, or configuration?

but i usually dont write the validation code
if you ahve to create your own XML hosting schema, that sucks

its not so bad when you've got an IDE helping you

well, rss is its own kind of nonsense but. I still maintain schema isn't worth it. maybe tools have gotten a lot better in the last couple of years but I still have gotten along well enough while avoiding it like the plague

like?

any IDE that has a basic understanding of XML, like element and attribute completion
IDEA for one

okay, but, XML is a -really- horrid basis for a DSL. WHich is what we're talking about.

it doesn't excuse you from understanding schema, but it makes you less likely to screw it up

I'd be curious to see if anybody but the hardcore wsdl-heads are using xml schema. it seems like a very niche technology by now

programming ant is a pain in the tusch for a reason.
~gosling

surial, gosling is a pure java host build system. It can be found at https://gosling.dev.java.net

yeah, they all suck, i havent seen a good representation of xml visually in the ides

ant plain sucks for complex scripts

yeah but I think that's largely due to the lack of namespaces etc

it works great for simple setups
dmlloyd, ant? no
ant has no need of namespaces

Sure, but if it's simple, a java-notation-powered build 'script' would also be simple.

it does

the problem with ant is that it's "declarative"

maven is easier to configure than ant, but its still xml, see there, maven youre more configuring the xml, in ant , youre writing full fledged programs with flow control, yeach

there's no concept of flow-control, etc.

no, it's just that ANT is a really poor programming languages.

and there-in lies the problem

what pfn said.

never used maven, don't know, don't want to go through the overhead of figuring it out while ant still works for me…
I also don't like having my dependencies auto-fetched

lack of namespaces or schema or anything like it means that an IDE has no standard way to do things like element and attribute completion

I prefer to have them checked into my repo

Same here. I can make an work for me, but once gosling is out of alpha I'm gone.

dmlloyd, that would be lack of a namespace
er
schema

maven checks them into your repos, but initially, you have to dl, Maven host also does this for you

namespaces have nothing to do with it

i would use ant if its working for you

AlphaOmega, I don't see the advantage in that really

but they do - any non-core task or set of tasks should have its own namespace
otherwise, there's no way to validate the thing anyway

yeah, there is a big advantage if youre using ant improperly and getting frustrated

dmlloyd, there already is no way to validate ant :p

exactly!

if ant is working for you, then continue with ant, maven will probably be worth thte switch a little later

but there would be, if the tasks were grouped into namespaces

and yes, using ant xml properly *would* mean adding namespaces and schemas
rather than registering a taskdef

this is what I'm saying

indeed, but, would'nt you rather use gosling, or something similar?

you would use xmlns:taskgroupname xsi:whatever="…"
surial, I'll use the best tool for the job when such a thing is available

you'd have a ton of declarations at the top, but I guess that's the price for using xml

ant would be just fine if it stole maven's pom

gosling is exactly like ant, but instead of javac whatever whatever, you do new Javac(whatever, whatever) in a .java file and compile hosting it.

surial, I don't like having to compile
I'd rather have a jruby/groovy/scala/whatever script and run it

That's what IDEs are for.

or run gosling inside of beanshell, etc.

or a makefile?

There is a python-based java make replacement.

there's a maven task for ant. i use it to do just that: handle dependencies

an ant command line variant for gosling would undoubtedly use beanshell.

I mean, if ant had maven's pom built in. and of course got rid of the dependency madness

or some similar I'll-worry-about-compilation tactic.

jruby + buildr sounds interesting, perhaps

in maven, you can run any build.xml file

buildr, that was it.

transition is a cinch

"pom" isn't the point. repository management is (including versioning, automatically fetching dependencies, etc)

well I disagree. I think maven's repo management sucks. all I want is the pom

so, using mavens existing infrastructure (and repositories) seems like a good idea

Still rolling with Wicket?

well, without repo management, it's pretty pointless.

the maven repo is ~10GB, you can mirror it too

I don't think I've ever seen a maven build actually work when it had to download dependencies. the entire thing is pretty crazy

the main point for me is not having to copy jars around all the time

indeed, you ahve to find every dep, compile and runtime

orange80, I haven't written anything with wicket for a while, my voip application has been languishing–how's the job going?

so good unit tests are key

well no, with just the pom you can get away from having to define all the standard ant tasks that everybody reinvents over and over

hm, never had a problem with mavens dependency resolution. always just worked.

Oh, I love it there; a little stressful, but that's to be expected.

maven's build process is too restrictive for my taste though. and it confuses me, so i stick to ant

Nice to have (good) health insurance for the first time in a while ;-)

well, maven is deisnged to do *everything* the entire build process and project lifecycle, it takes a lot to learn,

I had the maven book opened up in a tab for a while, I couldn't get around to reading it…

i mean it generates your project website and can manage the entire website from a pom.xml and optional site.xml

I have been learning Wicket in my spare time because I hope to use it on one of our future projects rather than Struts which I don't really like.

is google calendar open source or source available somewhere?

uh, its javascript, no? so it has to be open source?

Duesentrieb ah yes that would make sense

hes probably talking about the non-public parts

Duesentrieb, just because the source is readable doesn't mean it's "open source"

Agreed. Someone once told me, "look it's so easy! All you have to do is this, and this, and this, and this, and this, and this…" And I'm like, "uhm, why is this easy again?"

yes it does. that'S the definition of open source. it doesn't make it Free Software, though

yeah, tahts called gpl

ok, someone please answer this time

I'm working on this thing, and have been thinking, what would be the most effective way to store data so it can be searched for rather than selected with a specific number/word.

how do you get mysql and java to talk

~jdbc

AlphaOmega, jdbc is Java DataBase Connection, the standard java API for communicating with databases using embedded SQL commands. See http://java.sun.com/tutorial/jdbc

V00do.

?

read the documentation

i'm confused
what documentation

nobody's going to tell when there's tons and tons of documentation on it

JDBC

google isn't helping

start with mysql's java docs

Just search "MySQL, Java, JDBC"

maybe read the jdbc tutorial
might also want to read the book of matthew

ok fine, jsut email me your homework and ILL do it! sheeeesh

hmmmmmmMmmm
So a friend of mine brought me back some rock from a beach in Hawaii…isn't that like really bad luck?

yeah
and that is true by the way

oh?
Actually it was sand and rocks.

my grandparents brought me back some lava rock in the shape of a pagan gift shop tiki god and i had bad luck til i broke it by accident and threw it away

Are we talking rock or "'rock"?

i dunno if that was it, but i think so

She said she got me sand from the black beach and somepebbles.

did you know, bad things happen to superstitious people

really?
lol

I feel good anytime some chick I like brings me something ;-)

of course, it doesn't bar stuff from happening to normal people
;-)

yeah, true dat.

Look at it *that* way.

hehe

the fact that bad things happens to everybody means that it happens to superstitious people :p

That overrides all the other shit.

yeah.

my grandparents tried to kill me too

Black sand!
What makes the sand black?

I'm working on this thing, and have been thinking, what would be the most effective way to store data so it can be searched for rather than selected with a specific number/word.

It's volcanic ash, I think.
Ok, I'm here to state the obvious.

lol

Cool chica, anyways?

?

The girl
Is she cool?

yeah.

you are writing a database. or a search engine, if you want "soft" matches. read up on "information retrieval".

…but it's not like that.

the general term is "indexing".

Damn, I hate it when "it's not like that"

uh don't do that

orange80:

look at java lucene. it does everything for you

freetext index

lucene for freetext, yea

lol! — for real lol

Wait, if I have somebody on ignore…
does that mean they can still see what I say?

yes

ah

Who are you ignoring?

your mom

Heh

your mom

I told her to stop trolling ##java.

Erika?

wow openfire is impressive

Erika didnt' troll, the last time I recall.

whats an erika?

…though I remember she had a pretty complicated J2ME app that didn't join threads.
um…?
A person's name?

svm_invictvs, i see…

hah, you see?

You should set your name "herschel" so you're herschel@hostmastk.com

"Start jconsole by typing jconsole in a command shell. When you start jconsole withouth any arguments, it will automatically detect all local Java applications, and display a dialog box that enables you to select the application you want to monitor. Both jconsole and the application must by
executed by the same user name, since the monitoring and monitoring system uses the operating system's file permissions."

this is not happening for me, i can't see anything I can connect to

tieTYT, they need to be running as the same user as you
tieTYT, and java5 may behave differently from java6
tieTYT, jps
try that first
if you don't see it there, you won't see it in jconsole

ok
yes don't see it
hm

grrr…
Amarok developer?

yes!

Hmmmmmmmm

^_^ Amarok is badass.

it surely is… too bad it only runs on Linux
there's nothing close on Windows is there? I use foobar2000

give us some months

Is it possible to use hashMapName.get(* + "thingy" + *);? In other words, is there a wildcard character in java?

there is a cygwin port… but it is very alpha

Vesuvius, no

No wildcards?

Vesuvius, write code to do something similar yourself
Vesuvius, no

Vesuvius, write code to do something similar yourself == ?

I've got a tomcat 4 app for which i am implementing an automatic updater for. i need to be able to restart the webapp context - what is the best way to do this?

yes, that's your answer, what are you expecting?
sebr jmx
and tomcat4? heh
sebr read the manager app and figure out how it does it

well yeah, old stuff
yeah i did read the manager app
but i need to remove it then re isntall it it seems
can't just reload because it won't read the new war file

huh?
tomcat will read the new war file…

you'd think so
but it didn't

i've googled out, and i still dont know why the ant build.xml doesn't pick up ${env.HOST} or ${env.HOSTNAME}. it picks up all the other env variables, but won't do that one on linux.

that's a question for tomcat peeps… and tomcat4 is old

yeah…

~question mark

I guess the factoid '~no, question mark' might be appropriate:

i'm wondering how much effort it is to port from tomcat4 to 5 or 6

Replying with a ? doesn't tell us what you are confused about. Ask a question that has an actual question to it.

eidolon, perhaps it's not set

then how do i get it?

eidolon, if it's not set, how would you get it…

execing a uname seems painful, particularly from a build.xml

wtf

pfn, my problem is -every- piece of documentation says it -should- be set.

ok javabot is acting weird

eidolon, simple, env | grep HOST

yes. i know that.
thanks.

every piece of documentation says it should be3 set?

i really do understand shells.

I don't see HOST set …

yes, every piece of documentation says env.HOSTNAME under linux should contain the hostname.
just as env.COMPUTERNAME under windows does.
(which it does)

and it works for me
env.HOSTNAME works fine
assuming you did property environment="env"/

yep

tag is at line 10. the build properties file is being generated down at line 147.

apparently pastbin doesnt' like line breaks in XML :-/
there's some old crap comments in there :-/

eidolon, well, your paste is using env.HOST

yeah, i changed it from env.HOSTNAME to env.HOST to see if it would fix it.
it didn't.

and why are you using env.HOSTNAME/COMPUTERNAME to determine OS?
os.name is much better

can someone tell me how this is possible? http://www.kimberlyandgeorge.com/debug.jpg
mylisteners size = 0 but listeners contains one (null) element

os.family is the branching argument.

you may be interested to know that this had the solution to my problem: http://forum.java.sun.com/thread.jspa?forumID=537&threadID=5133218

ArrayList listeners was instantiated from myListeners.keySet()

eidolon, eh?

eh which?

os.family is the branching argument.

it is.
do you understand how conditionals in ant work?
#
condition property="build.computer" value="${env.HOST}"
#
os family="unix"/

there is no os.family

#

directory did not have write access

/condition

what are you talking about

fuck
you get the idea.
what?

thingamabobber

ok
my question
why are you determining the value of build.computer based on presence of variable name
instead of just inspecting the contents of os.name

i'm not.
you're not understanding ant conditional breaks.
i'm setting the variable build.computer based on the value of os family…

yeah, but based on the presence of env.HOSTNAME vs. COMPUTERNAME
why not on os.name

no
you're still not understanding.

works.

then why are you using env.HOSTNAME

pfn.
you're making -zero- sense.
and you're arguing garbage.
listen carefully.

you're setting build.computer = os family = unix if env.HOSTNAME is set
yes?

NO!
again, NO!

works.

you obviously don't.

that's how the condition property crap works

no
it does not.

oh, it's the other way around

is true

if the content is true then set the value

yes.
jeezus.

was a j2ee channel ever created?

you should say so

i said repeatedly, you refused to listen, you refused to read the documentation asi told you to.

yeah yeah, I'm not the one with a problem am I :p
you're the one that can't get env.HOSTNAME to work
works fine for me

would just tell you if it's set or not and you're fucking up something else
uwould just tell you if it's set or not and you're fucking up something else/u

fyi, i know env.HOSTNAME doesn't eixst.
that's the problem.
and i don't know why it doesn't exist, when all the docs say it should.

then the problem is your shell, it's scrubbing the variables
especially, if you're running ant from an exec() of anysort

jdev:~ # echo $HOSTNAME $HOST
jdev jdev
no, i'm doing 'ant build-server'

vi `which ant`; go to line before java launch, echo hostname=$HOSTNAME
run script
also, ant has problems with environment variable values containing linebreaks
assuming ant does nothing to determine if it should use System.getenv() or exec(env)

the devbuild.sh script, which does 'ant -f ./packaging_build.xml' has HOST and HOSTNAME set.
i'm going to hack the /usr/bin/ant call to check there.

edit the ant script
then check the environment for variables that contain linebreaks

it's using exec :-/
ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\"

that's fine

ng.
2 EDT 2007 : Executing ant _packaging_generation_ to compile and deploy the new
ANT Host is jdev
ANT Hostname is jdev
no dice.
that's right before the exec command.

then check your environment for variables with line breaks

Stop filling up the channel with your explanation. Paste bin if it's going to be so long.

blow me.

No need to be cranky just because you're stuck and don't know what you're doing.

Should the methods of a utility class be static?

you don't know me very well, do you?

Or is that personal preference?

leip, depends on design

apparenlty the hostname problem crops up on Solaris as well.

eidolon, will you just check and confirm the environment already?
env | grep -v =

jdev:~/ant/bin # env | grep -v =
jdev:~/ant/bin #
though. hmm.

check the environment from the script that calls ant

no, there… may be something else odd here. check this out.
'env' doesn't have odd stuff in it. but 'set' does. check this out.
http://pastebin.stonekeep.com/633

hmm, nice shell functions :p
ditch them and try it again
ant 1.7.0 might address this problem

i'm not even sure where the hell all that crap got set.
i'm sure this is some magic suse-ism.
like the geniuses who brought us beagle.

/etc/profile.d/* maybe

looks like /etc/bash_completion.d/

that's weird that you guys are talking about that
cause i have a problem with bash tab completion and google is really not helping. How do you make it case insensitive?
i'll ask in #linux

or #shell

that is a way worse channel

heh

How do I enable case-insensitive tab completion? http://www.wlug.org.nz/BashNotes

this has what to do with java?

neowhoah./neo
i just wrote a silly little test build.xml. and it worked (found env.HOSTNAME)

Did that work for you?

oh let me check
yes thanks
jesus, i should have just googled for that
all day i was looking for dos style completion and getting nothing

Haha…
Google is probably thinking, "why don't you just *ask* me what you want?!"
I only tried the bind from the prompt, but the inputrc should work fine too.

if i don't have an exact match, cycle through the options instead of showing me all possibilities
found it
bind '"\t":menu-complete'

hi, does anyone here have experience with Tiles?

~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.

ok - im having an issue where an property specified is 'not in context'… (in regards to a putlist)

I pity you if you're using Struts.

im using spring.. but have to use the Struts tag library for Tiles

I hate Struts.

i can tell

lol
Sorry. My experience is recent enough that I'm still having flashbacks ;-)

my exact error is "Error - tag importAttribute : property '*******' not found in context."
if i c:out the list i get "[one, two, three]".. but i can't forEach through it
is that a well formed array?

that looks all right, but without code…

wicket++

java 5 allows for covariant return types in subclasses. eg if superclass List has method subList with return type List, and i write a subclass of List called ArrayList, then i can make subList return the more specific ArrayList type.

correct

xs, int n, int m) { return xs.subList(n,m); }

you'll have to do ListT extends E, i think
tias

subArrayList = mySubList(someArrayList, 0, 3);

tias?

or..wait..if you want a different list of the same generic type, that code should work fine
~tias

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

i've tried without success; i can paste my example shortly, but was wondering if someone here would know
http://rafb.net/p/oM8lu530.html
the commented-out lines do not compile

your f method doesn't compile either, not surprising considering you never defined T

whoops

I keep hearing about wicket, are a lot more people using it these days?

sorry, that's part of the code that doesn't compile

Wicket seems cool from what I have done with it so far.

orange80, compared to say early struts, spring mvc, jsf?

and all those commented out lines compile fine in java 6

The only other I have used is Struts.

my team really likes spring mvc and hates jsf with a passion

Wicket is the exact opposite and in every good way.

really!

I think JSF is probably more similar to Struts.

yep

backtracking a bit - i don't follow your comment about T not being defined

T id(T t) { return t; }

the error i get is "incompatible types"

yes, that's the error i get as well

but in java 5 only?

i'm running java 6

hm, then how could the commented lines possibly compile?
they directly depend on f()

eclipse is being nice?

hrm.
i guess what you mean by "compile" is that you get no errors pointing at those lines

correct

then i wouldn't say that anything compiles
i too only get a single compile error on f()
not on those lines i subsequently commented out
anyway, back to the original question - is there any way to accomplish what i described?

do you understand WHY you can't implicitly cast?

what are you referring to?

your error

i think i understand the error as saying:

jsf error messages seem really opaque … ajax seems like a hack to get working with jsf
am I alone?

"T is a subclass of A. T does not necessarily override A.f() to return the self-type T. hence i cannot guarantee you that the a.f() will return T (only that it will return A)."

bingo
~zeeeee++

zeeeee has a karma level of 1, Fanook

but i suppose i'm asking whether it is possible to get that more specific type whenever it's available
i understand that what i wrote fails to do that, but is there a way?

so when java is decompiled, say with jad, none of the original variable names are preserved are they?

U f(T a) { return A.f(); }

you can explicitly cast to T and as long as f() always returns an object of the same type a is, it'll work fine. Otherwise, you'd be better off storing the result in a temporary A reference, checking whether it's an instanceof T and reacting accordingly
although, i can't remember how instanceof interacts with T, might have to compare class name strings. *shrug* experiment
i expect the type erasure could play havoc with it

erisco, that's right

hard as hell to understand what is going on then, heh
ah well I will keep sorting

erisco, well, what are you expecting, you're decompiling

that's common with ALL decompilers

in css 100% height doesn't really mean the window height does it?

#html :p

:P

what can I use to unpack a pack200 file?

this relates to java how, exactly?

well I read it was used to compress .jar files

it's used for making jws downloads smaller

pack200

ah right. that's one of the algorithms you can use in a .jar

is how you unpack a pack200 file
$JAVA_HOME/bin/pack200
you figure out the rest

~pack200

aditsu, I have no idea what pack200 is.

~pack200 is replysee http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/pack200.html and http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/pack200.html

Okay, aditsu.

switch that up for java 6: http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fjava.sun.com%2Fjavase%2F6%2Fdocs%2Fapi%2Fjava%2Futil%2Fjar%2FPack200.html&ei=VxzBRuG8MJq0eqWyzYYL&usg=AFQjCNFMlnFiErpJxAgfWiHuU98gUHBMcA&sig2=NescqawfyQ5wDInJxn_PpA
er crap
nevermind :x
sowwy

I couldn't find java 6 pages showing similar info after a quick search; if you can, be my guest and modify the factoid

that works..
http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html
~no, pack200 is replysee http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html

Okay, r0bby.

what about the second link?

finding it.
first link covers it, see towards the bottom.
so that's all that is needed.
didn't mean to step on your toes :x

if you say so..

aditsu: from the page: http://eugeneciurana.com/pastebin/pastebin.php?show=3602

it also has a link in the "more information" section

which is an anchor…I think people can read and follow links..
no, pack200 is replysee http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html and http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html and http://java.sun.com/javase/6/docs/technotes/tools/share/pack200.html
~no, pack200 is replysee http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html and http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html and http://java.sun.com/javase/6/docs/technotes/tools/share/pack200.html

Okay, r0bby.

uh.. so what are you doing now then?
duplicating the first link and adding the link you said was unnecessary?

fixed.
see ya.

how do I do the equivalent of {foo,bar} (match foo or bar) in java regexp?

~regex

stickto, regex is http://java.sun.com/docs/books/tutorial/essential/regex/ — Additionally, take a look at the cheat sheet at http://www.javachannel.net/

stickto, yeah I went through those but couldn't find anything, I'm going through the perl docs now

it's long since i used regex last time, so i can't remember it
but I think maybe it's foo|bar, not sure

stickto, tried that but no luck

pls paste your code, I want to try

Can anyone recommend a good Solaris book for me to start learning with?

Solaris for Idiots

//jj/js

stickto, bah! turns out the foo|bar did work, unfortunately the string I was trying to match got changed to something slightly different
bstickto, bah! turns out the foo|bar did work, unfortunately the string I was trying to match got changed to something slightly different /b

anyway, it's good news

stickto, and upon some benchmarks it turns out that the approach that used the regexp was an order of magnitude slower (amazingly enough not due to the regexp!)

orange80, what's to learn, just use it

Yeah I guess… I just remember getting really frustrated the last time I tried it because it was so hard to find information by searching.
^

orange80!

Jeez, I'm always sending messages to myself…

How's Francis treating you?

Yo!
Heh, I have been one busy dude lately. It is right next to my bed though, next on the queue.

really? have you found the reason?

Actually I think I will read some before bed tonight. I had a fucked up dream last night that I was buying a Sega Master System and someone was trying to talk me out of it. This should improve things.

stickto, some log4j stuff involving a choice between adding a filter (using a regexp) and just changing the logging level for a couple lines, turns out changing the logging level is a lot faster

orange80, simple, get an ISO, get vmware server, install and play

hehe

I guess I better get my central time self to bed… good night Java amigos.

:*

lol
'Night.

scary

stickto, yeah, I figure it's an instance of a rule I've developed "if you write a clever piece of code it's probably because you're trying to do something dumb"

what

Hello

interesting, sometimes when one problem emerge, we will always try to bypass it rather than solving it, which cause new problem
in fact, I have face the similar situation many times
and there is a idiom in China, that is, treat head when headache
but sometimes headache is caused by malfunction of other parts of the body

stickto, well I just find that when I write a bit of code where I feel happy since it's nice and clever I almost always notice that if I simplify something somewhere in my code I end up being able to use a much simpler solution in the place of my clever code
unfortunately that happens much less often when I'm forced to use an ugly hack

I have a java program that works fine when I run it regularly but throws IOExceptions when I run the java web start, help?
it throws the IOExceptions when it tries to read from System.in

and did you read the actual error messages?

en, I gonna enjoy my lunch, see you next time

it wasn't very descriptive
i read the stack trace

i guarantee it was more descriptive that "it threw some IOExceptions"
s/that/than

it was just # Input / Output Exception

stickto, later, good eating

~tell kbelasco about show us

kbelasco, Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options.

ok one sec

there's a page that says "There is currently no way to provide keyboard input via System.in to any Java Web Start application"

probably because there's no console window

hmm aditsu , that sounds like it
I run it from the console, though
but I guess there is just no way to do it

you can enable the console window, but I don't think it accepts input

what site did you read that from?

http://blogs.sun.com/quinn/entry/launch_that_app_client

bummer
thanks though

System.in sucks anyway :p

yeah it does, but i don't feel like rewriting this old project and adding a gui :-(

well, jws typically means gui

He can deploy JWS without having a GUI.
He'll have to launch a console somehow, but it can be done.

I run the javaws from the console in this case
and it has part gui

Probably a lot less effort than writing a GUI front-end for the program if it's non-trivial.

another javaws question, whenever I write webstarts it seems to not read the first resource entry, which is bad, because thats where the main class is, any reasons?
I ended up putting the first entry twice

ok, I just don't know a good way
if you know, please share

I saw some way of doing it a while ago as part of a JNLP discussion.
Google is our friend

I'll let kbelasco google it then

perhaps later, but any ideas on why javaws doesn't read my first resource entry?

you may be doing it wrong

probably
where is pastebin?

~pastebin

http://rifers.org/paste

http://www.rifers.org/paste/show/5253

what is the most secure way to communicate between Java and C ? sockets ? pipes ?

what's the point of a jnlp with a codebase on the local hdd?

secure?

its a test before I put it up on the server

If I use sockets, then it's visible outside my system.. I want to communicate between local processes

use localhost

localhost:port

and what happens if you only put the jar once?

port

I don't want it to be visible for nmap and other port scanning tools

http://www.rifers.org/paste/show/5254

rmi?

it doesn't download anything and gives me that error

RMI .. isn't it java only ?

oh
yes

when I check the java cache, the app is 0.0 kb, so it just doesnt download

bind to localhost.

oops s/0.0/0

joed Ok, I will go with sockets, and use bind to localhost only..
thanks karstensrage joed

what jre are you using?

1.5 but the program is compiled to 1.4
I had the same problem at work when I wrote a webstart and ran with javaws 1.6

clear

wrong window, dumbass

botass .. it was right window.. with a missing / :P

I guess the factoid 'without aolbonics' might be appropriate:
http://maroon.uchicago.edu/viewpoints/articles/2006/04/14/aolspeak_is_destroyi.php - read it and chill, or kiss the channel goodbye.

try using jnlp spec="1.0+" ; I don't know if it helps, but that's what I have

no dice

well, I don't know; try a working jws app and compare the jnlp

ok thanks
working jnlp that someone else wrote, almost identical http://www.rifers.org/paste/show/5255

i remember syncronizing threads is a processor hog but how bad would it be to have about 10 threads syncronized?

hi ALL
can anybody help me out please
hellooo, people, any java programmers in here?

hey
what is your question

oh thank you
well.. i have set up a web-server
and my client connects to it by ssl
i.e. https connection
and for the server, i have generated the ssl sertificate on my own
but while connecting, my client throws an exception..
javax.net.ssl.SSLPeerUnverifiedException: could not verify peer certificate: blah blah blah
so,
how can i make the client to understand that sertificate?
pleeease help me out
*certificate

to be honest, I personally don't know much about webservers
or at least verification of them

i see
ok, thanks anyways!

does it give you a chance to view the certificate and "trust" it the way that java web starts do?

nope, that's the problem..
i somehow need to add the certificate to the trusted certificates list

you need to give the client the CA cert manually.

but not sure how
could you please tell me how to do that?
or at least give a link to any documentation?
pleeease )

export the ca public key and signature, hand it to the client.
hand == manually install it.
http://www.tc.umn.edu/~brams006/selfsign.html

thanks!!!!

np.

Is Javabot working? In Private messages he says "This might be appropriate:" but doesn't respond with more.
~fatjar

AMcBain, fatjar is a jar file compiled from several other jars, see http://fjep.sourceforge.net/

hmmm.

he has chosen to not like you

Well, lets try what I tried in there.
~fat jar

I guess the factoid 'jar file specification' might be appropriate:
AMcBain, jar file specification is http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html

Odd.
It works here.

hey all, i'm trying to run forEach's as specified here - http://www.herongyang.com/jsp/jstl_core_2.html - however all i'm getting returned is the items parameter eg: ${sessionScope}.. could anyone help me out with why this is
happening? thanks!

another question, please
the link you have given to me… about creating own CA..
is it appropriate for tomcat as well?

Yeah.
Same difference.

arright! thanks man!

dumb wifi

anyone on the forEach?

hi
how can i create a java.sql.Date with a certain timezone?
i need to deal a lot with dates in my app and i get a date object (maybe with a wrong timezone) from my api. i need to ignore the timezone within this date object and create a new one with my fixed application timezone
or has a date by definition the timezone of the current vm?

neither Date class contains any timezone information

MicW use Calendar

it does. i'm curently looking at the code of it. but it seems that it always uses the local timezone

use Calendar or a library such as joda-time

e.g. in serialization: wen serializing, only the milliseconds are serialized. on deserialization, the local tz is used

if the internal implementation has a timezone, it doesn't necessarily mean that you can use/manipulate it

ok
is the tz usually stored to the database?

depends, it can be
but not necessarily

i'll try. the date representation is only for (readable) information. i also store start/end ts of the day in milliseconds
and it's no problem to align the given date to the application timezone's day bounds
(in milliseconds)
do you know if joda-time supports operations like "give me the next start of a day after X (or return X, if it's the start of a day)"?

Yeah.
It even will do correct intervals, which is nice if you ever hated Date and tried to span times over date changes.
You might have to fiddle a little, but you will have a much richer api to pull from.

it should add 23 or 25 hours)?

afaik yes.
The author is working on the JSR for Data.
so hopefully this time it gets done right.

i'll give it a try (and write some unit tests around it)

Date even.

yes, with date it works (when i add days, not 24 hours)

It is essentially what quartz DailyClass should have had.

i used to write wrapper functions which uses date or calendar

it can most likely do everything you want and more; it has dates with/without timezone, partial dates (e.g. only day and month), etc.

does anyone know a timezone id "from the other side of the world" (e.g. newsealand) for my testcases?
ah. NZ :-)

i'm trying to run forEach's as specified here - http://www.herongyang.com/jsp/jstl_core_2.html - however all i'm getting returned is the items parameter eg: ${sessionScope}.. could anyone help me out with why this is happening?
thanks!

Buenas.
Hej.
Did you add a factoid about aolbonics to the wiki?

er no
all of my additions have my nick
why?

mornin pr3d4t0r

everything i do on that wiki is identified. I always use my nick. And I always changelog it on my channelregulars page

I don't check the logs unless someone's doing mischief
What have you been up to?

Staying out of sight here

Dude. Just be cool.
I actually like you around.
Just give others a chance to appreciate you.

I've added nothing recently, although, take a peek at flippo's link on the channel regulars page
it's a link to a pony..

Heh. He's allowed.
~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.

i was just thinking it could have been abuse

I like krustofski's new logo. How do you dig it?

I know flippo is an op; i updated that factoid

Nah.

it's nice
just caught my eye.
anyways.
90% of the time, i'm not sure if i'm liked or hated..

It's not about you.
It's about shit you do.

ah

Jumping into every conversation wasn't helping people appreciate you.

okay

It's better to say something meaningful when you are around.

I understand

goodmorning

thanks, anyways, talk to you later.

That's my strategy at work. Just the fact that I show up at a meeting tells people that whatever I'm going to say may be somewhat important or affect them.
Cheers.
.. z Z z .

dreaming pr3d4t0r…

yeah and in a little bit he'll start sleep-irc'ing

haha, yes

Z z .

ha

must be a good dream

. z Z z .

JOlga is waiting for me in bed.
I think I'll be a thespian tonight.

in ur bedroom, catching some zzzs.
nite bai.
zzzzzzzz.

chiaz

where cand i find some info about treedumper?

hi guys,

hi

sledger, what's that?

hello somes french with few time here ?

here?

Can anyone tell me what is the use of FilterInputStream please?
why is here so silent?

api-docs can

java's api documentation is vast. Each classes purpose is documented.
dsfhjdfhdjfhfdjhdf3356jh()^^%$
crap

java api

this is what i wanna know, i saw a code where someone was using TreeDumper.dump(document) to dump a dom tree

Odd question, but does anyone know the SCJP site (or rather, the Sun site where people manage their SCJP/SCJD certifications, re-request kits)?

I've checked it but I didn't got it, its constructor is defined protected, so I can't create an instant of it, what should I do?

It's been so long that I've forgotten the URL.

use the subclasses, also documented

do you meen BufferedInputStream?

e.g.

yes.

so why isn't FilterInputStream defined abstract?

javabot tell Farhadix about abstract

Farhadix, abstract is http://java.sun.com/docs/books/tutorial/java/IandI/abstract.html

abstract means you must subclass it to use it.

really looks like filterinputstream could be abstract as well
maybe it's used internally in the package

thank you, you rescued me from arguing!
good reason

~javadoc FilterInputStream

I don't know of any documentation for FilterInputStream

I meen i havn't thought about internal use of FilterInputStream

g[r]eek: it's busted.

k

g[r]eek: cheeser made some changes, switched the javadoc stuff to a database table.

another question please, what is the concept of Stream?

javabot tell Farhadix about io

Farhadix, io is http://java.sun.com/tutorial/essential/io

that explains it all.
http://java.sun.com/docs/books/tutorial/essential/io/streams.html
when you do System.out.println("Hello world"); your "stream" is System.out
(or to be more precise standard out (or stdout)
good luck.

is this Stream buffered?

regarding FilterInputStream, it's fine as it is. a class is declared abstract when it shouldn't be instantiated. FilterInputStream does not fit into that category
someone probably said that already though, i haven't read through everyone's comments

g[r]eek: sorry, but FilterInputStream is definrd protected, so it couldn't be instantiated from another class. so shouldn't be abstract?

no, you're thinking of private. protected means it can't be instantiated from outside the package. private means can't be instantiated from outside the class

javabot tell Farhadix about access specifers

Farhadix, I guess the factoid 'access modifiers' might be appropriate:
Farhadix, access modifiers is http://java.sun.com/tutorial/java/javaOO/accesscontrol.html

but with a private constructor, you can still instantiate from inside the class but that's besides the point.

^^

yeah thanks, read that FarBeyondDriven

Go read the link i gave you
http://java.sun.com/tutorial/essential/io

OK, thanks.

here? i need your help, please

what sorta help?
maybe others can help you.

but they dont have the silky smooth touch that is joed's speciality

hehe

hrm, how do you call the guy that supervise you during the writing of your Thesis at the university ?

dude

you're kidding right? this is a java support channel.

Yeah. Who would use Java in their thesis?

ok nvm. I tought some of you might have done studies. and since I'm writing my curiculum vitae for a java dev job.. anyway sorry for disturbing you

:P

(The term is 'thesis adviser')

no idea. but in bulgarian. it is "rukovoditel"

thank you DRMacIver

in greek it's thaskalos

in french it's "Promoteur", fyi

interesting, adviser/advisor: "an expert who gives advice." - subscripts: advisor: "the United States sent military advisors to Guatemala" - adviser: "an adviser helped students select their courses"
gotta love english.

I assume it's just a dialect spelling difference.

mine was my project tutor

Guys, do you know what xsl engine uses Mule?
can't find xalan nor saxon in its libraries…

i figured that too. but this particular dictionary usually says "UK" or "US", in this case, it doesn't say either.

Maybe they reinvented the wheel?

DRMacIver, i don't think so. They seem smart guys

Are you insinuating something, sir?

hehe, you choose the insinuation
ok, this jaxen jar they use is for xpath…
mmm, maybe this jdom.jar
is the answer…

Can't you just hook up a profiler, look at the loaded classes and see which ones have to do with xpath?

I'm opening src code with netbeans

http://mule.codehaus.org/docs/site/mule-modules/mule-module-client/dependencies.html

morning

hi jottinger

hi

g[r]eek, interesting, how did you get there?
(that's for MuleClient, not for Mule itself…)

i googled "mule project dependences"
*dependencies
howdy jottinger

holy google…

amen.
http://mule.codehaus.org/docs/site/mule-core/dependencies.html
anyway, hopefully that'll help
i'm by no means a mule aficionado

Nitro tha CiMien

mmm, still not sure… there are a lot of jars missing there…

http://mule.codehaus.org/docs/site/mule-modules/mule-module-builders/dependencies.html
hmm finding quite a few of these random links
reckon they're autogenerated somehow?

i think they are maven-generated
no luck whith the sources… all is based in TransformerFactory class
which delays XSL engine binding to runtime i guess
let's follow DRMacIver suggested path
execute a xslt bad formed and look at the stack trace

bbl

ok, got it
at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(
but i can't find xalan jar on mule libs… maybe they come with jvm itself? let's see…

is that a sun or apache package :s

hi, i developped an app which use many librairy. I want to generate a jar file, so i'm trying to edit the manifest file, but there is a problem, it seems that i have too many librairy, it says an error when i'm trying to generate the jar file "line too long", how can fix it ?
http://rafb.net/p/SMnF9s82.html

ok, here comes the explanation about xalan, jaxp, sun, apache, etc.
http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/JAXP-Compatibility_150.html#packageNamesWhy
com.sun.org.apache.xalan is the xalan frozen version included in the jdk
you don't have to use the endorsed dir now to use a more recent xalan implementation
you can simply put it on the CLASSPATH
SO

hello … i can't launch a program cause of env variable on Linux what are the ENV VARIABLE TO set please ?

mule is using my jdk 6 internal xalan

usually, none

exception in thread "main" java.lang.NoClassDefFoundError:

hahah
#1 ill indeed.

that doesn't sound like an env problem

I'm having trouble with the java.awt.TrayIcon class.

jottinger, i can run the program in eclipse but not in my term

g[r]eek: I think he should have said "most common" instead of #1

yup

show your command line

utrrrongeeb, use java 6 SystemTray

LDPATH="$LDPATH:/usr/share/jdom-1.0/lib/:/usr/share/sax/lib/:/usr/lib/eclipse-3.2/" java Creation
Exception in thread "main" java.lang.NoClassDefFoundError: Creation

well, LDPATH and CLASSPATH aren't the same

Why? I use java.awt.SystemTray to add the TrayIcon, I just get plenty of exceptions after I start to click the icon.

Hi

It's giving me ClassCastExceptions from the event thread, as a TrayIcon isn't a component…

utrrrongeeb, sorry for that, it worked for me some months ago…

It works, but when I click it it eventually starts pouring out those exceptions.

~j2ee

for a tutorial on java ee see http://java.sun.com/javaee/5/docs/tutorial/doc/

jottinger, http://pastebin.com/m7dbf8b69 error too .. ut in eclipse it works .. same file

g[r]eek: oh sorry, i was away )

I'm a bit inexperienced, and my docs seem out-of-date, as they don't cover TrayIcon. I'm trying to remove a dependency on org.jdesktop.jdic.tray.TrayIcon, but java.awt.TrayIcon uses the AWT, not Swing…

g[r]eek: so, do you really want to hear my problem?
)))

utrrrongeeb, start from scratch
try to do a simple example with SystemTry and build from there…

It's not a case of messy-poor-coding (IMHO), but rather that the Java Event Thread is throwing its own ClassCastException.

here?

~SWIG

Overlook217, SWIG is http://www.swig.org

this XMLSpy tool is amazing…

XMLSpy is amazing

it's the bestest db tool evar!

db tool, hehe
it even reads EDIs

It's won JDJ's DB Tool award for years

DBSpy?

uh oh, xml databse!

no, xmlspy

~openssl

I guess the factoid 'openssl-keytool' might be appropriate:
progreSSive, openssl-keytool is http://mark.foster.cc/kb/openssl-keytool.html

basically, altova's fanboys managed to slam the JDJ Reader's choice awards

jottinger, CLASSPATH="/my/folder:$(java-config -p jdom-1.0,sax)" works

it's been a source of humor forever
I'm not even sure altova realises how funny it is
yay

jottinger, slam? worderference tells me that is closing a door roughly

in context, it means that altova has a huge grassroots campaign that skews the results in their favor

ah, ok. Anyway, the tool is amazing whatever the government say
Well, not only XMLSpy, but also the other kids… MapForce etc.
ok! great. I don't have to learn XSL MapForce will do the work for me
(i know, IDEs are not for newbies… whatever! i will not mess with XSLT until necessary)

heh

Can anyone tell me hoe I use generics and variable argument lists in JNI?

XSLT owns j00

j00?

xslt isn't so complicated…

you?

it's just dom and xpath…

anyone? jni and varargs?

pfn, well, i'm checking the XSLT Mapforce generated for me…
may not the most performant
*maybe

jni + varargs = jni + object[]
generics–well, it's native code, why does it care about generics
just treat it as an object

the question is: how do the signatures for methods with generics and arargs look?
I am using java from C++ code

trueg, Object and Object[] respectively….
jni docs don't cover this?

sadly, no.

varargs probably just have an array for their last argument when called from JNI.
It's just syntactic sugar over that (I never got to the bottom of exactly what it does at the byte code level, but the answer seems to be "not much")
bIt's just syntactic sugar over that (I never got to the bottom of exactly what it does at the byte code level, but the answer seems to be "not much")/b

any java programmers knowing SSL??

thanks guys.

(And you should have no problem using the type erased version from JNI. Don't know if there's anything better you can do)

can anybody help me out please
?

javabot, tell progreSSive about ask

I guess the factoid 'the truth about garbage collection' might be appropriate:
andresgr, the truth about garbage collection is http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html

~ask

The Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.

~javabot++

javabot has a karma level of 100, g[r]eek

~appfuse

sanjar, I have no idea what appfuse is.

~ssl

I guess the factoid 'openssl-keytool' might be appropriate:
sanjar, openssl-keytool is http://mark.foster.cc/kb/openssl-keytool.html

Comments

uhm ok Well I am developing a website for some people and they have a web hosting with PHP 4 They are going to

property instead of Config

Comments

I am developing a php website with an administration page to insert articles and authors in a database Language

someMethod(); but i can't just do $foo = 'myClass' and $foo

Comments

« Previous entries · Next entries »