FIND YOUR NEXT FEW LINES

Results for “save file”

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

1970 snippets foundClear filters
TypeScriptRegular expressions & URL encoding

Percent-encode one URL component

TypeScript: encodeURIComponent escapes a parameter value rather than a complete URL.

TypeScript✓ Tested
CSSBox dimensions & overflow

Place fixed-size boxes on the same line

CSS: Inline-block allows dimensions while participating in inline layout.

CSS✓ Tested
CSSPositioning & stacking

Position a badge relative to its container

CSS: A positioned ancestor establishes the containing block for an absolutely positioned child.

CSS✓ Tested
CSSPositioning & stacking

Position an item from the writing direction’s start edge

CSS: Logical insets follow direction, so inline-start is the right side in this RTL container.

CSS✓ Tested
jQueryHTTP requests

Post a JSON request body

jQuery: JSON.stringify and application/json send a JSON document.

jQuery✓ Tested
jQueryHTTP requests

Post URL-encoded form data

jQuery: post sends a data object as form-encoded fields by default.

jQuery✓ Tested
PythonFunctions & error handling

Preconfigure some function arguments

Python: Use partial to produce a callable with selected arguments already bound.

Python✓ Tested
Bash ScriptsArray operations

Prepend items while preserving existing array values

Bash Scripts: Construct a new array with the new values before the quoted original expansion.

Bash Scripts✓ Tested
Bash ScriptsProcesses & environment

Preserve a failure status while an EXIT trap runs

Bash Scripts: Capture the status immediately on entry to the trap before running cleanup commands.

Bash Scripts✓ Tested
GitMerging & replaying changes

Preserve a feature branch boundary with a merge commit

Git: No-ff records a merge commit even when a fast-forward would be possible.

Git✓ Tested
CSSResponsive design

Preserve an aspect ratio

Reserve a 16:9 CSS box without a fixed height.

CSS✓ Tested
C++Ordering & set operations

Preserve equal-key order while sorting records

C++: stable_sort retains encounter order for records whose selected sort keys compare equal.

C++✓ Tested