@# 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> pshh... everyone knows its "c'mon" not "common"
<0> that's just silly
<1> array_splice() would work well for getting rid of an element in a mixed array
<2> There's nothing funny if I say that I have got dissatisfied, a channel is just to share your views on a topic, I got to know from here that I could not get help on my problem so i got dissatisfied, but anyway this is a channel to share knowlede so its great.
<3> well i'm not sure if array_splice will remove only one key.. i thought it removed keys from a pointer? like it can be used to wipe out an array except the beginning and end?
<1> elvendrake: can remove from anywhere in an array
<4> how can i delete an index without changinge the indexes in an array....
<0> Adam1213, unless it's the last index... you can't
<2> Ok I am now not seeking solution to my current problem from this channel anymore, i will come back with some other problem. Thanks to all.
<4> 12345 1,2,3, 5 ... no 4 currently it would be 1235
<0> Adam1213, all index above deleted will move down by one index
<4> what if they are words?
<5> Trimor: Fair enough.
<3> ok.. well say i do that to the 13th value.. would foreach then miss one or double check one?



<4> i could insert a space!
<5> That was solved quickly :)
<6> what was it he wanted for free?
<7> Adam1213: look at who was parted
<5> Adam1213: not banned... Quieted.
<7> ||cw: hand-holding
<6> ah, free coding work
<4> it comes up as b even if it is q
<7> nah, he's just a tool
<5> Adam1213: Got the clue yet? :)
<5> Adam1213: not the % there.
<7> he asked some question and expected a swift, accurate response
<4> yes i know who
<5> I'm off
<7> and he got really pissy when he didn't get one
<4> bye
<8> how could i "time-limit" a random number? i want to generate a random number but i don't want it to change every time, just maybe once every 15 minutes or so. any ideas?
<8> or is my question just worded poorly =/
<0> ezrafree, check the system clock? just a guess
<8> r0xoR: how could i do that in php?
<4> um seed the random number
<0> ezrafree, you could look it up in the manual :)
<8> r0xoR: i'm great with that, any idea where in the manual?
<4> according to time with mins dicided
<0> ezrafree, nope sorry
<4> Seed the random number generator (PHP 3, PHP 4, PHP 5)
<4> void srand ( [int seed] )
<4> bah
<4> sorry to many lines
<8> oh wait maybe i could use the date function?
<0> ezrafree, like i said... check the system clock
<7> ezrafree: you could store a timestamp in a session var
<8> oh srand() ok i'll take a look thanks Adam1213
<7> ezrafree: then compare current time to stored time, if it's > 15 mins, regenerate the random value
<9> hi people i have got a problem "i use fsockopen and post-get data in remote server, iwant to hide or change for my $remote_host data" it can be?
<4> ok you should just divide hours up into 4 for the calculation ....
<4> do you want changing every 15 mins or do you want changing for a person every 15 mins
<8> i'm not so sure i understand what "seed" means in this context
<6> Abdulkadir2: php.net/curl
<4> it means gererate off
<7> ezrafree: all you're trying to do is generate a random number and then not generate another one until 15 mins has p***ed?
<0> ezrafree, seed is not what you want
<8> Adam1213: changed every 15 minutes, not different for each person no
<4> 1 = 100 2=200 not so random
<0> ezrafree, go with neatnik's solution
<8> neatnik: correct
<4> than do it of the time
<7> ezrafree: make a function, new_rand() that does the following:
<9> ||cw: im looking. thnx
<7> ezrafree: checks to see if $_SESSION['stamp'] is set; if not, sets it to the current time
<8> ok i'll go the session route then
<6> ezrafree: you'll need some shared place to keep the number like a file, db, shm, or something
<8> ||cw: okay, db works for me
<4> session_start(); session_set('stamp', 'val'); or something
<6> ezrafree: as well as a flag to see when it was last generated,
<7> ezrafree: then generates a new random number only if $_SESSION['stamp'] is more than 15 minutes away from the current time()
<7> ezrafree: you could also store the random number in the session as well, if it doesn't need to be shared across multiple users
<7> ezrafree: if you're sharing the same random value across multiple clients though, then yeah, you'll need to stick it somewhere :)
<4> do not just use date... use full time stamp because I will come back 24h + 1 min later to prove a poitn it you do not
<8> neatnik: nope needs to be shared accross all who view the site



<7> ezrafree: ok :) personally I'd use a file, but that's only because I don't mess with DBs :P
<7> if you know how to use a db, go for it ;)
<8> ok cool thanks
<8> yeah i'm more comfortable with db's
<8> i worked with files but it can be more tedious in my opinion (because i don't know those functions as well that is)
<4> neatnik i agree with you on that.... i really should get on to dbs but have not yet but just started php but can do a lot
<7> ah, I'm the opposite
<7> I know the file reading/writing functions like the back of my hand :)
<8> ok think i've got an idea of how i'm gonna do it now, thanks so much everyone! :)
<8> off to try
<7> Adam1213: meh, dbs are only necessary for grander operations :)
<7> Adam1213: for simple stuff, files always suffice (and can be faster)
<4> I wrote a thing to save an array into a file and load it as well just to avoid dbs array2string string2array and all that
<7> Adam1213: heh, yeah, done plenty of that myself actually :)
<0> neatnik, i think there's a greater potential for needing to do a lot of string parsing when you use files vs DB where you just construct one SQL string per query and then run
<4> it shuld be a functon included
<7> http://www.neatnik.net/textreme/ <-- my 100% db-less text-based multiplayer game
<4> in the end i had a nice javascript game with high scores
<0> neatnik, great, just what i need... more distraction from work :)
<7> r0xoR: ;)
<7> r0xoR: it's old code, and somewhat broken, but in its day it actually worked well :)
<0> neatnik, yeah i did a mud for my first project ever
<7> r0xoR: you'd laugh if I told you how it works
<0> mmmm... first *real* project ever... my first project was Blackjack on a TRS-80 CoCo III
<10> Any phpers?
<7> so I'll tell you :)
<0> Gibson, none...
<7> r0xoR: I store all of the session files in a separate dir, rerouted via .htaccess, and parse them individually in order to maintain the game's "state" and allow for multiplayer interaction
<0> Gibson, might be some programmers though, some of whom know a thing or two about PHP... why don't you just ask your question
<0> ..... wait for it... waaaaait for it... hahahahahaha!
<0> neatnik, yeah, ok i laughed
<0> interesting solution though
<7> :)
<7> probably would have been easier for me to learn mysql crap
<7> but I had fun with it :)
<0> neatnik, i wrote my first MUD when i was 12 in C++ on a Mac... i was doing some radical stuff with pointers and the STL... it was fun too
<10> Request: Freelance PHP developers required for major international development project. Location not important, but willingness to work as part of a team and provide input according to a precise spec is required. Minimum of 10 hours input over a 2 month period required to register your interest. Msg me for further info with details of your experience and reference sites if possible. Thank you.
<7> but I sure did like playing with ResEdit :)
<11> r0xoR: how old are you now?
<7> r0xoR: you ever subscribe to MacAddict?
<0> neatnik, hahah oh yeah... i had every issue, including the premier
<0> i think i gave them to the goodwill
<7> r0xoR: aww
<7> r0xoR: you'd see my published joke thing if you looked at one of the 1996 issues
<7> January 1996 I believe
<0> heheh, werd
<7> the one with Steve Jobs on the cover
<0> hahah, resedit... i modified netris to only drop straight ones just with RegEdit
<0> thend i'd go whoop *** online
<7> ResEdit rocked :)
<7> my joke appeared in the "You know you're a Mac Addict when..." box
<7> and it went something like this:
<7> "You know you're a Mac Addict when you have vivid nightmares of the ResEdit jack-in-the-box stabbing you in the eye with a resource fork."
<0> hahahah
<0> i like it
<7> :)
<0> i'd get a mac if i had the money... but as it is linux is free and i can afford to put together a PC part by part... and since mac is *nix based these days anyway
<7> yeah, close enough .;)
<7> if you can get over not having OSX that is :P
<12> yes
<12> i cant not get over it
<12> but how do i trick my employer into buying me one
<0> pft... heheh, OSX ain't got anything for me these days... maybe years ago... i've had access to a dual G5 for a while and i like my custom OpenBox setup better... thought i've never delved into tweaking OSX
<7> pUmkInhEd: buy it and turn in the receipt for reimbursement... "business expense" :P
<0> s/thought/though/g
<13> ohnoz
<13> i've found a bug
<13> the gods only know if it's in php, apache or IE :p
<14> Has anyone used the php-ide for Eclipse that was released by Zend?
<15> malverian: The only php for eclipse I have used is the phpeclipse plugin. I didn't know Zend released one.


Name:

Comments:

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






Return to #php
or
Go to some related logs:

arp -a hw address incomplete
#linux
#ubuntu
#debian
#web
#perl
yum Samba 3.0.21b FC4
#gimp
enable standby for suse 10.0
eggdrop kartagis



Home  |  disclaimer  |  contact  |  submit quotes