« first day (1184 days earlier)      last day (3990 days later) » 

00:08
uaaaaaaargh… why the hell is struct _zend_mm_heap not defined in the header file :x
@bwoebi @reikyoushin I join with you in pain.
@PeeHaa wuuutttt? so i could just do $storage = $fb->getStorage(); then var_dump($storage->hasAccessToken('Facebook'));??
@reikyoushin you use Lusitanian's package?
@MaciejCzyżewski yip..
oh lord, how did I wind up in this conversation again
00:15
@reikyoushin Or even var_dump($_SESSION); ;)
@PeeHaa hmm.. well, yeah.. but what's the sense of the storage wrapper if i do that? :P
@reikyoushin No logic.
@reikyoushin ;)
@PeeHaa so that would be $_SESSION['lusitanian_oauth_token']['Facebook'] then..
IIRC it uses the fully qualified name. Might be wrong about that one though. It has been a while I had to touch that code
00:24
@PeeHaa fully qualified name means?
If it doesn't it should. Because a service could use both v1 and v2 oauth
Fully\Qualified\Name\Facebook
So the session probably looks like:
@PeeHaa because var_dump($_SESSION); produces that one.. which contains a serialized array..
hmmmm odd. Maybe I @lusitanian screwed up
tnx @MaciejCzyżewski
@PeeHaa something like this.. pastebin.com/J7UJ4y6p
the serialized array is f'd up, i can't paste the whole string, i dunno why..
but you would see the structure..
I expected that to contain OAuthOAuth2ServiceFacebook as key instead
00:30
@reikyoushin I will try to repair this to simple case.
@PeeHaa Yes, but it is more clearly and transparently. (always better define what we're dealing). Maybe someone work with out composer and only use logic.
@MaciejCzyżewski Yeah, but the composer docs clearly state that it is recommended to omit it
@reikyoushin It is serialized
Just didn't expect the plain facebook key
@PeeHaa It makes no difference. Only plugins connected to packegist read this field.
00:38
So why add it?
@PeeHaa for sure.
@JoeWatkins github.com/krakjoe/phpdbg/compare/… I needed to use use_zend_alloc anyway (for watching when elements are freed)… so we are using VirtualAlloc() on Windows anyway. The only thing I now need you to do is fiddling around with VirtualProtect(). And try if it works. Shouldn't be too hard I hope…
(And I really doubt that zend_alloc.* were ever designed to be used from another code which isn't in /main or /Zend^^)
btw. the watchpoints thing is getting confusing (just the phpdbg_watch.c … It needs some cleanup later…)
@webarto Did you add those flash notifications on php.net?
Or can I just blame @levim?
@PeeHaa Initially, but not anything after initially :) What's up?
@NikiC building php from master… getting some linker error:
Undefined symbols for architecture x86_64:
  "_zend_is_by_ref_func_arg_fetch", referenced from:
      _ZEND_FETCH_FUNC_ARG_SPEC_CONST_CONST_HANDLER in zend_execute.o
      _ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER in zend_execute.o
      _ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER in zend_execute.o
      _ZEND_FETCH_FUNC_ARG_SPEC_TMP_CONST_HANDLER in zend_execute.o
      _ZEND_FETCH_FUNC_ARG_SPEC_TMP_VAR_HANDLER in zend_execute.o
      _ZEND_FETCH_FUNC_ARG_SPEC_TMP_UNUSED_HANDLER in zend_execute.o
(it's a completely fresh clone)
00:51
@PeeHaa define flashy notifications? XP
@webarto hmmmmm. The question is: who can I ping to fix the underline on hover and to add a dismiss button
@PeeHaa WAT DID YOU DO
@PeeHaa Levi has a thing for underlines :)
Oooooooh god @Lusitanian arrived :)
00:53
:D
Ooo @Lusitanian!
@reikyoushin The new release thing on php.net that you cannot get rid of :)
@levi your underlines suck!
:P
@MaciejCzyżewski hola
@Lusitanian haha..
@Lusitanian BTW my sincere condolences for the loss of your great leader :D
00:55
anyone know how to get the devs' attention regarding this?
@PeeHaa haha forward to @MadaraUchiha
:D
@reikyoushin I can put a bounty on, but I would rather they first fix their ssl :P
@PeeHaa was talkin with TimPost regarding that one.. but i dont think he told the devs or has any update..
lol btw @reikyoushin I asked the same question two months ago and it was closed against the dupe :P
@PeeHaa well, Tim reopened it for me ^_^
00:57
Good guy tim
@PeeHaa yeah. ;)
div.style.color = "#" + ("xxxxxx".split('').map(function() { return "0123456789abcdef".split('')[Math.floor(Math.random() * 16)]; }).join(''));
@NikiC okay… the issue was just a missing static keyword: fixed it in git.php.net/…
@ircmaxell nice.
Oddly enough Array(6).map(function() {... does nothing on chrome...
01:03
There is the kitten :)
@ircmaxell yey. But it's PHP room, not JS.
@PeeHaa I knew someone would abuse these notifications with them there.
@PeeHaa is it possible that fb won't return an email (given i asked for it in the scopes)?
I hate them.
@PeeHaa and a dog too.. XP
01:04
@MaciejCzyżewski I think I, of all people, should understand that :-P
@reikyoushin u must ask for privileges
@ircmaxell right :-^^
@reikyoushin You should be able to get the email when you added the correct scopes and you ask for the mail
@PeeHaa and all the emails will always be 'verified emails' right?
@reikyoushin I'm not sure whether the email address will always be validated. It's been a while since I had to create my test account
@PeeHaa @reikyoushin on Facebook? Always.
01:11
@LeviMorrison Who is abusing them?
@MaciejCzyżewski so i don't need to revalidate them anymore?
@reikyoushin definitively no.
@rdlowrey Ah, so they did lean towards "fucked". How depressingly predictable.
In computer programming, code smell is any symptom in the source code of a program that possibly indicates a deeper problem. Code smells are usually not bugs—they are not technically incorrect and don't currently prevent the program from functioning. Instead, they indicate weaknesses in design that may be slowing down development or increasing the risk of bugs or failures in the future. Often the deeper problem hinted by a code smell can be uncovered when the code is subjected to a short feedback cycle where it is refactored in small, controlled steps, and the resulting design is examined...
How do you deal with the lack of return-type constraints in interface design? Do you just doc and hope consumers aren't illiterate?
01:16
Yes
@reikyoushin The same situation in your code?
@MaciejCzyżewski huh?
...
-1
A: password_hash, password_verify, MySQL misunderstanding?

JakeGouldHave you attempted to change the single quotes like ': $getuser = $connection->prepare('SELECT `username`, `password` FROM `users` WHERE `username` = ? AND `password` = ?'); $getuser->bind_param('ss', $username, $hashedpassword); To double quotes like " $getuser = $connection->prepare("SELECT...

01:28
I know it was a 2-part question, but I had to.
Yes I add a docblock return
And yes if some comsumer fucks up (s)he will find out the hard way
;)
I know there aren't any options per se, I was just wondering if anyone tried waving a black magic wand into a solution.
I was thinking about type-hinted reference arguments...
@DanLugg Is switching language a solution? :P
lol, it's becoming one.
I'm actually passively working on a language; once I have a v0.1 parser and environment API, I'm gonna hub it. It won't be production friendly, but it'll be a good spec-development framework, against which a more optimized language could be developed.
function &f() { return null; } shouldn't throw a fucking notice.
Somebody thought it was nice to upvote it for some reason
Ah it's that jake idiot
01:39
Hi
GODDAMNIT WHAT AN IDIOT aaaaargh
Mechanize is printing these form names, but I'm unable to get which of these are form names
Form name: appForm
<appForm POST kuexams.org/results/… application/x-www-form-urlencoded
<TextControl(htno=)>
<TextControl(entered_captcha=Enter the verification code)>
<IgnoreControl(<None>=<None>)>
<IgnoreControl(print=<None>)>>
@jgabriel Hi :)
;)
oh
i didn't knew about password_hash. Seems to be a nice function ( still using PHP 5.3/5.4 )
@jgabriel github.com/ircmaxell/password_compat <-- same thing for 5.3.7+ and thank @ircmaxell for being a nice guy
2
01:42
Yes, i saw that git :)
:-)
But i'll rather use it when i deploy PHP 5.5 on a dropplet on D.O
@PeeHaa Can you help me recognise 2 form names in my above code
I'm intending to do it in some months. Intending to try the Ghost blog
@Ufoguy What is that output?
01:43
Form name: appForm
<appForm POST kuexams.org/results/… application/x-www-form-urlencoded
<TextControl(htno=)>
<TextControl(entered_captcha=Enter the verification code)>
<IgnoreControl(<None>=<None>)>
<IgnoreControl(print=<None>)>>
Anyway, has anyone here used Ghost (node.js based blogging platform) ?
Mechanize prints this when I ask it to print available forms
I have no idea what "Machanize" is neither do I know what kind of output that is
@jgabriel I think I have heard somebody talk about that in here but not sure
Might have been @fab
Isn't mechanize Ruby, @ufoguy ?
Python
01:45
@Peehaa It seems a good, fast and simple blogging platform. It will be interesting ;p
hi @ircmaxell your script/extension seems nice ;)
lulz :)
01:47
Can I know form names by looking at a web page in a Browser?
Or the source if necessary?
At times it is just soooo tempting to go through a user's profile on a timed downvoting spree
@PeeHaa for someone who seems hellbent on chiding others, at no point have you provided a solid answer or solution. — JakeGould 3 mins ago
@ircmaxell lol
:-)
out for beer, laterz
Later!
Oh
@ircmaxell later
01:56
could anyone indicate a php class to calculate volume of a box in a way that i can add many boxes to it and it will fit them in the best possible way ?
What's are good names to distinguish between a "get" and a "set if not then get" behavior?
Else i'll have to code one from scratch to use within my still-in-dev ecommerce
@danlugg ::get() and ::setOrGet() ? :p
StackOverflow formatation does not works here ?
I put those codes into backlashes but it doesn't work :P
@danlugg "get()" and "setOrGet()" ?
or even "trySetGet()"
02:00
readyGetSetGo() //ready? Get, else Set, then Go!
haha
WHat would the body of "set if not then get"() look like @DanLugg?
function setIfNullThenGet()
{
if(is_null($this->foo))$this->foo = 'bar';
return $this->foo;
}
@PeeHaa lol
"Nope"
It's a little more complicated than just "get" and "set then get" I suppose; I'm iterating over an array of keys, and going deeper into an array; "get" will just bail out if a key doesn't exist, whereas "set then get" will dive into the array, and if it finds a missing offset, it'll create it and continue, and then return the new reference.
Its not part of the public API so I guess I could call it banana() and brotherly_love(), but even still...
02:13
Sounds kinda... funky
lol, not terribly. It just takes a string path like foo/bar/qux and translates it into an array dereference
PHP security expert builds "Hugs as a Service" to comfort butthurt PHPers. He writes it in Go. Troll Level: MASTER. https://github.com/ircmaxell/haas
4
I really can't stop laughing at that
lol, I think we are a little butthurt :-P
@ircmaxell hehehehe
@ircmaxell Laughing out louds
02:22
@PeeHaa should i be saving the fb id or is the email enough?
I only use the id for flaregramster. But it depends on what data you want from the user
@PeeHaa just need to use it for registration.. now i'm thinkin if i'd need the id in the future..
Ow and I store the username btw
i have the email and username..
I love using for for non-numeric iteration.
02:29
Is there anybody out there that uses while for iterating an array ? o.O
Depends on how you're iterating it; sure.
I see that a lot on StackOverflow. I always tought that foreach was infinitely better .-.
Not at all; if you need to back up, or otherwise jump around in an array.
That makes sense
i usualy iterate an array to throw out it's results, so foreach helps me a lot :P
Also, foreach depends on the Traversable interface (or say, IEnumerable in C#) whereas the body of a while or for loop can do whatever.
02:31
" Congrats, you've gained the privilege – vote down – learn more " YAY!
yes, @DanLugg you're right
03:06
silence
of the lambs
lol
last time i saw that was some years ago
croo.. croo.. croo..
owl my god
I like very much when you answer correctly and the original poster don't upvote, select a right answer nor even comment anything :p
Get used to it ;-)
03:16
hehe :b
can people downvote comments ? .-.
@jgabriel if there is such a thing as 'eat and run', that's 'ask and run' for you.. :P
hehe :b
you can try commenting on him (nicely) though, but i think SO considers that as spam..
Nah!
I don't care at all. I want just to know if my answer really worked for him/her ;P
How can i get a -1 rep from a comment ?
03:47
morning
Morning!
Has anyone here ever used pushover.net ?
04:07
@jgabriel that's prob a -1 to an answer.. comments can't be dv'd
ok. How can i get a -1 to an answer on a question that i just added 1 comment and 0 answers ? :P
@jgabriel the only way you can lose exactly 1 point is if you downvote someone's answer. Go to stackoverflow.com/users/3011284/jgabriel?tab=reputation to see where you did that.
Yes, i did it :P
didn't knew that
if the answer is deleted you will get your point back as well
05:04
still laughing about that tweet...
:D
I just received a +1
guess i got my point back laughs
@reikyoushin you're envying too loud
05:20
lol
Money for nothing and chicks for free
05:33
@reikyoushin the golden stool seems out of place. That's like having a golden shopping cart or bed pan.
also I thought you can't eat gold, as you get heavy metal poisoning.
WHY are so many people still using mysql_ functions ? D:
/me will eat home made pork in a sweet&sour sauce in half an hour with the best wine (NZ)
user652649
who cares of heavy metal poisoning when you have gold
@jgabriel because Google won't un-index all the shit tutorials online
@jgabriel why not?
05:36
@zerkms are you serious or ironically questioning for fun ?
@jgabriel 50/50
@Wes if you eat gold is your poo gold too?
you have a legacy project
hehe :P
and it already uses it
what would you do?
05:37
@zerkms if you have a legacy project, you rewrite it
else you are doing xGH
user652649
@crypticツ why people wants to talk about poop with me
it's a company asset
in real world you cannot do that easy
so if a change is 1 mysql_query call - it makes no sense to rewrite all the 100k LOC
legacy project + mysql_ function = php 4.x
nope
it might be php 5.2
there is nothing terribly wrong in mysql_*
:P
not terribly
05:39
but?
don't make a cargo cult of your job
treat a tool as a tool
but it is not of any good: unsafe, not-optimal in performance and there is another option that is faster and as easy: mysqli
i agree with you
treat a tool as a tool
unsafe - wrong
" not-optimal in performance" --- what?
hehe
ok, i exageratted :P
please elaborate both statements, I'm not sure they are valid
well, you have indeed :-)
anyway, in most cases it's not that bad as people shout in the comments (and actually annoy me a lot)
but in the unsafe
it has bad filters
05:41
bad what?
erm... ways to avoid unsafe content
(?)
?
what is "filter"?
it's hard... 3:40am here :P
mysql extension doesn't introduce such a term
that is true
05:42
as well as mysqli and PDO
not sure what it means then :-S
i mean ways to sanitize input to avoid injection
@crypticツ the most expensive sushi was made with edible gold bits..
@jgabriel 1. they are not bad 2. they are trivial
1. use mysql_real_escape_string for all strings 2. cast numbers to numbers
that's it
2 trivial rules to be completely protected
you don't even need to think about it - those rules are unconditional
i agree firmly with the 2nd point
anything wrong with #1?
05:46
now that you put that, i have to do tests
i am not sure, but i remember hearing that it could be exploited
lol
by using special characters that would be parsed
and, thus, effectively breaking it's function :p
it's possible if you don't use the correct charsets
i guess that answer it :)
so, after all, i think i have to agree with you
so if you're smart enough to use and set matching charsets - you're fine
05:48
mysql_ functions are bad, but aren't like the worst happened
actually I personally don't use mysql ext since 2005 :-)
we can live with
hehe
i don't since 2008
but in proper hands it still can work well
@zerkms true, even PDO/MySQLi in the wrong hands is bad. =oP
@crypticツ that's a great point
and mostly it's caused by a lot of "advisers" from the comments
who make newbies thinking that using pdo/mysqli automagically makes their code protected
05:50
right now i am using doctrine :b
cryptic is pretty right
the only problem with doctrine is that it adds a very big overhead on shared host without extensions to properly cache the entities
yeah, the only real reason to migrate from mysql_ is for forwards compatibility. Your security concerns don't magically go away when you do. It's still up to the developer to make sure they properly run their queries.
exactly
"is for forwards compatibility" --- 5.5.0 still supports it
so it's veeeeeeeeeeery forward compatibility
oh
don't preparated statements add an extra layer of security even for newbye programmers ?
if they are used everywhere and properly - they make the code better without doubts
05:52
by simply avoiding some common injection
when i first learned about pdo this was what made me most interested on it :P
as an argument against - with prepared statements (real, not emulated) you interact with a database twice (assuming you're executing a prepared statement just once)
not once as you would do with a plain query
so it's a network overhead
oh
network overhead is performance killer
I'm not against prepared statements, but they do have drawbacks
also, i remember the most basic workaround that i heard at 2008~2009. It was recommending to simply purge SQL commands from the input :P
in protection of them - some DBMS may cache execution plans for prepared statements as well
05:56
nothing is better than an well configured server
well, if performance was the most important thing after all, there would be no use for innoDB :P
( mySQL engine )
yep, let's use blackhole storage engine
the fastest on ever
lol
why would anyone use it ?
for replication
hm
how could you do it using blackhole ?
@jgabriel imagine you have a single master and 1k slaves
replication traffic would be enormous in this case
instead of that you create a master, N servers with blackhole and connect slaves to them
this way master is not heavy loaded and slaves still can read replication logs from blackholed servers
06:04
now i understood
so that way the load would be shared
going to sleep
4:10am here
good night
I have a **SET** in a column.How i get the values count ?

ex:

    id | column

    1  | a,b,c,d,e,f,g,h

I want to get the column **SET** values count ?

in here it should be 8 ?
@zerkms
SELECT BIT_COUNT(`database`) FROM `get_sync`
it return 0
my SET column is the database
may be because of that amount of bits :-S
07:33
moin
moin
@hakre why closing it?
@hakre the proposed duplicate is not entirely relevant
@zerkms But it's with good will (and exactly what you called a fine answer when written by Bramar). And read my comment above the duplicate suggestion. With your picture alone it's pretty little a question that can be answered well and in a useful manner.
07:42
I didn't call it fine :-)
A good SQL question shows the table definition, some example data and the query what you've tried so far (or how you understand to solve the problem).
@zerkms sorry, confused you two.
"How i count values in this SET ?" --- even this single line is enough actually
at least for me it's obvious OP wants to know the number of set bits
It it a SET actually?
and I'm surprised there is no good solution for that
yep
Or is it a string as set?
07:44
well, I treat it as: "if a person knows the SET type it's likely to be a real SET"
but
!
1 hour ago, by zerkms
@samitha http://dev.mysql.com/doc/refman/5.6/en/bit-functions.html#function_bit-count
my proposal before didn't work
so seems like it's a string :-S
that (it is of SET data type) is my first impression as well, but the only dumping an image that's a screenshot from some (phpmy?) admin UI with no further legend is pretty weark for a question.
Well, one can do a subquery on a string column in MySql.
curious why only #php is that active on closing questsions
@zerkms because we care? we know how hard it is to keep questions open too long and not solving them :)
Or may be because we know SO becomes worse because of "us"? :-)
I mean, because of our "colleagues"

« first day (1184 days earlier)      last day (3990 days later) »