FIND YOUR NEXT FEW LINES

Results for “read text”

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

836 snippets foundClear filters
C++Filesystem operations

Normalize a path without touching the filesystem

C++: lexically_normal removes redundant dot components using path syntax alone.

C++✓ Tested
SQLiteQueries & text

Number a sorted result

Assign a row number without changing stored data.

row_number✓ Tested
PostgresWindows & text

Number rows within each group

Assign ordered row numbers with a window function.

row_number✓ Tested
C++Tasks & synchronization

Observe an exception from an asynchronous task

C++: Calling get rethrows an exception captured by the future.

C++✓ Tested
C++Ownership & optional values

Observe shared ownership without extending its lifetime

C++: A weak_ptr can be locked while an owner exists and becomes expired after the last owner is released.

C++✓ Tested
HTMLLinks & accessibility

Open a link in a separate tab

Declare a separate browsing context with an explicit noopener relationship.

HTML✓ Tested
C++Ownership & optional values

Own one dynamically allocated value with unique_ptr

C++: make_unique allocates a value whose lifetime is tied to its owning smart pointer.

C++✓ Tested
JavaScriptStrings

Pad a numeric label

Convert a number to text and pad it to a fixed width.

JavaScript✓ Tested
C++Numeric parsing & calculations

Parse a complete integer without exceptions

C++: from_chars reports both an error code and the first unconsumed character.

C++✓ Tested
C++Numeric parsing & calculations

Parse a hexadecimal integer with from_chars

C++: An explicit radix controls digit interpretation without a locale dependency.

C++✓ Tested
PythonJSON & CSV

Parse a JSON string

Convert a JSON string into a Python dictionary and read values by key.

json✓ Tested
Bash ScriptsFunctions & arguments

Parse a short option with getopts

Read a named option and handle invalid flags explicitly.

getopts✓ Tested