0:
■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■
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("../"); | |
| var temporal = require('temporal'); | |
| var board = new five.Board({ | |
| debug: false | |
| }); | |
| // Outputs: | |
| // --- | |
| // node testCase.js |
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 EventEmitter from "events"; | |
| let priv = new WeakMap(); | |
| let simulatorCoords = [ | |
| [40.678178, -73.944158], | |
| [40.678181, -73.943267], | |
| [40.678083, -73.941593], | |
| [40.678034, -73.940649], | |
| ]; | |
| let index = 0; |
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 tags = require("common-tags"); // npm install common-tags | |
| var Proximity = { | |
| read: function(which) { | |
| var distance = [Math.round(Math.random() * 20)]; | |
| return Promise.resolve( | |
| Object.assign({}, which, { distance }) | |
| ); | |
| } | |
| }; |
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 blob = new Blob(["onmessage = function(event) { postMessage( event.data ) };"], { | |
| type: "text\/plain" | |
| }); | |
| worker = new Worker( | |
| URL.createObjectURL(blob) | |
| ); | |
| worker.postMessage("The Blob!"); | |
| worker.onmessage = function(event) { |
0:
■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■
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
| ****************************** | |
| PSH KERNEL VERSION: b0182727 | |
| WR: 20104000 | |
| ****************************** | |
| SCU IPC: 0x800000d0 0xfffce92c | |
| PSH miaHOB version: TNG.B0.VVBD.0000000c |
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 tag(strings) { | |
| var values = Array.from(arguments).slice(1); | |
| if (Array.isArray(values[0])) { | |
| return tag(strings, values[0].join("")); | |
| } | |
| return strings.reduce((accum, part, index) => { | |
| return accum + part + (values[index] || ""); | |
| }, ""); |
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
| # -*- mode: python -*- | |
| { | |
| "targets": [ | |
| { | |
| "include_dirs": ["<!(node -e \"require('nan')\")"], | |
| "target_name": "TimerAndPromise", | |
| "sources": [ | |
| "timer-and-promise.cc" | |
| ], | |
| "conditions": [ |
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
| const five = require('johnny-five'); | |
| const board = new five.Board(); | |
| board.on('ready', () => { | |
| const sensor = new five.Sensor('A4'); | |
| const led = new five.Led(5); | |
| sensor.on('change', function() { | |
| // `this` is the sensor instance | |
| led.brightness(this.value >> 2); |