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
<ul class="template"> | |
<li class="template-item"> | |
<input type="checkbox" > | |
<span class="task-text label"></span> | |
<input type="button" class="btn btn-mini delete-task" value="Delete" > | |
<div class="btn-group"> | |
<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"> | |
Priority | |
<span class="caret"></span> | |
</button> |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Todo</title> | |
<meta charset="UTF-8"> | |
<style type="text/css"> | |
body { | |
padding-top: 60px; | |
} | |
.complete { |
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
<div class="container" id="todo"> | |
<div class="page-header"> | |
<h2>Your To Do List</h2> | |
<div class="btn-group"> | |
<button class="btn dropdown-toggle" data-toggle="dropdown"> | |
Sort By <span class="caret"></span> | |
</button> | |
<ul class="dropdown-menu "> | |
<li><a href="#" id="sortByName">Name</a></li> | |
<li><a href="#" id="sortByLowHigh">Priority Low To High</a></li> |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Todo</title> | |
<meta charset="UTF-8"> | |
<style type="text/css"> | |
body { | |
padding-top: 60px; | |
} | |
.complete { |
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
{ | |
"name": "nockmarket" | |
, "version": "0.0.1" | |
, "private": true | |
, "dependencies": { | |
"clone" : "0.1.1" | |
, "mocha": "1.3.0" | |
, "should": "1.0.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
'use strict'; | |
var clone = require('clone') | |
, BinaryHeap = require('./BinaryHeap'); | |
var BUY = "buys", SELL = "sells"; | |
function createBinaryHeap(orderType) { | |
return new BinaryHeap(function (x) { | |
return x; |
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
getDisplay: function(exchangeData) { | |
var options = {max: true}; | |
var buyPrices = createBinaryHeap(options); | |
var sellPrices = createBinaryHeap(options); | |
var buys = exchangeData.buys; | |
var sells = exchangeData.sells; | |
if (sells) { |
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 exchange = require('./exchange'); | |
module.exports = BinaryHeap; | |
function BinaryHeap(scoreFunction, options){ | |
this.content = []; | |
if (options) | |
this.options = options; | |
else | |
this.options = {}; |
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
function formatPrice(orderType, price) { | |
if (SELL === orderType) | |
return (-price).toString(); | |
else | |
return price.toString(); | |
} |