Results for “or”
Small, practical examples. Search by task or narrow things down below.
Accept either of two conditions
SQL Server: Use OR to keep matching names or out-of-stock rows.
SQL Server✓ Tested
Accept either of two conditions
Postgres: Use OR to keep matching names or out-of-stock rows.
Postgres✓ Tested
Accept either of two conditions
SQLite: Use OR to keep matching names or out-of-stock rows.
SQLite✓ Tested
Accumulate a result with fold
Accumulate a result with fold in a complete Rust program using the standard library.
Rust✓ Tested
Add a calculated property during selection
PowerShell: A calculated property can derive a value while retaining selected original properties.
PowerShell✓ Tested
Add context to a parsing failure
Add context to a parsing failure in a complete Rust program using the standard library.
Rust✓ Tested
Allocate an independent copy of a C string
C: Include one extra byte for the terminating null character.
C✓ Tested
Allocate and free a typed array
C: Use sizeof on the pointed-to type and check allocation success before writing.
C✓ Tested
Allocate and initialize a structure
C: Use a compound literal assignment to initialize all ordinary structure fields.
C✓ Tested
Apply a stash while keeping the saved entry
Git: Apply restores changes without removing the stash reference.
Git✓ Tested
Average a fixed set of readings
Accumulate sample values without overflowing a 16-bit total.
array✓ Tested
Avoid a shared mutable default argument
Python: Create a fresh list inside the function when the optional argument is omitted.
Python✓ Tested