Results for “Maps & sets”
Small, practical examples. Search by task or narrow things down below.
Position an item from the writing direction’s start edge
CSS: Logical insets follow direction, so inline-start is the right side in this RTL container.
CSS✓ Tested
Restart numbering at an individual list item
HTML: A value on one ordered-list item sets its ordinal and affects following items.
HTML✓ Tested
Set copied files’ numeric ownership
Docker / Compose: COPY --chown sets ownership while adding the file.
Docker / Compose✓ Tested
Set the open-file limit for a process
Docker / Compose: The nofile ulimit sets soft and hard file descriptor limits.
Docker / Compose✓ Tested
Sort a small array in place
Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.
Arduino / C✓ Tested
Sort timestamp strings by their parsed instants
JavaScript: Compare epoch values explicitly when date strings may contain different offsets.
JavaScript✓ Tested
Sort timestamp strings by their parsed instants
TypeScript: Compare epoch values explicitly when date strings may contain different offsets.
TypeScript✓ Tested
Split a list into fixed-size batches
Python: Slice a sequence at regular offsets; the final batch can be smaller.
Python✓ Tested
Start a disclosure open while keeping it collapsible
HTML: The open attribute sets the initial details state without JavaScript.
HTML✓ Tested
Uncommit a local change and leave its edits unstaged
Git: A mixed reset resets the index while retaining working-file contents.
Git✓ Tested