FIND YOUR NEXT FEW LINES

Results for “od”

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

740 snippets foundClear filters
HTMLInput constraints

Validate a structured text identifier

HTML: The pattern attribute matches the entire nonempty input; required handles the empty case.

HTML✓ Tested
HTMLForms

Validate an email input

Use browser constraint validation for a required HTML email field.

HTML✓ 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
AngularTemplate-driven forms

Validate email syntax with Angular’s email validator

Validate email syntax with Angular’s email validator with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
HTMLInput constraints

Validate the shape of an absolute URL

HTML: A URL input checks syntax, not whether a resource exists or is safe.

HTML✓ Tested
JavaScriptGetting Started

Visit every item in a collection

JavaScript: Print each element in the collection’s original order.

JavaScript✓ Tested
TypeScriptGetting Started

Visit every item in a collection

TypeScript: Print each element in the collection’s original order.

TypeScript✓ Tested
Bash ScriptsProcesses & environment

Wait for a background job before reading its output

Bash Scripts: Save the job PID and wait explicitly before consuming files it produces.

Bash Scripts✓ 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
JavaScriptFiles & async

Wait for multiple promises

Use Promise.all to collect JavaScript results in input order.

JavaScript✓ Tested
PythonJSON & CSV

Write a JSON file

Save a dictionary as readable, indented JSON while preserving Unicode characters.

json✓ Tested
JavaFiles & paths

Write a UTF-8 file

Write a Java string to a file using an explicit text encoding.

Java✓ Tested