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
| main = 42 |
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
| [ | |
| {"year": "1990", | |
| "party": "Republicans", | |
| "spending": 299 | |
| }, | |
| {"year": "1990", | |
| "party": "Democrats", | |
| "spending": 376 | |
| }, | |
| {"year": "2006", |
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 which { | |
| Param ([String]$Name) | |
| (Get-Command $Name).Definition | |
| } |
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 axon = require('axon'); | |
| var sock = axon.socket('pub'); | |
| sock.bind(3000); | |
| console.log('pub server started'); | |
| setInterval(function(){ | |
| sock.send('hello'); | |
| }, 500); |
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
| destroy: function(req, res) { | |
| var id = req.param('id'); | |
| MyModel.findOne(id) | |
| .exec(function foundRecord (err, record) { | |
| if (err) return res.serverError(err); | |
| if(!record) return res.notFound('No record found with the specified `id`.'); | |
| MyModel.destroy(id) | |
| .exec(function(err) { | |
| if (err) return res.negotiate(err); |
NewerOlder