Results for “id”
Small, practical examples. Search by task or narrow things down below.
Choose the smaller of two values
Arduino / C: Choose the smaller of two values on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Clamp a number to inclusive bounds
C#: Math.Clamp returns the nearest endpoint when the value lies outside the range.
C#✓ Tested
Clamp an integer to inclusive bounds
C: Explicit comparisons avoid relying on nonstandard min or max macros.
C✓ Tested
Clear a container’s contents
jQuery: Learn how to clear a container’s contents in a complete browser example.
jQuery✓ Tested
Clear a flag without affecting neighboring bits
Arduino / C: bitClear resets only the selected bit.
Arduino / C✓ Tested
Clear an element
Remove child content while keeping the jQuery-selected container.
jQuery✓ Tested
Clear an owning pointer after releasing its allocation
C: Assigning NULL helps prevent accidental reuse through the same variable.
C✓ Tested
Clone a local bare repository
Git: A local remote provides the same clone workflow without any network dependency.
Git✓ Tested
Collect a serial line in a fixed buffer
Read a short command without dynamic String allocation.
serial line✓ Tested
Collect matching ancestors
jQuery: parents can return several ancestors, ordered from the nearest outward.
jQuery✓ Tested
Collect ordered values into an array
Build a sorted array from query rows.
array_agg✓ Tested
Collect repeated form field names
jQuery: serializeArray preserves multiple values as name-value records.
jQuery✓ Tested