Results for “one”
Small, practical examples. Search by task or narrow things down below.
Find shared members of two sets
JavaScript: Filter one set through the other set’s membership test.
JavaScript✓ Tested
Find shared members of two sets
TypeScript: Filter one set through the other set’s membership test.
TypeScript✓ Tested
Find the largest array value
Track the maximum in a nonempty C integer array.
C✓ Tested
Flatten a single nesting level
JavaScript: flat defaults to a depth of one and creates a new array.
JavaScript✓ Tested
Flatten a single nesting level
TypeScript: flat defaults to a depth of one and creates a new array.
TypeScript✓ Tested
Flatten nested collections
Java: Use flatMap to concatenate nested Java lists into one stream.
Java✓ Tested
Flatten nested collections with SelectMany
C#: Concatenate the items from several sequences into one sequence.
C#✓ Tested
Focus an input through a ref
Focus an input through a ref with a small React component and explicit browser behavior.
React✓ Tested
Focus an input through its template reference
Focus an input through its template reference with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Format a bounded duration as hours minutes and seconds
PowerShell: TimeSpan can format duration components with escaped separators.
PowerShell✓ Tested
Format a fractional value as a percentage
Format a fractional value as a percentage with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Format a known UTC timestamp
Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.
Linux Commands✓ Tested