« first day (441 days earlier)      last day (4509 days later) » 

12:00 AM
Yep, that was it. Had to do git push origin [branchName]
 
i have to do that crap with heroku
to host a facebook app i'm working on
sooooo annoying
i don't understand it
 
The failz are here and here and here
 
why not just use FTP?
 
I really hope to meant SFTP
 
wha?
 
12:03 AM
Oh lord, you're actually sending files in an unsecured FTP connection?
 
toFormData({a:1, b:2}) doesn't do anything?
 
And I still suck. How will I get the fkey via Node? How will I even connect to SO with node? smack on the nose
 
I isolated the function
 
toFromData works correctly
It's just really weird. Form Data is really weird...
 
I just use this
function toFormData( obj ) {
	var r = [], enc = encodeURIComponent;

	for( var key in obj ) {
		r.push( enc( key ) + "=" + enc( obj[key] ) );
	}


	return r.join( "&" );
}
lol at the whitespace.. I just wrote it on the fly :P
 
12:07 AM
I did that. SO didn't accept it
Look at the requests the chat sends. They're all "hurr durr I have Form Data and not a request payload"
HOW DEY DO IT rage
 
GGG
are you passing it a cookie? they are storing a bunch of stuff in there
 
yes you are supposed to send( keyValueStringThatHasWorkedFor30years)
 
I don't have to, cookies are automatically sent.
 
GGG
did you check whether the cookie is actually being sent and looks like the cookie normally does on the client?
 
facepalm I think I found the problem
wait no...it maek no sense
And yes, I checked the cookies
//this is where the chat sends the new message request
function sb(b) {
    X();
    $("#input").focus();
    var c, d; - 1 != b.attr("id").search(/^pending-message-/) ? (c = "/chats/" + a.id + "/messages/new", d = Wb(b)) : (c = "/messages/" + b.messageId(), d = function (a) {
        b.removeClass("pending");
        Ra(a) ? b.addClass("posted") : (b.data("source", null), b.html(b.data("previous_content")).data("previous_content", null))
    });
    $.ajax({
        type: "POST",
        url: c,
 
12:13 AM
here is how I post message from my bot
	function sendSOMessage( msg ) {
	console.log( msg );
		$.post( POST_URL, {
			text: msg,
			fkey: fk
		} );
	}
fk is just acquired once from fkey().fkey
and POST_URL is "http://chat.stackoverflow.com/chats/17/messages/new"
 
I'm not using jQuery just for jQuery.post
I know how they do it, I just can't get them to friggin accept my messages
 
yes but just showing that there is not much you can fuck up
at least try the string "fkey=abc&text=hello" in xhr.send instead of form data
 
I tried, it failed
I'm going to try not using IO.xhr, I have a feeling I didn't write it well...
 
sent from IO.xhr
I literally copy pasted your code to my console and wrote IO.xhr( {method: "POST", url: "http://chat.stackoverflow.com/chats/17/messages/new", data: {text: "sent from IO.xhr`", fkey: fkey().fkey}});`
 
HOLY CRAP, I AM A RETARD
I forgot method : "POST" bashes head against desk
 
12:19 AM
LOL
I forgot it too
this is my console:
TypeError: Object function Object() { [native code] } has no method 'merge'
//defines merge
IO.xhr( {url: "http://chat.stackoverflow.com/chats/17/messages/new", data: {text: "sent from `IO.xhr`", fkey: fkey().fkey}});
XMLHttpRequest
GET chat.stackoverflow.com/chats/17/messages/new 404 (Not Found)
IO.xhr( {method: "POST", url: "http://chat.stackoverflow.com/chats/17/messages/new", data: {text: "sent from `IO.xhr`", fkey: fkey().fkey}});
XMLHttpRequest
 
user1385191
you're also not checking against the status code of the XHR
 
I really should do it, shouldn't I?
Muahaha! It works!
 
user1385191
you might want to look into sendRequestHeader as well
 
user1385191
 
I think I'll just use some random xhr abstraction. I'm bad at this...
 
12:23 AM
well you shouldn't need any advanced stuff
you really just need to make a braindead post request
what else
 
Every time I try and do that, I keep thinking "what if"
 
btw jQuery is already included on this page so if you're running it in browser it's ok just to use one thing ? :P
 
user1385191
remember, you're just building an HTTP Request
 
in node you wouldn't use those apis anyway
 
user1385191
so something like "Accept: application/json" would work if you're expecting JSON in response
 
12:30 AM
So, anything I should be aware of when asking questions?
 
Search before you ask, actually ask what you ask instead of muttering around it, give information on your problem and what you tried. You should go and help people answer your question, so think about your definition of a good question.
 
And code always helps
 
Don't ask anything that anyone can google up in 20 seconds :d
 
applies to the chats as well I assume.
 
12:46 AM
Ignored Tags
jqgrid jquery-plugins jquery-ui
unfortunately they aren't hidden from me, just shown at lower opacity :S
 
!@#1ua8 this is driving me insane. I'm just gonna give away all remaining dignity and use jQuery.post
 
why not use it in the first place - jQuery is already on the page
 
Because I'm a stubborn, arrogant bastard?
 
GGG
@Esailija which you will probably find actually attracts your attention to them more. It's silly.
 
yeah I guess I have to use greasemonkey script to hide them
 
12:50 AM
@Esailija You can check the "hide ignored tags" preference in your profile so they don't show up at all
 
@TimStone thanks, much better :)
some still sneak in questions by using the plugin name as tag instead of jquery-plugins lol
bastards
 
GGG
1:06 AM
i tried to ignore jquery until i realized people just tag everything jquery
 
most of the crap questions have something to do with some plugin
"look at the plugin i copypasted, it doesn't work, help!11"
 
GGG
~meme show "all-the-things" "copypasta" "all the plugins"
 
@GGG Generating image
 
GGG
but there were also a lot of questions tagged jquery that had nothing to do with jquery and were utter crap. Like "how do i create a function in jquery" or something. I removed a ton of jquery tags (on an old account i had i somehow lost access to)
 
yes but at least it's not 100% crap like any plugin question :P so I cannot ignore (:
 
GGG
1:15 AM
how do i create a function in jquery is like 1000% crap. and yeah, hard to ignore.
that was actually a real question, no joke
 
no no, I mean 100% of the questions that are tagged with some plugin or similar will wanna make you gouge your eyes out
but with jquery tag you at least have that 1% hope that the question might be good
 
GGG
hahah oh yeah true
 
jquery questions are recycled too much
 
GGG
Yeah now i remember how this went. I tried the ignore feature on jquery, and the faded tags stuck out like a sore thumb, so i'd check each one and see if it really had anything to do with jquery, and many times it didn't, so i could remove the tag and then actually ignore it.
but yeah most of the rest were plugin questions and were garbage
 
1:31 AM
woohoo, xhr based: github.com/Titani/SO-ChatBot
I even made it gracefully handle the "wait 5 seconds" messages. Maybe...
oh, can anybody help me stress-test it? Just me isn't gonna do. (it's in Room for bots now)
looks expectedly at @GGG @Purmou and @Esailija :D
 
Do you usually use jQuery instead of $ ? Because I do and it would be awesome if you did as well
 
what's the difference?
 
Yep, I do
 
unless you're using another library?
 
It just makes me feel...cleaner.
 
1:36 AM
it instantly says that you are jquery fag instead of mootools/etc
 
doesn't mootols use $ as well?
 
And Prototype. And pretty much any other popular ajax library on the planet.
 
yes everything uses $.. that's why when you use jQuery instead of $, it's more clear that you mean jQuery
 
i don't see myself using any other library in the near future
 
GGG
1:37 AM
sorry i'm working on something much more entertaining (and really i should be doing work stuff)
purmou you are going to flip when u see this thing lol
 
what thing? :P
damn it i'm excited now :P
 
GGG
it uses velocity, and it's not a snowflake
 
._.
 
GGG
just get excited lol i'll show it to you on monday
 
i'm at the rose parade on monday lol
 
2:20 AM
Do tell me if you somehow manage to mutilate the bot. Thanks and enjoy your flight
 
 
1 hour later…
3:33 AM
Why's this place dead :c
 
3:54 AM
I'm here
but busy writing up... uh damage calculation and all sorts of data for a game
you're a hard core nerd when you open up a Goolge Spreadsheet and start laying out a weapon/shield/armor/speed/stuff system for a space game at 3am in the morning
 
4:06 AM
Is the source code to mosaic out there somewhere?
 
@IvoWetzel Nothing official I guess?
 
Awesome!
 
4:25 AM
It's freaky to look at this side-by-side with something from gecko or webkit's latest builds.
 
4:35 AM
Mosaic 2.5 HTML parser has comment:
 Main parser of HTML text.  Takes raw text, and produces a linked
 * list of mark objects.  Mark objects are either text strings, or
 * starting and ending mark delimiters.
 * The old list is passed in so it can be freed, and in the future we
 * may want to add code to append to the old list.
 */
FireFox9 Beta has this comment in the parser:
/*
 * THIS IS A GENERATED FILE. PLEASE DO NOT EDIT.
 * Please edit Tokenizer.java instead and regenerate.
 */
Parsers have gotten so complicated we write them in another language and generate them =/.
16 years.
 
= html sucks
 
rofl
Yeah, I wish the web evolved differently.
I say we burn the thing to the ground.
 
Stateful http this time
ok, wish me luck...going into node.
 
5:18 AM
node's easy :P
do something awesome with node and websockets ;)
 
I don't know where to begin. I started organising into smaller files and using require everywhere, but I need to actually write something that sends http reuqests and logs into SO...
 
you could take a look at my horrible written kitten :D
 
I fear that regex-html-parsing monstrosity :P
 
refactor it :P
 
GGG
5:48 AM
nice url
 
great code!
 
That reminds me. Bitch about my code. I need to make it better.
 
6:07 AM
Do you guys think I put this in the right place? I put it under jquery, but I guess it's also javascript help i need? stackoverflow.com/questions/8686613/…
 
GGG
6:26 AM
not sure if jquery or javascript?
 
6:48 AM
try both of them
 
7:02 AM
hiiiiiiiii Everyone
anyone There???????????
 
You first need to explain two things: (1)specific location when saying "there". Is it "that street adjacent mine" or is it "Madagascar"? (2)whom do you include in "anyone"? is my pet rock someone, is a dog or water or a ghost or a person? If there's a doctor for example in specified "there", would you include him? What about an engineer or an astronaut?
 
@Zirak.anyone includes BloodSuckers like u
@Zirak
got wat i mean
 
7:21 AM
I'm a vampire? Fear fear
At least I don't sparkle
 
No man...Vampires are pretty cute.....atleast they dont irritate with horrible questions!!!!!
:)
 
..."Vampires are pretty cute"? The hell is wrong with you?
And how is my question horrible? It did two things: Answer your question and had the possibility of obtaining more useful data.
 
about: Anyone and There????
and atleast they might be more cute than u.....hahahahahahahahah
 
oooohhh snap, you got me there. However did you know my cuteness is my Achilles heel?
 
so wat platform u work on????
 
7:30 AM
Define "platform"
 
Railway platform or Tramp Platform
 
I write shit in js, just today got into node. Does that answer your question?
 
may b
hey are the one frm LA...
 
 
2 hours later…
9:36 AM
!!/help
Oh, @Zirak isn't in the room
 
10:36 AM
Dudes whats up
 
11:09 AM
how to invoke a click on img tag using jquery ?
 
rtfm
 
@Esailija huh?
 
I literally googled your sentence and it still gave the relevant result to jquery manual
god knows what the results would be if I googled something sane like how to invoke click in jquery or how to trigger click event in jquery
happy new year
 
@Esailija don't worry i got it
 
^^
 
11:20 AM
@Esailija it was as simple as this $('#id').click();
 
yes it is, that's why I said rtfm/google
 
11:31 AM
@user994144 rtfm
Note that .click() is actually a method defined in HTML
 
@Raynos Chill, Esailija already told him to do that.
 
@Amaan I felt like telling him again :3
 
Hahaha
 
 
1 hour later…
12:47 PM
1
Q: How to apply style to a class in javascript?

hlotvonenI have multiple divs in my body which need the same style: <div class="box"></div> I have a javascript that calculates the height of the browser window viewport height. I want to apply that height to all my "box" classed divs. <script type="text/javascript"> var box = docume...

 
jesus christ, wtf
 
The answer is pure wtf
 
yesterday I saw this kind of loop in an answer
for( i = 0; i < elem.childNodes.length; ++i ) {
	elem.childNodes[i].something && elem.childNodes[i].somethingElse
}
I told him to cache the length, guess what he cached the length literally and the loop body stayed the same :D
 
sigh
oh, I started migrating to node: github.com/Titani/SO-ChatBot/tree/node
Need to do some more stuff, like the commit message says,,,
 
does it works
 
12:53 PM
No :3 It doesn't login to SO
 
I couldn't resist editing his answer xD
 
0
Q: html form capture data make url

user895635Could someone explain how I can capture data from two dropdown fields and when the submit button is pressed join these two selection values together to create a URL which is then called. eg. DropDown 1: Apple DropDown 2: Orange When you click submit button it creates a url and loads: http://...

 
 
1 hour later…
2:55 PM
wtf someone is mass downvoting my posts
what to do
eek
 
Wait
I think there's a mechanism that automatically restores your rep if there are a certain number of downvotes from someone
 
it seems it's just 3 downvotes, but all of them are on old good answers so it's obvious revenge downvoting
 
I've had that happen to me.
Just forget it
 
3:17 PM
that also happens when someone wants to do CORS... always some answer saying it's not possible even if it has been possible for many years
 
why is programatically logging in via OpenID more difficult than making a single request? ~_~
 
posted on December 31, 2011

2011 has been a great year for JavaScript.  Web browsers have given us great new tools to use and we have taken web applications to new heights, competing with native applications and bringing sexy back to the web with countless impressive demos.  A week or so ago, we put out a survey to all of you asking what you thought the most badass JavaScript demo of 2011 was.  Of course, this would be a

 
4:25 PM
@Esailija btw, my 80-character-wide rule makes sense. I'm able to have three horizontal files lined-up and see everything in each. If you add in vertical buffers, that's 6 files you can easily view in one text editor window.
 
4:36 PM
depends on what the hell you are talking about
in typography people use 66 as rule of thumb
 
Talking about my styling guide of not allowing lines to be longer than 80 characters. It's rounding of 1 character from the olden-days 79 character screens, and so far it seems to work nicely.
It's not too short to inhibit good code, when I'm about to reach it I have to ask myself "how did I end up using 80 characters?" and try to clean things up.
 
4:59 PM
0
Q: How can I improve this Node.js file's routing?

SimpletonBeing new to Node.js, I'd like to know of a better way of implementing this: server = http.createServer( function(req, res) { if (req.url === '/') { fs.readFile('index.html', function(err, page) { res.writeHead(200, {'Content-Type': 'text/html'}); res.write(page);...

 
5:39 PM
@MrAnubis Not really, no
Maybe by coincidence
 
@MrAnubis no
go annoy the PHP guys
 
aahh, MySQL...the very definition of javascript
 
@Raynos Why the hell my simple query is annoying ?
:\
 
0
Q: How do you replace the document in a window?

Raynosvar newDoc = document.implementation.createHTMLDocument('someTitle'); // swap newDoc with document DOMImplementation.createHTMLDocument Is it possible to swap the current document for a new document? Is there any reasonable reason to do this?

 
because mysql =/= js
 
5:49 PM
@MrAnubis where in the room title do you see mysql?
1 message moved to PHP
 
@Raynos lol , Already went there but no help:)
 
Then tough shit \o/
 
google and irc chats?
 
@Raynos you guyz playing politics? :D
 
@zirak do you have anymore challenges or problems for js?
@mr.anubis just ask your question on stack overflow, there's a lot of active php users who don't use chat
 
5:54 PM
//I had a nice little challenge the other day: Merging objects together.
//so, write a function (let's call it `Object.merge`) that does this:
Object.merge( {answer : 42} ); //=> {answer : 42}

Object.merge( {foo : 'bar', color : 'yellow', type : 'b'}, { color : 'black' }, { type : 4 } ); //=> {foo : 'bar', color : 'black', type : 4
//and so forth
 
@Ator You're right , but chat seems to be easy option to get answer ( atleast in c++ room). Thanks
 
It can be solved in several ways. I managed to do it with 2 callbacks.
 
@Mr.Anubis yeah, but if the chat is dead, there's not much you can do. Better using what you can, right?
@zirak so the second properties would be the ones called back?
Object.merge( {foo : 'bar'}, {foo: 'bars'} ); //=> {foo : 'bars'} ?
 
In case of name-collisions, the latest one wins (as can be seen in the second example)
 
@Zirak A simple loop would do it, right?
Loop through the arguments, then a for in loop
 
5:59 PM
I don't see how you can do it in a loop, but yeah it can be done that way
Oh wait, it can be done with 1 loop
Bonus: Do it in 3 completely different ways
 
Completely different ways always puzzle me. I always manage to find only one way
 
6:14 PM
pretty sure I'm doing this wrong
or approaching it badly
why won't my code format :|
 
That's how I did it
Select it all, hit Ctrl+K
And send
 
Or click on the fixed font button on the right
 
I'll just use jsfiddle, thanks though Amaan
 
Though forEach is basically a sugared loop
 
6:16 PM
that's what I have so far, I'm stuck in the if() part
 
Yeah, basically the same thing as mine, @Dennis
 
It depends on what @Zirak defines as "completely different"
 
I like the way you make arguments list an array
I've used Array.apply(null, arguments); so far
 
I like the way you both did it
didn't even think of it like that
 
I like Dennis's way more
Oh
 
6:20 PM
Yeah, same here
 
Why is my new object getting the merge function?!
Where's it even coming from?
 
Object.prototype.merge gives it to {}-created variables..., Object.merge gives you a "static" function
 
Shouldn't hasOwnProperty avoid it from coming through?
 
Here're my takes: pastie.org/3102964
 
But it worked
 
6:23 PM
I like the 3rd one most. Been batshit crazy over Array.reduce ever since I remembered you can pass an initial value
 
The second one, I would have never gotten. .-.
 
The stuff at the end is just removing what you were currently merging with and calling yourself again
 
what does .reduce do?
 
My bot isn't on. You gave it no chance! Have faith!!!
 
6:26 PM
Well, that's like, your opinion, man.
 
I fart in your general direction
 
thnku @amaan
 
!!/mdn Array.reduce
 
I understand the world of reduce now
 
6:27 PM
Heh
 
oh, I started porting the bot to node. I can't figure out how to login to SO purely with http requests...
 
I know, I saw the new branch on your repo
What isn't working?
 
It doesn't log into SO, so it doesn't have access to the chat, so it can't post/receive stuff
 
I mean, why doesn't it log in?
 
Because I didn't make it log in
 
6:30 PM
That's @IvoWetzel's
I don't know if it works or not
@Zirak Hahaha. Why not?
 
Yeah, saw it. He does html parsing with regexs and admitted to its weirdness, so I'm gonna try a different way
Because I can't figure it out :P
 
Oh
Haha
 
@Zirak Do you need to provide the empty object in merge #3?
If you don't, it just starts at arguments[0]
 
@Zirak, I don't know how node works, but are you able to go to webpages and execute JS on it?
openid.signin('myopenid');
And then fill in your credentials on the page on myopenid.com
 
6:49 PM
@Dennis I don't want to mutate the original one. @Amaan Yeah, I saw that, but I can't execute it. If I could, it'd be pretty easy, since I'd have had DOM access as well.
 
to do radians would it be
    var rad = 180 * 180 / Math.PI;
or
    var rad = 180 / 180 * Math.PI;
to find the rad of 180 degrees
 
7:04 PM
@Ator The second one.
 
thanks, just making sure
 
7:21 PM
@Ator D -> R = D * pi / 180. 1 Radian is pi/180 so 180 radians is 180 * pi/180, which is equal to pi.
It's like calculating percentages. 1% = 1/100, 1R = pi/180
 
@Zirak 1R = 180/pi, about 57 degrees
 
Really, I got them mixed up again?
 
Now I'm confused... integrals are easy, arithmetic is complicated
 
oh right...I keep mixing sines and cosines and degrees and radians... D -> R = D * 180 / pi, pi = 180D
 
why is it divided by pi though if 180pi / 180 gives you pi
which is what it is in rads
180D -> R = pi
 
7:29 PM
I want a css 'beautifier' that will output this:
selector[SPACE]{[NEW LINE]
[TAB]atrib:[SPACE]value[NEWLINE]
}[NEWLINE]
 
360D -> R = 2pi so 360/180 * pi ?
 
No wait I was right in the first place. deg = rad * 180/pi and rad = deg * pi/180
1r * 180 / pi = 57.29577d and 1d * pi / 180 = 0.01745r. pi = 180 * pi / 180
 
> 1R = pi/180
That was the one I was picking on
 
Hey, someone who wants to help me with this? superuser.com/questions/373363/…
 
GGG
8:31 PM
@user726730 why is this getting passed all around stackexchange? looks like it belongs on stackoverflow?
 

« first day (441 days earlier)      last day (4509 days later) »