Results for “ring”
Small, practical examples. Search by task or narrow things down below.
Pass a variable to standard input
Bash Scripts: A here-string supplies the expanded value followed by a newline.
Bash Scripts✓ Tested
Preserve equal-key order while sorting records
C++: stable_sort retains encounter order for records whose selected sort keys compare equal.
C++✓ Tested
Preview removal of an untracked scratch file
Git: The dry-run flag shows what clean would remove without deleting it.
Git✓ Tested
Read a fixed-size stream prefix
Read a fixed-size stream prefix using a complete Go program with explicit sample inputs.
Go✓ Tested
Remove a prefix only when it matches
Remove a prefix only when it matches in a complete Rust program using the standard library.
Rust✓ Tested
Remove an optional prefix
Remove an optional prefix using a complete Go program with explicit sample inputs.
Go✓ Tested
Remove only a named untracked scratch file
Git: Use a narrow pathspec after reviewing the dry run; clean cannot recover untracked content.
Git✓ Tested
Render a bounded preview of a long list
Render a bounded preview of a long list with a small React component and explicit browser behavior.
React✓ Tested
Render a helpful empty state
Render a helpful empty state with a small React component and explicit browser behavior.
React✓ Tested
Render a semantic data table
Render a semantic data table with a small React component and explicit browser behavior.
React✓ Tested
Render nested groups with stable keys
Render nested groups with stable keys with a small React component and explicit browser behavior.
React✓ Tested
Replace an array segment in place
JavaScript: splice returns removed items and inserts replacements at the chosen position.
JavaScript✓ Tested