FIND YOUR NEXT FEW LINES

Results for “cr”

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

1833 snippets foundClear filters
SQL ServerSubqueries & ranked selection

Find the second-highest distinct value

SQL Server: Select the maximum below the overall maximum to skip ties at the top.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Find the second-highest distinct value

Postgres: Select the maximum below the overall maximum to skip ties at the top.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Find the second-highest distinct value

SQLite: Select the maximum below the overall maximum to skip ties at the top.

SQLite✓ Tested
GoDates & times

Find the weekday for a date

Find the weekday for a date using a complete Go program with explicit sample inputs.

Go✓ Tested
CSSVisual treatment & accessibility

Fit an entire image inside a differently shaped box

CSS: Contain preserves the image aspect ratio while keeping all of it visible inside the specified content box.

CSS✓ Tested
CSSResponsive design

Fit as many columns as possible

Use auto-fit and minmax for a CSS grid that responds to its available width.

CSS✓ Tested
RustIterators & transformations

Flatten nested collections

Flatten nested collections in a complete Rust program using the standard library.

Rust✓ Tested
ReactRefs & DOM interaction

Focus an input through a ref

Focus an input through a ref with a small React component and explicit browser behavior.

React✓ Tested
Linux CommandsDates & process utilities

Format a known UTC timestamp

Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.

Linux Commands✓ Tested
GoGetting Started

Format a readable status message

Format a readable status message using a complete Go program with explicit sample inputs.

Go✓ Tested
SQLiteDates & time

Format a timestamp

Extract a year and month from ISO timestamp text.

strftime✓ Tested
PostgresDates & series

Format a timestamp with to_char

Produce a fixed numeric date string.

to_char✓ Tested