-
What are they?
-
Why are they important?
-
What kind of things can we do as developers to help improve the quality of our code?
-
How is this better for our learning?
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
| struct NotCopyable { | |
| // defaulted and deleted funtions are only available in C++11 | |
| NotCopyable(const NotCopyable&) = delete; | |
| // Overriding the = operator so you can't copy one NotCopyable to another | |
| // one | |
| NotCopyable& operator=(const NotCopyable&) = delete; | |
| // You would need the following line to be able to construct an instance of this | |
| // struct at all |
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 express = require('express') | |
| var port = 8080 | |
| var app = express() | |
| app.use(express.static(__dirname + '/public')) | |
| app.listen(8080, function () { | |
| console.log('server running on %d', port) | |
| }) |
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.use(session({ | |
| secret: 'martyn rushton for president', | |
| resave: false, | |
| saveUninitialized: true | |
| })) |
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
| (defn lowestNumber | |
| [data] | |
| (loop [d data | |
| c (first data)] | |
| (if (empty? d) | |
| c | |
| (if (< (first d) c) | |
| (recur (rest d) (first d)) | |
| (recur (rest d) c))))) |
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 array = [ "Hello" ].push("world") | |
| console.log(array) // => 2 |
Modules you will need:
- Go to the "Google API console", and under "APIs & auth" go to credentials.
- Create a service account for your project.
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 node | |
| var chokadir = require('chokidar') | |
| var exec = require('child_process').exec | |
| chokadir.watch('./src').on('change', function () { | |
| console.log('Got a change, running lein run') | |
| exec('lein run', { cwd: process.cwd() }, function (err, stdout, stderr) { | |
| if (err || stderr) { | |
| throw err || stderr |
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 node | |
| var chokadir = require('chokidar') | |
| var exec = require('child_process').exec | |
| chokadir.watch('./src').on('change', function () { | |
| console.log('Got a change, running lein run') | |
| exec('lein run', { cwd: process.cwd() }, function (err, stdout, stderr) { | |
| if (err || stderr) { | |
| throw err || stderr |
My ideal American Gods cast.
- Shadow - Dominic Purcell
- Mr Wednesday - Kristofer Hivju
- Hinzlemann - Eli Wallach
- Low-Key Lyesmith - Jackie Earle Haley
- Easter - Christina Hendricks
- Mr Nancy - Giancarlo Esposito
- Mr Jaquel - Idris Elba
- Mad Sweeney - Robert Carlyle