This file contains 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
timeout = 5000 | |
promiseKeeper = (id) => { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(`${id} resolved at ${new Date()}`) | |
}, timeout); | |
}) | |
} |
This file contains 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
// you'll want to run the below manually by separately pasting each chunk into e.g. a node console | |
// declare some globals that we can use to get insight into the workings of slowFunction | |
preAwaitDate = null | |
postAwaitDate = null | |
awaitResult = null | |
slowFunction = async () => { | |
preAwaitDate = new Date() | |
awaitResult = await new Promise(function(resolve, reject) { |
This file contains 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
Java 9 includes a native REPL now! | |
https://en.wikipedia.org/wiki/JShell | |
what if i'm stuck on an older version of java? | |
you might try the JavaREPL plugin: https://github.com/jburwell/gradle-javarepl-plugin | |
a web based REPL: http://www.javarepl.com/term.html | |
the advantage of a non-web REPL being that you can play around with your own local code, which is often what you want a REPL for. |
This file contains 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
{ | |
"@context": [ | |
"http://www.w3.org/ns/anno.jsonld", | |
"http://iiif.io/api/presentation/3/context.json" | |
], | |
"id": "http://localhost:3000/bb132pr2055/iiif3/manifest", | |
"label": "How does politics affect central banking? : evidence from the Federal Reserve", | |
"attribution": "(c) Copyright 2015 by Lucas Llanso Puente", | |
"logo": { |