« first day (2469 days earlier)      last day (2704 days later) » 

22:02
@KamilSolecki I've been independent but with one main client forever, not really free-range.
Ah I see. Well, congrats on your promotion then!
@Luggage everything work(ed/ing) out with that?
Yup. :)
niiice
I am finally getting myself to building a coding / gaming rig. I've been missing a PC at home since I transferred mine into the office. Have been using a laptop at home ever since
2 monitors yay
Somebody ran over a bottle of lotion lmao
the money shot
@SterlingArcher The captions that that will get
22:09
i am getting this type error core.es5.js?0445:1020 ERROR TypeError: this is not a Date object.
Also, anyone here uses a screen with pivot? It seems really cool for coding purposes, just wondering if it's worth it
This will never not make me laugh
Is that a challenge
I'd take you up on it but I'm a lazy fat bastard
22:11
that shows how you extend the Date prototype
Kendall here has proven that I'm the most child-looking 22 yo.
@KamilSolecki like a vertical monitor?
@ssube a monitor that you can turn 90 deg
gfycat.com/TartSmallDugong this is literally why I can't drink raspberry anything anymore
22:13
So you can see more codez
yeah, I had one. I wasn't a huge fan. You can see plenty of code, far more than you can actually think about.
i'm trying to find the smallest 4k monitor i can.
it's hard to get a small on that isn't part of a laptop
@Luggage I did that and it does work... but there has to be a more es6 typescript way...
here is what I have come up with
22:16
I was thinking these: asus.com/Monitors/MG279Q
"more es6"?
Good specs for the price
+ 2K is all I need
fuck 2k.
yes like extending the class such as @AK showed me
check it
import { Injectable } from '@angular/core';
import moment = require('moment');

@Injectable()
export class DateRangeHelper extends Date {

constructor( ) {
super();
}

/**
* wait for it
*/

addDays(days: number) {
console.log('Days =', days);
let date = new Date(this.valueOf());
console.log('this.valueOf = ', this.valueOf());
console.log('date 1 = ', date);
date.setDate(date.getDate() + days);
console.log('date 2 = ', date);
return date;
}

getDates(startDate: any, stopDate: any) {
console.log('startDate: = ', startDate);
guys acknowledge these dope gifs
A K
A K
22:18
you can also add straight to the Date interface
you're supposed to say "Dank Memes" that's what all the kids are saying these days
A K
A K
finished my overwatch games
you can extend Date with a new class, but I wouldn't replace window.Date with it.
So @AK does that look good to you? that way I didn't have to create a prototype but actually just extended the class
Also, you aren't passing your contructor args in super(). I would.
22:20
@Luggage what do you mean
but it's not about "more es6". These are not 100% the same. One is adding a method to Date.prototype and one is making a new class that inherits date. Both are valid methods with subtle differences
still a little confused about that. like anything that extends date
ok so for example... this is the code i am running in my other class
this.dateArray = this.dateRangerHelper.getDates(new Date(), (new Date()).addDays(7));
A K
A K
what are you trying to do ultimately?
22:24
that second paremter fails because I don't have date extended... how do I extend date to take that method
sorry extend whatever, in this case (new Date()).addDays()
A K
A K
You were adding a prototype to your Date object right?
let's backtrack
I linked the method for that.
13 mins ago, by Luggage
@ChristianMatthew see: https://github.com/Microsoft/TypeScript/issues/7726#issuecomment-204056766
A K
A K
i made an error in adding to the interface because when i was attempting it, i wrote interface Data instead of interface Date
so what do you mean
let me look at it again..
and hahah read these 2 sentences...
this is from Mozilla
A K
A K
it's bad practice to declare a global interface right luggage?
22:26
this is how to add to Date.prototype
and this is from typescript
Derived classes that contain constructor functions must call super() which will execute the constructor function on the base class.
"declare" is for patching existing types, and parts of JS are in global.
so hmmmm... ok so the method I still have to make a prototype
posted on July 20, 2017 by Jeremiah Senkpiel

Notable changes http: Writes no longer abort if the Socket is missing. process, async_hooks: Avoid problems when triggerAsyncId is undefined. zlib: Streams no longer attempt to process data when destroyed. Commits [8d426bbeec] - http: do not abort if socket is missing (Matteo Collina) #14387 [302c19b006] - process: triggerAsyncId can be undefined (Matteo Collina) #14387 [6fce1a314e] - zlib:

so what, if anything... can I do about this
this.dateArray = this.dateRangerHelper.getDates(new Date(), (new Date()).addDays(7));
that .addDays(7)... because I don't have the prototype as a constructor function... isn't firing off.
22:44
Anyone know how to print a json object into a pre tag while preserving newlines?
The issue im getting is that json stringify is converting the newlines into \n
newlines within strings?
or between items, like keys in an object?
because the first one (real newlines within a string) are illegal in JSON, but the latter is just a parameter
Real newlines i believe, i remember logging to console recently and the newlines showed up as little enter button arrows (is the proper term carriage return?)
@rlemon @SterlingArcher got my final weigh-in and after pics up. Please excuse the derpy facial expression.
@ROODAY it doesn't matter, both newlines and returns are explicitly disallowed
You could just replace the \n with newlines before putting it in the <pre>. Just note that it won't be true JSON, so people can't copy and paste from it, if that's your goal.
22:47
@BadgerCat see above, for your consideration :P
if you want to copy from it, keep the \n's
Ill try the former, copying isnt really an issue, at least not for JSON (im trying to display an error object, which includes a stack trace)
I see.
why not format the whole thing, skip the fake JSON, and give them a nice display?
^ even better
22:52
💡
I've been working on a project for a month built on Magento. It has been outsourced at least 3 times to cut-rate programmers. It has been in development for more than 8 years. It has taken me over 35 hours to simply add 4 fields to a form.

The client refuses to start over. My bosses and the client are becoming angry with the amount of time it's taking. I've only worked here a month...my coworkers tell me all the time that they're very glad they didn't end up with the project I was on.

What would you more senior guys do?
ok @Luggage this statement is giving me this type error
this.dateArray = this.dateRangerHelper.getDates(new Date(), this.dateRangerHelper.addDays(7));
core.es5.js?0445:1020 ERROR TypeError: this is not a Date object.
this is my helper
which I am pretty sure is refrence of this
import { Injectable } from '@angular/core';
import moment = require('moment');

declare global {
    interface Date {
        addDays(days: any): any;
    }
}

@Injectable()
export class DateRangeHelper extends Date {

    constructor( ) {
        super();
    }

    /**
     * wait for it
    */

    addDays(days: number) {
        console.log('Days =', days);
        let date = new Date(this.valueOf());
        console.log('this.valueOf = ', this.valueOf());
        console.log('date 1 = ', date);
but like i said when I run that above statement I gett that cooresponding type error
I'm on break.
@Allenph we often underestimate the difficulty of starting new projects... an ecommerce software is not a piece of cake
fix existing software. re-write chunks of it
or layers
or re-factor into chunks and layers
only re-write if it's built on bad tech you can't change. Like a language that isn't supported.
like foxpro
22:57
flexml
I'd rip out the form and redo it, without touching anything else if you can
cfml
magento is pretty bad guys
I have no idea what that is, actually.
it's php
22:58
ohh god
like drupal for bad stores
I once wanted a blog but didn't feel like setting up cloudfront and hugo, so I installed drupal on a VM. Like a week later I was an experienced cloudfront user.
and in a drupal support group?
magento is a mess
@Luggage is that what you call a bottle of stoli?
but i doubt alternatives are much better
A K
A K
23:00
ugh, waiting on a final message from the company, i know they're going to reject me
if, as a drupal user, you can afford it.
well, the nice part about drupal is you don't need much hardware. It doesn't get faster on a bigger machine.
It's built on a terrible PHP framework.
Like, you should seriously Google Magento just to see what a trainwreck this thing is.
i have safe search on
@Luggage That is without mentioning 8 years of indian dudes that have literally no idea what they're doing.
23:04
@monners holy shit, you win
2
It has NEVER been live.
so. yea. I quit last time i was put on a project like that.
they are probably just as desperate as you @Allenph
@monners do you know your fat %?
magento is insane
@Allenph do you have experience with other ecommerce software?
you can set up one and tell them it can cover [insert percentage] of the current features
maybe they would be more willing to accept the switch
23:14
Anyone know why my chrome devtools have stopped allowing me to set breakpoints in lambda functions? (as described here: https://stackoverflow.com/a/44127042/227622 )
Was previously working, but now is not - both in Chrome 59 and Canary 61
@BadgerCat My scales say 18%
But I don't know how accurate they are
You look like a 10%
Still got some love handles
Hoping to have my abs back before Summer
im pretty lean, but i still have a bulge around my waist
@monners me too :(
23:23
0
Q: Is there a way to pass an arraybuffer from javascript to java on Android?

youpiI'm stuck for a moment on this case. I have a webview on Android 4.4.3 where I have a webapp who has float32array containing binary data. I would like to pass that array to the Java Android via a function binded with JavascriptInterface. However, it seems like in Java, I can only pass primitive...

But only if you pinch very hard
@WesStark I've built some large enterprise stuff from scratch, actually, but...
it's several hundreds of hours anyway...
23:41
@BenjaminGruenbaum oh juicy bounty :D
/me reads cordova android source code
@towc cheers that did it
in the end... this got it working
````
// import { Injectable } from '@angular/core';
import moment = require('moment');

declare global {
interface Date {
addDays(days: number): Date;
}
}

Date.prototype.addDays = function(days: number): Date {
console.log('Days =', days);
let date = new Date(this.valueOf());
console.log('this.valueOf = ', this.valueOf());
console.log('date 1 = ', date);
date.setDate(date.getDate() + days);
console.log('date 2 = ', date);
return date;
}

// @Injectable()
export class DateRangeHelper {

static getDates(startDate: any, stopDate: any) {

« first day (2469 days earlier)      last day (2704 days later) »