Grilled Cheese

ExploreLog inSign up
Terms of UsePrivacy PolicyCommunity StandardsHelpGet the app

Grilled Cheese is a product of Village Compute

Version devBuilt at: 2026-12-03 22:42:33 EST

PhotosVideosAllPeople
LatestRanked
Heap Big
Photo, no description
Three people having a discussion about the information displayed on a computer monitor.
Nginx Supremacy
Photo, no description
A pole dancer in a spotlight performs a routine on a stage in front of a packed audience, with a projected image of a notorious Dallas burlesque club in the background. Two other dancers loiter in the background at right of stage. A ceiling fan above adds atmosphere.
Photo, no description
Photo, no description
Photo, no description
Photo, no description
Une performance du National Philharmonic évoquant les cycles cosmiques à travers la musique.
L'orchestre National Philharmonic se produit avec une projection d'une carte des océans en arrière-plan.
Photo, no description
Photo, no description
Photo, no description
A race car at high speed with a blury background.
Photo, no description
Photo, no description
Photo, no description
func CountCommas(r io.Reader) (int, error) {
	buffer := make([]byte, 1)
	commas := 0
	for {
		n, err := r.Read(buffer)
		if n == 1 && buffer[0] == ',' {
			commas++
		}
		if err == io.EOF {
			return commas, nil
		}
		if err != nil {
			return -1, err
		}
	}
}

func CountCommasFancy(r io.Reader) (int, error) {
	buffer := make([]byte, 1)
	commas := 0

	switch r := r.(type) {
	case *bytes.Buffer:
		for {
			n, err := r.Read(buffer)
			if n == 1 && buffer[0] == ',' {
				commas++
			}
			if err == io.EOF {
				return commas, nil
			}
			if err != nil {
				return -1, err
			}
		}

	default:
		for {
			n, err := r.Read(buffer)
			if n == 1 && buffer[0] == ',' {
				commas++
			}
			if err == io.EOF {
				return commas, nil
			}
			if err != nil {
				return -1, err
			}
		}
	}
}
Load more