Results for “cr”
Small, practical examples. Search by task or narrow things down below.
Clamp a value to an allowed interval
Clamp a value to an allowed interval using a complete Go program with explicit sample inputs.
Go✓ Tested
Clamp an integer to inclusive bounds
C: Explicit comparisons avoid relying on nonstandard min or max macros.
C✓ Tested
Clean up a temporary directory automatically
Use an EXIT trap so temporary files are removed when the script ends.
mktemp✓ Tested
Clear all map entries
Clear all map entries using a complete Go program with explicit sample inputs.
Go✓ Tested
Clip content that exceeds a fixed-height box
CSS: Overflow hidden clips the painted content while the full content remains in the DOM.
CSS✓ Tested
Clone a local bare repository
Git: A local remote provides the same clone workflow without any network dependency.
Git✓ Tested
Clone a map before editing it
Clone a map before editing it using a complete Go program with explicit sample inputs.
Go✓ Tested
Clone an owned value explicitly
Clone an owned value explicitly in a complete Rust program using the standard library.
Rust✓ Tested
Clone inert template content into the document
HTML: Template children stay out of the rendered document until their fragment is inserted.
HTML✓ Tested
Clone markup without sharing its identity
jQuery: clone creates a separate node; change duplicated IDs before inserting.
jQuery✓ Tested
Collapse repeated spaces
Linux Commands: Use tr -s when repeated occurrences of a character should become one.
Linux Commands✓ Tested
Collect borrowed values into owned strings
Collect borrowed values into owned strings in a complete Rust program using the standard library.
Rust✓ Tested