Results for “value”
Small, practical examples. Search by task or narrow things down below.
Turn known group values into columns
SQLite: Conditional aggregation gives a portable pivot when the category set is known.
SQLite✓ Tested
Understand default zero values
Understand default zero values using a complete Go program with explicit sample inputs.
Go✓ Tested
Update a signal from its previous value
Update a signal from its previous value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Update a value through a pointer
Update a value through a pointer using a complete Go program with explicit sample inputs.
Go✓ Tested
Update an existing map value
Update an existing map value in a complete Rust program using the standard library.
Rust✓ Tested
Update state from its previous value
Update state from its previous value with a small React component and explicit browser behavior.
React✓ Tested
Use a context’s fallback value
Use a context’s fallback value with a small React component and explicit browser behavior.
React✓ Tested
Use a default value for an unset variable
Supply a fallback without changing the original variable.
parameter expansion✓ Tested
Use a literal value in a regular expression
PowerShell: Regex.Escape prevents a literal dot or other metacharacter from changing the match.
PowerShell✓ Tested
Use a switch expression to classify a value
C#: Relational patterns express a small ordered range classification.
C#✓ Tested
Use an alternate value only when a variable is nonempty
Bash Scripts: The colon-plus expansion returns its word only when the parameter has a nonempty value.
Bash Scripts✓ Tested
Use if to produce a value
Use if to produce a value in a complete Rust program using the standard library.
Rust✓ Tested