Results for “as”
Small, practical examples. Search by task or narrow things down below.
Use a fixed-size container with bounds checking
C++: std::array retains its element count and supports checked access through at.
C++✓ Tested
Use a literal value in a regular expression
PowerShell: Regex.Escape prevents a literal dot or other metacharacter from changing the match.
PowerShell✓ Tested
Use a nonnegative remainder for cyclic indexing
Use a nonnegative remainder for cyclic indexing in a complete Rust program using the standard library.
Rust✓ Tested
Use a session-scoped temporary table
Store intermediate rows in a local # table.
temporary table✓ Tested
Use a small table variable
Declare rows for a short batch.
table variable✓ Tested
Use a wider type for a large count
Arduino / C: Use a wider type for a large count on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Use an automatically removed temporary file
C: tmpfile creates a binary update stream whose file is removed when closed.
C✓ Tested
Use an optional fallback
Use Optional.orElse to provide a default for a missing Java value.
Java✓ Tested
Use headings to show document structure
HTML: Learn how to use headings to show document structure in a complete browser example.
HTML✓ Tested
Use if to produce a value
Use if to produce a value in a complete Rust program using the standard library.
Rust✓ Tested
Use named states for a controller
Arduino / C: An enum makes state transitions easier to read than unexplained numbers.
Arduino / C✓ Tested
Use semantic page landmarks
HTML: Learn how to use semantic page landmarks in a complete browser example.
HTML✓ Tested