FIND YOUR NEXT FEW LINES

Results for “or”

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

2638 snippets foundClear filters
ReactRefs & DOM interaction

Observe when a DOM node is attached

Observe when a DOM node is attached with a small React component and explicit browser behavior.

React✓ Tested
HTMLMetadata & document links

Offer a downloadable text file

HTML: The download attribute supplies a filename for this same-document data URL.

HTML✓ Tested
HTMLForms

Offer a selection list

Provide a labeled HTML select with a default option.

HTML✓ Tested
HTMLLinks & accessibility

Open a link in a separate tab

Declare a separate browsing context with an explicit noopener relationship.

HTML✓ Tested
HTMLNative disclosure & dialogs

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
ReactRefs & DOM interaction

Open and close a native dialog

Open and close a native dialog with a small React component and explicit browser behavior.

React✓ Tested
Docker / ComposeCompose service options

Override an env-file value explicitly

Docker / Compose: The environment section takes precedence over env_file.

Docker / Compose✓ Tested
Docker / ComposeExecution & file transfer

Override an image’s entrypoint at runtime

Docker / Compose: An explicit entrypoint replaces the image entrypoint for this invocation.

Docker / Compose✓ Tested
ReactContext & shared state

Override context in a nested section

Override context in a nested section with a small React component and explicit browser behavior.

React✓ Tested
Docker / ComposeCompose service options

Override the image entrypoint in Compose

Docker / Compose: entrypoint and command combine as executable and arguments.

Docker / Compose✓ Tested
RustTesting & reusable patterns

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
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / C✓ Tested