« first day (1658 days earlier)      last day (3290 days later) » 

10:00 AM
What do the workers do in NodeJS?
 
Work
 
I never thought I'd have to ask a >10k user to provide a SSCCE in a question... I was wrong.
 
!!stat 82609
 
@Zirak Sebastien Lorber (http://stackoverflow.com/users/82609/sebastien-lorber) has 13531 reputation, earned 0 rep today, asked 251 questions, gave 317 answers, for a q:a ratio of 251:317.
avg. rep/post: 23.82. Badges: 9g 74s 164b
 
oh, that's surprising
 
10:06 AM
Hm?
 
Expected a very high q:a ratio and very low avg. rep
 
> 251 questions, gave 317 answers, for a q:a ratio of 251:317.
brilliant
 
Hehe
 
With a new Star Wars movie on the horizon I guess it's time to re-watch the Red Letter Media reviews of the shitstorm that was episode 1-3
 
@argentum47 link to the npm package md again?
 
10:17 AM
I think my 7 year old Apple Cinema display just died
 
10:31 AM
@monners That's what you get for putting a screen on an apple
 
@Zirak It's the healthier option
 
What's next? Going to your doctor to listen to music?
 
Duh!
 
Why in someObj[Symbol.iterator] the key is not coerced to a string?
 
Mourning.
 
> If Type(key) is Symbol, then
Return key.
they just.... added an exception
~_~
 
What'd you expect?
Also, to find that, you can search for MemberExpression : and skip uninteresting ones
 
@Zirak Just that I thought keys are always meant to be strings.
Since symbols are primitives, I guess it makes sense.
 
Symbols and strings are two different concepts
 
I mean the behavior of Symbols as keys didn't make much sense to me initially. Like they are not visible in for..in iterations and Object.keys etc...
 
THE
10:54 AM
var  fruitIDs = item.Fruits.map(function (n) {
            return n.ID;
        }).join(", ");
i need to convert it to jQuery
 
@AwalGarg That's because keys are strings, and symbols are more like meta-data.
@THE Bam, it's already jquery. Next.
 
@THE you ddon't
 
THE
Is this right ?
		      var  fruitIDs = $.map(item.Fruits, function (n) {
            return n.ID;
        }).join(", ");
 
or that
 
Is it?
 
10:55 AM
@Zirak Yeah I now get the idea better after playing around a bit.
 
THE
@Zirak it wasn't as I was getting error in IE8
 
@THE are you fucking kidding me?
 
THE
@AwalGarg why, it's called logical science
 
@Zirak I have a question!
 
I may have an answer
 
THE
10:56 AM
@Zirak I have 2 of them already
 
@Unihedron I have many of them.
 
How to convert a string (numerical) to segments of string (numerical) like the thousand form notation?
 
THE
what about my question then ?
 
@THE It's called being retarded.
 
@Unihedron What? Example? Input/output?
 
10:57 AM
"1234234234567" -> ["1", "234", "234", "234", "567"]
 
oh
google
 
I've written substring in a loop, but the indexes killed itself.
@Zirak can i haz keyword??
 
"separate number to thousands"?
"add thousand separator"?
 
hey guys wass up .
 
owait, there's an easier way methinks
 
10:59 AM
just a quick question on modular arithmetic s
 
Just use regexp with numbered delimiters
 
why is 2%3 = 2 ???
 
!!> 12312312312 .toLocaleString()
 
@Zirak "SyntaxError: identifier starts immediately after numeric literal"
@Zirak "12,312,312,312"
 
10:59 AM
:O
 
@AlexanderSolonik 2/3 = 2/3, remainder of 2.
 
!!> (12312312312).toLocaleString().split(",")
 
@Unihedron ["12","312","312","312"]
 
Thank you so much!
 
@Zirak , i still don't get how :9
:(
 
11:00 AM
It's literally 2 over 3
 
2/3 = 0.66666666666 .. but how is 2% 3 = 2 ??
 
Remainder is how much you need to subtract to get a round number
Do you know why 4 % 5 === 4?
1 % 2 === 1?
 
@AlexanderSolonik 2/3 is precision division, 2/3 = 2...0 in long division
like 3/2 = 1...1
 
no i don't !
 
In arithmetic, long division is a standard division algorithm suitable for dividing multidigit numbers that is simple enough to perform by hand. It breaks down a division problem into a series of easier steps. As in all division problems, one number, called the dividend, is divided by another, called the divisor, producing a result called the quotient. It enables computations involving arbitrarily large numbers to be performed by following a series of simple steps. The abbreviated form of long division is called short division, which is almost always used instead of long division when the divisor...
 
11:02 AM
2 % 3 = 2 - 3 * 0 = 2
 
Read up on the definition of remainder
@Unihedron Also, that won't work in a locale where the thousands separator isn't ,
Or where the comma isn't used as exactly the thousands separator
 
Long division? Remainder? Uh, just link him here:
In computing, the modulo operation finds the remainder after division of one number by another (sometimes called modulus). Given two positive numbers, a (the dividend) and n (the divisor), a modulo n (abbreviated as a mod n) is the remainder of the Euclidean division of a by n. For instance, the expression "5 mod 2" would evaluate to 1 because 5 divided by 2 leaves a quotient of 2 and a remainder of 1, while "9 mod 3" would evaluate to 0 because the division of 9 by 3 has a quotient of 3 and leaves a remainder of 0; there is nothing to subtract from 9 after multiplying 3 times 3. (Note that doing...
 
I think that's the case in India, right @AwalGarg?
 
SGG
Hi all. I want to do some slider example. But I don't know how to do it.
In main div, only 3 div's and 2 buttons(next, prev) have to appear. By clicking next and prev buttons, divs have to slide. I don't know how to google even. Any help/demos?
 
@Zirak , 19/5 has a remainder of 4
 
11:06 AM
Correct
 
i mean 19%4 has a remainder of 4
 
Incorrect
Nearest multiple of 5 is 15, 19 - 5 = 4
 
yeah sorry got that wrong !
its 3
 
Nearest multiple of 4 is 16, 16 - 4 = 3
 
SGG
Nearest multiple of 4 is 4
 
11:08 AM
you meant nearest mutiple of 4 towards 19 ?
 
Yep
 
16 - 4 = 3 ???
 
19 - 16 = 3
 
Ohh yeah !
 
erm yeah, I fucked that up, sorry
 
11:10 AM
yh big time lol
 
left % right = left - (nearestMultipleOfRight)
 
var n = 19;
var m = 4;
var fitsNumberOfTimes = Math.floor(n / m);
var result = n - (fitsNumberOfTimes * m);
console.log(result);
If you want to write it down in code.
(Very inefficient of course, that goes without saying)
 
@Zirak :/
 
@RoelvanUden thanks !
makes sense !
 
Not too inefficient, just verbose
and incorrect for negative values
s/floor/truncate
 
11:15 AM
How does an invisible iframe end up in my form when logged in a target website in a case of a CSRF attack?
 
@StevensHaen XSS is one option
 
Surely it doesn't belong to say, PayPal, so has to be injected somehow
 
The point is that it's not your form
The attacker only needs to redirect your client to your form handler while he's logged in on your site
 
so there would be an entire form in the iframe?
 
yep, that's one option
 
11:24 AM
!!>(+"123451234512345").toLocaleString()
 
@Unihedron "123451234512345"
@Unihedron 123451234512345
@Unihedron "123,451,234,512,345"
 
Yep, that's one option :-)
 
I wonder if instead I can .split("") and join every three elements together.
 
do you have Underscore.js?
 
I can get it if it finishes the job :p
 
11:27 AM
num.toString().split("").reverse().join("").replace("\d\d\d(?!$)",",$&").split(‌​"").reverse().join("")
 
Actually, it's already a string
 
numStr.replace(/\d(?=(\d\d\d)+)/g, "$&,")
 
!!>"123451234512345".replace(/\d(?=(?:\d{3})+$)/g, "$&,")
 
@Unihedron "12,345,123,451,2345"
@Unihedron "123,451,234,512,345"
 
\o/
 
11:35 AM
/(?=\d{3}(?:$|,))/,/ REBEL FTW
 
@WasimAhmad Welcome to the JavaScript chat! Please review the room pseudo-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.
 
!!>"123451234512345".replace(/(?=\d{3}(?:$|,))/g, ",")
 
@Unihedron "123451234512,345"
 
11:36 AM
:D
 
spamming this chat room is it possible
 
not anymore
 
Maybe we should steal the salad language from the python room and use that to announce kicks
 
It's been mentioned
 
@JanDvorak invent one for JS :P
 
11:43 AM
I see people use a CSRF protection token in Node
 
@Zirak We use , as a separator too, but the number system is slightly different. There is no million/billion, but lakhs/crores respectively.
@JanDvorak Use eval for kicks :D
> evaled user 3459110
 
What difference is .substr and .substring?
 
@WasimAhmad No but vamping is. You just have to pretend to be doing a lot of effort. That's how I do it.
 
Rather "you are worse than eval" = "you have been kicked"
 
!!tell Uni mdn String.substr, String.substring
 
oof
devdocs lied
 
30
A: How can I get last characters of a string using JavaScript

ZirakGetting the last character is easy, as you can treat strings as an array: var lastChar = id[id.length-1]; To get a section of a string, you can use the substr function or the substring function: id.substr(id.length-1); //get the last character id.substr(2); //get the characters from the 3rd c...

 
devdocs never lie
@Zirak How to do it in jQuery?
 
FR: autokick for "in jQuery"
also, "how to"
 
Auto-welcome for "is anyone here?"
"anyone familiar with XYZ"
 
11:56 AM
... or any first post, for that matter
 
in addition to that
 
Could someone use that to spam the room?
 
Then they get kicked.
 
(in quick succession)
HI
<auto-greet>
Anyone here?
<auto-greet>
I have a doubt about Angular
<auto-greet>
(seconds later)
you are worse than eval
 
Also auto move all those messages to bin.
 
12:01 PM
What could possibly go wrong?
 
Caprica gains sentience and kicks Zirak for using some pesky code in her :D
 
What could realistically go wrong?
 
I said Caprica gains sentience. How much more realistic can I get?
Maybe a room regular asks for opinion and gets... kicked.
@Zirak github.com/Zirak/SO-ChatBot/blob/master/build.js#L239 ...you made a custom preprocessor???
Is that some standard practice? I have never seen a build file like that :/
 
12:22 PM
I want to make a silly canvas thing today. It's been too long
 
make a 404 page
its fun
I promise
 
I don't want to do your work for you
 
mines done chump
 
one pump chump
You're on the first page of codepen picks
 
yes
yes I am
 
12:26 PM
mornin'
@rlemon nice
 
user2620028
morning everybody
 
hey
 
good evening :)
 
user2620028
wassup tacquito
 
@arjunkori Welcome to the JavaScript chat! Please review the room pseudo-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.
 
user2620028
12:28 PM
i think it is both morning and night in my local timezone
 
user2620028
it is 7:30 at night however i just wokeup haha
 
ha ha
 
I think I need a new work playlist. these songs are getting into the 300 - 400 play count.
 
7:30 is after dawn >:(
 
You could listen to the MS Build conference
 
12:31 PM
no thanks
 
:(
I find it interesting
 
yea but I'm not going for interesting.
 
Especially the session I'm watching now, about .NET and it being open source
 
I have code to write. I want music
 
12:32 PM
sorry, i couldn't hear you over my fat stacks
#ballin
 
its ok
 
Write Code, Make Money â„¢
 
how
 
see step 1\
 
user2620028
@rlemon tune into the bob and tom show with me :D
 
user2620028
 
user2620028
humor not always work appropriate lol
 
I think I'm going to try to and find a grooveshark -> google music playlist transfer dealio
 
step 2: money all over my pockets
 
1 message moved to Trash can
 
Truth hurts
 
12:34 PM
perpetuating bullshit hurts.
 
user2620028
Well i have all of those except for western hemisphere lol
 
I wish ES would introduce the concept of namespacing in a sugary way. I'd see it as helpful
 
you don't like the trend of using classes as namespaces?
 
user2620028
yeah. career developer in Bangkok makes like USD $12190 ish a year. Unless you get a really lucky job.
 
12:37 PM
Did anybody ever use to use turntable.fm? It was the shit, but then it died
 
plugdj or w/e is okay -- but the interface is terrible.
ugh, looks like if I wanna automate transferring playlists from grooveshark to google, I'm writing it.
@Zirak you've dicked around with grooveshark. got any sample code I can use to pull all tracks in aplaylist?
 
just use jquery
 
._.
 
user2620028
@taco i never needed to use an internet radio service till i got here :( so never used it
 
Huh, codepen has traceur built in. That's awesome
 
12:44 PM
^turntable was awesome. Loved DJ'ing there
There were rooms for EDM, 80's, pop, you name it
 
I played gaia online once
 
lol
 
user2620028
@rlemon hahaha i think he was trying not to smile a couple times
 
grooveshark.com well there goes that fucking idea
got like 3 pages into a google search for "scrape grooveshark playlists" and found out they shut down today
 
user2620028
12:50 PM
lol lemon..... its blocked in my country
 
@rlemon yeah, I thought you knew
 
I always procrastinated trying grooveshark and see what happened...
 
@taco but I want that playlist man!
just the song names
bastards can't even give me that
 
I ran a site similar to grooveshark, but it was for hipster music from blog feeds
 
user2620028
@taco then it deserved to die
 
12:51 PM
lol
 
this is seriously disappointing
some of my best playlists were on grooveshark :(
 
@rlemon who is Lindsey?
 
How does the csrfToken() work in Express?
 
@rlemon I exported your playlists from grooveshark I think
"26 Basslines","Benga","Diary of an Afro Warrior"
"B4 the Dual","Benga","Diary of an Afro Warrior"
"Age of Dub","Ed Solo","Revealomatic - No Bull Halfstep"
"Black Phantom","Fukkk Offf","Love Me Hate Me Kiss Me Kill Me"
"Can't Stop Me Now","Pretty Lights","Passing by Behind Your Eyes"
 
user2620028
are those songs.... or artists or albums????
 
user2620028
12:55 PM
i cant tell lol
 
This is exactly why I hate electrons. "They keep spinning around forever". Right, sure, perpetual motion, like I believe that. Electrons are evil. I think they are just made up and don't really exist, like gremlins. Oh, no wait, they are not really spinning because they are actually a cloud, no wait they are really waves. It's just BS piled on BS. — Tyler Durden 2 days ago
this guy
 
@HatterisMad CSV format
 
user2620028
i realize its formatted lol. just never heard of any of those
 
yeah, me neither
Gonna guess that the second part is the artist though
Apparently rlemon loves Lindsey Stirling
I want to play violin
 
@taco I'm not rlemon on grooveshark
but this service is awesome
just what I needed
 
12:58 PM
I bought one, I just need to get the strings put on
@rlemon I used your email
 
ahh
 
dunno how it knew though
 
and yes, lindsey stirling is kick ass
 
maybe an employee threw that website up to be nice
 

« first day (1658 days earlier)      last day (3290 days later) »