FIND YOUR NEXT FEW LINES

Results for “C++”

Small, practical examples. Search by task or narrow things down below.

3000 snippets foundClear filters
JavaScriptObject behavior & collections

Prevent runtime changes to top-level properties

JavaScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Prevent runtime changes to top-level properties

TypeScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

TypeScript✓ Tested
GitRestoring & revising local work

Preview removal of an untracked scratch file

Git: The dry-run flag shows what clean would remove without deleting it.

Git✓ Tested
RustGetting Started

Print a collection for inspection

Print a collection for inspection in a complete Rust program using the standard library.

Rust✓ Tested
Arduino / CSerial communication

Print a floating-point value with fixed precision

Choose the number of decimal places in serial output.

float✓ Tested
PythonGetting Started

Print a number with two decimal places

Python: Format a small decimal value consistently for display.

Python✓ Tested
C#Getting Started

Print a number with two decimal places

C#: Format a small decimal value consistently for display.

C#✓ Tested
JavaGetting Started

Print a number with two decimal places

Java: Format a small decimal value consistently for display.

Java✓ Tested
JavaScriptGetting Started

Print a number with two decimal places

JavaScript: Format a small decimal value consistently for display.

JavaScript✓ Tested
TypeScriptGetting Started

Print a number with two decimal places

TypeScript: Format a small decimal value consistently for display.

TypeScript✓ Tested
C++Getting Started

Print a number with two decimal places

C++: Format a small decimal value consistently for display.

C++✓ Tested
CGetting Started

Print a number with two decimal places

C: Format a small decimal value consistently for display.

C✓ Tested