Results for “only”
Small, practical examples. Search by task or narrow things down below.
Copy a slice without sharing storage
Copy a slice without sharing storage using a complete Go program with explicit sample inputs.
Go✓ Tested
Copy a stream and count its bytes
Copy a stream and count its bytes using a complete Go program with explicit sample inputs.
Go✓ Tested
Copy entries into another map
Copy entries into another map using a complete Go program with explicit sample inputs.
Go✓ Tested
Correct the latest unpublished commit message
Git: Amend replaces the current commit while preserving its tree when no new changes are staged.
Git✓ Tested
Count commits reachable from a revision
Git: rev-list --count counts reachable commits without printing commit identifiers.
Git✓ Tested
Count commits unique to each of two branches
Git: The symmetric difference with left-right separates commits reachable from only one side.
Git✓ Tested
Count lines in a file
Count newline characters in a text file, printing only the count without the filename.
lines✓ Tested
Count occurrences in a list
Count how often each value appears using Counter from the standard library.
count✓ Tested
Count repeated words
Count repeated words using a complete Go program with explicit sample inputs.
Go✓ Tested
Count set bits in an unsigned integer
C: Clearing the lowest set bit on each iteration counts only one iteration per set bit.
C✓ Tested
Count the items in a collection
C#: Read the collection’s length instead of hard-coding the loop limit.
C#✓ Tested
Count Unicode code points
Count Unicode code points using a complete Go program with explicit sample inputs.
Go✓ Tested