- Quick Find
- Quick Union
Steps to developing a useful algorithm.
- Model the problem.
- Find an algorithm to solve it.
- Fast enough? Fits in memory?
- If not, figure out why.
| define( | |
| [ | |
| "./Page", | |
| "../modules/Transitional", | |
| "$" | |
| ], | |
| function (Page, Transitional, $) { |
| // Sample grunt-jekyll grunt.js file | |
| // https://github.com/dannygarcia/grunt-jekyll | |
| /*global module:false*/ | |
| module.exports = function(grunt) { | |
| // Project configuration. | |
| grunt.initConfig({ | |
| jekyll: { |
| // Simple ajax function to avoid using jQuery (°-°) | |
| var ajax = function (url, callback) { | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open('GET', url, true); | |
| xhr.send(); | |
| xhr.onreadystatechange = function (e) { | |
| if (e.target.status === 200 && e.target.readyState === 4) { | |
| callback(e.target.response); | |
| } | |
| }; |
| # remap prefix to Ctrl-a instead of Ctrl-b | |
| unbind C-b | |
| set -g prefix C-a | |
| # Allow C-A a to send C-A to application. Useful for Vim, other apps | |
| bind C-a send-prefix | |
| # Reload the .tmux.conf file with Ctrl-r | |
| bind-key r source-file ~/.tmux.conf \; display-message "Configuration reloaded" |
| var ajax = function (url, callback) { | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open('GET', url, true); | |
| xhr.send(); | |
| xhr.onreadystatechange = function (e) { | |
| if (e.target.status === 200 && e.target.readyState === 4) { | |
| callback(JSON.parse(e.target.response)); | |
| } | |
| }; | |
| }; |
| # required ? | |
| npm install r.js -g | |
| r.js -o name=example/site out=build/site.build.js optimize=none baseUrl=. |
| { | |
| "jshint_options" : | |
| { | |
| "adsafe": false, | |
| "bitwise": false, | |
| "newcap": true, | |
| "eqeqeq": true, | |
| "immed": true, | |
| "nomen": false, | |
| "onevar": true, |
| .item { | |
| width: 560px; | |
| } | |
| header { | |
| width: 250px; | |
| float: right; | |
| } | |
| .bid-stack { |