FIND YOUR NEXT FEW LINES

Results for “one-off”

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

621 snippets foundClear filters
PostgresDates & series

Extract part of a date

Read a calendar component with EXTRACT.

EXTRACT✓ Tested
SQLiteQueries & text

Extract part of a string

Use one-based positions with substr.

substr✓ Tested
ReactCustom hooks

Extract reusable toggle behavior

Extract reusable toggle behavior with a small React component and explicit browser behavior.

React✓ Tested
jQueryAnimation completion

Fade an element out and hide it

jQuery: fadeOut sets display none after the opacity animation finishes.

jQuery✓ Tested
ReactLists & filtering

Filter a list by a search term

Filter a list by a search term with a small React component and explicit browser behavior.

React✓ Tested
AngularLists & control flow

Filter a signal-backed list

Filter a signal-backed list with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularLifecycle & observable data

Filter observable emissions

Filter observable emissions with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaScriptObject behavior & collections

Find shared members of two sets

JavaScript: Filter one set through the other set’s membership test.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Find shared members of two sets

TypeScript: Filter one set through the other set’s membership test.

TypeScript✓ Tested
SQL ServerDates & text

Find the final day of a month

Use EOMONTH without manually calculating month length.

EOMONTH✓ Tested
CArrays

Find the largest array value

Track the maximum in a nonempty C integer array.

C✓ Tested
JavaScriptArray restructuring

Flatten a single nesting level

JavaScript: flat defaults to a depth of one and creates a new array.

JavaScript✓ Tested