- demo: different ways to get resolve (return) value from a
promise
- type: full code example
- language: javascript
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
[ | |
{ "key": "escape escape", "command": "workbench.action.exitZenMode", | |
"when": "inZenMode" }, | |
{ "key": "shift+escape", "command": "closeReferenceSearch", | |
"when": "inReferenceSearchEditor && !config.editor.stablePeek" }, | |
{ "key": "escape", "command": "closeReferenceSearch", | |
"when": "inReferenceSearchEditor && !config.editor.stablePeek" }, | |
{ "key": "escape", "command": "editor.closeTestPeek", | |
"when": "testing.isInPeek && !config.editor.stablePeek || testing.isPeekVisible && !config.editor.stablePeek" }, | |
{ "key": "shift+escape", "command": "cancelSelection", |
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 fs = require('fs'); | |
var folder = 'vs_code'; | |
var file = 'keyboard_shortcuts'; | |
var path = `${folder}/${file}.json` | |
var jsonFile = fs.readFileSync(path); | |
rs = JSON.parse(jsonFile); | |
console.log(rs); |
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
<html> | |
<title>(BNB/BTC) Binance - Web Socket Stream</title> | |
<script language="javascript" type="text/javascript"> | |
var wsUri = "wss://stream.binance.com:9443/ws/bnbbtc@depth5"; | |
var outputDiv; | |
var output; | |
function init() { | |
outputDiv = document.getElementById("output"); |
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
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 750 500" preserveAspectRatio="xMidYMax slice"> | |
<defs> | |
<!-- Scene 1 Gradient --> | |
<linearGradient id="grad1" x1="-154.32" y1="263.27" x2="-154.32" y2="374.3" | |
gradientTransform="matrix(-1, 0, 0, 1.36, 231.36, -100.14)" gradientUnits="userSpaceOnUse"> | |
<stop offset="0.07" stop-color="#9c536b" /> | |
<stop offset="0.98" stop-color="#d98981" /> | |
</linearGradient> | |
<radialGradient id="bg_grad" cx="375" cy="-35" r="318.69" gradientUnits="userSpaceOnUse"> | |
<stop offset="0.1" stop-color="#F5C54E" id="sun" /> |
- type: full code example
- language: javascript
- function: fetch()
- demo: catch error
- type: full code example
- language: javascript
- function: fetch()
- demo: catch error
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
[ | |
{ | |
"a":"a", | |
"b":"b" | |
}, | |
{ | |
"c":"c", | |
"d":"d" | |
} | |
] |
OlderNewer