Results for “one-off”
Small, practical examples. Search by task or narrow things down below.
Calculate a value inside JSX
Calculate a value inside JSX with a small React component and explicit browser behavior.
React✓ Tested
Calculate derived state during rendering
Calculate derived state during rendering with a small React component and explicit browser behavior.
React✓ Tested
Calculate differences between adjacent readings
JavaScript: Slice off the first value and compare each remaining value with its predecessor.
JavaScript✓ Tested
Calculate differences between adjacent readings
TypeScript: Slice off the first value and compare each remaining value with its predecessor.
TypeScript✓ Tested
Calculate several numeric stream statistics
Java: Use summaryStatistics to calculate count, sum, minimum, maximum, and average in one pass.
Java✓ Tested
Calculate with integer arithmetic
Bash Scripts: Calculate with integer arithmetic with a small standalone Bash program.
Bash Scripts✓ Tested
Cancel an asynchronous operation on unmount
Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.
React✓ Tested
Capitalize words with TitleCasePipe
Capitalize words with TitleCasePipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Capture a command’s output
Bash Scripts: Capture a command’s output with a small standalone Bash program.
Bash Scripts✓ Tested
Centralize a reusable validation rule
Centralize a reusable validation rule with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Centralize state changes in a reducer
Centralize state changes in a reducer with a small React component and explicit browser behavior.
React✓ Tested
Change a control’s appearance on hover
CSS: Hover applies while a pointing device is positioned over the element.
CSS✓ Tested