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
AngularPipes & formatting

Create a small pure formatting pipe

Create a small pure formatting pipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
HTMLGetting Started

Create a small table with headers

HTML: Learn how to create a small table with headers in a complete browser example.

HTML✓ Tested
CBinary formats & structured parsing

Decode a 16-bit big-endian integer

C: Promote bytes to an unsigned integer type before combining shifted values.

C✓ Tested
CSSGrid placement

Fill an earlier grid hole with a later small item

CSS: Dense auto-placement may move a later item visually ahead of other items to fill a gap.

CSS✓ Tested
Arduino / CArrays & embedded state

Find a value in a small lookup table

Arduino / C: A linear scan is simple and predictable for a small fixed array.

Arduino / C✓ Tested
CArray transformations

Find the smallest value in a nonempty array

C: Initialize from the first element instead of assuming a numeric sentinel.

C✓ Tested
Arduino / CSensor calculations

Ignore small movements around a center value

Arduino / C: Values inside the deadband become zero while others keep their direction.

Arduino / C✓ Tested
Docker / ComposeLimits & process security

Insert Docker’s small init process

Docker / Compose: The init option adds a PID 1 process that reaps children and forwards signals.

Docker / Compose✓ Tested
Bash ScriptsArguments & decisions

Parse a small set of long options

Bash Scripts: Use a loop and case statement to consume a value-bearing long option.

Bash Scripts✓ Tested
Arduino / CEEPROM & program memory

Read 16-bit values from a flash table

Arduino / C: pgm_read_word retrieves a complete word from program memory.

Arduino / C✓ Tested
PythonStructured data & serialization

Read a small INI configuration

Python: Use ConfigParser typed accessors for configuration values stored as text.

Python✓ Tested
SQLGetting Started

Read the smallest and largest values

SQL: Use MIN and MAX without sorting and fetching every row.

SQL✓ Tested