« first day (2746 days earlier)      last day (2200 days later) » 

10:00 AM
but his case was that it had to be enclosed in the main() { ... }
definitely needs a parser
with the import you could even check if it is at the start of a line
(with any number of whitespaces as prefix)
 
Please do any one know how i can format a number date coming back from an API to to a Date format
Am using ejs to serve my template
 
parse it yourself or use a date library like moment.js
 
new Date(your_date)
 
moment.js kk thanks let me try it out
 
if you are not using that a lot, then create a standalone function that handles the task and share it throughout your pages
@Neoares no ...
you should be aware that it is not reliable
 
10:06 AM
why
 
i have used new Date() function it gave me a very wrong date
 
it relies on your browser locale, which then uses the OS locale
 
it dated back to the 1900s
 
@KarelG so
 
it is not consistent among multiple users
 
10:06 AM
@FillipoSniper 1970 to be exact
 
and moment.js is?
 
then it's not 100% client side library
 
@Neoares yes because it parses the date manually
 
that's what it means
 
10:07 AM
which returns back to my first suggestion
> parse it yourself or
 
I will give moment.js a try, but is there any other way or any javascript function that can handle that
 
TIL in america they add "PM" after the hour, even if it's saying 17:00
 
that api, in which format does it return the date
 
like, very redundant
 
@FillipoSniper You can specify the date if you want to hard code it. new Date (year,month,day,hour,minute,millisecond) - Important to note the last 5 parameters are optional.
 
10:10 AM
!!> new Date(2018,1,1)
 
am calling the parsed in object like crypto.RAW.BTC.USD.LASTUPDATE
 
@Neoares "ReferenceError: date is not defined"
@Neoares "1970-01-01T00:00:02.018Z"
@Neoares "2018-02-01T05:00:00.000Z"
 
._.
 
month starts with 0 fyi
 
lol
 
10:11 AM
see, you even struggle with it
 
I don't use to handle that things
 
how then can i specify it in the new Date() function @New_2_Code
 
the native Date API construct is flaky
 
I don't even consider myself as a frontend developer xD
 
@Neoares Luckily we don't have date and time in the backend
 
10:11 AM
I'm a fullstack developer, data scientist wannabe
 
I sometimes work front end. Most of my work is usually backend and processing
 
@OliverSalzburg aaah but you don't have to mess with sync shit :P
 
thats's nice @Neoares
 
server side date is groundtruth
 
im full stack
 
10:12 AM
javascript is for fun
 
> StackOverflowException
@KarelG i can hardly agree on that
 
@Neoares The good thing about the backend is, if it's not working, you blame it on the client
 
@FillipoSniper If you want to return the date you could do something like: var myDate = new Date (Year,Month,Day); return myDate
 
@OliverSalzburg and vice versa?
 
@Wietlol I fiddle with it in my spare time.
 
10:13 AM
@Neoares Good point
 
that's how companies work
 
helps me to do some front end stuff at work.
 
blame others, ggwp
 
i wouldnt even want to touch it in my free time
the only js I found to be fun didnt work
 
!!tell Wietlol lenny
 
10:14 AM
@Wietlol ( ͡° ͜ʖ ͡°)
 
free time is for touching it
 
@Wietlol This again?
 
1 message moved to Trash can
@Wietlol Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
lol
 
2slow4cap
 
10:14 AM
get rekt, boi
 
@CapricaSix WHY?!
 
*does nelson haha @ Wietlol*
 
!!tell Wietlol why
 
@Wietlol because you touch yourself at night
 
in any case, that was the only fun I had with javascript
 
10:15 AM
eh, you said you don't touch in free time
 
and it didnt even work
I didnt make it
maybe oliver did, iDunno
Apr 5 at 22:22, by Oliver Salzburg
Object.defineProperty(global,"dice",{get:()=>Math.random()}); throw dice
yep, oliver
 
iDunno X Pro
 
@OliverSalzburg it didnt work in jsfiddle though
> Uncaught ReferenceError: global is not defined
any idea why?
or did you just write bullshit?
would be quite the bummer, the only fun I had with js turned out to be bullshit
 
@Wietlol global is the global variable in nodejs, in browsers it's window
 
i see
in that case, it works, except that it returns a float (for obvious reasons)
 
10:21 AM
I'm having the _this2.props.myfunc is not a function error in react
:cries:
 
@Wietlol Yeah, what @FlorianMargaine said :D
@Wietlol I left that as an exercise for the reader
 
I think that's you, @Wietlol
is there a SE for hardware?
I'm thinking of buying a i7 8th gen, but I dunno if I should wait till 9th gen
 
40
Q: Hardware questions and Stack Exchange

EugeneRecently I wondered about a webcam on my laptop; about the driver problem with it and about all stuff related to devices and hardware. I see, that the Stack Exchange network has Q&A about: programming and servers mostly, but what about hardware specifically? Is there or will there be a Stack Webs...

 
!!> let f = _ => Math.trunc(Math.random()*6 + 1); Array.apply(null, {length: 5}).map(Function.call, f)
 
@KarelG [6,6,3,2,2]
 
10:24 AM
@Wietlol there you go
 
@Neoares Yeah, don't ask that on Super User. That's all Hardware Recommendations
But your question seems pointless IMHO :D
 
WTF
 
Answers will range from "Yes, wait, next gen is more awesome" to "No, previous gen is awesome and more cheaper"
 
well, I want opinions, then I'll make my own decision
that's how it works
maybe I'm missing some details, and someone knows them :P
 
Opinions are horrible. Except mine
 
10:28 AM
it is difficult to wait
 
Just let clippy help you heartless human
 
for the same moment the next release is garbage or too expensive
it all depends of your current CPU and when the next release is
 
@KarelG wot?
 
@OliverSalzburg what should I do
 
> Math.random()*6 + 1
what happened to Math.floor(Math.random() * 6) + 1 ?
 
10:29 AM
I just bought a Broadwell-E based system instead of going Skylake. Skylake was just way more expensive and I didn't want to spend that much :P
Sure, it would be more awesome, but it would also cost like 1200€ more and I just don't want to spend that much
 
also, = _ =
 
You got the 6950X didn't ya
 
i might like the js syntax
 
that +1 should be outside the trunc
 
the only hardware rec I can give is to not buy a graphic card
 
10:30 AM
or I could use >> 0 :P
 
@KamilSolecki 6850K
 
@KarelG it is
>> 0 and + 1 are obfuscation and implicitness
I would never accept such trickery
 
With 64G of RAM and a nice Workstation class board. Came in just below 2000€
 
js voodoo !
 
And no GFX card obviously
 
10:31 AM
@OliverSalzburg what are you talking about
is that related to my question? xD
 
yes
GPU prices is too high
due of those stupid bc miners
 
you can not mine bc with GPU, noob
 
yes you can
 
you can not mine bc without GPU, noob
 
@Neoares Maybe :D I was just sharing a recent purchasing decision that felt related to yours
 
10:32 AM
sure you can
gl with efficiency
 
you cant, at best you get 0.00001 bc
 
the GPU has more FP units ...
ideal for advanced math tasks required for mining bc
 
to mine bc you need a specialized ASIC
!!s/advanced math tasks/quick maths/
 
to mine bc, you must be an idiot, or have free power
 
@Neoares ideal for quick maths required for mining bc (source)
 
10:34 AM
1
 
@Wietlol lol, there was a pic on reddit where someone bought 10k US $ worth of GPU's purely for bc mining
 
@Wietlol or live in cihna or iceland @Zirak
@KarelG I was going to spend 2k in GPUS for ethereum xD
but then the 2K turned out to be 4K
 
i am happy with those ASIC cards tho
would lower the demand on GPU market
might lead to a small price decrease. Or it would not change at all D:
heh, fortunately I do not have to build another gaming PC so far
the current one is fine as it is
 
ASICs are noisy AF
 
put it in the kids room
 
10:45 AM
@Luggage Thanks for the info
 
@Wietlol Or do bitcoin mining while you're at college
I do wonder if there are rules against that..
 
I don't think so
 
If they didn't want you to do it, they wouldn't have put a power outlet in your room
Or internet access
So they seem to be actively encouraging it if you ask me
 
anyone here ever faced any issues with jquery tooltip?? My tooltip isnt appearing on first mouseenter
 
@AbhijitBorkakoty Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
10:52 AM
saw questions on it but not helping
 
What does a jQuery tooltip do that title doesn't already do?
 
all the things
 
@OliverSalzburg I am covering a disabled button by a div and on mouseenter i am firing an ajax
working fine except when I hover for the first time it doesnt appear
 
oh fuck, ajax on mouseenter
 
shall I paste some code??
 
10:54 AM
yes
 
use gist or pastebin tho
 
you can use jsfiddle
 
also that ^
 
oh, @Ikari
yesterday I did Retribution in Legendary :P
never played the mode, took 3 attempts with 3 friends xD
I played as Reaper
 
10:56 AM
haha, I need to try again this weekend with Zirak and others probably
 
I can join you if you want
or try the expert mode without incapacitaitons
or however it's called in english
success: function(response) {

                console.log(response.end_date);
                $(function() {
                    $('.disabled').tooltip({position: "top"});
                });
            },
this is weird
success: (response) => {$('.disabled').tooltip({position: "top"})};
maybe this will work?
 
Why is this confusing you?
 
idk
he has a function inside callback's function
 
I meant the author of the code :P
 
oh
 
10:59 AM
There's an event handler, it does some AJAX, then it enabled the tooltip
And he is confused why the tooltip appears after the fact
 
to me, it looks overcomplicated
 
ok I just removed the callback part but still not behaving exactly as it was before
 
ermahgherd I just got the Pajamei skin
I think this is my calling to become a mei main
 
I just pasted the html div along with the button. Can you please look at the code once again

https://paste.ofcode.org/4mLaHZsmi5yRu9MSZarzs
 
Ugh, use data attributes
 
11:10 AM
@Ikari the what
the new mei skin?
 
yes :P
 
I love Mei, she's my waifu and main in overwatch
well, I don't play her that much, but I love her
since beta
 
Mei is thicc
 
yeah
actually, blizzard had to add more thiccness to one of her skins
cause she was skinny AF, for some reason
 
haha, I remember a shitstorm about that
 
11:12 AM
the 2017 chinese new year's one
 
@Chris A canonical question/answer is a relatively broad question with a solid, detailed answer that can be used as reference or as a guide
 
read: dupe target :P
 
See the link in my profile, there are examples.
Yes, also, they usually make good dupe targets.
 
hello, fellow snek @AndrasDeak
 
hey
 
11:14 AM
how's going
 
fine
 
good, good
 
@MadaraUchiha I always wondered, what should when you do when you want to make Q/A pair yourself and there isn't enough space to write an answer? Should you just post another one, or?
 
s/when//
 
11:22 AM
@KamilSolecki "There isn't enough space?"
 
@MadaraUchiha there is a character limit
 
is that a meme?
 
@KamilSolecki If you reach it, the question is probably too broad.
 
@Neoares yes thats 4chan
@MadaraUchiha or an answer is very detailed with code samples!
 
@KamilSolecki I've written some pretty detailed answers and haven't reached the character limit
 
11:23 AM
how do I use that "when" meme
 
eh dat 4chan message
 
@Neoares what
 
idk, you said it's a meme
the "when" thing
 
but assume that it is real, then the screen is just too close
 
and you clearly used it here:
5 mins ago, by Kamil Solecki
@MadaraUchiha I always wondered, what should when you do when you want to make Q/A pair yourself and there isn't enough space to write an answer? Should you just post another one, or?
 
11:25 AM
it's just retards of /b/ making dum memes
 
> what should when you do when [...]
 
@Neoares no that was a response to your message
 
then you have a typo?
 
No I dont
Click the arrow
 
which arrow lol xD
oh
 
11:26 AM
what is going on?
 
no, which arrow
 
Ugh, the response arrow
 
seriously
it's a response to
6 mins ago, by Neoares
s/when//
 
You just literally shattered my whole freaking post lol
 
wat
gives up
you clearly have a typo, or I don't know enough english
my /s/when// was a reference to your typo, cause there's a duplicate "when" in your sentence :D
 
11:29 AM
You need some scripts in your life
 
I already checked that
 
@OliverSalzburg link
 
I feel so lost right now
 
kamil got confused by you and you got confused by kamil's confusion
CONFUCEPTION
 
18
Q: Chat Reply Helper for Stack Exchange sites

Oliver Salzburg Press : to start replying to a previous message. Press ↑ as many times as you need to mark the desired message. What does it do? First of all, the Chat Reply Helper for Stack Exchange sites provides a simple key combination to select a message to reply to. This removes the need to grab the...

Good stuff!
 
11:31 AM
ofc I got confused by his confusion
he was being a nonsense xD
 
@OliverSalzburg danke
 
@KendallFrey Take note of !!tell support
 
@OliverSalzburg I am not sure if I would install that
 
11:32 AM
@RendiWahyudiMuliawan Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@KendallFrey The core functionality is to be able to : and to reply to messages. It also activates for !!tell to easily pick a message to tell on
 
you know germans and their history... They may have some rememberance to utilize spy tooling
 
!!tell 42230150 oh neat
 
can i use markdown here?

`$var = "test"`
 
11:33 AM
comic sans warning
 
hrmph
 
!!tell 42230165 welcome
 
@KendallFrey Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@OliverSalzburg Feature request: make it work the same way with !!tel
 
11:34 AM
What's !!tel?
 
course that's not very useful, but whatever
@OliverSalzburg alias for !!tell echo, basically
!!tel 42230176 like this, for example
 
@42230176 like this, for example
 
I was afraid of that
 
Pull requests are welcome :P
 
only works with usernames i guess
!!help tel
 
11:35 AM
@KendallFrey tel: User-taught command: <>@$0
 
!!learn telll <>:$0
 
@KendallFrey Command telll learned
 
!!telll 42230203 this is a test
 
@KendallFrey this is a test
 
👍
 
11:39 AM
@Ikari check that
why am I getting "x is not a function", but just before I printed "typeof x" and I got "function" as the output?
 
@Neoares *engine noises*
 
@Neoares What's x?
Could x be a class?
 
well...
dispatch(this.props.action_creator());
that
 
he gon pass out soon
 
What's this.props.action_creator (not typeof)
 
11:43 AM
a function that returns a function
which needs to be dispatched
 
@Neoares I mean try to console.log it
Also, what would dispatch do? would it attempt to call it?
 
function removeTrackAsync()
 
@Neoares lol wtf was that.
 
@MadaraUchiha it's redux's dispatch
 
@Neoares That sounds like a function that would return a Promise
 
11:45 AM
calling the function that contains that "dispatch" as an event handler works, but calling it directly (with parenthesis) doesn't
funny thing
maybe a binding issue
and yes, it's being called in another class
 
There we go
 
what :/
actually, it's complaining about "_this2.props.action_creator is not a function"
but the "_this2" is a babel thing
 
I'm fing done with competitive
we are winning a fight, and the team decides to c9
 
I need to play 5 more, I guess I'll be placed in platinum again
 
@Ikari c9?
 
11:52 AM
> "C9 LUL" refers to a moment where a team could have won by simply staying on the point/payload but instead they forgot about the point all together thus losing the map.
 
aka "not a team"
 
why c9? what's the origin of the term
 
@Neoares The question is what's _this2 in this context
 
isn't a reference to cloud9?
 
@Neoares It is, who did the exact same mistake (twice) in important tournaments.
 
11:55 AM
handleConfirm() {
    this.props.dispatch((dispatch) => {
        console.log(this.props.action_creator());
        dispatch(DialogsActions.hideDeleteDialog());
        dispatch(this.props.action_creator();
    });
}
 
It's when there's not enough coordination on who extends to fight and who stays with the payload/control point, and everyone leave with no apparent reason.
 
I think babel creates "_this2" cause it's another scope
like doing that=this;
without the last bind, that was an experiment xD
which, surprisingly, didn't change the behavior
 
Shocking
 
that handleConfirm is passed to another class
and, in that class, if I call handleConfirm(), it doesn't work
but doing something like onclick={this.props.handleConfirm} does work
 
You're missing a ) in that code btw
 
11:57 AM
typo, in the code it's OK
I just deleted something I recently added in my code as an experiment
and wiped an extra parenthesis
 
@Neoares Can you share the code around the actual definition of the function passed to action_creator?
 
I'm not passing any function to action_creator :S
 

« first day (2746 days earlier)      last day (2200 days later) »