FIND YOUR NEXT FEW LINES

Results for “fold”

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

668 snippets foundClear filters
Linux CommandsSearching text

Branch on whether a pattern exists

Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.

Linux Commands✓ Tested
SQLiteJSON data

Build a JSON array from rows

Aggregate ordered text values into JSON.

json_group_array✓ Tested
PowerShellFiles & paths

Build a portable file path

Combine directory and filename using the platform separator.

Join-Path✓ Tested
SQLiteSubqueries & ranked selection

Build a query from several named stages

SQLite: Separate row selection from aggregation using two common table expressions.

SQLite✓ Tested
Docker / ComposeGetting Started

Build an image with a default command

Docker / Compose: Build an image with a default command with a complete introductory Dockerfile.

Docker / Compose✓ Tested
GoStrings & text

Build text incrementally

Build text incrementally using a complete Go program with explicit sample inputs.

Go✓ Tested
SQLiteWindow analytics

Calculate a cumulative integer percentage

SQLite: Divide a running window sum by the complete total using a unique ordering key.

SQLite✓ Tested
GoJSON & encoding

Calculate a SHA-256 text digest

Calculate a SHA-256 text digest using a complete Go program with explicit sample inputs.

Go✓ Tested
GoGetting Started

Calculate a subtotal

Calculate a subtotal using a complete Go program with explicit sample inputs.

Go✓ Tested
SQLiteGetting Started

Calculate a total for each group

SQLite: Group nonmissing categories and calculate separate totals.

SQLite✓ Tested
SQLiteGetting Started

Calculate a value with SELECT

SQLite: Evaluate a small arithmetic expression on the database server.

SQLite✓ Tested
RustGetting Started

Calculate an order subtotal

Calculate an order subtotal in a complete Rust program using the standard library.

Rust✓ Tested