Results for “before”
Small, practical examples. Search by task or narrow things down below.
Filter rows before grouping
SQLite: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.
SQLite✓ Tested
Insert a sibling before an element
jQuery: before inserts outside the selected element.
jQuery✓ Tested
Prepare an owned directory before dropping root
Docker / Compose: Create and chown the writable application path before USER.
Docker / Compose✓ Tested
Report progress before completion
jQuery: notify calls registered progress handlers while the deferred is pending.
jQuery✓ Tested
Wait for a background job before reading its output
Bash Scripts: Save the job PID and wait explicitly before consuming files it produces.
Bash Scripts✓ Tested
Abort a conflicting rebase
Git: Abort returns the branch to its state before the rebase attempt.
Git✓ Tested
Add a forgotten file to the latest unpublished commit
Git: Stage the missing file before amending without changing the message.
Git✓ Tested
Allocate and free a typed array
C: Use sizeof on the pointed-to type and check allocation success before writing.
C✓ Tested
Append text only when the destination has enough capacity
C: Check the combined lengths including the terminator before using strcat.
C✓ Tested
Assemble a big-endian 16-bit value
Arduino / C: Cast to an unsigned 16-bit type before shifting the high byte.
Arduino / C✓ Tested
Calculate a least common multiple using a GCD
C: Divide before multiplying to reduce the risk of intermediate overflow.
C✓ Tested
Calculate each group’s integer percentage of the total
SQL: Multiply before division and protect against a zero denominator.
SQL✓ Tested