FIND YOUR NEXT FEW LINES

Results for “open”

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

308 snippets foundClear filters
jQueryTraversal & selection

Filter a selection

Reduce a jQuery selection to elements with a matching class.

jQuery✓ Tested
JavaCollections

Filter even numbers

Use a Java stream to collect only even values.

Java✓ Tested
Arduino / CGetting Started

Find a division remainder

Arduino / C: Find a division remainder on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CArrays & embedded state

Find a sample range in one pass

Arduino / C: Initialize extrema from the first element of a nonempty array.

Arduino / C✓ Tested
Arduino / CArrays & embedded state

Find a value in a small lookup table

Arduino / C: A linear scan is simple and predictable for a small fixed array.

Arduino / C✓ Tested
jQueryTraversal & selection

Find descendants

Select only matching descendants of a jQuery container.

jQuery✓ Tested
jQueryTraversal & selection

Find the nearest matching ancestor

Read a parent row attribute using jQuery closest.

jQuery✓ Tested
JavaNumbers & dates

Format a decimal number

Format a Java decimal with two digits and a fixed locale.

Java✓ Tested
Arduino / CText & bounded buffers

Format several integers in a fixed buffer

Arduino / C: snprintf limits writes to the buffer size and includes a terminating null byte.

Arduino / C✓ Tested
Arduino / CDigital signals & interrupts

Generate and measure a short output pulse

Arduino / C: delayMicroseconds can create a short blocking pulse on an output pin.

Arduino / C✓ Tested
HTMLGetting Started

Give a date a machine-readable value

HTML: Learn how to give a date a machine-readable value in a complete browser example.

HTML✓ Tested
HTMLMetadata & document links

Give a document a descriptive browser title

HTML: The title element supplies the browser document title independently of the visible heading.

HTML✓ Tested