| |
| |
| |
|
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> then implode it again <1> Davey|Work: Implemented properly, that'll almost always be the case. XPath'ing over a document with libxml2 is much faster than walking over dom nodes with, e.g, foo.childNodes. <2> why not just xpath('/img[@src]') <2> i think <1> / <0> cos this way we get to use implode <1> Er, // <0> and thats a cool word <3> if pg_insert is failing, how can i see why ? <2> mattmcc: // implies it has to be a top level node no? <1> winmutt: No, that's what / does. <4> what's up with php 5? <2> oh <2> php5 is powa <1> winmutt: E.g, /html vs //img <0> php5 is kinda like php4, but with more stuff
<0> does that help? <5> meh <5> if str_replace supported wildcard chars, I'd be all set :P <2> php5 is like php4 without broken references and what looks like is going to be a nice oop interface in php6 <2> randy: make sure your regex is not greedy, greedy is the default <0> seriously, if you make sure all your images are like <img ANY TAGS GO HERE src="thesrc"> <0> so make sure the src is the last one <0> then exlode ($img, 'src=') <0> the array generated by that (call it srcarray)....so $srcarray[1] will be "thesrc"> <0> then explode that again at the >... <6> php5 is like php4 without the ability to easily get a deep copy of an object <2> IXB: thats horribly inefficent <0> so $srcarray2[0]="thesrc" <0> well yeah <0> but <1> TML: Clone? <6> mattmcc: My understanding is that clones are shallow copies <0> change the $srcarray[0] to whatever then ew src is and implode the arrays back again <2> TML: "deep copy"? you mean like db handlers etc? <5> IXB: it would work <0> its messy but it would work <7> Clone doesn't give a deep copy? <5> yeah <7> Odd... <0> and its prolly easier to use and debug and just as fast as some bizarre regexp <6> I could be mistaken, having not actually *USED* PHP5 <8> mattmcc, if you care, http://ajaxian.com/archives/faster-dom-queries <9> I have a web service that is receiving this string "name&name", it is arriving name&name, this is result of magic quotes? <0> you'll have to make sure you know exactly what your <img> tags look like though <6> "When an object is cloned, PHP 5 will perform a shallow copy of all of the object's properties." <8> TML: clones are sorta shallow copies, you use the __clone method to do a deep copy ;) <6> Quoth php.net/oop5 <7> Silly, silly. <7> That just ****s. <8> inside __clone, clone the nested objects ;) <1> There are so many things to say about that. <7> I figured you could do some trickery in __clone() <6> You have to individually clone each property of the cl*** in __clone(), if I'm reading this correctly <2> TML: that is incorrect <2> i just cloned an html tree and it worked like a champ <2> in php5.1.2 <0> randy - you could also do it with some of the string fucntion i think..strtok....cant be sure though, i'd have to look it up. <10> time() spits out 1143871200 how can i get the date on there too? like 20060411125601 ? <2> now clone doesnt deal with external references/pointers like db handlers <5> heh, they still haven't removed the greek from the US php.net mirrors <11> http://www.myresourcespace.com/myspace.txt -> anyone have any idea why this is ending headers prematurly. I dont even play with headers. <6> winmutt: What does "worked like a champ" mean? <6> winmutt: You verified that it was a deep copy? <2> FatalRemedy: its segfaulting <6> What sort of verification did you do? <5> anyone else getting mostly Greek language on this page? http://us3.php.net/manual/el/function.strtok.php <8> winmutt, clone is shallow, the HTML tree's __clone method deep copied the children ;) <2> I rendered both trees <2> makde modifications on the second tree <8> especially ***uming you are talking about a DOM Tree <12> randy: yes, because you have /el/ in there. <2> Davey: I have no such magic method defined <8> winmutt, are the children objects, or arrays? <12> If you want english, make that /en/ instead. <2> its my own HTML cl***, plenty of circular references
<5> Tresnar: eep <2> childNodes being an array of objects and or static strings <5> Tresnar: I can't take it out! <0> why does mySQL store dates yyyy-mm-dd <5> ah <13> because it can? <2> IXB: because its simplistic <0> why not dd-mm-yyyy like everyone else? <5> I can switch it to en, though <5> nice <12> randy: Can't you just edit it in your browser's address bar, and then go to the edited link? <8> winmutt, but the arrays of objects will not be clones, they are references ;) <8> IXB, sorting <14> IXB: It stored it as a date, it *displays* it as YYYY-MM-DD when asked for it as a string <15> IXB: you can't sort dd-mm-yyy like you can yyyy-mm-dd <1> IXB: "everyone else"? :) <0> really? <0> wow, never knew that <8> GarethAdams, actually, I'm sure it stores it as the string :) <2> Davey: blimey <0> if not its not too hard to flip it round, really <0> just irritating <8> winmutt, ? <14> Davey|Work: really? you can +0 and get it as a timestamp can't you? <2> TML: yes i lied, you are correct <2> Davey: it is shallow <14> or am i making that up? <1> IXB: It's pretty much a non-issue, given that you can just format the date however you want, right there in the query. <8> winmutt, :P <1> IXB: Most DBs also provide a way to set the default date format. <0> meh just flip the string around with functions afterwards <2> i am frequently wrong as my wife :) <0> i dont like using mysql functions, i always manage to crash something or other <8> GarethAdams, just because it can do math, doesn't mean it's not stored like that <8> GarethAdams, it's certainly not stored as a UNIX timestamp for example <1> IXB: It's much more efficient to let the DB do it than to do it in PHP. <16> davey cant do math! davey cant do math! davey cant do math! <14> fair enough <17> how do i get the absolute unix path of the current php file? <8> enygma, quote true. <1> LazyAngel: http://php.net/realpath <13> enygma: 1+2=42 <16> w3wt <2> 42= number of streets...... <1> Stormchaser: No, that's 12! <13> !+42 <18> 42 is the answer to life, the universe, and everything <8> enygma, did you buy your ball and chain yet? Did you go for the traditional black iron one or the new fangled titanium covered lead? :) <13> no, I'm right, mattmcc :) <0> mattmcc - im sure it is more effecient but the scale of the projects i work on, its more important that they work all the time rather than working well but crashing occasionally cos i **** at sql functions and so on <16> Davey - yes, we did get our marriage certificate ;) <1> IXB: Surely, then, the solution is learning how to do it right... :) <0> that means like.. <0> learning things <0> i have enough to learn without that <17> mattmcc: echo realpath("test.php"); doesn't give me anything :( <8> IXB: like not letting kids handle your important data? <8> LazyAngel, then the file doesn't exist in CWD :) <2> http://www.google.com/search?q=the+answer+to+life%2C+the+universe%2C+and+everything&btnG=Search <1> LazyAngel: Right, it's not supposed to. You p*** it something like the SCRIPT_FILENAME from $_SERVER <2> google knows all <0> as ive said - i didnt let her <0> the people who work at the office arent IT people <0> neither am I, really <13> winmutt: no it doesn't... It does not know, who am I? <2> Stormchaser: I being you or I being google eg self aware? <19> randy: did you make it work yet? <2> Google knows who I am <2> with about 10 pages of hits to prove it <0> we just handle a lot of statistics over several offices and the easiest way we found was this php/mysql setup with a server room somewhere miles away, which caught fire or something... <2> and who is to say google isnt self aware <3> so i can't imagine why this answer is so hard to find. "how to find out WHY pg_insert failed, not just IF it did" <1> bignose_: It's not hard to find. You go to http://php.net/pgsql and discover the 'pg_last_error' function.
Return to
#php or Go to some related
logs:
#physics #math #perl usbmon script wwallace kanotix
fluxbox 1.0 font big ubuntu not syncing vfs ServeRAID 7 #php ubuntu dmx6fire
|
|