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
| Push (Variance) | |
| ✗ 0.468596215155556 | |
| » expected 0.46859621515555566, | |
| got 0.468596215155556 (==) // vector.test.js:359 | |
| ✗ Broken » 38 honored ∙ 1 broken (0.022s) |
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 Vector = function(values) { | |
| var vector = !(values instanceof Array) ? | |
| Array.prototype.slice.call(arguments) : | |
| values; | |
| return function(i) { | |
| if(typeof i === 'number') | |
| return vector[i]; | |
| else | |
| return vector; | |
| }; |
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
| function Add(a) { | |
| return { | |
| to: function(b) { return a + b; } | |
| } | |
| } |
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
| function In(drive) { | |
| this.drive = drive; | |
| } | |
| function Within(path) { | |
| this.path = path; | |
| } | |
| In.prototype.within = function(path) { | |
| var within = new Within(path); |
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 mongoose = require('mongoose'); | |
| function User() { | |
| return mongoose.model('users', new mongoose.Schema({ | |
| username: String, | |
| email: String, | |
| name: String | |
| })); | |
| } |
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 async = require('async'); | |
| // Waterfall through callbacks using Mongoose to query for a user | |
| async.waterfall([ | |
| function(callback) { | |
| /** Function 1. Find User. | |
| * Pass `user` to Function 2. | |
| */ | |
| User.findOne({ username: 'fred' }, function(error, user) { |
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
| <div class="main column left"> | |
| <img src="/images/placeholder/graphic_630x420.jpg" alt="First 2012 Mission Creek Festival Announcement" /> | |
| <div class="headline"> | |
| <h3>First 2012 Mission Creek Festival Announcement</h3> | |
| <p> | |
| Iowa City’s Mission Creek Festival Returns March 27-April 1, 2012, and KRUI has the scoop on the star-studded line-up...and this is just the first announcement! | |
| </p> | |
| </div> | |
| </div> |
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
| Word | Occurrences | Frequency | Rank | |
|---|---|---|---|---|
| our | 84 | 2.1% | 1 | |
| you | 37 | 0.9% | 2 | |
| american | 35 | 0.9% | 2 | |
| jobs | 34 | 0.8% | 3 | |
| america | 30 | 0.7% | 4 | |
| we\ | 30 | 0.7% | 4 | |
| right | 27 | 0.7% | 4 | |
| new | 27 | 0.7% | 4 | |
| now | 26 | 0.6% | 5 |
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
| Array = require('gauss').Vector; | |
| var prices = [22.2734, 22.194, 22.0847, 22.1741, 22.184, 22.1344, | |
| 22.2337, 22.4323, 22.2436, 22.2933, 22.1542, 22.3926, | |
| 22.3816, 22.6109, 23.3558, 24.0519, 23.753, 23.8324, | |
| 23.9516, 23.6338, 23.8225, 23.8722, 23.6537, 23.187, | |
| 23.0976, 23.326, 22.6805, 23.0976, 22.4025, 22.1725]; | |
| /* Use Wilder ratio on an exponential moving average period of 10, | |
| 1 million iterations |
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
| wget http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1.final.tgz | |
| tar -xzvf scala-2.9.1.final.tgz |