FIND YOUR NEXT FEW LINES

Results for “one-off”

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

621 snippets foundClear filters
AngularComponents & communication

Share two-way state through a model input

Share two-way state through a model input with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PythonDates & time zones

Skip weekends when advancing dates

Python: Walk calendar dates and count only Monday through Friday.

Python✓ Tested
C#Data & dates

Add calendar days

Use DateOnly for a date without a time zone in C#.

C#✓ Tested
CDynamic memory & ownership

Allocate an independent copy of a C string

C: Include one extra byte for the terminating null character.

C✓ Tested
CSSVisual treatment & accessibility

Allow pointer input to pass through a decorative overlay

CSS: Pointer-events none excludes the overlay from ordinary pointer hit testing.

CSS✓ Tested
CSSInteraction selectors

Alternate row backgrounds with a structural selector

CSS: Nth-child counts sibling positions starting at one.

CSS✓ Tested
ReactAccessibility & events

Announce a status update politely

Announce a status update politely with a small React component and explicit browser behavior.

React✓ Tested
AngularAccessibility & reusable patterns

Announce a status update with a live region

Announce a status update with a live region with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularReactive forms

Append a dynamic form control

Append a dynamic form control with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularSignals & state

Append to an array signal immutably

Append to an array signal immutably with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactGetting Started

Append to an array without mutating state

Append to an array without mutating state with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CSensor calculations

Apply a linear sensor calibration

Arduino / C: Convert a raw reading using an offset and scale measured for the sensor.

Arduino / C✓ Tested