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); |
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
| 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
| [ | |
| {"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
| 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
| open System | |
| open System.Windows.Forms | |
| open System.Drawing | |
| type Action = | |
| | Increment | |
| | Decrement | |
| let form = new Form(Width= 400, Height = 300, Visible = true, Text = "Hello World") |
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
| #I "packages/Rx-Linq/lib/net45" | |
| #I "packages/Rx-Interfaces/lib/net45" | |
| #I "packages/Rx-Core/lib/net45" | |
| #I "packages/FSharp.Control.Reactive/lib/net40" | |
| #r "FSharp.Control.Reactive.dll" | |
| #r "System.Reactive.Core.dll" | |
| #r "System.Reactive.Interfaces.dll" | |
| #r "System.Reactive.Linq.dll" |
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
| type Tree a = | |
| Empty | |
| | Node a (Tree a) (Tree a) | |
| mirror : Tree a -> Tree a | |
| mirror t = | |
| case t of | |
| Empty -> Empty | |
| Node v l r -> Node v (mirror r) (mirror l) |
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
| /// My function types | |
| type Backward<'Core> = 'Core -> 'Core | |
| type InputCore = { | |
| backward : Backward<InputCore> | |
| x : float | |
| } | |
| type TanhCore = { | |
| backward : Backward<TanhCore> |
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
| import Html exposing (beginnerProgram, div, span, button, text) | |
| import Html.Events exposing (onClick) | |
| type Msg | |
| = Increment Int | |
| | Decrement Int | |
| type alias Model = | |
| { action : Int -> Msg |
OlderNewer