FIND YOUR NEXT FEW LINES

Results for “test”

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

985 snippets foundClear filters
GitRestoring & revising local work

Add a forgotten file to the latest unpublished commit

Git: Stage the missing file before amending without changing the message.

Git✓ Tested
CSmall algorithms & bit operations

Calculate the greatest common divisor

C: Euclid’s algorithm repeatedly replaces a pair with the divisor and remainder.

C✓ Tested
AngularLifecycle & observable data

Combine the latest values from observables

Combine the latest values from observables with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
GitRestoring & revising local work

Correct the latest unpublished commit message

Git: Amend replaces the current commit while preserving its tree when no new changes are staged.

Git✓ Tested
JavaPrecise numeric calculations

Find the greatest common divisor

Java: BigInteger.gcd calculates an exact nonnegative common divisor.

Java✓ Tested
C++Numeric parsing & calculations

Find the greatest common divisor with the standard library

C++: std::gcd computes a nonnegative integer common divisor.

C++✓ Tested
PostgresRows & writes

Get the latest row in each group

Select one ordered row per key with DISTINCT ON.

DISTINCT ON✓ Tested
ReactAsync work & status

Keep only the latest requested result

Keep only the latest requested result with a small React component and explicit browser behavior.

React✓ Tested
GitGetting Started

List paths saved in the latest commit

Git: List paths saved in the latest commit inside the disposable repository created by the input setup.

Git✓ Tested
GitGetting Started

Read a file from the latest commit

Git: Read a file from the latest commit inside the disposable repository created by the input setup.

Git✓ Tested
GitGetting Started

Read the latest commit message

Git: Read the latest commit message inside the disposable repository created by the input setup.

Git✓ Tested
CNumbers & memory

Set and test bit flags

Use unsigned masks to combine and test C flags.

C✓ Tested