Results for “ring”
Small, practical examples. Search by task or narrow things down below.
Replace an array segment in place
TypeScript: splice returns removed items and inserts replacements at the chosen position.
TypeScript✓ Tested
Replace literal text
Replace literal text using a complete Go program with explicit sample inputs.
Go✓ Tested
Represent a hierarchy with nested lists
HTML: Place the nested list inside its parent list item to preserve the hierarchy.
HTML✓ Tested
Restore a file’s content from an older commit
Git: Specify a source revision when the desired contents are not in the current index.
Git✓ Tested
Reverse a copy while preserving the original
JavaScript: Copy before reverse because reverse mutates the array it receives.
JavaScript✓ Tested
Reverse a copy while preserving the original
TypeScript: Copy before reverse because reverse mutates the array it receives.
TypeScript✓ Tested
Separate table headings data and totals
HTML: Thead, tbody, and tfoot group rows according to their purpose.
HTML✓ Tested
Serialize an object
Turn a JavaScript object into JSON text.
JavaScript✓ Tested
Set consistent widths for table columns
HTML: A colgroup applies presentation to whole columns without repeating styles on every cell.
HTML✓ Tested
Show the count of matching records
Show the count of matching records with a small React component and explicit browser behavior.
React✓ Tested
Sort a copy without mutating the original list
Sort a copy without mutating the original list with a small React component and explicit browser behavior.
React✓ Tested
Sort only the smallest requested prefix
C++: partial_sort orders the selected prefix without guaranteeing the order of the remainder.
C++✓ Tested