FIND YOUR NEXT FEW LINES

Results for “int”

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

797 snippets foundClear filters
CFiles

Count newline characters

Count newline bytes in a C file while retaining EOF as an int.

C✓ Tested
C++Ordering & set operations

Count occurrences in a sorted sequence

C++: equal_range finds the half-open interval containing values equal to the key.

C++✓ Tested
C#Collections

Count words with GroupBy

Group repeated C# words and print ordered counts.

C#✓ Tested
HTMLGetting Started

Create a complete HTML document

HTML: Learn how to create a complete HTML document in a complete browser example.

HTML✓ Tested
Linux CommandsArchives & checksums

Create a compressed tar archive

Bundle a directory into a gzip-compressed tar archive, preserving the directory structure.

tar✓ Tested
PowerShellFiles & paths

Create a directory if needed

Ensure a directory exists before writing output.

New-Item✓ Tested
Docker / ComposeGetting Started

Create a small file at build time

Docker / Compose: Create a small file at build time with a complete introductory Dockerfile.

Docker / Compose✓ Tested
HTMLGetting Started

Create a small table with headers

HTML: Learn how to create a small table with headers in a complete browser example.

HTML✓ Tested
CSSLayout

Create equal grid columns

Divide a CSS grid into three equal columns with gaps.

CSS✓ Tested
ReactComponents & props

Customize a renderer through a function prop

Customize a renderer through a function prop with a small React component and explicit browser behavior.

React✓ 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
HTMLMetadata & document links

Declare a preferred canonical URL

HTML: A canonical link identifies the preferred public URL for duplicate representations of a document.

HTML✓ Tested