Results for “tr”
Small, practical examples. Search by task or narrow things down below.
Clamp a value to a range
Use C++17 clamp to bound a numeric value.
C++✓ Tested
Clamp an integer to inclusive bounds
C: Explicit comparisons avoid relying on nonstandard min or max macros.
C✓ Tested
Clean up a generator after an early break
TypeScript: Breaking a for-of loop closes a generator and runs its finally block.
TypeScript✓ Tested
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
Clear a flag without affecting neighboring bits
Arduino / C: bitClear resets only the selected bit.
Arduino / C✓ Tested
Clear an owning pointer after releasing its allocation
C: Assigning NULL helps prevent accidental reuse through the same variable.
C✓ Tested
Collapse a panel after an animation
jQuery: slideUp hides the panel when the transition completes.
jQuery✓ Tested
Collect a serial line in a fixed buffer
Read a short command without dynamic String allocation.
serial line✓ Tested
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
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
Collect several checked values under one name
HTML: Only checked named checkboxes become successful form controls.
HTML✓ Tested
Combine independent asynchronous results
Combine independent asynchronous results with a small React component and explicit browser behavior.
React✓ Tested