« first day (923 days earlier)      last day (4250 days later) » 

10:01
@Jack upvoted to compensate...
@Ihsan Heh thnx.
@TillHelge He wants to append the current H:m to it I think. The word add confuses matters somewhat
@TillHelge Yeah, I thought he just wants to add current time.
I'm assuming he meant local time ... from whatever timezone is configured.
how do you ping someone in here if he left the chat quite some time ago?
Note to myself: delete link was available here one min after close: stackoverflow.com/questions/16232647/… - penalty looks to be triggered by the votes a question has?
10:05
@Ocramius You could reply to an earlier message if you find it in transcript
@DaveRandom heh...
wanted to ping levi about the latest fig thread - someone suggested collections :D
@Ocramius where is that thread? PHP internals?
@DaveRandom I think this is a gang repwhoring... To intimidate the challengers gang downvotes the possible competitors... (Nice complo theory, eh what)
@Ocramius Oh well you can probably just @LeviMorrison then, he's a room owner so I think it will find it's way to him
Or you could just email him, his address is littered throughout the internals list ;-)
@hakre PHP-FIG
gotcha =D
10:08
@Ocramius When I read FIG, I always wonder how someone can create such a FIGing abbrev, sounds so close to PIG. :D
@hakre I honestly don't care anymore. I'm sick of the meta talk in there :P When someone starts some REAL discussion I'm always like wowzers
Well I have to go, thanks for the fish...
@Ihsan did you add me on linkedin?
@Ihsan Next time we give you some cattle.
@Ocramius I have no linkedin profile.
10:10
@Ihsan then it's a random one ;) ok
Hello @Ihsan
@hakre Thanks for the steak then...
Grr WHY??? echo intval('3.581E+8'); // 3
@HamZaDzCyberDeV A very stubborn box
10:13
@HamZaDzCyberDeV merchandise sell-out crap. look for the original on youtube.
Hi @Ihsan do u know magento
@DaveRandom string to integer conversion?
@hakre do u know magento
@NathanSrivi No idea is it a color? magenta
10:14
@NathanSrivi What would it make for a difference if I would or would not?
Indeed it must be a color ...
@DaveRandom striiing... you know better...
Magento Framework ya
hakre your profile picture is almost magenta
@HamZaDzCyberDeV yes
10:15
@hakre Yeh but it should be 358100000. Scientific notation is still a valid integer representation and it's well within bounds. (int) floatval() is so messy :-(
@DaveRandom because of the + maybe?
Ant one working in magento. please help me ....
morning all
@kaᵠ Yoooo !
@NathanSrivi are you looking for way out ?
10:15
@NathanSrivi Drop your question and we'll see if we can answer, hope it isn't a RTM question
@HamZaDzCyberDeV critisizm please (positive) stackoverflow.com/questions/16052230/…
yohop
@HamZaDzCyberDeV no i need to some doubt
@NathanSrivi Sometimes we can answer with 0 experience with a certain framework :p
We0
We0
Hey guys
mysql room is empty
10:17
That is the old problem of PHP not being able to differ between string float numbers and string integer numbers.
It's also a validation question that comes up from time to time on SO.
We0
We0
can some one just take a quick look at my query
SELECT name, birthday
FROM user_facebook_friends
WHERE user_id = 1
AND DATE(bithday, "%Y-%m") BETWEEN DATE_FORMAT("2013-01-01", "%Y-%m") AND DATE_FORMAT(DATE_ADD("2013-01-01", INTERVAL 1 MONTH), "%Y-%m")
ok Thanks bye
Hey @We0, and I'm stuck with phpmyadmiiiin
We0
We0
nvm
i foun it
@We0 which must not mean you can just typehit stuff in here to let us know. Just saying, it sounds a bit harsh.
10:18
@NathanSrivi you're whining for nothing, drop your question or don't ask for help
@HamZaDzCyberDeV thanks... the answer is not ridiculous I hope.
@We0 Yes, we're always glad if our sheer existence does help.
@Ihsan from answers like these I can always learn something of it :D
@kaᵠ Yeh but it's still a float. That's my real issue. It's an int and I want a god damned int!
10:20
@hakre Lol. We say "When you go to the doctor, before getting diagnosed you allready start feeling better".
I mean you could equally just (float) it
lol !!!
@HamZaDzCyberDeV :)
I really have to go... Have a nice time all.
@kaᵠ Yeh but you are still effectively doing (int)(float) in all of those
10:22
bye @Ihsan
better just (int) it and be done with it
@kaᵠ Exactly. But then you get 3
damn
anyway... see where my +0 is nice :D
@DaveRandom yes, but how else? you want to read it as float (3 + 0.xxxx), so how should it be possible w/o float?
@hakre No, I want it just interpreted as an int. Scientific notation is not (necessarily) a float, and in that case it definitely is an int.
+E8 is * pow(10, 8), effectively
10:25
@DaveRandom scientific notation is not mathematically only for floats but PHP thinks so
@DaveRandom Well scientific notation is float in computers, isn't it? Not that PHP could break that rule, but well ;)
look at the last one here: codepad.viper-7.com/58H3m8
I guess. I just don't like it though.
pretty clear when you convert to float by adding zero in scientific notation...
ha
@kaᵠ anything to the power of zero is 1
10:26
12
Q: How to convert string to number in php?

SaraI want to convert these types of values '3', '2.34', '0.234343' etc. to a number. In JavaScript we can use number(), but in php are there any similar method available (general solution)? Input Output '2' 2 '2.34' 2.34 '0.3454545' 0.3454545

lol
looks like these answers are not really complete ;)
I never understood why that is
well... that's not really the case
it mean followed by n zeroes
10:28
@kaᵠ Yes, in practice. But what it really means is * pow(10, $n)
check the most of the comments and my answer here stackoverflow.com/questions/15813490/…
peculiarities by the dozen
So x+Ey is always going to be x
@DaveRandom so we are two. But I accepted it that it is. I even once googled because I was not so sure why. Not that I found a good explanation ;)
@kaᵠ check this codepad, too, for such things: 3v4l.org/82J9O
Ahh, now it makes sense. Consider pow($x, $y) * pow($x, $z) can be rewritten as pow($x, $y + $z). So logically pow($x, $y) / pow($x, $z) == pow($x, $y - $z). Now let $x = 2, $y = 2, $z = 2 gives pow(2, 2) / pow(2, 2) == pow(2, 2 - 2) == pow(2, 0) == 4 / 4 == 1
That might need breaking up into separate lines before it's readable
@hakre yes, nothing changed from 4.3 to current
@DaveRandom what do you actually want to do?
10:41
@kaᵠ stackoverflow.com/questions/16233436/… - although I suspect that the OP doesn't really have a problem and the data is in the DB correctly, he's just inspecting it in a strange way, but it just caused me to try it out.
@kaᵠ and also you can just output plain text. with viper it's HTML and also vipers codes disappear after some time, that one is pretty stable.
@hakre thanx, noted, heard that happens with viper... but 3v4l checks all versions, most of the time you don't need that
others are bundled with advertisements...
^ I took the time to answer and then realized. Please close'n'kill I now remove my answer.
@hakre leave your answer
@kaᵠ why? Just put it away to the dupe question.
10:48
you took the time to write it
anyway.. i'm not in a closing mood now
it is as well not really fitting for the dupe.
Let just die this user dumb
ah no, I put it back in :)
Good Morning ...
k
morning @Baba
@kaᵠ how was your day
10:51
ehh
almost put out my cig in my coffee :P
@kaᵠ Don't smoke, it's bad for you(r coffee).
hi @Baba
lol
@hakre @hakre good morning ... how are you doing today ?
fine, fine.
I even write somehow constructive coments on SO today. So I must be in a better mood :)
10:55
@hakre the date comment is a gem !
needs to be polished properly and put next to the mysql one
@hakre good .. to know ..... what are you working on SO today ?
And I've got some new dishes and glasses for my kitchen. Very fine porcelain.
@Baba Just cleaning up some PHP-5.4 tagged questions and those tagged with XML.
@DaveRandom there you go: codepad.viper-7.com/ySDkXp bitWISE and math and you get a int :D
@kaᵠ oh man this is nifty :)
who reads that... another question, but anyway
10:58
@hakre Good .... well done am reviewing stackoverflow.com/a/16217778/1226894
> My Advice .. at least load the private key from your server ....
but wouldn't that be a great opportunity to leak it?
@hakre that way you can make it unique per user based on the Options sent
@Baba yes but I would also put a secret on the the client side to crypt the request/response as well. Its not perfect either but probably better than doing one side only.
@hakre Good good .. +10
11:04
stackoverflow.com/questions/16228053/… and DV pls so the system sees this is a bad too localized question introducing text for no future use to the site.
@hakre have been thinking how to use public/private key pair to hide secret key that would be used
@Baba yes that would be really good :)
You could identify each install by it's public key.
And then close access for specific users just for the fun :)
@hakre hum mm ..... let me look at the code again
Hello, I was wondering if someone could point me in the direction of a tutorial explaining the basics of maintaining state(I think its called) of variables in PHP
As in when you go to use a function a variable inside of it has remembered its previous increment and doesn't reset itself
I understand it has something to do with 'static' in functions but don't understand it and would like to know more
Yea I read this but I couldn't understand how it works
Can you state public static $i=1 and then inside a function increment it by one
and then when you use the function again it will be 2?
That second article is really good!
Viper 7 down again :-(
Oh no wait it's back
morning all
@DaveRandom That reminds me... when are you going to install it on my server? :)
@PeeHaa埽 Good Morning
mornings @Baba
11:32
@Elisa you also CAN piss on a sidewalk. That does not mean that you should.
@PeeHaa埽 I'm going to have another go at it soon myself actually, I've been waiting for a spare machine with a 64-bit CPU but I will be freeing one up next week
I'm not touching a server on the internet until I've made it work locally though
@DaveRandom kk np. Just ask my credentials if you have it working and can reproduce it :)
@Elisa You probably want a class. static function variables can be a bit too much magic IMO. If you have an object it's much clearer that it has a persistent state
@PeeHaa埽 Don't hold your breath... How far have you got? Have you moved off square one yet?
@DaveRandom Not really. That's why I am pushing you to do it :)
I mean. It's kinda your job right? ;)
:-P
@PeeHaa埽 s/job/fault/
11:45
:D
Good morning
Gooooooooood friday morning mr @ircmaxell
how's it goin?
Everybody's lookin' forward to the weekend
weekend
11:52
Crazy busy and pretty good. Besides the fact that @DaveRandom still didn't install viper7 on my server
ffs youtube.com/watch?v=iXik1NdAVWo ... stop oneboxing damn you
What????
Y U STILL ONEBOX?????
pewresearch.org/quiz/science-knowledge I'm in the top 7 percent, how about you?
@DaveRandom you need to prefix the link as well ;)
> You scored better than 63% of the public, below 25% and the same as 12%.
When does high school end in the US, 18?
11:55
@DaveRandom yes
> You scored better than 93% of the public and the same as 7%.
@DaveRandom Woot! Awesome!
The breakdown at the end is sad
I left school at 17, I guess that skews the result somewhat
only 20% of people knew what gas the atmosphere is made up of
@DaveRandom so did I...
@ircmaxell I'm almost surprised it's that many. It's come up before at pub quizzes and almost everybody gets it wrong
11:57
@DaveRandom thanks Dave. I think I have to rethink how I am doing it though becuase there is a complete disconnection from the function and class after it runs. Static variables don't seem like they will work.
Most people think it's CO2 for some reason
probably global warming
@DaveRandom total fail
Yay, You scored better than 93% of the public and the same as 7%.
nice link btw.
although I don't really agree with the fracking question
Here's a good question from a quiz I went to the other night (no Googling): Only one US state contains none of the letters from "George W. Bush". I listed 43 states before I got to the right one.
11:59
in the sense that it's not a science one
@ircmaxell Yeh I thought that, it's more of a topical news question
@ircmaxell speaking of sience "making up the atmosphere" isn't very precise either.
@DaveRandom I got it
@hakre precise, no. But completely understandable, sure
Your a 'Murican, I'd hope you would get it :-P
You answered 12 of 13 questions correctly. You scored better than 85% of the public, below 7% and the same as 8%.
ha missed one
12:00
@ircmaxell Well in a quiz situation ... it's not always that way :)
Personally I was quite pleased I could list 43 states
i have no idea what fracking is :P didn't google to be fair
@hakre I think it is decently worded. How would you phrase it?
@DaveRandom how many states are there in the US (without looking it up)?
Uby
Uby
present in the atmosphere?
12:02
correct
48 on the mainland + Hawaii and Alaska
+1 canada! ?
In the NL, they teach people that we have 52 for some reason
Those fun questions about the US always have either the answer "Canada" or something close to it :)
Uby
Uby
ahah
12:02
Although Rhode Island is not technically on the mainland
@DaveRandom sure it is. It's not really an island
@ircmaxell Oh really? I thought it was, looking it up on Google maps :-P
@ircmaxell I did understood it and therefore would say, yes, it is decently worded. It did not prevent me from answering it correctly. Even with my limited English.
@ircmaxell It was actually the answer to 2 questions as well, it was a round about George's because it was St. George's day the other day. Can you guess who the other George was that the other question was about? Hint: it was about a dog
@DaveRandom it has some islands in it, but it's definitely on the main land
@hakre right. I get that it could be better, but I don't see how
@DaveRandom Curious...
12:04
@ircmaxell So it is. I think I thought Long Island was Rhode Island :-S
@ircmaxell Me not as well. Just saying. Because your comment about fracking. I think that was as well like with the climate-gas question to have a fit in a certain time-span of the past to find out about.
@DaveRandom lol. That's part of New York
what are the three kinds of radiation?
@ircmaxell I know that :-P
@ircmaxell alpha beta gamma
and they stand for (what is each composed of)?
Alpha is an electron, beta is a helium nucleus and gamma is a ray
alpha beta might be the other way around
12:06
close, but all 3 are wrong
No I'm pretty sure that's right
lol
fail
Alpha is a helium nucleus, Beta is a electron, Gamma is a photon
/me fail
so flip the first two and you're right
user895378
It's like watching two monkeys throw science books at one another.
X-rays, Death-Rays, Poison-Rays ?
user895378
morning :)
12:08
@rdlowrey
@rdlowrey :-P
@rdlowrey Hey! I resemble that remark!
anybody else tried the new ubuntu 13.04?
user895378
hehe
@ircmaxell I did chem/phys to AS level (17) but I've only really taken a curiosity interest in it since then
12:09
@kaᵠ no
@DaveRandom physics is my bag... Love it
user895378
@DaveRandom Real life prevented me from trying my hand at building the win32service extension last night and I'm leaving to go out of town for the weekend in about an hour. I am going to try it for you, though.
user895378
(probably Sunday when I get back)
@rdlowrey np, it's all good
For now I've just wrapped the thing that I need it for with a C# exe
I should really rewrite the whole thing in something more appropriate for the job
user895378
Also, when I emailed Pierre last night he sent me a link where the libevent extension DLLs (among others) could be found. Good luck finding it on the actual windows.php.net page, though.
@Baba why phpclasses?
@ircmaxell It all got a bit too mind-bending mathematically when I was in school, plus I kinda got into, well, basically taking drugs and lost interest in education. I've considered going and actually getting some qualifications just so I can say I've done it but I'd have to pay for it now so meh. In a way it's better this way cos I was doing Phys, Chem, Maths and (bizarrely) German, whereas now I'd probably do physics maths and comp sci
@kaᵠ am not the author
fair...
shower time. Peace
user895378
@ircmaxell later
12:15
I kinda wish I'd done a proper comp-sci course though, my GF did a bunch of stuff with assembler and C, much lower level stuff than I really know very well, but I want to.
@ircmaxell later
@rdlowrey Oh hey, a DLL of the completely useless HTTP extension. Yay.
-2
Q: Need recursive function to print "123454321" string in php

JimitI want recursive function to print string like "123454321" if I will call a function something like printNumbers(5); $G = 0; function printNumber($n) { global $G; if ($G == 0) { $G = $n; } if ($n != 0) { echo ($G - ($n-1)); printNumber(($n-1)); } elseif ($n =...

ZCE
made my day
user895378
@DaveRandom hehe yeah I thought the exact same thing
@zerkms lolz
@Baba interesting... why did you give me the link?
@kaᵠ I know you would like it :)
12:19
@ircmaxell lol
What the hell man, a PECL OAuth extension? Never seen that before
@Baba lol, good for some tests
@kaᵠ Sure ....
user895378
Is anyone aware of any FCGI client implementations written in PHP besides github.com/adoy/PHP-FastCGI-Client ?
user895378
Just wondering ... I'm going to try my hand at updating that to work with non-blocking servers.
user895378
12:25
> You answered 12 of 13 questions correctly.
@rdlowrey Start from scratch man. It's not exactly complicated
user895378
Yeah I just wondered if there were any others to look at. I like to do my research before jumping in :)
@rdlowrey that's the only halfway decent one I'm aware of. would be very interested in a non-blocking one as well.
user895378
Hmm ... I always thought "fracking" dealt with coal. Who knew it was natural gas.
@Jimbo Probably knows all about fracking. It's been causing some minor earthquakes in his general vicinity
12:28
yea.. it's not rocket science :P
Poll: In a search form, when a text field has focus and you press enter, what should happen? a) Give the next tab index element focus or b) Submit the form
@DaveRandom submit
user895378
submit
This is a Windows form rather than a web form, if that make a difference
@ShyamK Hey hey, not seen you around for a while
I would also expect submit
12:38
That's 3 for 3, many thanks.
Prediction: today's going to suck
Just had to demonstrate to a colleague that he was being a bell end
@DaveRandom ya... was trying to get some fresh air... apparently I don't like the fresh air
@ShyamK My experience of Indian fresh air was that it is not as fresh as one might like. Although I was almost exclusively in cities.
@DaveRandom pollution... its ruining the pretty things the world has to offer... but the sub-urban or rural areas are a lot better off... for now...
Where have you been?
12:43
@ircmaxell I think this was hard to predict: it's raining seas here...
@ircmaxell But, but, how can that be? It's friday!
Well, I'm still sore as hell from yesterday
user895378
Hmmm ... Does FastCGI not support chunked request entity bodies?
user895378
> Next the Responder application receives CGI/1.1 stdin data from the Web server over FCGI_STDIN. The application receives at most CONTENT_LENGTH bytes from this stream before receiving the end-of-stream indication. (The application receives less than CONTENT_LENGTH bytes only if the HTTP client fails to provide them, e.g. because the client crashed.)
user895378
That sounds like you must provide a Content-Length?
12:44
@NikiC Look outside. The weather must have confused Friday with Thursday...
@bwoebi We have good weather around here :)
@NikiC Where are you now?
Raining like crazy right now.
@bwoebi Berlin
@rdlowrey it may not be a HTTP content length
12:46
@NikiC I can roughly confirm that...beautiful weather over here as well...although I don't see any of it, because the only window is behind me.
@NikiC A few hundred kilometers from Luxemburg...
Alright, I'm off to work... Take it easy
@bwoebi You are in Luxemburg?
user895378
@ircmaxell Maybe not but you have to have a length, so if your server is receiving a chunked entity body you can't pass it to the FCGI until the full entity is received and the server knows how long it is.
Definitely a problem with working in the IT world...you miss out on a lot of nice weather.
user895378
12:47
So you can't stream the (chunked) entity body from the HTTP server to the FCGI server as it arrives ...
@rdlowrey doesn't make sense, but perhaps will look into it when I get to the office
When will there finally be a solution to work on a computer outside in the sun? ;)
Hello Room
user895378
Google seems to indicate lots of "bug reports" for people accessing chunked entity bodies in FCGI. In particular ... bugs.php.net/bug.php?id=51191
@ShyamK Calcutta, Mumbai and Jaipur, and a few random places in between. It was quite a few years ago and I was stoned for a lot of it. I would quite like to go back and do some stuff that I actually remember...
12:48
Matasano Crypto Challenges: matasano.com/articles/crypto-challenges
@rdlowrey echo strlen(fopen('php://input','r')); ?? I'm not trusting that guy's bug report any further than I can throw it...
user895378
@DaveRandom lol I know that doesn't make sense but there are others.
@NikiC Yep. Since I was born...
@rdlowrey hmm, FCGI seems vague on the subject, CGI seems to require the length because the request can be suffixed by extension data. :-/
I mean clearly the fopen() did fail, but that's a pretty weird way to come to that conclusion
Also chunked encoding for a PUT doesn't make loads of sense although I suppose there's no reason you couldn't do it
user895378
12:51
I mean, it's extremely rare that people send requests with chunked encoding because if you're sending a file you already know the content length.
@bwoebi exotic :)
user895378
It's not that difficult to just wait for the entire body to arrive if chunked before passing it along to the FCGI server ... it's just slower than it otherwise should be.
user895378
That does seem like an FCGI fail, though.
quite the fail indeed :-/
@DaveRandom I demand you buy ze zoot: mentalsuits.co.uk/suits/mr-jack.html
12:54
Those crypto challenges are really cool, I'd recommend anyone who has a bit of time (okay, a lot of time) to try them out. Really insightful. Makes you realize just how much you can do wrong when writing security systems (and that thanks to that breaking them is usually quite simple)
@rdlowrey according to this, lighty does support chunked fcgi: redmine.lighttpd.net/boards/2/topics/1668
@Gordon I shall. And I shall wear it only when in foreign countries. I don't want people thinking I'm one of them stinkin' foreigners.
user895378
> Lighttpd buffers the entire response, so that's not supported.
user895378
^ Is that true?
user895378
If so, that's also a fail.
12:55
Does someone know why mysqli_stmt::bind_param expects his parameters by ref!?
user895378
How are you going to serve large files with any sort of high load/concurrency if the server is buffering the full body of the response?
@DaveRandom let it be noted, than I am full of envy because you can wear such an awesome patriotic zoot
This function shouldn't change anything on the parameters, so why are they referenced?
@Gordon Yeh, I mean if you did it you might get people thinking you were Belgian. The Horror!
I would clearly need one of those Union Jack fluffy top hats as well though
@DaveRandom yes. I am tempted to request british citizenship just to wear it
12:57
Although technically it would only be a Union Jack if I were on a boat
speaking of the Union Jack …
@Jack are you in a union?
that feeling... when you want to strangle a co-worker
@Ocramius ask @tereško about it
@tereško how do you deal with a guy that handles application workflow with exceptions everywhere?
it's basically s/if/try
12:59
@DaveRandom links onebox only if alone in the message with the possible exception of reply-ing this style: ':9079123'

« first day (923 days earlier)      last day (4250 days later) »