FIND YOUR NEXT FEW LINES

Results for “or”

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

2638 snippets foundClear filters
C++Ordering & set operations

Group matching values while preserving their order

C++: stable_partition keeps the relative order within both predicate groups.

C++✓ Tested
PythonMappings & sets

Group records by a field

Python: Accumulate related values with defaultdict without checking whether each group exists.

Python✓ Tested
JavaScriptObject behavior & collections

Group records into map entries

JavaScript: Initialize an array for a missing Map key before appending its values.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Group records into map entries

TypeScript: Initialize an array for a missing Map key before appending its values.

TypeScript✓ Tested
ReactAccessibility & events

Group related form controls semantically

Group related form controls semantically with a small React component and explicit browser behavior.

React✓ Tested
RustGetting Started

Grow a vector

Grow a vector in a complete Rust program using the standard library.

Rust✓ Tested
jQueryEvents

Handle a form locally

Prevent default form navigation while displaying input with jQuery.

jQuery✓ Tested
ReactGetting Started

Handle a form without navigating

Handle a form without navigating with a small React component and explicit browser behavior.

React✓ Tested
jQueryGetting Started

Handle a form without navigating away

jQuery: Learn how to handle a form without navigating away in a complete browser example.

jQuery✓ Tested
PowerShellStructured formats & encodings

Handle a malformed JSON document

PowerShell: ConvertFrom-Json reports a terminating conversion error under the selected error preference.

PowerShell✓ Tested
AngularTemplate-driven forms

Handle a template-driven form submission

Handle a template-driven form submission with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PowerShellFunctions & control

Handle a terminating error

Catch conversion failures and produce a clear fallback.

try catch✓ Tested