FIND YOUR NEXT FEW LINES

Results for “if”

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

946 snippets foundClear filters
PythonJSON & CSV

Parse a JSON string

Convert a JSON string into a Python dictionary and read values by key.

json✓ Tested
PythonStrings & dates

Parse and format a date

Convert a date string into a datetime object, then format it in a different, human-readable order.

date✓ Tested
CSSBox dimensions & overflow

Place fixed-size boxes on the same line

CSS: Inline-block allows dimensions while participating in inline layout.

CSS✓ Tested
SQLText cleanup & matching

Place missing values after known values portably

SQL: A CASE sort key controls NULL placement without relying on engine-specific defaults.

SQL✓ Tested
SQL ServerText cleanup & matching

Place missing values after known values portably

SQL Server: A CASE sort key controls NULL placement without relying on engine-specific defaults.

SQL Server✓ Tested
PostgresText cleanup & matching

Place missing values after known values portably

Postgres: A CASE sort key controls NULL placement without relying on engine-specific defaults.

Postgres✓ Tested
SQLiteText cleanup & matching

Place missing values after known values portably

SQLite: A CASE sort key controls NULL placement without relying on engine-specific defaults.

SQLite✓ Tested
CSSPositioning & stacking

Position a badge relative to its container

CSS: A positioned ancestor establishes the containing block for an absolutely positioned child.

CSS✓ Tested
CSSPositioning & stacking

Position an item from the writing direction’s start edge

CSS: Logical insets follow direction, so inline-start is the right side in this RTL container.

CSS✓ Tested
jQueryHTTP requests

Post a JSON request body

jQuery: JSON.stringify and application/json send a JSON document.

jQuery✓ Tested
CSSType & reading flow

Preserve line breaks while collapsing repeated spaces

CSS: Pre-line retains newlines but does not preserve all whitespace like pre-wrap does.

CSS✓ Tested
CSSFlexbox alignment

Prevent an item from shrinking

CSS: Flex-shrink zero preserves a required size even when the container overflows.

CSS✓ Tested