« first day (1664 days earlier)      last day (3267 days later) » 

12:00 AM
!!caniuse textcontent
 
damn
6
Q: Javascript textContent is not working in IE8 or IE7

loganI need to add 2 cell content of a table and display it. Below JavaScript command works fine in chrome or IE10. But not working in IE8 or 7. parseFloat(document.getElementById("total").textContent).toFixed(2); It results, NaN Could you please tell me what is the equivalent command in IE7 ...

negative.
$('#Tag').val(this.textContent || this.innerText); // :3
 
@SterlingArcher Just use jQuery...
 
nuuuuu
 
how do i get an elements position relative to 0,0 of page ?
 
12:07 AM
Wait, I misread that
 
nvm good old
 getScreenCordinates(obj) {
        var p = {};
        p.x = obj.offsetLeft;
        p.y = obj.offsetTop;
        while (obj.offsetParent) {
            p.x = p.x + obj.offsetParent.offsetLeft;
            p.y = p.y + obj.offsetParent.offsetTop;
            if (obj == window.document.body) {
                break;
            }
            else {
                obj = obj.offsetParent;
            }
        }
        return p;
    }
 
12:30 AM
window.addEventListener('scroll', event => this.adjustPositioning(event));
vs
window.addEventListener('scroll', this.adjustPositioning.bind(this));
 
12:49 AM
Is there a way to detect in the blur event, the reasons why the input field has lost the foucs?
 
What on earth is a "mobile web JS SDK"?
 
An SDK for developing web applications in JavaScript
 
A JS lib written by someone with a marketing department.
 
thaaaaanks
 
@darkyen00 Gotta love dem phat arrows
 
1:04 AM
They're not the same though. this is resolved differently.
 
@KingMob Not in the two examples presented above
 
In the first case this is resolved when the event is fired. In the second, when the call to addEventListener is made.
Maybe the result is the same: I'm not aware of any wider context.
 
Silly challenge
 
Which challenge is this?
 
Program analysis homework
 
1:16 AM
Is there a way to ignore the blur event of an input field if an link has been clicked?
 
1:40 AM
nevermind, found a soloution. ;)
 
Is there something like Firefox's 3D Page viewer for Chrome ?
 
2:09 AM
@rlemon I have a buddy connected to my wireless network. Do you know of a way to screw with him?
 
@Shmiddty Man in the middle attack
Steal all his codez
 
2:30 AM
!!zalgo Ryan
 
@SomeKittens Rͦ̓͑ͥ̑ͮͫ͌̇̉ͣ̐ͪͩ̂͗̅̚͏͏̷̤̪͍̗̫̗͓̰͜y̛̰̭̻̼̖̗̋͂̓̂͐ͯͪ͋̀̅̒̔͛̉͐ͭ̄̀aͩ̓ͭ̄̔͐̏̍ͧ̎͆͆́ͬ̄ͨ̂̑͏҉̷́‌​̖̥̺͚̝̲̙͓̳̲̝͕̖̝̞̝ͅn̶̵̩͖̺̰͚͋̍ͬͪͦͦ̀͞
 
3:16 AM
@SomeKittens What hours do you typically work?
 
@phenomnomnominal pretty neat, but I want a flat surface to do that dangit!
 
Baby steps :P
@Loktar have you seen this: thevoid.com
 
3:31 AM
heh crazy
 
0
Q: Dynamic Method Binding Anomaly?

Mike ChenA very mysterious polymorphism problem: import static java.lang.System.* class Super{ public void meth(Super other){ out.println("#1 - in Super.meth(Super)"); } } class Sub extends Super{ public void meth(Super other){ out.println("#2 - in Sub.meth(Su...

lol meth
 
@phenomnomnominal first comment has the specs
it seems like they are targeting businesses with it, which is still awesome
I want to try it lol
oh you see that Oculus announced the rift cv1 will be coming out in Q1 2016?
 
@Loktar that's basically all I want in gaming
Run around, get actually sweaty.
Actually be able to hit a wall haha
 
ha yea
 
4:17 AM
This is not an answer and should have instead been posted as a comment. — royhowie 23 hours ago
I now understand much more of the conversation in this room over the past few weeks.
 
this is the most depressing tweet conversation between legends I've ever read :(
@davidwalshblog I'm afraid that never gt me a job and even literally got me kicked out of the building once, security and all.
how come mozilla or other arts societies never asked her if she wanted to work with ana?
I really hope she has overrwitten (if that's even a word. Like overreacting but by writing?)
 
@towc I believe it is, but spelled overwritten
 
woops
not sure how I've missed that XD
 
Doesn't matter how good someone is, they won't land a job if no employer know they exist
 
4:33 AM
that guy suffers from whatever that symptom is called
the Dunning-Kruger effect!
The Dunning–Kruger effect is a cognitive bias wherein unskilled individuals suffer from illusory superiority, mistakenly assessing their ability to be much higher than is accurate. This bias is attributed to a metacognitive inability of the unskilled to recognize their ineptitude. Conversely, highly skilled individuals tend to underestimate their relative competence, erroneously assuming that tasks which are easy for them are also easy for others. As David Dunning and Justin Kruger of Cornell University conclude: "The miscalibration of the incompetent stems from an error about the self, whereas...
 
So like a reverse imposter syndrome?
 
yeah, or at least I think so
 
Out of those two I'd rather stick with my imposter syndrome, at least that doesn't make me an ass
 
Hello everyone I've an ajax request on button click which is trigger by another buttonclick but that send request multiple time while when I click on the same button that just works fine.

jQuery("body").one('click', '#btnChooseImg', function(e) {
jQuery(".cropControlCrop").click(); // it sends request multiple time
});
 
add e.stopPropogation(); inside the function above the .click line
!! mdn Event.stopPropagation
 
@user2736704 see above
 
stopPropogation is not a function and I've tried e.preventDefault() which isn't working
 
@user2736704 note the spelling
 
@royhowie not working that just sends it again and again....
 
@royhowie Wow, I opened one file in that linked repo and my eyes are already bleeding
 
4:42 AM
jQuery("body").one('click', '#btnChooseImg', function(e) {
e.stopPropagation();
jQuery(".cropControlCrop").click();
});

any other trick...
 
$("body").on("click", "#btnChooseImg", function (e) {
    (e || event || window.event).stopPropagation();
    $(".cropControlCrop").click()
})
 
e.preventDefault() ?
 
@royhowie thanks for your help but really really that's not working
@ivarni I've tried that aswell
 
@user2736704 probably because #btnChooseImg is inside of body
Why can't you just use $("#btnChooseImg").click(function () { /* etc */ })?
eh, can you just make a fiddle actually?
 
@BartekBanachewicz Happy birthday! :D
 
4:45 AM
@ivarni it's all sorts of bad; plus his answer is terrible. I now see why he's constantly called a troll.
 
@royhowie nop that's not inside the body but that just load letter on another ajax request
 
Argh, I'm going to react-conf europe and now they announce a hackathon the day before the conference... and I already booked my flight :/
 
@ivarni Rookie error
There's always a party or hackathon before the conference!
 
@ivarni I think hackathons are slightly overrated
 
@monners Yeah, I guess.
 
4:58 AM
(unless you manage to build something really cool)
 
Also, you're flying in the same day as the conference? I take it you're already in Europe?
 
@royhowie It's an awesome way to meet people before the conference
 
@ivarni granted
 
Yeah, I'm in Norway, conference is in France, I land around 5 pm in Paris which is basically when it ends
See, I did allow time for a potential party ;)
 
How much would it cost to change the flight?
 
4:59 AM
I bought the cheap kind of tickets, they can't be changed
I'd have to buy new ones
 
You could always call the airline and try
Doesn't hurt to check. Sometimes someone on the phone can pull a few strings
 
weblog.raganwald.com/2007/01/dont-overthink-fizzbuzz.html I always get dragged down the rabbit hole with these blogs
(the ones about hiring programmers and about how only 1 in 200 can write FizzBuzz off the top of their head)
 
I've tried before, with tickets of the cheap kind they never change them, that would kind of ruin the whole idea of selling them cheap in the first place
 
(which, frankly, I still find hard to believe)
 
@royhowie Yeah, I never believed that either
 
5:01 AM
@ivarni sometimes it's like $50 to move them
 
They have slightly more expensive tickets that can be changed for a fee, in hindsight maybe I should have bought one of those
 
@ivarni it just seems implausible. How can 199 out of 200 programmers not write a simple if/else block of code
 
but I wanted a low budget so it would be easier to get it approved by my company
To be fair, I fucked up FizzBuzz once while using it as an example to teach eclipse to some students at a university. I saved my ass by pretending I did it on purpose to show them the debugger.
Coding under pressure really adds to the difficulty
 
The only tricky part is writing if (n % 15 == 0) first
 
but still... fizzbuzz..
You can fit in in a tweet
 
5:05 AM
either way, if you mess that up, an interviewer should (ideally) point you in the right direction, especially if you were scribbling the program as fast as possible
 
I think the whole concept of live coding during an interview is flawed
 
I guess it depends on the person
 
@ivarni What do you think is the better option?
 
@meagar oooh, mods' names are :blue:
 
@meagar I was at an interview once where they asked me to prepare a solution to a problem and once I turned up they ignored the code and asked me to explain what it did, how and why.
 
5:09 AM
if you have ajax refresh page data, will it treat it like a brand new page load?
 
@ivarni That goes hand-in-hand with live coding IMO
 
@ivarni Which conference are you attending?
Front Trends?
 
@SomeGuy ReactEurope
 
When we hire we typically go through several interviews
 
Ah
 
5:09 AM
at least one is a ~3 hour pair-programming session
 
@meagar what do you mainly look for (as short a description as possible)?
 
Pair-programming is better than simply having two people look at you while you code some obscure algorithm
 
"smart and gets things done"?
 
@royhowie Enthusiasm and aptitude
@ivarni I think the "obscure algorithm" is the larger problem there :p
That's such a waste of time
 
@meagar I think it's better to ask them to write some recursion or something (not too difficult) that demonstrates that they know the concept
 
5:12 AM
Yes, if you can include a session on a real life actual problem within the domain that the applicant will actually work with that's a big plus
 
anyone can look up an algorithm in CLRS and implement it
 
!!blocking
 
I have never had to implement a sorting algorithm in my career :|
 
@meagar Why would anyone need to do that? It's a solved problem :)
 
Write comparators, yes
 
5:13 AM
A good programmer is lazy
 
@phpPluginMaster what are you trying to do?
 
a great programmer is efficient
 
@monners And you get efficient by not re-inventing the wheel all the time
 
a simple alert after an ajax refresh
 
@monners the two can go hand-in-hand
@phpPluginMaster no, I meant with !!blocking
 
5:15 AM
@royhowie I didn't say they couldn't
 
@royhowie see if anyone is blocking me
 
@phpPluginMaster hint: almost everyone
 
Who are you guys talking to?
 
@monners roy
 
@monners meagar, royhowie and you.. are there anyone else here?
 
5:16 AM
I guess not...
 
@ivarni i'm here
 
@ivarni i.stack.imgur.com/owOH5.jpg (click to see)
 
@royhowie i'm good with php, but not javascript
 
@phpPluginMaster light reading
 
@roy, i read as I code
 
5:19 AM
@phpPluginMaster as does every programmer who is not blind
 
@roy some programmers are blind
 
I don't like that I can be pinged as roy (instead of @royhowie)
 
using @ roy also pings every other user who happens to have a username starting with those letters
 
@%howie is this better?
 
@ivarni that's what I figured (they also have to have visited this checkroom, no?)
 
5:22 AM
so people can ping me by saying @php
 
@royhowie Possibly, I am not sure about that. I've just seen people with similar usernames as others coming here to complain about getting random pings before
 
@phpPluginMaster didn't work
 
how do you avoid needing to typeout, or physically click a full user id?
 
by pressing tab
 
try it shorter
 
5:23 AM
I KNOW THE ADDRESS WON'T CHANGE, SO IT IS A CORRECT ANSWER. — phpPluginMaster 15 mins ago
also, there's a reason that's NAA
 
@royhowie thanks
 
in the future, don't just post your github repos everywhere
 
As a sidenote, github was down yesterday while SO was not
just throwing that out there
 
disclose that they're yours (the group thing is deceptive and I'm 99% sure you did it to make it seem like someone else's) and post as a comment
 
@royhowie how do i lift ?ban
@ivarni i saw that
if jsfiddle goes down that won't be an answer either?
 
5:26 AM
@phpPluginMaster so use a stack snippet…?
 
@royhowie how do you make a stack snipit repo?
 
what are you even talking about?
 
github allows you to use repos, why not stack exchange?
 
@phpPluginMaster I was talking about this
 
i am also, but if i just want to plug in the zip file
 
5:32 AM
@phpPluginMaster Your answers should contain the relevant information required solve the problem
If your answer depends on an external library, then you should show how to use that library to solve the problem
 
it does
 
@phpPluginMaster how?
 
No, "Use my library, here is a link" does not
 
@phpPluginMaster please clarify exactly how you do
(this is good practice for when you try to answer questions in the same manner)
 
5:34 AM
it's in the instructions
 
@phpPluginMaster did you not read what @meagar just said?
 
it depends on how quickly you write out the answer
so i can ask about plugging in zip files
 
Into Stack Overflow?
 
into answers
 
@phpPluginMaster I guess meta.stackoverflow.com/questions/270944/… but I don't see it being implemented
 
5:42 AM
so i can say things like "this zip solves it"
 
That runs completely counter to the Q&A format of SE
If you're having to post so much code that you need to zip it, you're posting too much code
 
If you find yourself having to upload a zip file to answer a question it's a good chance you should be voting to close the question instead of answering
 
@ivarni wrote this, btw b=(n,x,y)=>{x=!(n%3);y=!(n%5);return x||y?"FizzBuzz".slice(x?0:4,4*(y+1)):n}
 
@royhowie 76 chars, nice
 
@ivarni ty
 
5:45 AM
@ivarni I think I may be able to shorten it
 
@ivarni so if it's a "build a repo to answer the question" (i.e. all of them), then vote to close every question?
 
@ivarni 73: b=(n,x,y)=>{x=!(n%3);y=!(n%5);return x||y?"FizzBuzz".slice(!x*4,4*++y):n}
do you think writing something like that would ruin an interview?
 
what does it do?
 
@phpPluginMaster There are almost 10 million questions that are not "build a repo" questions
 
@royhowie If it did you probably wouldn't want that job in the first place. I think most people can see the difference between someone playing codegolf and someone writing production code :)
 
5:49 AM
@meagar but they can be answered that way
 
I trust you wouldn't put that kind of code in production, ever
But it's a fun exercise nevertheless, and requires knowledge of the language
 
@ivarni what about this code? b=(n,x,y)=>((x=!(n%3)),(y=!(n%5)),x||y?"FizzBuzz".slice(!x*4,4*++y):n)
70 characters!
actually…I think this can be improved with the ... (spread) operator
 
@phpPluginMaster Anything can be answered by putting the bulk of your answer on some other site, and linking to it
That doesn't mean we accept those kinds of answers
 
@meagar then why not let us upload the zip examples?
 
Because that's no different from linking to other sites
The code needs to go in the question, where it can be examined and discussed
 
5:52 AM
it's a more effective answer
 
Nobody wants to have to download and extract files from a zip in order to see if your answer has merit
No, it's a terrible answer
 
@meagar he's not worth fighting tbh
 
that's why you look at it when it's unpacked, and it shows in a file system
people answer questions differently
 
@phpPluginMaster So long as you're within the bounds of SE's Q&A format, be as different as you'd like
 
i am
it says nothing about external links
 
5:57 AM
 
lol @ the apple picture
 
then why allow the link option?
 
@phpPluginMaster links are meant to be supplementary
I have the intuition that you didn't read the meta post
 
links are supposed to point to guides
 
@royhowie by the way, you can try yo claim a beer from this guy: swizec.com/blog/…
quite a few short ones in the comments there too
 
6:01 AM
@ivarni debating whether to post mine
 
i like it: ['fizzbuzz'[i%3 and 4:i%5 and 4 or 8] or i for i in range(101)]
 
the problem is that I don't have the for-loop in mine
GDI I hate npm
I'm pretty sure it just removed jsc from my /bin
 
write it in a switch
 
@phpPluginMaster what are you talking about?
@ivarni i=0;while(++i<101)alert(((n,x,y)=>((x=!(n%3)),(y=!(n%5)),x||y?"FizzBuzz".slice(‌​!x*4,4*++y):n))(i)) I can't get it below 90 =/
stuck at 98, if I have to write the actual loop
 
6:18 AM
@BenjaminGruenbaum aww thanks
 
@royhowie Can for(i=101;i--;); work?
 
@ivarni ooh maybe
 
I stole that from claudiocc.com/javascript-golfing btw, I suck at codegolf
but I remembered seeing that site
 
for(i=100;i--;)console.log(((n,x,y)=>((x=!(n%3)),(y=!(n%5)),x||y?"FizzBuzz".slic‌​e(!x*4,4*++y):n))(i)) works, but is 101 chars
oh wait, should be alert
Why doesn't Array(101).map((d,i) => i) work?
 
I think it just creates an empty array of length 101 but I am not 100% sure
Array(101).forEach(function(a) { console.log(a) }) doesn't output anything either, while Array(101).join('.') works
We live in curious times
 
6:32 AM
Yep, that's why it doesn't work
 
Array.from(Array(101),((d,n)=>((x=!(n%3)),(y=!(n%5)),x||y?"FizzBuzz".slice(!x*4‌​,4*++y):n)))
91 characters…
okay, got 89: Array.from(Array(101),(d,n)=>((x=!(n%3)),(y=!(n%5)),x||y?"FizzBuzz".slice(!x*4,‌​4*++y):n))
free beer incoming
 
Haha, that post is 3 years old
But he'll probably still give you the free beer
 
@SomeGuy woah that was early
 
1 message moved to Trash
 
Timezones
 
6:37 AM
You weren't here last night so I started reading another book series without your input
Shame on you
 
var i;for(i=1;i<=100;i++){console.log([!(i%3)?"Fizz":void 0]+[!(i%5)?"Buzz":void 0]||i)}; another 89-char solution taken from twitter.com/Swizec/status/247344854521245697
 
Shame, shame, shame
 
I haven't been on the internet in the evening for quite some time
I wake up, go to work, go buy furniture/stuff to my apt., go back, clean shit for hours, fall asleep
rinse and repeat
but it's nearly over
 
@monners ohnoes
What are you reading?
 
Safehold series by David Webber
 
6:40 AM
Have you read The Martian yet?
 
@SomeGuy What about The Martian Chronicles?
 
Fuck that. The Martian is the best book ever and I pray to it everyday
 
Man from Mars
 
why is it the sum is Nan jsfiddle.net/jemz24/aego16ps
 
@jemz because parseInt("", 16) is NaN
try using var decval = parseInt(hexval,16) || 0
 
6:54 AM
ok thank you so much
 
var sum = function (arr) {
    return arr.reduce(function (p, c) {
        return p + (parseInt(c, 16) || 0);
    }, 0)
}
you can also use that
 
ok
 
Thank you
 
7:13 AM
Guys, am I the only one not receiving notifications on SO (rep,answer updates,etc.) since about half a day ?
 
I'm still getting them @dystroy
 
I have the problem on my two computers right now
 
I got a rep notice a few hours ago.
 
Is there an easy way to work around not being allowed to do an AJAX request over HTTP from a page served over HTTPS? I'm just hacking something together in a tampermonkey script and I am willing to cut corners.
 
@ivarni ActiveXObject works, if you specify MSXML. :p
 
7:26 AM
I said I was willing to cut corners, not kill kittens
 
Ok. There is also a Firefox plugin called As You Wish that gives your JS access to chrome features, including file and (I think) cor access.
 
Hmm.. it's for the QA guys here, they wanted a button to generate random social security numbers for login while testing, I doubt they want to be locked into Firefox
Probably easier to just set up a proxy I guess
 
Yes, that is also what I am thinking XD
 
OR I can implement my own generator rather than relying on the HTTP only one we have. That sounds like more fun.
jak shaving commences
 
Hey, ActiveX is fun too. Not long ago on SO I gave an JavaScript answer of using WSH to call PowerShell to capture screen and put the data into registry to be read by WSH.
It's really fun. Just don't ask how many kittens were harmed.
 
7:34 AM
OK, how many kittens were unharmed? :)
 
:p
 
Morning!
 
Oh I forgot. The PowerShell was used to call .Net framework. It's a wonder. You can trash the PC with a wrong command. The user just need to click 'yes' once.
 
Hi Shaun! :)
 
Morning~
 
7:37 AM
Pfff... not being notified on new rep, comments and accepts kills the fun of SO
 
Send support mail?
 

« first day (1664 days earlier)      last day (3267 days later) »