Results for “save”
Small, practical examples. Search by task or narrow things down below.
Replace the first match
Find and replace one literal substring in C++.
C++✓ Tested
Report progress before completion
jQuery: notify calls registered progress handlers while the deferred is pending.
jQuery✓ Tested
Represent a finite set of states
Java: Use an enum to prevent arbitrary strings from representing application states.
Java✓ Tested
Represent a hierarchy with nested lists
HTML: Place the nested list inside its parent list item to preserve the hierarchy.
HTML✓ Tested
Represent a record with a dataclass
Python: Generate initialization and convert a typed record to a dictionary.
Python✓ 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
Represent an absent result with optional
C++: value_or supplies a default without requiring a sentinel inside the value domain.
C++✓ Tested
Represent progress whose total is unknown
HTML: Omit value to make a progress element indeterminate.
HTML✓ Tested
Represent removed and inserted text
HTML: Del and ins record a textual change while retaining both versions in the document.
HTML✓ Tested
Require a checkbox to be selected
HTML: A required checkbox is invalid until that individual control is checked.
HTML✓ Tested
Require a form field
HTML: Learn how to require a form field in a complete browser example.
HTML✓ Tested