Results for “fixed”
Small, practical examples. Search by task or narrow things down below.
Copy text into a fixed buffer
Use snprintf and check for truncation when copying a C string.
C✓ Tested
Create a fixed-size array
Create a fixed-size array in a complete Rust program using the standard library.
Rust✓ Tested
Declare a fixed configuration value
Bash Scripts: Declare a fixed configuration value with a small standalone Bash program.
Bash Scripts✓ Tested
Declare a fixed-size array
Declare a fixed-size array using a complete Go program with explicit sample inputs.
Go✓ Tested
Display a number with a fixed decimal width
JavaScript: toFixed returns a formatted string rather than a numeric value.
JavaScript✓ Tested
Display a number with a fixed decimal width
TypeScript: toFixed returns a formatted string rather than a numeric value.
TypeScript✓ Tested
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
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
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
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
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
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