« first day (640 days earlier)      last day (4314 days later) » 

11:00 AM
Did you knew that parseInt parses values like '2px' or '100%' successfully? I was suprised when I saw it...
 
@Killah of course it does
that's why it's better than +
 
I've always stripped it off using slice xD
 
@Killah lol
> parseInt(NaN);
> NaN
 
@Killah parseInt parses numbers till it finishes or till it reaches an invalid character
 
> parseInt("123qw423423",64);
> NaN
 
11:02 AM
@Killah that's the only reason to use parseInt, otherwise you'd just +
 
So, yeah
 
No multi-line markdown for you @Abhishek
 
I just felt like my 8 year experience was meaningless.
@Esailija nah, try 2 + '2'. Gives 22
 
@OctavianDamiean am copy pasting from chrome
 
I mean + as a unary operator
2 + +'2'
or +'2'
 
11:03 AM
Ah, right
 
parseInt("10w",37); why ?
is this NaN
 
why what
the max is 36
 
i know it will work on 36
just wondering why 36 is the limit ?
 
because there are 10 numbers and 26 letters
4
 
26 letters.
 
11:04 AM
:D
 
and there are various symbols = + % $
why leave those ?
we have base 64!
 
is that a rhetorical question?
 
no i am wondering , and actually wanna know why just 36
when we already use base 64
 
It would be nice if it did use all the characters.
 
@Abhishek, we have more characters, just like łąćżź ;p
 
11:05 AM
@Killah oh that way we have over a lakh characters
 
there is always extensions for that
 
lakh = 100,000
 
I really need the bases 2, 8 10 and 16 only anyway
 
true that
just a random thought in my mind
alright gonna go work, cya
 
c y
 
11:28 AM
hahaha
wtf
 
yep, that's pretty bad
 
This is the first time in my life that I'm sad not to have IE. :(
 
11:43 AM
9007199254740990 (that is, 253−2) distinct “Not-a-Number” values of the IEEE Standard are represented in ECMAScript as a single special NaN value.
seems a bit excessive
 
12:03 PM
@Esailija what? ?
 
there are 9007199254740990 different bit patterns for NaN in the double type :P
 
Sam
Hi everyone
 
Hi dr nick.
 
Sam
Dr Nick?
 
Dr. Nick Riviera, usually referred to as Dr. Nick, is a recurring fictional character in the American animated sitcom The Simpsons. He is voiced by Hank Azaria, and first appeared in the episode "Bart Gets Hit by a Car". Dr. Nick is an inept quack physician, and a satire of incompetent medical professionals. Dr. Nick is known for his exclamation of "Hi, everybody!" upon entering a scene, which is immediately followed by the other characters present with, "Hi, Dr. Nick!", with one exception: in "Who Shot Mr. Burns?", Mr. Burns replies with "Ho, Mer. Simp-son", but with the same inflection...
 
Sam
12:13 PM
confused
 
> Dr. Nick is known for his exclamation of "Hi, everybody!" upon entering a scene, which is immediately followed by the other characters present with, "Hi, Dr. Nick!"
 
Sam
Been watching the simpsons?
 
I just fitted a 960 GB PCIe SSD into one of our servers - this should be fun :)
 
Sam
@Alnitak How much did that cost?
 
about £1600
can't remember if that's before or after VAT
before, I think
 
12:18 PM
hello i am always used to having my code execute after an event like $("#getCoords").click(function(){
i was wondering if there was a way to do it without an event
like as soon as a page loads
 
b1-
@Alnitak search for bot for load testing? :)
 
in jquery
 
page load is an event
 
Yo @rlemon. :)
 
it's for a MySQL server
 
Sam
12:19 PM
@LeTruffle what about document ready?
 
like after $(document).ready(function() {
 
Sam
@LeTruffle Like this -> pastebin.com/Dds1FDGX
@LeTruffle It will run as soon as the page loads
 
i suddenly feel dumb, thanks man
 
Sam
@LeTruffle No problem, good luck :)
 
@OctavianDamiean word
 
Sam
12:23 PM
Some wind is blowing through my window, going across a bottle and making a humming noise...
 
@Sam Easy solution. Throw the bottle through that window.
 
Sam
$(me).annoyed(function() {
$(this).hand("getBottle").throw("fast");
});
I should make a plugin for this
 
"cv-pls" means , close-vote please .. who was that misguided individual who upvoted that "debug my code" post ?
 
Sam
@tereško Who are you talking to?
 
12:28 PM
I thought you want my Curriculum Vitae.
 
riiight
then again .. the javascript room's community has given up on maintaining the questions
=P
 
Probably because of the constant influx of crap. Same problem with the tag.
 
the size of and is almost equal
 
Guess why... both of them are like a magnets for crappy programmers. PHP by definition, and javascript because of jQuery.
 
jQuery doesn't cause bad programmers
"intro to web programming" books and w3schools does that
 
12:41 PM
^that. And people who get into programming because they "Like video games"
 
But jQuery attracts them. When they see how easy it is they say "hey, I was born to be a programmer!" and then they grab the books you mentioned.
 
Stupid brogrammers.
 
If PHP were properly designed, it wouldn't matter that it attracts crappy programmers
you can write crappy code in anything
 
@SomeKittens well, i got into programming because of this.... (12 years ago though)
 
but it takes PHP to turn crappy code into major system vulns
 
12:47 PM
am i a bad coder by default now? :'(
because then i get a janitor
 
I did too
Games seem to inspire lots of people
 
Same here.
 
But for every one of you, dozens fail out and give us a bad name
we like to call the IT degree the "I Tried" degree because so many people don't realize just how hard programming is.
 
it's not about why you get into programming, but how you approach programming
 
Yeah, but there is a little difference between "Hey, I like games. Maybe I will learn how to make them?" and "Hey, I like games. jQuery and PHP is so easy, I'm a programmer now!".
 
12:48 PM
you have to live programming
be amazed by it
 
@GNi33 Exactly my point.
 
then you'll have a good chance to get good at something
spamming SO with something you tried 5 minutes and sob "ohmagod, it's so hard HELPZ ME" won't get you far on the other ahand.
 
Exactly. Becoming a great programmer is an all-or-nothing lifestyle
 
Hi all ^_^
 
Anyways, anyone tried nodejitsu? Seems nice, but I'm not sure if good enough to migrate from private server.
@Neal hiho
 
12:52 PM
There's nothing nicer than sitting at something a whole night and suddenly understanding it
 
@GNi33 Of course there is. One of them is understanding it right away. ;)
 
@GNi33 That sounds incredibly geeky
But I agree :p
 
@OctavianDamiean well.... yeah, but fiddling around on something you don't understand right away is just great
and just to clarify: I don't consider myself to be a good programmer
 
Seriously??
Thanks for response. Yes using Ajax I got correct result, but I want to develop this application for different mobile platforms including Blackberry5 which does not support this ajax post method. — PramodD 1 min ago
LOL thats a load of huey
 
@GNi33 Of course. You wouldn't be a good programmer if you did. (In my and Atwood's opinion)
 
12:55 PM
@GNi33 I agree, that statement applies to women too.
 
Can someone please help me yell @ that OP?
 
@Neal Just answer each and every of his question with Strawberry pudding.
It'll work.
 
@OctavianDamiean hehehe ;)
 
Hahah
 
@OctavianDamiean :-P but you see that he is wrong, yes?
 
12:57 PM
Of course he is ...
That's what I assume everyone is by default.
98% of the time I'm right with that.
The other 2% of the time I'm drunk which doesn't count to be honest.
 
I have never seen such a silly request string before:
var parameters = "requestString=manish"+encodeURIComponent("|^")+"info1234"+encodeURIComponent("|^")+encodeURIComponent("|^")+"X"+encodeURIComponent("|^")+"11111985"+encodeURIComponent("|^")+"1.0"+encodeURIComponent("|^|$");
LOL
wtf is that?
 
so to post something i just summon the .ajax function?
 
An example of programmer we talked about few minutes ago ;)
 
@LeTruffle hmmm?
 
1:01 PM
Or hardcore obfuscation :D
 
post something into my database using ajax
 
You are ordering him to do so?
 
Just do it.
 
Are you*
 
on my defense how many languages do you know killah
 
1:02 PM
@LeTruffle We weren't talking about you
About the guy with the silly request string
 
oh alright
 
Of course we were talking about this request ;p
 
Oy...
as per doc blackberry5 is b grade browser and B-grade – Enhanced experience except without Ajax navigation features.herePramodD 2 mins ago
@PramodD all it says is that it is without Ajax navigation features, that has nothing to do with gets and posts, That is in normal jQuery, which you include along with jQmobile.... — Neal 31 secs ago
 
wth
 
In what kind of sick chat rooms are you @Neal.
 
1:04 PM
Anyway, if you are curious I know... counts... more than 10
 
@OctavianDamiean eh?
 
Oh mah gawdz! That's in question comments? :O
How embarrassing is that?
 
@OctavianDamiean what in all that is ducemonkeys are you talking about?
 
stops talking ... fears the Neal
 
http://stackoverflow.com/questions/11522836/snowball-data-using-jquery-deferred
Lowest rep answerer, only one with actual answer. Yeesh...
 
1:07 PM
@SomeKittens huh?
 
One answer's broken, the other's technically correct but doesn't solve the problem the asker has...
 
@Neal Did you just get up?
 
oy....
actually I want to send data with delimiter |^. means userName|^password|^ — PramodD 1 min ago
@OctavianDamiean No. I have been up since 605 EDT
 
Had your coffee already?
 
@Neal ask him if he is using PHP on the server-side, that would explain everything.
 
1:10 PM
no
ask him if he is using PHP on the client-side, the answer would explain everything.
 
@Killah He is not. it's a .asp file. but that should not matter... a post is a post!
@FlorianMargaine Oy... :-P
 
@Neal Well yeah, but PHP "programmers" usually try some weird tweaks before realizing that they are inventing the wheel again.
 
0
Q: How to add all boxes width in one variable using jquery / javascript

amiti want calculate or add width of all box width in one variable. should i use loop or something like that. please suggest <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style> .cont...

 
@PramodD who is they? — Neal 5 secs ago
 
Omfg
 
1:12 PM
LOL
@Alnitak could you help me yell at this OP? please :-(
 
The small green ones, don't you know them? They hijack you. Beam you on their ship and do nasty things to you.
 
@Neal huh?
 
@Alnitak And why the hell the title says jQuery / Javascript? This should be vice versa ;/ Wait, I should ask the one who asked the question
 
2 mins ago, by Neal
@PramodD who is they? — Neal 5 secs ago
Re: that ^
 
well, i guess today is not my day
 
1:15 PM
@Killah No multi-line markdown for you!
 
I was wondering what happened...
 
@Alnitak nice
 
@Esailija what's nice?
 
using reduce
 
1:20 PM
ah, thanks :)
I get no rep for it unless it's accepted. My array answer from yesterday took me to the rep cap before 9am this morning...
0
Q: Snowball data using jquery deferred

Wilfred KnievelI was wondering what the nicest way of doing this is: I've got two ajax requests the second request requires the results of the first. I was trying to find a nice way of getting both results into the doSomethingWithBothResults function. var getValue1 = function(){ return $.getJSON('/getVal1');...

better answer ;-)
 
Well, there goes any chance I have of getting accepted
Darn smart people!
 
sorry :-p
 
What does the $ before the d do?
 
@SomeKittens Makes it look fancy
 
1:24 PM
Disturb.
 
I'm not sure whether I prefer it with or without the $
 
I thought I was reading PHP for a second....
 
I might remove it
 
without
ugh
 
I removed it
 
1:26 PM
it's a horrible naming convention jQuery objects get cast to variables preceded by a $
what they write: var $elm = $(elmID);
what I read: var $HURRDURR = $(BLASPHEMY); // this is not PHP
ok upvoted you :P
 
I actually kind of like the $var naming convention. It makes it obvious when I'm dealing with crappy abstractions.
 
I try to use it for jQuery objects - I like it for that
unsure whether to extend that to jQuery deferred objects...
 
@Esailija pageX is better supported than clientX?
 
it's normalized by jQuery
jQuery normalizes the following properties for cross-browser consistency:

target
relatedTarget
pageX
pageY
which
metaKey
 
Ah
 
1:31 PM
it goes through a lot of trouble to calculate pageX, pageY, might as well use them :D
 
Of course. I should go through jQuery's docs sometimes
 
@Alnitak maybe you should read about naming conventions in JS? Like Crockford's one for example: javascript.crockford.com/code.html (Names section).
 
I only follow Crockford's advice when it relates to actual problems. I ignore most of what he says about style
since most of that is just dogma
 
is the semicolon debate "actual problems"? :p
 
I'll use semicolons where I damn well feel like it.
That's how I feel about that debate.
 
1:35 PM
oh, I'm with him on that one - I treat my JS as if it were C in that context
 
If you write code for yourself, then feel free to write it even obfuscated if you like. But any open-source code should follow all conventions.
 
style by definition is subjective, the semi colon debate is not a debate it is people using a syntactic error correction procedure to be hip
 
it's the rest of the subjective stuff I ignore
 
"follow all conventions" is impossible.
"follow a convention" is reasonable
 
I phrased it wrong
Follow all rules of the convention you picked.
 
1:36 PM
@RyanKinal That's probably just a typo.
 
my convention is to make my code readable
and not to follow every fascist little style dictate that doesn't help that
 
@RyanKinal convention 1: "put a space before () of a function declaration". convention 2: "don't put a space before () of a function declaration"
oh wai--!
 
I go with number two.
 
my convention is to first make my code work. second make it as maintainable as possible while not jeopardizing the first. Third to make it seem like it was much harder to produce than it actually was in the efforts to charge the client more.
 
lol @ third
 
1:38 PM
LOL too :)
 
Ok, but we were talking about the code in answer. It should be as readable as possible.
 
none of you can say you haven't done the same :P
 
whistles
 
@rlemon I'm pretty sure that's the only way good developers make money.
 
I want social media links on my page, "Well now, that will be quite an effort on my end... It will take me two weeks and cost you $1800.". hrm... seems fair
 
1:39 PM
heh
 
I mean, otherwise, they'd be all "shit, the code is finished... that will pay 20% of my rent for the month"
 
in PHP, 2 mins ago, by Neal
@Sisir wtf. there is a php jQuery now?
wtf
 
Where do you find all these guys man?
 
yea unfortunately that shit is like cancer... just keeps spreading everywhere you look.
 
Yeah
 
1:41 PM
Anyone wanna continue that discussion from before? LOL
 
hah, certainly not. :D
 
PramondD maybe
 
It's still open???
 
it's closed, but noone has been voting to delete....
 
so all closed questions don't need to be removed
sometimes the dumb need to be centred out and laughed at
 
1:42 PM
@rlemon This one does. it is waaaaaaaaaaay too localized.
 
Isn't "too localized" a close, rather than delete?
 
Shouldn't be. If he asks you to do his work then it surely should be deleted.
 
@SomeKittens It is a close, then delete :-P
 
the trouble with hitting the rep cap is that I have to pimp answers here to get enough upvotes to convince the OP that my answer is the one worth accepting ;-)
 
yeah I am guilty of that as well
 
1:48 PM
Noob DOM question, why would this page=document.getElementsByTagName('body')[0]; return undefined? Is it because I'm calling it in the head (even though I call the function with window.onload=function)?
 
:4560348
 
@Event_Horizon document.body
 
that doesn't work either
but it changes error message to "null" instead of "undefined"
 
Hey, guys. I have a question that I'm not sure how to phrase to get results in the SO search. I have an array of line segments ((x1, y1) and (x2, y2) that form a line) and need to check if they create a circuit. Or else, touch each other and form some kind of geometry where the start point eventually becomes the end point.
 
@Event_Horizon what's wrong with document.body ?
 
1:52 PM
@Alnitak theres nothing wrong with it, I can't append to the body either way I try
 
@Momotarutaru For a circuit, simply check if either the start or end points are the same as the other line's points
@Event_Horizon Does document.body return the body node?
 
it returns null
 
@Amaan So just recursively go through and check to see if a start or end point is the same as the line being checked and then check that against the initial starting segment (to get the circuit)? I think this makes sense, haha. Thank you.
 
@Event_Horizon that's weird, if you're really in a window.onload handler
 
1:59 PM
get rid of the () on the end of window.onload = create_canvas()
you're calling the function immediately
 
well that worked but I'm not sure why
 
instead of passing a reference to the function into the event
 

« first day (640 days earlier)      last day (4314 days later) »