Results for “as”
Small, practical examples. Search by task or narrow things down below.
Name complementary content
HTML: Aside identifies supporting content related to the main document.
HTML✓ Tested
Observe cancellation through a token
C#: A cancellation token is cooperative; operations must check it or accept it as an argument.
C#✓ Tested
Observe command substitution’s trailing-newline removal
Bash Scripts: Command substitution removes trailing newlines while preserving embedded ones.
Bash Scripts✓ Tested
Offer a retry after a failed attempt
Offer a retry after a failed attempt with a small React component and explicit browser behavior.
React✓ Tested
Pad a numeric label
Convert a number to text and pad it to a fixed width.
JavaScript✓ Tested
Pair corresponding array items by position
JavaScript: Validate equal lengths before zipping when missing counterparts would be an error.
JavaScript✓ Tested
Parse a GUID without an exception
C#: TryParse reports malformed values with a boolean return.
C#✓ Tested
Parse a hexadecimal integer with from_chars
C++: An explicit radix controls digit interpretation without a locale dependency.
C++✓ Tested
Parse a small set of long options
Bash Scripts: Use a loop and case statement to consume a value-bearing long option.
Bash Scripts✓ Tested
Parse JSON text
Read a JavaScript object from JSON text.
JavaScript✓ Tested
Percent-encode one URL component
JavaScript: encodeURIComponent escapes a parameter value rather than a complete URL.
JavaScript✓ Tested
Place missing values after known values portably
SQL: A CASE sort key controls NULL placement without relying on engine-specific defaults.
SQL✓ Tested