Results for “Ordering & set operations”
Small, practical examples. Search by task or narrow things down below.
Read date components in UTC
TypeScript: UTC accessors avoid differences caused by the machine’s local timezone.
TypeScript✓ Tested
Read the byte size of a regular file
C++: file_size reads filesystem metadata without loading file contents.
C++✓ Tested
Read the last array element
PowerShell: A negative array index counts backward from the end.
PowerShell✓ Tested
Remove a variable from one child’s environment
Bash Scripts: env -u removes an inherited value for a single command.
Bash Scripts✓ Tested
Remove an entry and inspect its value
Remove an entry and inspect its value in a complete Rust program using the standard library.
Rust✓ Tested
Remove and return a dictionary entry
Python: Use pop with a default when a missing entry is an expected condition.
Python✓ Tested
Remove collection items that satisfy a condition
Java: Use removeIf on a mutable collection to avoid changing it manually inside a for-each loop.
Java✓ 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