FIND YOUR NEXT FEW LINES

Results for “tr”

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

1534 snippets foundClear filters
C++Numbers & algorithms

Clamp a value to a range

Use C++17 clamp to bound a numeric value.

C++✓ Tested
CNumeric parsing & arithmetic

Clamp an integer to inclusive bounds

C: Explicit comparisons avoid relying on nonstandard min or max macros.

C✓ Tested
TypeScriptPromises & iteration protocols

Clean up a generator after an early break

TypeScript: Breaking a for-of loop closes a generator and runs its finally block.

TypeScript✓ Tested
ReactEffects & lifecycle

Clean up a subscription when a child unmounts

Clean up a subscription when a child unmounts with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CBinary values & packets

Clear a flag without affecting neighboring bits

Arduino / C: bitClear resets only the selected bit.

Arduino / C✓ Tested
CDynamic memory & ownership

Clear an owning pointer after releasing its allocation

C: Assigning NULL helps prevent accidental reuse through the same variable.

C✓ Tested
jQueryAnimation completion

Collapse a panel after an animation

jQuery: slideUp hides the panel when the transition completes.

jQuery✓ Tested
Arduino / CSerial communication

Collect a serial line in a fixed buffer

Read a short command without dynamic String allocation.

serial line✓ Tested
AngularServices & dependency injection

Collect multiple values through a multi provider

Collect multiple values through a multi provider with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactForms & validation

Collect selected options from a multi-select

Collect selected options from a multi-select with a small React component and explicit browser behavior.

React✓ Tested
HTMLForm behavior

Collect several checked values under one name

HTML: Only checked named checkboxes become successful form controls.

HTML✓ Tested
ReactAsync work & status

Combine independent asynchronous results

Combine independent asynchronous results with a small React component and explicit browser behavior.

React✓ Tested