« first day (2172 days earlier)      last day (3002 days later) » 

00:26
anyone get this ($rgb >> 16) & 0xFF;
whats >>
why do people use static::methodName() instead of self::methodName() is there any difference? (when called inside a class method)
@ChrysUgwu Yes, there is. self does not give you Late Static Binding.
01:10
that made a lot of sense. but there is no problem using self when not extending(calling in same class) right?
@ChrysUgwu There is no problem when you don't want the parent class to forward the calls to its children statically, no.
There's a difference.
"when not extending" is present tense. That could easily change future tense. The pertinent question is "do you wish to prevent that", not "is it a problem".
It's not a problem if you haven't already extended the class. It could be a problem when you do extend the class.
i got you.
Use self only when you explicitly don't want extending classes to override the parent's forwarded calls. Otherwise, use static always.
 
2 hours later…
03:13
Morning all
 
2 hours later…
05:03
Good Morning
05:18
posted on September 26, 2016

New Cyanide and Happiness Comic

morningz
yo Joe mornin
06:04
Moings
06:31
hi
PHP resized image compression not good showing reduction when testing on GTmetrix and google speed test
Wes
Wes
\o
o/
Wes
Wes
06:47
/me reads joe's post
C-C-C-Combo breaker!
Wes
Wes
> Compared to the discomfort of telling my wife, telling my manager was easy. My manager has a beard, which obviously helps ... while my wife has no beard.
I have a feeling that I missed something big last friday, with all the "We don't do wordprepss here"
@Wes it's true ... she has no beard ...
06:58
.... is it disappointing?
Wes
Wes
@JoeWatkins i hope it's not too bad for you. i know a bunch of strange people and literally any programmer i know is messed up that way :P including myself... told you already :P what matters is your own happiness. you are a genius for all the people in the php community, wife, kids, a nice house on an island... that's what counts, and fuck the rest
Good Day!

What I want is that I am having 3 radio buttons and a button in the end which is clicked to create new radio button where user enters label and value and check/uncheck himself.

I a trying below code :

JS:

function createRadioElement( name, checked ) {
var radioInput;
try {
var radioHtml = '<input type="radio" name="' + name + '"';
if ( checked ) {
radioHtml += ' checked="checked"';
}
radioHtml += '/>';
radioInput = document.createElement(radioHtml);
} catch( err ) {
radioInput = document.createElement('input');
@Wes thanks ...
Wes
Wes
i didn't choose the best words :B and maybe you forgot but we talked about this before
indeed, forgotten ...
Wes
Wes
07:09
haha it's ok :D
Has anyone dealt with shell piping and CLI programs in the recent-ish past?
@JoeWatkins glad you got help - that's tough to seek out when you're in the midst of it
I have two executables I want to pipe between in a matter like so exe1 arg arg arg | exe2 arg arg arg, exe2 must accept input from stdin (else it blows up)
It seems like when exe1 takes too long, exe2 throws regardless
How can I make it wait?
you need to find out the mechanism used to timeout, I think
it would be very strange for read of stdin to timeout
so I think it must use some non-standard way to do that
@JoeWatkins I see, so it's not a bash problem.
So the blame is on Java... Again...
Thanks :)
I'll look into that
07:17
yw
-3
Q: Should I let the intern code one-handed?

ld0rmanI have been assigned an intern at work. He has a good basic understanding and is very enthusiastic about everything I've introduced him to, which is great. Curiously, despite having no physical handicap, he writes code with only one hand. This seems incredibly inefficient to me, but I don't want...

Wes
Wes
ahaha
if I was one armed, and went to an interview and was asked "do you think you can perform as well as a two armed person?" I would beat the interviewer to death with my good arm
@PeeHaa dafaq did I just read?
07:20
and I'd do a fine job of it too ...
@PaulCrovella thanks ...
@PeeHaa sounds armless enough
meurning
Hi everyone; hoping someone can point me in the right direction here... What would be the best way to remove a value from an array up to a certain point?
"remove a value from an array up to a certain point"
As in... lets say I wanted to delete the value that was nearest to the number 6 but no more than 6.
wat
Can't even brain onto keyboard atm
07:46
What does nearest to 6 mean?
5.5?
3?
1?
1 2 3 4 6 8 9
I want to delete 4
Because it's the largest number less than 6
Loop through it and remove it?
But i'm not sure how to write that :S
!!docs foreach
[ foreach ] The foreach construct provides an easy way to iterate over arrays. foreach works only on arrays and objects, and will issue an error when you try to use it on a variable with a different data type or an uninitialized variable. There are two syntaxes:
07:47
I understand what foreach is
But not sure of the logic to remove the largest of something less than 6
Should I be storing the key of the highest found value and then at the end of the loop I delete it?
Either reverse the thing and loop through it and delete < 6
Or store the last key and delete after hitting 6
Both assume sorted arrays btw
Eitherwise loop through it and store the key of the nearest one and delete afterwards
Right right
Makes sense
tyvm!
!!dad
Where does Fonzie like to go for lunch? Chick-Fil-Eyyyyyyyy
08:10
Morghgdshfgjk
Morjijihjgfmjnhgkjopkhgopjhopfkjopkghngdsghsdmfasndfmeaifhnsemnfjseofseoir oih toisetvoiejitherou
Hi guys do know how to edit cached css files something like 5416545465.css
Good mooning, elevenses.
@undefined who starred that?!
08:26
wow spam even gets into chat now
Yeah, that's new.
Makes you wonder whether the mods are willing to kill the account and the one that upvoted his questions
I hope so.
Wes
Wes
it was funny actually :B like one can help only by knowing 5416545465
killing is wrong ...
Wes
Wes
08:29
and i starred that. and i know i shouldn't star stuff :B
my apologies :B
I thought it was funny :P
killing is not funny @PeeHaa ... you monster ...
It's true. I think it has something to do with the fact that I was raised by wolves
Hello!
I have a question...
So I want to make a "header bar" in HTML
which is above all the other content
And I heard the best way to do it is probably in PHP
08:34
?
php has nothing to do with the style of your content ...
No wait hang on
I want to have header.html
Which is the same throughout every other page
And I don't want to copy-paste the html code every single time
For the header bar
08:35
include() it
!!docs include
[ Security warning() ] Security warning() function
wtf'ing f
....
wtf jeeves
@Jeeves is dumb
08:36
!!docs include?
[ Security warning() ] Security warning() function
It's missing the function synopsis probably
Did I type that right synopsis ?
Holy shit I did
you did \o/
you suck @Jeeves
@JoeWatkins And you like it.
08:37
yes
Really @Joe?
@Jeeves dirty little fucker
What is !!docs include?
:P
@Qwerp-Derp Read the page.
The text of the chat message is broken
Blame me for that
!!blame PeeHee
@PeeHaa Always do.
So I can just do include "header.html"?
Also morning @Joe :-)
08:39
morning bob :)
@Qwerp-Derp Yes, with the right syntax.
Wes
Wes
the output of babel is 6 times in bytes the original es6 code. kill me
@Qwerp-Derp Read the actual page
@PeeHaa I have read the page, just getting confirmation
> Babel · The compiler for writing next generation JavaScript
the next generation will have orders of magnitude more processing power @Wes
08:40
@JoeWatkins s/JavaScript/bloatware/
yeah, that ...
08:56
man... ufotable really is amazing,,,
dem animations
Wes
Wes
and the size is not inclusive of polyfills even, you need to add them yourself
@Wes wat
Surely babel does that for you
Wes
Wes
nope, it just converts the syntax
(i think), for instance it didn't add the Symbol() polyfill
!!mdn Symbol
[ Symbol ] A Symbol is a primitive data type whose instances are unique and immutable. In some programming languages they are also called atoms.
09:01
@Saitama so is @PeeHaa's mom
@Jeeves waaaaaat
Wes
Wes
@PeeHaa tl;dr is a random string that you can use as property name, to make private fields :B yeah... hella crazy
wtf level cockford
3
Wes
Wes
as long you have a reference to the object handle you'll be able to access those properties, while others cant
err typo crockford, but makes sense
Wes
Wes
09:03
ahahah
@Wes ermergad
Wes
Wes
but @PeeHaa they already changed their mind github.com/tc39/proposal-private-fields so Symbol() is already a bad idea, but they'll never admit it :B
E_JAVASCRIPT
E_WTF
Wes
Wes
*[name](){} guess what that means
... it's a method declaration :B
What is *?
09:10
it's a star @PeeHaa
Thanks! :P
Wes
Wes
tells the compiler it's a generator
@Wes ah
!!rfcs
09:13
how can I find out what SQLHANDLE is in this c code? I think it's the same thing as in odbc but I dont see where its defined.
Wes
Wes
hundreds of articles only to explain how to position the * in the various function declarations () => {} function(){} function named(){} method(){} get property(){}
lol
hmm, it might be defined in #include <sqlcli1.h>
Wes
Wes
i like php.
looks that way to me also @Gordon
09:22
The best thing about JavaScript it that it makes you appreciate PHP more
it definitely is @Gordon
what it is depends on os and some other stuff ...
@JoeWatkins thanks
09:37
@Andrew the processor is a resource sitting there idle most of the time. I want to utilize it optimally. I want it not to be lazy and do things as fast as it could. — Abel Melquiades Callejo 31 secs ago
lol
Hey
I'm working on a strict_comparisons prototype
I already wrote about my wish to write an RFC about it in the internals list
thought I'd pop by here to gauge how people are feeling about it
PHP is just one of the many languages I work on, and perhaps the least favourite one
@Vinay But I wasn't joking.
but I'll gladly try to make it better if people want that
so.... do people want that? :)
09:46
@Gordon looks like it should be defined in sqlcli1.h
@Danack hi!
@vegai I think we have mixed responses in here
@vegai what effect does it have on ==?
IIRC when it was discussed last week
09:47
@PeeHaa yeah, I know. That's the other reason I'm here :)
(looks like this file is distributed with DB2 itself.)
I'd rather not work on the rfc if there's close to no chance it'll get through
@FlorianMargaine thx, yes it is.
@DaveRandom it will make == check the types and throw an exception if the types don't match
09:48
@vegai my instinct is that this is the case, unfortunately, regardless of what people in here think
@DaveRandom ditto for < >, switches, and pretty much all comparisons
@DaveRandom it's opt-in, like strict_types
so totally optional
I think it'd make more sense to enable strict comparisons when the strict_types switch is on
Morgen
@PeeHaa oh, cool! Thanks. Didn't know about that
09:51
@FlorianMargaine I still think that is weird
Especially with @NikiC's more global / namespacedstrict types declarations
@vegai what about === then? Will that start throwing when the types don't match as well?
@DaveRandom That was one point I was having conflicted feelings about (I wrote it in internals already)
possibly the best option would be to not touch === at all
but then == would be actually stronger than ===, which might be confusing
@vegai this
others ideas I had were 1) forbid === altogether and 2) make it do the same typecheck and throw exception
Guys, I have a question, if there is a Hydrator which hydrates an object but there is a repo dependency, is it a good idea that the hydrator calls the Repo to take the data to be able to hydrate the object
09:54
@vegai 1) probably makes the most logical sense but that will never get through, I suspect
-11
Q: lie in php mannual over writing file

Eudessess AffinityIn php manual they claim file_put_contents is similar to calling fopen,fwrite,fclose but when dealing post request's to the script, file_put_contents fails to work where only fwrite works. Before I dive into their internal representation does anyone have any idea why they would write such error ...

Lies!
@PeeHaa No, not really, also @Wes is wrong about the private properties.
A symbol is a way to implement interfaces
Say you have a library, and you need the consumer to pass you an object with a method .foo()
The problem is, some other library may also use foo(), or the consumer might use foo() for their own reasons
@simon it's not a mistake, it's a LIE!!!!11111oneone — DaveRandom 23 secs ago
Wes
Wes
@MadaraUchiha i might be wrong but that's how anything i have read presents them
So you can ask for a Symbol as the method name, MyLib.fooMethod, and require the implementor to implement the method MyLib.fooMethod (which is a symbol)
MyLib.fooMethod is guaranteed to be unique, and there's no chance of collisions.
A good example is the iteration protocol
An iterable implements a method Symbol.iterator, which defines how to iterate it.
Similarly to implements Iterable in PHP.
Wes
Wes
how often you get these naming collisions in js? :B
10:01
@Wes They can't be used as true private variables, because you can list them anyway with getOwnPropertySymbol
@Wes Not very often, because that's usually not how we do abstraction.
Symbols were pretty much created to solve language level problems that they faced while writing the ES2015 spec.
(For example, the iteration protocol)
Wes
Wes
it's so overkill..
@vegai I'm pretty skeptical about throwing exceptions from equality operators
means you wouldn't even be able to write something like != null right?
Wes
Wes
@MadaraUchiha though, can you confirm that babel doesn't add polyfills itself? eg, it doesn't automatically add Symbol if it's not defined?
I'm using `spl_autoload_register()`. All of the PHP apps running on my server live in a single virtualhost in separate directories and that seems to have caused a conflict. ApplicationA is requesting a class from ApplicationB due to the auto load.

Would putting applications into separate virtual hosts resolve the issue? I cannot edit ApplicationA so adding namespaces seems like it wouldn't resolve the issue. Any thoughts?
10:11
Who here wrote a hydrator
ocramius
yep
ThW
ThW
@Henders possible, but not necessarily. Depends on how you manage the dependencies.
@ThW Thanks :) Both applications reference based on predefined paths so moving them about shouldn't be an issue (it is all relative to them). The first time I've had any conflict is when using the autoload_register() because they both seem to call ApplicationA autoload and ApplicationB.
But I'm assuming that they are both calling the registered functions because they are part of the same virtualhost.
user5020521
i'm aware this has nothing to do with PHP but please spend some time on it I'm dead desperate
user5020521
10:20
0
Q: cordova inappbrowser cannot open an external url on iOS

RiccardoI'm developing an hybrid app in phonegap and basically I have a button in the index page which whenever is clicked opens up an external url. I succeed on Android and fail on iOS. I've looked up this question iOS / Cordova: InAppBrowser not working and this one cordova/phonegap onclick doesn't w...

@Henders If that is the case you should burn your infrastructure with napalm
Just being in the same vhost doesn't share anything
It's the code that shares stuff
@vegai If it was possible to use alternate syntax, so as to have both strict and weak equality operators, as well as strict and weak comparison operators would be the way most likely to pass....however no-one seems to be able to think of what the 'strict greater than' should be /cc @DaveRandom
Also - you should think about dropping the switch stuff from the RFC, maybe.
@PeeHaa I'd like to burn it all right now, yes :P The only issue i've had is with spl_autoload_register though. As soon as both applications started using it, they began trying to find non existent classes in each other's class folders.
@Wes Babel doesn't do anything automatically.
Also, welcome btw.
10:23
@Henders Why are both applications using the same bootstrap?
btw - if anyone fancies joining in telling people not to just make up their own facts on internals, that would be greaaat.
@PeeHaa nope. One is an established application and the other is one i've been writing. There are no connections between them other than the fact the error log shows ApplicationA attempting to find one of it's classes in the path that Application B houses its classes.
That would involve reading internals to begin with. Nope tnx
Hi all great minds
@Henders The problem is elsewhere. All I can say is what I already said
10:25
Someone please help me
Just having things in the same vhosts doesn't do much
0
Q: Why the hyperlink on Project Directory redirecting wrongly in WampServer dashboard on Windows 10?

user2839497I'm using "Windows 10 Home Single Language" edition(a 64-bit operating system) on my machine. I just installed WampServer 3.0.6 package successfully on my machine. Then I created a directory titled html_playground at location C:\wamp64\www\html_playground Then I opened the WampServer dashboard...

@PeeHaa fair enough, thanks for your help :)
@PeeHaa - right you were! Just looking elsewhere I've discovered it looks like some session conflict. It's just a coincidence it has manifested when autoload turned up! Thanks for putting me on the right path :)
ThW
ThW
The issue is not spl_autoload_register but the autoloader that you register it looks into wrong/shared/global directories for dependencies.
@user2839497 we dont have great minds. most of us have filthy minds dreaming of @PeeHaa's mom or @rdlowrey. sorry.
@Gordon:hehehehe
hi guys , need small help if thats ok
@Laith just ask..
thank you sir
ok so i have an issue that im facing for 2 months to be honest
im working on a comment and replies system where people can comment and reply to others posts
im fetching the comments from the database as well as the replies
each comment has a reply form , just like facebook
the problem is that when i reply to a comment for the first time , its working , but when i try to reply to another comment the reply goes for the first comment
which is weird
this is the code : codeshare.io/ZnM8k im using AJAX to submit the forms .
could not find better place to share the code
i have asked the Q long time ago but could not get an answer stackoverflow.com/questions/39043023/…
10:58
@Ocramius I really like your hydrator but it requires PHP 7 :/
we have not migrated yet
user4868160
hi guys
this is an image prntscr.com/cmhmy0
hi sir
user4868160
i have a full ajax site(php lng in in server side)
user4868160
now i have a problem
what is it ?
user4868160
10:59
on scrolling to bottom of page new posts will load and append to the page

« first day (2172 days earlier)      last day (3002 days later) »