FIND YOUR NEXT FEW LINES

Results for “TRY_CONVERT”

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

247 snippets foundClear filters
PowerShellText & data

Read rows from CSV text

Parse CSV into objects with named properties.

CSV✓ Tested
GitBranches & ancestry

Read the current branch name

Git: show-current returns an empty string when HEAD is detached.

Git✓ Tested
RustNumbers & durations

Reject a narrowing integer conversion

Reject a narrowing integer conversion in a complete Rust program using the standard library.

Rust✓ Tested
GitBranches & ancestry

Rename the current branch

Git: branch -m changes the local branch name without creating a new commit.

Git✓ Tested
GitBranches & ancestry

Return to the previously checked-out branch

Git: The dash shorthand selects the previous branch in the checkout history.

Git✓ Tested
Docker / ComposeGetting Started

Separate an executable from default arguments

Docker / Compose: Separate an executable from default arguments with a complete introductory Dockerfile.

Docker / Compose✓ Tested
PowerShellText & data

Serialize a hashtable as JSON

Produce compact JSON for a small data object.

JSON✓ Tested
GitBranches & ancestry

Test whether one revision is an ancestor of another

Git: merge-base --is-ancestor reports its answer through the exit status.

Git✓ Tested
Docker / ComposeCompose service options

Add a fixed hostname mapping

Docker / Compose: extra_hosts adds an entry to the container’s hosts file.

Docker / Compose✓ Tested
ReactAccessibility & events

Announce a status update politely

Announce a status update politely with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Append to an array without mutating state

Append to an array without mutating state with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CSensor calculations

Apply a linear sensor calibration

Arduino / C: Convert a raw reading using an offset and scale measured for the sensor.

Arduino / C✓ Tested