FIND YOUR NEXT FEW LINES

Results for “tr”

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

1534 snippets foundClear filters
ReactContext & shared state

Validate access through a custom context hook

Validate access through a custom context hook with a small React component and explicit browser behavior.

React✓ 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
Bash ScriptsArguments & decisions

Validate the number of positional arguments

Bash Scripts: Use the argument count to enforce a simple command-line contract.

Bash Scripts✓ Tested
Linux CommandsArchive integrity & packaging

Verify a file against a checksum manifest

Linux Commands: Use sha256sum -c with a manifest obtained from a trusted source.

Linux Commands✓ Tested
TypeScriptGetting Started

Visit every item in a collection

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

TypeScript✓ Tested
C++Getting Started

Visit every item in a collection

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

C++✓ Tested
CGetting Started

Visit every item in a collection

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

C✓ Tested
Arduino / CGetting Started

Visit every reading in a fixed array

Arduino / C: Visit every reading in a fixed array on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
JavaFile operations & binary data

Visit files recursively

Java: Close the stream returned by Files.walk and sort relative paths for stable output.

Java✓ Tested
jQueryTraversal & selection

Visit selected elements

Use jQuery each to label every item with its one-based position.

jQuery✓ Tested