« first day (724 days earlier)      last day (4447 days later) » 

00:03
It already exists isn't it?
01:02
@rlemon what have you done??
the universe is sure to implode now
01:20
http://tirania.org/blog/archive/2011/Feb-17.html
anyone wanna nitpick this with me?
 
2 hours later…
03:00
solve this: qJqaLmbiY2kvnTqbYz9lY3yfFKMWrz5CESS0
03:39
can no one solve that?
03:54
RT @shepazu: Announcing the alpha of our new community-driven documentation site for web development and design http://docs.webplatform.org (vi ...
0
Q: Critique and maybe answer a question on my card matching game.

Gowie47Here is the Card Matching Game. Threw this together for a web dev class I am taking at school and I thought I'd throw it up to see what criticism I could get on my javascript, design, whatever. Bonus points if you can tell me how I can fix the bug with users clicking to quickly and more than ...

04:36
cc
 
2 hours later…
06:37
@Raynos I don't know what to think cos I ain't that good at js... but I do get Could not load worker and DOMException on that page...
this is node I presume from the npm
06:54
@Raynos great idea. You're using document.write though aren't you?
@TomShreds you're not specifying connect-mongodb as the session store
07:47
@Raynos in 1st sample, remove " from // "function" and get free blank page!
08:18
Morning everyone!
Guys is there some way to delay hover effect for an element. So for example when I hover on of the elements in nvaigatio area in my app, then with CSS help a dropdown menu openes. I would like to delay dropdown menu openeing. Is it even possible?
add the class with hover effect after a delay?
@Eugene have a look at setTimeout and clearTimeout
and as Shyam already said, add a class to the menu-item after the timeout, which you can handle in your css
09:11
function parseRow(columns, parser) {
  var row = {};
  for (var i = 0; i < columns.length; i++) {
    row[columns[i].name] = parser.readColumnValue();
  }
}

// Turns out this can be made much faster by doing this:

var code = 'return {\n';

columns.forEach(function(column) {
  code += '"' + column.name + '":' + 'parser.readColumnValue(),\n';
});

code += '};\n';

var parseRow = new Function('columns', 'parser', code);
that's... interesting
is it faster to just load a file with some JSON in it?? lol
@FlorianMargaine I say that's mostly because of the string concatenation.
@OctavianDamiean there's no string concatenation
it just inlines the for loop
code += '"' + column.name + '":' + 'parser.readColumnValue(),\n';
What's this?
so the string concatenation makes it faster? :p
Wait a minute, which one's faster now?
09:33
the second :)
0
Q: Lua & Javascript documentation generation

TiddoI am in the beginning phase of create a mobile MMO with my team. The server software will be written in JavaScript using NodeJS, and the client software in Lua using Corona. We need a tool to auto-generate documentation for both the server-side and client-side code. Are there any tools which can...

the one with string concatenation
it says it's slower
it builds up the function's body by inlining the for loop and uses new Function to build the function
09:35
the new Function is kind of eval-like
I mean there's one small performance improvement for the first version but that won't make the difference.
columns.length is accessed in every iteration.
Which doesn't make sense.
However, like I said, that won't make the difference.
it tells me it's slower....
that doesn't matter much, it's usually cached by the engines
var generic_lookup_Enr_Rds_Section2009_selected = function(id, to_s) {
var section_value = $(".cross-reference-section-value");
var section_id = $(".cross-reference-section-value-id");
var section_clear_img = $(".cross-reference-section-clear-img");
section_id.val(id);
section_value.text(to_s);
section_value.css('display', 'inline');
section_clear_img.css('display', 'inline');
$(section_clear_img).on('click', function() {
section_value.text('')
section_id.val('')
section_clear_img.css('display', 'none');
@FlorianMargaine It is nowadays?
09:37
I think so
let's try it out
@OctavianDamiean looks like it's still better to cache it jsperf.com/looping-with-length-cached-fixed/3
304ops/s vs 309ops/s...
posted on October 09, 2012

Yesterday W3C announced the new webplatform.org initiative of W3C and several browser vendors. I’d like to add something: I’m going to be involved. The idea behind webplatform.org is to create one resource with all the browser and standard compatibility information you need. Microsoft is going to contribute the IE parts of MSDN, Mozilla MDN, Opera WSC, Google HTML5Rocks, and

Hi Florian.. Can u help me?
Yea, well like I said, that won't make the difference. :D
09:52
I want to do a js library that allows you to use defmacro, to allow metaprogramming in js
it should use new Function
10:31
Now that looks like a tasty piece of windows
10:49
Could anybody help me?
@ThiefMaster I really want to eat that
I have a cancel button with class of '.cancel_button'. I want to hide a div of '#main_content' when i click the '.cancel_button'.
@Vinay bind event-handler to the cancel-button, set the style of #main_content to 'display: none' when it gets fired
or add a class that hides it, i prefer that way personally
Thanks @G
$('#cancel_button').click( function() {
$('#main_content').hide()
});
$('.newlink').click( function() {
$('#main_content').slide('slow')
});
its working. But when i click the '.newlink' again, the content not showing
@andrewjackson Be careful.. may cause you to spout gibberish and crash while driving.
11:06
@Neil it has weed in it?
@andrewjackson I think it's less pleasant than weed
can't tell if knocking windows or the candy
12:01
0
Q: creating a simulation game, where to start?

JordanI am a beginner in game development. As a part of learning and fun, want to create a game in java-script and html5. I am planning a game that we were used to play in childhood, that is "new business"- a monopoly game, in that we used to buy ,rent,sell places and bank we get some money to play and...

how'd you check if the value of a variable is null and execute a addListener for click if it is not null?
if (typeof locationMarker !== null) {
		google.maps.event.addListener(kmlMarkers, 'click', function (kmlEvent) {
			var endPt = kmlEvent.featureData.description;
			calcRoute(locationMarker, endPt);
		});
		directionsDisplay.setMap(map);
	}
tried ^this but it executes the addListener when the value of locationMarker is null... I check locationMarker's value using console.log... gives me null
@ShyamK You can't declare the function to execute on click only when locationMarker isn't null
What you can do is check if locationMarker is null inside the function prior to doing anything with it
@Neil facepalm crap... why didn't I think of that...
@Neil didn't know that though... thanks... will keep that in mind...
then how can you do selective function calls?
@ShyamK What do you mean selective function calls?
hello @ShyamK
12:15
hey @Abhishek
whats up mate ?
@Abhishek playing around with KML in Googlemaps... trying to customize the infoWIndows also...
fun :D
@Neil if (true) { ... } else { ... }
the new nightly is so stable with css :D i love it
top three words with f -> F*** , Facebook and i guess 3rd will be firefox soon ;-)
12:18
@ShyamK I still don't understand I'm afraid. The pattern is that the events happen and have no conditions. You yourself decides to do something on those events
@Abhishek FF runs real slow on my system... so I stick to Chrome...
ff runs fast on my i5 & i guess my new mbp would be no different
like a fuckin' BAUCE!
@Neil hehe... I mean something like, say a particular id exists you add some class (just a simple-ish example) else you don't add the class
@Abhishek faster than Chrome?
12:22
they run the same
firefox starts in ages but once starts its a beauty
@ShyamK var obj = document.getElementById('obj'); if(obj !== null) { /* stuff */ }
@OctavianDamiean best website ever!
@Neil yes... that I know... was just stating it for you to understand what I meant by 'selective function calls'
@ShyamK Oh ok, sorry.
They're attempting to do "rocket man" live
12:25
Attempting to get a man to free fall faster than the speed of sound
and you've heard of this today for the first time?
i can't even hear it anymore
austrian news were full of this the last couple of weeks/months
@Neil if(obj !== null) { /* stuff */ } <- in this case could you place couple of method calls like if(obj !== null) { runThis(); } else { runSomethingElse();}
@ThiefMaster yum yum
@ShyamK Yes, I'm afraid I still don't get your point though
@Neil you could right? so then what difference is adding a listener? it is a method call anyhow, right?
12:29
@ShyamK When the code gets executed to add a listener, the event isn't happening
So you could check the state of locationMarker, but it may change in the meantime
If you have reason to think locationMarker won't change, that's fine, but it isn't best practice because such things have a tendency to change
locationMarker is null b4 the listener is added... so I'm wondering why the if is executing... its not supposed to
@GNi33 LOL
@ShyamK Why shouldn't it be executing? Did you put it in a if(false) { } clause?
if (typeof locationMarker !== null) { does mean if (false) right? especially since console.log(locationMarker) gives null
12:39
@ShyamK typeof a variable returns a string
@GNi33 HUMPF
It never returns null
I think it returns "null" string, actually, if locationMarker is null
You probably mean to write if (locationMarker) {
Note that it still wouldn't be === "null" unless you specifically set it to null
RT @mathias: What’s new in Firefox 16 (released today) for web developers: http://mths.be/bjr
@rlemon But yeah... " Ha Gaaaaaaaaaaaaaaaaaaaaaaaaaay " is more than appropriate.
12:40
@Neil tried that too... the code still executed...
@AmaanCheval i do set it to null
@dievardump o_O
@ShyamK Then === "null" should work
@AmaanCheval Really?
Well, it would be "object" now
12:42
@rlemon lol.
That should be false if locationMarker is null
We're sure it isn't the string null?
Damn, ES6 will have null as a type, right?
@ShyamK Set it to undefined instead of null. null comes out as an Object now
@dievardump this seems like something you would want a dedicated device for and not want to double up as your toothbrush
@AmaanCheval Whut?
console.log(null);
null
15.0.1 -» Firefox est à jour
LIES! ALL LIES!
12:44
@OctavianDamiean typeof null
@rlemon It looks like a good tool.
I know some guys who could try it for their own purpose, though.
@dievardump ?????????????????????????????????????????????????????????????
@Abhishek Feed Answer, sorry
12:45
The next firefox devtools will kill them all
Firebug is already >
But the 2built-in" will be awesome
likabauce
how to find jquery event complete?
@AmaanCheval That's well interesting.
I'd completely forgotten about that
12:48
!!/jquery complete
Which makes sense.
in all case typeof undefined === 'undefined'
That's all you have to know.
@AmaanCheval thanks...
12:50
@Abhishek did you check the " cat face recognition " on the new w3c webplatform portail?
@rlemon This is one of the only GIFs I'll ever save
aargh now it doesn't set the listener... I've most probably made some stupid error somewhere
@dievardump That wasn't exclusive to the WebPlatform
Was on HN a while ago
@ShyamK Can you put the code in a jsfiddle and show us?
12:52
@dievardump noo
which portail ?
0
Q: How can I implement a Epub Reader in Javascript

Vlad NiculaI'm wondering if I can create a epub reader in javascript. The basic requirements would be: 1) Server parts of the epub reader from a server API. 2) Read the EPUB data in javascript. 3) Render it on page. 4) Provide some extra functionality, like text highlights or page notes. I have no inform...

hello
Q: i want to edit .axd javascript function.
@Neil google maps didn't work on jsfiddle... don't know why... no API key maybe...
Is it possible ?
or can i know the actual location of that .sxd file ?
i want to edit it
12:54
@ShyamK Can you adapt this? jsfiddle.net/pborreli/X5r8r
but I can not find the tutorial
If it's not too much trouble anyway.
@Neil why doesn't anything work for me... I shall try...
@ShyamK I can't promise I can fix your problem, but I'll take a look
no worries...
@AmaanCheval then wait for my next one (just needs the right usage)
13
A: What does three semicolons in a javascript expression do?

el.pescadoThey can be used to format silly-looking code, for example: ;; ;; ;;;;; ;; ;; ;;;;; ;; ;; ;; ;; ;; ;; ;; ;;;;;; ;;;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;;;;; ;;;;; ;;;;; ;;;;;

nice answer!
@ShyamK my guess is the resources are not being properly included.
16
A: What does three semicolons in a javascript expression do?

Joey AdamsIt makes people ask questions on StackOverflow. Other than that, it does nothing.

So many great answers on that one
@rlemon what do you mean?
13:04
now if you all had Killit you could enjoy these gifs for a period of time then Kill It!
Unless your name is Raynos.
@rlemon I do :x
but the troll's head is ugly, so I reload after using it
13:09
so change the script
@rlemon Is that the GIF that was supposed to be awesome?
no but this one is
I luled so hard when I saw it
too bad this isn't reddit or the upvote would make more sense.
i.sstatic.net/yGqM5.gif (because you know there will be some pissant who feels the need to flag this gem)
You know we up vote things on SO too :p
but we star on the chat
I'd up(-vote) her. Definitely.
13:11
It's more like a Reddit specific GIF too
no need for the caption below
if they don't get it, they don't deserve the lul
@rlemon That shirt is epic
var Question = 2B || !2B;
also quite fun
I've been writing too much JS and PHP lately. my C# is so rusty.
that and VS2012 is like a whole new monster
@FlorianMargaine instead of wondering how funny some answers are , you could add your vote to close the duplicate
13:29
@tereško I don't feel like being a nice SO citizen today
the effort must be monumental
totally!
close voted btw :)
57 mins ago, by Amaan Cheval
JavaScript will be getting GOTO? http://brendaneich.github.com/Strange-Loop-2012/#/29
The today's presentation sounds not bad. Should I go? :o
13:34
@dievardump i think i know one of the creator of that website :-/
@Abhishek well it's the W3C, with Google, Nokia, Mozilla, Microsoft & all
true :P
(xD)
anways mate i am totally into middle of some ser1ous code
so cant talk much
What does it look like?
> Maximally Minimal Classes
with extends, and the use of super.() ?
lol.
:o
Default parameters! <333
Default parameters have been on their plan for quite a while
Along with let and WeakMaps
But yeah, default parameters will be such a great addition
What's to explain?
Holy shit! If half of the content of that presentation gets implemented it is going to be epic.
Rest parameters
Like arguments
But it's sliced to wherever you put it
@OctavianDamiean heh, js is being driven towards lisp
Does not looks like arguments
13:40
Well, it's an array
does not look like anything
js> function f(a, b, ...r) {
  print(Array.isArray(r));
  return r.concat(a, b);
}
js> f(1, 2)
true
[1, 2]
r in this case is an array containing nothing
it's an array
not nothing that's what I can not understand
an empty array :-)
An array containing nothing
That's what I meant
13:41
Wait a minute, what do we need Maps for?
@OctavianDamiean finding bars/pub?
seriously... does anyone ever find themselves writing code for "future" features you haven't even thought up? "Well... I could write it this way and be done with it in ten minutes... or I could make it uber expandable and write 1000 lines of super convoluted code that will make this one class work for every conceivable case."
Yea, right those Maps are indeed helpful. I mean a collection though. :D
@rlemon Sometimes
@AmaanCheval ok I think I understand. but r (or whatever the name we give it) has to be declared using ...varName right?
Or it's the latest argument ?
13:43
I need to stop myself from doing this ohhh tooo often
You should overdo that though.
I mean "..." must be in the declaration name?
> WeakMap, not LeakMap
likes the title
Yes, it should
13:44
Ok
Otherwise it'd just be the last argument
Not an array of all the arguments after
"write a simple XML parser to parse this specific config file..."
or
"write the One Ultimate XML Parser class that will parse the shit outta anything in any format following any schema imaginable..."
You kiddehng!?
> Low-Level JavaScript
Just pointers, right?
13:47
@OctavianDamiean old
it's more than 6 months old
@rlemon MUST.HAVE.THIS!!!!
and @OctavianDamiean Maps allow you to have objects as keys
:o
Didn't think of that possibility yet.
Holy shit!
isn't 'defineProperty ' in IE8 broken ?
13:51
@GNi33 that is the JS version.
thinkgeek.com sold these for a while
@RemcoRos it is, es6-shim relies on es5-shim for older browsers support :p
and even with that, it still doesn't work on IE8
ah :D ok. so es5 shim defines a new one for IE8 which works on non-dom elements?
I see it now in es5-sham
13:56
// 0 === -0, but they are not identical.
heh.
room topic changed to JavaScript: function isNaN(a) { return a !== a; } [javascript]
@OctavianDamiean refactoring to its best! :D
trunc?
looks like it removes the figures after the dot
@FlorianMargaine Yeah, truncates
13:59
I don't see the point
there is already parseInt

« first day (724 days earlier)      last day (4447 days later) »