Results for “long”
Small, practical examples. Search by task or narrow things down below.
Center content with flexbox
Center a child along both axes inside a CSS flex container.
CSS✓ Tested
Collect a serial line in a fixed buffer
Read a short command without dynamic String allocation.
serial line✓ Tested
Count a leading run of allowed characters
C: strspn counts bytes at the start that belong to a specified character set.
C✓ Tested
Extract a basename without an external process
Bash Scripts: Double hash removes the longest matching prefix ending in a slash.
Bash Scripts✓ Tested
Handle a request timeout
jQuery: The timeout option bounds how long the client waits.
jQuery✓ Tested
Include untracked files in a stash
Git: The include-untracked option saves new files along with tracked edits.
Git✓ Tested
Keep a tall section inside a local vertical scroller
CSS: A bounded height and overflow auto keep long content from stretching the surrounding page.
CSS✓ Tested
Match a whole word
Linux Commands: Use grep -w to exclude a matching substring inside a longer word.
Linux Commands✓ Tested
Merge two sorted arrays
C: Advance the pointer belonging to the smaller next element and copy any remaining suffix.
C✓ Tested
Read an ISO week year and week number
Java: Use ISO week fields together because a week can belong to the previous calendar year.
Java✓ Tested
Remove stale remote-tracking references
Git: Fetch with prune removes tracking references for branches no longer present on the remote.
Git✓ Tested
Scroll wide code locally
Keep long code inside a horizontally scrollable CSS container.
CSS✓ Tested