Results for “library”
Small, practical examples. Search by task or narrow things down below.
Append a safely constructed list item
jQuery: Learn how to append a safely constructed list item in a complete browser example.
jQuery✓ Tested
Append several values to a vector
Append several values to a vector in a complete Rust program using the standard library.
Rust✓ Tested
Append text to a file
Open a C++ stream in append mode and verify the write.
C++✓ Tested
Append text to a file
Use append mode in C without replacing the existing file.
C✓ Tested
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
Append to a slice
Append to a slice using a complete Go program with explicit sample inputs.
Go✓ Tested
Apply classes from explicit Boolean state
jQuery: The second toggleClass argument applies a known state consistently.
jQuery✓ Tested
Assert approximate floating-point equality
Assert approximate floating-point equality in a complete Rust program using the standard library.
Rust✓ Tested
Attach an application-specific request header
jQuery: The headers option adds a header to this request only.
jQuery✓ Tested
Attach behavior to a struct
Attach behavior to a struct using a complete Go program with explicit sample inputs.
Go✓ Tested
Attach configuration when registering a handler
jQuery: event.data carries the registration-time data object.
jQuery✓ Tested
Avoid a shared mutable default argument
Python: Create a fresh list inside the function when the optional argument is omitted.
Python✓ Tested