Results for “Go”
Small, practical examples. Search by task or narrow things down below.
Add a forgotten file to the latest unpublished commit
Git: Stage the missing file before amending without changing the message.
Git✓ Tested
Check the Gregorian leap-year rule
Java: Use Year.isLeap rather than checking divisibility by four alone.
Java✓ Tested
Count rows per category
Aggregate rows sharing the same category.
GROUP BY✓ Tested
Find both extremes in one algorithm call
C++: Check for a nonempty input before dereferencing the returned iterators.
C++✓ Tested
Initialize component data with ngOnInit
Initialize component data with ngOnInit with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Parse a date with a Go layout
Parse a date with a Go layout using a complete Go program with explicit sample inputs.
Go✓ Tested
Receive a result from a goroutine
Receive a result from a goroutine using a complete Go program with explicit sample inputs.
Go✓ Tested
Run your first Go program
Run your first Go program using a complete Go program with explicit sample inputs.
Go✓ Tested
Sum values per category
Calculate a grouped total.
SUM✓ Tested
Accept a small behavior interface
Accept a small behavior interface using a complete Go program with explicit sample inputs.
Go✓ Tested
Accept a variable number of arguments
Accept a variable number of arguments using a complete Go program with explicit sample inputs.
Go✓ Tested
Advance a calendar date
Advance a calendar date using a complete Go program with explicit sample inputs.
Go✓ Tested