Results for “UTC date operations”
Small, practical examples. Search by task or narrow things down below.
Remove duplicate values while keeping the smallest key
SQL Server: Identify retained keys in a grouped subquery before deleting other copies.
SQL Server✓ Tested
Remove duplicate values while keeping the smallest key
Postgres: Identify retained keys in a grouped subquery before deleting other copies.
Postgres✓ Tested
Remove duplicate values while keeping the smallest key
SQLite: Identify retained keys in a grouped subquery before deleting other copies.
SQLite✓ Tested
Rename a file in its current directory
PowerShell: Rename-Item changes the name without moving the item to another directory.
PowerShell✓ Tested
Rename a file within a directory
Python: Use Path.rename and inspect the resulting path.
Python✓ Tested
Rename a known file through filesystem
C++: filesystem::rename reports an error by exception when the operation fails.
C++✓ Tested
Replace a nested JSONB value
Change one path with jsonb_set.
jsonb_set✓ Tested
Replace a path extension
C#: Path.ChangeExtension transforms a path string without moving or creating a file.
C#✓ Tested
Restrict a function parameter to known choices
PowerShell: ValidateSet rejects unsupported values before the function body executes.
PowerShell✓ Tested
Retrieve the smallest queued value first
Java: PriorityQueue poll removes the smallest value under the natural ordering.
Java✓ Tested
Reverse a copy while preserving the source
PowerShell: Clone the array before using Array.Reverse because Reverse mutates its argument.
PowerShell✓ Tested
Round a decimal using an explicit midpoint rule
C#: Use decimal literals for decimal arithmetic and choose the midpoint rounding behavior.
C#✓ Tested