FIND YOUR NEXT FEW LINES

Results for “save file”

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

1970 snippets foundClear filters
Bash ScriptsFunction scope & composition

Capture output while handling a failed command

Bash Scripts: An assignment inherits the status of its command substitution, allowing both output and status to be handled.

Bash Scripts✓ Tested
Bash ScriptsInput streams & redirection

Capture standard output and standard error separately

Bash Scripts: Use distinct redirections when diagnostic text should not be mixed with data.

Bash Scripts✓ Tested
CSSPositioning & stacking

Center a fixed-size absolute child with auto margins

CSS: An all-zero inset plus auto margins distributes the available space around the child.

CSS✓ Tested
CSSGrid placement

Center a small item in a grid cell

CSS: Place-items sets both block-axis and inline-axis item alignment.

CSS✓ Tested
CSSLayout

Center content with flexbox

Center a child along both axes inside a CSS flex container.

CSS✓ Tested
CSSInteraction selectors

Change a control’s appearance on hover

CSS: Hover applies while a pointing device is positioned over the element.

CSS✓ Tested
Bash ScriptsProcesses & environment

Change directory only for one operation

Bash Scripts: A subshell makes a temporary directory change without affecting later commands.

Bash Scripts✓ Tested
CSSFlexbox alignment

Change visual order without changing DOM order

CSS: Order changes flex painting positions while keyboard and reading order still follow the document.

CSS✓ Tested
GitGetting Started

Check a change for whitespace problems

Git: Check a change for whitespace problems inside the disposable repository created by the input setup.

Git✓ Tested
C++Text validation & parsing

Check a literal prefix in C++17

C++: Use string compare because starts_with was introduced after C++17.

C++✓ Tested
CStrings & byte buffers

Check a literal string prefix

C: strncmp compares at most the prefix length; both inputs must be valid strings.

C✓ Tested
C++Text validation & parsing

Check a literal suffix in C++17

C++: Check lengths before subtracting to avoid an unsigned underflow.

C++✓ Tested