FIND YOUR NEXT FEW LINES

Results for “Context & shared state”

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

509 snippets foundClear filters
jQueryForm serialization & state

Set several selected options

jQuery: Passing an array to val selects matching values in a multiple select.

jQuery✓ Tested
RustThreads & shared ownership

Share immutable data with Arc

Share immutable data with Arc in a complete Rust program using the standard library.

Rust✓ Tested
C++Ownership & optional values

Share ownership with a counted smart pointer

C++: Copies of shared_ptr keep the owned value alive until the last owner is released.

C++✓ Tested
Arduino / CArrays & embedded state

Sort a small array in place

Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.

Arduino / C✓ Tested
jQueryForm serialization & state

Store an object associated with an element

jQuery: data retains JavaScript values without serializing them into HTML attributes.

jQuery✓ Tested
Arduino / CArrays & embedded state

Store samples in a fixed-size ring buffer

Arduino / C: The write position wraps while the storage size stays constant.

Arduino / C✓ Tested
AngularSignals & state

Synchronize a document property with an effect

Synchronize a document property with an effect with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularSignals & state

Track only dependencies used by a computed branch

Track only dependencies used by a computed branch with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactState & reducers

Update a nested object immutably

Update a nested object immutably with a small React component and explicit browser behavior.

React✓ Tested
AngularSignals & state

Update a signal from its previous value

Update a signal from its previous value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
RustThreads & shared ownership

Update an atomic counter

Update an atomic counter in a complete Rust program using the standard library.

Rust✓ Tested
ReactState & reducers

Update one array item by its identifier

Update one array item by its identifier with a small React component and explicit browser behavior.

React✓ Tested