FIND YOUR NEXT FEW LINES

Results for “add”

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

123 snippets foundClear filters
JavaPrecise numeric calculations

Detect integer addition overflow

Java: Math.addExact throws rather than silently wrapping on overflow.

Java✓ Tested
Linux CommandsDates & process utilities

Format a zero-padded numeric label

Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.

Linux Commands✓ Tested
RustParsing & byte data

Format an integer as padded hexadecimal

Format an integer as padded hexadecimal in a complete Rust program using the standard library.

Rust✓ Tested
jQueryEvents

Handle dynamically added buttons

Delegate a jQuery event from a stable parent to later children.

jQuery✓ Tested
CSSGetting Started

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
CSSInteraction & themes

Include padding in element width

Use border-box to keep CSS padding and borders inside the declared width.

CSS✓ Tested
GitInspecting the working tree

List newly added staged files only

Git: Filter the cached diff by added status while leaving modified files out.

Git✓ Tested
jQueryCollections & styling

Measure content, padding, and borders separately

jQuery: width, innerWidth, and outerWidth measure different parts of the box.

jQuery✓ Tested
HTMLAccessible structure

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
GoErrors & validation

Parse an email address syntax

Parse an email address syntax using a complete Go program with explicit sample inputs.

Go✓ Tested
GitInspecting the working tree

Summarize added and removed lines numerically

Git: Numstat provides tab-separated counts suitable for processing.

Git✓ Tested
GoDates & times

Advance a calendar date

Advance a calendar date using a complete Go program with explicit sample inputs.

Go✓ Tested