Joined May 2011
·
Posted to
"Static" Methods and Properties in CoffeeScript
over 1 year
ago
@micapam: Look closely: notice the @
in front of the name of addWidget
? That means the function is actually a static member of the Widget
class. More importantly, this
in the context of a static method's body actually refers to the class itself!
An interesting note: In the context of an object's member function, @constructor
would actually be identical to Widget
based on how CoffeeScript implements classes. Try it!
Posted to
The single most useful thing in bash
over 1 year
ago
This is better than [CTRL]+[R].
Posted to
CSS's "transparent" may not be transparent, especially on diagonal borders
over 1 year
ago
I believe he was referring to this:
// The extra two characters are the alpha channel:
background-color: #EEEEEE00;
// Or...
background-color: #eee0;
Achievements
404 Karma
95,672 Total ProTip Views

Forked 20
Have an established project that's been forked at least 20 times

Lemmings 100
Write something great enough to have at least 100 watchers of the project

Forked
Have a project valued enough to be forked by someone else

Altruist
Increase developer well-being by sharing at least 20 open source projects

Epidexipteryx 3
Have at least three original repo where C++ is the dominant language

Epidexipteryx
Have at least one original repo where C++ is the dominant language

Kona
Have at least one original repo where CoffeeScript is the dominant language

Komodo Dragon
Have at least one original repo where Java is the dominant language

Charity
Fork and commit to someone's open source project in need

Raven
Have at least one original repo where some form of shell script is the dominant language

Honey Badger
Have at least one original Node.js-specific repo

Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
@pyros2097 -- nope, that will not work. In the constructor, the value of
@addWidget
is undefined, because no method calledaddWidget
is specified on theWidget
prototype; it is specified on theWidget
object itself; a "static" method.