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 main() { | |
| let change_total = 333; | |
| let mut remaining = change_total; | |
| for unit in [200, 100, 50, 20, 10, 5, 2, 1].iter() { | |
| let amount = remaining / unit; | |
| println!("Unit: {0}, Amount: {1}", unit, amount); | |
| remaining = remaining % unit; | |
| } | |
| } |
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 | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const { createCanvas, loadImage } = require('canvas'); | |
| const tilePath = path.join(__dirname, '../tiles/black-white/11'); | |
| const tileSize = 256; |
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 path = require('path'); | |
| const fs = require('fs'); | |
| const mkdirp = require('mkdirp'); | |
| const fastXmlParser = require('fast-xml-parser'); | |
| const merge = require('deepmerge'); | |
| const Parser = fastXmlParser.j2xParser; | |
| const traverse = require('traverse'); | |
| const pathToOsmFiles = path.join(__dirname, '../fortnite/'); | |
| const outPath = path.join(__dirname, '../generated/'); |
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
| Recv: EPR:2 75 115200 Baudrate | |
| Recv: EPR:3 129 111.226 Filament printed [m] | |
| Recv: EPR:2 125 69434 Printer active [s] | |
| Recv: EPR:2 79 0 Max. inactive time [ms,0=off] | |
| Recv: EPR:2 83 360000 Stop stepper after inactivity [ms,0=off] | |
| Recv: EPR:3 3 100.0000 X-axis steps per mm | |
| Recv: EPR:3 7 100.0000 Y-axis steps per mm | |
| Recv: EPR:3 11 400.0000 Z-axis steps per mm | |
| Recv: EPR:3 15 400.000 X-axis max. feedrate [mm/s] | |
| Recv: EPR:3 19 400.000 Y-axis max. feedrate [mm/s] |
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
| ;FLAVOR:RepRap | |
| ;TIME:2521 | |
| ;Filament used: 1.36604m | |
| ;Layer height: 0.1 | |
| ;Generated with Cura_SteamEngine 2.5.0 | |
| M190 S60 | |
| M104 S205 | |
| M109 S205 | |
| G21 ;metric values | |
| G90 ;absolute positioning |
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
| class UiAdapter { | |
| constructor(coreApi, uiApi) { | |
| coreApi.on('statechange', (state) => { | |
| uiApi.setState(state); | |
| }); | |
| uiApi.onAction('play', () => { | |
| coreApi.transitionTo('play'); | |
| }); |
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
| .iframe-container { | |
| position: relative; | |
| padding-bottom: 56.25%; | |
| height: 0; | |
| } | |
| .iframe-container iframe { | |
| position: absolute; | |
| top: 0; | |
| left: 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
| const test = require('ava'); | |
| const sinon = require('sinon'); | |
| const walk = require('../src/walk'); | |
| let result; | |
| test.beforeEach(() => { | |
| result = [[0, 0], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1], [1, 0], [1, 1], [1, 2]]; | |
| }); | |
| test('It walks in a spiral', t => { |
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
| // module tracker.js | |
| function Tracker(foo, bar) { | |
| this._foo = foo; | |
| } | |
| Tracker.prototype.echo = function(str) { | |
| this._foo.echo(str); | |
| } | |
| module.exports = Tracker; |
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
| Ecig.faq = [ | |
| { | |
| question: 'foo', | |
| answer: 'bar', | |
| image: 'schnitzel.jpg' | |
| }, | |
| { | |
| question: 'foo2', | |
| answer: 'bar2', | |
| image: 'schnitzel2.jpg' |
NewerOlder