« first day (111 days earlier)      last day (4838 days later) » 

12:00 AM
@david I'll see what I can do.
 
ah ok, man i saw the biggest anomoly on the Queensland news weather. It was the size of the cycleone and perfect radar ring. The weather guys dissmiss them as very strange but never seen before radar anomolys.
 
@jonnypixel you might try pinging the web server and looking for dropping packets, or reloading one image or CSS file a number of times and collecting statistics of how often it fails.
 
@nathan queensland has just been battered with floods and cyclones and they may have a simialr haarp facility in military base called pinegap
@nathan ok
@nathan how do i collect staistics?
 
Yeah, I've heard conspiracy theories about ours before but I'm not convinced.
@jonnypixel you could write down fails vs. wins and keep score?
or ping will give you stats
 
@nathan ok
@nathan it keeps sending 4packets and returns zero lost, is there anyway of pinging for longer?
 
12:06 AM
uh, Windows ping has a flag for that....
ping -t
 
Ab
@Nathan No, its a html5 canvas
stuff that i've been trying to do
 
@nathan i have done ping -t and its like up to a hundred but none have failed so far
 
@jonnypixel OK, that's a good sign. Try the manual reload scorekeeping version?
 
@nathan it also does the same images missing thing in phpmyadmin, could it be the hosts servers both web and mysql?
 
are the images's src all from the same hostname?
 
12:13 AM
@nathan i'll check that
@nathan Oh!, in FF when i view image i get the path to the image as an IP address but the domain is loading in the prowser address bar. Also have an ip address for the mysql at the start of the url
@nathan this is weird, some src images have an IP addres for the url and others have the domain name
 
@jonnypixel You must be on the right track.
 
@nathan yes, except the appearnce of the images is random. Sometimes its the domain url and other times the IP url thats disaapearing
 
@jonnypixel it's probably the haarp.
 
@nathan LOL i did think they may have been listening in on my conspoiracy theory talks with my wife
@nathan its gotta be zone edit. I would love to test this site on my domain. I think i'll copy it over to see if it still occurs, and if not i'll show the client that way.
 
yc
12:40 AM
Just wanted to thank the room for helping me with the selector performance issue. Not only did the Accepted poster accept my critiques by editing the answer, but s/he then proceeded to correct the post s/he cited, which the OP of that question then accepted. A good win for fact-based assertions :)
15
Q: Elegant way to get this: $($(".answer")[0])

ming yeowSuppose I want to get the first element amongst all the elements of the class ".answer" $($(".answer")[0]) I can do the above, but it looks really ugly. What can I do instead?

 
@nathan thanks for your time all the way from alaska, i better sign off now and keep working beofr ehaarp disrupts my internet as well
 
OK, good luck @jonnypixel
@yc good for you. Also a win for good future googleable answers at SO. I'm enraged these days when I get search results from spam like Experts Exchange instead of SO.
 
yc
@Nathan totally, and its even more frustrating if the topic result is from SO and its incorrect.
 
@yc you are right. This is the important thing
@Nathan experts exchange makes me rage. So does w3schools
 
lol
 
12:54 AM
and various java & .net forums
 
EE used to be good
 
and PHPBBs
 
i love expert sex change!
 
very good actually
 
I think they should have www.google.com/subset/
Where you can define a supset
subset* of the internet you care about
 
12:54 AM
lol
 
"Hi, Google? NEVER SHOW ME THESE SITES AGAIN. EVER."
 
nice
 
Maybe a universal disjoint
 
k thnx bai
 
universal / not_these
 
yc
1:44 AM
@Raynos I'm sure you've seen this then: w3fools.com
 
@yc It was pinned for a few days here I think
 
yc
@YiJiang I figured, its been making the rounds for the past few days. I think it should be a rule: If someone cites w3schools, link to w3fools as a warning.
 
or stab them in the eye
i wish you got rep for voted comments
1
A: Prevent declaring variables without var

Larry KJavascript will automatically declare new variables that don't have the var keyword. See, for example: http://www.w3schools.com/js/js_variables.asp What problem are you trying to solve? In other words, the title of this question isn't really right--I think you want to catch incorrect reference...

 
yc
@david There is a badge for having 10 comments with +5 or more.
It's hard to tell people w3schools sucks without hurting their feelings, as evidenced here:
-1
A: HTML5 Semantics - H1 or H2 for ARTICLE titles in a SECTION

Keith GrobenThe official w3schools answer to the use of heading tags on a page is as follows: H1 headings should be used as main headings, followed by H2 headings, then the less important H3 headings, and so on.

 
ahaha "official w3schools answer"
 
yc
1:57 AM
@david wow, I clicked through to that w3schools answer. I still cannot believe that they claim var x= 5 has the exact same effect as x=5. Mindboggling.
 
yeep
oh shit who starred my sex change comment?
 
@david Sorry :)
 
ahahah damnit
 
at one point I remember, my corporate proxy blocked that site because of the URL.
 
lol, i still think they chose it intentionally
 
2:00 AM
anyway, gotta go; my daughter is about to rock her viola recital tonight.
 
need 125 rep to downvote that >_<
0
A: Prevent declaring variables without var

Larry KJavascript will automatically declare new variables that don't have the var keyword. See, for example: Variables What problem are you trying to solve? In other words, the title of this question isn't really right--I think you want to catch incorrect references, "Prevent declaring variables wit...

Fixed :)
 
yc
Question: If I'm the only one who edits my post, can I trigger Community Wiki mode by editing too many times?
 
@yc Yes, 10 times
 
2:25 AM
@yc if someone else edits your post, 5 edits will trigger the community wiki
more love for underscore.js
 
2:50 AM
As far as I can tell there isn't one, but the ambiguity can lead to confusion, so JSLint appears to have picked one to try and encourage uniformity...
 
I just noted that we can use new function() { } instead of (function() { }())
 
errr... can you?
 
yes. the former also creates a closure. The latter is more powerful tbh as you can pass paramaters in and handle the return values
 
errr.... they are very very different
the second creates a closure, the first doesn't
 
@david they are. The first creates a closure. It runs immediatly
 
2:54 AM
the first creates an object, inside this is the object, in the second this refers to the global object, as it should
no, the first doesn't create a closure
 
@david that has nothing to do with closures
 
i didn't say it did, it has to do with the first creating an object
 
@david it still runs the anoymous function
 
it's a constructor, you're running the constructor and getting an object back
in the second you're executing the function
 
so? the constructor is a function
you're executing the function vs you're executing the constructor (which is a function)
you can ignore the object you get back and the this scope
 
2:56 AM
they are compleeeetly different
 
yes. But there still both closures.
 
no they're not
infact, neither of them form closures, unless you do things inside them
 
a self executing function is a closure. A closure is not a self executing function
@david stop being pedanticc
 
a self executing function is not a closure :S there is nothing pedantic about it
is a normal function a closure? how is executing a normal function different from executing an anonymous function?
 
new function() {
     var foo = 4;
     window.f = function() { alert(foo); };
}

(function() {
     var foo = 4;
     window.f = function() { alert(foo); };
}())
"When used in the above context both act as a closure"
 
2:59 AM
now you're forming a closure, because you're returning a function that accesses internal variables
 
yc
@Raynos use of the word 'new' makes me nervous :-/
 
@yc what's wrong with new Object or new Array or new SomeConstructor ?
@david I know what I'm talking about. There both valid as closures.
 
new is fine, it just causes the function to be used as a constructor
I think you're misunderstanding what a closure is... It has nothing to do with either of those constructs
 
@david I know exactly what a closure is. It's allowing local variables to be publicly accessible through some form of wrapper after the function execution has ended. Your persisting the local state of the closure function
funtion() {
    var foo = { "foobaz": 5 };
    window.bar = foo;
}
The above also forms a closure.
 
that's a good definition, but i'm still not convinced you understand it
it doesnt actually, until you run it
 
3:03 AM
I meant closure in the context of the standard inofmraiton hiding pattern
@david of course you have to run it
You keep being pedantic :p
In computer science, a closure is a first-class function with free variables that are bound in the lexical environment. Such a function is said to be "closed over" its free variables. A closure is defined within the scope of its free variables, and the extent of those variables is at least as long as the lifetime of the closure itself. The explicit use of closures is associated with functional programming and with languages such as ML and Lisp. Closures are used to implement continuation passing style, and in this manner, hide state. Constructs such as objects and control structures can ...
 
wait what, that doesn't even create a closure if you run it ><
 
@david of course it does. Your persisting the state of the local variable foo.
 
no you're not, you're copying '5' into window.bar
 
@david Ok i changed it so it's something that passed by reference instead of passed by value -.-
 
><
it still doesn't create a closure
var f = function() {
    var foo = { "foobaz": 5 };
    window.bar = foo;
    foo = { "foobaz": 7 };
};

f();

alert(window.bar["foobaz"]);
that will alert 5, not 7
 
3:06 AM
@david thats because your overwriting foo -.-
do foo.foobaz = 7
 
gyar... you're not getting it, hold on
 
But yes your write it passes by reference to the data not the local variable.
It's not a closure
 
this is a closure:
var f = function() {
    var foo = { "foobaz": 5 };
    window.bar = function(){return foo};
    foo = { "foobaz": 7 };
};

f();

alert(window.bar()["foobaz"]);
it will alert 7
 
I get the difference now. It was a poor example
 
back to the original topic... don't use new function(){}... it's crazy
 
3:08 AM
@david anonymous constructors are awesome :D. classic singleton :p because there's only one constructor
 
they're completely pointless, just use an object literal
 
@david can't reference this nicely inside nested object literals. Nor can they be used to create closures
 
if you want to create a closure, just use the module pattern
ahah, jslint: "Problem at line 1 character 9: Weird construction. Delete 'new'.
var x = new function() {"
 
"new function(){}" would just call [[Construct]] of the function object created by the FunctionExpression.
 
@gsnedders compiler talk!
@david JSLint is pedantic.
 
3:15 AM
Bah, I'm just referring to what the things are called in the spec!
 
var o = (new function() { this.o = 4; }, new function() { this.o = 5 });
2
:D
I should use more code like that. It's hidieous
 
are the first and last brackets meant to be curly braces?
you're also calling the constructor wrong, you need () after the anonymous function
(which means you can pass things in, if you really wanted to)
 
@Raynos Is it bad I always have to look up the exact semantics of the comma operator?
@Raynos So that's the same as var o = {o: 5}, right?
Yeah, it is.
 
i'm pretty sure it's a typo, and it's meant to have curly braces
 
If it had curly braces it's be a syntax error
 
3:22 AM
why? it's just creating a nested object
 
hello
 
hmm, okay that doesn't work
hello
 
@david What are the property names, then?
 
you can't created nested objects that way, so i have no idea what he is trying to do
 
@david NewExpression doesn't need arguments
 
3:24 AM
but they should still have parentheses
 
It's just a confusing way of writing var o = {o: 5}; :P
@david That's a matter of style.
 
i'm pretty sure it was meant to be more than just a confusing way of writing that
 
you can do more with the variable
 
and... yeah i guess it's a matter of style
good style vs bad style >.>
 
I usually try to keep the code at its most complex and smallest
 
3:26 AM
From the context I'm pretty sure @Raynos knew what it did and why, and was deliberately just being confusing :P
 
how about if(a<b<c)
that wouldn't work
but would be nice
 
@gsnedders I'm pretty sure he didn't, and instead meant to write something like:
var o = {a:new function() { this.o = 4; }, b:new function() { this.o = 5; }};
 
@david Which results in var o ={a:{o:4}, b:{o:5}};
 
indeed it does
 
yc
@Raynos use of the word new for Array, Function, String, or RegExp creates typeof weirdness that makes me nervous. If I have an array, I want the type to always be array, and not Object.
 
3:42 AM
it's not weirdness, there are object wrappers for all the primitive types
 
yc
@david I get that, but they're slower than the primitive types (at least in the browser environment) and are more difficult to code for.
 
which is why the convention is to avoid them, yeah
that doesn't mean you can't use new though
 
I still don't get what people think is weird about typeof, except for null.
 
yc
@david never said you shouldn't; i just said it makes me nervous because of complications they can cause. Something making me nervous is the way I adopt a convention :)
 
ahaha, okay then :)
 
yc
3:45 AM
@gsnedders typeof NaN is pretty weird :P
 
@yc From the POV of Number just being any IEEE754 double it makes senes
 
yc
JavaScript is saying 'The type of "Not a Number" is "Number" ' .
@gsnedders Not saying there isn't a rationalization, I'm just saying it meets my definition of weird.
 
it's still a number
lol what else type would it be?
 
a duck
 
XD
 
4:06 AM
How do I get a message starred?
 
I didn't know one can rewrite NaN
a message?
 
The badge section says that messages on chat can get starred. I am new and wonder how thi s works?
*this
 
yes, hover over a message that's not yours, and there is a arrow at the left, and a menu if you click it with an option that says star message
just post something cool
3
 
Ah. K. Cheers.
 
NaN = "this is not a number"
typeof(NaN) == "string"
lol
 
4:12 AM
home time! catch you all later
 
yc
@JCOC611 nice! `undefined=123; typeof(undefined)=="number"; //true;
 
cool
however, null = "something" doesn't work
I just imagined: NaN + undefined = "hello world" XD
 
Can't sleep ><
 
yc
@IvoWetzel still nervous about the interview?
 
I can't either but I'll force myself, gtg
 
4:24 AM
yes, it's 5:30 am here... and I don't want to sleep just 4 hours or so
so what do I do? I start some new HTML/JS Engine project!
 
yc
@IvoWetzel Good way to occupy the mind!
@IvoWetzel about to run too, good luck
 
@yc thanks
 
Hey @IvoWetzel one thing I was thinking, if the interview goes great (which im sure it will) at some point you should find out if you will be restricted in your open source/personal projects
I know alot of jobs here have clauses about that sort of thing, but I assume Germany is totally different
anyway im off to bed, good luck again
 
@Loktar Thanks, indeed a good think to ask for :) Good night
 
 
1 hour later…
6:01 AM
Hi, I'm having some trouble with HTML 5 audio not working in Chrome. It used to work but now it gets stuck on Pending
it's not just limited to that, i have another example of it not working when calling an external website. stops on Pending
 
 
2 hours later…
8:07 AM
lets say I want to make a framework within JS
oh geez... my message got sent to early
... I thought since the input box was multiline that It would handle me pushing enter
...
you know what I don't think chat is great for this question anyways.
 
9:00 AM
You can make multiline on chat
 
 
1 hour later…
10:11 AM
how do I neatly handle the
for each ( x in obj ) {
     doSomethingWith(x);
     if (last in obj) doSomethingDifferent(x);
}
 
yc
10:27 AM
@Raynos what about caching the final value of x and doing it once the loop is done?
var cache;
for each ( x in obj ) {
     doSomethingWith(x);
     cache = x;
}
    doSomethingDifferent(cache);
@Raynos Doesn't meet 'neat' condition though :-/
 
@yc I realied I wanted to use string.join.
i.e. array -> csv, don't append a comma, just do string.join
 
yc
@Raynos makes sense, and is probably more efficient. I've written silly "remove the final comma" code before realizing join is the method I'm looking for.
 
10:52 AM
@yc alternative map-reduce
_.reduce(array, function(memo, val) {
     return memo + ", " + val;
}, array.shift());
 
11:09 AM
public static int BoolToSqlBitFieldValue(bool TheBool)
		{
			return TheBool ? 1 : 0;
		}
Oh man! Real enterprise code.
 
...
 
, BoolToSqlBitFieldValue(BooleanValue1), BoolToSqlBitFieldValue(BooleanValue2), BoolToSqlBitFieldValue(BooleanValue3), BoolToSqlBitFieldValue(BooleanValue4), BoolToSqlBitFieldValue(BooleanValue5), BoolToSqlBitFieldValue(BooleanValue6).....
Actually those numbers should be written out
can't it be 2pm already...
 
I bet your phone call is @ 2pm.
 
Right after my heart attack >_>
I probably shouldn't be that nervous
I mean he never used Mr. Wetzel in the Mails so far... just Ivo.
> Hi All, I AM TRYING TO ADD 1 TO MY JAVASCRIPT VARIABLE. BUT IT IS GIVING ERROR.
I love it when questioners shout at you
0
Q: how to add numarical values to javascript variable?

sriramjitendraHi everyone, I'm trying to add 1 to my JavaScript variable, but the following code is giving me an error: var val1 = document.getElementById('<%= rng1.ClientID %>'); var val2 = val1.value + "1"; alert(val2.value); How can I do this?

 
@IvoWetzel OH GOD, OH GOD, HOW CAN I HAZ +1!!??
 
11:22 AM
fixed... so... who wants to edit in the error message?
@YiJiang Noes! You can not haz da +1!!!!?!?
 
@IvoWetzel NOOOOOOOOOOOOOOO....!!!
 
@yc when they do it wrong fix it for them
 
Why does everyone and their mom wants to edit tag wikis?
Especially when they just want to add one, single, line
> 7z - A file archiver with highest compression ratio
 
@IvoWetzel Because it gives you a cool +2 dude. Oh, and a badge. Never forget the shiny badge
@IvoWetzel I've seen worse, hrm...
 
I can haz badge for that?!?!
 
yc
11:26 AM
@Raynos I feel weird changing the substance of someone's answer rather than just editing for clarity, spelling, and grammar.
 
@IvoWetzel Yes you can, did you get one for the node.js tag wiki?
 
ah that bronze one?
 
stackoverflow.com/edit-suggestions/2014 - basically, filled out the wiki with advertisment, and the worse thing is that two 20k'ers actually approved it >_<
 
>_>
hold on
:kitten rchern
 
11:28 AM
@IvoWetzel Dan already filed another edit for the thing to be wiped out, and it was approved
 
0
Q: how to add numarical values to javascript variable?

sriramjitendraHi everyone, I'm trying to add 1 to my JavaScript variable, but the following code is giving me an error: var val1 = document.getElementById('<%= rng1.ClientID %>'); var val2 = val1.value + "1"; alert(val2.value); How can I do this?

may I downvote all the parseInt answers?
 
So basically nothing changed except two users got +4 reps, /facepalm
 
SO at its best
 
@IvoWetzel Well, they aren't wrong per se, just that + is shorter
0
A: how to add numarical values to javascript variable?

ShrinathDude, you should use parseInt var val1 = parseInt(document.getElementById('<%= rng1.ClientID %>')); var val2 = val1 + 1; alert(val2);

 
!
That's wrong
 
11:31 AM
Dude, you should totally... gosh, ack...
 
he should use parseInt($('<%= rng1.ClientID %>'))!
 
@IvoWetzel Just... drop the + answer already so that you can get your daily quota of free reps
 
posted
now gimme da ups
lol just got the enlightenment badge for the first time, for a 2 month old answer
10k and you get some random up votes every day
 
11:54 AM
How far did it come... I'm posting answers to jQuery questions
 
yc
@IvoWetzel that was me :) Good, thorough answer as I was researching coffee script.
 
wooooh that's what I call an "edit"
> How to create the shortcut(any exe) on desktop using API
Comment: Corrected spelling
yay!
a German SO rip-off
time for a really hot shower...
 
12:21 PM
stupid mouse, stop scrolling like crazy
that's the last thing I need now -.-
 
12:46 PM
I'm dying here >_>
 
Stop then
 
I'm trying
 
Not enough
 
dang you got me :(
 
-5
Q: how to write a code in html and javascript to find memory usage in multiple processors connected in a network?

prakrutipls reply.....i need javascript code to find RAM usage in multiple processors....

lol.
 
1:01 PM
is crossing fingers for @IvoWetzel
 
has anybody here toyed with websockets?
I have a project in mind and it uses them.
 
1:24 PM
@Shikiryu Was a pretty relaxed conversation in German, on site interview next Thursday
then 2 more calls with some US guys (if the on site interview turns out well)
 
in german! good for you :)
 
we even were on first-name terms, did turn on quite well but I need to be more excited about the whole thing on site
 
@yc the adding of the 10 is similar to editing something because someone forgot to use var somewhere. It's a possibly typo / forgetten mistake.
 
@IvoWetzel Well, you'll be.
 
from what they told me the job sounds really really cool
 
1:34 PM
grats
was it technical at all?
the phone interview that is
 
nope, just some chatter about what they do, how they're are organized etc. we also talked a bit about my backgrounds
well I'm off to the grocery now
 
interesting
 
hm is it OK to use "Hi <firstname>" in an mail after it was already used in the phone interview?
 
@IvoWetzel "Hi" ? :/
 
Well "Hello"
 
1:41 PM
Hello
or Dear
 
He always writes "Hi Ivo"
 
And no, use the surname
 
Remember, they can be as informal as they would like. You still want to appear to show them the respect that they deserve
(italicized since they may or may not actually deserve it, but the appearance of such is what matters)
 
true.
I'd write "Dear Mr xxx,"
 
1:43 PM
Yeah, that's pretty good
 
Well it's in German now
I gonna use "Hallo Mr. xxx"
Hello Mr. xxx .... thank you again.... please excuse my excitement I greatly appreciate this chance... I'm looking forward to meet you and the team in person.... Sincerely
something like that ok?
Of course the German version is "smoother"
well I've sent it should be fine :)
 
2:00 PM
Hi! :)
@IvoWetzel LOOK what happened to the kitten! I've said :kitten rchern, and there was a Right-to-Left Override Unicode character after it…
in Sandbox, 58 secs ago, by Coding Kitten
Huh? What's a "rchern‮" supposed to be? If you can't type you should reconsider your profession, what about writing the next Harry Potter? Can't get any worse with that...
 
you broke it!
 
:kitten .‮
 
Hold on a second, googling that for you... ".‮ did you mean horrible typo?" There you go!
@Nyuszika7H but reading underscore.js :) I stick to check for '\r\n'
 
2:16 PM
@CodingKitten Make me happy
 
@YiJiang quirksmode supply.js ! always amused me... microsoft are the only ones who upvoted it?
 
2:53 PM
@CodingKitten Where can I find a jQuery plugin that does my work for me so I can slack on chat instead?
 
@badp your in the use of ==
 
@CodingKitten ?
 
@IvoWetzel how old are awesome enough to use ie6 i'd probably spend half an answer?
 

« first day (111 days earlier)      last day (4838 days later) »