« first day (1544 days earlier)      last day (3401 days later) » 

12:15 AM
@rlemon I don't see how
any idiot can tell you it's about programming
 
@Mosho that's because you see in black and white and eat your own poop
 
if it said "best guess for this image: Sarcasm"...
@rlemon I can't see how my impaired vision and culinary preferences have anything to do with it
 
12:31 AM
@SomeKittens That's your answer for everything
 
@monners Well, I didn't write all over those doctors for nothing!
 
@BenjaminGruenbaum i.imgur.com/SdzlIxV.jpg
 
Doge? My avatar used to be a Doge.
 
@Nooble 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.
 
@rlemon I abandoned a friend last night - ran out of hard cider
 
12:42 AM
@rlemon best show in the galaxy right thur
 
1:20 AM
I'm taking some time off of drinking
Overdid it at Christmas. Kinda sick of being hungover in the morning
 
1:41 AM
hi
 
@PenguinSource 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.
 
m59
I don't believe me sometimes.
module.exports = function(query) { // receives req.query
  // later
  var query = "SELECT .... "
}
So, my code is all fail and I'm like "oh duh!"
module.exports = function(params) {
  // later
  var params = ['stuff'];
}
 
user2620028
2:36 AM
whats up guys
 
@m59 LOL. Oops.
var function = undefined; // huh?
 
m59
yeah, fortunately there were only so many variables I could fail with..
 
@m59 i've done that at least 4 times
 
3:13 AM
 
user2620028
lemon. you are depressing me
 
3:28 AM
I landed a little rover on Duna today. Earned me a half-million funds :D
 
user2620028
kendall say what
 
user2620028
video game?
 
duh
ksp
 
user2620028
lol heard you guys talk about that one before, never played it myself.
 
the beta is annoyingly fun
 
user2620028
3:31 AM
@jhawins why and how did he end up in the ditch? Lock up brakes on ice?
 
user2620028
@kendall i always thought ogame was addictingly fun and then it just stops being fun eventually whenever you have less interaction with it
 
user2620028
Maybe i have commitment problems though :P
 
I still find Minecraft addictingly fun
I don't play it anymore, partly because I don't have the 4 hours a day it would likely consume
 
My 10 year old cousin got me addicted to minecraft for a little while
That was a shameful time in my life
 
MLM
3:52 AM
If you are into Gulp; Just published my first npm package, gulp-css-spriter. Sprite Sheet Generation from CSS source files
 
user2620028
4:05 AM
If you guys think that is bad. I was a runescape junkie when i was like 13 lol
 
4:17 AM
Funny thing about Minecraft
its no longer cool at my kids school
you get made fun of if you play it..
how fast things change lol, I was surprised when they told me that
 
4:43 AM
hey can i get peoples opinion on something ?
if you had a pretty novel idea that involved a new algorithim. Like lets say you were the first person to think of orbitz.com , while you could implement a majority of it clientside with javascript and obfuscate it. Would you be better off moving the logic server side so people cant reverse engineer your algo to help prevent a larger company from copying you as quick?
 
m59
@Loktar because this happened youtube.com/watch?v=5ITftz_kbNs
@BobSinclar that doesn't really make much sense.
Are you using the word "algorithm" properly?
 
@m59 lol
I love that video... DEDOTATED WWWWAM
I feel bad about that.. but she doesnt seem real
almost seems like a comedian dressed up
 
m59
It's funny and very sad at the same time. I suspect this is what happens when parents don't spend time with their kids :(
"I have a friend with Chrohn's disease and she was ready to give up." That's a killer right there.
 
5:03 AM
@m59 Holy fuck I couldn't keep watching that.
 
@m59 yes lets say you were the first person to figure out how to get a gif from a png. you wanted to sell that service . people pay upload their gif and you spit out the jpg. Now lets say you could do that image processing in javascript. Well adobe could view your algo knock it off and sell it too with ease. Now you could obfuscate it but then you can do things like this to crack it blog.kotowicz.net/2010/04/…
 
m59
That's not really how things work.
We're programmers we can "knock off" whatever we want. That just means you know how to write code.
 
If you wanted to keep the algorithm safe, you wouldn't do it in JavaScript.
 
 
m59
@BobSinclar Sure, if you did want to keep some code safe, you can do that by running it on your own server and sending the result back. If it runs on someone's computer (like js does in the browser), then consider it stolen. Anyway, I don't know of anything you could write today that someone would need to steal code to replicate.
 
5:08 AM
yeah thats what i thought. I was hoping in 2015 there were ways to run sensitive algos in the browser without having to keep them serverside to protect them
 
m59
Again, what kind of thing would that even be?
If you write an app and I want to steal it, I just write the app again myself.
The only thing I can think you mean is someone stealing the idea, and there are copyrights, trademarks, and patents for that kind of stuff, but they only go so far.
 
what if you had no idea how to do it
 
m59
Then I shouldn't be programming
I don't ever know how to do anything I'm doing, it seems. Figuring things out is most of my job.
 
thats silly like lets say a hedge funds algo on their black box trading
obviously that wouldnt be something run clientside
but if they wanted to do it
 
m59
If I already know how to write the code I need to write, then that code is already an npm module I or someone else wrote.
 
5:13 AM
Something is only secure if it costs more to break in and get it than it is worth.
 
like lets say you have an algorithim to 3d print an ebolla tester
you input to the printer some stuff to make it
but the calculations are really hard
 
14 more :D
 
now i am a competitor
and i want to compete
if i can see your algo i have a leg up getting started
 
m59
@BobSinclar you open a print shop, I guess.
 
...
 
m59
5:15 AM
You can't give that algorithm to someone and it be secure, so it couldn't run on someone's computer/printer anywhere else.
 
yeah so it would have to be contained serverside
because no matter what javascript engine you use to obfuscate it they all can be broken
 
m59
So, you can try to get legal protection / licensing for it and/or keep it running away from public access.
 
where getting at it server side would take more work
 
but patents on code are stupid and hard to get anyways
 
yeah patents are useless
thought twitter got pull to refresh
 
m59
5:18 AM
@BobSinclar clearly I have all of Windows 8 code. That isn't helping me make money. See what I'm getting at?
They're already doing it and doing it better than I could.
 
@m59 Not exactly. You don't have the code, you have the software.
 
m59
imo, if you think of something, create it, and start making money from it, then someone starts doing it better and they make the money, then you earned what you deserved.
 
yeah well its the little fish idea
like if an amazon or oracle noticed a good idea , they can always say throw 5 times the staff at it and catch them in 1 quarter
or at least try to
keeping a slight barrier is what I was wondering about for clientside code
 
m59
There are problems on both sides. Just think, if you are hardworking and make something awesome, then Amazon comes in and bones you, goes on to make billions and you make very little.. you've got to consider what kind of people they are and what kind of people their customers are.
 
true thanks for your input m59 and other i really appreciate it
 
m59
5:24 AM
If the corporate people were decent, they would have rewarded you more generously, otherwise, if the customers were decent, they wouldn't support a corporation that practices such things.
However, there's Walmart, so we know corporations can be quite evil, and people love them.
 
yeah the mass consumer doesnt really care if their bottom line changes
wallmart amazon etc
whatever gets them the most value seems to win
hence knockoff designer goods too
 
user4202350
5:56 AM
Good Morning , JavaScript Team.
 
user2620028
We are your javascript team? lol
 
user2620028
whats up shin chan
 
user4202350
Hello It is Pleasure meeting You.
 
Please Stop Capitialising Every Word!
 
Or even most of the words
 
Hah, he removed it
 
user2620028
god that video is horrendous
 
@JanDvorak this is why SO has an ignore-list
 
user4202350
6:25 AM
@JanDvorak Thank You.
 
once more and I'll ask you to take a short walk. Please look at how other spell.
 
user4202350
Sorry I don't know what is exactly you are talking about.
 
6:42 AM
Hey everyone.
I'm creating an open sourced JS script. I'm looking for a way to track the sites it's installed on.
I AM NOT going to do anything shady. The option to remove the tracking will be very clear to the end user. I'm just looking for a way to analyze the stats.
Any way to ping my server, etc? from JS?
 
@PaulDessert just AJAX?
 
any "phone home" operation will do
 
So just a simple AJAX call to my server?
 
Yeah, don't see why not. And just log it on the server
 
Yeah, I guess that would work. I guess I was over thinking it again :)
 
7:19 AM
Mornin
 
Mornin
 
Morning mornin
 
7:44 AM
evening
 
It's always morning when you come online
 
@iroegbu how do you know I wasn't leaving?
 
oh!
 
Angular devs might have a look pls stackoverflow.com/questions/27814405/…
 
@NeiL 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.
 
7:54 AM
@iroegbu I wasn't, but that's besides the point :P
 
Oh wow, on the way to work I got caught up in a massive hail
Had to take shelter out of fear my umbrella would rip
 
Holy fuck my cat is being so annoying.
 
8:17 AM
Cat's aren't annoying, they're cute!
 
@SecondRikudo that's... odd. Don't usually experience any form of precipitation this time of the year around here (Nigeria)
 
s/this time of the year/ever/
 
hi guys. Can we get page preload time with js/jQuery ?
 
what?
 
8:24 AM
i have a html with images and background video. I want to add a pre-loader on this html. Means until all content is loaded, a gif loading image will show.
 
why would you want to do that without JS?
 
@Shea He never said anything about doing it without JS
 
no i want to do. Can i do it with js or jquery .. anything ?
 
oh okay, I'll just go to sleep now
 
Sure you can. Look into image load events.
 
8:26 AM
@Shea its night there ?
 
yes, it's it 12:26 am
 
@RoelvanUden like ?
@Shea ok. good night
 
!!tell Sajal google javascript image load event
 
imo, my favorite method for that is to start with CSS/HTML that display the loading image in the container where said content is to go, then simply fill that container with JS and hide the loader when it is finished
 
8:28 AM
@Shea No, that's the wrong approach
 
@Sajal developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement look into complete property and load event.
 
Browsers not supporting anything in your code will bork, and the contant will not be available to them
 
@SecondRikudo Unless I'm still misunderstanding the question
 
You should have all content shown by default, then hide it with JavaScript after you know you call pull the whole thing off
 
ok
 
8:29 AM
So you're suggesting just load the content with it, and just not having the loader incase a browser doesn't support it?
I don't even know why we have dynamically loaded content in that case
 
@Shea It's fine doing it for small parts of the page, where it's not critical
But if the entire page borks because the client doesn't support what you've tried to do it's a problem.
 
In that case I would completely agree with you
 
Once upon a time we did progressive enhancement; not EVERYTHING in JS.
 
@RoelvanUden Yeah, and before that we used $().animate to move shit around
 
Just sayin' that JS required isn't always a good idea ;-)
 
8:42 AM
Depends if you're making a web page or a web application
 
@RoelvanUden it's 2015.......
 
Hello!
 
@Wally 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.
 
I have a bootstrap navbar and when the screen is small and the navbar is hidden and I press the navbar reveal button the navabar covers the contents of the webpage. Is there a way to make the content go below the navbar?
 
Off-topic: Anybody here heard of the company Vontera? vontera.com
 
8:56 AM
anyone know how can I preserve the backslash on a JSON result?
For example:
<blockquote class=\"instagram-media\" data-instgrm-captioned data-instgrm-version=\"4\"

I want to keep the [\"]
 
@jeraldo 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.
 
Hii evryone
 
"<blockquote class=\\\"instagram-media\\\" data-instgrm-captioned data-instgrm-versio=\\\"4\\\">"
\\ becomes \ and \" becomes " and you'll end up with \"
 
9:28 AM
okay so basically just replace \" with \\\"
 
9:39 AM
yep.
Off-topic: would StackOverflow know if you register 2 accounts and keep voting for each other?
 
@Charly Yes
And both accounts will get banned very quickly.
 
oh...
 
48
Q: How should sockpuppets be handled on Stack Exchange?

Won'tSo a high-reputation, highly-active user has already been dinged once for a sockpuppet, and I just dinged him again. He probably has another sockpuppet as well. What are the guidelines for handling users who game the system in this fashion? Specifically, How can I be sure I'm looking at a soc...

 
I need desperate SEO help.
 
Sex Exchange Operation?
 
9:51 AM
???!!!???
really?
 
Google is indexing our website tipranks.com less and less although it's getting more traffic - it didn't index anything last week - it worked out of the box with JS initially - when they started indexing less we generated pages without JS and that didn't help. So now we have no idea why we're indexed less.
 
> The first step is to diagnose the Google ranking drop. So many factors go into a website's rankings that it may be difficult to immediately see what caused your site to lose its position. And you can't fix it if you don't know what's wrong. So take a deep breath, approach the situation calmly and rationally, and start narrowing down the possibilities.
 
I don't think it's about the ranking dropping, but about Google not checking for updates on their pages
 
@SomeGuy they crawl 12K pages but only index 1.7K
 
10:14 AM
can anybody help me out with this question
http://stackoverflow.com/questions/27816379/jquery-post-request-is-breaking-while-uploading-multiple-images
0
Q: Jquery : Post Request is breaking while uploading multiple images

Shreshtt BhattI am using Plupload js plugin to upload multiple images in one request. This plugin is working like if someone adding 5 images at a time then post request will go 5 times to upload each of images separately. As we know Post request require unique csrf token but in my case due to same token after ...

 
10:39 AM
@ShreshttBhatt wth is this crsf thing?
31
Q: What is a csrf token ? what is it's importance and how does it work?

ShawnOkay guys i am writing a django application and i just want an idea of what actually a csrf token is and how does it protect the data ? if we don't use csrf tokens, isn't the the post data safe ?? Well i know how to use csrf_token but just need some information is how it works. Thanks

found my answer
That might help
 
dat onebox
 
An octocat landed in our yard. :-)
 
:O
 
@dievardump Cross Site Request Forgery
 
It's so pretty!!!
 
@BenjaminGruenbaum I'm assuming you have the standard stuff checked? Sitemap? robots.txt?
 
Very odd
Does it hurt your search rankings?
 
Yeah, I think so.
 
in asp.net web Forms application i want to call a javascript function at client side on page load not on every postback. there is a ASP.net defined Javascript function . do u guys know that ?
 
11:03 AM
We don't care about ASP.net
 
@JanDvorak That's not very nice to say
I'm sure @BenjaminGruenbaum would love to help you since he <3s M$ so much.
 
This doesn't look like a question, is it?
 
inb4: all PHP questions to @SecondRikudo
 
all ur questins r blong 2 us
 
@Sankaran You could simply enable a script block which calls the function on page load in the master template shrug no idea how to do it in web forms, tho.
 
11:19 AM
what date format is this?
30 December, 2014
dd mmmm, yyyy
?
 
Are you asking for JS?
 
yeah form moment.js
 
And their docs don't mention it?
 
@BenjaminGruenbaum quick question if you may
I have a page with a form and a preview
Changing things in the form instantly updates the preview
We want to move the preview into an iframe on another domain as a credentials leak countermeasure.
 
@SuperUberDuper It could be DD mmmm, yyyy
 
11:27 AM
(The form allows you to enter HTML that cannot be escaped)
 
@Neil meh.
@SecondRikudo so far you didn't ask anything, but ok.
 
Now, I don't have another domain yet
 
Also, why is that a credentials leak countermeasure?
 
So for development I will simply create another page on the same domain
@BenjaminGruenbaum Because if an attacker submits the form with a cookie tracker in place, anyone else who opens and renders the preview will have his cookies stolen
My question is, is there a different between same domain/cross domain if I'm planning on working with postMessages?
 
@SecondRikudo oh, you also allow arbitrary JavaScript?
 
11:29 AM
@BenjaminGruenbaum I allow HTML that cannot be escaped or sanitized
 
@SecondRikudo not really, postMessage is designed to allow cross-domain messaging. If you have a same domain iframe you can just call functions in it directly (but that'd miss the point).
 
So it's pretty easy to have <img onload="..."> or something similar.
 
@SecondRikudo well, I wouldn't allow HTML that cannot be escaped or sanitized but sure.
 
@BenjaminGruenbaum You needn't tell me this
 
A cross domain iframe is what sites like jsfiddle do.
 
11:30 AM
But this is the reality of the problem.
 
Also GitHub.
 
@BenjaminGruenbaum Yes, but the idea is to develop on same domain, and then seamlessly move to a different domain once I have one
The question is will I need to develop any differently?
 
Unlikely, but friction might occur, it's better to test from a subdomain - you can also test from localhost which will simulate it better.
Or from the same domain with a different port
 
localhost is actually an idea I haven't thought of.
Develop locally and use hosts or something to have more than one host pointing at 127.0.0.1
Alright, will do that. Thanks
 
11:33 AM
@BenjaminGruenbaum assuming the ability to enter unescaped HTML is a business requirement
How would you prevent session hijacking via XSS?
 
@SecondRikudo it's a valid business requirement.
 
@BenjaminGruenbaum It's not.
 
@SecondRikudo what if you're jsfiddle?
 
@BenjaminGruenbaum We are not jsfiddle.
Nor GitHub
 
@SecondRikudo cross domain seems like the easiest solution - there's CSP but I'd put my money on cross domain first.
 
11:34 AM
There is absolutely no reason for an ad company to allow unescaped HTML in its widget creation tool
 
Flexibility, but I'd require manual review over HTML posted this way and charge extra.
 
@BenjaminGruenbaum No. I don't want to let the user ever submit his own HTML
We are the "experts" in this case, our widget is optimized for maximum CTR, there shouldn't be a reason to let a user change it the way he likes.
And it's not as much as a business requirement in this case like the fact that anything and everything will burn the day I decide to stop supporting unescaped HTML
And we already have an internal tool that's not web accessible that can change widgets with super HTML ninja code
There's no reason to expose that functionality outwards.
Especially with the risks it entails, and we were already taught that lesson once.
 
Most of my two page long promise answers go ignored with (or without) a single upvote at best. On the other hand that insanely retarded post advocating == over === which is batshit crazy on programmers.se has 90 upvotes -_-
This is why people don't take programmers.se seriously.
 
Hi all.
 
@BenjaminGruenbaum That happens on Stack Overflow as well.
 
11:44 AM
why this code is returning NaN?
        var date = new Date(),
   d = date.getDate(),
   m = date.getMonth() + 1,
   y = date.getFullYear(),
  str="";
        if (m == 1) {
         var   str = String(m + ", " + y - 1);
        } else {
          var  str = String(m + ", " + y);
        }
        console.log(str);
 
248
A: How do I select an element with its name attribute in jQuery?

Second Rikudo$('[name="ElementNameHere"]').doStuff(); jQuery supports CSS3 style selectors, plus some more. See more jQuery - Selectors jQuery - [attribute=""] selector

 
Yes - but while your answer isn't particularly good there it's not batshit crazy.
 
88
A: Does using == in JavaScript ever make sense?

Benjamin GruenbaumI'm going to make an argument for == Douglas Crockford which you cited is known for his many and often very useful opinions. While I'm with Crockford in this particular case it's worth mentioning it is not the only opinion. There are others like language creator Brendan Eich who don't see the b...

^ batshit crazy.
This is a great answer, and I use all three of your 'for ==' use cases. #1 & #3 are especially useful. — Chris Cirefice yesterday
^ faith in humanity--
 
@Ravimallya Because "any non-numeric string" - 1 is NaN
!!> 1 + ", " + (2015 - 1)
 
11:46 AM
@SecondRikudo "NaN"
 
!!> "5" - 1
 
@Neil thanks
 
@BenjaminGruenbaum 4
 
DD was correct not dd for some reason
 
@SecondRikudo "1, 2014"
 
11:47 AM
!!> " " - 1
Quick, still time to edit :P
 
@BenjaminGruenbaum -1
 
!!should I smack Benjamin when we meet today?
 
@SecondRikudo Of course!
 
@SecondRikudo Oy. yeah. Okay.
 
You can try :D
 
11:47 AM
 
!!> "Infinity" - 1
 
@BenjaminGruenbaum "Infinity"
 
Lots of cases really - is retarded between strings and numbers
But do you remember what null - null is? If you do that's completely unnecessary since no one cares :D
 
12:07 PM
@BenjaminGruenbaum Jesus cares
 
@Neil that's kind of creepy
 
> I don't believe in the bible, not because I don't believe in God or anything, it's just that I don't believe that anyone would ever want to kill a man who can turn water into wine.
 
Jesus saves, but Satan performs incremental backups.
 
Isn't that budha?
 
@BenjaminGruenbaum With the incremental backups?
 
12:11 PM
Ah, I guess that would make sense
 
@SecondRikudo Yeah, otherwise I don't get the joke.
 
Jesus saves, but Buddha commits and branches
 
Jesus saves, but God is the repository
 
Oh waouw
 
git checkout catholicism
git branch protestantism
rm *.c
git add .
git commit -m "We need a fresh start"
 
12:26 PM
Just got an attentat in some controversial newpaper locals in France
 
god has a lot of branches, it must be said
 
Bilan at 13h20 : 12 people are dead, 3 people in critical state
That's just awful
 
git checkout judaism
git branch catholicism
rm *.*
git add .
git commit -m "http://i.stack.imgur.com/X1YBq.jpg"
@KendallFrey ^
 
-m "partial rollback: let's preserve the Bible"
 
@SecondRikudo lol yeah
 
12:27 PM
You know? It would be interesting to have a religion history repo showing the branching and merging of the various religions.
 
atheism isn't a branch
 
that would be darn cool
 
atheism is the beginning I would say
 
@dievardump well, that varies according to branch
 
Initial branch would be void
 
12:29 PM
there go consistent histories :-)
 
New religions which aren't branches spawn from the void XD
 
I'd say new religions are the devil's spawn, actually ;-)
 
git checkout abraham
git branch islam
touch ishmael
git add ishmael
git commit -m ishmael
git checkout abraham
git branch judaism
touch isaac
git add isaac
git commit -m isaac
woo
 
@KendallFrey that's not accurate actually.
Islam came much much MUCH MUCH later than Abraham's time.
 
so did Judaism
 
12:35 PM
@KendallFrey That is true.
 
it's just the ancestors
 
It was just called "The Hebrew people" back then
 
What actually counts as the beginning of Judaism? Because Abraham did believe in the same God.
 
@JanDvorak I think Judaism start with the Covenant of the Pieces
 
rm isaac
git checkout isaac
that was close
 
12:36 PM
It's the first contract that was made between Abraham and God, and that is where God promises to create a large people from his seed, which, at least according to Judaism, refers to the Jewish people.
 
@JanDvorak Well, Islam has the same premise afaik
 
The belief is that Jewish people are descendants of Abraham and his house, while Muslims have no connection whatsoever to Ishmael.
 
Islam is a branch of judaism, but what is judaism a branch of?
 
@KendallFrey islam was "made" in 14th century , IIRC
 
@SecondRikudo That may be true
 
12:38 PM
@tereško A little further back IIRC
Yeah, 6th century
 
hmm ... you're right
why the fuck I was convinced that it is 14th century ?!
 
vOv
"How do I minify my JS code so that my customer can't read it"
 
that's not minify, it's obfuscate
get your terms right people
 
@KendallFrey Oh, I know the terms.
 
I know you do
"people" don't
 
12:55 PM
@SecondRikudo Why exactly close that ?
 
too broad or rec-tool
 
@tereško maybe because it's 1400 years from now ?
 
oh , that's the cause of memory corruption ... got it
 

« first day (1544 days earlier)      last day (3401 days later) »