This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p { | |
color: #000000; | |
font-size: 1.2px; | |
} | |
.important { | |
font-weight: bold; | |
} | |
#main { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> <!-- What 'schema' to use for the 'XML'. This means HTML5 --> | |
<html> | |
<head> | |
<title>My Page</title><!-- Shows in the browser, important for SEO (apparently :-) --> | |
</head> | |
<body> | |
<div>I'm a div, basically a box. I'm super useful.</div> | |
<p> | |
This is a paragraph, good for long strings of text. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- Metadata --> | |
</head> | |
<body> | |
<!-- Content --> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_update: function() { | |
//Kill old style | |
if (helpers.isDefAndNotNull(this.active)) { // <-- properly guarded here | |
this.active.el.removeClass('selected'); | |
this.active.active = false; | |
} | |
// Grab the new state | |
this.active = this.states[this.currentIdx]; | |
this.active.active = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
copy src\intro.js /B + src\core.js /B + src\tooltip.js /B temp1.js /B | |
copy src\models\*.js /B temp2.js /B | |
copy temp1.js /B + temp2.js /B + src\outro.js /B nv.d3.js /B | |
del temp1.js | |
del temp2.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "money" | |
class Decorator < BasicObject | |
undef_method :== | |
def initialize(component) | |
@component = component | |
end | |
def method_missing(name, *args, &block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleFileUpload: (e) -> | |
file = e.target.files[0] | |
reader = new FileReader(); | |
reader.onload = (e) => | |
@image = new Image() | |
@image.onload = @renderImage | |
@image.src = e.target.result | |
reader.readAsDataURL(file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MyView = Backbone.View.extend({ | |
initialize: function() { | |
this.render(); | |
//Two different update calls here, neither using .render() | |
this.model.on('change:first', this.updateFirst, this); | |
this.model.on('change:last', this.updateLast, this); | |
}, | |
render: function() { | |
//Puts el on page, called ONLY once, by init | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MyView = Backbone.View.extend({ | |
initialize: function() { | |
this.render(); | |
this.model.on('change', this.update, this); | |
}, | |
render: function() { | |
//Puts el on page, called ONLY once, by init | |
}, | |
update: function() { | |
this.$el.html( /* Some template */ ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MyView = Backbone.View.extend({ | |
initialize: function() { | |
//el inserted to the page on init, only called once | |
$('#content').append(this.el); | |
this.model.on('change', this.render, this); | |
}, | |