FIND YOUR NEXT FEW LINES

Results for “if”

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

946 snippets foundClear filters
HTMLNative disclosure & dialogs

Open and close a modal dialog

HTML: showModal places a dialog in the top layer and makes the rest of the document inert.

HTML✓ Tested
CSSFlexbox alignment

Override cross-axis alignment for one item

CSS: Align-self changes one item without changing its siblings’ alignment.

CSS✓ Tested
C++Ownership & optional values

Own one dynamically allocated value with unique_ptr

C++: make_unique allocates a value whose lifetime is tied to its owning smart pointer.

C++✓ Tested
PowerShellStrings & literal text

Pad a label with leading zeroes

PowerShell: Use a numeric format specifier to control the displayed width.

PowerShell✓ Tested
C#Text validation & encoding

Pad a numeric label to a fixed width

C#: Use a numeric format specifier to add leading zeroes.

C#✓ Tested
SQL ServerSelect & page

Page an ordered result

Skip rows and fetch a bounded page.

OFFSET✓ Tested
CSSVisual treatment & accessibility

Paint a gradient without an image file

CSS: Linear-gradient generates a CSS background image from color stops.

CSS✓ Tested
C#LINQ transformations

Pair corresponding collection elements

C#: Zip stops at the shorter sequence, so validate lengths separately if mismatches are an error.

C#✓ Tested
SQLRelationships & missing data

Pair employees with their managers

SQL: Alias a table twice to represent two different roles in one relationship.

SQL✓ Tested
SQL ServerRelationships & missing data

Pair employees with their managers

SQL Server: Alias a table twice to represent two different roles in one relationship.

SQL Server✓ Tested
PostgresRelationships & missing data

Pair employees with their managers

Postgres: Alias a table twice to represent two different roles in one relationship.

Postgres✓ Tested
SQLiteRelationships & missing data

Pair employees with their managers

SQLite: Alias a table twice to represent two different roles in one relationship.

SQLite✓ Tested