Results for “one”
Small, practical examples. Search by task or narrow things down below.
Trim and discard blank lines
TypeScript: Split a text block, trim each line, and keep nonempty values.
TypeScript✓ Tested
Turn on the LED with a serial command
Arduino / C: Wait for the character 1 in Serial Monitor before turning on the built-in LED.
Arduino / C✓ Tested
Update a nested object immutably
Update a nested object immutably with a small React component and explicit browser behavior.
React✓ Tested
Update a row on conflict
Use a primary key to insert or update one value.
upsert✓ 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 an object without mutating state
Update an object without mutating state with a small React component and explicit browser behavior.
React✓ Tested
Update repeatedly with a cleaned-up interval
Update repeatedly with a cleaned-up interval with a small React component and explicit browser behavior.
React✓ Tested
Update state from its previous value
Update state from its previous value with a small React component and explicit browser behavior.
React✓ Tested
Update state shared through context
Update state shared through context 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 counted Bash loop
Bash Scripts: Use a counted Bash loop with a small standalone Bash program.
Bash Scripts✓ Tested
Use a fallback for an unset variable
Bash Scripts: Use a fallback for an unset variable with a small standalone Bash program.
Bash Scripts✓ Tested