Results for “save file”
Small, practical examples. Search by task or narrow things down below.
Target an element by class
CSS: Learn how to target an element by class in a complete browser example.
CSS✓ Tested
Test a function’s success status
Bash Scripts: Test a function’s success status with a small standalone Bash program.
Bash Scripts✓ Tested
Test any and all elements with predicates
C++: These algorithms stop as soon as their result is known.
C++✓ Tested
Test numeric divisibility with a remainder
Bash Scripts: The modulo operator computes an integer remainder.
Bash Scripts✓ Tested
Test whether an unsigned value is a power of two
C: A nonzero power of two has exactly one set bit.
C✓ Tested
Test whether one revision is an ancestor of another
Git: merge-base --is-ancestor reports its answer through the exit status.
Git✓ Tested
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
Toggle a native popover from a button
HTML: The popovertarget relationship handles show and hide behavior without a click handler.
HTML✓ Tested
Track which union member is currently valid
C: An explicit tag tells callers which overlaid union value to read.
C✓ Tested
Transfer unique ownership with move
C++: Moving a unique_ptr leaves the source empty and gives ownership to the destination.
C++✓ Tested
Transform a collection into a plain array
jQuery: map followed by get returns ordinary JavaScript values.
jQuery✓ Tested
Transform a deferred value with then
jQuery: then returns a new promise with the callback’s result.
jQuery✓ Tested