FIND YOUR NEXT FEW LINES

Results for “first lines”

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

185 snippets foundClear filters
AngularLists & control flow

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
GitInspecting the working tree

Summarize added and removed lines numerically

Git: Numstat provides tab-separated counts suitable for processing.

Git✓ Tested
JavaScriptText handling & Unicode

Trim and discard blank lines

JavaScript: Split a text block, trim each line, and keep nonempty values.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Trim and discard blank lines

TypeScript: Split a text block, trim each line, and keep nonempty values.

TypeScript✓ Tested
C#Collections & data structures

Use a last-in first-out stack

C#: Stack is useful for reversible traversal and other nested operations.

C#✓ Tested
C++Containers & compound values

Use a last-in first-out stack

C++: Read top before pop because pop does not return the removed value.

C++✓ Tested
JavaScriptPromises & iteration protocols

Use the first fulfilled promise result

JavaScript: Promise.any ignores individual rejections until one input fulfills.

JavaScript✓ Tested
TypeScriptPromises & iteration protocols

Use the first fulfilled promise result

TypeScript: Promise.any ignores individual rejections until one input fulfills.

TypeScript✓ Tested
C#Types & reliable control flow

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
Bash ScriptsGetting Started

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
Bash ScriptsGetting Started

Write several literal lines

Bash Scripts: Write several literal lines with a small standalone Bash program.

Bash Scripts✓ Tested
CSSGetting Started

Write your first CSS rule

CSS: Learn how to write your first CSS rule in a complete browser example.

CSS✓ Tested