FIND YOUR NEXT FEW LINES

Results for “BIN”

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

189 snippets foundClear filters
C#JSON & binary formats

Hash a UTF-8 value with SHA-256

C#: Use SHA256.HashData for a one-shot content digest.

C#✓ Tested
AngularTemplates & bindings

Hide an element while keeping it mounted

Hide an element while keeping it mounted with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaFile operations & binary data

Load a small properties configuration

Java: Use a Reader to make the configuration character encoding explicit.

Java✓ Tested
JavaQueues & collection operations

Locate a value in a sorted array

Java: Use Arrays.binarySearch only after establishing ascending order.

Java✓ Tested
C#JSON & binary formats

Measure the byte length of UTF-8 text

C#: Character count and encoded byte count can differ for non-ASCII text.

C#✓ Tested
PythonCollections

Merge two dictionaries

Combine two dictionaries into a new dictionary. When a key appears in both inputs, the value from the second dictionary wins.

dictionary✓ Tested
Docker / ComposeStorage & isolation

Mount a host directory read-only

Expose existing files without allowing the container to change them.

bind mount✓ Tested
Docker / ComposeCompose service options

Mount a local input directory with long syntax

Docker / Compose: Long mount syntax makes the bind type and read-only intent explicit.

Docker / Compose✓ Tested
JavaFile operations & binary data

Move a file to a new name

Java: Files.move changes the path and returns the destination Path.

Java✓ Tested
AngularTemplates & bindings

Name a template expression with @let

Name a template expression with @let with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaFile operations & binary data

Normalize relative path components

Java: Path.normalize removes redundant dot components without accessing the filesystem.

Java✓ Tested
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / C✓ Tested