Results for “zero”
Small, practical examples. Search by task or narrow things down below.
Expand a JSON array into rows
Iterate array elements using a table-valued function.
json_each✓ Tested
Extract a known substring
PowerShell: Substring uses a zero-based starting index and a character count.
PowerShell✓ Tested
Extract a substring by offset and length
Bash Scripts: Bash substring offsets start at zero for an ordinary string.
Bash Scripts✓ Tested
Find an element’s position among siblings
jQuery: index without arguments reports a zero-based sibling position.
jQuery✓ Tested
Find the final day of a month
JavaScript: Day zero of the following UTC month selects the previous month’s final day.
JavaScript✓ Tested
Find the final day of a month
TypeScript: Day zero of the following UTC month selects the previous month’s final day.
TypeScript✓ Tested
Give an optional property a default
Handle missing object fields with nullish coalescing.
optional✓ Tested
Handle an expected child-process failure
Python: Catch CalledProcessError when check=True reports a nonzero exit status.
Python✓ Tested
Ignore small movements around a center value
Arduino / C: Values inside the deadband become zero while others keep their direction.
Arduino / C✓ Tested
Increment a counter without an unexpected errexit
Bash Scripts: An assignment avoids the zero-result exit status of a standalone arithmetic post-increment.
Bash Scripts✓ Tested
Keep unmatched rows with LEFT JOIN
Show every product even when stock is missing.
LEFT JOIN✓ Tested
Match a known text prefix
SQL: A percent wildcard matches zero or more characters following the prefix.
SQL✓ Tested