FIND YOUR NEXT FEW LINES

Results for “fixed”

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

103 snippets foundClear filters
CStrings

Copy text into a fixed buffer

Use snprintf and check for truncation when copying a C string.

C✓ Tested
RustGetting Started

Create a fixed-size array

Create a fixed-size array in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsGetting Started

Declare a fixed configuration value

Bash Scripts: Declare a fixed configuration value with a small standalone Bash program.

Bash Scripts✓ Tested
GoGetting Started

Declare a fixed-size array

Declare a fixed-size array using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaScriptNumbers & numeric validation

Display a number with a fixed decimal width

JavaScript: toFixed returns a formatted string rather than a numeric value.

JavaScript✓ Tested
TypeScriptNumbers & numeric validation

Display a number with a fixed decimal width

TypeScript: toFixed returns a formatted string rather than a numeric value.

TypeScript✓ Tested
GoDates & times

Display an instant at a fixed offset

Display an instant at a fixed offset using a complete Go program with explicit sample inputs.

Go✓ Tested
AngularPipes & formatting

Format a number with fixed decimal places

Format a number with fixed decimal places with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Arduino / CText & bounded buffers

Format several integers in a fixed buffer

Arduino / C: snprintf limits writes to the buffer size and includes a terminating null byte.

Arduino / C✓ Tested
CStructures & function interfaces

Iterate over a fixed array of records

C: Compute the array element count with sizeof at the point where it is still an array.

C✓ Tested
CSSPositioning & stacking

Keep a control fixed to the viewport during scrolling

CSS: Fixed positioning normally uses the viewport when no ancestor establishes a different fixed containing block.

CSS✓ Tested
Arduino / CGetting Started

Keep fixed text in flash memory

Arduino / C: Keep fixed text in flash memory on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested