FIND YOUR NEXT FEW LINES

Results for “media”

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

31 snippets foundClear filters
SQLiteWindow analytics

Sum a row and its immediate predecessor

SQLite: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.

SQLite✓ Tested
CSSGetting Started

Apply a rule at a viewport breakpoint

CSS: Learn how to apply a rule at a viewport breakpoint in a complete browser example.

CSS✓ Tested
CSSResponsive design

Stack columns on small screens

Change a two-column CSS grid to one column at a viewport breakpoint.

CSS✓ Tested
C#Text validation & encoding

Build text incrementally with StringBuilder

C#: Append fragments instead of repeatedly concatenating intermediate strings in a loop.

C#✓ Tested
CSmall algorithms & bit operations

Calculate a least common multiple using a GCD

C: Divide before multiplying to reduce the risk of intermediate overflow.

C✓ Tested
C++Numeric parsing & calculations

Calculate a two-dimensional vector length

C++: hypot avoids unnecessary intermediate overflow in the sum of squares.

C++✓ Tested
HTMLImages & embedded documents

Choose a different image for a small viewport

HTML: Picture evaluates source media conditions before falling back to the img source.

HTML✓ Tested
CNumeric parsing & arithmetic

Compute a two-dimensional vector length

C: hypot avoids unnecessary intermediate overflow compared with squaring both inputs directly.

C✓ Tested
jQueryAnimation completion

Disable animations for a reduced-motion mode

jQuery: The global fx.off switch causes effects to finish immediately.

jQuery✓ Tested
PythonIteration & sequences

Find the first matching value with a fallback

Python: Pass a generator and default to next to avoid building an intermediate list.

Python✓ Tested
CSSResponsive conditions & sizing

Hide interface controls in print layout

CSS: A print media query can retain article content while removing interactive controls.

CSS✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Inspect every command status in a pipeline

Bash Scripts: Copy PIPESTATUS immediately before another command overwrites it.

Bash Scripts✓ Tested