// OneTermNotEqualSelector returns an object that matches objects where one field/field does not equal one value.
// Cannot return an error.
764582
func OneTermNotEqualSelector(k, v string) Selector {
	return &notHasTerm{field: k, value: v}
}
1327707
func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) {
	if ps == nil {
		return labels.Nothing(), nil
	}
	if len(ps.MatchLabels)+len(ps.MatchExpressions) == 0 {
		return labels.Everything(), nil
	}
	selector := labels.NewSelector()
	for k, v := range ps.MatchLabels {
		r, err := labels.NewRequirement(k, selection.Equals, []string{v})
		if err != nil {
			return nil, err
		}
		selector = selector.Add(*r)
	}
	for _, expr := range ps.MatchExpressions {
		var op selection.Operator
		switch expr.Operator {
		case LabelSelectorOpIn:
			op = selection.In
		case LabelSelectorOpNotIn:
			op = selection.NotIn
		case LabelSelectorOpExists:
			op = selection.Exists
		case LabelSelectorOpDoesNotExist:
			op = selection.DoesNotExist
		default:
			return nil, fmt.Errorf("%q is not a valid pod selector operator", expr.Operator)
		}
		r, err := labels.NewRequirement(expr.Key, op, append([]string(nil), expr.Values...))
		if err != nil {
			return nil, err
		}
		selector = selector.Add(*r)
	}
	return selector, nil
}
1248193
func RankingEqual(o1, o2 *RankingOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
425854
func attributeNotEqualSelector(key, val string) Selector {
	key = toLowerASCII(key)
	return func(n *html.Node) bool {
		if n.Type != html.ElementNode {
			return false
		}
		for _, a := range n.Attr {
			if a.Key == key && a.Val == val {
				return false
			}
		}
		return true
	}
}
998835
func AutoGenerateObjectIDIfNotExistEqual(o1, o2 *AutoGenerateObjectIDIfNotExistOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
798130
func attributeRegexSelector(key string, rx *regexp.Regexp) Selector {
	return attributeSelector(key,
		func(s string) bool {
			return rx.MatchString(s)
		})
}
56116
func (t *Tab) GetDocumentElementsBySelector(docNodeId int, selector string) ([]*Element, error) {
	docNode, ok := t.getElement(docNodeId)
	if !ok {
		return nil, &ElementNotFoundErr{Message: fmt.Sprintf("docNodeId %d not found", docNodeId)}
	}
	nodeIds, errQuery := t.DOM.QuerySelectorAll(docNode.id, selector)
	if errQuery != nil {
		return nil, errQuery
	}

	elements := make([]*Element, len(nodeIds))

	for k, nodeId := range nodeIds {
		elements[k], _ = t.GetElementByNodeId(nodeId)
	}

	return elements, nil
}
844364
func attributeSubstringSelector(key, val string) Selector {
	return attributeSelector(key,
		func(s string) bool {
			if strings.TrimSpace(s) == "" {
				return false
			}
			return strings.Contains(s, val)
		})
}
939640
func NewESFromK8sLabelSelector(srcPrefix string, lss ...*metav1.LabelSelector) EndpointSelector {
	var (
		matchLabels      map[string]string
		matchExpressions []metav1.LabelSelectorRequirement
	)
	for _, ls := range lss {
		if ls == nil {
			continue
		}
		if ls.MatchLabels != nil {
			if matchLabels == nil {
				matchLabels = map[string]string{}
			}
			for k, v := range ls.MatchLabels {
				matchLabels[srcPrefix+k] = v
			}
		}
		if ls.MatchExpressions != nil {
			if matchExpressions == nil {
				matchExpressions = make([]metav1.LabelSelectorRequirement, 0, len(ls.MatchExpressions))
			}
			for _, v := range ls.MatchExpressions {
				v.Key = srcPrefix + v.Key
				matchExpressions = append(matchExpressions, v)
			}
		}
	}
	return NewESFromMatchRequirements(matchLabels, matchExpressions)
}
172576
func (v *Value) NotEqual(value interface{}) *Value {
	expected, ok := canonValue(&v.chain, value)
	if !ok {
		return v
	}
	if reflect.DeepEqual(expected, v.value) {
		v.chain.fail("\nexpected value not equal to:\n%s",
			dumpValue(expected))
	}
	return v
}
395822
func constraintNotEqual(v *Version, c *constraint) bool {
	if c.dirty {

		// If there is a pre-release on the version but the constraint isn't looking
		// for them assume that pre-releases are not compatible. See issue 21 for
		// more details.
		if v.Prerelease() != "" && c.con.Prerelease() == "" {
			return false
		}

		if c.con.Major() != v.Major() {
			return true
		}
		if c.con.Minor() != v.Minor() && !c.minorDirty {
			return true
		} else if c.minorDirty {
			return false
		}

		return false
	}

	return !v.Equal(c.con)
}
296024
func ElementAttributeEquals(tab *Tab, element *Element, name, value string) ConditionalFunc {
	return func(tab *Tab) bool {
		if element.GetAttribute(name) == value {
			return true
		}
		return false
	}
}
465613
func SqlSelectFromPb(pb *SqlSelectPb) *SqlSelect {
	ss := SqlSelect{
		Db:        pb.GetDb(),
		Raw:       pb.GetRaw(),
		Star:      pb.GetStar(),
		Distinct:  pb.GetDistinct(),
		Alias:     pb.GetAlias(),
		Limit:     int(pb.GetLimit()),
		Offset:    int(pb.GetOffset()),
		isAgg:     pb.GetIsAgg(),
		finalized: pb.GetFinalized(),
		schemaqry: pb.GetSchemaqry(),
	}
	if pb.Into != nil {
		ss.Into = &SqlInto{pb.GetInto()}
	}
	if pb.Where != nil {
		ss.Where = SqlWhereFromPb(pb.GetWhere())
	}
	if pb.Having != nil {
		ss.Having = expr.NodeFromNodePb(pb.GetHaving())
	}
	if pb.Projection != nil {
		ss.proj = ProjectionFromPb(pb.GetProjection())
	}
	if len(pb.Columns) > 0 {
		ss.Columns = ColumnsFromPb(pb.GetColumns())
	}
	if len(pb.GroupBy) > 0 {
		ss.GroupBy = ColumnsFromPb(pb.GetGroupBy())
	}
	if len(pb.OrderBy) > 0 {
		ss.OrderBy = ColumnsFromPb(pb.GetOrderBy())
	}
	if len(pb.From) > 0 {
		ss.From = make([]*SqlSource, len(pb.From))
		for i, fpb := range pb.From {
			ss.From[i] = SqlSourceFromPb(fpb)
		}
	}
	if len(pb.With) > 0 {
		ss.With = make(u.JsonHelper)
		json.Unmarshal(pb.With, &ss.With)
	}
	return &ss
}
803550
func WithPrioritySelector(value PrioritySelector) copts.Opt {
	return WithPeerSorter(func(peers []fab.Peer) []fab.Peer {
		return sortPeers(peers, value)
	})
}
900171
func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
	if h, ok := a.t.(tHelper); ok {
		h.Helper()
	}
	return NotEqual(a.t, expected, actual, msgAndArgs...)
}
1137288
func ValidateIsOneOf(choices ...interface{}) FieldValidatorFunc {
	return func(value interface{}) error {
		for _, choice := range choices {
			if ok, err := stringutil.RelaxedEqual(choice, value); err == nil && ok {
				return nil
			}
		}

		return fmt.Errorf("value must be one of: %+v", choices)
	}
}
81272
func (q1 Quat) OrientationEqualThreshold(q2 Quat, epsilon float32) bool {
	return Abs(q1.Normalize().Dot(q2.Normalize())) > 1-epsilon
}