FIND YOUR NEXT FEW LINES

Results for “source”

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

28 snippets foundClear filters
JavaScriptArray traversal & selection

Copy a range without changing the source

JavaScript: Array.slice returns a shallow copy of the selected half-open range.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Copy a range without changing the source

TypeScript: Array.slice returns a shallow copy of the selected half-open range.

TypeScript✓ Tested
jQueryHTTP requests

Fetch a plain-text resource

jQuery: An explicit text data type keeps the response as a string.

jQuery✓ Tested
GoConcurrency & cancellation

Initialize a resource only once

Initialize a resource only once using a complete Go program with explicit sample inputs.

Go✓ Tested
HTMLText semantics

Mark a longer quotation and its source

HTML: Blockquote marks quoted content; a visible source link remains useful because cite is metadata.

HTML✓ Tested
PowerShellArray operations

Reverse a copy while preserving the source

PowerShell: Clone the array before using Array.Reverse because Reverse mutates its argument.

PowerShell✓ Tested
Bash ScriptsFunction scope & composition

Load functions from a trusted local script

Bash Scripts: Source executes a file in the current shell so its function definitions remain available.

Bash Scripts✓ Tested
Docker / ComposeStorage & isolation

Set and inspect a memory limit

Apply a per-container limit when creating a container.

memory✓ Tested
Docker / ComposeStorage & isolation

Attach containers to a user-defined network

Create a dedicated network for a small group of containers.

network✓ Tested
Linux CommandsArchives & checksums

Calculate a SHA-256 checksum

Calculate a file checksum so you can compare it with a hash from a trusted source and detect changed contents.

checksum✓ Tested
HTMLImages & embedded documents

Choose a different image for a small viewport

HTML: Picture evaluates source media conditions before falling back to the img source.

HTML✓ Tested
Linux CommandsArchive integrity & packaging

Compress a stream to a chosen filename

Linux Commands: Use gzip -c to leave the source file untouched and choose the destination explicitly.

Linux Commands✓ Tested