FIND YOUR NEXT FEW LINES

Results for “ratio”

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

305 snippets foundClear filters
C++Tasks & synchronization

Check whether a future is ready without blocking

C++: A zero-duration wait reports timeout until the producer sets a value.

C++✓ Tested
Linux CommandsDates & process utilities

Copy a file with explicit permissions

Linux Commands: Use install to create parent directories and set the destination mode in one operation.

Linux Commands✓ Tested
JavaScriptText handling & Unicode

Count Unicode code points in a string

JavaScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Count Unicode code points in a string

TypeScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.

TypeScript✓ Tested
GitRemotes & collaboration

Create an annotated release tag

Mark a revision with a readable release description.

tag✓ Tested
Linux CommandsStreams & byte tools

Encode and decode a file with Base64

Linux Commands: Use GNU base64 for text transport of bytes and --decode for the reverse operation.

Linux Commands✓ Tested
CSSVisual treatment & accessibility

Fit an entire image inside a differently shaped box

CSS: Contain preserves the image aspect ratio while keeping all of it visible inside the specified content box.

CSS✓ Tested
C#Asynchronous work & URI handling

Increment a shared counter atomically

C#: Interlocked performs an indivisible update without a separate lock for this operation.

C#✓ Tested
CStructures & function interfaces

Initialize structure fields by name

C: Designated initializers make field assignments independent of their declaration order.

C✓ Tested
GitRemotes & collaboration

Inspect a GitHub remote URL

Configure and inspect an example origin without contacting the network.

GitHub✓ Tested
HTMLImages & embedded documents

Keep an image and its visible caption together

HTML: Figure and figcaption represent a self-contained illustration with an associated caption.

HTML✓ Tested
PowerShellFiles & paths

List files by extension

Enumerate regular files and return their names in order.

Get-ChildItem✓ Tested