Results for “add”
Small, practical examples. Search by task or narrow things down below.
Detect integer addition overflow
Java: Math.addExact throws rather than silently wrapping on overflow.
Java✓ Tested
Format a zero-padded numeric label
Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.
Linux Commands✓ Tested
Format an integer as padded hexadecimal
Format an integer as padded hexadecimal in a complete Rust program using the standard library.
Rust✓ Tested
Handle dynamically added buttons
Delegate a jQuery event from a stable parent to later children.
jQuery✓ Tested
Include padding in an element’s width
CSS: Learn how to include padding in an element’s width in a complete browser example.
CSS✓ Tested
Include padding in element width
Use border-box to keep CSS padding and borders inside the declared width.
CSS✓ Tested
List newly added staged files only
Git: Filter the cached diff by added status while leaving modified files out.
Git✓ Tested
Measure content, padding, and borders separately
jQuery: width, innerWidth, and outerWidth measure different parts of the box.
jQuery✓ Tested
Move focus to a heading without adding a tab stop
HTML: A negative tabindex permits programmatic focus while keeping the heading out of ordinary sequential tab navigation.
HTML✓ Tested
Parse an email address syntax
Parse an email address syntax using a complete Go program with explicit sample inputs.
Go✓ Tested
Summarize added and removed lines numerically
Git: Numstat provides tab-separated counts suitable for processing.
Git✓ Tested
Advance a calendar date
Advance a calendar date using a complete Go program with explicit sample inputs.
Go✓ Tested