Results for “int”
Small, practical examples. Search by task or narrow things down below.
Format a zero-padded numeric label
Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.
Linux Commands✓ Tested
Generate and measure a short output pulse
Arduino / C: delayMicroseconds can create a short blocking pulse on an output pin.
Arduino / C✓ Tested
Give a reusable record type a short name
C: A typedef names a structure type without changing its representation.
C✓ Tested
Group related values in nested structures
C: Nested members model a record that owns another simple record.
C✓ Tested
Handle Escape to dismiss a panel
Handle Escape to dismiss a panel with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Handle the Enter key specifically
Handle the Enter key specifically with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Highlight a group containing keyboard focus
CSS: Focus-within matches a parent when any descendant has focus.
CSS✓ Tested
Increment a shared counter atomically
C#: Interlocked performs an indivisible update without a separate lock for this operation.
C#✓ Tested
Initialize structure fields by name
C: Designated initializers make field assignments independent of their declaration order.
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 mutable value without rendering on each write
Keep a mutable value without rendering on each write with a small React component and explicit browser behavior.
React✓ Tested
Keep caller data unchanged by passing a structure by value
C: A value parameter is a copy of the original structure.
C✓ Tested