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 Track = (function() { | |
| function Track(title, artist) { | |
| this.title = title || 'Untitled'; | |
| this.artist = artist || 'Unknown'; | |
| } | |
| Track.prototype.toString = function() { | |
| return this.title + ',\t\t' + this.artist; | |
| }; |
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
| # Given a list V of item values, and W of item weights, where item i | |
| # has value V[i] and weight W[i], find the optimal selection of i to | |
| # sure fill the knapsack of capcity k with fractions of items. | |
| # | |
| # The values are required to be sorted by descending order of value | |
| # per pound, in order to enable a greedy choice. | |
| # | |
| # The sort incurs a cost of O(n log(n)), assuming efficient merge | |
| # sort. | |
| # |
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
| > module Ex3FunctionsCodeGenerator where | |
| > import Ex3FunctionsTypes | |
| > import Data.List | |
| ----------------------------------------------------------- | |
| Solution for Compilers exercise 3 | |
| Paul Kelly Imperial College London 2009 | |
| ----------------------------------------------------------- | |
| Fill in the gaps... |
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
| Anonymous UUID: 9DA07A69-940A-DF72-455D-54DAD821BB68 | |
| Wed May 21 22:44:27 2014 | |
| panic(cpu 0 caller 0xffffff7fa336bfb0): "GPU Panic: [<None>] 3 0 a0 d9 9 8 0 3 : NVRM[0/1:0:0]: Read Error 0x00000144: CFG 0xffffffff 0xffffffff 0xffffffff, BAR0 0x102c00000 0xffffff81f8d94000 0x0e7150a2, D0, P2/4\n"@/SourceCache/AppleGraphicsControl/AppleGraphicsControl-3.4.35/src/AppleMuxControl/kext/GPUPanic.cpp:127 | |
| Backtrace (CPU 0), Frame : Return Address | |
| 0xffffff81e307cbe0 : 0xffffff8020e22fa9 | |
| 0xffffff81e307cc60 : 0xffffff7fa336bfb0 | |
| 0xffffff81e307cd30 : 0xffffff7fa185a22c | |
| 0xffffff81e307cdf0 : 0xffffff7fa1924106 | |
| 0xffffff81e307ce30 : 0xffffff7fa1b47e54 |
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
| #!/usr/bin/env coffee | |
| # vi: set foldmethod=marker | |
| fs = require 'fs' | |
| path = require 'path' | |
| sSplitter = require 'stream-splitter' | |
| $q = require 'q' | |
| coffee = require 'coffee-script' | |
| spawn = (require 'child_process').spawn | |
| exec = (require 'child_process').exec |
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
| fs = require 'fs' | |
| path = require 'path' | |
| jade = require 'jade' | |
| stylus = require 'stylus' | |
| express = require 'express' | |
| coffee = require 'coffee-script' | |
| morgan = require 'morgan' | |
| # Create app | |
| app = express() |
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> | |
| <script type="application/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
| <script type="application/javascript" src="./vals.js"></script> | |
| </head> | |
| <body> | |
| <form> | |
| <input type="text" default="default val"> | |
| </form> | |
| </body> |
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
| auth = angular.module 'auth' | |
| auth.factory\ | |
| ( 'Auth' | |
| , [ '$q', '$http', '$window', '$state' | |
| ($q, $http, $window, $state) -> | |
| deferred = null | |
| class Auth |
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 = (require 'express')() | |
| app.get '/hello', (req, res) -> | |
| res.send 'world!\n' | |
| app.listen 3000, (err) -> | |
| throw err if err? | |
| console.log 'Server listening at port 3000' |
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
| #!/usr/bin/env coffee | |
| # vi: set filetype=coffee | |
| fs = require 'fs' | |
| ttyFd = fs.openSync '/dev/tty', 'r' | |
| msgFile = process.argv[2] | |
| failed = false | |
| error = 'Error! Please reference git issue!' |