@# 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 22 23 24 25 26 27 28 29 30 31



Comments:

<0> kuja: i tend to learn better from example code than explination.
<1> I'm sure you can do it in one small line
<2> Kronuz: PHP isn't perl, and doesn't specialize in text manipulation like Perl does.
<0> kuja: sure it does, you just need to use the gex libraries
<0> s/gex/regex
<1> kuja: but still, you don't think it's possible to do it in a simpler way then?
<2> compubomb: That doesn't make it Perlish, dude.
<2> Just because you can use regex doesn't mean you have the same power as Perl.
<2> *sigh*
<0> kuja: your just bias towards ruby so your no longer a php guy :p
<2> compubomb: Who said anything about Ruby? I thought we were discussing Perl
<0> kuja: perl is too regex centric.
<1> :(
<0> granted regex is great, but regex is too powerful to understand when you try to figure out what it's doing unless your a pro at regular expressions.
<2> compubomb: Once again, what in the world does regex have to do with anything?
<0> say later on you go back, say it's 2 yrs ago, you haven't used regular expressions in a while, you forget what everything does, but if you break it down step by step, you can always figure it out again.



<0> nm..
<0> Kronuz: your not going to get a 1 liner in php.
<2> You know what, I got one more question for you.
<0> especially for breaking down that data type.
<2> When you think Perl, is that all you think about? "regular expressions"?
<2> That's sad man. Lighten up, actually look at the language.
<0> kuja: nope.
<0> kuja: i have, i wrote a QoS script in perl, but it looked more C than perl heh..
<0> kuja: http://www.the-dev-solutions.net/projects/firewall.qos.txt
<1> in perl you can probably do something like: %hash = map {split/|/,$_,2} split ':';
<1> is there no similar way of doing it in php? I mean php does have split, doesn't it?
<2> Takes forever to boil... stupid stove.
<2> Kronuz: Yes, explode().
<2> Not regex based, if you want one: preg_split()
<0> Kronuz: i think explode and split at the same function.
<0> at=are
<0> one is just an alias
<2> split() supports some regexy stuff.
<0> $date = "04/30/1973";
<0> list($month, $day, $year) = split('[/.-]', $date);
<0> echo "Month: $month; Day: $day; Year: $year<br />\n";
<1> but there's no map in perl, and that's the problem here, right?
<2> Kronuz: You mean PHP? Yes, there's array_map(), but it depends on a callback.
<2> You could probably just hand it a lambda, maybe.
<0> kuja: what is lambda ?
<2> compubomb: A lambda is a function that isn't bound to a name.
<0> kuja: uh...
<2> Well, not very accurate in PHP's case, I guess.
<2> PHP lambdas have names.
<0> a function that isn't bound to a name ? uh...
<2> $func = create_function(...); $func();
<3> hi, how do i check if a string includes only alphanumeric chars ?
<3> i.e. space and a-zA-Z0-9
<2> Probably not very useful in PHP, but maybe useful in Perl.
<0> kuja: it probably doesn't require a name, but i garantee you it requires a memmory location which is dynamically allocated to some dynamic memmory.
<2> I know it's highly useful in Ruby and Python.
<1> I guess I'll have to have a loop after all :(
<2> compubomb: Save me the internals.
<4> compubomb: what does that have to do with anything
<1> I hate loops they clutter the screen :P
<2> Kronuz: Your one-liner is moderately possible.
<4> Kronuz: wah!? loops usually de-clutter the screen...
<2> If I'm correct that you can callback lambdas (which you probably can)
<3> can anybody answer my simple Q?
<0> itrebal: nm.. heh
<1> itrebal: not when you can do a whole loop in a 10 characters line ;)
<4> phprox: regex? /[ a-z0-9]/i
<2> $result = array_map(create_function(...), explode('/'));
<2> Kronuz: See that
<3> no is_alpha or something ?
<4> compubomb: sure, deep in the internals EVERTHING has a name, but in runtime the interpreter doesnt require it to have a name
<2> Kronuz: Though I can garauntee that one-liner will be ugly :)
<2> itrebal makes a serious point here, that leads me to: *we don't have to know the name*
<1> yeah, better off doing the loop, I think
<2> Thus, it is a lambda.
<2> Though, PHP's lambda's specifically do have a name, I believe.
<0> itrebal: i like php because i can apply my idea of how problems should solved through my C++ background heh.. perl gives you like a 20 diff ways you can do something syntatically speaking. that drives me nuts.
<2> kuja@shugotenshi:~$ php -r 'echo create_function("", "");'



<2> lambda_1k
<2> Without the 'k' :P
<2> That is the name the lambda is bound to.
<1> compubomb: funny, that's exactly what I like of perl :P
<1> compubomb: though I like C++ better
<0> Kronuz: i love C++
<1> me too :)
<5> oh get a room
<5> :p
<6> we love c++, why so we using the PHP?
<0> Kronuz: however, C++ can get incredibly complex.
<5> c++ is **** as a web language?
<5> .c++ is ugly? :P
<0> jiggster: exactly.
<6> :))
<1> and I just started using php 'cause it's faster to develop websites with it than with c++
<7> :o
<4> a friend of mine made a large forum-system written entirely on C and pgsql
<6> hehe, homotalk :D
<0> C++ is not ugly, it is more so for specific tasks. PHP is an intrepreted langauge which gives you flexibility.
<1> it's not **** as a web language, it's just different
<6> if you like to do a fastcode you better code on c++
<1> harder, slower, it's true, but at the end it can be better than enything for web
<5> sure :p
<6> or c.. whatever you like
<0> Solid: you know www.okcupid.com is written in C
<2> I just hope you don't end up being one of those people who decide to write servers in PHP
<2> yay
<2> pasta :D
<4> kuja: i did that... but it was just a lets-see-if-i-can-do-it kind of thing
<5> believe me, i wont use php as a server :P or a bot
<6> why not?
<5> but i'm not about to drop java for no reason.
<5> so dont even bark up that tree
<2> itrebal: I'm sure we *all* did that at one point :)
<4> kuja: http://repository.itrebal.com/cl***es/php_server its...not very good, but it works
<2> But some people like to get serious.
<0> making the content in C is easy, getting it to the web browser is the hard part.
<0> and controlling sessions is the hard part as well.
<4> kuja: at one point i had a combination of netcat and PHP to run a server, just as easy to write, much less mem. intensive :D
<0> unless you go 100% js cookies
<2> itrebal: Still, ebil ebil man :D
<4> kuja: :D
<4> i didnt use it for long, it was another 'lets see if i can'
<5> god damnit
<5> i coded in a dialog, "are you sure you want to quit"
<5> now it's buggin me :P everytime i run it to test i have to go through it
<4> what lang.?
<5> you dont want to know
<4> uh oh... VB?
<5> no
<4> what?
<5> Java
<4> meh
<5> i dont give a ****, i love it :p
<2> jiggster: It's okay, I want to learn Java :)
<4> i dont care, if you like it or not, use what your comfy with, as long as its an appriopriate application
<5> in my multy OS environment, it's a good choice imo
<2> Sure, Java's well suited.
<5> multi*
<5> i want to do a little bot
<5> i'm using some OS specific things though, like for my windows version a systray dll
<5> or on OSX the top menu bar
<2> Go for it :D
<5> doing a bot, cause it's the only thing i want, and because i need to do java before i forget what it's like and start going to starbucks instead
<5> irc bot*
<8> Hello, can someone help me?How can i check if a var is equal to field in mysql table?
<9> you need to check var for special symbols, length?..
<4> gotta go do some manual labor ******
<5> :\
<8> A2K[] i want to check if a value of a $var exist in specified field in mysql table
<10> why doesnt this query work? $query="DELETE contacts.first, contacts.last, contacts.phone, contacts.mobile, contacts.fax, contacts.email, contacts.web, description.dob, description.location, description.description FROM contacts, description WHERE contacts.id='$id'";
<9> mysql_querty(select * from table where fiel = $var)
<11> robcole, are you trying to delete the whole row?


Name:

Comments:

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






Return to #php
or
Go to some related logs:

spinrite.zip
scrambled screen ubuntu
ubuntu movies samba
ubuntu Fatal error: Can't open and lock privilege tables: Table 'mysql.host' do
#nvidia
#oe
pythonw subprocess
AZUREUS glibc detected *** double free or corruption (fasttop)
nx6125 rhel
remove compiled aplication debian



Home  |  disclaimer  |  contact  |  submit quotes