@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21



Comments:

<0> BigE, thirded
<1> Axsuul: preg_match('/^[\d.]+$/',$str)
<2> here is my code http://pastebin.com/644777
<3> itrebal: /[0-9\.]+/
<4> It is possible to send a reference to function1() to function2() as a parameter, and execute function1 within this function? If so, how?
<5> kennebel: no need to escape it, its between [ and ]
<6> hmm ok thanks
<7> Greetings! :)
<8> kennebel: no escaping necessary inside brackets :P
<9> what's the right way to get the first element of an array (***uming you don't know what the keys are) without changing the array (that is, no array_shift)?
<3> itrebal: habit, i always escape non alpha characters. :)
<1> Axsuul: There are more complex patterns for matching floating point number, though, if that's what you want.
<3> The ^ and $ is a good catch.
<4> jgarbers: $arr[0] ?
<8> is_float?



<2> all it does is write 0 to the file
<10> hm other description i have a search form which searches some mysql records from diffrent tables.. so now i have diffrent search querys.. some fields are company , country and so on.. now if i only insert company in my query sql query looks like WHERE company='bla' good this works.. but what i do if i search for company and country? it should do something like WHERE company = 'bla' AND country='yeah' how can i get the AND in there?
<9> Jemt: if the keys aren't numeric...?
<11> Is there a way to retrieve the get string?
<12> Heh, yes, my quit message rocks.
<1> stevarino: That's an internal type ***ertion, not a pattern match.
<4> jgarbers: Hm, afaik there is always numeric keys. Might be wrong though
<6> FlamingCows: It's just a check for price, for example 46.00, 20, 46.53, $45.00 (the only valid chars will be numbers, '.', '$')
<9> Jemt: oh. okay, i'll try that then
<13> BigE: lol
<4> jgarbers: :)
<8> FlamingCows: let's not argue semantics ;)
<6> FalmingCows: So yes, the floating point is limited to 2 characters after the decimal
<1> /^\$\d*\.\d{2}$/
<5> Jemt: i do beleive you are incorrect
<4> itrebal: Could be. That's how it works in C# though :)
<5> yuck.
<10> itrebal do you know what i mean now?
<13> Yes. It's an elephant.
<14> hey guys what does this mean: Parse error: parse error, unexpected T_ELSE in /home/gerbitzo/public_html/test/upload_new.php on line 33 my code is: http://pastebin.com/644785
<13> !+parse error
<15> Parse errors show the line where parsing failed, not nessicarily where you made your mistake. Try looking a line or two above the reported error.
<14> Stormchaser - what does that mean?
<16> it means you forgot to close an IF statement somewhere in your code before line 33
<14> if I remove lines 10 - 13 it seems to work
<16> then that is most likely where the problem is
<9> S^Gerbitz: it'd really help if you could reformat that code... the braces are in pretty weird places... hard to see what matches what.
<14> jgarbers -im learning please pm me if you can
<9> S^Gerbitz: would be glad to if you remind me now. ;-)
<17> Jymmm: yo, you about?
<4> I'm not sure how the new object model works in PHP5.. Is variables p***ed by reference by default (would be similar to 'function test(&$var)' ) - or is a copy of the variable (or object within) created?
<18> ShortWave nope, leave a smg at the.............................................................
<13> *bang*
<17> Jymmm: Where are you located at?
<18> ShortWave: atm... Twilight Zone, rest of the time SJC
<17> SJC?
<18> SFO
<17> Yeah that helps
<17> What is that, an airport code?
<18> ShortWave: Yes, San Francisco
<17> ah, too far in any event
<17> I was wondering if you were local since we have like 50 invites for Govsec
<18> ShortWave: Oh, that be cool. just a lil too far away to attend. But thanks =)
<18> ShortWave: You have no lo-men-on-the-totem-pole that would like to attend?
<17> there's 10 people in this office
<4> Is it possible to p*** a function to another function?
<17> since we do so much govt. work, the majority of our clients already have free admission
<17> The other clients, architects and what-not, already have their invites.
<18> ShortWave DC or VA I'm ***uming?
<17> DC
<18> ShortWave: It's funny.... I've had three ppl hitting me up to go to shows in the last two weeks; all dramatically different too.... Fabrication, Electronics, and now Security =)
<17> Jymmm: Spiffy
<18> be nice if I had a clue to go with it.
<18> ShortWave: Currently on the research choping block, adn this is the first result: "Thermally stable, plastic-bonded explosives - Patent 4168191"



<18> Uh, boy.
<19> hi some sourceguardian-gurus here ? ;-)
<20> There is something in php sessions that i hardly get. After call of session_start() i can't modify headers using session.cache_limiter(), but i can modify same headers using header(). All is done before body is sent to client.
<20> any ides?
<20> *ideas
<2> can i submit a .php to another .php?
<21> is there a barcode printing library in PHP, or it's simpler to write your own with ImageMagic or something?
<20> optikkore: what you mean? submit a form?
<18> citrus just get yourself a BarCode.TTF and be done with it
<21> BarCode.TTF?
<21> i want to like, makeBarCodeGIF("13099201")
<2> yeah
<21> and it would make a .gif img like 100x100 pixels with barcode value of that number
<21> or something
<2> zimnyx: yeah
<22> how do I escape \ in preg ?
<18> \\
<22> i have '@\\@'
<22> Warning: preg_replace() [function.preg-replace]: No ending delimiter '@' found in
<3> ks: sometimes you need to do '@\\\\@' (four of them)
<22> yeah that's what I tried a second ago :)
<8> ks '/@\\@/'
<8> deliminators are needed :)
<3> stevarino: @ can be a delimiter. :)
<22> thanks
<8> oh, he's using @ as a deliminator? i thought he wanted the @'s as part of the pattern :\
<20> optikkore: sure, just set action="some_script.php"
<2> zimnyx: and then txt fields get p***ed as variables the same as their names right?
<23> got three drop downs (date, month, year) how do i check for validation (30 / feb etc)
<20> optikkore: yes, but never use it! $_POST['varname'] or $_GET['varname']
<24> what does this error msg mean?: Fatal error: Call to a member function on a non-object
<8> Andy298: wha? what are you trying todo? have some code you can pastebin?
<4> Is it possible to p*** a function to another function?
<20> optikkore: you need to take little tutorial: http://www.php.net/manual/en/
<8> Jemt: simply put, no
<4> stevarino: Bugger. I need some sort of Delegate functionality
<8> Jemt: maybe http://us2.php.net/manual/en/function.call-user-func.php
<4> stevarino: Thanks, checking it out :)
<20> Any ideas whu session_cache_limiter doesn;t change headers if is called after session_start?
<3> Andy298: I've always taken the results, pushed them in to mktime(), which makes good dates from bad ones, so in your example, it would kick out March 1st.
<8> Jemt: there's always objects and good-ole polymorphism ;)
<23> no - no code (just coming up with a solution to a problem i know i am going to have). I want to provide a user with a drop down (1-31) then another (jan - dec) then another (2006 - 2010) but i dont want a user to select 30 feb 2007. so if feb is selected i need to limit the date to 29 depending on the year else 28
<4> stevarino: Yea, and that might just be my solution :)
<4> stevarino: But delegates would be better. I'm creating some sort of events in a framework i'm working on. But I'll figure something out ^^
<3> Andy298: I've always been of the opinion that if they intentionally select the 31st of Feb, then having the 2nd or 3rd of march returned isn't bad.
<3> Andy298: So you have date('Y-m-d', mktime(0,0,0, $mon, day, $year));
<3> s/day/$day/
<23> kennebel: yeah - however not so sure it would work as it is going to book something.... if they didn't want the second of march etc
<23> not sure!
<25> I'm trying to read a character from the command line, is there any way to do that without waiting for a new line?
<26> can anyone recommend a secure forum script to use please?
<25> in other words, get the character as soon as it is typed, not waiting 'til the user presses enter
<26> sci - in an html page?
<25> lra_: no, in a CLI script
<26> ahh ok
<3> Well, outside of that, you could run this process, and verify the same string came back as you expected. "Input = 31-feb-2006, output is 2-mar-2006" Oh, fail.
<25> I tried fgetc and fread, but I still need to wait for enter
<26> don't think it's possible
<27> sci: I'm fairly certain that you can't, unfortunately.
<25> I was thinking that it might work if I use streams
<25> I'll give it a try
<27> sci: that's certainly an approach worth trying. Report back, would love to hear how it works out for you.
<20> Can i remove some header, after call of header('Some_Header: ...') ?
<27> zimnyx: you mean, like, send a header to the browser then tell it to disregard that header?
<26> send a new one?
<28> Greetings...
<20> Ahroun: yeah


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

perl equivalent var_dump -javascript -php
udevd new-partition
#openzaurus
ubuntu install steps change cdrom driver
shm perl ipc
/lib/udev/vol_id failed gentoo
nwa3000 linux
apt-get universe miror
setTextRotation problem excel writer
ubuntu x configuration has been altered



Home  |  disclaimer  |  contact  |  submit quotes