« first day (837 days earlier)      last day (4111 days later) » 

10:02 AM
@FlorianMargaine You serious? Have you tried to read yours? :D
 
mine is quite procedural :|
 
Jesus Christ ... Windows 8 is a fuck up ...
One big fuck up.
 
Ha ha ha ha ha, this idiot is running Win 8 ^
 
what are you doing on it?
 
@FlorianMargaine What I'm doing on it? Losing my mind I'd say.
 
10:09 AM
Uninstall it - problem solved
 
Not really.
 
Uninstall it - you have no OS left
oshi--
 
Still better than Windows 8
 
You're just looking stupid there.
 
@FlorianMargaine And slower: jsperf.com/vision-vs-florian.
 
10:10 AM
Only to people who can't tell when someone is being facetious
 
Next problem is that this notebook requires its special Samsung drivers to control its fans. That alone wouldn't be a problem IF those damn Samsung drivers wouldn't be blacklisted in the new Linux kernel because they are bugged.
Those drivers being blacklisted means that the notebook will trigger a kernel panic eventually.
So, I'm stuck with the gigantic fuck up that is called Windows 8.
 
@VisioN Outch. Both solutions are slow as fuck
All hail for the DOM!
 
@FlorianMargaine though I have no idea why they are sooo slow.
 
Could puke so hard ...
 
@OctavianDamiean are you a hipster now?
with your instagram'd avatar?
 
10:14 AM
o_O
Had that avatar way before instagram even existed. :D
It is my first avatar.
 
And your only one as well? :P
I've ever only taken one picture
 
so you're the first hipster?
 
In fact all I know about Instagram is that they made shitloads of money. I don't know anything about Instagram other than that.
 
@FlorianMargaine the funny thing is that in FF the tests run many times faster.
in 17th
 
@OctavianDamiean they were bought by facebook
@VisioN indeed
still, it's really awfully slow
 
10:18 AM
Yea right, that's when they made shitloads of money I guess. :)
 
I mean... 10-40 ops/sec?!
 
chrome 24?
my page freezes
FF up to 330 o/s
 
That's why I didn't bother running the test
Don't want to bother with pages freezing -.-
 
yesterday I wrote a script that froze not only the browser, but the system.. even in the room became cold...
 
Hahaha
@rlemon has one bitch of a script
Keeps locking the browser up
 
10:22 AM
that was eaasy canvas fullscreen animation :D
 
Guys, is there a way to make whole bunch of random facebook friends?
 
0
Q: Alternative if javascript is disabled in browser

pankil thakkarIs there any alternative way to call javascript when javascript is disabled in your browser? Means if i am using ajax and also jquery validation which are must for the further process but my javascript is disabled in browser. So what should i do ? How to validate and get the values of the ajax c...

How to use javascript without javascript...
@TemporaryNickName Maybe by being a teenager or hanging around a US school ?
@TemporaryNickName But you won't find here many Facebook friends
 
Well this is worrying...
 
we have run out of questions
inb4 we get a question from SA dev's, asking us how we can fix their errors
 
@phenomnomnominal you should probably enlarge your field. How are you going to get the Generalist badge if you look only at the javascript and coffeescript questions ? It's time for you to learn 3 more languages :)
 
10:28 AM
@dystroy, I'd rather answer questions I'm interested in, that have some pixels assosciated with my name
 
You're not a player :(
 
@dystroy, I'd be comfortable answering many other kinds of question. I just don't haha
Meh, JavaScript is just perfect though.
 
two top unanswered questions are about
 
No need for anything else
 
this is a way to go
 
10:29 AM
@AmaanCheval for (;;)?
 
My friend has like thousand of facebook friends but I'm pretty sure not all of them are friends that he met personally
 
@FlorianMargaine Na, that's too simple. The one with random setTimeouts and shit
 
still locks browser.
 
@TemporaryNickName, HOLY SHIT DUDE, YOU BETTER CALL THE FACEBOOK POLICE
 
10:30 AM
o/
 
@phenomnomnominal I wondered how to put that clearly...
 
@TemporaryNickName that's horrible, i'm so sorry for you!
 
@TemporaryNickName, Trust me, you have bigger issues.
 
10:33 AM
Morning all
 
morning
 
yeah... morning...
 
@TemporaryNickName, GO TO A PARTY
 
why the hell would you want to have random people to friend you on facebook?
 
Are Facebook friends some sort of new secret currency?
 
10:36 AM
I don't know
@phenomnomnominal I guess so
 
and what puzzles me even more, why are you asking for that on StackOverflow?
 
!!s/ne/t/
 
@phenomnomnominal @TimeToShit i.imgur.com/0USVTsZ.png (source)
 
thank you, bot
 
10:38 AM
lol
 
10:59 AM
hi to all, anyone advice me.. how to apply a xml node attribute color="some color" to div element using javascript or jquery
for examples: <root node><child_node_1 color='ffffff'></child_node_1></root node>
 
@karthys Well, I could tell you how to do that once you've extracted the value
 
Can anyone tell me ... what i am doing wrong.
0
Q: Cannot find function of undefined - CommonJS pattern

theJavavar revealed = function(){ var a = [1,2,3]; function abc(){ return (a[0]*a[1])+a[2]); } return { name: 'revealed', abcfn: abc } module.exports = revealed; }(); How can i use CommonJS pattern with Revealing Module pattern?. When i try to do module.exports = r...

 
@karthys element.setAttribute() can help.
 
Not familiar with ways to extract xml values though
 
I wouldn't recommend setting the 'color' attribute to a <div> element though.
 
11:10 AM
@theJava You're using the pattern wrong I think
 
@Neil textContent
 
In the return object, "export" must be a property
 
@Neil: can u correct it
thx
 
@FlorianMargaine and regular expression?
 
@theJava module.exports = revealed;line is never reached
 
11:11 AM
@theJava, you now have about 6 answers...
@FlorianMargaine, our answers are identical!
 
yeah sorry :P
you edited, didn't you?
it was like dystroy's originally
 
my bad then :)
 
Great minds
 
deleted.
 
11:14 AM
Thanks all... how would i now call the function
should i do a require and then call the function
var object = require('classname');
object.functionName();
 
var obj = require('./path/to/file');
obj.abc();
 
and then object.abc()
 
@theJava there are no classes in JavaScript.
 
What Florian said
 
11:22 AM
A cobol programmer made a lot of money fixing Y2K programs and decided he'd get himself cryogenically frozen. One day he gets unexpectedly unfrozen, and he asks, "Why'd you unfreeze me?" and they tell him, "It's the year 9999, and you know cobol."
3
 
What's with the inundation of questions about modules and exporting functions between files? Did someone write a new blog about JS organisation or something?
 
Gah. Switched to a new Google account and now I don't have Google Music anymore
:/
> The Google Play music player is currently available in select territories.
 
@phenomnomnominal Paul Irish did share stuff on G+ on that topic recently.
 
Even if I try logging in with a proxy
 
Must be it
 
11:28 AM
COBOL programmers are heavily shifting to SAP now
Both of my parents are COBOL programmers
And, yes Y2K was a really big deal for them
 
Is SAP doing well those days ? I almost never see SAP questions on SO.
 
Super well
 
Damn... That's why we can't have nice things...
 
Guys, how do you usually organise your jquery code?
 
oh god, SAP
shudders
 
11:30 AM
I think I am going to minified them at the end but during development
what is the best approach to manage them?
 
I usually use a build tool building two versions : a minified one and a non minified one.
Normal users see the minified one and developers mostly use the non minified one
But, whatever the approach, the rule is to have a tool doing it, so that you don't have to do things manually each time you change a file.
About SAP, my profile see Technologies
 
im currently writing into separate files
and I made a lot of them into my custom built plugins
do you think it's good or bad?
 
@TimS. whats that image for Lol
 
@TemporaryNickName yeah, that's okay
have a look at what will always be on your site though and merge those into one minified file
merge together what you can to minimize http-requests on your page
 
yes, but the concatenating must be automatized, though, so that you can go on working with separate files
 
11:36 AM
of course
all that has to be managed by the build-process
 
11:48 AM
I'm reading this book about async events. Let me ask you guys. If you were going to fade a #container in and out infinitely (smoothly) how would you go about doing it? jQuery non jQuery I don't care.
 
Fade how? Like a smooth blink tag?
 
mmmm no like a one second opacity in and out
 
setInterval(function(){myElement.style.opacity ^= 1}, 1000);
(oh, I missed smoothly)
 
function onestep(callback){ myelement.fadeIn(function(){myelement.fadeOut(callback)})}
onestep(onestep);
 
11:56 AM
@ZachShallbetter css-animations
fuck old browsers, and if you really need to support them too, provide a jQuery - fallback
but css-animations are perfect for that
 
lol, yeah they are. I was just thinking about all the different ways someone could do it.
It seemed like it's a perfect situation for setTimeout
 
you can do it with JavaScript. of course
but it's a PITA, it's slow and it's expensive
 
My question was more about the loop than it was about fading
 
yeah, setTimeout, call a function (preferably a closure that accesses state-variables outside of it) and change opacity based on these variables
 
I'm stupid. Can somebody tell me why this code doesn't work ? jsbin.com/abunun/1/edit
Ok fixed
but it's ugly...
 
12:02 PM
linear fade will obviously be pretty easy, but other function-curves shouldn't be a real problem either
 
$e = $('#e');
function onestep(callback){
  $e.fadeIn(500, function(){
    $e.fadeOut(500, function(){callback(callback)})
  });
}
onestep(onestep); // ugly ugly code... must drink coffee...
 
@AndersMetnik tis cool i sorted it :)
 
and that's the jquery way :)
 
JS folk are good at colors, right? :D
6
Q: How to make a color APPEAR the same on different backgrounds?

BaumrBackground on color perception: Due to the nature of the human eye and visual processing by the brain, there's an optical illusion that the same color will look different depending on the background. It is known as the contrast effect, illustrated below — center rectangles are identical: Sou...

Strikes me curiosity a lot — perhaps you'll have some answers :)
 
hm, that's actually a cool question
 
12:04 PM
@GNi33 Why thank you :D
 
@Baumr I don't know if it's a solved problem but it's an important one. I play with HSL components to automatically build my colors depending on the type of background. A similar problem is to have color look similar when in big areas and in lines or texts.
 
@dystroy Googling HSL
Ah, interesting — I'm a n00b when it comes to color theory, as you can probably tell from my question
So you're saying you just mess with the sliders in whatever photo app, and compare by eye?
 
A good point with HSL is that for example you can build random set of contrasting colors. You can for example just ensure they have different light.
 
That's what I've been doing — but it's very time consuming :P (especially for all link variations :active :hover etc. in different areas of the site -- so if theres three backgrounds, there's 12 of those to set -- in different colors)
 
No, I don't use software, I compute colors from other ones in my code. It's still messy but automated...
 
12:10 PM
@dystroy Ah very interesting
@dystroy THAT'S WHAT I'VE BEEN LOOKING FOR
:D
:)
 
Once you have the right color space (I like HSL) it's easy to play with code.
 
ok so here's my fading in and out solution jsfiddle.net/HbeUx/5
 
waaaaaah
the fuck did you do?
no need to setInterval on jQuery-animation functions
they already do that, man
doesn't that fiddle lock up your tab?
 
how can i know (what event is triggered) when a function returns in async environment ?

Example :

function googleAddress(){
//make google api call
//return address-packet
}
function displayAddress(){
var address = googleAddress()
alert(address.latitude);
}

the problem above is the google api consumes time so in my (backbone environment) it executes the alert and that alert is underfined , how can i trigger alert after return ?Please some help
 
No it worked fine
Oh damn, I missed that it used setInterval
 
12:21 PM
Anyone know of a free VPN I can use to sign up for Google Music?
 
try using TOR
 
I did
The torcc file throws errors at me if I try to use a fixed exit node in the USA
When I edit from a normal editor, it saves fine, but the exit node isn't one in the USA
 
12:44 PM
lol, this one shouldn't crash your browser jsfiddle.net/zachshallbetter/hzKvD
 
@ZachShallbetter You haven't included jQuery, smartass :P
 
@KirstyHarris Cool :)
 
mmm, I did on mine
 
Works fine, though
 
i'd still not use setInterval
way too unreliable
 
12:45 PM
Yeah
 
Yeah totally
 
i realize that fadeToggle takes 500ms as default value
 
That's why I was interested in seeing what the js braintrust would come up with.
 
so 1000ms on the interval, okay. but don't take it for granted
that will screw up after some time
callbacks!
 
I want Google Music ;_;
Stupid Tor
 
12:48 PM
function fadeMe (){
    $('#something').fadeToggle(function(){
       fadeMe();     // oooh, the recursion
    });
}
 
What if I queued it?
 
and put the selector into a variable.
 
so it gets selected only once, and not everytime a new fade begins
 
12:50 PM
you already got the right element, why tamper the DOM to get it again
always try to cache selectors / elements where possible
 
how can i know (what event is triggered) when a function returns in async environment ?

Example :

function googleAddress(){
//make google api call
//return address-packet
}
function displayAddress(){
var address = googleAddress()
alert(address.latitude);
}

the problem above is the google api consumes time so in my (backbone environment) it executes the alert and that alert is underfined , how can i trigger alert after return ?Please some help
 
hehe
nearly :D
you put the variable into the function that gets called repeatedly
what do you think will happen?
 
@user1537158 callbacks!
:D
 
12:54 PM
@user1537158: Learn about callbacks and asynchronous programming
 
ah shit!
killit.... killit where the hell are you?
 
should have recaptioned it as "here's the bug from your code" or something like that though
 
;_;
 
@ThiefMaster ok so this image is referencing callbacks but could you explain what it "means" like I'm an eight year old
 
heh it's not - it was just a random bug i found on reddit and considered worth sharing :P
 
12:56 PM
dammit, i can't find the bookmarklet
 
hahaha, thought I was missing some logic inside joke
 
where's rlemon when you need him
 
javascript:function C(a){var b=a.target;"IMG"===b.nodeName&&(b.src="http://i.imgur.com/AM3Ae.png");B();a.preventDefault();a.stopPropagation();return!1}function A(){d.body.style.cursor="crosshair";d.addEventListener("click",C,!1)}function B(){d.body.style.cursor="default";d.removeEventListener("click",C,!1)}var d=document;A();;
@GNi33 ^
 
yes @ThiefMaster and @GNi33 thanks :)
 
@AmaanCheval ah thank god! love you, man! :D
was about to write it myself :D
huge, lot-legged bugs are somewhat of a weak-point of mine
 
1:07 PM
Wuss
:P
 
yes, yes i am
 
@ThiefMaster dude... you need to instacode some code then instagram a bug then instaGIMP the bug to the code and instagram that!
 
@ThiefMaster I have to implement CSRF using node.js and I saw this: stackoverflow.com/questions/10386373/…
 
results:
^ bug in my code
 
1:12 PM
I'm making a single page app and was wondering what you thought was the best practice to protect against CSRF
 
That would be an awesome picture to put on top of an answer to a "here's my code, where's the bug?"-style question :P
 
lol
 
should I use an antiforgery token?
 
X-requested-with should be sufficient as long as you don't allow CORS for random sites
you can't send that header with a normal form
 
But you can only use that if all your form submits are made with XHR
 
1:15 PM
what do you mean? do all ajax requests send X-requested-with (on all browsers) and no other requests do?
 
Which is not normally the case
 
@copy: "single page app"
that sounds like pure AJAX
 
parse every user action - know when they are being dicks - block them (cock block?)
 
right, all my submits are XHR
 
Oh, well, then yes
 
1:16 PM
and the header is included by pretty much every JS library/framework that has AJAX functions (if you do it manually you need to add it manually, too)
 
@ThiefMaster I can send cross site ajax though can't I? (for GET requests)
 
3 mins ago, by ThiefMaster
X-requested-with should be sufficient as long as you don't allow CORS for random sites
custom headers require preflighting
 
so you'll get an OPTIONS request asking if that header should be allowed
besides that, CSRF for GET requests shouldn't be a problem at all
unless you send CORS headers back the browser will not let the other site access the response and GET shouldn't modify data
 
Well, let's say user is logged into site A and site B runs a javascript ajax to site A asking for the user's last emails for example
If I validate an anti CSRF token I can prevent that, if I understand correctly what you're saying is I don't have to if all my data fetching is AJAX even though it is not all POST (it's POST,GET,PATCH,PUT, HEAD and delete)
Since only AJAX requests can add headers to the request so I should just check if the additional header exists on the server, right?
 
1:20 PM
Yeah
 
So... anyone here ever done anything with Lego Mind-storms?
it's just a small PLC right?
 
no, but i always wanted to
i think, yeah. don't know how limited it is though
 
I have a small robotic project I wanna make and I'm wondering do I tie up my Pi for it or do I spend 3 times as much and go Lego
 
great :) Though if someone has a program running on the user's computer, that doesn't help me, right? for example if I am able to run HTTP requests from the user's computer I can still exploit this but not the anti CSRF token. I'm guessing that this is not a real use case though right?
 
i guess doing something with a raspberry pi should be more fun after all
 
1:22 PM
PI might be a lot easier
 
then again if I'm on the user's computer and not the browser I wouldn't have access to the user's session in the browser anyway
@rlemon mindstorms is really simple to code for, I helped my niece build a lot of stuff with it, but all pretty basic
 
@GNi33 just need motor speed controllers / a/d converters / sensors / and everything else for the PI
the GPIO isn't bad to work with (from a glance)
 
yeah
right, that's included in mindstorm
 
not "included" but you can buy "modules" for them
I've made them before - not hard just tedious
a/d converters for IR sensors are a PITA to get working right.
 
i think a setup with a Pi would give you more possibilities though
 
1:24 PM
@BenjaminGruenbaum No, in that case you could also attack him even if you're using CSRF tokens
 
but who am i to speak, never did anything like that after all
 
we spend a lot of time cutting and stripping wires. for a good price we can buy a machine to do it - I think I should be able to make one for < $200
 
@copy right :) So a custom header will suffice, thanks a lot :)
 
it's some blades, a few servos/steppers (depending on $ and tourque), a dc motor, optical encoder wheel, handful of IR sensors, and the PI (and I/O interface) - motor speed controllers I will likely buy from a hobby shop
can't be bothered to make them
 
blades? are you trying to build a robot-wars - bot ? ;)
woah, i loved that show
 
1:29 PM
4 mins ago, by rlemon
we spend a lot of time cutting and stripping wires. for a good price we can buy a machine to do it - I think I should be able to make one for < $200
you can buy some crazy machines to do it
 
yeah, i was just being stupid again
 
some get pretty pricey
and some DIY ones are overly complex and slow
Holy shit I can't believe how much money people make from selling scrap wire to junkyards
 
How much money do they make?
 
Hi hi. good morning all ^_^
@Neil my grandfather helped write cobol (yay)
 
over a buck a lb
for scraps
like scrap extension cords and shit
hehehe
> The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.
 
1:49 PM
@Neal He'll be unfrozen in the year 9999
 
@Neil haha he isn't frozen
 
hehe, even better
> APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.
 
posted on January 30, 2013 by Randall Koutnik

I hate getting distracted.  I always amaze myself when I get "in the zone" and slam out some really great code.  Unfortunately, I'm in a college dorm (one of the most distracting places in the world) with an internet connection.  What's a poor ADD kid to do with all this information overload? I've tried lots of things.  Post-it notes, coffee, regular sleep schedules, moving

 
@Neal It's probably for the best then
In the year 9999, they need to move to something more modern than cobol, like assembly
 
FORTRAN
 
1:53 PM
@Neil ehhh LISP
 
@Neal Why are you talking to yourself?
 
@Zirak :-P
 
brainfuck will be the best language in 9999
 
hi everyone
 
@Ivan0x32 hi hi
 
1:57 PM
@FlorianMargaine Glad I won't be alive then
 
@FlorianMargaine Disagreed; LOLCODE
I looked over the LOLCODE spec with someone here, that language actually looks good
 

« first day (837 days earlier)      last day (4111 days later) »