FIND YOUR NEXT FEW LINES

Results for “Input constraints”

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

841 snippets foundClear filters
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
SQLWindow analytics

Calculate a cumulative integer percentage

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

SQL✓ Tested
SQL ServerWindow analytics

Calculate a cumulative integer percentage

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

SQL Server✓ Tested
PostgresWindow analytics

Calculate a cumulative integer percentage

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

Postgres✓ 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
PythonIteration & sequences

Calculate cumulative totals

Python: Use accumulate to retain the running sum after each input.

Python✓ Tested
C++Sequence algorithms

Calculate cumulative totals

C++: partial_sum writes the sum of each input prefix to the output sequence.

C++✓ Tested
SQLReporting & grouped calculations

Calculate each group’s integer percentage of the total

SQL: Multiply before division and protect against a zero denominator.

SQL✓ Tested