« first day (656 days earlier)      last day (4305 days later) » 

Sem
8:00 AM
@deceze Guess there are lots of alternative places there in tokyo? :)
 
@Sem I'm currently in Germany. Will probably be back in Tokyo in a month or so. I'll probably look around there then, better chances than Europe I imagine. :)
 
Okay so apparently Windows 8's code is finalized and released. General availablity comes on Oct 26.
 
Sem
@deceze Do you travel a lot?
 
user895378
@PeeHaa -- just the person I needed to see :)
 
@Sem Not a lot... but when I do, I travel far. ;)
 
8:04 AM
17 mins ago, by PeeHaa
morning (please don't talk too loud, handobver)
 
user895378
@PeeHaa I have a question about chrome extensions
 
@rdlowrey shoot
 
<-- Just received "spec" of new system from client.
Written in an Excel sheet.
IN ALL CAPS...
 
Sem
Makes it look PROFESSIONAL.
 
user895378
@PeeHaa I'm got my socket-based http client working and I was wondering if chrome will allow me to write an extension to "steal" the url from the address bar and pump all my browsing activity to localhost:8096(or something) so I can do some real-world testing from my browser. Is that possible?
 
user895378
8:07 AM
Basically like a local proxy
 
user895378
Probably a weird question :)
 
@rdlowrey Sorry. No idea. But can't you just setup the HTTP proxy in the browser settings?
 
user895378
@PeeHaa Of course I can. What a moron.
 
user895378
This is what happens when you code until 4am.
 
:)
 
8:12 AM
ACARS is always all caps :)
(whispering) good morning peehaa.
 
ty @hakre. morning
 
user895378
Apparently, google has determined that the most relevant autocomplete result for me when I type in the word, "does" is ... "Does Japan have a military?"
 
@rdlowrey does it offend you yeah was for me.
 
user895378
hehe
 
@rdlowrey Also, I was searching for the George Santayana quote, and Google gave me Those who don't understand Unix are condemned to reinvent it poorly.
 
8:31 AM
@rdlowrey I got "does slendertone work" followed by "does he like me"
Someone has been reading my spam!
 
user895378
lol @ does he like me
 
what do -> what do you feed a yeti anyway Oh god, this is getting better and better. I just wonder from where, and more likely how Google puts these "suggestions" together.
 
I get only "what does ... mean" suggestions for "what do"... O_o
what does beez in the trap mean
 
@deceze Put a whitespace after do .
 
what do contractions feel like
 
8:36 AM
@deceze Not sure if obstetrician or grammar nazi.
 
@Whisperity LOL
Also: "obstetrician" ;P
 
http://stackoverflow.com/questions/11773801/how-can-i-take-a-screen-shot-and-save-it-in-php
 
@Leigh Basically you press PrtScr, save the file as an image and then stackoverflow.com/a/11772941/1428773.
0
A: how can i take a screen shot and save it in PHP

blasteralfredYou have to understand one thing that PHP is a server side script and nothing to do with real time browser needs. You may try JavaScript with some library like jQuery to capture the screenshot. Then you may pass that image via AJAX and there, you can definitely use PHP to save the image into your...

Jul 28 at 20:33, by webarto
needs moar jQuery
 
@Whisperity I don't care how it can be done. He wants to do it with PHP alone. He can GIIIT OUUUT
 
@Leigh Git the fork out?
 
8:49 AM
pretty much
When people tell me to go fork myself. I take it as a compliment, and that they want clones of me.
2
 
So.. I was arguing with this, which we'll name Joe. Bout his PHP code causing a lot of undefined index notices and similar.
Basically, Joe doesn't want to change his code because it works.
 
@Christian It doesn't work, it generates errors :)
 
Joe is an idiot.
 
His argument is that notices are not errors.
 
Recoverable errors are still errors.
 
8:53 AM
@Leigh But it's not.
 
Notices are trying to point out potential real errors.
 
Oh really, how come they have to be turned off by setting the error_reporting level
 
Now, if it were me, I'd fix this issue right away. So please don't think I'm siding with Joe on this one.
 
You try accessing an out of bounds index in any real language, and see what kind of "notice" you get. It'll probably be Notice: Segfault
8
 
@Christian You would not realize how much I have cursed myself when I realized that the webserver I was first creating PHP scripts on was a dismembered custom repack where you had to use $NULL instead of NULL (* headdesk *).
 
8:54 AM
However, in the past, I did write code that looks like trigger_error('some rare condition', E_USER_NOTICE)
@Leigh :D +1
 
@Leigh Or Stack Overflow.
 
Now, that's my point. So Joe happily causes issues which I can't really fix without messing his code (and make it unmaintainabile by him).
On the other hand, his notices mix up nicely with my own issues (which, mind you, I try to fix).
 
@Whisperity Well depending on what was at the undefined index any number of magical things could happen. Maybe you don't cause a memory access violation, maybe it does cause your program to loop infinitely and indeed fubar your stack
 
53
A: isset() and empty() make code ugly

decezeFor those interested, I have expanded this topic into a small article, which provides the below information in a somewhat better structured form: The Definitive Guide To PHP's isset And empty IMHO you should think about not just making the app "E_NOTICE compatible", but restructuring the whole...

 
While the Joe's scenario is one off, I think this is a common problem faced by PHP devs.
> How else are you going to tell the difference between "variables that work just fine undefined" and honestly wrong code that may lead to serious errors?
Man, I wish I could stamp that in the face of popular PHP software
 
8:59 AM
Exactly, it masks errors. What happens when the index is supposed to be defined but isn't, versus when it is undefined because "that's ok"
 
So I guess at this point, my best bet is to convince Joe that he's doing it all wrong.
 
Submit a patch that fixes his code and revoke his commit priveleges
all of his code has to be peer reviewed until he gets it right
I guess that's the dev equivalent of treating him like a child if he wants to act like a child.
 
You hear that @hakre? We've got to treat kids like kids.
 
Well with kids you have several options. Kids need to be kids, because making them grow up too fast is bad. If you don't teach kids how to grow up, they'll be kids forever. And kids are always more fun after a little whiskey.
 
throwErrorMessage(TEM_SUCCESS, "Database created succesfully.", get_theme_img('dbdriver'));
 
9:02 AM
@Whisperity O.o
 
E_EVERYTHING_IS_FINE?
 
TBH I wouldn't even throw an error
 
Who the hell uses dreamweaver? Or did I wormhole back a decade?
 
@Whisperity :P
 
9:06 AM
@deceze E_USER_ERROR should be the most common one.
 
@Whisperity E_PEBKAC
2
PHP really needs that ^
 
@deceze That would be awesome, a soft ball with "E_USER_ERROR" on it, that you could "throw" at people.
 
@Leigh "Soft" ball? Why?
 
although if you were the one throwing, would it imply it was your error... hmm
 
And it's catchable...
 
9:08 AM
oooh, yes! it could be for when someone kept you out of trouble. You threw it, they caught it, go team :D
 
hello :)
 
@deceze Well I guess soft balls are a lot more catchable than hard balls hitting you. But finally, bottom line is that you got thrown.
 
As far as I'm concerned an E_PEBKAC should come out of the screen and stab the perpetrator in the face. ;)
 
messy. electrocution would be cleaner - except they may move their bowels in the process... ok skip that.
 
Who down voted? Please say why you down voted. Did you know that there is actually a user with their name set as anonymous down voting is lame? The question is not clear, so it can be hard to make an answer that solves an unclear problem. — Shaquin Trifonoff 18 mins ago
^ Do I really have to bother explaining what is wrong when he didn't even bother to try running his code at all? :-3
 
9:14 AM
That guy has been making shitty answers all morning.
 
@deceze 1. Repost! (oh look strikes again). 2. The hell is that code. The hell is that question?! Wait... more likely where the hell is that question?
 
@Whisperity LOL what is this I don't even
 
E_ID10T
 
a new error code? :-D
 
http://stackoverflow.com/questions/11774491/please-recommend-a-php-freelancer
 
9:22 AM
salary be, food eat
 
@Leigh Can't delvote, but gave it an OT flag.
 
		$this->_Socket = fsockopen($host, $port, $errno, $errstr, 5);

        if( ! $this->_Socket)
            die($errno);

		socket_set_timeout($this->_Socket, 2);
        stream_set_blocking($this->_Socket, 1);

		fwrite($this->_Socket, $header);

		$response = fread($this->_Socket, 512);

        if (empty($response))
        {
            $this->disconnect('Empty response.');
            return;
        }

		preg_match('#Sec-WebSocket-Accept:\s(.*)$#mU', $response, $matches);
@rdlowrey I need to wait :(
 
I find it surprising so many users don't bother searching at all (in the PHP or MySQL manual, or google), or post duplicate questions all the time (questions like "syntax error in my code, help me find it" or "no PHP error, but blank page at runtime")
 
@Jocelyn You must be new here... ;-)
It does boggle the mind. But alas, that's the state of humanity.
 
@deceze yes, I registered 2 months ago
 
9:27 AM
@Jocelyn You've discovered what has been largely termed, the India-Asking-Pattern
 
Sem
People like to do what's easier, which is letting other people search for you.
 
Man, I worked together with someone like that who simply would not learn, but instead preferred to ask me everything all the time. Often the same questions over and over. Not Indian, but Australian IIRC. And he even got pissed off at me when I wouldn't answer him in enough detail anymore.
What's wrong with these people?
 
@Christian Uh no, and my time is a bit short today, so I prefer executive summaries :D
@deceze Desperation has many faces.
 
Sem
@deceze I guess it's the lack of some sort of passion to create. Reminds me of a friend of mine who has been to brazil. He saw that those poor people were mostly poor because of their lazyness. Sitting beside the street all day.
 
Dunno whether it's passion or desperation, I'd just feel terrifically stupid asking everyone for everything constantly without even trying... Apparently that's not a widely shared feeling?
 
9:38 AM
No, but that makes you ^idiot ... and you learn best by yourself...
 
Sem
Same goes for people who prefer the same thing over and over again for 40 years. While (i guess) most people here prefer variation and challenges in their work. I will never understand.
 
@deceze modprobe kindness; invoke-rc.d answer force-start; stackoverflow.com/a/11774899/1428773
 
@Whisperity Big props for trying!
 
@deceze I just... he basically asked the same question an hour ago, then it got CV'd, so he asks it again. First question I can't paste my code here. Then, in the second one, he pastes something... I give up, I don't know what that is. It's everything but proper code...
@Whisperity I understand NDA and business secrecy but a simple login/password change code does not fall into the terms of can't paste my code here.
 
Why doesn't have a little purple elephant icon?
 
9:54 AM
6
Q: The PHP tag needs a tag icon

Sarfraz AhmedThe icons added to tags make clear which tags a question belongs to. I see that icons have now been added to c#, asp.net, etc. Can we have an icon for php, please?

 
Ah, more fail. I see
I'm going to sponsor ruby and get a flappy penis animgif on it
 
Is it that obvious that I usually just downvote on questions and I usually just upvote on answers, but not crossing that line? :P
 
The markdown syntax is very confusing when it is the first time you use it. It gave me some trouble the first time I posted a question.
I posted yesterday an answer to a SO question, and today the OP adds a comment "I'm not sure your answer would work". But WHY doesn't he just try it?
 
10:07 AM
1
A: Get start and end dates of years quarters

PoulsQYou can get it easly with this : $q1 = array( 'start' => date('Y-m-d', mktime(0, 0, 0, 1, 1, 2012)), 'end' => date('Y-m-d', mktime(0, 0, 0, 3, date('t', mktime(0, 0, 0, 3, 1, 2012)), 2012)) ); $q2 = array( 'start' => date('Y-m-d', mktime(0, 0, 0, 4, 1, 2012)), 'end' =>...

^ The cake. He took it.
 
@hakre: There is a way to dynamically update ob_tidyhandler, but it is not a nice way. I took a look at the extension code, and it reloads the default config before processing. You can set tidy.default_config to a writable file, and modify it, and the ob callback will pick it up.
 
@Leigh Ah okay, that sounds really insightful.
 
@hakre I'll write up an answer with the specifics :)
 
deceze: he wrote it was the "easy" method to get the values
 
I have a problem with the .htaccess file
 
10:09 AM
@Jocelyn link?
 
I want to rewrite profile.php?u=username to u/username
How can I do?
 
@Leigh Ah I thought you had and just wanted to give it a quick upvote :)
 
I got to leave now and wish everybody a nice day today. See you laters.
 
Bye hakre
 
10:10 AM
@hakre later
 
@Rishikesh stackoverflow.com/q/1055281/1428773 and related questions regarding htaccess rewrite and the so called nice urls would be my first step in researching.
 
RewriteRule ^username/index.php$ profile.php?u=username [L]
This may work?
Oh! Nooooooooooooo
What the heck is this?
mod_reqrite is working
 
@Rishikesh If testing rewrite rules (I never really used them before) always private browsing mode!!! Browser tends to cache some of them.
 
@Whisperity: good idea to use private browsing for that. Never had the idea.
 
10:14 AM
404: Not Found

The requested URL /Startoff/u/rishi was not found on this server.
Nope it's not working :(
 
@Rishikesh You will need the folder u/rishi exist in the DocumentRoot.
 
Lunchtime for me. Have fun!
 
But, I don't want it to
Coz I can't create a directory for every user
 
@Jocelyn I was browsing mainly SO and SF searching about how to relocate example.com/foobar to foobar.example.com. I tried one method, it did not work. Tried the next (and roughly ten more), neither of which worked. Then I went into private mode and it turned out that my second try would have been working...
@Rishikesh Then there is something wrong with the rewrite setup.
 
But I tested it and it gave a 500 error
 
11:18 AM
one... more.. rep
 
there ya go
 
array_push(, 'Leigh');
 
:D
use websocket they said, it will be fun, they said
 
until you want to support mobile browsers :D
 
ah no :)
browser handle everything just fine, it's just when I want to impersonate browser via PHP, (socket) server crashes...
needless to say it is my fault, I don't for a fact, blame PHP... it is a tool, it won't do work for you...
 
Sem
11:27 AM
@webarto You want to make a browser in a browser?
 
in a browser
 
Sem
@webarto Why? Do you think browserception is funny?? do you??? What about all the compatiblity issues my websites will have there??? Soo.. many... workarounds...
 
no, I want to make WebSocketMasterProâ„¢ ... I need to connect to websocket server via PHP to push content... I can do this with database and loops, but it not the way it's meant to be played...
browsers connect just fine to websocket server, and I can rape Refresh button... but with PHP I can only connect once, and then server freezes for everyone... I don't have much exp with sockets so... my fault I'm sure...
 
How can I get things from the "stuff I want to work on" list, to the "stuff I'm assigned to work on" list :/
Right now the project I have to work on is for someone who fired their development team and wants us to take over maintenance...
soooo shit
 
not an enviable position... I left my previous company because I haven't worked on something I know and prefer for about 6 months...
 
11:36 AM
hi, is it possible to make cross domain connections to databases?
 
yes, try it ... and you mean cross server / IP
 
two domains on different servers on the internet
 
database doesn't care about domain, show an code example please...
 
@tree Assuming that the database server itself, and the user you want to connect with is configured to accept connection from you.
 
^ and this of course
 
11:38 AM
0
A: mysql connection from a different domain

WhisperityYou will need to set the remote example.com when you call the database connection initialization function. For example: mysqli_connect("example.com", 'username', 'password', 'database name'); But you will need to check whether example.com's MySQL server is set to accept connections from other ...

 
@Whisperity ok so one server is confiurated to not accept diffretent domain connection
so i cant do it
 
@tree The database server (not one server) is needed to accept outside connections in my.cnf or my.ini), and of course the user you want to use. Read the linked answer.
@tree Well then: you either need to make the database server accept your connection or set up a passthrough service inside the database server's accept range, but that service (i.e. the passthrough one) having ability to accept your connections from outside.
And by making I mean configuring it. If rented server, try connecting the helpdesk/config team/administrator.
 
ok thank you
 
Good morning
 
good morning, thanks for fsockopen explanation...
 
Sem
11:43 AM
Good morning sir!
 
@tree stackoverflow.com/questions/11495500/… you can try something like this...
 
Using a framework is definitele what beginners should start with. I've seen many people starting with CakePHP and becoming better, more organized developers so I would definitely vouch for it — José Lorenzo 1 min ago
kill me now
 
@ircmaxell morning
 
no worries, more jobs for you @Lusitanian
 
@JoséLorenzo: I definitely disagree with that statement. Framework Fixation is definitely an anti-pattern. If you can't do it without a framework, you shouldn't be using a framework. You need to understand what it's doing behind the scenes, otherwise you're going to code yourself into a corner... — ircmaxell 1 min ago
 
11:53 AM
wtf the title alone: "CakePHP If…Else statements"
same as the math functions in jquery library type of shit :P
 
hey, don't insult jQuery
 
@Lusitanian: Vote balancing for great justice. - Absolutely nothing wrong with the answer...
 
3 hours ago, by Whisperity
Jul 28 at 20:33, by webarto
needs moar jQuery
 
I heard you like functions, so we put functions, in your functions
needs moar jQuery — webarto 7 secs ago
 
morning everyone
 
11:59 AM
morning
 
anyone tell me why this isnt working?
 
trigger_error('',  E_PEBKAC);
2
 
http://stackoverflow.com/questions/11776895/php-equivalent-to-javascript-functionindex
 
hi @all
 
for($i=date("Y");$i==1900;$i--)
echo "<option value=\"$i\">".$i."</option>";
 
12:02 PM
is anybody knows about magento here?
 
Jon Skeet, Reading, United Kingdom
466k 137 2158 3510
Mother of Reputation.
 
somebody sort out this for loop to countdown from current year:
 
@Chud37 Try for ( $i = date("Y"); $i >= 1900; $i-- ) ?
 
for($i=date("Y");$i==1900;$i--)
echo "<option value=\"$i\">".$i."</option>";
 
366
Q: Jon Skeet Facts

Bill the LizardI'm looking for Chuck Norris Facts style answers. In case anyone is curious, this question was inspired by Jon's own comment to this question. EDIT: If you're into cryptography, you may enjoy these facts. Now with official sanction from the powers that be!

 
12:04 PM
i want to run one php file contains queries of mysql and displaying that data in tables in admin panel of magento
hello
 
@Chud37 think of the second clause as "while", you're saying "Execute while $i==1900", and it doesn't start at 1900, so it doesn't execute.
 
yeah i know
i didnt see that I originally had it at <=1900
 
@Whisperity was 300k "few days ago" O.o
 
@Chud37 Should be >=
 
@Whisperity > Jon Skeet's SO reputation is only as modest as it is because of integer overflow (SQL Server does not have a datatype large enough)
 
12:05 PM
Argh! thanks, brain freeze on FOR loops.
i've been working foreach for far to long
 
:P
bye guys and thank you!
 
@Whisperity > Jon Skeet is the only person who has ranked higher than Jon Skeet in the SO all-time rep league.
2
 
no
 
@Leigh hehe thank you
 
12:07 PM
PHP equivalent to JavaScript function()['index'] [closed]
 
are you retarded?
 
Stop. Spamming. Apparently, there is noone as we would have already replied.
 
Sem
KICK HIM
 
@pardhu you need to use jquery
 
12:09 PM
how?
i can use jquery
 
3 hours ago, by Whisperity
@deceze 1. Repost! (oh look strikes again). 2. The hell is that code. The hell is that question?! Wait... more likely where the hell is that question?
 
for adding php file..
 
aaand it's -20
 
@ircmaxell and there goes your crusade to stop this becoming IRC
 
12:10 PM
No, that went out the door when people were bitching about me trying
 
-21
 
so I said screw it, I'm not going to do anything anymore...
 
waht -21?
 
-22
Morning @ircmaxell
 
i'm laughing at it though, very funny
 
12:12 PM
@pardhu Okay so. First of all, you should ask a question on the main site it might pick up more attention there. Second: apparently there is noone in here who might help you with Magento. At least, I'm speaking for myself, I don't know how to Magento. Sorry.
 
aaaaand it's gone
 
Sem
@Lusitanian I disagree, even though he's bad in english he did give a screenshot. both snippets from PHP and HTML. Wish all questions were like that.
 
fair enough
now this one....effin codeigniter stackoverflow.com/questions/11777205/…
 
vote for aliasing E_USER with E_PEBKAC
 
12:18 PM
@webarto What's gone?
 
-22+ question something
 
Sem
@Lusitanian Not good and not bad. Once again it is a specific question even though badly explained. If it's like "Where can I get a plugin that makes my <div> grow?" it's not SO worthy.
 
I also got -22 reputation today. One of the questions I answered (and edited) got deleted.
 
@Sem I know...I just hate CodeIgniter
 
Sem
Just checking :)
 
12:21 PM
Darn, beaten by @ircmaxell ;)
 
Sem
@deceze Where can I see the epic battle between you two?
 
why do array_map and array_walk have reversed order of params
 
heh, it's PHP ... usually IDE will suggest you order...
 
@Lusitanian array_map takes any number of arrays and applies a function to them, while array_walk takes an array and walks over it.
It sorta makes sense...
If you're drunk enough...
 
12:27 PM
^^
tell me that hitting database every 10s is a bad idea...
 
Hitting the database every 10s is a bad idea. You wouldn't like being hit every 10s, now would you?
 
.git folder is 4.2 MiB big.
 
Depends on the context of course...
 
@deceze no, but I'm getting desperate with these stream_socket ... I can't make it work reliably ... by hitting database I mean checking for new records... but it will be one process, not one per user... one for 50...
 
@PeeHaa Nuuu... there goes my awesome answer :'(
 
@webarto number found in title... needs moar jquery!
 
@Whisperity :D
 
@webarto you didn't even cv it!
 
12:51 PM
Welcome, this site is not for direct advices, but for programming related questions, now, where is your code? — webarto 2 mins ago
> I'm using this type of function, but it doesnt work :S (This was the original message but he edited the comment.)
^ What kind of discussion derailment is that?
 
WAT
 
I had no idea advices was a real word. I thought advice was already plural
 
erm -- you aren't my ide, stackoverflow
 
@Lusitanian I forgot to click Vote :D
@Whisperity I read that comment too, later he added some code... but still... crystal ball is broken :) "doesn't work" is a little vague...
 
@MikeB advice can be either singular or plural: I gave the man some advice. or I gave my sister a piece of advice.
 
12:55 PM
But if the advice contains more than one suggestion it's advices? Doesn't sound right
 
@Whisperity :)
 
@MikeB no, advice is the plural form of advice
advices is also technically valid but rarely used because its redundant
 
So what's advices? The same difference as fish->fishes, geese, moose?
multiple pieces of different types of advice?
off-topic, :\ What's new and exciting in PHP? :)
 
I think the best way to put it is this: the context controls whether or not the word "advice" is p/s.
@MikeB traits, which will come in to use 10 years from now
 
12:58 PM
I've heard mixed reactions about traits
 
what were they?
 

« first day (656 days earlier)      last day (4305 days later) »