Results for “Dates & precise numbers”
Small, practical examples. Search by task or narrow things down below.
Set and test bit flags
Use unsigned masks to combine and test C flags.
C✓ Tested
Split a string into words
Split text on whitespace, automatically treating repeated spaces, tabs, and line breaks as a single separator.
string✓ Tested
Split delimited text with positions
Retain original order with STRING_SPLIT ordinals.
STRING_SPLIT✓ Tested
Sum a range of integers
Use an arithmetic loop without launching external processes.
arithmetic✓ Tested
Sum integer values
Sum a C# sequence using LINQ.
C#✓ Tested
Sum vector values
Use std::accumulate with a wide initial value.
C++✓ Tested
Swap two integers
Use a temporary value to swap C integers without arithmetic overflow.
C✓ Tested
Update one row using its primary key
SQL: Use a precise WHERE condition to change only the intended row in a scratch table.
SQL✓ Tested
Update one row using its primary key
SQL Server: Use a precise WHERE condition to change only the intended row in a scratch table.
SQL Server✓ Tested
Update one row using its primary key
Postgres: Use a precise WHERE condition to change only the intended row in a scratch table.
Postgres✓ Tested
Update one row using its primary key
SQLite: Use a precise WHERE condition to change only the intended row in a scratch table.
SQLite✓ Tested
Update rows selected by a related table
SQL: Use EXISTS to limit updates based on an independent eligibility table.
SQL✓ Tested