FIND YOUR NEXT FEW LINES

Results for “save file”

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

1970 snippets foundClear filters
CSSGetting Started

Target an element by class

CSS: Learn how to target an element by class in a complete browser example.

CSS✓ Tested
Bash ScriptsGetting Started

Test a function’s success status

Bash Scripts: Test a function’s success status with a small standalone Bash program.

Bash Scripts✓ Tested
C++Sequence algorithms

Test any and all elements with predicates

C++: These algorithms stop as soon as their result is known.

C++✓ Tested
Bash ScriptsText parsing & arithmetic

Test numeric divisibility with a remainder

Bash Scripts: The modulo operator computes an integer remainder.

Bash Scripts✓ Tested
CSmall algorithms & bit operations

Test whether an unsigned value is a power of two

C: A nonzero power of two has exactly one set bit.

C✓ Tested
GitBranches & ancestry

Test whether one revision is an ancestor of another

Git: merge-base --is-ancestor reports its answer through the exit status.

Git✓ Tested
jQueryGetting Started

Toggle a CSS class with a click

jQuery: Learn how to toggle a CSS class with a click in a complete browser example.

jQuery✓ Tested
HTMLNative disclosure & dialogs

Toggle a native popover from a button

HTML: The popovertarget relationship handles show and hide behavior without a click handler.

HTML✓ Tested
CStructures & function interfaces

Track which union member is currently valid

C: An explicit tag tells callers which overlaid union value to read.

C✓ Tested
C++Ownership & optional values

Transfer unique ownership with move

C++: Moving a unique_ptr leaves the source empty and gives ownership to the destination.

C++✓ Tested
jQueryCollections & styling

Transform a collection into a plain array

jQuery: map followed by get returns ordinary JavaScript values.

jQuery✓ Tested
jQueryDeferred work & queues

Transform a deferred value with then

jQuery: then returns a new promise with the callback’s result.

jQuery✓ Tested