Results for “comm”
Small, practical examples. Search by task or narrow things down below.
Calculate a simple total
TypeScript: Multiply a unit price by a quantity, then add a delivery fee.
TypeScript✓ 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
TypeScript: Use BigInt operands together to avoid precision loss.
TypeScript✓ Tested
Call a library function
TypeScript: Use a standard absolute-value function with a small negative number.
TypeScript✓ Tested
Change directory only for one operation
Bash Scripts: A subshell makes a temporary directory change without affecting later commands.
Bash Scripts✓ Tested
Check a change for whitespace problems
Git: Check a change for whitespace problems inside the disposable repository created by the input setup.
Git✓ Tested
Check a script’s syntax without executing its body
Bash Scripts: bash -n parses commands but does not run ordinary script statements.
Bash Scripts✓ Tested
Check array membership with includes
TypeScript: includes uses SameValueZero comparison, which also matches NaN.
TypeScript✓ Tested
Check available disk space
Show total, used, and available filesystem space for the current directory in human-readable units.
disk✓ Tested
Check memory usage
Show memory and swap totals in human-readable units. The available column estimates memory usable by new applications.
memory✓ Tested
Check out another branch in a second working tree
Git: A linked worktree shares repository objects while maintaining a separate checked-out branch.
Git✓ Tested
Check that an image has layer history
Docker / Compose: history shows the instructions associated with image layers.
Docker / Compose✓ Tested