FIND YOUR NEXT FEW LINES

Results for “library”

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

653 snippets foundClear filters
jQueryGetting Started

Append a safely constructed list item

jQuery: Learn how to append a safely constructed list item in a complete browser example.

jQuery✓ Tested
RustVectors & slices

Append several values to a vector

Append several values to a vector in a complete Rust program using the standard library.

Rust✓ Tested
C++Files & paths

Append text to a file

Open a C++ stream in append mode and verify the write.

C++✓ Tested
CFiles

Append text to a file

Use append mode in C without replacing the existing file.

C✓ Tested
RustFiles & paths

Append to a file without truncating it

Append to a file without truncating it in a complete Rust program using the standard library.

Rust✓ Tested
GoGetting Started

Append to a slice

Append to a slice using a complete Go program with explicit sample inputs.

Go✓ Tested
jQueryCollections & styling

Apply classes from explicit Boolean state

jQuery: The second toggleClass argument applies a known state consistently.

jQuery✓ Tested
RustTesting & reusable patterns

Assert approximate floating-point equality

Assert approximate floating-point equality in a complete Rust program using the standard library.

Rust✓ Tested
jQueryHTTP requests

Attach an application-specific request header

jQuery: The headers option adds a header to this request only.

jQuery✓ Tested
GoFunctions & types

Attach behavior to a struct

Attach behavior to a struct using a complete Go program with explicit sample inputs.

Go✓ Tested
jQueryEvent control

Attach configuration when registering a handler

jQuery: event.data carries the registration-time data object.

jQuery✓ Tested
PythonFunctions & error handling

Avoid a shared mutable default argument

Python: Create a fresh list inside the function when the optional argument is omitted.

Python✓ Tested