Today we're going to tell a story using Markdown. It will be populated with a lot of links to things (also known as points of interest). This story will tell the journey that you are undertaking as it happens.
This file contains 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 app = app || {}; | |
app.getRequest = { | |
type: 'get', | |
url: 'http://ga-chicago.github.io/project1/data.json', | |
dataType: 'json', | |
success: function(data) { | |
console.log(data); | |
}, | |
error: function(error) { |
This file contains 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
// http://stackoverflow.com/questions/20679135/convert-xml-to-jsonobject-using-javascript-jquery | |
// Changes XML to JSON | |
function xmlToJson(xml) { | |
// Create the return object | |
var obj = {}; | |
if (xml.nodeType == 1) { // element | |
// do attributes | |
if (xml.attributes.length > 0) { |
This file contains 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
module Testing | |
def about_self? | |
"(\##{self.object_id}): #{self.to_s}" | |
end | |
end | |
class Foo |
This file contains 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 woot = woot || {}; | |
woot.log = function(key) { | |
console.log(key); | |
} | |
// mimics Collection.each | |
// http://underscorejs.org/#each | |
// args: | |
// _.each(list, iteratee, [context]) | |
_.each(['Aldrin', 'Armstrong', 'Grissom', 'Hadfield'], woot.log); |
This file contains 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
<section> | |
<h2>Thanks for visiting!</h2> | |
<p class='stuff'> | |
</p> | |
</section> |
- Visit http://exoplanetarchive.ipac.caltech.edu/cgi-bin/TblView/nph-tblView?app=ExoTbls&config=planets
- Select only Planet Mass/Planet M*sin(i) (both are Jupiter Planet Mass)
- 'Download Table' => Download selected records and columns
- Use http://www.convertcsv.com/csv-to-json.htm to conver to JSON
- Inspect using Node; copy/paste to a variable assignment (ex: var epd = .. then copypaste)
- Check length -
epd.length
- Inspect data source
- Each object in the JSON array is structured to display the planet number
This file contains 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 sms = sms || {}; | |
var active = active || {}; | |
sms.model = Backbone.Model.extend({ | |
initialize: function() { | |
} | |
}); | |
sms.collection = Backbone.Collection.extend({ | |
initialize: function() { |
This file contains 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 app = app || {}; | |
var active = active || {}; | |
//blueprints | |
app.model = Backbone.Model.extend(); | |
app.collection = Backbone.Collection.extend({ | |
model: app.model, | |
url: '/api/people' // path to your API | |
}); | |
app.modelView = Backbone.View.extend({ |