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
JavaScriptGetting Started

Print a number with two decimal places

JavaScript: Format a small decimal value consistently for display.

JavaScript✓ Tested
TypeScriptGetting Started

Print a number with two decimal places

TypeScript: Format a small decimal value consistently for display.

TypeScript✓ Tested
C++Getting Started

Print a number with two decimal places

C++: Format a small decimal value consistently for display.

C++✓ Tested
CGetting Started

Print a number with two decimal places

C: Format a small decimal value consistently for display.

C✓ Tested
C#Collections & data structures

Process items by numeric priority

C#: PriorityQueue removes the item with the smallest priority value first.

C#✓ Tested
ReactContext & shared state

Provide read-only application configuration

Provide read-only application configuration with a small React component and explicit browser behavior.

React✓ Tested
ReactAccessibility & events

Read a data attribute from the current target

Read a data attribute from the current target with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsGetting Started

Read a line without losing backslashes

Bash Scripts: Read a line without losing backslashes with a small standalone Bash program.

Bash Scripts✓ Tested
C#Files & paths

Read a text file

Load a small text file into a C# string.

C#✓ Tested
JavaFiles & paths

Read a UTF-8 file

Read a small UTF-8 file into a Java string.

Java✓ Tested
JavaScriptFiles & async

Read a UTF-8 file

Read a small file as text using Node.js.

JavaScript✓ Tested
PowerShellStructured formats & encodings

Read a value from a trusted XML document

PowerShell: The XML adapter exposes a small document’s elements and attributes through named properties.

PowerShell✓ Tested