FIND YOUR NEXT FEW LINES

Results for “Collections & data structures”

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

694 snippets foundClear filters
AngularLifecycle & observable data

Publish updated state through a BehaviorSubject

Publish updated state through a BehaviorSubject with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaFile operations & binary data

Read a file length in bytes

Java: Files.size inspects metadata without loading the file into a Java string.

Java✓ Tested
RustParsing & byte data

Read a little-endian integer from bytes

Read a little-endian integer from bytes in a complete Rust program using the standard library.

Rust✓ Tested
PythonStructured data & serialization

Read a small INI configuration

Python: Use ConfigParser typed accessors for configuration values stored as text.

Python✓ Tested
PythonStructured data & serialization

Read a tab-separated table

Python: Select a delimiter explicitly rather than splitting lines manually.

Python✓ Tested
jQueryCollections & styling

Read an element’s document coordinates

jQuery: offset returns coordinates relative to the document.

jQuery✓ Tested
JavaScriptObject behavior & collections

Read an object’s own enumerable values

JavaScript: Object.values provides values without their corresponding keys.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Read an object’s own enumerable values

TypeScript: Object.values provides values without their corresponding keys.

TypeScript✓ Tested
PythonStructured data & serialization

Read elements from trusted XML

Python: Use ElementTree to inspect a small trusted XML document.

Python✓ Tested
PythonStructured data & serialization

Read one JSON document per line

Python: Parse nonempty JSON Lines records independently instead of loading a JSON array.

Python✓ Tested
AngularLifecycle & observable data

Register cleanup through DestroyRef

Register cleanup through DestroyRef with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaScriptObject behavior & collections

Remove a Map entry and detect whether it existed

JavaScript: Map.delete returns true only when an entry was present.

JavaScript✓ Tested