FIND YOUR NEXT FEW LINES

Results for “Errors & optional values”

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

354 snippets foundClear filters
PostgresGetting Started

Select values in an inclusive range

Postgres: BETWEEN includes both endpoints of the range.

Postgres✓ Tested
SQLiteGetting Started

Select values in an inclusive range

SQLite: BETWEEN includes both endpoints of the range.

SQLite✓ Tested
Docker / ComposeCompose applications

Set service environment values

Pass configuration through the Compose environment section.

Compose✓ Tested
PowerShellCollections & objects

Sort and deduplicate values

Produce an ordered list without duplicates.

Sort-Object✓ Tested
C++Collections

Sort and deduplicate values

Sort a C++ vector and erase adjacent duplicates.

C++✓ Tested
RustVectors & slices

Sort and remove repeated values

Sort and remove repeated values in a complete Rust program using the standard library.

Rust✓ Tested
Linux CommandsSorting & joining records

Sort values in descending order

Linux Commands: Combine numeric sorting with reverse order.

Linux Commands✓ Tested
C#Collections

Sort values with LINQ

Create an ascending sequence from C# integer values.

C#✓ Tested
C#Strings

Split and trim values

Split simple comma-separated C# text and trim each value.

C#✓ Tested
C#LINQ transformations

Split values into fixed-size chunks

C#: Enumerable.Chunk creates arrays and allows a shorter final chunk.

C#✓ Tested
Bash ScriptsInput streams & redirection

Substitute values into a multiline template

Bash Scripts: An unquoted heredoc delimiter enables parameter expansion in the template.

Bash Scripts✓ Tested
CArrays

Sum array values

Iterate over a fixed C array using a size-derived element count.

C✓ Tested