FIND YOUR NEXT FEW LINES

Results for “read text”

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

836 snippets foundClear filters
PythonStrings & dates

Parse and format a date

Convert a date string into a datetime object, then format it in a different, human-readable order.

date✓ Tested
PowerShellText & data

Parse JSON into an object

Access a named field in a JSON document.

JSON✓ Tested
PythonStructured data & serialization

Parse quoted CSV from an in-memory string

Python: Use StringIO with csv.reader so quoted commas are handled correctly.

Python✓ Tested
PythonFunctions & error handling

Preconfigure some function arguments

Python: Use partial to produce a callable with selected arguments already bound.

Python✓ Tested
C++Ordering & set operations

Preserve equal-key order while sorting records

C++: stable_sort retains encounter order for records whose selected sort keys compare equal.

C++✓ Tested
CSSTypography

Preserve whitespace while wrapping

Use CSS pre-wrap for multiline text that retains spaces.

CSS✓ Tested
Arduino / CGetting Started

Print a label beside a number

Arduino / C: Combine Serial.print and Serial.println to put text and a value on one line.

Arduino / C✓ Tested
C++Getting Started

Print a number with two decimal places

C++: Format a small decimal value consistently for display.

C++✓ Tested
C#File operations & paths

Process a file as a lazy line sequence

C#: ReadLines avoids allocating one string containing the entire file.

C#✓ Tested
C++Containers & compound values

Process a first-in first-out queue

C++: Queue exposes its front item separately from the operation that removes it.

C++✓ Tested
C++Tasks & synchronization

Protect a shared container with a mutex

C++: A scoped lock_guard releases the mutex when its scope ends.

C++✓ Tested
jQueryForm serialization & state

Refresh a cached data attribute deliberately

jQuery: After the first read, data caches a parsed value; removeData forces a new attribute read.

jQuery✓ Tested