Results for “one-off”
Small, practical examples. Search by task or narrow things down below.
Copy nested structured data independently
TypeScript: structuredClone creates an independent copy of supported structured values.
TypeScript✓ Tested
Count days between calendar dates
Python: Subtract date objects to get an exact calendar-day difference.
Python✓ Tested
Count days between two dates
Java: Use ChronoUnit.DAYS for an elapsed count rather than a Period day component.
Java✓ Tested
Customize a renderer through a function prop
Customize a renderer through a function prop with a small React component and explicit browser behavior.
React✓ Tested
Derive a value from an input signal
Derive a value from an input signal with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Determine whether a year is a leap year
Python: Use calendar.isleap rather than a simplified divisibility-by-four check.
Python✓ Tested
Disable networking for a Compose command
Docker / Compose: Disable networking for a Compose command in a small Compose file.
Docker / Compose✓ Tested
Drive the built-in LED low after turning it on
Arduino / C: digitalWrite changes the actual output level of a configured pin.
Arduino / C✓ Tested
Emit a typed object from a child
Emit a typed object from a child with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Expose an input with a public alias
Expose an input with a public alias with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Find the last day of a month
Java: Use YearMonth so leap years and month lengths are handled by the calendar library.
Java✓ Tested
Find the next chosen weekday
Java: TemporalAdjusters.next excludes the starting day even if it already has that weekday.
Java✓ Tested