Skip to main content

Home/ javascript/ Group items tagged comparation

Rss Feed Group items tagged

yc c

Regexp Syntax Summary - 0 views

  •  
    This table summarizes the meaning of various strings in different regexp syntaxes. It is intended as a quick reference, rather than a tutorial or specification. Please report any errors.
Javier Neira

fingernails in oatmeal, Metaprogramming: Ruby vs. Javascript - 0 views

  • drew['battleCry']();
  • What we want is the ability to define a method dynamically (given a name) that is also a closure over the lexical scope at the point of method definition.
  • color_name = 'black' Ninja.send(:define_method, 'color') do  puts "#{name}'s color is #{color_name}"end
  • ...5 more annotations...
  • var colorName = "black"; Ninja.prototype['color'] = function () {  puts(this.name + "'s color is " + colorName);}
  • The ubiquity of closures in Javascript is extremely powerful and, as we have seen so far, makes metaprogramming very easy.
  • You can think of a metaclass as a class definition specific to a single instance of a class.
  • This means we can add methods to an object’s metaclass without adding the same behavior to all instances of that object’s class.
  • This means that Javascript does not distinguish between classes/prototypes and instances and, therefore, we can add our desired behavior directly to the instance.
Javier Neira

Inheritance Patterns in JavaScript - 2 views

  •  
    This article discusses the advantages of the pseudoclassical pattern over the functional pattern. I argue that the pattern used by the Closure Library paired with the Closure Compiler removes existing hazards while I also examine the hazards introduced by the functional pattern (as defined in The Good Parts). First let me demonstrate what I mean by the functional pattern.
Javier Neira

Google Closure: How not to write JavaScript - 3 views

  • “It’s a JavaScript library written by Java developers who clearly don’t get JavaScript.”
  • Unfortunately, unlike the built-in properties supplied by Object.prototype, custom properties added to Object.prototype will show up as an object property in any for-in loop in the page.
  • custom properties added to
  • ...3 more annotations...
  • will show up as an object property in any
  • loop in the page.
  • var a = "I am a string!";   2 alert(typeof a); // Will output "string"   3 var b = new String("I am also a string!");   4 alert(typeof b); // Will output "object" 
Javier Neira

jQuery is a Monad « Important Shock - 1 views

  •  
    1. Monads aren't esoteric, abstruse computer science - they're useful. 2. You probably have used monads but just haven't realized it. 3. jQuery is awesome.
Hendrik Yeyosa

CATATAN - 0 views

TUGAS NABI & ROSUL http://jakartabeat.net/kolom/konten/tugas-nabi-menurut-qur-an http://contohdakwahislam.blogspot.com/2013/02/tugas-nabi-muhammad.html http://ardimbolong.blogspot.com/2012/10/a...

started by Hendrik Yeyosa on 17 Oct 14 no follow-up yet
1 - 8 of 8
Showing 20 items per page