Results for “tr”
Small, practical examples. Search by task or narrow things down below.
Submit a readonly value while preventing edits
HTML: Readonly controls remain in form data, unlike disabled controls.
HTML✓ Tested
Subscribe to a small external store safely
Subscribe to a small external store safely with a small React component and explicit browser behavior.
React✓ Tested
Subscribe to and clean up a window event
Subscribe to and clean up a window event with a small React component and explicit browser behavior.
React✓ Tested
Substitute a value for NULL
Use SQL Server’s ISNULL expression.
ISNULL✓ Tested
Sum array values
Iterate over a fixed C array using a size-derived element count.
C✓ Tested
Sum integer values
Reduce a Java integer stream to its sum.
Java✓ Tested
Sum the decimal digits of an unsigned integer
C: Repeated division and remainder extract digits without converting to text.
C✓ Tested
Sum typed values with reduce
Accumulate numeric array elements.
reduce✓ Tested
Sum vector values
Use std::accumulate with a wide initial value.
C++✓ Tested
Supply a default prop value
Supply a default prop value with a small React component and explicit browser behavior.
React✓ Tested
Swap owned buffers by swapping their pointers
C: Pointer swaps avoid copying the underlying data.
C✓ Tested
Swap two integers
Use a temporary value to swap C integers without arithmetic overflow.
C✓ Tested