Results for “Small algorithms & bit operations”
Small, practical examples. Search by task or narrow things down below.
Run a Compose service as a numeric user
Docker / Compose: Run a Compose service as a numeric user in a small Compose file.
Docker / Compose✓ Tested
Schedule a one-time update with cleanup
Schedule a one-time update with cleanup with a small React component and explicit browser behavior.
React✓ Tested
Scroll a referenced element into view
Scroll a referenced element into view with a small React component and explicit browser behavior.
React✓ Tested
Search a sorted vector
Use binary_search after ensuring C++ values are sorted.
C++✓ Tested
Select a component variant explicitly
Select a component variant explicitly with a small React component and explicit browser behavior.
React✓ Tested
Select fields with the Pick utility type
Expose a smaller view of a larger object type.
Pick✓ Tested
Select object properties
Create a smaller object with only the fields you need.
Select-Object✓ Tested
Select the contents of an input
Select the contents of an input with a small React component and explicit browser behavior.
React✓ Tested
Select the largest values without sorting everything
Python: Use heapq.nlargest when only a small prefix of the ranking is required.
Python✓ Tested
Separate state and dispatch contexts
Separate state and dispatch contexts with a small React component and explicit browser behavior.
React✓ Tested
Serialize a hashtable as JSON
Produce compact JSON for a small data object.
JSON✓ Tested
Serialize an object to JSON
Serialize a small anonymous C# object with System.Text.Json.
C#✓ Tested