FIND YOUR NEXT FEW LINES

Results for “two”

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

173 snippets foundClear filters
CStrings & byte buffers

Compare two C strings for equality

C: strcmp returns zero only when both null-terminated byte strings are equal.

C✓ Tested
Bash ScriptsInput streams & redirection

Compare two generated sorted streams

Bash Scripts: Process substitution lets a command consume another command’s output as a file-like input.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Compare two text values

Bash Scripts: Compare two text values with a small standalone Bash program.

Bash Scripts✓ Tested
CNumeric parsing & arithmetic

Compute a two-dimensional vector length

C: hypot avoids unnecessary intermediate overflow compared with squaring both inputs directly.

C✓ Tested
GitBranches & ancestry

Count commits unique to each of two branches

Git: The symmetric difference with left-right separates commits reachable from only one side.

Git✓ Tested
JavaDates & time zones

Count days between two dates

Java: Use ChronoUnit.DAYS for an elapsed count rather than a Period day component.

Java✓ Tested
Docker / ComposeNetworks & volume metadata

Create a network marked for internal connectivity

Docker / Compose: The internal option disables normal external routing for that network.

Docker / Compose✓ Tested
CSSGetting Started

Create two equal grid columns

CSS: Learn how to create two equal grid columns in a complete browser example.

CSS✓ Tested
Docker / ComposeCompose service options

Disable a service’s network interfaces

Docker / Compose: network_mode none leaves only the loopback interface.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Disable networking for a Compose command

Docker / Compose: Disable networking for a Compose command in a small Compose file.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Disable networking for a local command

Docker / Compose: Disable networking for a local command using a locally available Ubuntu image.

Docker / Compose✓ Tested
SQLSchema design & transactions

Enforce a relationship between two columns

SQL: A row-level CHECK can require a start value to be no greater than an end value.

SQL✓ Tested