| |
| |
| |
|
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
Comments:
<0> giggsey: shouldn't you be including "om" in your search so you can exclude it in the replace? <1> I have no idea, I'm a regex n00b <1> :P <0> !tell giggsey about regex <0> that's usually a good starting place <2> Can you still be a newb after reading `!tell about regex` ? :P <0> given that there's entire books written on regexes, yeah, but it's a good start. <3> !tell giggsey about mre <2> hehe, the tao of regex is enough for me, just a quick reference :P <3> giggsey: MRE is an especially good start. I have a copy of it in my desk. :) Even used it as my main source to write a report on regexp for a computational theory course at the local university. <3> Rhizome: Hm... ISBN? <2> uhm, it's not a book :P <2> http://sitescooper.org/tao_regexps.html <3> Rhizome: Ah, gotcha. Lovely! Simpied! :D <4> Hi, there is something like Ruby on Rails for PHP? <5> aarkerio: Take your pick between the several MVC frameworks.
<5> Rails is just another MVC framework. <3> aarkerio: Ruby is a language, Rails is an MVC framework. <6> aarkerio: cake for php is nice <6> there are plenty to choose from though <7> what is the function to reverse string? sory, i am new to php <6> http://cakephp.org/ <8> Rhizome: thats good! thanks <5> j9ls8: php.net/strrev <7> thanx <8> aarkerio: take a look at this http://www.phpwact.org/php/mvc_frameworks <9> how can i specify a string to be over 6 characters long ? i'm using ereg("^[A-Za-z1-9\._]*$",$my_variable), what must i add? <10> Hi, how can I determine the timespan between 2 unixtimestamps in a human-readable format? <11> subtract and convert? <12> is there any reason why an extension is loaded in the web browser, but not when I execute the file from command line? <10> VisezTrance: the regex therefore would be: .{7,} <9> thanks, let's see ... <3> Noel4DMB: What are you seeing that's leading you to believe that what you just described is in fact what's happening? <10> kon: how can i convert a the difference of 2 unixtimestamps to for example the numbers of years? <12> Elazar: My script works in a browser, and it does not work in command line <12> the functions that are loaded in the browser are not found in command line <11> wandschrank divide it with (60*60*24*365) <10> kon: thanks but it looks a bit cryptic isn't there a php function for such conversions? <11> strftime <11> to get a timestamp from a date use mktime <9> Noel4DMB, if i use chmod 777 on a picture i can view it my browser http://server/picture_path but i can't view directly from the server, for instance, sftp://user@host/picture_path won't work <12> I dont get it <12> lol <12> Im trying to make one of my scripts work when a java application sends arguments to it <12> so its doing php myfile.php arg1 arg2 <12> and my extension for FLIX isnt loading. <9> just try your script only once as root .. <9> it *might* work <12> fatal error: call to undefined function new_flix2handlep() <12> but from a browser it works <9> don't know .. <10> kon: strftime like date i gues only formats timestamps not stimespans <11> err what exactly are you tying to to? <10> I want substract to dates ad want to know how much years are the difference. But however your approach withe dividing by this weird number works. <10> s/to/two/ <10> s/ad/and/ <13> Anyone here know how to test how many concurrent users my server can take using a local application? <14> wand: It's not a weird number. It's the number of seconds in a year (60 * 60 * 24 * 365) = #sec * #min * #hour * #day <14> wand: And while it's probably the easiest way to do this, I think it'll end up generating erroneous numbers when taking into account leap-years... but only by a few days, so if your desired resolution is years, you should be safe with that. <9> the ereg pattern is working, thanks <3> Alystair: That's not a one-answer-fits-all question. <10> Ahroun: that might be not really exact, because of shift years and shift seconds, which are not considered <14> wand: see my previous statement. :P <13> I just wanted to see how many people can surf our site concurrently <13> isn't there one that comes with apache? <10> Ahroun: my resolutions are years but with 10 post decimal positions ;) <15> which is better? The PHP manual or the Java docs? <3> Migs: Personally, I think that it's easier to find things in the PHP Docs, but that may be partially due to the fact that the Java Docs are a lot larger. <14> Wandschrank: Um... correct me if I'm wrong, but wouldn't 10 decimals of years be ... 3.15 milliseconds ? give or take? What are you doing that needs millisecond precision between two times? <15> I think so too <10> Ahroun: I want to show my age in realtime on my homepage ^^ <14> wandschrank: Okay, that justifies seconds, definately. Considering the only way to keep the display accurate would be to incorporate javascript (which has questionable millisecond resolution in its time functions), I'd say seconds would be more than enough. <14> wandschrank: I mean, does your birth certificate list the exact millisecond you were born? I'll doubt it even lists the seconds. So you're going to be in error +/- 1min anyways (and probably more) <10> Ahroun: Ok you have convienced me ;) <14> wand: *nods* Where I'm from (Arkansas), the standard is to round to the nearest quarter hour... so there's a +/- 15min error in this state. However, I'll yield that converting the difference to a nice clearly understood string will be difficult, because years have varying lengths, as do months. So if you say "I'm 1 month old", do you mean 28 days old, 29 days old (born on Feb1 on leap year, asked on APril 1), 30 days, or 31 days old? You've <16> Ahroun: I don't think it's important enough for accuracy <14> caffinated: I wholely agree with you, but if he can be talked down to seconds instead if milliseconds, that's sane enough for me. :P
<17> are there any good RoR-like MVC frameworks for PHP? <10> caffinated: I'm also agree with you ;) <18> chillywilly: there are many frameworks for PHP, but none of them have the hype and fanatical backing that Rails has, so no. <18> chillywilly: there are likely good frameworks for PHP though <18> (I've just never used one) <3> AcidReign: Msged him with the ones mentioned earlier. <3> AcidReign: CakePHP and PHP WACT I think. <18> Elazar: *shrug* never heard of them <17> AcidReign: I don't care about hype, rails is a good framework <17> PHP is more popular and understood by people around here though <19> Take it to #LanguageWars <17> there is no war going on here... <17> a language is just a tool <17> thanks for the suggestions people <17> cya <1> I have http://giggsey.pastebin.com/646288 which is meant to make each usernames colour different depending on their username (eg: all usernames which are giggsey = green) etc., however, the code I have has something wrong, because its only making usernames red <20> How do I make this print with trailing 0's if it's an even amount? "<b>$<?=$ship_cost?></b>" i.e.rather than printing $3, I want $3.00. Is there an easy way in PHP to do that? <3> mischko: number_format() <21> hi, i'm looking for a DBAL in PHP which supports sqlite >=3.1. can you help? <3> Piet: DBAL? <21> database abstraction laye <21> r <20> Elazar, thanks! <3> Piet: http://pear.php.net/package/DB <21> Elazar: that hasn't been developed for a long time, i'm doubtful as to whether it supports sqlite >=3.1 ?! <3> Piet: *shrug* It lists SQLite as one of the DBs it supports. <21> Elazar: right, but the versions make a difference <21> thanks anyway ;-) <22> hi has anyone done any graphing using PHP/ <22> ? <23> pUmkInhEd: sure, there is a PEAR library dedicate to it <24> hi all <14> pumkinhed: Yeah. Good luck finding a nice easy to use freeware setup. There's a pear package but it's kinda screwy and hasn't been updated in ages. <3> pUmkInhEd: http://www.aditus.nu/jpgraph/ <25> hi, when i submit a form with new lines, it is not recognized by html, so i would want to replace the new line caracters with <br> or something, but what are those caracters? i've searched for them in the mysql, but there they are displayed as new lines <3> pUmkInhEd: http://www.advsofteng.com/ <25> are those /n -s? <3> NRG88: http://php.net/nl2br <25> thanks <26> Is it possible for a parent cl*** to access child cl*** constants? <15> why, Narada? <23> Narada: Can't see how that would be possible. <14> If the parent needs to access stuff in the child... why not just put it in the parent? <15> perhaps you should rethink your design, Narada <26> ^Migs^: That's exactly what I need. <26> Okay let me explain. <26> First of all there is a parent abstract static cl*** containing all the methods. <27> Narada, i think it is possible and its not a bad design atall <26> Then there are three children which extend that but with different values but these values can be constants as they are not set more than once. <28> pUmkInhEd: jpgraph is a library that does that, if the q public license is okay for you <26> Does that make sense? <26> outofjungle_m: How? <27> Narada, yes. it works <26> outofjungle_m: self :: CONSTANT in the parent? <29> \me <27> Narada, okay i have a factory that will produce 4 types od object <3> et: Already pointed him to that and ChartDirector. <26> What? <27> Narada, the only difference between the object is one single fucntion <26> outofjungle_m: Are you sure you've got the right topic here? <26> outofjungle_m: Or the right person? <27> Narada, yes <23> Narada: Yes, he does. However I think what he is doing it going to be more complex than what you want. <27> Narada, you want to call the function of the child cl*** from a parent <26> Yes. <26> I don't want to access a function. Just a constant. <26> But if you want to access a constant via a function then that's overkill. <26> Do you agree? <14> Elazar: Wouldn't happen to know any decent ones that are complete freeware and written in only PHP, besides the scratchy one in PEAR would ya'? Those two you mentioned have commercial licensing concerns, and ChartDirector I know is distributed as a DLL instead of PHP (checking on JpGraph now...). <27> Narada, it should work <26> outofjungle_m: Yes but then I might as well use protected static vars. <30> does any in-memory sql database exist for php? <26> steve_: memcached and the heap engine for mysql <26> steve_: take your pick
Return to
#php or Go to some related
logs:
kdestartconfig php my array keeps getting converted to a string
#mysql #web Array found where operator expected scp #gcc Knoppix lock-session ubuntu web-key #css ubuntu verbose-boot
|
|