// addRangeInPlace adds r to tr in place without creating a new copy.
429575
func (tr Ranges) addRangeInPlace(r Range) {
	if r.IsEmpty() {
		return
	}

	e := tr.findFirstNotBefore(r)
	for e != nil {
		lr := e.Value.(Range)
		ne := e.Next()
		if !lr.Overlaps(r) {
			break
		}
		r = r.Merge(lr)
		tr.sortedRanges.Remove(e)
		e = ne
	}
	if e == nil {
		tr.sortedRanges.PushBack(r)
		return
	}
	tr.sortedRanges.InsertBefore(r, e)
}
54829
func SuggestedPlace(s string) string {
	n := rand.Intn(4)
	switch n {
	case 0:
		return "How does this place look? " + s
	case 1:
		return "How about " + s + "?"
	case 2:
		return "Have you been here before? " + s
	case 3:
		return "You could try this: " + s
	}
	log.Debug("suggestedPlace failed to return a response")
	return ""
}
689645
func (env *environ) parsePlacement(ctx context.ProviderCallContext, placement string) (*instPlacement, error) {
	if placement == "" {
		return nil, nil
	}

	pos := strings.IndexRune(placement, '=')
	if pos == -1 {
		return nil, errors.Errorf("unknown placement directive: %v", placement)
	}

	switch key, value := placement[:pos], placement[pos+1:]; key {
	case "zone":
		zone, err := env.availZoneUp(ctx, value)
		if err != nil {
			return nil, errors.Trace(err)
		}
		return &instPlacement{Zone: zone}, nil
	}
	return nil, errors.Errorf("unknown placement directive: %v", placement)
}
636069
func (b *DiskBuilder) AddDistantFrom(diskID int64) *DiskBuilder {
	b.distantFrom = append(b.distantFrom, diskID)
	return b
}
1081019
func (c *Container) unionInPlace(other *Container) {
	switch c.typ {
	case containerBitmap:
		switch other.typ {
		case containerBitmap:
			unionBitmapBitmapInPlace(c, other)
		case containerArray:
			unionBitmapArrayInPlace(c, other)
		case containerRun:
			unionBitmapRunInPlace(c, other)

		}
	case containerArray:
		switch other.typ {
		case containerBitmap:
			c.arrayToBitmap()
			unionBitmapBitmapInPlace(c, other)
		case containerArray:
			unionArrayArrayInPlace(c, other)
		case containerRun:
			c.arrayToBitmap()
			unionBitmapRunInPlace(c, other)
		}
	case containerRun:
		switch other.typ {
		case containerBitmap:
			c.runToBitmap()
			unionBitmapBitmapInPlace(c, other)
		case containerArray:
			c.runToBitmap()
			unionBitmapArrayInPlace(c, other)
		case containerRun:
			c.runToBitmap()
			unionBitmapRunInPlace(c, other)
		}
	}
}
1152957
func MakeLocationRange(fn string, fc *Source, begin Location, end Location) LocationRange {
	return LocationRange{FileName: fn, file: fc, Begin: begin, End: end}
}
597681
func (r *RemoveRangeOp) Lt(fieldName string, value interface{}) *RemoveRangeOp {
	r.appendOp(Lt, fieldName, value)
	return r
}
861856
func (rc *Connector) RemoveRange(ctx context.Context, ei *dosa.EntityInfo, columnConditions map[string][]*dosa.Condition) error {
	connector, err := rc.getConnector(ei.Ref.Scope, ei.Ref.NamePrefix)
	if err != nil {
		return err
	}
	return connector.RemoveRange(ctx, ei, columnConditions)
}
1311591
func InsertOrReplaceOption(opts []interface{}, opt interface{}) []interface{} {
	if opts == nil && opt == nil {
		return nil
	}
	if opts == nil {
		return []interface{}{opt}
	}
	if opt == nil {
		return opts
	}

	t1 := reflect.Indirect(reflect.ValueOf(opt)).Type()

	var res []interface{}
	for _, o := range opts {
		t2 := reflect.Indirect(reflect.ValueOf(o)).Type()
		if t1 != t2 {
			res = append(res, o)
		}
	}
	return append(res, opt)
}
696910
func (s *RegionService) AddRegion(p *AddRegionParams) (*AddRegionResponse, error) {
	resp, err := s.cs.newRequest("addRegion", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r AddRegionResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
918302
func (c *Connector) RemoveRange(ctx context.Context, ei *dosa.EntityInfo, columnConditions map[string][]*dosa.Condition) error {
	return nil
}
1335535
func NewRange(from int, to int) (*Range, error) {
	return (&rangeBuilder{}).from(from, nil).to(to, nil).Range()
}
984372
func (b *RWSetBuilder) AddToRangeQuerySet(ns string, rqi *kvrwset.RangeQueryInfo) {
	nsPubRwBuilder := b.getOrCreateNsPubRwBuilder(ns)
	key := rangeQueryKey{rqi.StartKey, rqi.EndKey, rqi.ItrExhausted}
	_, ok := nsPubRwBuilder.rangeQueriesMap[key]
	if !ok {
		nsPubRwBuilder.rangeQueriesMap[key] = rqi
		nsPubRwBuilder.rangeQueriesKeys = append(nsPubRwBuilder.rangeQueriesKeys, key)
	}
}
1004239
func (f *DateFacet) AddRange(name string, start, end string) *DateFacet {
	f.data.DateRanges = append(f.data.DateRanges, dateFacetRange{
		Name:  name,
		Start: start,
		End:   end,
	})
	return f
}
844383
func (h *Handle) QdiscReplace(qdisc Qdisc) error {
	return h.qdiscModify(
		unix.RTM_NEWQDISC,
		unix.NLM_F_CREATE|unix.NLM_F_REPLACE,
		qdisc)
}
737762
func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
	s.Range = &v
	return s
}
178195
func (p *HelloWorld) SetPlace(world, place string) {
	log.Printf("%s was placed %s", world, place)
}