FIND YOUR NEXT FEW LINES

Results for “from”

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

321 snippets foundClear filters
PythonCollections

Count occurrences in a list

Count how often each value appears using Counter from the standard library.

count✓ Tested
GitBranches & recovery

Create and switch to a branch

Start an isolated feature branch from the current commit.

switch✓ Tested
C#JSON & binary formats

Decode hexadecimal bytes

C#: FromHexString and ToHexString handle binary data without manually parsing pairs of characters.

C#✓ Tested
JavaScriptPromises & iteration protocols

Delegate iteration to another iterable

JavaScript: yield-star forwards items from another iterable while retaining generator composition.

JavaScript✓ Tested
TypeScriptPromises & iteration protocols

Delegate iteration to another iterable

TypeScript: yield-star forwards items from another iterable while retaining generator composition.

TypeScript✓ Tested
C#JSON & binary formats

Deserialize a JSON object into a dictionary

C#: Specify the value type expected from a known JSON shape.

C#✓ Tested
HTMLForm behavior

Disable a related group of controls

HTML: A disabled fieldset prevents editing its descendant controls and omits them from form submission.

HTML✓ Tested
Bash ScriptsLoops & decisions

Dispatch a command with case

Choose an action from a small set of supported commands.

case✓ Tested
JavaScriptNumbers & numeric validation

Drop the fractional part toward zero

JavaScript: Math.trunc differs from floor for negative inputs.

JavaScript✓ Tested
TypeScriptNumbers & numeric validation

Drop the fractional part toward zero

TypeScript: Math.trunc differs from floor for negative inputs.

TypeScript✓ Tested
CSSBox dimensions & overflow

Enforce a minimum width

CSS: Min-width can prevent a declared smaller width from taking effect.

CSS✓ Tested
Docker / ComposeImage management

Export a container filesystem into a new image

Docker / Compose: export contains filesystem data; import creates a new image from it.

Docker / Compose✓ Tested