Results for “k”
Small, practical examples. Search by task or narrow things down below.
Normalize identifier case consistently
TypeScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.
TypeScript✓ Tested
Number items while iterating
Number items while iterating in a complete Rust program using the standard library.
Rust✓ Tested
Number rows within each group
Assign ordered row numbers with a window function.
row_number✓ Tested
Observe command substitution’s trailing-newline removal
Bash Scripts: Command substitution removes trailing newlines while preserving embedded ones.
Bash Scripts✓ Tested
Observe context cancellation
Observe context cancellation using a complete Go program with explicit sample inputs.
Go✓ Tested
Open and close a modal dialog
HTML: showModal places a dialog in the top layer and makes the rest of the document inert.
HTML✓ Tested
Open and close a native dialog
Open and close a native dialog with a small React component and explicit browser behavior.
React✓ Tested
Override context in a nested section
Override context in a nested section with a small React component and explicit browser behavior.
React✓ Tested
Own a heap-allocated value with Box
Own a heap-allocated value with Box in a complete Rust program using the standard library.
Rust✓ Tested
Own one dynamically allocated value with unique_ptr
C++: make_unique allocates a value whose lifetime is tied to its owning smart pointer.
C++✓ Tested
Page an ordered result
Skip rows and fetch a bounded page.
OFFSET✓ Tested
Page through a collection
Page through a collection with a standalone Angular component and explicit browser behavior.
Angular✓ Tested