Results for “od”
Small, practical examples. Search by task or narrow things down below.
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 integers beyond Number’s precise range
JavaScript: Use BigInt operands together to avoid precision loss.
JavaScript✓ Tested
Calculate integers beyond Number’s precise range
TypeScript: Use BigInt operands together to avoid precision loss.
TypeScript✓ Tested
Call a library function
JavaScript: Use a standard absolute-value function with a small negative number.
JavaScript✓ Tested
Call a library function
TypeScript: Use a standard absolute-value function with a small negative number.
TypeScript✓ Tested
Capitalize words with TitleCasePipe
Capitalize words with TitleCasePipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Capture a successful child-process result
Python: Run an argument list without a shell and check the return code.
Python✓ Tested
Catch a T-SQL error
Handle an expected conversion error in TRY/CATCH.
TRY CATCH✓ Tested
Centralize a reusable validation rule
Centralize a reusable validation rule with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Check a literal filename suffix
C: Check lengths before subtracting so a short input cannot produce an invalid pointer.
C✓ Tested
Check a literal prefix in C++17
C++: Use string compare because starts_with was introduced after C++17.
C++✓ Tested