Results for “save file”
Small, practical examples. Search by task or narrow things down below.
Invert a dictionary with unique values
Python: Swap keys and values when the values are hashable and unique.
Python✓ Tested
Isolate a value with a different writing direction
HTML: Bdi isolates embedded user text so its direction does not reorder surrounding punctuation.
HTML✓ Tested
Isolate variable changes in a subshell
Bash Scripts: Parentheses create a subshell whose variable assignments do not change the parent.
Bash Scripts✓ Tested
Iterate over a fixed array of records
C: Compute the array element count with sizeof at the point where it is still an array.
C✓ Tested
Iterate over all regular-expression matches
C++: A regex iterator yields successive matches without manually updating an offset.
C++✓ Tested
Iterate over object entries
Read JavaScript property names and values using Object.entries.
JavaScript✓ Tested
Iterate with array indices and values
JavaScript: entries provides each position and value without a separate counter.
JavaScript✓ Tested
Iterate with array indices and values
TypeScript: entries provides each position and value without a separate counter.
TypeScript✓ Tested
Join array items with a one-character separator
Bash Scripts: A local IFS controls the separator used by the quoted star expansion.
Bash Scripts✓ Tested
Join strings with a separator
Build a Java string from several values using String.join.
Java✓ Tested
Join strings with a separator
Use an output string stream to join C++ values without a trailing separator.
C++✓ Tested
Join transformed stream values
Java: Use Collectors.joining after converting elements to strings.
Java✓ Tested