Results for “Collections & data structures”
Small, practical examples. Search by task or narrow things down below.
Store an object associated with an element
jQuery: data retains JavaScript values without serializing them into HTML attributes.
jQuery✓ Tested
Suggest a browser interface color
HTML: Theme-color is a browser chrome hint and does not style the page itself.
HTML✓ Tested
Supply a title and URL for link previews
HTML: Open Graph metadata describes a shared page without changing its visible content.
HTML✓ Tested
Test missing values with IS NULL
Find rows where an optional value is absent.
IS NULL✓ Tested
Tie a subscription’s lifetime to its component
Tie a subscription’s lifetime to its component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Track which union member is currently valid
C: An explicit tag tells callers which overlaid union value to read.
C✓ Tested
Transform a collection into a plain array
jQuery: map followed by get returns ordinary JavaScript values.
jQuery✓ Tested
Transform an observable value
Transform an observable value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Use an associated constructor
Use an associated constructor in a complete Rust program using the standard library.
Rust✓ Tested
Verify a read-only volume rejects writes
Docker / Compose: A failed write confirms the mount’s read-only behavior.
Docker / Compose✓ Tested
Visit files recursively
Java: Close the stream returned by Files.walk and sort relative paths for stable output.
Java✓ Tested
Wrap a value in a distinct type
Wrap a value in a distinct type in a complete Rust program using the standard library.
Rust✓ Tested