// RemoveFromSet removes elements from the child set CRDT of the map at the specified key
320846
func (mapOp *MapOperation) RemoveFromSet(key string, value []byte) *MapOperation {
	if mapOp.removeSets != nil {
		delete(mapOp.removeSets, key)
	}
	if mapOp.removeFromSets == nil {
		mapOp.removeFromSets = make(map[string][][]byte)
	}
	mapOp.removeFromSets[key] = append(mapOp.removeFromSets[key], value)
	return mapOp
}
1303114
func (s *set) Remove(items ...interface{}) {
	if len(items) == 0 {
		return
	}

	for _, item := range items {
		delete(s.m, item)
	}
}
828903
func RemoveFromSlice(slice []string, values ...string) []string {
	output := make([]string, 0, len(slice))

	remove := make(map[string]bool)
	for _, value := range values {
		remove[value] = true
	}

	for _, s := range slice {
		_, ok := remove[s]
		if ok {
			continue
		}
		output = append(output, s)
	}

	return output
}
1172154
func SelectorFromSet(ls Set) Selector {
	if ls == nil || len(ls) == 0 {
		return internalSelector{}
	}
	var requirements internalSelector
	for label, value := range ls {
		r, err := NewRequirement(label, selection.Equals, []string{value})
		if err == nil {
			requirements = append(requirements, *r)
		} else {
			//TODO: double check errors when input comes from serialization?
			return internalSelector{}
		}
	}
	// sort to have deterministic string representation
	sort.Sort(ByKey(requirements))
	return requirements
}
1013420
func (ckm ConditionKeyMap) Remove(key string, value set.StringSet) {
	if v, ok := ckm[key]; ok {
		if value != nil {
			ckm[key] = v.Difference(value)
		}

		if ckm[key].IsEmpty() {
			delete(ckm, key)
		}
	}
}
706020
func (s *ShapeIndex) Remove(shape Shape) {
	// The index updates itself lazily because it is much more efficient to
	// process additions and removals in batches.
	id := s.idForShape(shape)

	// If the shape wasn't found, it's already been removed or was not in the index.
	if s.shapes[id] == nil {
		return
	}

	// Remove the shape from the shapes map.
	delete(s.shapes, id)

	// We are removing a shape that has not yet been added to the index,
	// so there is nothing else to do.
	if id >= s.pendingAdditionsPos {
		return
	}

	numEdges := shape.NumEdges()
	removed := &removedShape{
		shapeID:               id,
		hasInterior:           shape.Dimension() == 2,
		containsTrackerOrigin: shape.ReferencePoint().Contained,
		edges:                 make([]Edge, numEdges),
	}

	for e := 0; e < numEdges; e++ {
		removed.edges[e] = shape.Edge(e)
	}

	s.pendingRemovals = append(s.pendingRemovals, removed)
	atomic.StoreInt32(&s.status, stale)
}
1104615
func IfUnset(onlyIf FieldFormatterFunc) FieldFormatterFunc {
	return func(value interface{}, op FieldOperation) (interface{}, error) {
		if onlyIf != nil {
			if typeutil.IsZero(value) {
				return onlyIf(value, op)
			}
		}

		return value, nil
	}
}
98893
func removeStringFromSlice(slice []string, val string) []string {
	for i, str := range slice {
		if str == val {
			slice = append(slice[:i], slice[i+1:]...)
		}
	}

	return slice
}
842927
func RemoveFromGCDeleteRange(ctx sessionctx.Context, jobID, elementID int64) error {
	sql := fmt.Sprintf(completeDeleteRangeSQL, jobID, elementID)
	_, err := ctx.(sqlexec.SQLExecutor).Execute(context.TODO(), sql)
	return errors.Trace(err)
}
1222739
func (set *Set) Remove(items ...interface{}) {
	set.lock.Lock()
	defer set.lock.Unlock()

	set.flattened = nil
	for _, item := range items {
		delete(set.items, item)
	}
}
1122991
func (f FieldMatchingFlags) IsSet(flag FieldMatchingFlags) bool {
	if flag == DestFromSource {
		// The bit logic doesn't work on the default value.
		return f&SourceToDest != SourceToDest
	}
	return f&flag == flag
}
131238
func (m *MultiMap) KeySet() []interface{} {
	keys := make([]interface{}, len(m.m))
	count := 0
	for key := range m.m {
		keys[count] = key
		count++
	}
	return keys
}
960758
func (c Config) OnRemoveFilterSet(reasons ...RemoveReason) Config {
	c.onRemoveFilter = 0
	for i := range reasons {
		c.onRemoveFilter |= 1 << uint(reasons[i])
	}

	return c
}
425410
func (l KeyedList) remove(parent *HTML) {
	// Become the parent so that we can remove all of our children and get an
	// updated insertBeforeNode value.
	l.html.node = parent.node
	l.html.insertBeforeNode = parent.insertBeforeNode
	l.html.removeChildren(l.html.children)

	// Now that the children are removed, and our insertBeforeNode value has
	// been updated, update the parent's insertBeforeNode value since it is now
	// invalid and ours is correct.
	if parent.insertBeforeNode != nil {
		parent.insertBeforeNode = l.html.insertBeforeNode
	}
}
424367
func RemoveLinkSet(linkSet *(map[string]Link), obj ModelObj) error {
	// check is linkset is nil
	if *linkSet == nil {
		return nil
	}

	// remove the link from map
	delete(*linkSet, obj.GetKey())

	return nil
}
536988
func (node *Node) Remove(keys []string) {

	if len(keys) == 0 {
		return
	}

	sort.Strings(keys)
	node.remove(keys)
}
48150
func (kcp *KCP) remove_front(q []segment, n int) []segment {
	if n > len(q)/2 {
		newn := copy(q, q[n:])
		return q[:newn]
	}
	return q[n:]
}