« first day (1501 days earlier)      last day (3438 days later) » 

12:01 AM
@LeviMorrison I periodically get "your emails have been bouncing" mails from ezmlm. If I've not had any messages for a while I check news.php.net, that will always show everything because it talks directly to ezmlm using news://
 
 
1 hour later…
1:11 AM
 
2:04 AM
I don't understand how Alipay is a multi-billion-dollar-valuation company. It certainly isn't from their API documentation
God, those docs are worse than my first docs
It makes me want to strangle a seal while punching a baby panda in the face
UGH
 
Or, just punch their faces via TCP/IP.
 
2:33 AM
Any form of help will be much appreciate - thank you.
 
3:01 AM
Raises single eyebrow 3 inches
 
You have flexible eye brows
 
@Danack Nooooooo~!
 
3:43 AM
2
Q: "IE Web Development Support Moving to Stack Overflow"

DanackIt was announced today that: "The Internet Explorer team is excited to announce that web-development support is moving to Stack Overflow." Well, that is exciting. Questions though: A lot of questions that would be appropriate for a support site are not appropriate for SO. Presumably the previo...

 
> Please note that Jonathan Sampson is no stranger to SO ...
He is? :)
 
Bronze badge only?
I don't remember seeing any of his answers heh
 
@Ja͢ck ta.
 
Wow, somebody actually thought a game controller that takes your blood was a good idea?
I'd much prefer a game controller that would punch you in the face ... with some luck there will be blood too.
 
4:25 AM
and nn.
 
4:40 AM
lol
 
5:14 AM
morning
 
6:08 AM
morning all
 
 
1 hour later…
7:32 AM
posted on November 25, 2014 by kbironneau

/* by Hscraft */

 
7:46 AM
moin
 
@Feeds Not the case when you did not get salary for month and a half. :D
morning, @JoeWatkins
 
8:09 AM
Hello everyone
I have an issue in shopping cart regarding quantity updation
this issue occur only for new customer
I am using Magento platform
 
my internet keeps cutting out ...
you know the day will be fun if you can't stay online for more than 10 minutes at a time ...
 
Can anyone help me to create this array. Randomize five different digits programmatically and put them into an array as keys, so that you have an array with five numerical keys (the keys ranging 0-9). The value corresponding to the key, shall be the array's preceding key multiplied with two.
For example, two key-value pairs could be: [8] => 18, [0] => 16 The value of the first element would be the array's last element key multiplied with 2.
 
@ircmaxell my tired head read that as a suggestion that CMCAJXI is an alternative to MVC ...
 
good meurning all!
 
'nin
 
8:26 AM
hi pals, am using header(); to redirect pages in php, so how can i pass url into header that carries some variables? $urlParam="www.fas.com?p=$num&js=$status"; header('location: 4urlParam); //not working
 
good mornings
 
@fasM take a look at htaccess, then you could redirect by just saying: header("Location: /xxx/yyy/zzz");
 
mornie pal
@Naruto in that case works fine for me, but when i pass some parameter in it as shown, it does not works
 
var_dump($_REQUEST);
 
@Naruto $urlParam="www.fas.com?p=$num&js=$status"; header('location: $urlParam); //not working There was mistyping
@AvinVarghese can you add other example please
 
8:35 AM
@fasM problem solved then?
 
@Naruto nope i want it that way and it doesn't work
 
0
Q: Custom entity field is missing in Add content form

arunCreated a content type 'News' having fields 'title', 'body' and a custom entity field 'Department'-which will be populated from department vocabulary terms. I can add contents by loging as admin. I can see all the fields for Add 'News' when I login as admin. Now I created a role, 'Content Writer'...

 
9:00 AM
hi guys
I am trying to redirect and change url
but its not changing
Is this the right way?
header("Location: User.php#profile", true, 301 ); exit;
 
@Gotalove url fragments (#profile) are purely client side.
I doubt you can redirect to that with a Location header.
 
okay
so what is better option js window.location?
and hi @SecondRikudo
 
having Same/ressembled problem here $urlParam="www.fas.com?p=$num&js=$status"; header('location: $urlParam); //not working There
 
window.location working for me
thanks
 
Adz
9:16 AM
hey guys, I'm new to php. What is the best way to integrate php and html? Is Twig a good idea?
 
@Adz Since when did you pick up php?
 
there is no "best way", but simplest approaches are variations of this: chadminick.com/articles/simple-php-template-engine.html
also, mornin' everyone
 
morning
 
morning
 
oh fuck
 
9:25 AM
what's up
 
tomorrow starts Steam's Autumn sale
 
Morning
 
Adz
please don't
i have to pay bills
 
@tereško i.imgur.com/nI6ybG8.gif this is happening
 
9:26 AM
yeah .. basically
 
@Adz man you can go without water for a month, as long as you have electricity and internet :D
 
Adz
hah, knowing me I'd buy the games then never play them..
 
@Adz I have played about a half of what I bought and the ones I have not are mostly the ones I have really waited for but don't have a good enough system to experience them on
 
@Adz why do you buy them then?
I am 24 and I have never ever paid for a game in my life
 
Adz
it's for me internet penis size. You know, show off to my friends etc hah
I only pay for online games**
 
9:30 AM
except when I used to go to computer clubs with my friends when I was 15
@Adz feed the ego :D
 
@ziGi I have been pirating for ages. But switched to steam about year-and-a-half ago. Aside from minor glitches, I have actually enjoyed it.
 
@tereško yeah I can imagine
 
oh course, I buy only discounted games .. 3rd world country and all
 
I always pirate, but if I like the game I buy it
 
well it's not that I haven't played paid games illegally that much, I just know a lot of friends that have the game and I give it a spin on their PCs
 
9:32 AM
the only one that was a disaster I haven't tested enough before buying was van helsing 2
buggy as hell
 
@SergeyTelshevsky see that is the difference right there, I get bored with games quite a lot and fast
 
lol , why would you even buy something like that
 
@ziGi me too
 
it screams "shovel-ware"
 
@tereško the game was really great, but endgame had too many bugs
@tereško wrong
 
9:33 AM
hmm ... maybe
btw, this all makes me want to play Deus Ex again
 
@tereško Aaaaand you've reminded me of Mirai Nikki.
 
heh .. I actually have not watched it, it's said to be terrible
 
I need to watch that again
 
@SecondRikudo awesome anime
 
posted on November 25, 2014 by kbironneau

/* by Tomas Villanueva */

 
9:36 AM
@tereško It's on the same level as Death Note and FMA:B in my opinion.
The ending was a bit.... unexpected.
But overall I give it at least a 9.5/10
 
@SecondRikudo shit, I confused it with "School days" for some reason
 
for "Future diary" I have only read some of the manga
 
@tereško Anime follows the manga very closely from what I've heard (haven't read it)
 
I've stopped watching/searching loli/kawai -like anime...
 
9:39 AM
guys I need a bit of an assistance, or actually a recommendation. I am using this library for sending whats app messages: https://github.com/mgp25/WhatsAPI-Official
The thing is that currently if you look at the example: https://github.com/mgp25/WhatsAPI-Official/blob/master/examples/exampleRegister.php

They use `require_once` to get the class, but I want to avoid that.
 
@HamZa wasn't that genre called "moe" ?
 
@ziGi if they don't comply with PSR-0, use a custom autoloader
 
@tereško I think yes kinda. I've googled "school days" (images) and it was a big NO. It kinda feels "wrong"
 
Excuse me guys but is anyone here good with curl? and think they could give me a hand?
 
@HamZa yeah, the general agreement on that one is: NO\
 
9:41 AM
@NikiC is this weird? 3v4l.org/o2416
 
@DinoBicBoi ask away, who knows. Maybe you don't need to be that good to answer your question :)
 
im having a problem geting data from back to front
0
Q: how to send an array in an array through curl in php

Dino Bic Boisending an array from the back to the front i used json encode and then decode at the front which worked quite nice, but how do i send an array that has another array inside of it? the output i am getting is: (have to send an array with an array in first index , and a string in the next index) A...

 
each time I read about MVC in web context, I wonder why we're still dealing with this ghost...
 
@bwoebi because Rails
 
thank you for anyhelp
 
9:41 AM
lol
 
@tereško Rails?!
 
@bwoebi because fast enough connections and web sockets and because its a useful pattern
 
been stuck on this for a few hours and came to here
 
@Gordon websockets? good joke.
@Gordon MVC is not a pattern… It's just a concept which is flawed in web context.
 
@DinoBicBoi I don't see the problem. If you have a multidimensional array. Then you can json_encode it and json_decode it back and still get a multidimensional array
multi array -> json_encode -> send -> receive -> json_decode -> multi array
 
9:44 AM
@bwoebi disagree but not in the mood to discuss it again
 
hm k
 
@Gordon write a blog post to refer people to it, maybe?
 
@hamza
if(mysqli_num_rows($result)>0)
{
while($row = mysqli_fetch_assoc($result))
{}
}
this is what i need the array for after i get it
 
@HamZa maybe
 
and result will just not out put the way i need
 
9:46 AM
@bwoebi the concept is SoC. It's a pattern which attempts to implement it.
 
@DinoBicBoi this is something simple. Try debugging with var_dump and construct your array "as you want it"
 
okie i will try that out, never used it.
 
@FlorianMargaine ok thank you
 
can you flag a row in mysql to be undeletable?
 
@Naruto lol?
 
9:48 AM
guess thats a no? :D
 
@ziGi honestly though... I think I'd just write an adapter lib or something
 
@Naruto I don't know but my guess is NO and again NO for insanity. You can add another column "deletable" and add the logic in your application
 
sure, I was just wondering how people resolve such problems
 
@HamZa this is the result i got from vardump:

array(2) { [0]=> object(stdClass)#2 (5) { ["current_field"]=> NULL ["field_count"]=> NULL ["lengths"]=> NULL ["num_rows"]=> NULL ["type"]=> NULL } [1]=> string(8) "disabled" }
not rele sure what to make uf that
 
@tereško okay. But still, it's just like an holy grail everyone needs to know about instead of just having a basic router/dispatcher and logic entity which pushes to frontend presentation... The issue is to have that formalized as MVC...
 
9:50 AM
@DinoBicBoi Are you vardumping $row?
 
@FlorianMargaine well the library is PSR-1/PSR-2 compatible so I think it would work fine
 
no i used vardump on ($a) thank u taking ur time for helping btw
 
@ziGi no... it needs PSR-0
PSR-1/2 are coding style things
 
@DinoBicBoi send a git gist or pastebin of your code. I don't get what you're doing exactly...
 
not the most useful...
 
9:52 AM
@FlorianMargaine oh, I did not know
 
all right gimme a sec
 
What does PSR stand for PHP Standard of some kind?
PHP Standard Recommendation
hm
 
Recommendation. Not something you have nor need to respect.
 
@HamZa pastebin.com/z7Bbtx9u here you go
 
@bwoebi I like PSR-0 to be respected though...
 
9:55 AM
i can explain to you what im trying to do if u need
 
err
PSR-0 or PSR-4...
 
@FlorianMargaine I prefer PSR-4. But I don't do it because PSR, but because it makes autoloading simpler.
 
@bwoebi yep
I like that it's standardized though, one less problem to worry about
 
@DinoBicBoi echo json_encode($theArray); -> wrong
 
it is???
thats how i used it for just an array of strings and it worked fine
 
9:58 AM
@FlorianMargaine I still don't consider PSRs as standards. Just proposing some things which mutated to a de-facto standard.
 
To be honest I believe it is really confusing that there is an enumeration of the PSR but they don't follow logically
 
@hamz
 
@DinoBicBoi You're using mysqli_query() but you aren't fetching anything from the results
 
example PSR-0/4 are for autoloading PSR-1/2 are some coding standards
 
@ziGi look at PEPs
 
9:59 AM
@HamZa true, but I was hoping it would be possible to always keep at least one, without having to check in PHP, but O well :)
 
@Ja͢ck Hey, you around?
I woke up and am wide awake.
 
i@HamZa im doing it in the front i guess shoud i do it in the back end??
 
@FlorianMargaine PEP?
 
@bwoebi I have a question for you with regards to PHP 4 constructors and traits and PHP 5.7.
 
10:01 AM
@DinoBicBoi Try to also use if(mysqli_num_rows($result)>0) and that loop while($row = mysqli_fetch_assoc($result)) when fetching the results from this query $sql = "SELECT ExamName FROM teacherExams";
 
Here's the current behavior for when we have a PHP 4 constructor mixed with a normal one when traits are involved: 3v4l.org/YHAtA
 
@LeviMorrison I can imagine what you want to ask… but ask first then I'll reply
 
@FlorianMargaine wow
 
@DinoBicBoi Construct an array and at the end json_encode that array
 
For PHP 7 this restriction would need to be lifted. However, what do you think I should do in PHP 5.7?
 
10:02 AM
@bwoebi the issue is that what people understand as "MVC" is completely broken and turned into a marketing term. Hell, what I am using myself cannot even be described as MVC anymore.
 
Well, that is interesting, I kind of get it. Google also have coding recommendations for android coding so they are more or less the same.
the question is, why is PHP having only 4?
 
anyway, I am kinda tired of this subject @bwoebi
 
(Note that it doesn't matter which one defines the PHP 4 constructor: 3v4l.org/ZOeoY)
 
@tereško the issue at it's core, yes.
 
@hamza alright i will try that and pastebin it to u to see if i am doing what u said
 
10:03 AM
@LeviMorrison yup, that's what I thought. PHP 5.7 should do the same like everywhere both (old ctor and new ctor) are defined: just use __construct() as ctor and foo() as normal method.
 
@DinoBicBoi well try it -> debug it -> research -> try again -> debug -> then ask for help
 
@Levi especially nice if you write PHP 7 code and it'll be still backwards-compatible to at least 5.7.
 
@PeeHaa So someone sent me this: "zwarte piet went rogue: youtube.com/watch?v=1eCWOnorRgY";
 
@hamza okayy! thanks the only other question i have is, what happens to the echoed code that would be making my forms if i do all the loops in the back? what should be in the new array?
 
I have a small question. is there a way on a mac (terminal or app) to detected network 'lag' 'outages' from my wifi? I think the network over WIFI is not strong and sometimes i have time-outs.
Is there a way to capture that?
 
10:07 AM
@bwoebi Agreed, especially since it is currently a fatal error.
 
yep.
 
Okay, I have another question that is totally unrelated if you have time: I want to change how we do our passes.
I don't think I need another pass (still just two) but I need to change how we do pass two.
 
you're referring to pass_two() etc.?
ok, how and why?
 
Yes, but other "passes" too like inheritance checks.
 
Why can't that be done at first compile?
 
10:09 AM
It's for completeness for the RFC options:
class A {
    function foo(): B {}
}

class B extends A {
    function foo(): C {}
}

class C extends B {}
 
This will balk after class B is compiled.
 
I've no idea what you're doing since the code is a bit messy:
- It's vulnerable to sql injections. Learn about prepared statements https://www.youtube.com/watch?v=nLinqtCfhKY
- Indentation is kind of horrible
- Variable naming is horrible: try to give meaningful names
- Is error reporting even enabled? Because "$row[ExamName]" would throw a notice
Some other comments but I guess those are the main problems I see...
 
I need class C's symbol to be registered.
 
@LeviMorrison and when these classes are in different files...?
 
10:10 AM
If the files are split out I am fine with the current behavior of requiring autoloading.
 
What does terminating class name mean?
 
@LeviMorrison so you're anyway lately binding?
 
After this I think I'd be ready to move forward with a discussion about the variance of return types.
Anyway, my question is really: do you have time right now to help me identify how to separate them into clean passes?
 
@HamZa tahnks brothaa! i have something good going now i made an array and am storing the strings of what was echoed from front in it , but now in the back and i will just out put them nin the front!
 
Right now it's "do pass one on this AST chunk, then immediately do pass_two"
 
10:12 AM
right now no, in an hour probably yes.
 
I need "do pass one on this file, then do pass two on this file"
 
@DinoBicBoi GLHF
 
I know there are other bits of code that could leverage this, such as generator checks.
 
You mean with autoloading involved?
 
I don't understand what you are asking. Could you ask it differently?
 
10:15 AM
@LeviMorrison That you want to do pass_two() on specific files separated from AST, is this because auto-loading?
 
hahaha thnx
 
welcome :)
 
@bwoebi No, the same file. The difference is that I need all of pass one done on the file before anything in that same file goes through pass two.
 
@LeviMorrison I'm here now
 
@Ja͢ck How's it going mate? I've been online the same time as you quite a bit less lately.
I actually wanted to talk to you about what you do for your job, if you have time ^^
 
10:16 AM
Yeah, busy at work
 
@LeviMorrison ah okay, now I got what you want. I'd need to look src up first. As said, have to be away for a little while, then I can help… If you then still have time?
 
Wow, a guy wrote an RFC clarifying the severity of some requirements using some English words -> tools.ietf.org/html/rfc2119
 
@bwoebi Sure, ping me when you are available.
 
@ziGi You seem surprised about that?
 
It is just funny to see that
 
10:18 AM
@HamZa lol
 
I am not really surprised; actually I myself was wondering about that but did not know there is such document in existance
 
Well, there's also a journal entry titled Get my off your fucking mailing list :)
 
@Ja͢ck What company do you work for? (If you feel okay saying ^^)
 
How the hell can this not return false?

json_encode('<html><head><title>test</title></head><body><h1>Hello world!</h1></body></html>');
 
@LeviMorrison Ah, that's an easy one; you can find that on my profile page :D
What I do, however ...
 
10:21 AM
Not at liberty to discuss it?
 
Basically, being a small company I pretty much take care of, or are responsible for, all online things.
Ranging from order intake systems, intranet, (paid) sharing portal.
 
@MacMac why should it?
 
@MacMac because php!
 
@HamZa because json...
 
Nope, but I guess it's valid json
 
10:22 AM
I actually thought it'll return false since it's not a valid syntax...
 
@MacMac What's wrong with null?
 
What kind of hardware are you using? Are you using VM's?
 
It returns a string, instead of false as said in the documentation
 
Are you using stock PHP builds or custom builds?
 
@MacMac well you are giving it a string and it returns a json_encoded string
 
10:23 AM
@LeviMorrison In terms of hardware we use AWS as much as we can to centralise our IT ops.
We have a few systems on premise and a few Windows machines in a server room on the other side of the globe
 
@Ja͢ck how much are you guys optimizing to reduce AWS costs specifically?
 
@ziGi That changes everything
 
@LeviMorrison Reserved instances for the things that can't go offline and spot instances for the "toy servers"
 
@MacMac Well it seems it's valid json: regex101.com/r/bM0jT8/1
 
@MacMac if you look here php.net/manual/en/function.json-encode.php you can see that what it does is to Returns a string containing the JSON representation of value.
 
10:26 AM
@HamZa It's not.
 
@Ja͢ck Oh really...
 
Yes
 
morningz
 
87
A: Regex to validate JSON

mario(This regex was brought to you from the proving-the-naysayers-wrong department.) Yes, a complete regex validation is possible. Most modern regex implementations allow for recursive regexpressions, which can verify a complete JSON serialized structure. The json.org specification makes it quite s...

 
I can't seem to find it concretely, but does AWS charge CPU time differently than bandwidth?
 
10:28 AM
@HamZa Most implementations will condone partial JSON.
 
@Ja͢ck I see. So "strictly" speaking, it's not valid :)
 
Yeah ;-)
@LeviMorrison Yes, no ... hmm, it charges a few things separately ... the storage required to host your system and data, bandwidth of incoming / outgoing and uptime (for when the instance is actually up)
 
Also, if anyone hasn't upvoted this yet I would appreciate it if you would consider doing so:
35
A: PHP/MYSQL using an array in WHERE clause

Levi MorrisonIn SQL the IN() operator is used to check if a value exists in an array. The code below uses prepared statements for MySQLi or PDO to help mitigate SQL injection attacks. The variable $ids is assumed to contain at least one value. Error checking is omitted for brevity; you need to check for the ...

 
This is also the reason why AWS provides a calculator for this stuff :)
 
@Ja͢ck Ah, I see. So you get charged when the instance is up whether you are using the instance actively or not.
 
10:32 AM
@LeviMorrison That's right; you pay for the power when it's running basically.
We like to use the micro instances, because although they provide a single CU (compute unit), it can burst up till two CU's for a short time.
Downside is memory, you only get 700MB heh
 
@MacMac Why would it? It's perfectly valid in es5
 
@Ja͢ck Have you had to optimize for memory consumption very often?
 
Basically yet another "standards" fuckup
So for once PHP does what it should do
 
@LeviMorrison On a few occasions; I would run nginx+fpm with a maximum of 5 processes together with a local mysql database (capped at 200MB).
That's just enough; didn't bother to compile a custom binary though
As much as possible I prefer packaged installs.
 
10:38 AM
Have you ever re-coded PHP land stuff to lower memory usage?
 
hmm?
You mean convert PHP code into C code?
 
@LeviMorrison Does being stupid and trying to load huge files in memory count? :P
 
That or rewrite the code to do something that is less memory intensive?
 
@LeviMorrison I have once written an extension that pulls video thumbnails using ffmpeg and did some opencv stuff as well.
Not that face detection with PHP was ever going to happen, but still.
 
@Gordon 3v4l doesn't have gmp - in 5.6 that will throw a warning that you passed garbage to gmp_init in the first call
 
10:43 AM
@NikiC but why does HHVM give 9?
 
Question: For some reason network traffic between my web server and sql server (both VM"s on ESX). This seems to happen even though NICs' are configured for gigabit. Transferring a file manually does use its full speed.
Is there a mysql configuration parameter limiting network traffic ?
 
@DamienOvereem You are missing part of your first sentence :P
 
Question: For some reason network traffic between my web server and sql server seems to be limited at 100MBit (both VM"s on ESX). This seems to happen even though NICs' are configured for gigabit. Transferring a file manually does use its full speed.
 
@Gordon yeah wait
 
o there
 
10:45 AM
@DamienOvereem "For some reason network traffic between my web server and sql server..." is fast / sets my cat on fire / raped my sister
;)
 
how did that happen o>O
 
@Gordon ah, hhvm doesn't support overloading
you end up adding the resource id's ;)
 
hehe
 
which is 4 and 5 (the other three are stdio)
 
oh now im editing an earlier text.. sometimes chat is.. weird
 
10:46 AM
@NikiC ah ok. thanks. that's very unobvious.
 
awesome interview question ^^
 
Question: For some reason network traffic between my web server and sql server seems to be limited at 100MBit (both VM"s on ESX). This seems to happen even though NICs' are configured for gigabit. Transferring a file manually does use its full speed.
Is there a mysql configuration parameter limiting network traffic ?
There.. that was hard ..
 
@LeviMorrison Performance wise, wouldn't $in = substr(str_repeat('?,', count($ids)), 0, -1); be less memory intensive than $in = join(',', array_fill(0, count($ids), '?'));? I'm thinking that the latter will allocate a lot more memory since it needs to allocate memory for an array...
 
@NikiC Happy birthday! :)
 
@DamienOvereem Thanks :)
 
10:47 AM
again?
 
@NikiC You've become a full grown man now? :P
 
@HamZa Probably less memory, yes.
 
Anybody seen @Fabor today? Did he came out alive of the sex change?
 
lolwut
 
But probably not savings I'd care about.
The array should be freed immediately after the join as there aren't any more references to it.
 
10:49 AM
morniongs
 
moioiojkjhjkhjkhjk hdave
 
haha true :)
I was just thinking in case the array got really big but I guess then there's something wrong somewhere else in the logic...
 
@PeeHaa srsly? moioiojkjhjkhjkhjk? you can do better than that!
 
mooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo‌​ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo‌​oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooornings
 
@salathe Are you trying a div-overflow?
 
10:52 AM
@HamZa No
 
haha
 
@Ja͢ck I done something like that ... there is a library about for opencv cascades and object detection ...
@salathe indeed
 

« first day (1501 days earlier)      last day (3438 days later) »