FIND YOUR NEXT FEW LINES

Results for “Array traversal & selection”

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

228 snippets foundClear filters
TypeScriptArray restructuring

Calculate differences between adjacent readings

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

TypeScript✓ Tested
GitCommit history & revision selection

Check what kind of Git object a revision names

Git: cat-file -t distinguishes a commit, tree, blob, or annotated tag.

Git✓ Tested
jQueryForm serialization & state

Collect repeated form field names

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

jQuery✓ Tested
SQLSubqueries & ranked selection

Compare a row with its own group average

SQL: A correlated aggregate computes a different comparison value for each group.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Compare a row with its own group average

SQL Server: A correlated aggregate computes a different comparison value for each group.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Compare a row with its own group average

Postgres: A correlated aggregate computes a different comparison value for each group.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Compare a row with its own group average

SQLite: A correlated aggregate computes a different comparison value for each group.

SQLite✓ Tested
PowerShellArray operations

Count a result even when it is empty or has one item

PowerShell: Wrap pipeline results in an array subexpression for consistent Count behavior.

PowerShell✓ Tested
GitCommit history & revision selection

Count commits reachable from a revision

Git: rev-list --count counts reachable commits without printing commit identifiers.

Git✓ Tested
JavaScriptArray restructuring

Create independent rows in a matrix

JavaScript: Use a mapping function to create each row instead of sharing one array with fill.

JavaScript✓ Tested
TypeScriptArray restructuring

Create independent rows in a matrix

TypeScript: Use a mapping function to create each row instead of sharing one array with fill.

TypeScript✓ Tested
Arduino / CArrays & embedded state

Dispatch a command through function pointers

Arduino / C: A small function table can map validated command indices to actions.

Arduino / C✓ Tested