Results for “set”
Small, practical examples. Search by task or narrow things down below.
Reject an unsupported settings version
Arduino / C: A version byte lets firmware fall back when stored settings use another format.
Arduino / C✓ Tested
Remove duplicate values with a Set
Keep the first occurrence order while deduplicating.
Set✓ Tested
Represent a finite set of states
Java: Use an enum to prevent arbitrary strings from representing application states.
Java✓ Tested
Represent a set with empty structs
Represent a set with empty structs using a complete Go program with explicit sample inputs.
Go✓ Tested
Represent a small set of named states
C: An enum gives symbolic names to integer state values.
C✓ Tested
Reset a nonnullable control to its initial value
Reset a nonnullable control to its initial value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Reset a template-driven form
Reset a template-driven form with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Reset child state by changing its key
Reset child state by changing its key with a small React component and explicit browser behavior.
React✓ Tested
Reset controlled form state
Reset controlled form state with a small React component and explicit browser behavior.
React✓ Tested
Reset reducer state explicitly
Reset reducer state explicitly with a small React component and explicit browser behavior.
React✓ Tested
Reset state to a caller-provided initial value
Reset state to a caller-provided initial value with a small React component and explicit browser behavior.
React✓ Tested
Run cleanup after a promise settles
JavaScript: finally runs after success or failure and normally preserves the original outcome.
JavaScript✓ Tested