« first day (62 days earlier)      last day (4876 days later) » 

10:00 AM
is confused
This is the critical line, as outputted by Firefox:
return t + (" (" + + f.offensive + + f.spam + ")");
 
The problem is that f.offensive and f.spam are supposed to be added together as numbers before being concatenated. If the parentheses are shifted (as they have been) to include the strings "(" and ")", they aren't added, they're just concatenated. So instead of "(" + (5 + 0) + ")" we get "(" + "5" + "0" + ")"
 
return t + (" (" + (+ f.offensive + + f.spam) + ")");
Is the correct version. Without the brackets, the result changes, and numbers become concatenated instead of added
 
e.g. "(50)" instead of "(5)"
 
@YiJiang exactly, Firefox has removed the parenthesis and the result changes
 
In my case it actually moved them, I don't even have the outer parentheses originally.
 
10:02 AM
It strikes me as odd that Firefox's JS engine does this. Why did the developers feel it was necessary to change the original source of a function?
 
@YiJiang I'm confused now...I don't get that, I get this for .toString():
function hello(){
    return (t + ' (' + +(+f.offensive + +f.spam) + ')');
}

console.log(hello.toString());
console.log(hello.toSource());
Result:
function hello() { return t + (" (" + + (+ f.offensive + + f.spam) + ")"); }
function hello() {return t + (" (" + + (+ f.offensive + + f.spam) + ")");}
...where do you guys see parens getting moved?
 
What Firefox version?
 
3.6.13
 
I have return t + '(' + (+f.offensive + +f.spam) + ')';, toString() gives return t + ("(" + + f.offensive + + f.spam + ")");
 
@NickCraver When you don't have the + in front of the inner brackets
 
10:05 AM
Ah, right.
 
function hello(){
    return (t + ' (' + (+f.offensive + +f.spam) + ')');
}

console.log(hello.toString());
// Output: function hello() { return t + (" (" + + f.offensive + + f.spam + ")"); }
 
> For Function objects, the built-in toString method decompiles the function back into the JavaScript source that defines the function.
so it's the compiler's fault
 
Too many +, I guess, confusing us all
 
@YiJiang you shouldn't need + in front of the inner brackets anyway, no coercion necessary
 
function hello() { return t + " (" + (+ f.offensive + + f.spam) + ")"; }
function hello() {return t + " (" + (+ f.offensive + + f.spam) + ")";}
 
10:07 AM
@IvoWetzel You're on Firefox 4 beta, right?
 
fx4b9pre
 
8 to go :-p
 
2 :(
 
Anyway, @TimStone you should go ahead and answer the question
 
morning
 
10:08 AM
mornin' @Raynos
 
@YiJiang ah gotcha, I was using the wrong version from the start, my fault
 
@TimStone 3.6.13 Ahem...
 
well, I'd say + is unsafe given the type of operator isn't deterministic at the time it's inlined
 
@YiJiang Sorry, 5 am and I haven't slept yet :P
Fixed, heheh.
 
10:10 AM
@NickCraver Actually, I was using parseInt at first
 
1 to go!!
 
The problem stems from the decompilation of the function
lol @IvoWetzel
 
@IvoWetzel For erhm... what?
 
Everybody quickly up vote that guy's question! ;-)
 
who? where? when ?
 
10:12 AM
Ivo needs one more up vote for the reversal badge
who's gonna do it?
 
@YiJiang Wow, there was a big syntax error too. Fixed that now as well, heh.
 
Link?
 
@AndyE MEEEE!!!
 
too late someone upvoted it :D
 
20
A: preventing site visitor from saving site images and disable right click

Ivo WetzelYou can't prevent people form downloading your images. Many browser disallow you to disable the context menu The user can disable JavaScript If the user can see the image, it's already on THEIR computer I don't even need a browser I can just do an HTTP request on your site to fetch all the imag...

 
10:13 AM
yay
Happy Gold Reversal Badge, everyone :-p
 
Done. Enjoy your badge @IvoWetzel :P
 
Hooray! :P
 
Well as soon as the cron runs and rewards the badges :P
 
Quick! everyone up vote that guy's question! ;-P (again)
 
@IvoWetzel Bring out the kitten, we need to parteh!
 
10:15 AM
@AndyE hmmm wonder if it is taken away when it's deleted...I hope not:
seems like a fair number of questions that badge is awarded for are deleted
 
Celebrate!
 
@NickCraver: badges don't generally get taken away. But if you earned another, the cron would probably work out that you already have 1 and not give you the second.
 
@AndyE yeah it's a query that checks count against actual
 
@NickCraver your previous avatar was nicer.
 
@Chouchenos and @NickCraver, sitting in a tree... :-p
 
10:18 AM
but you didn't get to see my lovely moving boxes
 
@Chouchenos: he looks more thoughtful in the new one, like he's contemplating something
 
@NickCraver You could place a box right in front of the camera and put a photo of yourself on the box
 
@AndyE indeed
 
@Chouchenos is this your way of telling me that our date for tomorrow night is a no-go?
2
@IvoWetzel that's my cat's job, he's been trying to pack himself for 2 weeks now
I'll change it again once the new office is setup at the house, probly a few days - gotta order monitor arms and such
 
@NickCraver Unless you change back your avatar... yes.
 
10:22 AM
Self refreshing pages with alerts are a nightmare
 
@Chouchenos why can't you love me for my mind? is there no depth to your shallowness?
 
@NickCraver get the old picture back. you dont look like @NickCraver
 
times change!
 
@Raynos Exactly !
 
for example I'll be off today an hour from now...time to pack the computer, moving day!
 
10:24 AM
From where to where ?
 
@NickCraver OMG CAN'T DO DAT BRO! DA SO WILL COLAPS WITHAUT YA!
2
 
@NickCraver marks his calendar for the day he could finally answer some jQuery questions
 
Quick! That's our chance one day without wrong, guessed, jQuery answers, SO can finally redeem itself!
@AndyE I'm still asking myself how that question gets so many views
 
@IvoWetzel Look through the sharing badges to see if it pop'd up on reddit or something
 
@YiJiang Can't find anything there
 
10:30 AM
92
A: What would be the math symbol for representing a fraction?

Andy EJudging by your comments, it looks like you're specifically asking how to display fractions. If that's the case, many fractions are defined as HTML entities. As an example, a few of those entities are: ½ ¼ ⅛ ⅔ ⅖ ¾ ⅜ ...

@YiJiang this one? ^
:-p
 
@AndyE Oy, enough self promotion for one day
 
!kitten rchern
 
\o/
 
Hahah
 
10:38 AM
Hmm... does anyone here know a way to associate javascript objects with DOM nodes? I want real objects, not just JSON-attributes or so. And I wouldn't like it if it leaked memory, so the only reference should be in the DOM. And it should work in IE8 or so, too.
@Ivo ah, now you've got your badge?
 
@thejh @IvoWetzel you can protect images. If I care I'll mock out a sample this weekend. The question from yesterday :P
 
@NickCraver: that question got deleted... how rude!
 
@Raynos err... what?
 
....wtf
 
@thejh Yep got it
 
@Raynos I'm awaiting your empty page then
 
@IvoWetzel :D
 
@IvoWetzel hehe
 
@IvoWetzel im not suggesting ill bother to make it work outside of chrome :P
 
@Raynos Deadline is the 1st Jan 11, better hurry!
 
10:42 AM
@Raynos do you want to talk to the GPU directly or what?
 
@thejh Pointless the image data still needs to be downloaded
 
@thejh no need
Its going to be unpractical. But I should be able to display an image you cannot steal
 
@Raynos that's impossible
 
I can steal your house if I'd really want to
 
@Thejh let me rephrase that to display a picture.
 
10:45 AM
@Raynos I still think that it's not possible
 
what is the daily rep limit?
 
@Greg 200
 
@Greg 200
 
@CodingKitten Amuse me
 
scramble the image, by corrupting x% of the pixels, and then just display many corrupted images at 300fps
 
10:46 AM
@YiJiang Vote for example, write a server-side script that takes X and forth in netbeans
 
The visual effect will trick the user into seeing the intended image. but at any moment in time the image is corrupted and not as expected
 
@Raynos 300fps
@CodingKitten You can haz VSync?
 
@IvoWetzel Damn, shot first? how do I get those 2 ups I guess, hm
 
@CodingKitten Yes Han shot first
 
@IvoWetzel the form doesn't that
 
10:47 AM
@IvoWetzel Now look here. I can get it to run at 300 fps on my machine then the test passes :P
 
@Raynos @ircmaxwell will happily give you a "works on my machine" certificate too :P
 
@Raynos ha, already wrote how to circumvent it just using a program and screenshots
 
@IvoWetzel when you get a real machine itll pass on yours too
@thejh you cannot reconsctruct the image programmatically
 
@Raynos take multiple screenshots. for each pixel, take the value that appears most often
 
@Raynos "Real machines" sadly do run IE6
 
10:50 AM
@thejh thats why the real value will not have a maximum frequency
 
@Raynos err, what?
 
@thejh you see the real image because its a visual illusion, what your actaully seeing is lots and lots of garbage stuck together so that it looks like an image. Any program you write will get the image but it wont look right.
 
$('img').each(function(){$(this).replaceWith('<img src="randomimageontheinterwebz" />');});
Same effect
 
@Raynos what about the average values?
 
@thejh Average? Boy I didn't make it that far by using stuff that's "average"!
stupid manager rant
 
10:56 AM
@thejh average values isnt going to look right
you can easily skew the entire thing by throwing in a few pixels that are completely off
Bah. I'm having difficulty defending it again statistical analysis.
 
how could I ever use some other editor than VIM >_>
 
At least you wont be able to recreat the exact image :P I think that counts as a "technical" victory
@IvoWetzel because vi is moar man
 
@Raynos Where does the data come from? :P
 
@IvoWetzel node file read :D
then corrupted images over a websocket
 
@Raynos Very... scalable solution :P
At least it's not Ruby...
 
11:01 AM
@IvoWetzel Oh, if you want to server more then one image the fps will drop too low for me to claim it doesnt impact users
also I doubt i'll get away with anything larger then 300x200
 
@Raynos But I want to protect my 11 gigapixels images!
 
@IvoWetzel :D server cluster and buy your clients a beast of a machine so the clientside scrambler keeps the fps up
"My client disabled javascript and the image doesnt show!!!"
 
pretty sure this is the oldest question I ever went back to =P stackoverflow.com/questions/740644/…
 
@NickCraver And I thought I was bad with these tabs open for weeks. ;)
And with that up vote, I'll go off to rest a bit before trying to get back to work..
 
@TimStone on my monitor you can aeropeek maybe 12 chrome windows at once, after that it's a vertical list from the start menu....*then* it's time to close it all and start over :)
my wife's the opposite, she considers open tabs non-volatile storage basically
 
11:16 AM
You cant have more then one window!
You cant have more then 10 tabs!
 
@Raynos I had to use IE6 this morning, I had a ton of windows
 
That's just _unmanageable
 
0
Q: How to associate javascript objects with DOM nodes?

thejhCan I, and if so, how can I associate javascript objects with DOM nodes? My requirements: real objects, not just JSON-stringified-attributes or so shouldn't leak memory should also work in non-standard browsers like IE8 or so I was thinking about doing it with a global array that holds the da...

 
@Raynos here's what my current browser state, taken a few seconds ago looks like: jsbin.com/obuxa5
95 tabs in 12 windows
 
lol and I thought I was bad
Although I did just have 3 tabs open that were all the same page.
 
11:21 AM
ew
 
barely 20 tabs atm
 
7 tabs here
 
@NickCraver i see a porn tab there!
 
closes 6.
 
7, but I just organized them
 
11:22 AM
@Greg "javascript - clearTimeout without ID - Stack Overflow"?
 
yeah baby!
 
#(e) {
     e = e || window.event;
     // event handle
}
is the e = e || window.event line redundant ?
 
Without ID? Didn't they teach you safer coding?
 
it was sexy, I couldn't resist
 
I've got 7 app tabs alone
 
11:23 AM
@IvoWetzel that's possibly one of the top 5 hackiest solutions I've posted on SO
 
4 here
 
1
Q: clearTimeout without ID

djsparkIs there any way to clear setTimeout() if it doesn't have an explicit ID? The problem is I'm not allowed to change some code that already ran and set the timers without any handler. Does JS set 'anonymous handlers' to them? Are these timers stored anywhere accessible? Can I get any of those pro...

 
@Raynos nope
 
my hackiest one
8
A: How to get the original variable name of variable passed to a function

Ivo WetzelEDIT: To make it clear, I don't recommend using this AT ALL, it will break, it's a mess, it won't help you in anyway, but it's doable for entertainment/education purposes. You can hack around with the inspect module, I don't recommend that, but you can do it... import inspect def foo(a, f, b)...

inspect module guarantees hacks
 
shit I assumed e = e || window.event was for legacy IE5 support rather then IE8 still cant do event handling properly. I got to used to jquery garantuee that eventhandler function will have an event object passed to them
 
11:27 AM
they will most likely never change that
 
Ok, I'm going to shoot the developer who used 3 space tabs.
 
4 space tabs is so 2006
 
@CodingKitten Bite @Greg
 
@IvoWetzel I it doesn't work really hate that you get 5 minutes
 
$obj.bind("event", f);

function f(e) {
     e = e || window.event // f is compatible with standard event handling
     // what happens when I use the same code but have it bound via jquery
     // instead, i.e. under which cases would jquery pass a falsy paramater to f

     // do stuff
}
 
11:31 AM
Best way to indent code is mixing spaces and tabs and only using 1 space per indent(!)
Also, combine that with arrow programming and tada
 
I used 3 space tabs all the way through university so it was obvious who stole my code
 
@Raynos Well e will be set by jquery so it works normally
 
2 people were done for plagarism because of it :)
 
@Greg haha :D
 
I nearly lost my grade too though for keeping my code public ...
 
11:33 AM
@Greg :\ whats wrong with having your cw public
 
@CodingKitten What do you have to say about that?
 
@Raynos exactly ... basically I just had to prove that I wasn't spoon feeding people
 
@YiJiang I know :)
 
@CodingKitten you're not making sense!
 
@Greg waits OH. NOOOOO! to see the line to insert it at the correct position
 
11:34 AM
(gasp) He knows!
 
I need a wider monitor :(
 
@CodingKitten What do you know?
 
@YiJiang ddpp circumvent the protection ? don't want it shouldn't be an idiot when you know this funny "security feature" of that...
 
@IvoWetzel Don't we all?
 
@IvoWetzel get 360desktop (if you're on Windows)
 
11:35 AM
@Greg Ubuntu, but I want to fit more horizontal views in my vim
 
I'm serious here, are there any cases where jquery will pass an event that is falsy ?
 
@Greg That thing crashed almost immediately after I installed it. Wouldn't work after repeated attempts
 
@Raynos How can any event be falsy? If it could you'd check against it...
 
@IvoWetzel black magic.
Is using $.browser safe? (I know it's stupid). Will $.browser be removed in $ 1.5 or 1.6 etc?
 
@CodingKitten Will that stuff be removed in a future version?
 
11:44 AM
@IvoWetzel that's right yes, sorry
 
@YiJiang you get the right version (32/64 bit)?
 
@Raynos Kitten says it will be removed
 
@Greg Definitely
@IvoWetzel Wait, was that you behind the kitten there?
 
interesting, if you use data() in jquery and then remove elements you assigned values to with normal, non-jQuery methods, there seems to be a memory leak
 
@CodingKitten Tell me!
 
11:46 AM
3
A: How to associate javascript objects with DOM nodes?

Spiny NormanWell, jQuery has the data system, which you could give a try. They say it's free from memory leaks.

 
@YiJiang we ran out of javascript. I'll play around some handy shortcuts like an idiot when you point out a flaw in the github web interface?
 
@YiJiang dunno then ... the product is cool, but not very usable...
how do you make codingkitten show your best answered question?
 
!kitten wisdom greg
Wrong greg, obviously
 
wow, thought question bumping didn't really have an effect with the new homepage, still this has necro potential:
4
A: Unable to get Id of draggable divs in jquery. (using jqery ui)

Nick CraverCurrently you're attaching the click handler to all elements in the DOM with * (very very bad, don't do this!), including any children in those draggables. You are correctly stopping the event from bubbling up using .stopPropagation(), but it's likely a child of a .draggable you've clicked, no...

attn everyone: try and answer at least 1 or 2 old questions a day!
 
@NickCraver uhm... wasn't that the thing you posted a link to earlier here in the chat?
@NickCraver I think that the chat was the necromancer here
 
11:51 AM
thought I posted the hacky ID thing when we were talking about it
 
@CodingKitten How could you run out of JavaScript!!? How could you!?
 
@YiJiang But users can talk them with other programs. I've yet to find a
 
ooo that does explain it
@thejh totally linked the wrong question earlier, was an even older one - theory about the homepage changes holds true
 
46 mins ago, by Nick Craver
pretty sure this is the oldest question I ever went back to =P http://stackoverflow.com/questions/740644/unable-to-get-id-of-draggable-divs-in-jquery-using-jqery-ui/4469879#4469879
@NickCraver what? They're the same one!
 
yup, was looking at an even older one earlier, posted the link to the wrong tab, trying to find it again
@Raynos made me close all my tabs down
 
11:55 AM
!kitten wob
 
!kitten wob
 
!kitten wisdom Greg
 
!kitten wisdom Gandhi
 
Guess you're out of luck with Gandhi. Yawn I nearly fell asleep when checking their answers.
 
12:00 PM
 
@CodingKitten Talk to me
 
@YiJiang Why do I like this: './vote.php?class=' + thisclass + '&votetype=up&.....;"
 
It likes PHP :(
 
@CodingKitten No you don't. You do not like PHP. Yes?
 
@YiJiang Yea, that works, didn't omit a known class do form.foo label and write a jquery way of them work in bash.
 
12:06 PM
@CodingKitten Why would one want jQuery in his bash?
 
@IvoWetzel From comment, UP VOTE me...
 
Gogo! All up vote our kitten overlord...
!kitten wisdom Ivo Wetzel
 
!kitten wisdom Kitten
 
Guess you're out of luck with Coding Kitten. Yawn I nearly fell asleep when checking their answers.
 
kitten needs 60 more ups, so it has 666 rep...
@CodingKitten Are you the Devil?
 
12:08 PM
@IvoWetzel Wow, given all of the text at the correct position
 
@CodingKitten Indeed!
 
@CodingKitten ]
 
@YiJiang to circumvent the explaination of the same link. Any ideas?
@Greg flash caches the stuff for 10 minutes
 
@CodingKitten what are you talking about?
 
@Greg there are soon more comments than upvotes -.-
 
12:08 PM
lol
 
another 1:1 copy....
!kitten wob
 
It's rcherns fault!
rchern, St. Louis, MO
1.9k 1 3 16
 
Bad, that should have been YiJiang
 
!kitten wob
 
It's Michael Mrozeks fault!
Michael Mrozek, Indiana, US
15.7k 2 16 45
 
12:11 PM
you're damn right is it
 
!kitten wob will not choose me, will it?
!kitten wob
 
It's Jins fault!
 
@Ivo from which users does the kitten choose?
 
@thejh The ones that were in YiJiangs WOB scripts
 
@thejh Which can be found here: jsfiddle.net/yijiang/AYPpF/4/embedded/result
 
12:19 PM
Can anyone help me with a counter problem i guess...
http://jsfiddle.net/VFJSs/
when you add and remove the counter doesn't start at 0!
Lets say i add 4 items and remove them all and then add again it starts at 4 :o
 
@Opoe no, it's 0 again
err... well, at least the counter is 0 again
 
@thejh but it starts in the 'fourth' place right ? :o
 
@Opoe by the way: <input type="checkbox" id="checkbox' + (counter)
@Opoe no, that's because of your <br> tags
 
ooooooo it doesnt delete the br tags!?
of course
@thejh thank you ;)
 
@Opoe use CSS instead
 
12:32 PM
and i could remove the counter--; as well :')
 
anyone know why this contenteditable's formatting buttons don't work on the second edit? jsfiddle.net/g105b/gbFdh
 
12:47 PM
Hi, all!
@Greg Do you really need them? One may use [Ctrl]+[B|I|U].
 
@Nyuszika7H hi, 14 hours passed!
 
@Greg Huh?
 
I keep forgetting how jquery makes cross browser support effort less.
I gave up on doing event handling directly because IE is a pain :(
 
15 hours ago, by Nyuszika7H
is going to sleep. Returning tomorrow, approx. at 14h.
 
@Greg *at* 14h, not after. I meant 14:00 PM.
 
12:52 PM
@NickCraver thats your own fault not mine
 
@Nyuszika7H well you're early then
 
time to pack this sucker, have a good one
 
@Nyuszika7H 14:00 pm ?
 
@Chouchenos Yep.
 
isn't that 02:00 pm or 14:00 ?
 
12:55 PM
@Chouchenos yes it is, sorry
@Greg First of all, make your code shorter. Example:
Avoid this
var something = function() {
    // do something
};
Use this instead
function something() {
    // do something
}
Note In cases like this: numbers.random, you must use the first one, because function numbers.random() { won't work.
Avoid this (example using jQuery)
$('.obj').click(function() { doSomething(); });
Use this instead (example using jQuery)
$('.obj').click(doSomething);
Note You can only do this if the function has no parameters.
Avoid this
var x = 1;
var y = 2;
var y = 3;
Use this instead
var x = 1,
    y = 2,
    z = 3;
[the end]
 
var something = function() {
    // do something
};

Use this instead

function something() {
    // do something
}
there's a BIG difference between the two
 
@IvoWetzel so big?
 
the first is an expression
the latter a statement
in the second one something() is created at compile time, so it's callable in the code above the definition
 
sorry then, it's too late to delete it
 
the first one gets evaluated at compile time
 
1:10 PM
And returning to the time, yeah, I forgot to specify my timezone. UTC+01:00 (CET – Central European Time). (sorry, summer was a mistake)
 
why is var return = 42; return return; invalid :(
 
@Raynos why shouldn't it be?
 
@Greg strange to see var obj = new function() {}; I've never used anonymous constructors before
eval('FunctionName("' + someObject + '")')
Am I missing something or is the use of eval completely redundant here?
 
@Raynos not if someObject has an overwritten toString() method or is something with native references or so
@Raynos or maybe it's used as a clone function
 
@thejh I understand the .toString, but what do you mean native references
 
1:24 PM
@Raynos to avoid passing a reference
@Raynos uh, for example, a reference to the window or document or so, or file descriptors in node.js
 
I see
I think its just used a string data
 
@Raynos so clone is unnecessary, right?
 
probably
 
1:36 PM
NOOOOOOOOOOOOOOOOOOOOOOOOO
expandtabs was missing from my .vimrc
 
1:50 PM
http://jqueryui.com/themes/theme-name/jquery-ui.css
 

« first day (62 days earlier)      last day (4876 days later) »