Results for “first lines”
Small, practical examples. Search by task or narrow things down below.
Style the first and last list items
Style the first and last list items with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Summarize added and removed lines numerically
Git: Numstat provides tab-separated counts suitable for processing.
Git✓ Tested
Trim and discard blank lines
JavaScript: Split a text block, trim each line, and keep nonempty values.
JavaScript✓ Tested
Trim and discard blank lines
TypeScript: Split a text block, trim each line, and keep nonempty values.
TypeScript✓ Tested
Use a last-in first-out stack
C#: Stack is useful for reversible traversal and other nested operations.
C#✓ Tested
Use a last-in first-out stack
C++: Read top before pop because pop does not return the removed value.
C++✓ Tested
Use the first fulfilled promise result
JavaScript: Promise.any ignores individual rejections until one input fulfills.
JavaScript✓ Tested
Use the first fulfilled promise result
TypeScript: Promise.any ignores individual rejections until one input fulfills.
TypeScript✓ Tested
Write a generic first-or-fallback helper
C#: Constrain a generic helper through its input shape and return an explicit caller-supplied fallback.
C#✓ Tested
Write and run a first Bash script
Bash Scripts: Write and run a first Bash script with a small standalone Bash program.
Bash Scripts✓ Tested
Write several literal lines
Bash Scripts: Write several literal lines with a small standalone Bash program.
Bash Scripts✓ Tested
Write your first CSS rule
CSS: Learn how to write your first CSS rule in a complete browser example.
CSS✓ Tested