Results for “as”
Small, practical examples. Search by task or narrow things down below.
Inspect the parsed pieces of a URL
TypeScript: Use URL properties rather than splitting a URL at punctuation.
TypeScript✓ Tested
Interpolate between two calibration points
Arduino / C: Compute a fractional position before scaling to the output interval.
Arduino / C✓ Tested
Invert a dictionary with unique values
Python: Swap keys and values when the values are hashable and unique.
Python✓ Tested
Isolate a value with a different writing direction
HTML: Bdi isolates embedded user text so its direction does not reorder surrounding punctuation.
HTML✓ Tested
Iterate over a fixed array of records
C: Compute the array element count with sizeof at the point where it is still an array.
C✓ Tested
Iterate over all regular-expression matches
C++: A regex iterator yields successive matches without manually updating an offset.
C++✓ Tested
Iterate over bounded chunks
Iterate over bounded chunks using a complete Go program with explicit sample inputs.
Go✓ Tested
Iterate over keys in sorted order
Iterate over keys in sorted order in a complete Rust program using the standard library.
Rust✓ Tested
Iterate with array indices and values
TypeScript: entries provides each position and value without a separate counter.
TypeScript✓ Tested
Join a parent to pre-aggregated totals
SQL: Aggregate the child rows first to produce at most one joined row per parent.
SQL✓ Tested
Join a parent to pre-aggregated totals
SQL Server: Aggregate the child rows first to produce at most one joined row per parent.
SQL Server✓ Tested
Join a parent to pre-aggregated totals
Postgres: Aggregate the child rows first to produce at most one joined row per parent.
Postgres✓ Tested