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 inputBody = { | |
| "mobility": { | |
| "car": { | |
| "petrol": 0, | |
| "biogas": 0, | |
| "diesel": 0, | |
| "electric": 0, | |
| "hydrogen": 0, | |
| "naturalGas": 0, | |
| "syntheticFuel": 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
| <template> | |
| <div class="wrap"> | |
| <div class="page"> | |
| <div class="grid-stack" /> | |
| <span class="divider" /> | |
| </div> | |
| </div> | |
| </template> | |
| <script setup> |
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
| <?php | |
| use craft\elements\Entry; | |
| use craft\helpers\UrlHelper; | |
| return [ | |
| 'endpoints' => [ | |
| 'acts.json' => function() { | |
| return [ | |
| 'pretty' => 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
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running | |
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running | |
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running | |
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running | |
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running | |
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running | |
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running | |
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running | |
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running | |
| reboot system boot 4.19.75-v7+ Thu Jan 1 01:00 still running |
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 shifty = require('shifty') | |
| console.log(shifty) | |
| shifty.tween({ | |
| from: { | |
| x: 0 | |
| }, to: { | |
| x: 10 | |
| }, step: state => console.log(state) | |
| }).then(() => console.log('done')) |
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
| this.setState(state => { | |
| view: { | |
| ...state.view, | |
| lat: coords.lat, | |
| lon: coords.lon | |
| } | |
| }) |
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
| // .js instead of .json for convenience | |
| { | |
| "id": "string", | |
| "original-loc": { | |
| "lat": "double", | |
| "lon": "double" | |
| }, | |
| "name": "string", | |
| "tag": "string", | |
| "country-code": "string", |
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
| { | |
| "name": "Switzerland", | |
| "view": { | |
| "zoom": 34, // changable by maptool | |
| "lat": 46.7310679, // changable by maptool | |
| "lon": 6.2670205 // changable by maptool | |
| }, | |
| "places": [ | |
| { | |
| "type": "federation", |
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
| (async () => { | |
| let response, configJson | |
| try { | |
| response = await fetch('./config.json') | |
| configJson = await response.json() | |
| } catch(error) { | |
| configJson = { | |
| "fallback": 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
| const {performance} = require('perf_hooks') | |
| let lastTs, newTs | |
| const desiredFps = 30.0 | |
| const interval = () => { | |
| lastTs = newTs | |
| newTs = performance.now() | |
| const err = newTs - lastTs - 1000.0 / desiredFps | |
| const newDelay = 1000.0 / desiredFps - err | |
| setTimeout(interval, newDelay) | |
| } |
NewerOlder