FIND YOUR NEXT FEW LINES

Results for “ff-only”

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

1229 snippets foundClear filters
jQueryInsertion & wrapping

Wrap only an element’s existing contents

jQuery: wrapInner leaves the outer element intact.

jQuery✓ Tested
C++Sequence algorithms

Calculate changes between successive readings

C++: adjacent_difference keeps the first value and then writes each difference from its predecessor.

C++✓ Tested
ReactEffects & lifecycle

Cancel an asynchronous operation on unmount

Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.

React✓ Tested
GitGetting Started

Check a change for whitespace problems

Git: Check a change for whitespace problems inside the disposable repository created by the input setup.

Git✓ Tested
CStrings & byte buffers

Check a literal string prefix

C: strncmp compares at most the prefix length; both inputs must be valid strings.

C✓ Tested
ReactEffects & lifecycle

Clean up a subscription when a child unmounts

Clean up a subscription when a child unmounts with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CText & bounded buffers

Compare a command case-sensitively

Arduino / C: strcmp returns zero when both null-terminated strings match.

Arduino / C✓ Tested
PostgresWindows & text

Compare a row with the previous row

Read a preceding value with LAG.

LAG✓ Tested
Docker / ComposeLimits & process security

Confirm the root filesystem rejects writes

Docker / Compose: A read-only root prevents creating files outside writable mounts.

Docker / Compose✓ Tested
Arduino / CText & bounded buffers

Copy a string with a guaranteed terminator

Arduino / C: Reserve one character for the terminator when copying a bounded string.

Arduino / C✓ Tested
CStrings & byte buffers

Count a leading run of allowed characters

C: strspn counts bytes at the start that belong to a specified character set.

C✓ Tested
SQL ServerDates & text

Count day boundaries between dates

Compare date values with DATEDIFF.

DATEDIFF✓ Tested