Short-circuit? | Short-circuits on? | Fulfilled on? | Rejected on? | |
---|---|---|---|---|
Promise.all | Yes | First rejected promise | All promise fulfilled | First rejected promise |
Promise.allSettled | No | N/A | Always | N/A |
Promise.race | Yes | First settled | First promise fulfilled | First rejected promise |
Promise.any | Yes | First fulfilled | First promise fulfilled | All rejected promises |
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
// ==UserScript== | |
// @name Team Blind - Expand all comments | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Expand all comments on load on TeamBlind.com | |
// @author You | |
// @match https://www.teamblind.com/post/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net | |
// @grant none | |
// ==/UserScript== |
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
import React from "react"; | |
import Chart from "./Chart"; | |
import "frappe-charts/dist/frappe-charts.min.css"; | |
// https://github.com/tobiaslins/frappe-charts-react-example | |
const GraphView = ({ data }) => <Chart title="Graph data" data={data} />; | |
export default GraphView; |
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
"files.associations": { | |
"*.ejs": "html" | |
}, |
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
chrome.tabs.query( | |
{ active: true, windowId: chrome.windows.WINDOW_ID_CURRENT }, | |
function(tabs) { | |
const { id: tabId } = tabs[0].url; | |
let code = `document.querySelector('h1')`; | |
// http://infoheap.com/chrome-extension-tutorial-access-dom/ | |
chrome.tabs.executeScript(tabId, { code }, function (result) { | |
// result has the return value from `code` |
https://auto.gluon.ai/stable/index.html#
pip3 install -U pip
pip3 install -U setuptools wheel
# CPU version of pytorch has smaller footprint - see installation instructions in
# pytorch documentation - https://pytorch.org/get-started/locally/
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
/* eslint-disable @typescript-eslint/no-var-requires */ | |
const { BlockList } = require("net"); | |
const twColors = require("tailwindcss/colors"); | |
const defaultTheme = require("tailwindcss/defaultTheme"); | |
/** | |
* Material Design breakpoints | |
* @see https://material.io/design/layout/understanding-layout.html#layout-anatomy | |
* @see https://tailwindcss.com/docs/breakpoints | |
*/ |
- Compare numbers in a sequence. e.g.
# ok
3 > 2 > 1
1 < 2 < 3
# not
1 < 3 > 2
# not
NewerOlder