Results for “as”
Small, practical examples. Search by task or narrow things down below.
Describe terms in a definition list
HTML: Learn how to describe terms in a definition list in a complete browser example.
HTML✓ Tested
Destructure a tuple
Destructure a tuple in a complete Rust program using the standard library.
Rust✓ Tested
Detect an error inside a pipeline
Use pipefail to observe failure before the last pipeline command.
pipefail✓ Tested
Detect an invalid Date object
TypeScript: An invalid Date has a NaN time value.
TypeScript✓ Tested
Detect integer addition overflow
Java: Math.addExact throws rather than silently wrapping on overflow.
Java✓ Tested
Detect invalid UTF-8 data
Detect invalid UTF-8 data in a complete Rust program using the standard library.
Rust✓ Tested
Detect NaN without converting the input
TypeScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.
TypeScript✓ Tested
Detect truncated formatted output
Arduino / C: snprintf returns the length it would have written, excluding the null terminator.
Arduino / C✓ Tested
Determine whether a year is a leap year
Python: Use calendar.isleap rather than a simplified divisibility-by-four check.
Python✓ Tested
Disable a button
Set the live disabled property with jQuery prop.
jQuery✓ Tested
Disable a related group of controls
HTML: A disabled fieldset prevents editing its descendant controls and omits them from form submission.
HTML✓ Tested
Disable a service’s network interfaces
Docker / Compose: network_mode none leaves only the loopback interface.
Docker / Compose✓ Tested