Results for “one-off”
Small, practical examples. Search by task or narrow things down below.
Inject a data loader into a component
Inject a data loader into a component with a small React component and explicit browser behavior.
React✓ Tested
Inject a service into a component
Inject a service into a component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Inspect components of a URI
Java: Use URI parsing instead of splitting a URL at punctuation manually.
Java✓ Tested
Join array items with a one-character separator
Bash Scripts: A local IFS controls the separator used by the quoted star expansion.
Bash Scripts✓ Tested
Join portable path components
Join portable path components using a complete Go program with explicit sample inputs.
Go✓ Tested
Keep component state with useState
Keep component state with useState with a small React component and explicit browser behavior.
React✓ Tested
Keep spaces inside one argument
Linux Commands: Keep spaces inside one argument using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Match one of several values
Use IN to avoid repeating equality conditions.
IN✓ Tested
Match one value from a short list
SQL: Use IN for a set of allowed values.
SQL✓ Tested
Match one value from a short list
SQL Server: Use IN for a set of allowed values.
SQL Server✓ Tested
Match one value from a short list
Postgres: Use IN for a set of allowed values.
Postgres✓ Tested
Match one value from a short list
SQLite: Use IN for a set of allowed values.
SQLite✓ Tested