Results for “as”
Small, practical examples. Search by task or narrow things down below.
Bind a narrowed value using an @if alias
Bind a narrowed value using an @if alias with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Calculate a least common multiple using a GCD
C: Divide before multiplying to reduce the risk of intermediate overflow.
C✓ Tested
Cancel an asynchronous operation on unmount
Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.
React✓ Tested
Capitalize words with TitleCasePipe
Capitalize words with TitleCasePipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Check a deterministic result with an assertion
Check a deterministic result with an assertion in a complete Rust program using the standard library.
Rust✓ Tested
Check a function with table-driven cases
Check a function with table-driven cases using a complete Go program with explicit sample inputs.
Go✓ Tested
Check a suffix without case sensitivity
PowerShell: Use an ordinal case-insensitive comparison for a known filename extension.
PowerShell✓ Tested
Check an extension without case sensitivity
C#: Use an explicit ordinal case-insensitive comparison for a known filename suffix.
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 that an image has layer history
Docker / Compose: history shows the instructions associated with image layers.
Docker / Compose✓ Tested
Check whether a function has been defined
Bash Scripts: declare -F tests a function name without executing it.
Bash Scripts✓ Tested
Check whether text contains a phrase
Use a case-sensitive Java substring check.
Java✓ Tested