FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
Bash ScriptsFunction scope & composition

Return an array through a nameref

Bash Scripts: Assign through a nameref to preserve array element boundaries.

Bash Scripts✓ Tested
Bash ScriptsFunctions & arguments

Return text from a shell function

Capture a function’s output with command substitution.

function✓ Tested
jQueryTraversal & selection

Return to the previous collection in a chain

jQuery: end restores the selection before the last traversal operation.

jQuery✓ Tested
GoGetting Started

Return two values from a function

Return two values from a function using a complete Go program with explicit sample inputs.

Go✓ Tested
TypeScriptUtilities & async

Return typed data from an async function

Await a Promise and handle failures explicitly.

async✓ Tested
CSSInteraction & themes

Reuse colors with custom properties

Define a CSS custom property and use it for text color.

CSS✓ Tested
jQueryAnimation completion

Reveal a collapsed panel with a slide

jQuery: slideDown animates the panel’s vertical dimensions.

jQuery✓ Tested
GoSlices & collections

Reverse slice order

Reverse slice order using a complete Go program with explicit sample inputs.

Go✓ Tested
PostgresDates & series

Round a timestamp down to its month

Group dates by a calendar boundary.

date_trunc✓ Tested
RustNumbers & durations

Round and format a decimal value

Round and format a decimal value in a complete Rust program using the standard library.

Rust✓ Tested
GoDates & times

Round down to a whole minute

Round down to a whole minute using a complete Go program with explicit sample inputs.

Go✓ Tested
Docker / ComposeContainer commands

Run a command in a running container

Execute an additional process inside an existing container.

exec✓ Tested