// NotBetween generates a NOT BETWEEN expression.
// For example, NotBetween("age", 10, 30) generates: "age" NOT BETWEEN 10 AND 30
190173
func NotBetween(col string, from, to interface{}) Expression {
	return &BetweenExp{col, from, to, true}
}
687924
func (f *MockFunction) Between(a, b int) *MockFunction {
	f.countCheck = BETWEEN
	f.times = [2]int{a, b}
	return f
}
474359
func (session *Session) NotIn(column string, args ...interface{}) *Session {
	session.statement.NotIn(column, args...)
	return session
}
389
func Not(x interface{}) Matcher {
	if m, ok := x.(Matcher); ok {
		return notMatcher{m}
	}
	return notMatcher{Eq(x)}
}
330934
func YN(message string, yes bool) bool {
	defaultChoice := "n"
	if yes {
		defaultChoice = "y"
	}
	input := (&Prompter{
		Message:    message,
		Choices:    []string{"y", "n"},
		IgnoreCase: true,
		Default:    defaultChoice,
	}).Prompt()

	return strings.ToLower(input) == "y"
}
734953
func nonBlankLines(text string) []string {
	var out []string
	for _, s := range lines(text) {
		if strings.TrimSpace(s) != "" {
			out = append(out, s)
		}
	}
	return out
}
1165391
func (repo *Repository) CommitsBetween(last *Commit, before *Commit) (*list.List, error) {
	if version.Compare(gitVersion, "1.8.0", ">=") {
		stdout, err := NewCommand("rev-list", before.ID.String()+"..."+last.ID.String()).RunInDirBytes(repo.Path)
		if err != nil {
			return nil, err
		}
		return repo.parsePrettyFormatLogToList(bytes.TrimSpace(stdout))
	}

	// Fallback to stupid solution, which iterates all commits of the repository
	// if before is not an ancestor of last.
	l := list.New()
	if last == nil || last.ParentCount() == 0 {
		return l, nil
	}

	var err error
	cur := last
	for {
		if cur.ID.Equal(before.ID) {
			break
		}
		l.PushBack(cur)
		if cur.ParentCount() == 0 {
			break
		}
		cur, err = cur.Parent(0)
		if err != nil {
			return nil, err
		}
	}
	return l, nil
}
673339
func (between Between) And(conds ...Cond) Cond {
	return And(between, And(conds...))
}
1371033
func notIn(lhs Expression, vals ...interface{}) BooleanExpression {
	if len(vals) == 1 && reflect.Indirect(reflect.ValueOf(vals[0])).Kind() == reflect.Slice {
		return boolean{op: NOT_IN_OP, lhs: lhs, rhs: vals[0]}
	}
	return boolean{op: NOT_IN_OP, lhs: lhs, rhs: vals}
}
282756
func nonProtobufConfig(inConfig *rest.Config) *rest.Config {
	npConfig := rest.CopyConfig(inConfig)
	npConfig.ContentConfig.AcceptContentTypes = "application/json"
	npConfig.ContentConfig.ContentType = "application/json"
	return npConfig
}
1236311
func nextParenthesis(pattern string) (start, end int) {
	level := 0
	for i := 0; i < len(pattern); i++ {
		c := pattern[i]
		switch c {
		case '(':
			level++
			if level == 1 {
				start = i
			}
		case ')':
			level--
			if level == 0 {
				end = i
				return
			} else if level < 0 {
				panicm("too many closed parenthesis in %s", pattern)
			}
		}
	}

	if level != 0 {
		panicm("unbalanced parenthesis in %s", pattern)
	}

	return
}
446679
func (engine *Engine) NotIn(column string, args ...interface{}) *Session {
	session := engine.NewSession()
	session.isAutoClose = true
	return session.NotIn(column, args...)
}
954906
func (p *parser) negation(t *Token) (Pattern, Error) {
	// a negation appears before a path specification, so
	// skip the negation token
	_next, _err := p.next()
	if _err != nil {
		return nil, _err
	}

	// extract the sequence of tokens for this path
	_tokens, _err := p.sequence(_next)
	if _err != nil {
		return nil, _err
	}

	// include the "negation" token at the front of the sequence
	_tokens = append([]*Token{t}, _tokens...)

	// return the Pattern instance
	return NewPattern(_tokens), nil
}
1127651
func Between(min, lessThan int) int {
	return rand.Intn(lessThan-min) + min
}
378700
func (i Data) IsNaN() (nan, signal bool) {
	if len(i) == 1 {
		return (i == "S" || i == "Q"), i == "S"
	}
	if i[0] == '-' {
		i = i[1:]
	}
	return strings.EqualFold(string(i), "nan") ||
		strings.EqualFold(string(i), "qnan") ||
		strings.EqualFold(string(i), "snan"), i[0] == 's' || i[0] == 'S'
}
68298
public final <A extends Number & Comparable<?>> BooleanExpression notBetween(A from, A to) {
        return between(from, to).not();
    }
731602
func (n *Node) ChangesBetween(from, to api.Version) ([]state.Change, error) {
	n.stopMu.RLock()
	defer n.stopMu.RUnlock()

	if from.Index > to.Index {
		return nil, errors.New("versions are out of order")
	}

	if !n.IsMember() {
		return nil, ErrNoRaftMember
	}

	// never returns error
	last, _ := n.raftStore.LastIndex()

	if to.Index > last {
		return nil, errors.New("last version is out of bounds")
	}

	pbs, err := n.raftStore.Entries(from.Index+1, to.Index+1, math.MaxUint64)
	if err != nil {
		return nil, err
	}

	var changes []state.Change
	for _, pb := range pbs {
		if pb.Type != raftpb.EntryNormal || pb.Data == nil {
			continue
		}
		r := &api.InternalRaftRequest{}
		err := proto.Unmarshal(pb.Data, r)
		if err != nil {
			return nil, errors.Wrap(err, "error umarshalling internal raft request")
		}

		if r.Action != nil {
			changes = append(changes, state.Change{StoreActions: r.Action, Version: api.Version{Index: pb.Index}})
		}
	}

	return changes, nil
}