« first day (2316 days earlier)      last day (2625 days later) » 

Anonymous
12:23 AM
nn shitlords
 
night shitlady
 
Wes
rofl, gn \o
 
he is a pretty shit lady, has testicles and everything
 
Wes
1:00 AM
 
How other people see it: "Free coding service"
 
fuck angular
7
 
Wes
@tereško funny trivia: angular in italian sounds like "taking it in the ass"
and nomen omen, as you know
 
nah, angular2 is such great
such shinies providers, very injectable pipes, many ways to throw your computer by the Windows™
 
Wes
1:25 AM
lol
 
Evening all, wondered if someone could help me with this error message I'm getting when trying to seed a postgres database from laravel migration:
[InvalidArgumentException]
Start date must be anterior to end date.
I've been stuck for the last hour or so and I'm stumped
I've removed the migrations, remade them, cleared the DB... clueless
 
can we see a gist of the migration file ?
 
yea sure, there are 4 in total... and then a model factory mocking up some data with faker. 1 min
actually there are only two really as two of the four are default(password reset and users)
migration 1:
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCertsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('certs', function (Blueprint $table) {
$table->increments('id');
$table->integer('cert_employee')->unsigned()->index()->nullable();
$table->foreign('cert_employee')->references('id')->on('employees')->nullable();
$table->string('cert_name')->nullable();
Migration 2:
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEmployeesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('employees', function (Blueprint $table) {
$table->increments('id');
$table->string('clock_number')->unique();
$table->string('employee_forename');
$table->string('employee_surname');
$table->string('employee_contact');
$table->string('employee_email')->unique();
 
haha
sorry
I'll do that now
 
1:36 AM
it's unreadable like this
 
ok
 
@Meeps we dont do laravel here
try laravel.io/chat instead
 
shiite, that stuff exists
 
@tereško How was Divinity: Original Sin?
 
1:40 AM
thanks, I'll try there instead :)
 
@FélixGagnon-Grenier I have been learning angular for past two days
 
2 I hope?
the documentation is quite witty. I like it
 
1
 
@Meeps I think the error message is pretty clear. Faker doesn't let you create a start date anterior to the end date
I would change those lines:
 'start_date' => $faker->dateTimeBetween('1978', 'now'),
 'end_date' => $faker->optional($weight = 0.1, $default = NULL)->dateTime($max = 'now'),
 
1:43 AM
Because it was already partially used in the site that I am working on
 
@Valentincognito thanks I'll change it!
cheers for the help
 
And I had no intention to learn Google 's 5th attempt in replacing javascript
And there are almost no docs for it in native javascript
 
true that. sigh the perspective of programming angular2 without typescript seems... very off putting
 
Yes
Used angular2 last 9 months and I would throw up not using typescript also
btw soon its angular4
 
tbh, in the same fashion I was super hyped with jquery when I first learned about it before realizing how much shit it was, I am somewhat starting to like pure ecmascript 2017
like, I like arrow notations, and syntactic sugar, and webpack
I would totally manage apps through it, with php templating
even if I do like react, a lot.
 
1:50 AM
well reactjs is also nice
frontend is just very crowded
so many libs
 
the only problem is, reactjs totally relishes (not sure if that's the word) php to a api role
 
yea
That is how is should be imo
 
I. Like. PHP. Templating.
 
I hate it
 
1:51 AM
oh not really php templating
but server side rendering
 
Oh. I really mean .php templates
 
=)
ttyl sleepy time
 
Wes
@FélixGagnon-Grenier good man
 
@Wes yea, you indeed had a role to play in that
 
Wes
1:55 AM
i did?
php is great with templates. the only problem it has is that <?php gets tedious to write, but i don't give a f. about good practices and i enable short tags. <? foreach($a as $b){ ?>
 
heh. two secs I'm trying to find the post
Nov 9 '15 at 21:12, by Abe
@FélixGagnon-Grenier a sign that you should be using php as template engine :P
this is where it began
roughly at that time, I was starting to understand packagist, made my templating package, and have been very happy with it since
 
Wes
lost phpstorm settings again...
 
how did you achieve that?
 
Wes
thanks universe, you are always so kind
 
quick question: in " (int)$var " it is the first time I see the (int) in a PHP code, is it normal or did I sleep through an entire class when I was a student ?
 
Wes
2:09 AM
it's casting
 
Wes
converts a primitive type (eg string, float, bool) to int
 
you know, like fishing with a net? only it's a type.
 
okay
basically I got a code from a blog to calculate the EMI for Home loan and it goes like this:
(int)$money_profit        = $money_total * $profit;
(int)$money_tax           = $money_profit * 0.275;
(int)$money_profit_amount = $money_profit - $money_tax;
(int)$money_principal     = $due_amount - $money_profit;
(int)$money_total         = $money_total - $money_principal;
so basically they just make sure that what you give to that formula is a int right ?
 
Wes
so rather than loading from the settings dir, it reset'd it
 
2:13 AM
but obviously I feed that formula with int, so the (int) aren't really useful
am I right ?
 
they're doing nothing on that side of the assignment
 
I thought so
 
Wes
lol
basically that has no effect @Valentincognito
 
cool , bye bye then
lol
 
Wes
$money_tax = (int)( $money_profit * 0.275 );
 
2:15 AM
thanks @everybody
 
Wes
this actually does it
 
yeah but I don't think I need it
 
Wes
this is already a sign it's pretty bad $money_profit * 0.275
money and floats are a bad idea :B
 
don't tell me about it
I am getting crazy about this whole project
 
Wes
> Make sure you're using forward slashes.
obviously i didn't read that, even if it's on the line right above :B
 
2:18 AM
I have to calculate real-estate investments profits / interest this kind of things but it's in South Korea and they have different tax system and it's complicated
I have no other choice but to copy other korean sites formulas
with int types and because of the round up or down the customers always end up with more or less money than he should
that's stupid
but it isnt' thaaaat bad I think because korean currency doesn't have cents
anyway story of my life
no one cares ^_^
 
Wes
settings recovered \o/
@Valentincognito lol
 
and it's lunch time anyway \o/
bon appetit
 
Wes
enjoy, lata :P
 
@Valentincognito use bcmath.
 
Wes
!!packagist bigdecimal
 
2:25 AM
@Wes Usage: !!packagist vendor package
 
Wes
someone should make a packagist search plugin - maybe it will be me :P
 
!!? packagist bigdecimal
 
@FélixGagnon-Grenier Did you know? That packagist bignotation... doesn't exist in the world! Cuz' GOOGLE can't find it :P
Search for "packagist bigdecimal" (https://www.google.com/search?q=packagist+bigdecimal&lr=lang_en)
• Packagist The PHP Package Repository - PHP. che/decimal. Immutable arbitrary-precision decimal implementation for php 5.3+. 3 477 2. PHP.… (https://packagist.org/search/?tags=bigdecimal)
• brick/math - Packagist - 17 okt. 2016 - BigNumber: base class for BigInteger , BigDecimal and BigRational … BigDecimal: repr… (https://packagist.org/packages/brick/math)
• arkitekto/math - Packagist - 28 mei 2016 - The BigInteger , BigDecimal and BigRational classes are immutable: their value never… (http
 
@Jeeves you smartass
 
@Gordon Hey there! I'm doing well, and yes, the computer is coming along well :)
 
2:26 AM
@Jeeves .... maybe not so much. oh right, you've been disabled. lol
And that's a figure we haven't seen in a long time! Howdy @ircmaxell. Is Go still treating you well?
 
meh, been floating among several languages. Haven't really been involved in any communities
 
Wes
wb ircmaxell, congrats for your computer, it's amazing :D
 
thanks :)
 
2:47 AM
Hello!
It's been a while ^_^
 
Wes
do you know how to install this in phpstorm? github.com/kalessil/phpinspectionsea do i need to compile it or something?
 
Guys, what is used for wiremock solution in php? Any recommendations?
 
3:08 AM
Anyone here know if nohup can only run on executable at a time? It seems like that way to me
 
mornin
 
I am using it to run a PHP script during deployment and it can run the first one but it sort of temporarily runs the second one. They are both PHP scripts run from the command line
 
@ibanore Not understanding what you mean...
 
Wes
@PaulCrovella i mean the master version, not the release.
 
3:14 AM
nohup installs a signal handler that ignores hangup signals and execs argv[1..n] no?
 
Wes
but nvm, hopefully will appear soon in the eap
 
@adsr It's okay. The problem is else where. My second script has a problem with it. The deployment script was executing loads of tasks via SSH so it made it harder to track down
 
@Wes This appears to be the section for setting up Gradle and then building it. jetbrains.org/intellij/sdk/docs/tutorials/build_system/…
 
Wes
@crypticツ noice your new avatar :B
 
You know, there have been some really interesting answers to my 300 point bounty question (stackoverflow.com/questions/42172228/…), but I feel that no one has really answered it completely as described in the introduction. If anyone can truly speak to the heart of my question(s), I would love to hear it.
 
3:39 AM
I tried to read it but started drifting, sorry
Not a fan of global DI object
I only skimmed it so apologies if that isn't what you're using, that's my only comment
 
you would have... several local DI containers?
 
@AnthonyRutledge plenty of people answered it completely: no, that's not how mvc frameworks typically use a router. and the spam is getting old fast.
if you want code review take it to the code review stackexchange site. if you want open-ended discussion, take it to a forum
 
Wes
moar phpstorm: do you know if there's a way to set the icons back to their original size -__- i.imgur.com/hJPZ723.jpg
 
3:54 AM
@Wes seems to be tied to Editor > Colors & Fonts > Font - primary font size
 
Wes
i used to always have 14px but icons were way smaller... :\
 
yeah, I've got 14 and mine are smaller, that's just the only setting I found that has any effect
dunno how you managed to get what you got otherwise
 
morning r11
 
Wes
bloody hell
 
o/
 
 
2 hours later…
5:43 AM
Mornings
 
5:54 AM
user image
5
 
@Valentincognito lol
morning joe,flelix
 
Wes
\o
@JoeWatkins i'm very confused. i thought
function __debugInfo(){ return (array)$this; }
didn't work, but it does
https://3v4l.org/6VkJS
https://3v4l.org/Gr2Nv
identical output :|
 
6:33 AM
php.net is currently spitting HTTP ERROR 500
 
oh nooo
 
hi guys, morning
having a doubt while in mysql insertion data
 
Wes
@JoeWatkins so basically this is enough 3v4l.org/QhE4t sorry :B you did object_dump() in kore for nothing :B (thanks though...)
 
morning
 
Wes
actually you don't even need the closure lol
 
6:37 AM
inserting 100,000 records from php to mysql db will it insert same h:i:s for every insertion
 
pls clear the above doubt freinds
 
am I a bad person if I was really about to answer you, but the fact that you asked again for it put me off?
 
Wes
the only missing info is the class name, the object handle and the refcount
 
@techy-coder that depends on how you create the date
 
6:42 AM
... I guess that means yes.
 
@Gordon Thanks for your reply, basically with field type datetime=> Y-m-d H:i:s
 
@techy-coder yes, but how do you insert it? We'd need to see the code you use.
 
yes
 
Wes
@JoeWatkins jesus, php is so depressing... sorry for the pings, do you have a minute?
 
I broke php.net, wait
 
6:47 AM
@techy-coder if you do it like this: $date = date(); foreach ($records as $record) { $db->query("INSERT INTO foo (created) VALUES ($date)") } it would always be the same date. If you insert it like foreach ($records as $record) { $date = date(); $db->query("INSERT INTO foo (created) VALUES ($date)") } it likely will end up with a different time. if you dont create the date in php but let it get created by myqsl on insert, it will likely have a different time portions as well.
 
if(is_uploaded_file($_FILES['file']['tmp_name'])){
//open uploaded csv file with read only mode
$csvFile = fopen($_FILES['file']['tmp_name'], 'r'); $datetime=date("Y-m-d H:i:s");
//skip first line
fgetcsv($csvFile);
//parse data from csv file line by line
while(($line = fgetcsv($csvFile)) !== FALSE){
//insert query
}
 
it doesnt show the insert
 
hi gordon
just a min creating
 
also, if you are not preprocessing the data with PHP, e.g. change values in it, then consider using dev.mysql.com/doc/refman/5.7/en/load-data.html - much faster
 
hi gordon, i am doing the csv bulk import and insert with the following,

if(is_uploaded_file($_FILES['file']['tmp_name'])){
//open uploaded csv file with read only mode
$csvFile = fopen($_FILES['file']['tmp_name'], 'r'); $datetime=date("Y-m-d H:i:s");
//skip first line
fgetcsv($csvFile);
//parse data from csv file line by line
while(($line = fgetcsv($csvFile)) !== FALSE){
//insert query
$sql="INSERT INTO `campaign_details` (`id`,`origin_campaign_date`, `origin_campaign`, `origin_product`, `origin_campaign_type`, `created_datetime`)
 
Wes
6:53 AM
@JoeWatkins rofl
 
:35707070
 
@techy-coder yes, use LOAD DATA INFILE instead
 
@Gordon - My client is in need to use front-end for import the datas, will the load data file work using the query? is it possible, cause i never come across
 
I wonder if I'm ever going to do a release without making a total mess
 
it's part of your charm
 
6:58 AM
that's the first time I brought down php.net ...
 
@techy-coder yes, it will work. and it will be faster and more secure
 
@JoeWatkins it's only the front page, others are working fine
 
yeah I know, I fixed it already, waiting for sync ...
stupid mistake ... messed up a single array ... like a total fucking newb
 
@techy-coder on a side note: you should read up on sql injection and migrate your code to mysqli or pdo. and likely upgrade your php to a more recent version.
 
it's back ...
@Wes what did you want ?
 
7:00 AM
\o/
 
this was kinda epic
 
Wes
@JoeWatkins so yeah (array)$object would work to access the old style dump, except that it's broken.... it uses __debugInfo -__- 3v4l.org/VKbPj
 
I think I we should buy @JoeWatkins a t-shirt with "I broke php.net, wait" on it
 
every time I go to contribute to php docs I get annoyed with the online editor and give up. someone please tell me there's a better way
 
@PaulCrovella running locally and editing xml yourself
 
7:03 AM
of course, with a "...but I fixed it in 12 seconds top" on the back
 
@FélixGagnon-Grenier very funny
 
Wes
it's a bug, right? we don't want (array)$object to use __debugInfo
 
I think we don't
 
@Gordon Yes Gordon, i need to upgrade and also inno db engine process of inserting the data will take it slow ? cause i am inserting some millions of records will it affect db performance?
 
I'm not sure why it does
 
7:04 AM
@JoeWatkins trying my best
 
@JoeWatkins I'd love to, but where/how to send the PR
 
Wes
should i file a bug?
 
yes
@Paul it doesn't do prs, is svn ... request doc karma
 
@Gordon what's your opinion? advice me
 
7:07 AM
you forgot expected output, actual output
 
@techy-coder the main slowdown at the moment is you inserting one record at a time. everything else is irrelevant for now.
 
@JoeWatkins which requires a php.net account, and both of which I should already have commits/patches to point to when requesting
 
persevere with doc editor, get a couple of patches done, then request doc karma
the doc editor is okay for little patches/corrections
it's just when you want to preview complex pages it's a bit crap ... or add folders ...
(or files)
if you do a couple of little ones, and then request karma and say you want to do some big thing/put a bunch of effort into a bunch of things, there's no reason not to grant you karma ...
 
it's super annoying to navigate even when it's working properly, let alone when shit gets stuck on loading spinners
 
@Gordon So, what should i want to follow to work this? pls
 
7:11 AM
newsflash: tooling for php is crap
maybe even volunteer to work on the editor itself ... if you're up for that ...
 
i'm not a frontend guy
 
@techy-coder I told you already. Replace your while loop with a single query doing LOAD DATA INFILE
 
the crashing/slowdowns are at backend
doubt you'd have to touch any markup/client scripts to fix those problems ...
 
those I can look into then.. but really I'd rather trash the online editor and svn, jam the docs into github and let people fork & pr to contribute
 
Hello
 
7:14 AM
the docs project is extremely complicated thing, with translations and what not ... plus the editor would have to be updated to use git (guess not that hard) ... the reason it hasn't been done is because of how complex the structure of the thing is ...
it was easier to migrate php itself than the docs
 
@Gordon Fine, Understood Gordon will use that to work. Thanks for your reply and have a good day
 
you are welcome
 
meurning
 
Wes
how do i improve the description / parameter names here?
/**
 * Repeats the n-`$last` operations n-`$times`.
 */
function repeat(int $last = 1, int $times = 1){
    if($last > count($this->queue)){
        throw new Error(
            "Not enough operations to repeat; only " .
            count($this->queue) . " are available"
        );
    }
    $repetition = array_slice($this->queue, $last * -1);
    for($time = 0; $time < $times; $time++){
        foreach($repetition as $operation){
            $this->queue[] = $operation;
perhaps it's latest...?
@JoeWatkins so yeah, i'm an imbecile. (array)$object obviously is not recursive
bugs.php.net/bug.php?id=74117 kill it with fire please
time to go to bed
 
7:30 AM
Mornin'
Is there any known good solution for wiremocking in PHP?
I did look through Google and it proposes view solutions. So I thought, that it would be faster to ask here.
 
Moin
 
Front-end dev
Back-end dev
Lead-dev ... What is a lead doing... is he 'steering' the front & back-end devs'?
 
Lead dev == manager
 
Oh ok :)
 
So he's steering them in a wall yes
 
7:37 AM
Haha :D
I think it's a pretty cool job being lead-dev.
 
happy friday, R11!
!!friday
 
Hihihi
 
7:50 AM
> pass in: $ php configure.php --disable-segfault-error.
that's the best thing I've read all day
 
8:07 AM
yay, HR approved my time off so I can go to my own graduation ceremony
 
how generous of them
 
I must admit that I may have pushed things a little too far
I asked for 3 WHOLE DAYS OFF
After working for 4 months without a day off
what a slacker I am
 
wait, 3 whole days in a row?
 
yes
Ceremony is on friday, so I took friday
But it takes 6 hours to go to Paris in train
So I travel on thursday (second day off)
 
that's amazing. hell, you should be paying them to work there
 
8:12 AM
and because I'm an egoist piece of shit, I want to spend some time with friends on Paris, so I'll only leave on monday (third day off)
Yeah I think I won't take any more day off and refuse to be paid for not taking them
Y'all mad of my days off
 
:D
 
Does php room still have in use?
 
8:28 AM
I don't think so
 
that's already closed
 
Mornings
 
Right. My bad.
Feeling sleepy.
 
sup peehaa
 
8:33 AM
Peeeeeehaaaaaaaa is it like K.O.?
 
I'm watching this video where this guy claims to have learned Rails in 30 days.
Don't you have to learn Ruby first.
 
@Eugene what is? :)
 
Your nick :) Pee.Haa. | K.O. :D
 
Nope it's not :)
 
o/
 
8:45 AM
@SalOrozco No, why? People also use jQuery without knowing anything about JS.
 
@kelunik I guess you are right.
Even if they know idea what is happening behind the scenes.
 
8:57 AM
Hi
 
Morning 11
 
o/
 
I imagine a large version of that is Laravel in php
 
Anonymous
!!google php secure image uploader
 
Search for "php secure image uploader" (https://www.google.com/search?q=php+secure+image+uploader&lr=lang_en)
• GitHub - samayo/bulletproof: PHP secure Image upl… - PHP secure Image uploader, with a nice API. Contribute to bulletproof development by creating an ac… (https://github.com/samayo/bulletproof)
• php - Full Secure Image Upload Script - Stack Ove… - 21 jul. 2016 - When you start working on a secure image upload script, there are many things to con… (http://stackoverflow.com/questions/38509334/full-secure-image-upload-script)
 
Anonymous
8:58 AM
this is wrong
 
I got an issue with jquery not defined while it is loaded before every script
 

« first day (2316 days earlier)      last day (2625 days later) »