« first day (951 days earlier)      last day (3999 days later) » 

11:01 PM
hahah SO is so ridiculous at times.
29
A: requestFeature() must be called before adding content

Octavian DamieanWell, just do what the error message tells you. Don't call setContentView() before requestFeature().

Almost 30 up-votes for a rant. :D
 
hah
 
Guess what I have 2 upvotes for
2
A: How to make a screen that looks like mirror in real world?

Amaan ChevalSimple enough. mirror.buy(); mirror.place.frontOf = this; Okay, seriously. You can't make a screen look like a mirror without using a camera. Your absolute best bet would be to make a suitable (black) background on your page that lets the monitor / screen be its glossy self.

hangs head in shame because of the lame joke
It needed more jQuery
 
rolls eyes
 
!!Should I sleep?
 
11:03 PM
One day, I'll be a room owner, and you'll all be sorry :(
 
@AmaanCheval All signs point to no
 
@AmaanCheval I should probably down-vote it because there's a jQuery plugin for that, I'm sure there is.
 
Hahaha
Hahhaa what?! 4 upvotes?
Lesson learned. Post answers in here for rep
 
How did you think @jAndy got all his rep? :D
 
20
A: How can I detect I'm inside an eval() call?

Amaan ChevalCheck for the arguments object. If it exists, you're in the function. If it doesn't it has been evaled. Note that you'll have to put the check for arguments in a try...catch block like this: var s = 'try {document.writeln(arguments ? "Function" : "Eval") } catch(e) { document.writeln("Eval!") }...

Go go go!
(My favorite answer so far)
It was a fun one
 
11:06 PM
Seems legit.
 
@AmaanCheval can copy and I adopt you when we get married?
 
I won't be able to sleep tonight.
 
Hahaha
@BadgerGirl We'll see about that.
 
@xcx Leave room and rejoin
meh, nvm
oh he does that
tralala COME BACK ALREADY YOU'RE KILLING ME
 
11:13 PM
:D
 
YAY!
 
I should mess with Zirak and just remove someone's permissions to freak him out. :D
 
Anonymous
Have you guys actually stopped respond to noobs?
 
We're in the process of becoming total elite 'n stuff.
Oh yea, I should probably tell the Android guys about that.
 
oh sorry, didn't notice your question
23 mins ago, by php NoOb
Is it possible to reset a document to it's original state, after manipulating it using the DOM? without refreshing the page?
 
11:17 PM
posted on May 24, 2013

I recently wrote an article for Nettuts+, “Cargo-Culting in JavaScript“. In it I cover the concept of cargo-cult programming and specific techniques that seem to be cargo-culted off quite frequently in JavaScript. I found that writing the article took a great deal longer than I’d…

 
The answer is "no"
Unless you saved that state beforehand
 
....WAT
 
WAT
 
11:17 PM
WAT
 
THIS SHOULDN'T HAPPEN
 
NOOOOOOOO
 
oh FUCK I didn't think of that
 
SKYNET IS TAKING OVER! EW MER GERD!!! AAAAAAAHHHH!!!!
2
 
FUCK FUCK FUCK
But how can I....AAAGGGHHH
 
11:18 PM
I keep checking back to see what's going on here, I'm absolutely terrified.
 
Anonymous
@Zirak thanks.
 
this room has been taken over by something, nothing makes sense anymore
 
@kaᵠ It's Skynet, we didn't expect it to take over, despite watching the Terminator films, it's a completely unexpected situation.
 
11:22 PM
It's ok...I can fix it! Just need to move an event call around...
 
Yea, that's what they said as well.
They kicked some robots ass, melt some other robots, thought they'd be safe.
 
Unfortunately only Chuck Norris can save this room now, and that is if he knows RegEx !
 
Also, can I be a room owner again?
 
@kaᵠ Chuck Norris doesn't have to know RegEx, RegEx knows Chuck Norris.
 
11:24 PM
HOLD ON, MORE IMPORTANT THINGS ARE HAPPENING
...this should work. Maybe. I need to test
 
f&ck the sandbox, test live!
 
o.o Just a second ago it told me I didn't have the right to talk here.
 
Hahahahhaa
 
@Ariane it's a bug, got fixed
 
@Ariane How late is it at your place?
 
11:28 PM
@OctavianDamiean 19:28
 
@Ariane Yeah, we've changed the room's setting, but it automatically allows everyone by default
 
@Ariane Maybe you're just tired.
 
I didn't imagine this. oo'
I entered, it told me I couldn't talk, I went back to SO and came back and then it was OK.
Anyway uhm, I just want to do a little logic test
*:not(#info) ul {
stuff;
}
 
Yucky
 
Here's a scenario, I have usernames array, which has a length of 0, I want to make the loop execute once if the array has a length of 0, otherwise, iterate over each object, how can I do this without copying my code into two different loops?
 
11:30 PM
This will affect every <ul> that is a child of anything EXCEPT #info, right?
 
!!/summon 30574
 
You need a for-else-loop
 
@XCritics Can you uhm... explain further what you want to do? Dunno about the others, but me, I don't understand
 
Python has it since 1753
 
Fors have elses ??
 
11:31 PM
Eh, I think he means:
for(stuff) {
if() {
normal behaviour;
}
else {
condition is false;
}
}
 
No, I mean ...
 
Initially I thought you wanted a do ... while loop but now I'm not so sure anymore.
 
for u in users:
    # something with u
else:
    # something if users is empty
 
db.users.find({'rememberToken':cookie}, function(err, found) {
              if (err || found.length === 0) {
                console.log('Couldnt connect');
                loggedIn = false;
              } else {
                loggedIn = true;
                var uname = found[0].username;
                socket.username = uname;
                usernames[uname] = uname;
                usernamess.push({
                  username: found[0].username,
                  rank: found[0].rank,
                  roll: found[0].roll,
 
What the heck is that syntax. Is that even JS?
 
11:33 PM
In a nutshell, to prevent duplication, I want to put that else into a loop
 
for thing in something and then a colon... o__O
 
2 mins ago, by copy
Python has it since 1753
 
but execute once if the array is empty
 
Notice "Python"
 
Oh, it's Python.
 
11:34 PM
otherwise, iterate over the array
 
@XCritics Make it a function
 
Python is a pretty special-looking language, isn't it? o:
 
@XCritics Change your logic. Execute it always at least once and go from there.
 
if (thing.length) { thing.forEach(stuff); }
else { stuff(); }
 
@Ariane are you a girl?
 
11:35 PM
!!/summon 30574
 
@BadgerGirl Yes and most of all, why do you ask?
 
@Zirak I had that at one point, but I didn't wanna que the db everytime, but I just thought of something
Bear with me
 
@Ariane If by special you mean beautiful, then yes.
 
@OctavianDamiean No, by special I mean special. As in, I've never seen something like it.
 
@XCritics ...then only extract the logic
 
11:36 PM
@Zirak Do you mean do { stuff; } while(condition); ?
 
No
 
Even though I think that a do-while loop might be a good way to approach that problem.
 
Anyway, for my earlier question...
 
Banana
 
@OctavianDamiean that doesn't quite make sense, missing something....
 
11:38 PM
*:not(#info) ul {
stuff;
}
This will affect every <ul> that is a child of anything EXCEPT #info, right?
 
Maybe you ask in the C++ room. CSS is more similiar to C++ than JavaScript
 
true
 
But when you do JS you often also do CSS.
 
Just do ul { ... } and #info ul { reset }, it's much nicer
 
Ul:not(#info)
 
11:39 PM
@rlemon But it's not ul that has the ID "info", it's its parent.
 
@Ariane It's actually fairly easy to find out.
 
Then listen to Zirak
 
@OctavianDamiean Yes, and I've used it before but I think I'm being stupid tonight because it's not working
@rlemon I think I will.
 
agh I'm going insane
!!/summon 30574
 
@Zirak What's all that summon stuff?
 
11:42 PM
!!/tell Ariane help
 
!!/help
Uhm, no
 
!!/listcommands
 
@Ariane 420, help, listen, eval, coffee, live, die, refresh, forget, ban, unban, info, jquery, choose, user, listcommands, norris, urban, parse, tell, mdn, awsm, convert, define, get, google, hang, inhistory, learn, 5318008, bewbs, i_am_a_robot, aliens, ym, format, 3point14, camel, ihatelanadelrey, fa, knock, lick, insult, ultimateinsult, microlove, easytools, wherearethegoats, tobacconist, ninjad, sarcasm, adventure (page 0/2)
 
11:43 PM
OH!
Caprica Six is the bot, not a person?
Why not just name it "SO chat bot"?
 
!!are you a robot?
 
@SomeKittens Nope
 
sigh
 
rofl
SOChatBot woulda been a great name ;)
 
Indeed. Actually I find it really weird someone would call it otherwise.
and even give it an avatar for some reason
 
11:45 PM
@Ariane Caprica Six is a fictional character in the Battlestar Galactica story.
She is a robot in that story.
 
If I smother her, will a judge acquit me?
 
girls ...
 
@OctavianDamiean That makes it even more irrelevant to give that name to the bot because it's an existing character, and people make their Internet names according to ficitonal characters, often
 
@Zirak I'll go halfs on a rape charge
 
@Ariane So did she ... errr it.
 
11:46 PM
@Ariane AAGGGH IT WAS CALLED SO CHAT BOT BUT THEN @OctavianDamiean WENT ALL "HURRR DURR MAKE IT CAPRICA SIX" SO I DID AND NOW THINGS DON'T WORK AND I WANT TO PUNCH SOMEONE
2
 
@OctavianDamiean It did not choose its name. You did. And it was a silly decision. Revert it.
 
NO
 
@Zirak That approval thingy would be great about now
 
Fuck you
 
Haha I knew that was coming
 
11:48 PM
The second I went "Ooh, Caprica Six is a bot, not a person?" you should've realized it was a bad idea. :/
 
@Ariane Oh, I'm terribly sorry that my decision annoys you, of course because you are a girl I will obey your order.
 
All of this wouldn't have happened if you had used Python
 
@OctavianDamiean Please listen to me because I make sense, not because of my gender. :/
 
What do I care if you don't think it's a bot at first, as long as you realize it later?
 
@copy Eh?
 
11:49 PM
@Ariane Just to make sure you got that right, it was sarcasm.
 
@Ariane I was talking to Zirak. But you don't make much sense right now
 
@OctavianDamiean I did. o.o
 
But seriously, what are your reasons for changing the name?
 
11:50 PM
I wasn't aware we need a reason.
 
Because it was a cool idea, and as you yourself pointed out, you realized it was a bot when you saw it do bot stuff.
 
@Zirak Did you find out why the bot removed SomeKittens?
 
So I don't see the problem
@AmaanCheval Yes. ownerRights > rwRights. Bot changes to rwRights, so demotes the user
 
Ah
Well, that'd be a simple change, then
 
Problem is checking whether a user is an owner. It's not a problem once you have the info, but that's an async process and it only fires once per user-recognition, which I need to change, which doesn't work for some reason
 
11:52 PM
I see one because "cool" (which is subjective because I certainly don't share the feeling) is not a sufficient reason for changing the name of something that makes sense. That's like calling tables "woody items of wonder" because you find that cool.
 
Maybe I should change my name to SomeGuineaPigs
 
Do it!
How do I change my name I wanna change it to Swagatron-9000
 
@Ariane You are welcome to not enjoy the bot's name
 
@Ariane You know, I might actually call my table like that from now on, it sounds cool.
 
@Zirak , Great work!
 
11:53 PM
@BenjaminGruenbaum Dude, how are you awake?
 
Not yet. There's a bug where it demotes owners. I'm gonna track the fucker down.
 
Ah, nevermind. It's just 3AM for you
 
Well, thank you. Just wanted to point out that I don't think your decision is a good one. From then on you're the ones who decide.
 
^ The bug
 
"from then on". You were always the ones who decide. :p
 
11:54 PM
@Ariane Noted.
 
I have a feeling I'm being extremely annoying so I'm just gonna shut up and go back to my PHP
 
@BenjaminGruenbaum and someone else, can you join this room please?
 
*I WISH THERE WAS MORE THAN CAPS LOCK SO I CAN LOL TWICE AS FUCKING HARD*
 
Well, leave and rejoin if you're already there
 
I just did
Oh, nevermind. I'm still banned from that room.
 
11:55 PM
@XCritics You can make bold-italics all-caps text.
 
I'm on mobile
 

« first day (951 days earlier)      last day (3999 days later) »