@# 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 32



Comments:

<0> well, it's weird, since i thought php from the command line would always re-read the ini file, but i changed it and it seems like it didn't take
<1> kittyanya rear, head, same difference, both are too thick to get it.
<2> khaladan: it reads it when the process first starts
<1> guess I should eat, then hit the dentist!
<2> Jymmm: of course, but the kicking process is so satisfing
<2> Jymmm: dentists don't like being punched
<3> Adam_: thats a none trivial task
<3> Adam_: One solution may be to load all you data (from mysql) into a Tree, and do the work there.
<2> Adam_: sounds like a standard parent-child cats system



<4> ||cw: Yeah pretty much. I just don't have much experience with them.
<5> what was the function to make 000000 to 00 00 00 again?
<5> string spacing with a given char
<2> Adam_: in a table you have id, parent, catname. root level's have parent=0
<2> then you recurse
<2> Jax: wordwrap?
<4> ||cw: I don't exactly get what your saying?
<5> hm maybe chunk_split()
<2> Adam_: then search for a tut, there's lots of them. it's the same concept as a threaded forum
<4> ||cw: ok. What should I google?
<5> try this Adam_: http://www.codeproject.com/cs/database/Trees_in_SQL_databases.asp
<5> or just google for "Trees in SQL" or Storing trees in a database
<3> Jax: the database isnt the work, the Tree in PHP is.
<3> Adam_: You can check at this code, it should come in handy. http://www.phpguru.org/downloads/Tree/docs/Tree.html
<6> what's the best way to get the length in time of an mp3 file?
<6> i'm trying to use a cl*** mp3.php but i can't seem to get the length variable output from it
<2> ezrafree: open it and read the frames. I've seen libs that can do this from php
<7> ezrafree: read the MP3 headers, get the bitrate. then it's a simple math statement to figure out how many frames are in there.
<2> ezrafree: does mp3.php claim to work with all of abr/cbr/vbr?
<6> ||cw: don't know but right i'm just using 128k cbr
<8> 'lo :)
<6> it's example shows: $mp3 = new MP3("Alpha Blondy - A1 - Jerusalem.mp3"); $mp3->get_id3(); $mp3->get_info();
<6> but how could i print those results out somehow to debug?
<7> ezrafree: the same way you'd debug anything else - var_dump(), print_r(), echo ..
<7> ezrafree: in any event, we don't support downloaded scripts here.
<8> Is there any way of writing a function that can be "hooked" into? Like if I have a function called "check_for_valid_filetype()" that I can have includes "add" their own code to?
<6> thanks caffinated, wouldn't expect you to, just not too familiar with working with cl***es and objects far as debugging goes
<7> ezrafree: ah, ok
<8> Like if I have "support_mp3.php" and "support_txt.php" --- each time I add a "support" include, it would dynamically make the check_for_valid_filetype() work with it?
<8> what can I look into?
<8> :)
<8> There must be some way where I don't have to continually modify the code to support each module as I add/remove them.
<7> sol: make each module a file in a predefined area, and then load them in a loop?
<8> caffinated; yea, that doesn't work too bad...but that only works with one function.
<7> so, what you basicly want is a way to redefine a function?
<8> either that or have some sort of an array of functions that can be added to



<7> sol: yes, that is possible
<7> sol: you want anonymous functions
<8> is that the proper way of doing it?
<8> mmm ok
<9> anyone know of a cms for large projects, something of the nature of sourceforge but on a smaller scale, svn integration would be a plus
<8> I'll read into that :) thanks.
<9> ?
<7> see: http://php.net/create_function
<8> got it :)
<9> project management *
<10> i have a function in my templating cl*** which adds <i>, <b>, and <a> tags acording to a regex expression match (for instance, {a:listing.php|listings} would generate <a href="listing.php">listings</a>), but i woudl like to to skip any <form></form> tags when searching for the substitutions, anyone know of an easy way to do this, my function: http://pastebin.com/721313
<11> What is the best PHP compiler/accelerator/whatever? I currently have XAMPP installed, which comes with Webalizer and eAccelerator, and I think those would both be choices, but I'm not sure which one to use.
<8> ahhh create_function is unnecessary :) but it did lead me to find something nice
<8> in the example code below is $variable($param);
<8> I didn't realize you could call a function with a variable name :)
<8> very cool.
<7> sol: that is an anonymous function
<8> yeah
<8> I meant that create_function() is unnecessary
<8> anonymous functions are definitely new to me :)
<7> sol: well, you can't do $foo($bar) unless you first define $foo as an anonymous function ..
<10> what would be an efficient way of changing this regex '|\{(.{1,2}):([a-z0-9_ \-]*)\}|i' (which matches {tag}something{/tag}) to match <p>some text {tag}something{/tag}some text </p>
<8> caffinated; well, I can do: function somenewfunc(){ } $var = "somenewfunc"; $var();
<7> sol: yes, but that is not the same thing.
<7> sol: anonymous functions are defined by the idea that they do not have names.
<8> yea
<7> sol: the point is to be able to define an undetermined number of funcations that run no risk of clobbering each other.
<2> which is what create_function is for
<7> *functions
<8> ahh, just in case each of my includes names their functions the same
<8> neat.
<2> calling a set function using a variable that holds the functions name is not "anonymous"
<12> has anyone seen a function to convert a hex colour value into rgb?
<7> dools: http://google.com
<13> yes... It's under my carpet
<12> caffinated: yeah, no ****, i just tried google, couldn't find anything, now i'm trying hee
<11> ah, i had one such function but it was for javascript, and i'm sure I probably can't find it now
<12> here
<13> caffinated: Mine is better :)
<7> dools: look harder
<2> dools: didn't try very hard then. not that it's a hard function to write
<7> i swear, people get lazier by the second


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#osdev
#perl
#mysql
UdontKnow ircop
sudo TLS negotiation failure
rejected message qmail 554
#gimp
assign super-minor
Fatal signal: Segmentation Fault D2X
open_dir atm



Home  |  disclaimer  |  contact  |  submit quotes