Results for “save file”
Small, practical examples. Search by task or narrow things down below.
Print a number with two decimal places
C++: Format a small decimal value consistently for display.
C++✓ Tested
Print a number with two decimal places
C: Format a small decimal value consistently for display.
C✓ Tested
Print text containing percent characters literally
Bash Scripts: Never use untrusted text as the printf format string.
Bash Scripts✓ Tested
Process a first-in first-out queue
C++: Queue exposes its front item separately from the operation that removes it.
C++✓ Tested
Process the lines of an in-memory string
Java: Use String.lines to handle common line terminators without retaining them.
Java✓ Tested
Produce a lazy sequence with a generator
JavaScript: A generator yields one value per iteration without building an intermediate array.
JavaScript✓ Tested
Produce a lazy sequence with a generator
TypeScript: A generator yields one value per iteration without building an intermediate array.
TypeScript✓ Tested
Produce compact deterministic JSON
Python: Sort dictionary keys and remove separator whitespace for a reproducible representation.
Python✓ Tested
Protect a shared container with a mutex
C++: A scoped lock_guard releases the mutex when its scope ends.
C++✓ Tested
Provide a concise page description
HTML: A description meta element summarizes a document for clients that use that metadata.
HTML✓ Tested
Provide a fallback for an unset custom property
CSS: The second var argument supplies a value when the custom property is unavailable.
CSS✓ Tested
Provide a list of selectable options
HTML: Learn how to provide a list of selectable options in a complete browser example.
HTML✓ Tested