| |
| |
| |
|
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 32 33
Comments:
<0> or a while loop? <0> as i wanted teh last 10 lines of the file <1> mfonda: http://acarol.woz.org/ <2> roundyz, what are you trying to do anyways, just read a file? file() will put each line of the file into an array <0> i suppose if would be better <0> mfonda: yerh, its just a log file with info on each line of the file.. <0> at the moment it dumps all the file out, but when this gets big it's gonna be a problem <3> does anyone know where a good #photoshop room is? <4> roundyz, if its linux you could pipe the file through tail first :) <0> tail? like this |? <5> could someone tell me what this means (configuring 5.1.2): "checking whether rounding works as expected... no" <6> m1chael: this isnt AOL.. IRC has 'channels' <3> hey myc <3> are you an efnet op? <0> its on linux for sure <4> roundyz, cat <file> | tail
<7> Thanx for the help :-) <4> roundyz, default it prints out the last 10 lines <8> | <-- pipe <3> myc, if you are an irc op, we used to talk like 10 years ago <0> how do i get php to do that then? <0> because i havn't learnt that yet, <4> roundyz, personally i would do a while loop and push and pop it onto an array depending on how big the array is. i can show you and example if you want <4> roundyz, slower but it can take any size file <0> yes please, BarnacleBob that would be good <0> as i'm new to loops and arrays.. <0> i know what they are, but havn't used any yet <9> Hi! Can somebody help me with this script? http://www.phpriot.com/2805 (updated info) <10> Would anyone be able to tell me, or point me to where I might find out if the mysql_* functions in PHP are safe to use along with pcntl_fork()? <11> I just got a message from my FTP site, "Could not change permissions on directory test, Bad file descriptor", and the directory (created by an mkdir() call with 0777 for a chmod line - the default, but set explicitly - just refuses to "answer" to my pemission setting. <12> how can i echo a query (select * from tablename) like a table ? with lines ? <4> roundyz, http://rafb.net/paste/results/5FpFok36.html <13> zepeuga: um, html tables? <14> zepeuga: go through the results and output them with html :) <4> roundyz, basically what that does is it "pushes" the next line of the file onto the end of $array. if $array has more than 10 values in it "shift" one off of the begining of it <13> zepeuga: typically one would start an html table prior to entering a while() loop. then, the while() loop is used to output the rows. when the while() loop completes, close the html table. <2> BarnacleBob, although that still has the problem of reading every single line in the file <4> mfonda, it does but it was the easiest thing i could think of that wouldnt kill the memory <4> mfonda, if it was me doing it i would figure out how to read the file in backwards (i'm pretty sure its possible) and do it that way <4> mfonda, but then again i couldnt just write an example off the top of my head <15> is there any way to use :: with variable variables? ie $x = "BaseCl***"; {$x}::method(); <12> b1n0ry, yes html tables <12> b1n0ry, ok <4> jcoby, did you try ${$x}::method();? <12> b1n0ry, i've understood <2> there is this cool function called fseek(), moves to where you want to go <2> jcoby, you cannot do that; use call_user_func() instead <13> zepeuga: then you can use standard html formatting rules and css to format your table however you want it to look. <15> mfonda: that's what i was afraid of. <16> kuja: What does this represent (look at the symbol to verify) --> http://www.byzant.com/images/symbols/chinese/friendship.gif <12> b1n0ry, but if i don't know how many rows or collumns will be displayed, how can i create tables? <13> zepeuga: that's why you use the while() loop <13> zepeuga: you just open and close your table outside of the loop. output your rows (including your <tr><td></td></tr>) inside the while() loop <17> jcoby: call_user_func( array( 'Cl***Name', 'method' ), $arg1, $arg2 ) is quite easy :-) <12> b1n0ry, yes i've understood now <18> I am having problems with the line: $mysqli = new mysqli("localhost", "root", "", "time_slip"); <12> b1n0ry, how can i google for that ? <17> martianlobster: define "problems" <18> I get ther error Fatal error: Cannot instantiate non-existent cl***: mysqli <17> martianlobster: then you don't have mysqli. <13> zepeuga: what is your database platform? <8> do you HAVE mysqli extension? <18> ok oops <12> b1n0ry, mysql <13> zepeuga: one sec <14> zepeuga: you can find out how many columns by doing count($row) ***uming you're fetching rows from the db in arrays <12> boneill, yes, its a way <18> I am running gentoo linux, perchance does anyone know how I should emerge mysqli ? <15> AcidReign: no, not hard. just cumbersome. <18> I can't find mysqli with emerge --search mysqli <4> martianlobster, isnt there a #gentoo room on this server? <13> zepeuga: http://pastebin.com/575453 <19> howdy <20> BarnacleBob: it's a channel <13> yahoo! has rooms <13> hotels have rooms <13> irc has channels :)
<4> *sigh* <4> i need a beer <4> :) <21> how can I print "foo" if $whatever contains ".php" <22> dbe: http://php.net/strstr <21> includes* <21> so if $whatever="index.php" I would like to print out "foo" but not if $whatever="index" <13> dbe: substr() <13> dbe: or preg_match() <4> dbe, if ($whatever=="index.php"){echo "foo"} <22> A regex is overkill. <13> mattmcc: i agree, but possible <22> Lots of things are possible without being good ideas. :) <4> dbe, or mabey if (substr($whatever,-3)=="php"){echo "foo"} <13> mattmcc: PEAR comes to mind <4> :) <22> Eh. There are good packages in PEAR. <8> dbe: Use glob <21> BarnacleBob, thx =) <2> b1n0ry, Im sorry you feel that way <13> yeah, how about PEAR::DB comes to mind <13> mfonda: lol, sorry if i offended <22> Declaring PEAR, in its entirety to be good or bad is just naive. Too many people jump on that bandwagon without evidence or thought. <2> b1n0ry, I agree for some, but PEAR has a lot of useful stuff <13> i know it does, it was a joke <6> Whats wrong with PEAR? <13> i use PEAR::Mail(), i've used PEAR::DB(), there are several other packages i also like <13> there are probably more i would like if i have the need to experience them. <12> b1n0ry, thx, i'm gonna check it...very nicefull ;) <13> zepeuga: no problem <16> b1n0ry a washing machine? <23> I guess PEAR has it's uses.. i'm burdened with the personality of not being able to do _anything_ without understanding it first <13> Jymmm: nah, washing machines are a good idea <24> anyone using xdebug? <16> b1n0ry salad shooter == washing machine <13> Jymmm: programmable washing machines... that's just dumb <16> err salad spinner <25> Jymmm: Salad Tosser. <23> thus I end up rewriting things just to understand how they work. Funny part about that is I usually end up finding something wrong with the previous method and rewrite something that's cleaner and more portable... <13> Jymmm: salad shooter was an 80s thing that was like a food processor/slicer <22> "I prefer syrup." <16> b1n0ry Yeah, I meant salad spinner - to dry the lettuve. <16> lettuce <26> Why does this room appear with an additional # in front of the name (#php) instead of (mysql) or (debian), anyone know? (Just randomly curious) <25> !+##php <27> ##php is really 'Pretty Horny People'. The computer language is just a cover. <13> and smaller? that's the problem i have with a -lot- of pear packages that i have used. create an instance, don't do anything else, and look at your memory usage... man, get 10 hits on a machine and you end up with no resources left. <25> erm... <13> IdahoEv_: FreeNode policies for support channels <16> IdahoEv_ read the msg you get upon entering <26> Heh, the bot knows everything. <25> Ah, here it is <25> !+move <27> [Channel Move] We moved from #php to ##php in order to comply with http://www.freenode.net/policy.shtml#channelnaming You can see our "about" group here: http://freenode.net/about_groups.shtml <25> My complaint about PEAR is that it's ALL OOP <25> And some things just wern't meant for OOP <22> Lies! PHP_Compat. ;) <26> wow, that link is badly formatted (the actual URL is http://freenode.netpolicy.shtml/#channelnaming, despite the link text) <25> mattmcc: plllltttthhhhh <26> (note .shtml instead of .net) <22> As for things not meant to be OOP, I suspect if PHP actually had a concept of a package or namespace, you'd see more non-OO code. <13> All OOP in a language that's designed to be primarily procedural... there's a problem with that, Pollita? <26> it actually managed to freeze up firefox. :-) <25> Idaho: What craq are you on? <28> if i say $arr[$var] += $var2; will that error if $arr[$var] is not set yet? or will it just make it 0 and then add $var2 to it ...... <22> As it stands, it's virtually unacceptable to write functional code that's expected to be widely reusable. The odds of a name collision are too high. <22> Unless you want obscene names. <4> :) <25> That's a spurious argument at best <25> My_Package::some_method() is as obscene as my_package_some_method() <13> one less character, too!
Return to
#php or Go to some related
logs:
Traffic Shaping requires mangle makejail jailer jailtool #ubuntu avahi nfs.service gentoo crosscompile howto #linux linux xdvdshrink where logs cdrw interface #python #ai
|
|