FIND YOUR NEXT FEW LINES

Results for “read text”

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

836 snippets foundClear filters
Bash ScriptsDiagnostics & defensive scripting

Refuse to overwrite an existing file with redirection

Bash Scripts: Noclobber makes a plain greater-than redirection fail when the target already exists.

Bash Scripts✓ Tested
C++Numeric parsing & calculations

Reject infinite and NaN numeric values

C++: std::isfinite excludes special floating-point values.

C++✓ Tested
Arduino / CArrays & embedded state

Reject insertion when a fixed queue is full

Arduino / C: Track a count separately from circular read and write positions.

Arduino / C✓ Tested
Bash ScriptsVariables & text

Remove a filename extension

Keep the path while removing its final extension.

filename✓ Tested
C++Containers & compound values

Remove a map entry and inspect the number removed

C++: erase by key reports whether a unique-key map contained the entry.

C++✓ Tested
C++Filesystem operations

Rename a known file through filesystem

C++: filesystem::rename reports an error by exception when the operation fails.

C++✓ Tested
C++Getting Started

Repeat a fixed number of times

C++: Use a counted loop to print three numbered steps.

C++✓ Tested
SQLWindow analytics

Repeat the first ordered value beside each row

SQL: FIRST_VALUE reads the first value in the current window frame.

SQL✓ Tested
SQL ServerWindow analytics

Repeat the first ordered value beside each row

SQL Server: FIRST_VALUE reads the first value in the current window frame.

SQL Server✓ Tested
PostgresWindow analytics

Repeat the first ordered value beside each row

Postgres: FIRST_VALUE reads the first value in the current window frame.

Postgres✓ Tested
SQLiteWindow analytics

Repeat the first ordered value beside each row

SQLite: FIRST_VALUE reads the first value in the current window frame.

SQLite✓ Tested
C++Getting Started

Repeat while a condition holds

C++: Count down while a positive number remains, updating the loop variable on each iteration.

C++✓ Tested