Results for “run”
Small, practical examples. Search by task or narrow things down below.
Distinguish unset variables from empty strings
Bash Scripts: Omitting the colon tests only whether a variable is unset; including it also treats an empty value as missing.
Bash Scripts✓ Tested
Distinguish UTF-8 bytes from characters
Distinguish UTF-8 bytes from characters in a complete Rust program using the standard library.
Rust✓ Tested
Divide an ordered result into numbered buckets
SQL: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.
SQL✓ Tested
Divide an ordered result into numbered buckets
SQL Server: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.
SQL Server✓ Tested
Divide an ordered result into numbered buckets
Postgres: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.
Postgres✓ Tested
Divide an ordered result into numbered buckets
SQLite: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.
SQLite✓ Tested
Divide decimal values with controlled precision
Java: Choose both scale and rounding for a quotient that does not terminate in base ten.
Java✓ Tested
Divide negative integers with floor rounding
Java: floorDiv and floorMod provide consistent floor-based quotient and remainder.
Java✓ Tested
Divide using a fractional number
Python: Use a floating-point operand to preserve the fractional part of a division.
Python✓ Tested
Divide using a fractional number
C#: Use a floating-point operand to preserve the fractional part of a division.
C#✓ Tested
Divide using a fractional number
Java: Use a floating-point operand to preserve the fractional part of a division.
Java✓ Tested
Divide using a fractional number
JavaScript: Use a floating-point operand to preserve the fractional part of a division.
JavaScript✓ Tested