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
Arduino / CSensor calculations

Convert a supplied ADC count to volts

Arduino / C: Scale a ten-bit ADC count using an explicit reference voltage.

Arduino / C✓ Tested
Docker / ComposeBuild images

Copy a file into an image

Include a small application file during the build.

Dockerfile✓ Tested
Linux CommandsFiles & folders

Copy a file to a folder

Create a backup folder if needed, then copy a file into it while preserving its modification time and permission bits.

file✓ Tested
Arduino / CDigital input & output

Count a falling edge with an interrupt

Increment a counter when an external input changes.

attachInterrupt✓ Tested
Bash ScriptsGetting Started

Count array elements

Bash Scripts: Count array elements with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Count down with a while loop

Bash Scripts: Count down with a while loop with a small standalone Bash program.

Bash Scripts✓ Tested
ReactComponents & props

Customize a renderer through a function prop

Customize a renderer through a function prop with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsGetting Started

Declare a fixed configuration value

Bash Scripts: Declare a fixed configuration value with a small standalone Bash program.

Bash Scripts✓ Tested
ReactPerformance & rendering

Defer the value used by a result panel

Defer the value used by a result panel with a small React component and explicit browser behavior.

React✓ Tested
Docker / ComposeGetting Started

Define a first Compose service

Docker / Compose: Define a first Compose service in a small Compose file.

Docker / Compose✓ Tested
JavaRecords & reliable control flow

Define an immutable data record

Java: A local record gives a small Java data carrier named accessors and value semantics.

Java✓ Tested
Bash ScriptsGetting Started

Define and call a shell function

Bash Scripts: Define and call a shell function with a small standalone Bash program.

Bash Scripts✓ Tested