« first day (1140 days earlier)      last day (4033 days later) » 

00:01
Scratch that, it shows up as an HTTP 302 in my server access log
@DragonLord That’s not a valid Location header.
00:17
Do we really need a tag ?
@DragonLord: header('Location') will always result in redirect status codes (30x). That's what it's thought for.
@Fabien Sure - if I didn't want people to see it I wouldn't have published it on the intahwebz.
@toscho we could then say the same for
of course
@toscho which means a lot of work and not worth it. There's more important things to do. Well that's my opinion ...
00:22
@DanLugg @Jimbo - amagad, install the cheats already - cookieclicker.wikia.com/wiki/Cookie_Monster_(JavaScript_Add-on) . The whole game is meant to be ironic, so cheating is 'allowed'.
00:34
@DragonLord: I didn't follow the whole discussion, so maybe I'm missing the point, but wouldn't "send HTTP 500 header, echo page content, exit" be enough to solve this issue?
00:55
That doesn't work. The page already has some content in it by the time the shutdown function runs, and the error page itself contains PHP code.
Hey guys, does anyone know the proper way to compare an array of strings (I think that's what they call them) to a string of text and see if the string of text contains any of those arrays?
Does it need the be an exact match of the strings in the array. Or do you also want partial matches? @UncleNerdicus
kba
kba
Uncle, your terminology is a bit off. An array holds a number of strings (or any other object).
I am actually trying to create a PHP script that searches a browser's User Agent and see's if it has words like "Mini" and "Mobile" in it, and if so set a variable based on that.
@kba Nice to see you here. :) You probably think I'm crazy. lol
01:07
@UncleNerdicus In that case you need some loop
kba
kba
You do seem a littel confused, indeed.
kba
kba
Before your foreach loop in your question, what does $needle look like?
I assume you have some keywords in $needle and you want to check if any of them are present in your string $haystack. Is that right?
$thearray = array ('Mobile'.'Mini',); Or at least something along those lines.
kba
kba
Could you be more specific? The problem seems to be that $needle isn't an array of strings as you think it is.
01:10
hmm, preg_grep() could also work
kba
kba
preg_match("/Mobile|Android|BlackBerry|iPhone|Windows Phone/", $_SERVER['HTTP_USER_AGENT']) could work, at least.
That should return true if either of the words Mobile, Android, ... are in $_SERVER['HTTP_USER_AGENT'].
That might be what you're trying to accomplish.
@kba That sounds like it will work! Let me try it out and let you know. :)
given you have a "short" list of terms
kba
kba
Okay. Also, you have a glaring architetural problem with your current foreach. Even though you might not need it after all, it's good to keep in mind so you don't make the same mistake in the future.
Assuming what you're trying to do is check if it matches one of the mobile ids you have in an array, it will always set the result to the last match. You don't want that. In that case, you might as well just use strstr on the last element of the list and be done.
Can you go into a little more detail on that @kba ?
kba
kba
01:15
What you instead want to do is to break out of the foreach loop should you find a match. E.g.
user895378
@reikyoushin I wouldn't call myself the ssl/tls person. There are several people here who are far more knowledgeable on the topic of cryptography than myself. I've just spent a fair amount of time dealing specifically with details of the protocol.
kba
kba
$clientview = "desktop";
foreach ( $needle as $needle ) {
    if (strstr($haystack,$needle)) {
        $clientview = "mobile";
        break;
    }
}
$needle as $needle?
kba
kba
That is his current code and it is bad practice which has already been discussed.
But yeah, that should be something along the lines of foreach ( $mobile_identifiers as $mobile_identifier) { ... }.
Good to know.. Am still putting together the prey_match code to see if it works.
kba
kba
01:19
You would get the same result with:
wtf default configuration of the serial to tcp proxy converts #10 to nil
kba
kba
function is_mobile() {
  $mobile_identifiers = array("Mobile","Android","BlackBerry","iPhone","Windows Phone");
  foreach ( $mobile_identifiers as $mobile_identifier ) {
      if (strstr($_SERVER['HTTP_USER_AGENT'],$mobile_identifier))
        return true;
  }
  return false;
}
1h debugging of the binary protocol
@kba That works perfectly! Thank you@
* !
kba
kba
Happy to hear. I'll post the result in the question and link to this chat. :)
01:26
@kba wouldn’t stripos() be faster?
kba
kba
You might want to restate the question for future reference or delete it alltogether.
Sounds good. :)
kba
kba
@toscho Actually, you're right. I'll update the code in the answer.
@kba I am going to leave the chat for the moment, but I will defiantly post the answer that worked for me. Thanks for all the help, again. :)
kba
kba
You're welcome and bye. :)
01:38
Well this can't be good :(
Error: Package: gd-last-2.1.0-1.el6.remi.x86_64 (@remi-test)
           Requires: libvpx.so.0()(64bit)
           Removing: libvpx-0.9.0-8.el6_0.x86_64 (@base)
               libvpx.so.0()(64bit)
           Updated By: libvpx-1.2.0-2.el6.art.x86_64 (atomic)
               Not found
Error: Package: php-gd-5.5.1-1.el6.remi.x86_64 (@remi-test)
           Requires: libvpx.so.0()(64bit)
           Removing: libvpx-0.9.0-8.el6_0.x86_64 (@base)
               libvpx.so.0()(64bit)
           Updated By: libvpx-1.2.0-2.el6.art.x86_64 (atomic)
@PeeHaa Nice :)
Your package manager is really smart.
I can't find the new shit, but let me uninstall that old shit.
Neh yum is totally rockstar awesome. I'm just stupid and I totally blame remi
:P
Somehow I have a better feeling with php 5.4 than 5.5 ... I wonder why.
Yeah, but I need it for opcache. It was working, but then I "tweaked" the thing
And by "tweaked" you mean "f0rked it upz"
hehe
01:51
yes
Oh right, the kernel versions their unstable releases with an odd number :)
Good evening
Evening @ircmaxell
:-)
mining
progress report? :)
01:52
Yay we're back in business with even more awesome requestable.pieterhordijk.com/UEaj
.05 BTC today (12 hours)
so 0.1 BTC per day. That's $100 per day at current exchange rate. Using about $10 power. So :-)
Yeah, still worth it hehe
Does the installation manual tell you that it's recommended to use your neighbour's electrical outlet?
Better yet, bring that thing to Starbucks and wait for it to mine enough to buy coffee :)
@PeeHaa Nice, I might need that later to do some personal h4x0ring =D
user895378
@PeeHaa nifty! Lemme know if there's a killer feature you need that I can build into artax to convince you to switch :)
user895378
@PeeHaa Oh, you may want to add in the default custom method textbox that HTTP methods are case-sensitive ... most people don't realize that.
I see it doesn't parse the headers correctly for displaying it, but meh. Good enough for now. Fixed dependency hell, fixed opcachegui and push some shit. I call this a job well done
@rdlowrey Should I just uppercase that shit?
user895378
01:59
@PeeHaa Probably. If anyone creates a service utilizing method names with lower case letters they deserve what they get.
get / http/1.0 :)
That means ... quietly get the document.
user895378
Oh yeah, where's the option to send an HTTP/1.0 request? (not a big deal, just trying to help)
Jay
Jay
hey guyd
private function __clone()
    {

    }
Do I just put that in the clas to stop it from being cloned?
@rdlowrey Will add it to the list
@rdlowrey Nope much appreciated. I have been wanting to do some shit with it for some time and I am open to all suggestions
And yeah Artax is also on that list :)
02:06
@PeeHaa Project got worse lol
Yeah it's damn funny to get an email from an automated system telling you you and your project suck
:D
haha
excuse me i have an exam in 2 hours... the only thing i am stuck at is building a b+ tree from a set of given numbers of order n .. like {2,3,5,7,11,19,29,31} order 3 . i know B tree s.. but can someone please explain or give me some links to understand B+ trees
I'd rather explain that 5 minutes before :)
ok
no no..
02:14
Seriously though, you only realize now that you should know something about B+ trees? Whatever those are :)
actually i could find it n the Cormen's book...
wat is that i hve to know about B+ trees .. @Jack
i know.. there can be d to 2*d keys at each nodes and d+1 and 2*(d+1) child pointers
I think B+ trees should be read as "Be Positive" trees.
I need to figure out how to make it quieter... it's loud as sin
i think B-ing + depends on the situation ...
user895378
@PeeHaa I'll fork it and use Artax sometime in the next few days for fun
02:23
awesome
kba
kba
@ircmaxell What are you mining on?
and what's your mhps?
Butterfly labs 50gh/s ASIC
kba
kba
I see
what is the difference between the b-tree and b+tree i mean while drawing it sequential are the steps same for both of'em
02:40
what do you do with a 64MB vps with 10gb space? o.O? is this for gaming?
load it with dirty videos
noight room
user895378
@PeeHaa laters
kba
kba
03:11
@reikyoushin Most stuff you'd do other places, basic webhosting, mail server, irssi, etc.
03:22
final thought for the day ...
#php: phpdbg gets remote debugging :D http://t.co/Un8EZut6Yw
nite boys :)
03:41
@reikyoushin 64MB?? My phone has 2GB =oP
With 64MB you can run two PHP workers of 20MB each haha
Loading it with dirty videos may be the only good thing you can do with it :)
04:30
Hmm, should array_key_exists() work on ArrayAccess I wonder :)
vs7
vs7
04:57
hi morning
0
Q: Facebook Like Button Disabled when requested from AJAX

vs7I'm creating a infinite scroll on home page ... and every post have fb share and like button everything is working good but the only problem is not getting the FB like Button on new post(Coming through AJAX) ... <div class="fb-like" data-href="<?php echo get_permalink($page["ID"]); ?>" data-wi...

i'm trying to fix it from the last day but unable to do so ...
0
Q: Remove Truncation For Pinned Chat Messages

cryptic ツCurrently when you star a message in chat it appears to the right, but if the message is more than 150 printable characters the message is truncated at that limit and has an ellipsis appended to it. However, the same truncation is applied to a pinned message. A pinned message is only pinnable by...

They've already given us 10 chars more than Twitter, what more can we ask of them? heh
lol, but we need moar!
m59
m59
05:14
Happy Thanksgiving!
kill all the turkey
yay, let's celebrate a day used to mask the atrocities committed against the native Americans.
hahhhahaa
(y)
m59
m59
At least it isn't Columbus Day
which is every bit as offensive as Hitler Day
I'm glad I'm not the only one who thinks that
05:20
Poor Columbus heh
m59
m59
LOL. For such a horrifying story, the writer still manages to make it hilarious.
"Christopher Columbus was awful. He discovered the New World much like a meteorite discovered the dinosaurs."
Meteorite Day - day to celebrate the death of the dinosaurs and the rise of mammals.
m59
m59
Heck yeah, screw dinosaurs, man.
05:42
0
Q: class method with begin transaction and return errors

samithaI was create a method which useful for me to execute multiple queries.This is working perfect.I need to know is this good way to handle ? public function foo($rQuery) { try { $this->done->beginTransaction(); foreach($rQuery as $val){ $rSql = $this-

Can someone explain me What is Template Engine
whats the role of Template engine in programming?
06:16
Morning
@tereško do you reviewing code @codeReview ?
m59
m59
suggesting md5 for password hashing
0
A: Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number

shuvoDon't use MySQL's PASSWORD() function. PASSWORD() is intended only for MySQL's own use, not for developers creating passwords within their applications. md5() or sha1() work essentially the same way and more secure. MySQL's PASSWORD() md5() sha1() You can follow this Insert password hash usin...

should I downvote?
probably, but also "close-vote as duplicate"
06:33
Friday morning.
hmm ... @m59, congrats on gaining ability to close questions
m59
m59
@tereško thanks =D
Just 1 rep over haha
hi can any body help me for how to get latitude and longitude from enter any keyword
People spend hours in waiting someone to debug their code on SO instead of reading error message and find bug in few minutes. sigh.
However, good for me. I'll be able to find job easily.
06:41
well ... we will see how that works out, since i'm going for an interview on 14:00 UTC
Good luck!
What position? Project manager or developer?
developer
m59
m59
One day, perhaps I'll learn to leave such pro comments.
You have to fetch your self at least one tutorial on PDO prepared statements and learn it through, running all the examples from there. You are supposed to learn basic syntax first, not by means of asking questions like "I just put together some random operators, what is wrong with them?" — Your Common Sense 1 min ago
^ I kinda agree with that comment
m59
m59
heck yeah
06:46
Well, I always disagree comments that contain learn from tutorial. From my personal experience it's not how it works.
you just have been exposed to bad tutorials
^ Exactly! and that's why I disagree.
When you are complete newbie, you can't differentiate between good and bad.
I've learnt more in one year from docs/books than in 2 and half years from tutorials. And now I do read tutorials but I can say if it's good or not.
had to share ..
Anyone know of a better way to output the distro codename? For instance under Debian this will output squeeze str=($(lsb_release -c));echo ${str[1]}
maybe "uname -a" , but AFAIK, getting the full name of the NIX kinda depends on which NIX you are using
06:51
it will not show distro name
that's the shortest and simplest I can come up with, but really hate having to make that temp var just to get the value. I tried combining it but it breaks when because of the index.
@tereško As far as I remember uname -a displays kernel version or name.
in freebsd it show the full description:
> FreeBSD sigillum.localdomain 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #1 r255453: Tue Sep 10 22:31:20 UTC 2013 [email protected]:/usr/obj/usr/src/sys/SIGILLUM amd64
.. I also should upgrade the kernel
well, Debian squeeze is not FreeBSD :p
@crypticツ $release = shell_exec('cat /etc/*-release'); ?
but on the other hand, there will be many rows..
@AlmaDo already tried that, it is the same thing essentially as lsb_release -a
I used -c to get codename so it's 'Codename: squeeze'
06:56
@AlmaDo not every linux is a debian
so I basically interpret that line as an array, and then get 2nd value.
@tereško yes, of course, but if we're talking about debian - then it's linux, not FreeBSD
you probably will want to have several "strategies" for getting the distro name and try each one till you get a result
Off to my click and go world, i.e. Windows. Later.
This is for a bash script for server in office, so needs to just be debian based.
07:01
@crypticツ then $result = shell_exec("cat /etc/*-release | grep -E '^NAME' | sed 's/NAME=//g'");
oops, quotes :p
how is that any simpler than str=($(lsb_release -c));echo ${str[1]}? =oP
it's not simpler, but it will not use temp variable
echo $(lsb_release -c) | awk '{ print $NF }' works
@crypticツ and, btw, create bash-script with this content, then put it somewhere within which - reachable and be happy :p Like this:
user@host:~$ which lr
/usr/bin/lr
user@host:~$ cat /usr/bin/lr
#!/bin/bash
cat /etc/*-release | grep -E "^NAME" | sed 's/NAME=//g'
user@host:~$ lr
Slackware
so just shell_exec('lr');
@crypticツ I have no lsb_release in my distro.. but in any distro /etc/*-release should present
m59
m59
night all!
@AlmaDo only need it for Debian based, but also I can do this . /etc/*-release or source /etc/*-release as the file contents is in bash var=value format.
looks simpler via dot
yeah, both the same thing, just aliases
@crypticツ I know. btw in complex commands that dot may confuse - so may be direct source will be more readable
07:16
yeah I use source as it's more legible
good mornings
mysqldump -u root -p --where="SM_ID=333333333v" esoftcar_col-b student_master says
333333333v column not fount
i refer above doc
I wonder, whether there is any connection between this and a song from Perfect Circle
07:38
Wait! I can post two answers to one question on SO.
:s That's absurd
Of course you can.
You probably shouldn't, but they don't prohibit it.
In fact, it can sometimes happens naturally if a mod merges two questions.
That's bad
one answer should do
if need be the old answer should be updated instead of posting another one
But obviously that's not something SO will do for you.
@NikiC Well… actually working on phpdbg^^
good morning everyone.
07:51
good morning every one
oh ... goodreads .. site that just keeps on giving.
decided to look up that Lovecraft story on it. One of the first review - 1 star. While same user rated Twilight with 4 stars.
08:07
Figures.
@tereško Which story?
That's a nice story.
Have you read CA Smith?
naah .. my exposure to "grown-up literature" has been really limited
Lovecraft, Clark Ashton Smith and Derleth were some of the best horror writers
08:26
hi
i have problem related yii framework
any one does know yii framework here?
do you have a specific question or are you just running a survey ?
i have problem
my question is when i am updating user data from at that it's updating my password field also but i haven't defined password in update form
are you trying to say that your user profile page is changing the user's password even if it has not been entered ?
yes
(also, why is it that schools in India do not teach people how to form a question in english ?!?)
@Kalpit are you using something like CActiveRecord for iteracting with DB ?
08:36
@tereško They do teach English, but lack of practice makes it iffy for a lot of us.
@AshwinMukhija is India too suffering from isolation in cyberspace ? Kinda like Russia, Germany and Japan, when most of people do not venture outside the part of internet, which is in their native language.
@tereško Pretty much. India is going to be the largest consumer of Facebook in a year or so, and it's a closed community.
that kinda sucks
@tereško I've seen onsite devs from India who cannot talk in proper English to save their life.
I honestly cannot even comprehend it
here it is actually mandatory for a person to know english in order to get a bachelor's degree in IT
08:52
Hmm true, I've had to do at least one presentation in English :)
Mornings
morning, @DaveRandom @Jack @AshwinMukhija
ola @DaveRandom I've only jotted down on paper what my parser will look like :)
When I'm done with it, I'm hoping to have only macros left.
@Jack Yeh I looked at it for about 5 mins last night before I fell asleep due to the fact that I am softcore. I concluded that there should be no issues with changing the values of the PHP_URL_* constants, although I still doubt that idea would get a warm reception.
There are a few places where I wish that could be done actually, the LOCK_* constants are needlessly difficult to use for that reason as well
semi-related: /me wants enums in PHP
I guess @Kalpit did not need the answer, since he/she could not confirm that he/she is using some derivative of CActiveRecord ... oh well
09:07
Hurray, 5.5.7RC1 :)
@Jack Not interesting
The micro releases are not interesting at all^^
Morning @AlmaDo
Celebrate the small things in life, with beer.
@PeeHaa I'll have work holidays :\
What holidays? :|
:P
09:17
1 message moved to spam
@bwoebi Y U NO LIKE FRIDAYS?!?!?!?!?
good moanings
hi, @salathe
09:22
Wow 500 rep bounty for this answer meta.stackoverflow.com/a/120861/204512
@salathe moaning!
@crypticツ good lord.. well, at least it's not pony on picture :p
@DaveRandom It was too spammy!
@bwoebi it was ok for @PeeHaa :p
haha
09:36
@bwoebi you just deleted a cultural message
lol
Morning
hi, @Fabien
09:54
Hmm, is <table> not allowed as a direct descendant of <body>?
@Jack what makes you think it's not?
PhpStorm complains about it ... not sure why.
Cut & Paste ... now the error is gone =S

« first day (1140 days earlier)      last day (4033 days later) »