FIND YOUR NEXT FEW LINES

Results for “fixed”

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

103 snippets foundClear filters
PostgresDates & series

Format a timestamp with to_char

Produce a fixed numeric date string.

to_char✓ Tested
C++Numbers & algorithms

Format decimal output

Use fixed and setprecision to print two C++ decimal places.

C++✓ Tested
CSSFlexbox alignment

Give an item the remaining horizontal space

CSS: A growing flex item absorbs free space after fixed items have been sized.

CSS✓ Tested
PythonFile operations & archives

Hash a file without reading it all at once

Python: Feed fixed-size binary chunks into SHA-256 for files larger than memory.

Python✓ Tested
Arduino / CData & storage

Map an input range to an output range

Scale an integer reading to a different interval.

map✓ Tested
JavaScriptStrings

Pad a numeric label

Convert a number to text and pad it to a fixed width.

JavaScript✓ Tested
CSSResponsive design

Preserve an aspect ratio

Reserve a 16:9 CSS box without a fixed height.

CSS✓ Tested
Linux CommandsTransforming text

Print the final lines of a file

Linux Commands: Use tail -n for a fixed-size suffix of a log.

Linux Commands✓ Tested
Linux CommandsStreams & byte tools

Read a byte prefix

Linux Commands: Use GNU head -c for a fixed number of bytes, independent of line boundaries.

Linux Commands✓ Tested
Linux CommandsStreams & byte tools

Read a byte suffix

Linux Commands: Use GNU tail -c to extract a fixed-size ending.

Linux Commands✓ Tested
PowerShellStructured formats & encodings

Read JSON into a hashtable

PowerShell: AsHashtable produces dictionary-style results for keys that are data rather than fixed property names.

PowerShell✓ Tested
JavaScriptRegular expressions & URL encoding

Read named regex capture groups

JavaScript: Named groups make a fixed input format easier to inspect than numeric group positions.

JavaScript✓ Tested