Results for “Numeric parsing & arithmetic”
Small, practical examples. Search by task or narrow things down below.
Extract part of a date
Read a calendar component with EXTRACT.
EXTRACT✓ Tested
Find the mean and median of readings
Python: Use statistics helpers to distinguish an arithmetic mean from a middle value.
Python✓ Tested
Find the smallest value in a nonempty array
C: Initialize from the first element instead of assuming a numeric sentinel.
C✓ Tested
Format a timestamp with to_char
Produce a fixed numeric date string.
to_char✓ Tested
Generate a stepped sequence
Linux Commands: Use seq when a command pipeline needs a numeric sequence.
Linux Commands✓ Tested
Increment a stored value in the database
SQL: An in-database arithmetic update avoids a separate application read-modify-write step.
SQL✓ Tested
Increment a stored value in the database
SQL Server: An in-database arithmetic update avoids a separate application read-modify-write step.
SQL Server✓ Tested
Increment a stored value in the database
Postgres: An in-database arithmetic update avoids a separate application read-modify-write step.
Postgres✓ Tested
Increment a stored value in the database
SQLite: An in-database arithmetic update avoids a separate application read-modify-write step.
SQLite✓ Tested
Inspect components of a URI
Java: Use URI parsing instead of splitting a URL at punctuation manually.
Java✓ Tested
List the paths with unresolved merge conflicts
Git: The U diff filter identifies unmerged entries without parsing human-readable status output.
Git✓ Tested
Map an input range to an output range
Scale an integer reading to a different interval.
map✓ Tested