Results for “dates”
Small, practical examples. Search by task or narrow things down below.
Increment a shared counter safely
C++: Atomic increments prevent lost updates when two threads change the same counter.
C++✓ Tested
Join rows in a chosen order
Aggregate text with STRING_AGG and WITHIN GROUP.
STRING_AGG✓ Tested
Join strings with a separator
Combine a list of strings into one readable string with a separator between each item.
string✓ Tested
Keep loop state by avoiding a pipeline subshell
Bash Scripts: Redirect input into a while loop so updates to a counter remain in the current shell.
Bash Scripts✓ Tested
Parse an integer safely
Handle invalid Java integer input with NumberFormatException.
Java✓ Tested
Parse and format a date
Convert a date string into a datetime object, then format it in a different, human-readable order.
date✓ Tested
Read a JSON property
Parse a JSON document and dispose it after reading in C#.
C#✓ Tested
Rename a configured remote
Git: Renaming a remote updates its associated configuration and remote-tracking references.
Git✓ Tested
Rename a container without recreating it
Docker / Compose: rename updates the container name while preserving its identity.
Docker / Compose✓ Tested
Replace text in a string
Replace every occurrence of a substring and keep the result in a new string. The original string is unchanged.
string✓ Tested
Replay an unpublished branch on a newer base
Git: Rebase updates the base of local feature commits when their changes do not conflict.
Git✓ Tested
Restrict a function parameter to known choices
PowerShell: ValidateSet rejects unsupported values before the function body executes.
PowerShell✓ Tested