Results for “before”
Small, practical examples. Search by task or narrow things down below.
Check an array allocation size before multiplying
C: Compare the requested element count against SIZE_MAX divided by element size.
C✓ Tested
Check an upper integer bound before adding
C++: For these nonnegative values, compare against the maximum minus the addend first.
C++✓ Tested
Check EEPROM capacity before a write
Arduino / C: length reports the available address count for this board.
Arduino / C✓ Tested
Check for a hashtable key before reading it
PowerShell: ContainsKey distinguishes a missing key from a key whose value happens to be null.
PowerShell✓ Tested
Check native form validity before proceeding
jQuery: Use the native checkValidity API from the selected form.
jQuery✓ Tested
Check positive integer addition before performing it
C: Check the upper boundary before adding two known nonnegative integers.
C✓ Tested
Clone a map before editing it
Clone a map before editing it using a complete Go program with explicit sample inputs.
Go✓ Tested
Escape plain text before placing it in HTML
PowerShell: HtmlEncode converts HTML delimiters to entities in ordinary text contexts.
PowerShell✓ Tested
Fill grid rows before moving to the next column
CSS: Column auto-flow fills the explicitly declared rows in each successive implicit column.
CSS✓ Tested
Filter rows before grouping
SQL: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.
SQL✓ Tested
Filter rows before grouping
SQL Server: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.
SQL Server✓ Tested
Filter rows before grouping
Postgres: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.
Postgres✓ Tested