Results for “index”
Small, practical examples. Search by task or narrow things down below.
Enforce uniqueness with a dedicated index
Postgres: A unique index rejects a duplicate combination independently of query plans.
Postgres✓ Tested
Enforce uniqueness with a dedicated index
SQLite: A unique index rejects a duplicate combination independently of query plans.
SQLite✓ Tested
Expose the current index in @for
Expose the current index in @for with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Filter an array in place with a write index
C: Only retained values advance the write position.
C✓ Tested
Find an item’s index
Find an item’s index using a complete Go program with explicit sample inputs.
Go✓ Tested
Find the index of an array item
PowerShell: Array.IndexOf returns -1 when the requested item is absent.
PowerShell✓ Tested
Index records by a unique key
Java: Use toMap with an explicit merge rule so duplicate keys have defined behavior.
Java✓ Tested
Keep a child’s large z-index inside a stacking context
CSS: Isolation creates a stacking context so an internal stack level cannot outrank an outside sibling’s higher context.
CSS✓ Tested
Read the final array item with a negative index
JavaScript: at supports negative positions counted from the end.
JavaScript✓ Tested
Read the final array item with a negative index
TypeScript: at supports negative positions counted from the end.
TypeScript✓ Tested
Remove an indexed element and compact the array
Bash Scripts: Unsetting an element leaves a gap; reassigning the values creates consecutive indices.
Bash Scripts✓ Tested
Restore the index state recorded in a stash
Git: Apply with index restores which changes were staged as well as their file contents.
Git✓ Tested