Results for “defined”
Small, practical examples. Search by task or narrow things down below.
Attach containers to a user-defined network
Create a dedicated network for a small group of containers.
network✓ Tested
Check whether a function has been defined
Bash Scripts: declare -F tests a function name without executing it.
Bash Scripts✓ Tested
Inspect a user-defined network’s driver
Docker / Compose: The default driver for a local user-defined network is bridge.
Docker / Compose✓ Tested
Resolve a peer’s name on a user-defined network
Docker / Compose: The embedded DNS service resolves names on user-defined bridges.
Docker / Compose✓ Tested
Return the first item with a generic function
Preserve the element type while allowing empty arrays.
generics✓ Tested
Convert ASCII text to uppercase
Convert characters with toupper while avoiding signed-char undefined behavior.
C✓ Tested
Count words using a Map
Update a keyed counter without losing its value type.
Map✓ Tested
Find the first matching array item
JavaScript: find returns undefined when no item satisfies the predicate.
JavaScript✓ Tested
Find the first matching array item
TypeScript: find returns undefined when no item satisfies the predicate.
TypeScript✓ Tested
Give an optional property a default
Handle missing object fields with nullish coalescing.
optional✓ Tested
Index records by a unique key
Java: Use toMap with an explicit merge rule so duplicate keys have defined behavior.
Java✓ Tested
Parse an enum name without throwing
C#: Combine TryParse and IsDefined when only named declared values should be accepted.
C#✓ Tested