FIND YOUR NEXT FEW LINES

Results for “tr”

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

1534 snippets foundClear filters
JavaStream transformations

Group strings by their length

Java: Choose a TreeMap supplier when group keys must have deterministic order.

Java✓ Tested
C++Filesystem operations

Handle a failed file open through stream state

C++: An unopened input stream is not an empty successful file read.

C++✓ Tested
C++Numeric parsing & calculations

Handle a failed string-to-integer conversion

C++: stoi throws invalid_argument when no conversion can be performed.

C++✓ Tested
CFile positioning & lifecycle

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
CSSResponsive conditions & sizing

Hide interface controls in print layout

CSS: A print media query can retain article content while removing interactive controls.

CSS✓ Tested
RustFunctions & data types

Implement a method on a struct

Implement a method on a struct in a complete Rust program using the standard library.

Rust✓ Tested
GitStashing selected work

Include untracked files in a stash

Git: The include-untracked option saves new files along with tracked edits.

Git✓ Tested
JavaQueues & collection operations

Initialize a map entry only when absent

Java: Use computeIfAbsent when creating a collection for a new key.

Java✓ Tested
CStructures & function interfaces

Initialize structure fields by name

C: Designated initializers make field assignments independent of their declaration order.

C✓ Tested
PowerShellGetting Started

Insert a variable into a string

PowerShell: Insert a variable into a string using PowerShell 7.

PowerShell✓ Tested
RustMaps & sets

Insert and retrieve a map value

Insert and retrieve a map value in a complete Rust program using the standard library.

Rust✓ Tested
GitGetting Started

Inspect a clean working tree

Git: Inspect a clean working tree inside the disposable repository created by the input setup.

Git✓ Tested