FIND YOUR NEXT FEW LINES

Results for “if”

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

946 snippets foundClear filters
CSSGetting Started

Target a unique element by ID

CSS: Learn how to target a unique element by ID in a complete browser example.

CSS✓ Tested
CSSGetting Started

Target an element by class

CSS: Learn how to target an element by class in a complete browser example.

CSS✓ Tested
SQLChange & combine data

Test missing values with IS NULL

Find rows where an optional value is absent.

IS NULL✓ Tested
HTMLNative disclosure & dialogs

Toggle a native popover from a button

HTML: The popovertarget relationship handles show and hide behavior without a click handler.

HTML✓ Tested
C#LINQ transformations

Transform each item with Select

C#: Project each input value into a new value without modifying the source array.

C#✓ Tested
SQLText cleanup & matching

Treat an empty trimmed value as missing

SQL: NULLIF converts an empty string to NULL before a fallback is applied.

SQL✓ Tested
SQL ServerText cleanup & matching

Treat an empty trimmed value as missing

SQL Server: NULLIF converts an empty string to NULL before a fallback is applied.

SQL Server✓ Tested
PostgresText cleanup & matching

Treat an empty trimmed value as missing

Postgres: NULLIF converts an empty string to NULL before a fallback is applied.

Postgres✓ Tested
SQLiteText cleanup & matching

Treat an empty trimmed value as missing

SQLite: NULLIF converts an empty string to NULL before a fallback is applied.

SQLite✓ Tested
Arduino / CText & bounded buffers

Trim surrounding whitespace from an Arduino String

Arduino / C: String.trim modifies the object in place.

Arduino / C✓ Tested
SQLGetting Started

Turn a condition into a result label

SQL: Use CASE to describe stock availability for each row.

SQL✓ Tested
SQL ServerGetting Started

Turn a condition into a result label

SQL Server: Use CASE to describe stock availability for each row.

SQL Server✓ Tested