FIND YOUR NEXT FEW LINES

Results for “UTC date operations”

Small, practical examples. Search by task or narrow things down below.

395 snippets foundClear filters
JavaQueues & collection operations

Take an immutable list snapshot

Java: List.copyOf protects the snapshot from later changes to the source list.

Java✓ Tested
PowerShellArray operations

Test whether an array contains a value

PowerShell: The contains operator compares complete items rather than matching substrings.

PowerShell✓ Tested
CSmall algorithms & bit operations

Test whether an unsigned value is a power of two

C: A nonzero power of two has exactly one set bit.

C✓ Tested
JavaQueues & collection operations

Use a deque as a FIFO queue

Java: Add at the tail and remove at the head using ArrayDeque.

Java✓ Tested
JavaQueues & collection operations

Use a deque as a stack

Java: Use push and pop for last-in, first-out behavior.

Java✓ Tested
Bash ScriptsArray operations

Visit associative-array keys in a stable order

Bash Scripts: Associative arrays have no defined iteration order, so sort their keys explicitly.

Bash Scripts✓ Tested
JavaFile operations & binary data

Visit files recursively

Java: Close the stream returned by Files.walk and sort relative paths for stable output.

Java✓ Tested
Arduino / CData & storage

Write and read a setting in EEPROM

Persist one byte using the update operation.

EEPROM✓ Tested
JavaFile operations & binary data

Write and read binary bytes

Java: Use the byte-oriented Files methods when text encoding should not be involved.

Java✓ Tested
C++Filesystem operations

Write and read bytes without text conversion

C++: Use binary stream modes and check each I/O operation before consuming its result.

C++✓ Tested
C#File operations & paths

Write and read raw bytes

C#: Use the byte-oriented file APIs when no text encoding should be applied.

C#✓ Tested
C++Containers & compound values

Add and remove values at both ends

C++: Deque supports efficient end operations without requiring contiguous storage.

C++✓ Tested