FIND YOUR NEXT FEW LINES

Results for “Small algorithms & bit operations”

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

443 snippets foundClear filters
Docker / ComposeCompose service options

Enable an init process for a service

Docker / Compose: init adds a small PID 1 process to forward signals and reap children.

Docker / Compose✓ Tested
CSSBox dimensions & overflow

Enforce a minimum width

CSS: Min-width can prevent a declared smaller width from taking effect.

CSS✓ Tested
ReactAccessibility & events

Expose a disclosure’s expanded state

Expose a disclosure’s expanded state with a small React component and explicit browser behavior.

React✓ Tested
ReactCustom hooks

Extract reusable toggle behavior

Extract reusable toggle behavior with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CBinary values & packets

Extract the low and high byte of a value

Arduino / C: lowByte and highByte expose the two bytes of a 16-bit value.

Arduino / C✓ Tested
ReactLists & filtering

Filter a list by a search term

Filter a list by a search term with a small React component and explicit browser behavior.

React✓ Tested
C++Numbers & algorithms

Find the largest value

Check for an empty C++ vector before dereferencing max_element.

C++✓ Tested
ReactRefs & DOM interaction

Focus an input through a ref

Focus an input through a ref with a small React component and explicit browser behavior.

React✓ Tested
C++Numbers & algorithms

Format decimal output

Use fixed and setprecision to print two C++ decimal places.

C++✓ Tested
ReactComponents & props

Forward input props to a reusable field

Forward input props to a reusable field with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CGetting Started

Give an LED pin a constant name

Arduino / C: Use const to name the built-in LED pin and reuse it in output instructions.

Arduino / C✓ Tested
ReactAccessibility & events

Group related form controls semantically

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

React✓ Tested