- This talk is focused on the concepts, not the commonly used competing strategies.
- Knowing the details helps fine tune the implementation for certain scenarios depending your requirements
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
| {fn (p1 p2) | |
| {def c {fn (p3 p4) | |
| {* {+ p1 p3} {- p4 p2}} | |
| }} | |
| {c 1 2} | |
| } | |
| fns immediately executed in the same scope do not need special closure style | |
| using the stack works just fine. |
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 five = require("johnny-five"); | |
| var app = require('express')(); | |
| var http = require('http').Server(app); | |
| var io = require('socket.io')(http); | |
| var path = require('path'); | |
| var board = new five.Board(); | |
| app.get('/', function(req, res) { | |
| res.sendFile(path.resolve('index.html')); |
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> | |
| <title>BOT CONTROLLER</title> | |
| </head> | |
| <body> | |
| <input type="text" id="botcontroller" /> | |
| </body> | |
| <script src="/socket.io/socket.io.js"></script> | |
| <script src="http://code.jquery.com/jquery-1.11.1.js"></script> |
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
| // see https://github.com/HallM/sudokusolvers/ | |
| // first 4 bits are allocated for the value (1-9) | |
| // next 9 bits are used for the "pencil marks" | |
| const ONE = 1 << 4; | |
| const TWO = 1 << 5; | |
| const THREE = 1 << 6; | |
| const FOUR = 1 << 7; | |
| const FIVE = 1 << 8; | |
| const SIX = 1 << 9; |
OlderNewer