Basically, allow this:
foo?.bar = value;
which is equivalent to
foo == null ? undefined : (foo.bar = value);
./linelen_hist.sh src '*.c' | |
COLS COUNT | |
2 1317 ████████████████████████████████████████████████████████████▌ | |
4 583 ██████████████████████████▏ | |
6 500 ██████████████████████▎ | |
8 253 ███████████▊ | |
10 264 ████████████▊ | |
12 448 ████████████████████▋ | |
14 417 ███████████████████▌ | |
16 476 █████████████████████▍ |
# This example uses M2M-100 models converted to the CTranslate2 format. | |
# Download CTranslate2 models: | |
# • M2M-100 418M-parameter model: https://bit.ly/33fM1AO | |
# • M2M-100 1.2B-parameter model: https://bit.ly/3GYiaed | |
import ctranslate2 | |
import sentencepiece as spm | |
npm uses Semantic Versioning. Given a version number MAJOR.MINOR.PATCH
, increment the:
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.This is not perfect but it works. Useful repo: https://github.com/jessfraz/dockerfiles
This gist lists challenges you run into when building offline-first applications based on IndexedDB, including open-source libraries like Firebase, pouchdb and AWS amplify (more).
Note that some of the following issues affect only Safari. Out of the major browsers, Chrome's IndexedDB implementation is the best.
When this bug occurs, every time you use the indexeddb, the WAL file grows. Garbage collection doesn't seem to be working, so after a while, you end up with gigabytes of data.
// To see this run, you first stub out these imports. Then put the file in a Uint8Array. | |
// let slice = new Slice(array); | |
// let font = new OTFFont(slice); | |
// Then you can call methods like font.drawText(canvasContext, ) | |
// | |
// | |
import { ICanvasContext } from "./ICanvasContext" | |
import { log as Log } from "./log" | |
const log = Log.create("OPENTYPE"); |
a gist to recap the current status, also available as library picker!
do one thing only and do it well
COPIED FROM https://build.opensuse.org/package/view_file/games/stockfish/stockfish-interface.txt?expand=1 | |
Description of the universal chess interface (UCI) April 2006 | |
================================================================= | |
* The specification is independent of the operating system. For Windows, | |
the engine is a normal exe file, either a console or "real" windows application. | |
* all communication is done via standard input and output with text commands, |