FIND YOUR NEXT FEW LINES

Results for “only”

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

621 snippets foundClear filters
CDynamic memory & ownership

Create an independent copy of a byte buffer

C: Allocate the exact byte length and copy only after checking the result.

C✓ Tested
GoFiles & paths

Create and clean up a temporary file

Create and clean up a temporary file using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Files & paths

Create nested directories

Create a directory tree using the .NET Directory API.

C#✓ Tested
JavaFiles & paths

Create nested directories

Create missing parent directories with Java Files.createDirectories.

Java✓ Tested
GoFiles & paths

Create nested directories

Create nested directories using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonFiles & paths

Create nested folders

Create a folder and any missing parent folders in one call. Running the code again is safe when the folder already exists.

directory✓ Tested
Arduino / CTiming & control

Debounce a button with a stable-time check

Accept an input change only after it stays stable for 30 ms.

debounce✓ Tested
GoGetting Started

Declare a fixed-size array

Declare a fixed-size array using a complete Go program with explicit sample inputs.

Go✓ Tested
RustGetting Started

Declare a typed constant

Declare a typed constant in a complete Rust program using the standard library.

Rust✓ Tested
GoGetting Started

Declare and update a variable

Declare and update a variable using a complete Go program with explicit sample inputs.

Go✓ Tested
GitTags & repository configuration

Declare LF normalization for a file type

Git: A gitattributes rule records text normalization expectations for matching paths.

Git✓ Tested
RustParsing & byte data

Decode bytes as validated UTF-8

Decode bytes as validated UTF-8 in a complete Rust program using the standard library.

Rust✓ Tested