FIND YOUR NEXT FEW LINES

Results for “ring”

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

465 snippets foundClear filters
TypeScriptArray restructuring

Replace an array segment in place

TypeScript: splice returns removed items and inserts replacements at the chosen position.

TypeScript✓ Tested
GoStrings & text

Replace literal text

Replace literal text using a complete Go program with explicit sample inputs.

Go✓ Tested
HTMLTables & list numbering

Represent a hierarchy with nested lists

HTML: Place the nested list inside its parent list item to preserve the hierarchy.

HTML✓ Tested
GitRestoring & revising local work

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
JavaScriptArray restructuring

Reverse a copy while preserving the original

JavaScript: Copy before reverse because reverse mutates the array it receives.

JavaScript✓ Tested
TypeScriptArray restructuring

Reverse a copy while preserving the original

TypeScript: Copy before reverse because reverse mutates the array it receives.

TypeScript✓ Tested
HTMLTables & list numbering

Separate table headings data and totals

HTML: Thead, tbody, and tfoot group rows according to their purpose.

HTML✓ Tested
JavaScriptObjects & JSON

Serialize an object

Turn a JavaScript object into JSON text.

JavaScript✓ Tested
HTMLTables & list numbering

Set consistent widths for table columns

HTML: A colgroup applies presentation to whole columns without repeating styles on every cell.

HTML✓ Tested
ReactLists & filtering

Show the count of matching records

Show the count of matching records with a small React component and explicit browser behavior.

React✓ Tested
ReactLists & filtering

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
C++Ordering & set operations

Sort only the smallest requested prefix

C++: partial_sort orders the selected prefix without guaranteeing the order of the remainder.

C++✓ Tested