FIND YOUR NEXT FEW LINES

Results for “collect”

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

164 snippets foundClear filters
Arduino / CArrays & embedded state

Advance an index around a fixed collection

Arduino / C: Modulo wraps a bounded nonnegative index to zero.

Arduino / C✓ Tested
Arduino / CSerial communication

Collect a serial line in a fixed buffer

Read a short command without dynamic String allocation.

serial line✓ Tested
RustTesting & reusable patterns

Collect borrowed values into owned strings

Collect borrowed values into owned strings in a complete Rust program using the standard library.

Rust✓ Tested
PythonFunctions & error handling

Collect independent asynchronous results

Python: Use asyncio.gather to await multiple coroutines while preserving input order.

Python✓ Tested
jQueryTraversal & selection

Collect matching ancestors

jQuery: parents can return several ancestors, ordered from the nearest outward.

jQuery✓ Tested
AngularServices & dependency injection

Collect multiple values through a multi provider

Collect multiple values through a multi provider with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PostgresJSON & arrays

Collect ordered values into an array

Build a sorted array from query rows.

array_agg✓ Tested
jQueryForm serialization & state

Collect repeated form field names

jQuery: serializeArray preserves multiple values as name-value records.

jQuery✓ Tested
ReactForms & validation

Collect selected options from a multi-select

Collect selected options from a multi-select with a small React component and explicit browser behavior.

React✓ Tested
HTMLForm behavior

Collect several checked values under one name

HTML: Only checked named checkboxes become successful form controls.

HTML✓ Tested
Bash ScriptsProcesses & environment

Collect two independent background results

Bash Scripts: Write each job’s output separately and wait for both before combining results.

Bash Scripts✓ Tested
RustMaps & sets

Collect unique sorted values

Collect unique sorted values in a complete Rust program using the standard library.

Rust✓ Tested