Results for “Errors & optional values”
Small, practical examples. Search by task or narrow things down below.
Divide decimal values with controlled precision
Java: Choose both scale and rounding for a quotient that does not terminate in base ten.
Java✓ Tested
Drop all optional Linux capabilities
Docker / Compose: The effective capability mask becomes zero after cap-drop ALL.
Docker / Compose✓ Tested
Filter pipeline values
PowerShell: Filter pipeline values using PowerShell 7.
PowerShell✓ Tested
Filter values into a new slice
Filter values into a new slice using a complete Go program with explicit sample inputs.
Go✓ Tested
Find missing values with IS NULL
SQL: Use IS NULL rather than equality to test for missing data.
SQL✓ Tested
Find missing values with IS NULL
SQL Server: Use IS NULL rather than equality to test for missing data.
SQL Server✓ Tested
Find missing values with IS NULL
Postgres: Use IS NULL rather than equality to test for missing data.
Postgres✓ Tested
Find missing values with IS NULL
SQLite: Use IS NULL rather than equality to test for missing data.
SQLite✓ Tested
Find values common to two collections
C#: Intersect returns distinct values shared by the inputs.
C#✓ Tested
Find values missing from another collection
Python: Use a set difference to identify requested IDs absent from the available IDs.
Python✓ Tested
Find values missing from another collection
C#: Except removes duplicates as it calculates the set difference.
C#✓ Tested
Find values present in exactly one set
Python: Use symmetric difference when either side can contain unmatched values.
Python✓ Tested