FIND YOUR NEXT FEW LINES

Results for “library”

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

653 snippets foundClear filters
PythonStructured data & serialization

Read a tab-separated table

Python: Select a delimiter explicitly rather than splitting lines manually.

Python✓ Tested
jQueryGetting Started

Read a text field’s value

jQuery: Learn how to read a text field’s value in a complete browser example.

jQuery✓ Tested
PythonFiles & paths

Read a text file

Open a UTF-8 text file and read its contents. A context manager closes the file automatically, even if reading fails.

file✓ Tested
GoHTTP & URLs

Read a URL’s host and path

Read a URL’s host and path using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaFiles & paths

Read a UTF-8 file

Read a small UTF-8 file into a Java string.

Java✓ Tested
jQueryCollections & styling

Read an element’s document coordinates

jQuery: offset returns coordinates relative to the document.

jQuery✓ Tested
jQueryGetting Started

Read an element’s text

jQuery: Learn how to read an element’s text in a complete browser example.

jQuery✓ Tested
GoHTTP & URLs

Read an HTTP query parameter

Read an HTTP query parameter using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonDates & time zones

Read an ISO week number

Python: Use isocalendar because ISO week years can differ from calendar years near January.

Python✓ Tested
JavaDates & time zones

Read an ISO week year and week number

Java: Use ISO week fields together because a week can belong to the previous calendar year.

Java✓ Tested
PythonMappings & sets

Read an optional dictionary key

Python: Use get with a fallback while leaving the dictionary unchanged.

Python✓ Tested
RustFiles & paths

Read buffered lines from a file

Read buffered lines from a file in a complete Rust program using the standard library.

Rust✓ Tested