Results for “tr”
Small, practical examples. Search by task or narrow things down below.
Group strings by their length
Java: Choose a TreeMap supplier when group keys must have deterministic order.
Java✓ Tested
Handle a failed file open through stream state
C++: An unopened input stream is not an empty successful file read.
C++✓ Tested
Handle a failed string-to-integer conversion
C++: stoi throws invalid_argument when no conversion can be performed.
C++✓ Tested
Handle a missing file without treating it as an empty file
C: Inspect errno after a failed fopen to distinguish the documented missing-path condition.
C✓ Tested
Hide interface controls in print layout
CSS: A print media query can retain article content while removing interactive controls.
CSS✓ Tested
Implement a method on a struct
Implement a method on a struct in a complete Rust program using the standard library.
Rust✓ Tested
Include untracked files in a stash
Git: The include-untracked option saves new files along with tracked edits.
Git✓ Tested
Initialize a map entry only when absent
Java: Use computeIfAbsent when creating a collection for a new key.
Java✓ Tested
Initialize structure fields by name
C: Designated initializers make field assignments independent of their declaration order.
C✓ Tested
Insert a variable into a string
PowerShell: Insert a variable into a string using PowerShell 7.
PowerShell✓ Tested
Insert and retrieve a map value
Insert and retrieve a map value in a complete Rust program using the standard library.
Rust✓ Tested
Inspect a clean working tree
Git: Inspect a clean working tree inside the disposable repository created by the input setup.
Git✓ Tested