Results for “only”
Small, practical examples. Search by task or narrow things down below.
Explain a calculation with a comment
C#: Keep the code executable while documenting why a fixed input is used.
C#✓ Tested
Explain which ignore rule matches a file
Git: check-ignore -v reports the source file, line, pattern, and matched path.
Git✓ Tested
Export a value to child processes
Bash Scripts: Only exported shell variables are inherited through the environment.
Bash Scripts✓ Tested
Export committed files without the Git metadata directory
Git: Git archive creates a snapshot of tracked committed files only.
Git✓ Tested
Express a duration in milliseconds
Express a duration in milliseconds in a complete Rust program using the standard library.
Rust✓ Tested
Extract a route path variable
Extract a route path variable using a complete Go program with explicit sample inputs.
Go✓ Tested
Extract a substring with range syntax
C#: C# range ends are exclusive; indices operate on UTF-16 code units.
C#✓ Tested
Extract all integer tokens from text
C#: Enumerate Match objects returned by Regex.Matches with an explicit timeout.
C#✓ Tested
Extract digit sequences
Extract digit sequences using a complete Go program with explicit sample inputs.
Go✓ Tested
Extract numbers from text
Find all runs of ASCII digits in a string and convert the matches to integers.
regex✓ Tested
Filter a list with a condition
Build a new list containing only the values that satisfy a condition using a list comprehension.
list✓ Tested
Filter aggregate groups
Keep only categories with multiple products.
HAVING✓ Tested