« first day (1469 days earlier)      last day (3462 days later) » 

7:00 PM
:ragequits:
.redirect doesn't chain
 
0
Q: Ad Script Not Working

user3578630So I have this thing called "AdHitz" on my website (I'm not old enough for AdSense), and I need to put ad code on every page in order for it to work. The thing is, you have to change the script link from time to time, and I didn't want to have to edit every single webpage every time the link chan...

oh god
he's trying to edit script sources with css
I don't know how I feel about this youtube comment
> Why you cheeky scrub, trying to troll us here. Fite me Club Penguin, quick scopes only.
 
!!neat
 
7:09 PM
2
Q: How to properly initialize en ErrorEvent in javascript?

sboisseI need to fire an ErrorEvent programatically, but can't figure out how to initialize the properties of the event. The properties are readonly, and initEvent() only initializes the event type, if its bubblable, and if it's cancellable. I tried var myErrorEvent = new ErrorEvent("error", new Error...

a good question! finally!
 
@SterlingArcher Yes, it is a nice question
 
@Zirak I gotta ask.. why closet.html? lol
 
Because there's an evil monkey in my closet
 
Nicely done, I was waiting for an answer.
Oh lol
Even if it was a dupe, I +1'd bc they tried a lot and explained it well.
 
@Zirak - What? No stack trace?
 
7:19 PM
Anyone has a good resource for Express?
Their documentation is garbage.
 
the api docs are not bad if you ask me
I've seen worse
 
@rlemon I had to figure out that I can use .post(err, req, res, next) from the source code.
It's pretty bad.
But I'm looking for a slightly higher level something, beyond the basic API
 
ugh
my knee really hurts :/
 
@rlemon Still?
Since when?
 
I need to stop crossing my legs awkwardly, it makes my knee hurt when I run
 
7:23 PM
yea, was out adventuring last week and took an arrow.
 
user2620028
My knees still hurt from my race car wreck over a month ago
 
@rlemon An arrow once took my knee in its head.
 
nahh I did something in the joint. nothing I can do about it but give it time
 
this one time, at bandcamp, i shoved an arrow in my knee
 
user2620028
I wonder if there is a porn camp.... a place where people with common interest can...... no nevermind...
 
7:26 PM
@HatterisMad in some european country there is a sex school
Basically training you to be a hooker, gigalo, or pornstar
 
user2620028
romania?
 
sextrade is an extremely old industry. I wouldn't be surprised to learn it is taught in an institution of sorts.
 
user2620028
Guys i have a question. When it comes down to accessing an html objects height property that was set with css i have to use getcomputed correct?
 
7:29 PM
Son of a bitch that's funny xD
 
@rlemon - An institution of sorts? You mean iOS?
@HatterisMad - .clientHeight?
 
> iOS: Teaching you how to whore since 1976
 
lol
 
@SterlingArcher I can't see shit. Oh wait, there's some.
 
@KendallFrey xD
 
user2620028
7:30 PM
@TravisJ have not tried the alternatives to just .height yet. I am just curious the use case scenarios it works and does not work
 
!!crustypoop
 
@KendallFrey That didn't make much sense. Use the !!/help command to learn more.
 
!!learn crustypoop http://chat.stackoverflow.com/transcript/17?m=9878470#9878470
 
@KendallFrey Command crustypoop learned
 
.height is not a property of HTMLElement nor Element
.height() is part of the jQuery API so perhaps that is what you are thinking of
 
7:32 PM
.height is a property for Image and HTMLCanvasElement and umm. video iirc
 
user2620028
Definitely not what i am thinking of
 
maybe video is .videoHeight ??
 
user2620028
ok i was curious as to why it was working on my image and not my HTMLDivElement
 
user2620028
I honestly don't think i have tried using .height on anything except an image before :/
 
yea image has a .height and a .width property
most other elements do not
 
7:33 PM
so does canvas as you said
 
yea
> most other elements do not
not all ;)
 
user2620028
So i am assuming that like you said before @TravisJ .clientHeight is the preferred method than getcomputedstyle if you are just after the height
 
@Zirak lol my browser had a hard time loading all of that
 
user2620028
@TomW <3
 
7:38 PM
@TomW give it a week. Murica will make it more heart clogging
FOUR ANIMALS.
 
chicken, pig, cow, donut?
 
@HatterisMad - Generally .clientHeight is used. getcomputedstyle can be pretty tricky as well, is not widely supported, and still can miss some instances of styling (there is an SO post about it somewhere)
 
user2620028
@TravisJ gotcha thanks.
 
mia
hello people
 
@TomW duck.
Actually
Deer would be better
Dat venison
 
7:42 PM
Moose
good eatin' right der
 
Kangaroo is pretty epic
 
I've had snake. it was interesting
 
Gentlemen
 
I like turtles
 
Prepare your vagines.
<3
 
7:44 PM
 
LOL
Dude, That thing is huge
And I saw how strong a normal sea lion was
That thing could prolly rip you in half
 
tha'ts a bull
but the pic is a walrus I'm pretty sure
 
user457812
Your bucket is a walrus.
 
Don't walrus' (walri?) have tusks?
 
7:47 PM
@rlemon BUKKIT!
 
!!tell zirak google bukkit slideshare
 
My heart is in @OctavianDamiean's bukkit :(
 
bruh thats some voodoo shit bruh
 
mia
what is good way to practice node.js?
 
user1596138
7:50 PM
@SterlingArcher No bread!! No carbs!! It must be good for you :D
 
user1596138
i.stack.imgur.com/VsO57.jpg // oh my god skip the text and just look at it
 
@mia Make a chat server
 
user457812
@mia By setting oneself on fire and staying as far away from node as possible.
 
Who here got Beyond Earth?
@nil You're real cheery.
 
mia
@SomeKittens seems like u dont like me
 
user457812
7:52 PM
I'm just opposed to node.js on principle.
 
@nil Based on your username, you think Ruby is the new savior of mankind?
 
user457812
Nope.
 
user457812
Ruby's slow.
 
user457812
Depending on the implementation, anyway. MRI is slow, JRuby's JVM, RBX is weird, etc.
 
7:53 PM
@mia Write stuff?
 
oooh, you're an iProgrammer
 
user457812
No, I just didn't want to use 'null' as a username.
 
mia
i think u already know why i said that
 
user457812
Not sure why you'd think Kittens doesn't like you.
 
mia
@nil ask her
 
user457812
7:55 PM
Kittens, do you have any feelings one way or the other about mia?
 
Chat systems are the stairway to heaven of Node.js
 
user457812
Write a concurrency-friendly MD3→OBJ converter.
 
peopleWhoThinkIAmFemale++
 
@SomeKittens Enter WTFPL :D
 
user457812
I wrote one in Go. That was fun.
 
user457812
7:56 PM
And convinced me I shouldn't use Go for things.
 
mia
her or him
i been oh forget it
 
ohh I know! get node-serialport to compile inside of node-webkit and run without errors
and then tell me how you did it
ktnxs
 
magic package.json file i guess
cant find the damn thing, but apparently npm can
 
Will onsubmit propagate?
 
What's the most beautiful code (looking at it just gives you the most confusing boner) you guys have ever writen?
 
8:06 PM
@SterlingArcher - Beautiful as in composed or functional?
 
!!> Array(3).join([,'red','orange','yellow','green','aqua','blue','purple']).split('‌​‌​,').slice(1);
 
@rlemon ["red","orange","yellow","green","aqua","blue","purple","red","orange","yellow"‌​,"green","aqua","blue","purple"]
 
repeating arrays
 
@TravisJ composed
I mean you just look at this code and it's like Moses himself parted dat emulator and compiled dat ass into your code.
Code so beautiful that last sentence makes sense.
 
I don't think any code i've ever written is that
iz all ugly
 
8:11 PM
@rlemon did you see that hockey hit on imgur I posted?
 
yea
 
user1596138
Oh, since we talked about ebola earlier.... Remember don't sperm on anyone for a few weeks after you have it.
 
user1596138
Google it.
 
Illegal or nah?
 
mf can not get npm to update the packages file
 
8:11 PM
@SterlingArcher eh, tough call
 
@SterlingArcher - I wrote a np-hard scheduling algorithm in c#, but I can't share it since it is proprietary :(
 
hip checks are legal, targeting the knees isn't
and I don't think you can lift another player
 
I mean, he clearly didn't have the puck anymore also
Interference at the minimum
Yeah body slams are illegal
Err, that may be football
 
not even slamming
 
At least on the QB it's illegal
 
8:12 PM
I'm pretty sure you cannot even lift another player
 
All I can think right now is..
'How can I turn that into "do you even lift bro" joke'
I'm such a programmer, it hurts me to quote inside quotes like that
 
user1596138
@SterlingArcher HAHA yeah same here
 
user1596138
I hate it so much.
 
Y'all have trained me well.
 
"How can I turn that into \"do you even lift bro\" joke"
 
8:15 PM
^ xD
 
user1596138
Nahhhh
 
God dammit, I didn't even realize my music stopped playing 45 minutes ago
 
Double quotation marks all day, escaping when necesary
 
user1596138
Singles all day.
 
user1596138
In PHP it matters lol
 
8:16 PM
php with doubles is a bitch and a half
 
Boy, is this PHP? Do I look like a yellow-bellied PHPer to you?
 
@NickDugger but what have you tried?
 
anal
 
GUYS GUYS GUYS!
IT IS ALMOST CIV TIME!!!
\o/
 
user1596138
!!urban civ
 
8:18 PM
@Jhawins Civ The name for a person who plays Civilization games. Generally acts like a pompous asshat and know-it-all. Tries to weasel into social groups by talking about civilization.
 
user1596138
Ok well
 
@NickDugger well.. uhh... ok. Was it good? xD
Don't answer that.
 
user1596138
I don't get it
 
user1596138
When I tried anal it was good.
 
your ass wasn't sore the next day?
 
user1596138
8:20 PM
No she had trouble walking down the stairs tho
 
You could say he... walked right into that one.
 
she should have taken the strapon off first, they can be difficult to walk with.
 
@rlemon YEAH
BEEEEYOOOONNNNDDD ERF
 
@rlemon speaking... from... experience...?
 
user1596138
Yeah no.. You're gonna have to reach to make it my ass.
 
8:21 PM
@SterlingArcher - I think that was an excerpt from his blog
 
sometimes I forget this chat is index'd
 
> how to peg a lemon, by Jhawins
 
user1596138
@HatterisMad poser girls
 
user1596138
i.stack.imgur.com/cjTE7.jpg // from facebook she think people will believe she's actually doing something
 
8:22 PM
I saw this.. was amazed
 
user1596138
Put some god damn shoes on at least and why would she be taking headers off... ON THE GROUND.
 
@rlemon ah, day old, didn't know
 
no no I don't mind
it is a superb sub
I feel bad for the guy
but LOL
 
@rlemon I just saw that.. I was like wtf
 
8:25 PM
that should be a wasted gif
 
 
he's so proud of himself <3
 
If anybody knows Stephen A. Smith, you're going to fucking love this
I am just dying laughing from Frank Caliendo's impersonation
 
I do like mike and mike in the morning
 
user1596138
@rlemon oh dear god..
 
8:28 PM
dude was doomed to begin with, but I still feel bad for him
trying to propose and she fucking clocks him
WORST.NO.EVER!
 
friendzoned so fast, he'll wake up in the hospital
if that
 
@rlemon I don't. Only a bit.
 
@rlemon my coworkers are wondering why I'm crying
I'm just laughing so hard
 
cdn.polyfill.io/v1 - aww hell yes !
 
This is the funniest impersonation I've ever heard
 
8:30 PM
try not to pass out now
 
@rlemon I haven't heard that song in a while haha
 
dude owns it!
 
Better than me lol
these are actually funny as shit
i died at the "I MET YOU IN THE POOL" one
 
> Who's mom?
 
user1596138
@rlemon hahahaha
 
8:45 PM
okay last one
 
@phenomnomnominal has Ebola? nytimes.com/2014/10/25/nyregion/…
 
Is there a lib / pre-processor
that can extract my files into 2 parts ?
 
"The person has the lives of a cat"
wtf
 
one for worker.js and one for main.js ?
 
user1596138
@rlemon I won't post just because idk ick but did you see the handicap chair drift one?
 
8:51 PM
@Jhawins rlemon is afk: and I'm off!
 
nvm i need sleep
 
user1596138
@SecondRikudo What's the reasoning for line 18?
 
@Jhawins <input type=checkbox name=woot value=foot> should not be included unless is checked.
 
return !!el.checked
 
user1596138
8:56 PM
@SecondRikudo It will be false if it's not checked :P
 
@rlemon Will return false for all inputs without the checked property, like text inputs,
@Jhawins Yes, and thus filter will remove them.
 
Comments are terrible
 
user1596138
Mm I see the point now
 
The request header "Content-length" is set incorrectly
 
@copy Why?
 
user1596138
8:57 PM
^
 
user1596138
bytes
 
user1596138
Not characters
 
@SecondRikudo What's form? It sounds like a form, but it looks like an HTMLCollection or the likes
 
@Zirak It's a form.
 
form.elements?
 
8:58 PM
HTMLFormElement
@rlemon Seems to work without in both Chrome and Firefox
But if it's more standard compliant that way, I'll add it
It makes sense too
 
Oh yeah, forms have numeric indices
I forgot about that
 
[].slice.call(document.forms[0])
[<input type=​"text" id=​"searchbox" name=​"q" class=​"watermark">​, <input type=​"hidden" name=​"room" value=​"17">​]
silly
ohh well
 
But anyway, you don't have to set Content-Length anyway
 
@Zirak Will remove it then.
 
!!afk thug life is calling
 
8:59 PM
And you should also encode element.name
Plus the onload should probably come before send
 
why did i laugh so hard
 
Other than that, straight and simple. I'd return the xhr if someone wants to mess with it further
 
Paula Paula Paula Deen Y'all!
 
@Zirak Updated for all of the above, please review again
@Zirak Hmm, I was originally thinking about returning a promise, but I figured most people would find it too advanced, and it's intended as a Stack Overflow answer.
 
Check the result of your encoding again
 
9:02 PM
@Zirak Hmm?
 
!!> encodeURIComponent('foo=bar')
 
@Zirak "foo%3Dbar"
 
Whoops
Thought I could take a shortcut there :P
Right, anything else?
 
Not much. As always I'd advocate Array.from
 
TIL, nice
 
9:06 PM
OH MY GOD XD
 
You also require the argument to be a form, so it's not a generic XHR wrapper
 
@Zirak Check it now
 
Neat
 
0
A: Simple ajax form using javascript no jQuery

Second RikudoThe following is a far more elegant solution of the other answer, more fit for modern browsers. My reasoning is that if you need support for older browser you already most likely use a library like jQuery, and thus making this question pointless. /** * Takes a form node and sends it over AJAX....

The top answer here was just too nasty to look at
 
So instead of editing it, you copied the code, fixed it and reposted it as another answer?
 
9:15 PM
@copy Nothing in that answer is copied
And second, I really dislike drastically changing other people's code
I wrote the entire thing from scratch, why should I edit it into his answer?
 
Hi!
 
@Zirak Although Array.from is not very supported yet.
So I opted it out
 
@SecondRikudo Just seemed that way, because you had the same bug with the Content-Length
 
@SecondRikudo It will be
 
@Zirak Yeah, but it still won't be supported by IE10/11/12 so we'll have to live without it for a little whilte longer
Would be awesome for Node though
 
9:20 PM
In related news, while searching for the above image, I found this: fc00.deviantart.net/fs70/f/2013/139/6/0/…
 
@copy It initially started for my own purposes, I looked up a function to do this form submission, but they all looked crappy
 
I haven't a clue
 
What tool do you use for testing performance of a JS function ?
Example : is it reasonable to call `getBoundingClientRect` on each keystroke in a input ? How many time requires such a call ? 1 ms ? 0.001 ms ? 10 seconds ? ;)
 
They all had this content-length thing though, so I figured it's required.
 
@Basj If you notice the application being slow
Then you use your browser's profiler
 
9:21 PM
@Basj use console profiling
@copy That approach invites trouble
 
@Basj - jsperf.com
 
@SecondRikudo is there a profiling tool inside the Console of some browser ?
 
Back when we had 20 publishers, rendering the entire table on sort/filter/etc seemed like a great idea
Now with 10,000 publishers, not so much.
 
lol
@SecondRikudo - Hey! I did that too :)
Now I have a search by text input box to render a subset of the table
 
@TravisJ They did some crazy things there, that made me repeatedly bang my head against the desk.
Like for example, they implemented text-overflow: ellipsis; with JavaScript
 
9:23 PM
The subset comes from the server
oof
 
How, you might ask.
 
I abandoned the table in favor of divs and spans tho
 
Well, they take the cell, check iff the text fits, if not, they while loop, removing one letter, and checking if text + ellipsis fits in
 
omfg
 
Zebra has a similar concept.
 
9:24 PM
@TravisJ would you have an example of how to test how many milliseconds takes getBoundingClientRect ? Any clue about what is the teardown and all these parameters on jsperf ?
 
Coworker and me refactored the entire shitstorm into 3 lines of CSS, improved page rendering time by 70% XD
 
@rlemon youtube.com/watch?v=y65l6Foz4iA the boyfriend loses it xD
 
@SterlingArcher rlemon is afk: thug life is calling
 
@Basj - Well it was more of a response to the first part of your question based on comparing performance. getBoundingClientRect calls would probably be profiled just fine in the console as Second suggested
 
@TravisJ Yeah, but it is tabular data in that case, so table is fine.
Although they didn't forget to abuse it either.
 
9:26 PM
@TravisJ what do you mean by 'in the console' ?
 
@SecondRikudo - Yeah, but the auto rendering is a nightmare, plus breaking it into divs and spans allowed for a nicer layout
@Basj - logging elapsed milliseconds to the console
 
@TravisJ Meh, the solution for autorendering is saving all of the data in some sort of object in the back, when filter happens, you filter on that object, and only then render the Nth 20 items from the object.
I mean, who the hell needs to render all items in a table of 10k items, where in practice all you ever look at is page 3 max?
Especially when you have a filter option.
 
@SecondRikudo - That was why google went to 10 results per page
 
@TravisJ Yup
 
That is also why google only returns resultSet.Take(400) and that is it
 
9:28 PM
Like I said, no one thought about 10k publishers at the time
 
They tell you there are millions of results, but really, you can only explore 400 of them
I think I limit the total amount you can pull into the page at 500
 
@SecondRikudo I don't know if this is what you suggested or not : http://jsfiddle.net/w5bpode5/ .... I get "0 milliseconds" as output. Would you do a loop in order to know how many such calls in 1 seconds can be done?

If I do a simple loop, maybe the result of getBoundingClientRect will be cached, so the performance test will be false ?
 
@Basj did you look up chrome console profiling?
!!tell Basj google chrome console profiling
 
@Basj - I got anywhere between 1 and 10
 
9:33 PM
@TravisJ with my jsfiddle code ?
 
yes
 
@TravisJ this is intriguing...
 
I think it may have been because the console.log was taking some time to complete
 
ok
 
Also, it would seem that milliseconds is as specific as it gets
 
9:40 PM
I'm in a dilemma
Via PHP, I load a bunch of replies to a page.
There is a delete button next to each of them.
However, I can't figure out how to code the delete button to delete the intended post.
If the second delete button (all buttons are under the post) is clicked, it should delete the second post
I can't figure out how to access the post for which the delete button was clicked.
Seems like a simple problem, but I just can't figure it out.
 
@Basj - I actually have to go. I think you may be able to use something more precise. Here is a simple approach at looping and calculating an average: jsfiddle.net/203qxzLe Perhaps use this ? w3.org/TR/hr-time/#sec-DOMHighResTimeStamp good luck :D
o/
 
@TravisJ Thanks!
 
9:54 PM
Hi all, any ideas on this? stackoverflow.com/q/26556684/2852427
 
ok, here I am
that was an interesting evening
unfortunately my crush wasn't there, and the black thing was a hit for girls
 

« first day (1469 days earlier)      last day (3462 days later) »