Results for “k”
Small, practical examples. Search by task or narrow things down below.
Find text inside tracked files
Git: Find text inside tracked files inside the disposable repository created by the input setup.
Git✓ Tested
Find the first matching value with a fallback
Python: Pass a generator and default to next to avoid building an intermediate list.
Python✓ Tested
Find the next chosen weekday
Java: TemporalAdjusters.next excludes the starting day even if it already has that weekday.
Java✓ Tested
Find the weekday for a date
Find the weekday for a date using a complete Go program with explicit sample inputs.
Go✓ Tested
Format a known timestamp in UTC
C: gmtime converts to UTC calendar fields and strftime formats them.
C✓ Tested
Format a known UTC timestamp
Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.
Linux Commands✓ Tested
Give an element a background
CSS: Learn how to give an element a background in a complete browser example.
CSS✓ Tested
Handle a button click
Attach a jQuery click handler to update text.
jQuery✓ Tested
Handle a button click
Handle a button click with a small React component and explicit browser behavior.
React✓ Tested
Handle a button click
Handle a button click with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Handle a nonzero background-job exit
Bash Scripts: Wait reports a child’s exit code; put it in a conditional when failure is expected.
Bash Scripts✓ Tested
Handle an Escape key press
Handle an Escape key press with a small React component and explicit browser behavior.
React✓ Tested