FIND YOUR NEXT FEW LINES

Results for “write text”

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

493 snippets foundClear filters
C++Files & paths

Read a file line by line

Read C++ text lines without loading the whole file at once.

C++✓ Tested
PythonJSON & CSV

Read a JSON file

Load a JSON document from disk into Python objects using an explicitly selected text encoding.

json✓ Tested
PythonStructured data & serialization

Read a small INI configuration

Python: Use ConfigParser typed accessors for configuration values stored as text.

Python✓ Tested
JavaScriptFiles & async

Read a UTF-8 file

Read a small file as text using Node.js.

JavaScript✓ Tested
Arduino / CDigital signals & interrupts

Read back a configured digital output

Arduino / C: digitalRead observes the pin’s digital level after an output write.

Arduino / C✓ Tested
SQLiteTables & writes

Read values from an inserted row

Use RETURNING to retrieve an automatically assigned row ID.

RETURNING✓ 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
CArray transformations

Remove adjacent duplicates from a sorted array

C: Compact equal neighbors with a write index after sorting or otherwise establishing order.

C✓ Tested
Bash ScriptsVariables & text

Replace every occurrence in a string

Substitute text directly with Bash parameter expansion.

replace✓ Tested
PowerShellText & data

Replace repeated whitespace

Normalize runs of whitespace to one space.

regex✓ Tested
PostgresRows & writes

Return an inserted row

Read generated data directly from INSERT.

RETURNING✓ Tested