FIND YOUR NEXT FEW LINES

Results for “if”

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

946 snippets foundClear filters
TypeScriptUTC date operations

Sort timestamp strings by their parsed instants

TypeScript: Compare epoch values explicitly when date strings may contain different offsets.

TypeScript✓ Tested
CSSGrid placement

Span a grid item across multiple columns

CSS: Grid-column span counts tracks and includes the gaps between them.

CSS✓ Tested
HTMLTables & list numbering

Span a group header across several rows

HTML: Rowspan can label a group of related rows without repeating the label.

HTML✓ Tested
HTMLTables & list numbering

Span one header across several columns

HTML: Colspan lets a heading cover a defined number of columns in the table grid.

HTML✓ Tested
PythonStrings & dates

Split a string into words

Split text on whitespace, automatically treating repeated spaces, tabs, and line breaks as a single separator.

string✓ Tested
Arduino / CText & bounded buffers

Split a writable comma-delimited buffer

Arduino / C: strtok modifies its buffer and returns successive tokens.

Arduino / C✓ Tested
SQL ServerDates & text

Split delimited text with positions

Retain original order with STRING_SPLIT ordinals.

STRING_SPLIT✓ Tested
CSSFlexbox alignment

Stack flex items vertically

CSS: Flex-direction column makes the main axis vertical.

CSS✓ Tested
HTMLNative disclosure & dialogs

Start a disclosure open while keeping it collapsible

HTML: The open attribute sets the initial details state without JavaScript.

HTML✓ Tested
GitRestoring & revising local work

Stop tracking a generated file while keeping it locally

Git: Removing a path from the index leaves its working copy intact when cached is specified.

Git✓ Tested
CSSInteraction selectors

Style a card based on a selected descendant

CSS: Has matches the parent when its relative selector finds a checked control inside it.

CSS✓ Tested
CSSInteraction selectors

Style a control that fails native validation

CSS: Invalid reflects the input’s current constraint-validation result.

CSS✓ Tested