See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| /** | |
| * `Char` represents a single-byte character. | |
| */ | |
| // prettier-ignore | |
| export type Char = | |
| | "\x00" | "\x01" | "\x02" | "\x03" | "\x04" | "\x05" | "\x06" | "\x07" | |
| | "\x08" | "\x09" | "\x0A" | "\x0B" | "\x0C" | "\x0D" | "\x0E" | "\x0F" | |
| | "\x10" | "\x11" | "\x12" | "\x13" | "\x14" | "\x15" | "\x16" | "\x17" | |
| | "\x18" | "\x19" | "\x1A" | "\x1B" | "\x1C" | "\x1D" | "\x1E" | "\x1F" | |
| | "\x20" | "\x21" | "\x22" | "\x23" | "\x24" | "\x25" | "\x26" | "\x27" |
| type CountTo<N extends number, S extends 0[] = []> = S["length"] extends N | |
| ? S | |
| : CountTo<N, [...S, 0]>; | |
| type Inc<N extends number> = [...CountTo<N>, 0]["length"]; | |
| type Dec<N extends number> = CountTo<N> extends [infer _H, ...infer T] | |
| ? T["length"] | |
| : 0; | |
| type Before< | |
| Memory extends number[], |
| import { ObjectType, Field } from "@nestjs/graphql"; | |
| @ObjectType() | |
| export class PageInfo { | |
| @Field({ nullable: true }) | |
| startCursor: string; | |
| @Field({ nullable: true }) | |
| endCursor: string; |
| # 1: Use node 6 as base: | |
| FROM node:6-alpine | |
| # 2: Download+Install PhantomJS, as the npm package 'phantomjs-prebuilt' won't work on alpine! | |
| # See https://github.com/dustinblackman/phantomized | |
| RUN set -ex \ | |
| && apk add --no-cache --virtual .build-deps ca-certificates openssl \ | |
| && wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C / \ | |
| && npm install -g phantomjs \ | |
| && apk del .build-deps |
| // 1. Define a state variable for showing/hiding the action-button | |
| state = { | |
| isActionButtonVisible: true | |
| } | |
| // 2. Define a variable that will keep track of the current scroll position | |
| _listViewOffset = 0 | |
| // 3. Add an onScroll listener to your listview/scrollview | |
| <ListView |
| """ | |
| Run the algorithm below using CPython, Cython, PyPy and Numba and compare | |
| their performance. (This is implementing a spigot algorithm by A. Sale, | |
| D. Saada, S. Rabinowitz, mentioned on | |
| http://mail.python.org/pipermail/edu-sig/2012-December/010721.html). | |
| """ | |
| def pi_digits(n): | |
| "Generate n digits of Pi." | |
| k, a, b, a1, b1 = 2, 4, 1, 12, 4 |