Results for “Promise.all”
Small, practical examples. Search by task or narrow things down below.
Calculate each group’s integer percentage of the total
Postgres: Multiply before division and protect against a zero denominator.
Postgres✓ Tested
Calculate each group’s integer percentage of the total
SQLite: Multiply before division and protect against a zero denominator.
SQLite✓ Tested
Calculate each group’s numeric spread
SQL: Subtract MIN from MAX to report the difference between extremes.
SQL✓ Tested
Calculate each group’s numeric spread
SQL Server: Subtract MIN from MAX to report the difference between extremes.
SQL Server✓ Tested
Calculate each group’s numeric spread
Postgres: Subtract MIN from MAX to report the difference between extremes.
Postgres✓ Tested
Calculate each group’s numeric spread
SQLite: Subtract MIN from MAX to report the difference between extremes.
SQLite✓ Tested
Calculate the dot product of two vectors
C++: inner_product multiplies corresponding elements and accumulates them from a chosen seed.
C++✓ 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
Capture a command’s output
Bash Scripts: Capture a command’s output with a small standalone Bash program.
Bash Scripts✓ Tested
Capture output while handling a failed command
Bash Scripts: An assignment inherits the status of its command substitution, allowing both output and status to be handled.
Bash Scripts✓ Tested
Center a fixed-size absolute child with auto margins
CSS: An all-zero inset plus auto margins distributes the available space around the child.
CSS✓ Tested