Results for “Arduino / C”
Small, practical examples. Search by task or narrow things down below.
Use the first fulfilled promise result
TypeScript: Promise.any ignores individual rejections until one input fulfills.
TypeScript✓ Tested
Validate a required argument
Java: Use requireNonNull with a useful message at an API boundary.
Java✓ Tested
Validate an argument at a method boundary
C#: ThrowIfNegative gives callers an explicit argument error for an invalid range.
C#✓ Tested
Validate an entire identifier
Python: Use fullmatch so a regex must consume the complete input.
Python✓ Tested
Validate the number of positional arguments
Bash Scripts: Use the argument count to enforce a simple command-line contract.
Bash Scripts✓ Tested
Validate the shape of an absolute URL
HTML: A URL input checks syntax, not whether a resource exists or is safe.
HTML✓ Tested
Wait for an initialization job
Start a service only after its dependency completes successfully.
Compose✓ Tested
Wait for multiple promises
Use Promise.all to collect JavaScript results in input order.
JavaScript✓ Tested
Wrap a row of items
Allow CSS flex items to wrap when a row runs out of space.
CSS✓ Tested
Wrap long words
Allow long unbroken text to wrap within a CSS box.
CSS✓ Tested
Write a text file
Write a C# string to a UTF-8 file.
C#✓ Tested
Write a text file
Write and close a C++ output file while checking stream failure.
C++✓ Tested