FIND YOUR NEXT FEW LINES

Results for “require”

Small, practical examples. Search by task or narrow things down below.

1101 snippets foundClear filters
PostgresGetting Started

Give a result column a readable name

Postgres: Use AS to label a computed result column.

Postgres✓ Tested
SQLiteGetting Started

Give a result column a readable name

SQLite: Use AS to label a computed result column.

SQLite✓ Tested
Docker / ComposeImage management

Give an existing image another tag

Docker / Compose: Tagging adds a reference without copying the image layers.

Docker / Compose✓ Tested
TypeScriptTypes & functions

Give an optional property a default

Handle missing object fields with nullish coalescing.

optional✓ Tested
CSSGrid placement

Give implicit grid rows a minimum height

CSS: Minmax allows an implicit row to grow when its content requires more room.

CSS✓ Tested
SQL ServerReporting & grouped calculations

Group by more than one field

SQL Server: Each distinct combination of grouping fields produces its own row.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Group by more than one field

Postgres: Each distinct combination of grouping fields produces its own row.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Group by more than one field

SQLite: Each distinct combination of grouping fields produces its own row.

SQLite✓ Tested
TypeScriptObject behavior & collections

Group records into map entries

TypeScript: Initialize an array for a missing Map key before appending its values.

TypeScript✓ Tested
Bash ScriptsFiles & reliability

Handle a filename pattern with no matches

Use nullglob so an unmatched pattern produces an empty array.

nullglob✓ Tested
PowerShellStructured formats & encodings

Handle a malformed JSON document

PowerShell: ConvertFrom-Json reports a terminating conversion error under the selected error preference.

PowerShell✓ Tested
Bash ScriptsProcesses & environment

Handle a nonzero background-job exit

Bash Scripts: Wait reports a child’s exit code; put it in a conditional when failure is expected.

Bash Scripts✓ Tested