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
| import math | |
| class Money: | |
| def __init__(self, d, c): | |
| self.d = d | |
| self.c = c | |
| self.neg = False | |
| def __str__(self): | |
| return self.get() |
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
| /* | |
| How to run tests: | |
| 1) > npm install -g mocha | |
| 2) > mocha -u bdd -R spec test/ | |
| */ | |
| var expect = require('chai').expect, | |
| sinon = require('sinon'), |
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
| ========= app.js ============== | |
| var connect = require('connect') | |
| , http = require('http'); | |
| var app = connect() | |
| .use(connect.favicon()) // <-------------- | |
| .use(connect.logger('dev')) // next() | |
| .use(connect.static('public')) // next() | |
| .use(connect.directory('public')) // etc... |