« first day (783 days earlier)      last day (4169 days later) » 

8:00 AM
@Baba what ... i have learned ds and practiced in c,c++ and applying same using loop and condition ... dont know much about built in function in php
 
@Paul; how have you been?
 
@Kneel-Before-ZOD Good thanks, and you? Did you used to be called Sam?
 
@NullPointer the issue is different
simple simple methods it does not have
example : there is SplFixedArray::fromArray
but i cannot do that for SplHeap
 
@Paul lol.....yup; got a question for you, especially since you know when I started using classes
 
to add value to SplHeap .. you have to loop all the time .. does that even make sense
same to SplObjectStorage
and others
 
8:04 AM
@Paul every article I've read on PHP OOP says that it's slower (although not considerably) than procedural programming (probably because of the number of files involved);
@Paul will the difference be noticeable as the number of concurrent requests (users) increase?
 
It there any way i can buy beer online and it would be delivered to people in the chat room
 
@Kneel-Before-ZOD I wouldn't worry about the number of files. What I would be worried about is if you have a specific problem. If your application is slow.
 
Sep 29 at 13:58, by Gordon
@hekko if you want to become an expert programmer, google SOLID, buy GOF, buy POEAA, buy Clean Code, lookup GRASP, DDD, CQRS, DCI … but dont ask for PHP books. That's the most reasonable suggestion I can give you when you ask for Expert PHP books really.
 
@Kneel-Before-ZOD please stop read crap written by retards who want to find reasons not to write better code
 
@GoogleGuy
 
8:06 AM
@NullPointer ?
 
@Kneel-Before-ZOD OOP can be slow if you are dispatching lots and lots (millions) of method calls.
 
@GoogleGuy quote of Gorden is for you
 
So... What large scale sites are written in PHP?
 
or perhaps even an order of magnitude less.
 
@Paul doesn't the number of files in use increase the amount of resources being used (for each request)? That should make a difference at some point
 
8:08 AM
@NullPointer I don't understand what you're trying to tell me.
 
@Query
 
@Kneel-Before-ZOD The files are small when you consider the size of memory these days. They would probably already be in memory.
 
Is facebook still running php?
 
@Kneel-Before-ZOD If you are worried you can find out how much time your script is spending at each point using xdebug and kcachegrind (or similar tools).
 
@Query .. the web is a big place ... you would be surprised
 
8:10 AM
@Query facebook writes their code in a PHP-like language. What runs on their servers is not PHP.
 
@Baba I googled but didn't find anything recent.
 
@Paul on a production server? is that safe? and is there anyway to simulate lots of concurrent requests?
 
fb has approx 60,000 server too ..
 
So basically, facebook has realized php is not scalable, but they cannot rid themselves of using the all too popular syntax?
 
@Kneel-Before-ZOD No, xdebug would slow down your production server too much. Maybe xhprof (but I haven't used it before).
 
8:13 AM
@NullPointer That's a very low-ball estimate given that they run around 200K servers in just one of their data centers.
 
mornin'
 
@MadaraUchiha hi
@tereško Good Morning
 
@Paul alright.....thanks for the info :)
 
@tereško Is it possible for JavaScript to execute before PHP?
 
8:15 AM
yo ...morning
 
4 hours ago, by NullPointer
http://stackoverflow.com/questions/13756897/javascript-executing-before-php
lol
 
Interesting
 
@Kneel-Before-ZOD There are tools that simulate http requests. I had a quick look at httperf a while ago, that seemed to be able to do that if I remember correctly.
 
@Kneel-Before-ZOD Zod kneels before me, you know.
 
@MadaraUchiha General ZOD kneels before no one!
@Paul already looking into it; thanks
 
8:20 AM
@Kneel-Before-ZOD Heh, then we'll determine that in battle. I just hope he'll have his legs left to kneel though.
 
@MadaraUchiha lol...
 
Damn stupid fakking snow :(
 
@MadaraUchiha no need for battle; I'll just uproot your city, and toss it into the sun :)
 
And morning all
 
@PeeHaa .................................... :)
 
8:21 AM
@Kneel-Before-ZOD Tell that to the 10 tails, He'll have fun with you
But let's cut the there :D
@PeeHaa Stop complaining, we don't ever get snow :(
 
see who is first ...
@PeeHaa and morning ....
 
$str = str_split("PeeHaaShow");
shuffle($str);
echo implode($str);
@PeeHaa .. my first output was PaShoeeHaw
 
No preformatting ^
@Baba eSoPewHaah
 
@ShaquinTrifonoff ... lol
 
... or ahoSPeeHaw
 
8:24 AM
aHhPeoaSwe
 
@NullPointer lol, already made it: codepad.org/ufNkVOZP
 
@madara I'm 2 hours on the road and still on the same spot on the highway
 
@NullPointer what a combination for @PeeHaa this morning
 
What about codepad.org/1gFZv97I? nShoi Tfaonqfruif
 
8:25 AM
Yesterday I went back home from the base for the holiday, I had an 8 hour drive, in the bus.
 
unihSaq
 
Very Ugly ...
 
@MadaraUchiha 8hrs in a bus ... ?? Was there a girl beside you ?
 
8:27 AM
@Baba Oh, I wish
 
@ShaquinTrifonoff lol
 
Lol. But you have holiday so you arr the one who doesnt have the right to complain ;)
 
@ShaquinTrifonoff When Chuck Norris is passed through that script, the result is Chuck Norris.
 
@MadaraUchiha that is bad sign
 
@MadaraUchiha That's a lie
 
8:28 AM
@NullPointer interesting .... Larry Wall still the guy
 
@ShaquinTrifonoff You'll never know, if you try Chuck Norris will come and bang your head against the keyboard.
 
@MadaraUchiha what did you do for 8hrs
 
@MadaraUchiha codepad.org/cDKuPE9k - head gets banged against keyboard
 
Looking at the girl in the opposite chair ?
 
who is Chuck Norris
??
 
8:29 AM
lol
You don't know
 
lol
 
/kickban nullpointer
 
noop...:< who is he ?
 
@NullPointer .. lol
 
8:30 AM
@PeeHaa ... @NullPointer must be very young
 
are you taking about him ?
 
they don't watch Chuck Norris any more
 
NouCrckshir
 
8:31 AM
@NullPointer am sure you know spongebob
@MadaraUchiha lol
 
ya i do ...why ?
 
@Baba str_shuffle
 
@ShaquinTrifonoff .. you are kidding right
PHP can be crazy at times
str_shuffle (PHP 4 >= 4.3.0, PHP 5)
@NullPointer they are the same :)
 
s riNChuckor, oricNrhC suk
 
18
Q: How to create a random string using PHP?

Keith DoneganI know that the rand function in PHP generates random integers, but what is the best way to generate a random string such as: Original string, 9 chars $string = 'abcdefghi'; Example random string limiting to 6 chars $string = 'ibfeca'; UPDATE: I have found tons of these types of functions,...

@ShaquinTrifonoff imgine all that answers
The person with str_shuffle had 0 votes
 
8:43 AM
you guys noticed you tube design is changed and added more features
 
@NullPointer I have. It's uglier than ever now
 
@MadaraUchiha codepad.org/hiaJYCir... nope
 
@ShaquinTrifonoff .. don't agree .... .. it can be better
 
@MadaraUchiha lol
It takes 4390 lines...
 
@MadaraUchiha in what context
 
-1
Q: Javascript acts as if it is executing before PHP

JeffMy code looks as if it is executing javascript before PHP. I know this is not possible. When I view source, it disagrees with the javascript that is actually executed. Here is my code: <?php $_SESSION['new'] = "blue"; if (!isset($_SESSION['old'])) { $_SESSION['old'] = "blue"; } ...

 
i would guess this is case of mixed medicine .. someone took the wrong pills
 
@ShaquinTrifonoff let see if another shuffle can beat that
Best have seen 57,442
 
8:58 AM
@Baba That tests for duplicates of a shuffled string, not the original.
Doesn't matter, I suppose.
 
@ShaquinTrifonoff ... yeah
 
Failed (Duplicate) at 15150
 
just want to see possibility of when i would start having duplicate compared to the unique combination
 
looking for higher ??
 
Timeout - Chuck Norris cannot be found in the array.
 
@MadaraUchiha can i ask why i got 25 instead of 50
 
IS long polling with PHP a bad thing to do?
 
that has been happening lately
 
I am trying to send model from one controller other . and other controller is rendering view with the model data. but Is is said . 'Invalid Request'.


This is my code :
 
6
A: How to use a switch case 'or' in PHP?

BabaIf you must use || with switch then you can try : $v = 1; switch (true) { case ($v == 1 || $v == 2): echo 'the value is either 1 or 2'; break; } If not your preferred solution would have been switch($v) { case 1: case 2: echo "the value is either 1 or 2";...

 
9:02 AM
@PeeHaa we should have a button in addition to cv-pls and delv-pls.
 
 public function actionBusinesses()


        {
            $this->layout = null;

            $model = new ReportsForm();

            if (isset($_POST['ReportsForm']))

            {
                 $model->attributes=$_POST['ReportsForm'];

               $start = new DateTime($model->startDate);
               $startDate= $start->format('Y-m-d');

//               var_dump($model->startDate);


                $end = new DateTime($model->endDate);
               $endDate   = $end->format('Y-m-d');
  public function actionViewbusiness($business)

        {
            $this->layout = null;


            $this->render('/site/businessreport',array('business'=>$business));

        }
 
@Baba Because whoever set the bounty didn't award it in time, and your answer received the most upvotes since the bounty was offered.
 
@MadaraUchiha .. Oh now i understand ... thanks :)
 
When a bounty isn't awarded manually, the system automatically awards half of it to the "best" answer. "Best" being the one who got the most upvotes in the bounty time frame.
=)
 
Interesting .. there is always something to learn
 
9:05 AM
anyone to help me ?
 
@MadaraUchiha There's an open issue for it
Morning
 
@ShumailaKhan There's so much whitespace in your code it's racist.
 
@MadaraUchiha Sorry let me edit t :)
 
@DaveRandom ... good Morning
 
9:08 AM
 public function actionBusinesses()
                     {
            $this->layout = null;
            $model = new ReportsForm();
            if (isset($_POST['ReportsForm']))
           {
                 $model->attributes=$_POST['ReportsForm'];
               $start = new DateTime($model->startDate);
               $startDate= $start->format('Y-m-d');
                $end = new DateTime($model->endDate);
               $endDate   = $end->format('Y-m-d');
                $criteria = new CDbCriteria();
@MadaraUchiha I hope it works for you
 
@ShumailaKhan Please press the "fixed font" button when posting code.
 
  public function actionViewbusiness($business)
        {
            $this->layout = null;
           $this->render('/site/businessreport',array('business'=>$business));
        }
@MadaraUchiha ok thanks
 
@ShumailaKhan Please pick one of tabs or spaces and stick to it. I imagine (hope) your code doesn't look like that in your editor, and I imagine it's because you have it set to 1 space per tab, which is fine until to try and copy-paste it somewhere.
 
hi someone can tell me what dose mean the braces in such construction $this->{$some_value}
 
9:16 AM
@СашаХарьков It's to allow you to dynamically access properties by name. So $some_value = 'stuff'; $this->{$some_value} is the same as $this->stuff
 
tnx
its new feature or what?
 
Finally I'm in the office
 
@СашаХарьков Nope, I think it even worked in PHP4. 99.9% of the time, don't do it. Use an array instead.
 
hmmm
dont see it before
 
No, people don't generally use it, because it's a bad idea.
 
9:18 AM
why?
where i can find a discription?
on php.net ?
 
@СашаХарьков Mostly readability. Internally ($this) your object should know which property it is dealing with, and if you are dynamically accessing a collection of values by key, use an array. And in general you shouldn't have any public properties anyway.
 
hmm in my code the properies are protected
and its work fine
 
@СашаХарьков It's mentioned in variable variables. That should also tip you off - pretty much don't ever do anything outlined on that page.
@PeeHaa Morning. Problems getting to work?
 
@DaveRandom 2.3hours for 20km
or 32m :)
 
@PeeHaa Wrong direction for that km -> m conversion ;-) How did you get to work? On a donkey?
 
9:28 AM
'morning all :)
 
@PeeHaa lol...8km/hr
@NiekBergman morning
 
@NiekBergman morning
@DaveRandom Eeeek. 12.5 :P
It's still early ;)
 
9:47 AM
google has added servel new features in search too check this one goo.gl/fvJsd
 
@NullPointer that's grate
 
Morning all
 
morning
 
I load up the chat, and suddenly, only for a second, Chuck Norris' face appears and then disappears in the chat window!
 
9:57 AM
lol..
 
Chuck Norris is watching you
 
@ShaquinTrifonoff and he never miss is shot ..
and also he never reload gun
again got cool graphics ... stackoverflow.com/questions/13760403/…
 
@Jimbo Morning
 
10:31 AM
Yay, Varnish. I love you.
Writing custom VCL caching logic is fun.
(unless stuff doesn't work and your hit ratio drops to <80 :P)
 
11:21 AM
Good mornin'
 
Morning @Donut
 
I ain't gonna say cv pls but this question seems dumb stackoverflow.com/questions/13761512/… Read the comments too...
 
11:37 AM
What does "cv pls" mean, exactly?
I'm new to the SO lingo.
 
close vote please - cv-pls
 
Can someone take a look at this? http://snippi.com/s/xc2fbck
For some reason $beta isn't decreasing each time.
 
@AlexCastro ur initialising it in the loop
 
I've tried it both inside and outside. I'll give it another go though, thanks.
 
@AlexCastro it shouldn't be inside for sure.... makes no sense
 
Wow
I just saw what I was doing. That's 3 hours of sleep for you.
Thanks @ShyamK
 
you're welcome :)
Seriously guys there are answers like this in SO? Really???
 
user image
7
@ShyamK flagged
 
@ShyamK This guy's talking to himself...wtf? haha
 
12:00 PM
HI
Can anyone tell me If I rollback without having a transaction in process what actually happens at architectural level
 
@AlexCastro I think he got fed up of waiting for an answer... and decided to close the question by accepting his own answer
 
@ShyamK yes absolutely
 
i dont think same about java ... its like crap form me imho
 
The right side is fine, but its not that fast compared to C++
 
12:05 PM
Hi guys, my question needs a bit of a bump. Could you look into it perhaps? It's about Loading only certain rows from excel/OpenOffice sheets into a MySQL database. (stackoverflow.com/questions/13727361/…)
 
@MaxvanHeiningen Dear lord man! Ever heard of fgets?
@MaxvanHeiningen how about php.net/fgetcsv ?
 
Can anyone tell me If I rollback without having a transaction in process what actually happens at architectural level
 
That is some insanely CPU expensive code.
 
@GoogleGuy Yes i've been using that but i haven't been able to load only rows 3 to lets say 19 into my database.
 
12:09 PM
@MaxvanHeiningen set a variable to determine the line number and increment it with each iteration of your loop then use continue to skip over lines out of the range or break from the loop.
 
In database technologies, a rollback is an operation which returns the database to some previous state. Rollbacks are important for database integrity, because they mean that the database can be restored to a clean copy even after erroneous operations are performed. They are crucial for recovering from database server crashes; by rolling back any transaction which was active at the time of the crash, the database is restored to a consistent state. The rollback feature is usually implemented with a transaction log, but can also be implemented via multiversion concurrency control. Casca...
 
@MaxvanHeiningen $i = 0; while(false !== $data = fgets($fp)) { ++$i; if ($i < $start) continue; if ($i > $end) break; /* do logic with mysql here */ }
 
@GoogleGuy Will try, thanks a bunch! :)
 
I can provide a more elaborate answer in the question if you'd like.
 
Sure, that would help a lot.
 
12:15 PM
@Paul This is not what I was looking for
 
There
 
See I have a huge app. where i have used more then 1000 times "Roolback" command even when I have no transactions in process
@paul
@paul Like This :-
$this->m_objDatabase->begin();
$this->m_objPaymentDatabase->begin();

if( false == $this->m_objArPayment->insertArPaymentTransaction( CPaymentTransactionType::PAYMENT_TRANSACTION_TYPE_DISASSOCIATE, $this->m_objCompanyUser->getId(), $this->m_objPaymentDatabase ) ) {
$this->m_objDatabase->rollback();
$this->m_objPaymentDatabase->rollback();
$this->addSessionSuccessMsg( 'Failed to add payment transaction.' );
break;
}
 
oh, I see, but you do have a transaction there with the begins?
I am assuming also that m_objDatabase and m_objPaymentDatabase are different dataabses.
 
yes ofcourse they are
$this->m_objDatabase->rollback(); this line is of no use and I have done the same sort of thing almost 1000 + times
Is this gonna be a liability on my performance
@paul
 
Hi
Hi i am useing wordpress
and i have to set Permalink Settings as post name are not working ? any idea about this
My Url Now http://demo/?page_id=92

and i have to set like this
http://demo/how-we-work/

how to set in wordpress
 
12:30 PM
@ScoRpion... pls format your code the next time :) Use Ctrl + K or click Fixed Font in case you didn't know

 The Loop

Where humor doesn’t work.
It would be easier for you to ask your question there...
 
Not many ppl here like WP...
 
@ScoRpion... I'd read the manual page for your sql server. Architecturally the database layer you are using in PHP is probably a thin wrapper over the C API to the database. As such, I would imagine having an extra call to rollback would cause another call to the database.
Personally, I would only worry if things seemed slow. I'd do some benchmarking if that was the case.
 
@Paul Thankyou verymuch
Sir
 
12:48 PM
@MaxvanHeiningen Please stop everything you're doing and regain focus. Your question has utterly become lost in context.
I urge you to spend no less than 5 minutes thinking about what you're trying to ask before you continue on with this nonsense.
 
@ScoRpion... No problems, BTW as an example this is the C API for mysql and I believe this is where it is called when using PDO.
 
Hola chicas
 
@MikeB jo!
 
@paul
@paul hi
@googleguy hi
 
Huzzah! I have the weirdest SQL error: i'm inserting a time-log (mktime()) into the database and then i try and delete everything that's older than 24hours.
    $datetime = mktime();
    $deltime = mktime() - 86400;
    $q = "INSERT INTO views_fastbb(quemviu, visto, datetime) VALUES('$quemviu','$fbbuser','$datetime')";

then i'm trying to delete it with this:
    $database->sendquery("DELETE FROM views_fastbb WHERE datetime < $deltime");

but it's not working. If i go to the database and try out that same query it wont work also, but if instead of "less than" i place "greater than" then the
oh wow, that came out a little too big.
 
1:25 PM
@MikeB jo.!
 
@GoogleGuy Nevermind that all, found the answer right here: stackoverflow.com/questions/10901113/…
@GoogleGuy Thanks for your help :)
 
@MoshMage Use DATETIME/TIMESTAMP columns and the MySQL date/time functions for things like this.
 
@DaveRandom i should've done that from the start, true; Still: what i have should work, right? and by "should" i mean "1354835300 IS LESS THAN 1354799619 - i'm not crazy right?!"
 
@MoshMage Also, use time() instead of calling mktime() with no arguments. Also turn error reporting up to max in dev, you'd be seeing E_STRICT warnings if you did.
@MoshMage No, it isn't. 13548 > 13547
 
1:30 PM
.. gotchya. the otherway around. ...df..
/me facepalms
 
@MoshMage But yes, I'm surprised it's not working, the logic looks right.
@Leigh Whoever wrote that is a <div>
 
Oh well. I shall see what i can craft with the proper columns and functins
 
@DaveRandom The XKCD guy? :x
 
but by $deity if this isn't weird
 
@deceze rep whore!
 
1:35 PM
@MoshMage Hang on, "the oldest log is 1354835300" and "today minus 24hrs is 1354799619" - the oldest log is not 24 hours old.
 
nowai? lemme math it up
 
@Leigh lol ... why?
 
Dec-07-2012 00:08:20 vs Dec-06-2012 00:08:20
Dec 07 = oldest log
dec 06 = mktime - 24
 
@Leigh No I meant the HTML. Honestly I was just trying to come up with a way to make that joke that made sense, couldn't, so I went with that.
@MoshMage Yep. Oldest log was made after your "delete before" cutoff.
 
/me is lost; So, at what time do you gather it's going to leave the db? (so i can keep a hawks eye on it)
 
dupe?
 
yup
@Jack its not a dupe ..its dupe of dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe-dupe
 
^ dupezor ?
 
i mean, i didn't see a close vote yet.
ahh there it is
 
HI
I am using wordpress and i want to a player for live streaming
anyone can help me????
 
wonder who voted NC ... strange
 
html auido Player for live streaming??????
 
Wow, it looks like deceze is trying to fill his quota ;-)
 
@DaveRandom i (think) i got it. Today at around 4am i'm going to be sure about the life span. If it goes south i shall use the propper columns and functions.
Thanks for handling me with care :P
 
@MoshMage lol no worries - if you want to test, why not just try dropping the TTL to 3600 (1 hour) so you can test it? Once you are sure it takes notice of your TTL variable, crank it back up to a day again.
 
1:50 PM
@Jack Meh, he's just being helpful with 1-liner answers instead of telling the OP to RTFM
 
Good afternoon ladies and gentlemen, if you would all be so kind as to post requests for any questions you come across that need closing and deleting in the next hour or two, instead of posting two separate cv/delv requests, I would be ever so grateful.
 
@DaveRandom Testing something?
 
"die, bad question scum, die!"
 
1:57 PM
@DaveRandom what's the difference between cv-pls and chrome-cv-pls?
 

« first day (783 days earlier)      last day (4169 days later) »