Results for “id”
Small, practical examples. Search by task or narrow things down below.
Track whether a form differs from its initial value
Track whether a form differs from its initial value with a small React component and explicit browser behavior.
React✓ Tested
Treat dynamic regex input as literal text
Java: Use Pattern.quote so metacharacters in a search term lose their special meaning.
Java✓ Tested
Trim surrounding ASCII whitespace
C++: Find the first and last non-whitespace bytes before taking a substring.
C++✓ Tested
Use a nonnegative remainder for cyclic indexing
Use a nonnegative remainder for cyclic indexing in a complete Rust program using the standard library.
Rust✓ Tested
Wrap an error with context
Wrap an error with context using a complete Go program with explicit sample inputs.
Go✓ Tested
Abort a conflicting cherry-pick
Git: Abort removes the incomplete replay and returns to the previous branch state.
Git✓ Tested
Abort a conflicting rebase
Git: Abort returns the branch to its state before the rebase attempt.
Git✓ Tested
Abort a merge with unresolved conflicts
Git: Abort restores the pre-merge state in this clean practice repository.
Git✓ Tested
Add a CSS class
jQuery: Learn how to add a CSS class in a complete browser example.
jQuery✓ Tested
Add a forgotten file to the latest unpublished commit
Git: Stage the missing file before amending without changing the message.
Git✓ Tested
Add an optional field to an existing table
SQL: A nullable column permits existing rows to remain valid while data is filled later.
SQL✓ Tested
Add an optional field to an existing table
SQL Server: A nullable column permits existing rows to remain valid while data is filled later.
SQL Server✓ Tested