Results for “save”
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
Narrow a union using typeof
Handle text and numeric values with separate branches.
union✓ Tested
Narrow an object with a pattern variable
Java: Pattern matching avoids a separate cast after a successful instanceof check.
Java✓ Tested
Normalize a path without touching the filesystem
C++: lexically_normal removes redundant dot components using path syntax alone.
C++✓ Tested
Normalize equivalent Unicode strings
Python: Normalize to NFC before comparing canonically equivalent text.
Python✓ Tested
Normalize identifier case consistently
JavaScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.
JavaScript✓ Tested
Normalize identifier case consistently
TypeScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.
TypeScript✓ Tested
Normalize relative path components
Java: Path.normalize removes redundant dot components without accessing the filesystem.
Java✓ Tested
Number items while iterating
Python: Use enumerate to attach a one-based position without maintaining a separate counter.
Python✓ Tested
Number items while iterating
Number items while iterating in a complete Rust program using the standard library.
Rust✓ Tested
Observe an exception from an asynchronous task
C++: Calling get rethrows an exception captured by the future.
C++✓ Tested
Observe command substitution’s trailing-newline removal
Bash Scripts: Command substitution removes trailing newlines while preserving embedded ones.
Bash Scripts✓ Tested