Results for “Small algorithms & bit operations”
Small, practical examples. Search by task or narrow things down below.
Offer a retry after a failed attempt
Offer a retry after a failed attempt with a small React component and explicit browser behavior.
React✓ Tested
Open and close a native dialog
Open and close a native dialog with a small React component and explicit browser behavior.
React✓ Tested
Override context in a nested section
Override context in a nested section with a small React component and explicit browser behavior.
React✓ Tested
Pair terms and descriptions
Use a description list for a small HTML glossary.
HTML✓ Tested
Pass an input ref as a React 19 prop
Pass an input ref as a React 19 prop with a small React component and explicit browser behavior.
React✓ Tested
Pass an object to the style prop
Pass an object to the style prop with a small React component and explicit browser behavior.
React✓ Tested
Pass data through props
Pass data through props with a small React component and explicit browser behavior.
React✓ Tested
Preserve item state while reordering by key
Preserve item state while reordering by key with a small React component and explicit browser behavior.
React✓ Tested
Print a floating-point value with fixed precision
Choose the number of decimal places in serial output.
float✓ Tested
Print a number with two decimal places
Python: Format a small decimal value consistently for display.
Python✓ Tested
Print a number with two decimal places
C#: Format a small decimal value consistently for display.
C#✓ Tested
Print a number with two decimal places
Java: Format a small decimal value consistently for display.
Java✓ Tested