FIND YOUR NEXT FEW LINES

Results for “save file”

Small, practical examples. Search by task or narrow things down below.

1970 snippets foundClear filters
Linux CommandsText processing

Replace text with sed

Replace all occurrences of the substring old on each line and print the transformed text without changing the input file.

sed✓ Tested
C++Strings

Replace the first match

Find and replace one literal substring in C++.

C++✓ Tested
GitRemotes & additional checkouts

Replace the URL of a configured remote

Git: set-url changes configuration without fetching or pushing any objects.

Git✓ Tested
GitMerging & replaying changes

Replay an unpublished branch on a newer base

Git: Rebase updates the base of local feature commits when their changes do not conflict.

Git✓ Tested
jQueryDeferred work & queues

Report progress before completion

jQuery: notify calls registered progress handlers while the deferred is pending.

jQuery✓ Tested
JavaRecords & reliable control flow

Represent a finite set of states

Java: Use an enum to prevent arbitrary strings from representing application states.

Java✓ Tested
HTMLTables & list numbering

Represent a hierarchy with nested lists

HTML: Place the nested list inside its parent list item to preserve the hierarchy.

HTML✓ Tested
PythonStructured data & serialization

Represent a record with a dataclass

Python: Generate initialization and convert a typed record to a dictionary.

Python✓ Tested
CStructures & function interfaces

Represent a small set of named states

C: An enum gives symbolic names to integer state values.

C✓ Tested
C++Ownership & optional values

Represent an absent result with optional

C++: value_or supplies a default without requiring a sentinel inside the value domain.

C++✓ Tested
HTMLNative disclosure & dialogs

Represent progress whose total is unknown

HTML: Omit value to make a progress element indeterminate.

HTML✓ Tested
HTMLText semantics

Represent removed and inserted text

HTML: Del and ins record a textual change while retaining both versions in the document.

HTML✓ Tested