« first day (1385 days earlier)      last day (3557 days later) » 

2:00 PM
 
Can't hold it back anymooore ~
Let it gooooo
Let it goooooooooo
 
That movie. I like it.
 
I don't understand the trend with you youngsters ~20 to try to prove that you are older in way of thinking than an old fart like me, it was the same with jhawins
but I won't stop you from behaving like uncles just because you want to
 
I think you're retarded
I just want to get that out of the way now
 
Change subject
 
2:02 PM
haha :D
 
Back to frozen ~
Let it goooo
 
So, dolphins
 
and mermaids
 
Don't you wanna punch them?
 
even if I am retarded, what good would it make to tell me that? I won't become non-retarded all of a sudden
 
2:03 PM
30 secs ago, by Zirak
Change subject
 
haha ok
Dolphins
 
Punch dolphins? I feel like they'd be hard to hit
 
hm
 
@Ondkloss Same :3
 
And I mean, they're surrounded by water
So the whole force of the punch would be diminished
We need to drain the ocean first
 
2:04 PM
@Cereal Why? You can punch pretty hard in water
 
But what if you drop a house on them? Does that also not hurt them, because they are surrounded by water?
 
@KendallFrey Yeah, but you have to punch the water too
That's unnecessary violent against water
 
posted on August 01, 2014

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Only 3 weeks left to submit for BAHFest!

 
When you punch in air, you have to punch air
 
2:05 PM
This is true!
 
Poor air :(
What has air ever done to you?
It is saving your life, constantly
 
You know how it's more difficult to walk through water (e.g. swimming) than it is through air?
 
By letting you breathe it in
 
People against unethical treatment of abundant chemical compounds
PAUTACC
 
Hahahaha
The abbreviation sounds pretty good
 
user1596138
2:08 PM
I think I answered a dumb question with a dumb answer
 
user1596138
0
A: How can we know if a function is called from console or from source code

JhawinsYou can use arguments.callee.caller. callee and caller are widely supported in all major browsers however it is non-standard and The 5th edition of ECMAScript (ES5) forbids use of arguments.callee() in strict mode. In Chrome you will be returned an anonymous function, you can examine this functi...

 
user1596138
Downvote me back to 1337 rep if you please :)
 
I don't know enough about it to upvote or downvote you ._.
 
@Jhawins wat
Both at the question and at the answers
 
user1596138
@Zirak It works lol
 
user1596138
2:10 PM
But there's other use cases and browsers.. So I didn't attempt to give a cut/paste solution anyway. But yeah man I feel like I shouldn't have posted that.
 
delete it then
 
user1596138
The answer above mine also gets to _evaluateOn and checks the same thing.
 
user1596138
Eh it's true and it does work and no one else said it yet. So no. I'll leave it either way idgaf. Main will pass judgement on me lol
 
@Jhawins you wabnt to be downvoted? why not jsut delte post?
PS great work on the r1200!
my angular app doesnt work in MSIE :'(
 
user1596138
@DrogoNevets ... Was a joke there. I kind of was expecting people to give me reasons for why that's terrible -if it is- by posting it here
 
2:15 PM
@Jhawins oh ok, that requires reading it, and no time, no time!
 
user1596138
Ha!
 
user1596138
I know it's non-standard and all. I don't see a use case for it anyway though really unless he thinks he'll create security somehow that way
 
If he thinks he can secure a piece of cheese with it, he doesn't get it
What's stopping anyone from overriding the function which checks for it?
 
user1596138
Exactly of course lol. I know that
 
What's stopping anyone from just sending raw http requests to his server?
People don't get the web
 
user1596138
2:17 PM
I didn't even actually read the question... Or see if he has a use case.
 
user1596138
Cause I know it's stupid.
 
You should explain why it's not secure
 
user1596138
Wait.... Oh man. Nobody did read my answer did they.
 
If your solution works and you just say "it's bad practice", he's still going to use it
 
@Feeds wat
 
user1596138
2:19 PM
I forgot... It could be callee.caller.callee.caller.callee etc. . . forever
 
Correct
 
user1596138
@Meredith Nah nah you don't get it.
 
I guess not
 
user1596138
There is no good practice lol. Sometimes a BS method is the best you're gonna get and you should abandon the idea anyway.
 
Yeah we're on the same page
 
user1596138
2:21 PM
Oh ok. I'm tired. Morning all
 
But you should explain why it's bad, otherwise he's just going to ignore it
 
user1596138
@Meredith I actually removed my answer when I remembered that it goes deeper
 
user1596138
I just needed to get my first cup of coffee to wake up haha
 
Oh I hadn't refreshed
 
Good morning
 
user1596138
2:30 PM
@SterlingArcher I got shot
 
user1596138
You clever bastard. That joke got me last night
 
Haha I can be quite clever on occassion
 
user1596138
0
A: getElementsByTagName().setAttribute(); don't work in IE8

Sargis MarkosyanTry this. HTML <input value="click here"></input> JS var button = document.createElement("INPUT"); var input = document.getElementsByTagName("INPUT")[0]; for(var i = 0, attrs = input.attributes, l = attrs.length; i < l; i++) button.setAttribute(attrs.item(i).nodeName, attrs.item(i).nodeVal...

 
user1596138
The fuck??
 
@FlorianMargaine hehehe i saw that
 
2:37 PM
@Jhawins hahahahahaha
 
@Jhawins Why don't you use a question mark
 
user1596138
@JanDvorak What?
 
user1596138
That answer though what
 
user1596138
Just the code doesn't make sense
 
user1596138
var button = document.createElement("INPUT");
var input = document.getElementsByTagName("INPUT")[0];
for(var i = 0, attrs = input.attributes, l = attrs.length; i < l; i++)
  button.setAttribute(attrs.item(i).nodeName, attrs.item(i).nodeValue);
button.setAttribute("type", "button");
var parent = input.parentNode;
parent.replaceChild(button, input);
 
user1596138
2:39 PM
input = ...[0];
 
user1596138
Then a loop.. And attrs = input.attributes, l = attrs.length
 
@Jhawins true. Replied to @FlorianMargaine
 
user1596138
@JanDvorak It looks right at first but when you actually look it's a clusterfuck I have no idea the point of lol
 
user1596138
Props to him for coming up with that mess.. Somehow
 
"for every attribute, set the value of that attribute with that attribute name to that attribute value" is pointless at best — Jan Dvorak 17 secs ago
 
2:43 PM
Whoever wrote that answer has a fear of curly brackets.
 
@Jhawins got it. He's copying all attributes to the new element
 
user1596138
@JanDvorak silliness
 
user1596138
There's not a good answer to the questions to mark it as duplicate to either...
 
Is it true that you have to always put braces even for single lines as a good coding practice otherwise it's confusing for the rest.
 
user1596138
@zigi Forced line breaks break markdown
 
user1596138
2:45 PM
0
A: getElementsByTagName().setAttribute(); don't work in IE8

Devang SolankiI am very thankful to all of you for your efforts. it's really working fine :) big thank you.

 
I see
 
user1596138
HAHAHAHAHAHAHA
 
Is getElementsByTagName supported in IE8?
 
Right:
if(true) {
    a ++;
}

Wrong:
if(true)
    a ++;
 
// wrong
if(true)
  hup()

// good
if(true){
  hup()
}

//still good
if(true) hup()
 
2:45 PM
yep ok
my colleague that doesn't agree with promises
 
//badish
if(true) hup()
else{
  ...
}
 
tells me that if(true) hup() is not readable
 
then use braces
 
that's why I am asking
 
user1596138
I wisI honestly wanted to suggest he use...... jQuery
 
user1596138
 
I do, but I don't like the fact he's imposing his coding preferences on me
 
it is readable to me, though
 
me too and a lot of other people
 
user1596138
And then watch the confusion
 
Iirc google recommends not using curly brackets for one-line statements
 
2:47 PM
^
 
@Meredith can you give me a link
 
If I have a one line if statement, I never use brackets.
 
Yeah I'm looking for it
 
//pointless
if(true) {hup()}
 
user1596138
@JanDvorak You're 100% right IMHO. This is stupid. Have you ever used PHP? That'll teach you to be a fucktard with your braces like that
 
2:48 PM
he makes me do if(true) hup(); to
if(true) {
hup()
}
 
go with that, then
 
user1596138
if ( true ) doSomething(); // only doing 1 thing
if ( true ) { // explain
  doSomething();
  doingSOmethingElse.too();
}
 
he makes me change the one line to multi-line with braces and I don't like it
 
@Jhawins well, there's that argument that "only one thing" never persists
 
user1596138
@JanDvorak huh? I meant only making one statement
 
2:52 PM
You may always want to add new code, even if it's just a bunch of logging
 
user1596138
Oh course. I add new braces then too :P
 
you can add them right away just in case, too
 
25
Q: Is it bad practice to use an if-statement without brackets?

jerebearI've seen code like this: if(statement) do this; else do this; I don't like that, I think this is cleaner and more readable if(statement){ do this; }else{ do this; } Is this simply a matter of preference or would one way be recommended over the other?

 
you know, for consistency
 
user1596138
Sure can.
 
user1596138
2:53 PM
I agree with that sure. I think it's fine. The only thing I think is not fine is multi-line with no braces
 
@zigi cv-pls, btw
 
Looks like google says no brackets is ok in C++, but not ok in Java
 
what's cv-pls?
 
And that javascript follows C++ formatting
 
user1596138
@zigi flagged as primarily opinion based :P
 
2:53 PM
@Jhawins lol, you mad brah
 
holy shit
 
user1596138
jk. That prob happens every day
 
hahaha
 
2:55 PM
@BenjaminGruenbaum you made me famous! <3
 
haha and you guys made me famous :D
 
user1596138
3 helpful flags for the day... Badge time
 
@Jhawins you know what you do is quite unnecessary, right?
 
0
Q: How are Promises implemented in Javascript without threads

Madhur AhujaRecently, I have been seeing the concept of Promises being implemented in AngularJS and JQuery. I have seen the implementation of a Futures in Java as in code below, however this requires concept of thread pools to be present in language/platform. However, there is no such threading concept in J...

 
dude I rarely find flagable things anymore
how do people get like 2000 helpful flags?
 
2:56 PM
just making work for the mods
 
Not mod flags
flagging an answer as like.. low quality doesn't ping the mods iirc
 
@SterlingArcher queues
 
user1596138
@zigi What the fuck are you talking about. I'm talking about flagging terrible posts on Main. The amount of helpful flags you have is shown and stressed during moderator elections as well.
 
user1596138
@SterlingArcher Click "newest" go ham
 
I thought you flagged my posting of that article
sorry
my bad, ingore me
 
@JanDvorak but in the queue I feel like all I can do is close vote?
 
user1596138
@zigi If I have a problem with you I'll make it obvious. :P
 
ok sure, it just sounded that way
 
Oh unless you mean the low-quality queue?
 
user1596138
@Sterling go look at PHP questions lol. Or jQuery
 
2:58 PM
lol
 
user1596138
Some tags are just full of shit
 
I do ;P usually close them
 
user1596138
I can't. So I flag
 
user1596138
The too broads and spam shit
 
flag while you can. once you have cv-power it's a lot slower
I only hvae 219 helpful flags
 
user1596138
2:59 PM
-1
Q: mac cannot update PHP 5.4.24 on mac to latest version

JustinI am trying to update my php in my mac. Currently, the version is 5.4.24. Here is what I have tried: curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5 Add export PATH=~/bin:/usr/local/php5/bin:$PATH in my home directory .bash_profile. But when I check version by php -v, it still show...

 
I wonder how many close votes I've cast though
 
user1596138
I have like 80. I don't participate on Main, there's never a question worth answering.
 
user1596138
If I can find it with the content of your question on Google in <5 minutes I'm downvoting and moving on
 
If the question looks easy and I feel the OP is really trying, I'll answer
In the hopes that they'll learn and in turn, teach another.
 
!!play Axel Grinder Pendulum
 
3:01 PM
@zigi That didn't make much sense. Use the !!/help command to learn more.
 
user1596138
@SterlingArcher Google with their content tells me the OP isn't trying :P haha
 
those ones are obvious :P
 
user1596138
@SomeGuy has 3rd most score this last month in nice!
 
Really?
Sweet
 
user1596138
 
user1596138
3:03 PM
Only 10 answers.
 
user1596138
Everyone else there has ~90-100 hahaha
 
Hahaha
 
user1596138
Quality I guess
 
user1596138
!!stat someguy
 
@Jhawins Some Guy (http://stackoverflow.com/users/401137/some-guy) has 8507 reputation, earned 35 rep today, asked 9 questions, gave 239 answers, for a q:a ratio of 9:239.
avg. rep/post: 34.3. Badges: 3g 25s 44b
 
user1596138
3:03 PM
Haha you're crazy man
 
177
A: Inspect element that only appear when other element is mouse overed/entered

Some GuyIt's fairly easy in Chrome 38.0.2094.0. Here's what it'll look like: Step-by-step: Open the DevTools in the Sources panel Make the tooltip appear by hovering over the button Press F8 to freeze the page Switch to the Elements panel and use the magnifying glass icon in the top left to select t...

This helped immensely
 
user1596138
Yeah I saw that lol
 
And then there's me...
Chillin at the bottom xD
 
@SomeGuy this button does it too ^
 
Yeah. Maybe I should edit that in?
 
user1596138
 
The other answer does show that method, though
 
user1596138
@SomeGuy I can't believe you got that off such a trivial thing too XD
 
Yeah, me neither
The answer was pretty much just "Press F8! Here's a GIF"
 
user1596138
Like it's not hard at all. Google it and it's right there.
 
user1596138
But you made the answer pretty with gifs
 
user1596138
3:11 PM
This is stupid pastebin.com/8m1NB8Nw
 
user1596138
Codementor is stupid to me.
 
user1596138
lol why am I being so cynical recently? XD it just really is dumb and that's the most realistic thing I've seen yet
 
> funtnctionaliteis
 
user1596138
@mikedidthis Good catch
 
user1596138
3:13 PM
> In order to access and mark your practical assignment the following conditions must be strictly observed.

1. A zipped file of your submission should be uploaded to Moodle on or before the hand-in date – details will be given nearer the due date. The zip file should be called by your matric number (no spaces), e.g, 12345678.zip.
2. Your zip file should contain all your MySQL tables and data as exported from phpmyadmin.
 
user1596138
I don't even get that part
 
I don't get any of it.
 
user1596138
Right
 
Like, how many hours should someone spend on this?
 
user1596138
Everything else is 1 sentence and then 2 people I messaged to help and they came back to me with completely irrelevant problems
 
user1596138
3:14 PM
Like oh no that's not event he same language I'm having issues with now and it's only been 20 minutes since the request?
 
Is it homework? I mean they ask for HTML and then say they have HTML.
 
user1596138
Who knows
 
@Jhawins you should play clash of clans with me
 
user1596138
wuty
 
it's fun
battle tactics and town defense layouts
it's toight
 
3:18 PM
> can't play more than x amount of time without paying
 
false, it's very playable without paying
 
I never said it wasn't
But you're limited per day
 
user1596138
Oh is it like candy crush bullshit where you run out of time?
 
user1596138
I refuse to fall to that level as a consumer lol
 
3:19 PM
You run out of something, I don't remember what it is
 
it takes time to upgrade and build defenses etc, but you're not limited. You can train as many troops as want and keep raiding
granted a dragon takes 30 minutes to train, but common troops like goblins take 30 seconds to train
Gems (which non-payers can find pretty easily) speed up the process
 
I played it a lot last year
 
y u quit
Oh nice, even after 2 vacation days, I still have 1 left and my sick days are back to normal. Betttt
 
because it was stupid at higher levels
 
user1596138
weird
 
3:27 PM
!!call or wait
 
@AbhishekHingnikar wiat
@AbhishekHingnikar wait
 
well then.
 
@Cereal I like it. I can play at work because it only requires my attention every hour or so. And I don't have to worry about my builders going slack since it takes 3-5 days per upgrade now. It's just cruising speed
0
A: Overriding CTRL+Click

Sterling ArcherCapture the click event, and see ifthe control button is held down using event.which || event.keyCode document.getElementById("datAnchor").addEventListener("click", function(e) { if (e.which === 17 || e.keyCode === 17) { //your code here } // else do nothing with e.preventDef...

I feel like I shouldn't have answered this, but I felt nice. Bad move?
 
As I didn't restore my blog, I made a 404. Do you like it ? canop.org/666
 
@SterlingArcher That doesn't look right
 
3:30 PM
@dystroy I don't quite understand it
 
you don't ?
 
Run it
It evaluates to 404
I like it
 
Might be a bit too geeky
 
understand it, run it, like it, technologic
 
3:31 PM
I can't calculate bitwise shifts in my head
Shoulda run it
 
Me neither, but I figured it was supposed to be a 404
You know, since he said it
@SterlingArcher Why would e.keyCode be defined in a click event?
Your answer should probably use e.ctrlKey to check if the control key was pressed
 
ahhh I didn't know ctrlKey existed
 
I don't really see how the question is unclear. He hasn't tried much, but it seems pretty clear to me what he wants
 
Yeah that's why I answered. Plus he wanted JS not jQuery.
 
Is there every a good reason to have an IDE set to spaces vs tabs? I have to "tabify" every time I pull from the repo
 
3:35 PM
Still shoulda closed but whatever.
 
The lack of jquery is because of built in limitations — user3499265 42 secs ago
Hahaha
He's justifying himself
 
@NickDugger spaces are 1 character wide so if you line characters up with spaces, it'll always line up
 
Do you guys have a tab as 2 spaces or 4?
 
4
 
3:37 PM
4
 
Personally I can't stand 2 space tabbed code
 
Same here
 
if you're gonna 2-space it, you might as well not indent
 
zactly
 
@SterlingArcher I have exactly one tab as tab
 
3:39 PM
I think I answered because I finally understood [].forEach.call(nodeList) and I wanted to share it.
I'm very proud that I get it and I love how it works
So cool how you can do that
 
@SterlingArcher Hahaha
 
Reading .map() right now.
 
!!> [true, false, ,, 0, 'something', 1].filter(Boolean)
 
@SomeGuy [true,"something",1]
 
3:42 PM
That's another super useful one
I use map all the time
 
Oh, so map is when you want to return a modified array and forEach is just for iterating?
 
When I get to use reduce, it excites me
 
reduceRight is pretty cool too
 
Yep
 
Never used filter before
 
3:43 PM
reduceLeft
I'm seeing guardians of the galaxy tonight--so excite
 
@SomeGuy can you explain why filter(Boolean) did what it did? Shouldn't false have been returned as well? Why is 'something' returned?
 
Think about it
 
I am D:
 
because it's truey
 
filter calls Boolean on every element with the args element, index, array
 
3:45 PM
because that's what filter does, filtering
 
So filtering by Boolean only returns truthy values?
 
The Boolean function ignores everything except the first
Yep
 
@C5H8NNaO4 don't be that guy when somebody is trying to learn please. Save that for trolls
 
With fat arrow functions, these array functions become even more fun to use
 
!!> [true, false, ,, 0, 'something', 1].filter(!(Boolean))
 
3:46 PM
@SterlingArcher "TypeError: !(Boolean) is not a function"
 
!!> [1, 2, 3].map(x => x*x)
 
@SomeGuy [1,4,9]
 
@SterlingArcher Boolean is a built-in function
 
@SterlingArcher "TypeError: !(Boolean) is not a function"
 
@SterlingArcher create an anonymous function that returns the negated value
 
3:47 PM
Like Array
 
Sry that wasn't meant to be trolling :) I thought that might help, think about what Boolean returns
 
!!> [true, false, ,, 0, 'something', 1].filter(x => !x)
 
@SomeGuy [false,0]
 
It ignored the undefined?
 
3:48 PM
!!> Boolean('something'); // run this kind of stuff in your console, jordan
 
@FlorianMargaine true
 
It didn't even iterate over it
 
Yessir Florian!
 
@SomeGuy inexistent values don't get mapped over
 
Makes sense
 
3:49 PM
^^^
 
No it sucks
 
I'm way too slow on the phone :(
 
Well, imagine a sparse array
 
But it's like that...
 
I wouldn't expect it to go over all of the elements that don't exist
 
3:50 PM
I would expect it to, and I handle the logic of ignoring them myself
 
Yes it sucks
 
!!> [true, false, ,, 0, 'something', 1].filter(function(x) { return !x; });
 
@SterlingArcher [false,0]
 
My initial assumption was that it would, though
 
Nice!
I overthunk for a minute lol
 
3:51 PM
!!> Array.apply(0,[true, false, ,, 0, 'something', 1]).filter(x=> !x)
 
@dystroy [false,"undefined","undefined",0]
 
@SterlingArcher BTW did you see the title of my 404 if you want another game ?
 
I can't even read the word game without losing :(
 
!!> 0+'x'+(0+location).slice(1<<1+1<<1,1+'0')<<1
 
@SterlingArcher "SyntaxError: syntax error"
@SterlingArcher 0
 
3:55 PM
Note that location is different for Caprica than it's on his website
 
!!> location
 
@dystroy {}
 
facebook down for anyone else?
 
dont tell me
I wanna get this
Oh god dammit
 
@Cereal Yeah
 
3:56 PM
@dystroy that's impressive
 
Alrighty
 

« first day (1385 days earlier)      last day (3557 days later) »