- Install node.js and MongoDB as per: http://mongoosejs.com/docs/index.html
- Type
npm install mongoose
- Type
npm install optimist
- Type
npm install -g coffee-script
var url = "http://eval.versionone.net/platformtest/rest-1.v1/Data/Story/1154"; | |
var headers = { Authorization: "Basic " + btoa("admin:admin"), Accept: "haljson" }; | |
var settings = { url: url, headers: headers, dataType: "json" }; | |
$.ajax(settings).done(function(data) { | |
beautifulJson = JSON.stringify(data, null, 4); | |
$("body").html("<pre>" + beautifulJson + "</pre>"); | |
}).fail(function(jqXHR) { | |
$("body").html(jqXHR.responseText); | |
}); |
body { | |
font-family: Helvetica, Verdana | |
} | |
p { | |
padding: 7px 10px; | |
} | |
#demo { | |
border: 1px solid #999; | |
} |
body { | |
padding: 5px; | |
font-family: sans-serif; | |
} | |
#editor { | |
padding: 10px; | |
border: 1px solid darkblue; | |
background: whitesmoke; | |
display: none; | |
margin-bottom: 15px; |
npm install mongoose
npm install optimist
npm install -g coffee-script
define(function(){ | |
function jsonClean(original) { | |
function processAsset(asset) { | |
var obj = { | |
"_links": { | |
"self": { | |
"href": asset.href, | |
"id": asset.id | |
} |
function jsonClean(original) { | |
function processAsset(asset) { | |
var obj = { | |
"_links": { | |
"self": { | |
"href": asset.href, | |
"id": asset.id | |
} | |
} | |
}; |
Calculator.prototype.add = function () { | |
var result = 0; | |
for (var i = 0, j = arguments.length; i < j; i++) { | |
result += parseFloat(arguments[i]); | |
} | |
return result; | |
}; |
<h2>Details</h2> | |
<p><a href='{{support.href}}'>{{support.title}}</a></p> | |
<p><b>Cost:</b> {{cost}}</p> | |
<p>{{description}}</p> | |
<ul class='textLinks nav nav-tabs nav-stacked'> | |
{{#each textLinks}} | |
<li> | |
<a href="{{href}}"> | |
<img src="img/{{type}}.png"> | |
{{title}} |
# Utilities | |
copy = (from, to, propertiesToCopy) -> | |
for property in propertiesToCopy | |
to[property] = from[property] | |
# Module setup | |
@Menu = angular.module 'Menu', [] | |
# Routing | |
@Menu.config ($routeProvider) -> |
/* | |
AngularJS v1.0.6 | |
(c) 2010-2012 Google, Inc. http://angularjs.org | |
License: MIT | |
*/ | |
(function(N,Y,q){'use strict';function n(b,a,c){var d;if(b)if(H(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==n)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof K||ca&&b instanceof ca||xa.call(b)!=="[object Object]"||typeof b.callee==="function")for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d], | |
d);return b}function nb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function fc(b,a,c){for(var d=nb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function ob(b){return function(a,c){b(c,a)}}function ya(){for(var b=aa.length,a;b;){b--;a=aa[b].charCodeAt(0);if(a==57)return aa[b]="A",aa.join("");if(a==90)aa[b]="0";else return aa[b]=String.fromCharCode(a+1),aa.join("")}aa.unshift("0");return aa.j |