FIND YOUR NEXT FEW LINES

Results for “Array transformations”

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

179 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
AngularReactive forms

Append a dynamic form control

Append a dynamic form control with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Arduino / CData & storage

Average a fixed set of readings

Accumulate sample values without overflowing a 16-bit total.

array✓ Tested
PowerShellArray operations

Build a mutable generic list

PowerShell: A generic list supports repeated additions without copying an entire array each time.

PowerShell✓ Tested
C#LINQ transformations

Calculate a product with Aggregate

C#: Supply a seed to define the result for an empty sequence.

C#✓ Tested
JavaScriptArray restructuring

Calculate differences between adjacent readings

JavaScript: Slice off the first value and compare each remaining value with its predecessor.

JavaScript✓ Tested
TypeScriptArray restructuring

Calculate differences between adjacent readings

TypeScript: Slice off the first value and compare each remaining value with its predecessor.

TypeScript✓ Tested
JavaStream transformations

Calculate several numeric stream statistics

Java: Use summaryStatistics to calculate count, sum, minimum, maximum, and average in one pass.

Java✓ Tested
JavaStream transformations

Check any and all stream elements

Java: Use short-circuiting match operations for predicates over a Java collection.

Java✓ Tested
JavaScriptArray traversal & selection

Check whether any item matches

JavaScript: some stops once a predicate succeeds.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Check whether any item matches

TypeScript: some stops once a predicate succeeds.

TypeScript✓ Tested
JavaScriptArray traversal & selection

Check whether every item matches

JavaScript: every stops at the first failed predicate and returns true for an empty array.

JavaScript✓ Tested