FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
Arduino / CBinary values & packets

Require every bit in a mask

Arduino / C: Masking followed by equality tests whether all required flags are set.

Arduino / C✓ Tested
ReactComponents & props

Reset child state by changing its key

Reset child state by changing its key with a small React component and explicit browser behavior.

React✓ Tested
Docker / ComposeNetworks & volume metadata

Resolve a peer’s name on a user-defined network

Docker / Compose: The embedded DNS service resolves names on user-defined bridges.

Docker / Compose✓ Tested
HTMLMetadata & document links

Resolve relative links against an explicit base

HTML: A base href changes how relative document URLs are resolved.

HTML✓ Tested
CSSInteraction & themes

Respect dark color preference

Apply different CSS colors when the browser requests a dark theme.

CSS✓ Tested
jQueryGetting Started

Respond to a button click

jQuery: Learn how to respond to a button click in a complete browser example.

jQuery✓ Tested
jQueryEvent control

Respond to the Enter key

jQuery: Use the event key rather than deprecated numeric key codes.

jQuery✓ Tested
PowerShellCommands & execution context

Restore the working location after an operation

PowerShell: Push-Location and Pop-Location manage a directory stack; finally ensures restoration.

PowerShell✓ Tested
PowerShellFunctions & parameter validation

Restrict a function parameter to known choices

PowerShell: ValidateSet rejects unsupported values before the function body executes.

PowerShell✓ Tested
C++Tasks & synchronization

Retrieve the result of an asynchronous task

C++: The explicit async launch policy requests asynchronous execution rather than deferred evaluation.

C++✓ Tested
GitBranches & ancestry

Return to the previously checked-out branch

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

Git✓ Tested
SQL ServerTransactions & tables

Roll back a trial update

Group a change in a transaction and undo it.

transaction✓ Tested