FIND YOUR NEXT FEW LINES

Results for “tar”

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

1058 snippets foundClear filters
Arduino / CArrays & embedded state

Use named states for a controller

Arduino / C: An enum makes state transitions easier to read than unexplained numbers.

Arduino / C✓ Tested
TypeScriptPromises & iteration protocols

Use the first fulfilled promise result

TypeScript: Promise.any ignores individual rejections until one input fulfills.

TypeScript✓ Tested
Arduino / CSerial protocols

Validate a complete numeric serial command

Arduino / C: Check for digits, an end pointer, and an application-specific range.

Arduino / C✓ Tested
TypeScriptNumbers & numeric validation

Validate a finite numeric value without coercion

TypeScript: Number.isFinite rejects numeric strings as well as NaN and infinity.

TypeScript✓ Tested
Arduino / CEEPROM & program memory

Validate a small stored payload with a checksum

Arduino / C: Store a checksum with the payload and reject a changed byte.

Arduino / C✓ Tested
TypeScriptRegular expressions & URL encoding

Validate a whole ASCII identifier

TypeScript: Use an anchored expression without the multiline flag and reject a trailing line break explicitly.

TypeScript✓ Tested
TypeScriptSafe data handling

Validate an unknown value with a type guard

Check a field before treating unknown data as a typed object.

unknown✓ Tested
Docker / ComposeNetworks & volume metadata

Verify a read-only volume rejects writes

Docker / Compose: A failed write confirms the mount’s read-only behavior.

Docker / Compose✓ Tested
Docker / ComposeContainer lifecycle

Verify that a one-off container was removed

Docker / Compose: An automatically removed container no longer appears in an exact-name listing.

Docker / Compose✓ Tested
Docker / ComposeContainer lifecycle

Wait for a container to exit

Docker / Compose: wait blocks until the container stops and prints its exit code.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Wait for a healthy Compose dependency

Docker / Compose: The service_healthy dependency condition waits for the dependency’s health command to succeed.

Docker / Compose✓ Tested
Docker / ComposeLimits & process security

Wait for an actual container health check

Docker / Compose: Health reports readiness independently from process startup.

Docker / Compose✓ Tested