FIND YOUR NEXT FEW LINES

Results for “sha”

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

90 snippets foundClear filters
C#JSON & binary formats

Deserialize a JSON object into a dictionary

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

C#✓ Tested
JavaScriptObject behavior & collections

Distinguish an own property from an inherited one

JavaScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Distinguish an own property from an inherited one

TypeScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.

TypeScript✓ Tested
PythonText validation & encoding

Extract named regex fields

Python: Use named capture groups to parse a known date-shaped identifier.

Python✓ Tested
C#Collections & data structures

Find values common to two collections

C#: Intersect returns distinct values shared by the inputs.

C#✓ Tested
PythonFile operations & archives

Hash a file without reading it all at once

Python: Feed fixed-size binary chunks into SHA-256 for files larger than memory.

Python✓ Tested
PythonMappings & sets

Invert a dictionary with unique values

Python: Swap keys and values when the values are hashable and unique.

Python✓ Tested
Docker / ComposeNetworks & volume metadata

Keep scratch data only for the container lifetime

Docker / Compose: Separate tmpfs mounts do not share data between container runs.

Docker / Compose✓ Tested
CFile positioning & lifecycle

Read characters without confusing EOF with a byte

C: Store fgetc in int so every unsigned-char value remains distinguishable from EOF.

C✓ Tested
PowerShellStructured formats & encodings

Read JSON into a hashtable

PowerShell: AsHashtable produces dictionary-style results for keys that are data rather than fixed property names.

PowerShell✓ Tested
Bash ScriptsInput streams & redirection

Redirect an entire group of commands

Bash Scripts: Brace grouping runs in the current shell and shares a single output redirection.

Bash Scripts✓ Tested
PythonCollections

Remove duplicates from a list

Remove repeated hashable values while preserving the order in which they first appeared.

list✓ Tested