// Find returns a reference to a binary in the database db with the same id as br, or nil if none is found
334722
func (br *BinaryReference) Find(db *Database) *Binary {
	if db.Header.IsKdbx4() {
		return db.Content.InnerHeader.Binaries.Find(br.Value.ID)
	}
	return db.Content.Meta.Binaries.Find(br.Value.ID)
}
224728
func (p *DataFrame) find(parts []string) interface{} {
	data := p.data

	for i, part := range parts {
		val := data[part]
		if val == nil {
			return nil
		}

		if i == len(parts)-1 {
			// found
			return val
		}

		valValue := reflect.ValueOf(val)
		if valValue.Kind() != reflect.Map {
			// not found
			return nil
		}

		// continue
		data = mapStringInterface(valValue)
	}

	// not found
	return nil
}
1139353
func (engine *Engine) Find(beans interface{}, condiBeans ...interface{}) error {
	session := engine.NewSession()
	defer session.Close()
	return session.Find(beans, condiBeans...)
}
1263851
func (list *RefundList) Find(id string) *Refund {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}
712164
func (s *session) Find(keys KeyList, container TableListContainer, opts ...GetOption) error {
	action, err := s.find(keys, container, s.applyGetOption(opts), nil)
	if err != nil {
		return s.catch("Find: "+action, err)
	}
	return nil
}
342298
func (s *set) Find(path Ref) (Value, error) {
	if len(path) == 0 {
		return s, nil
	}
	if !s.Contains(path[0]) {
		return nil, fmt.Errorf("find: not found")
	}
	return path[0].Value.Find(path[1:])
}
600540
func (w *Writer) Find(key []byte, o *db.ReadOptions) db.Iterator {
	return &tableIter{
		err: errors.New("leveldb/table: cannot Find from a write-only table"),
	}
}
790616
func (session *Session) Find(rowsSlicePtr interface{}, condiBean ...interface{}) error {
	if session.isAutoClose {
		defer session.Close()
	}
	return session.find(rowsSlicePtr, condiBean...)
}
225287
func (r *Regex) Find(data string, pos int) MatchObject {
	// if the new position is less than last search start position
	// ???: why we can't always do r.lastFound = pos?
	if pos < r.lastIndex {
		r.lastFound = pos
	}
	r.lastIndex = pos
	for ; r.lastFound < len(data); r.lastFound++ {
		ret := r.re.FindStringSubmatchIndex(data[r.lastFound:])
		if ret == nil {
			return nil
		}
		if (ret[0] + r.lastFound) >= pos {
			mo := MatchObject(ret)
			mo.fix(r.lastFound)
			return mo
		}
		if ret[0] != 0 {
			// ???: why shouldn't this be r.lastFound += ret[0]
			r.lastFound += ret[0] - 1
		}
	}
	return nil
}
672804
func Find(e, ie interface{}) int {
	if e == nil || ie == nil {
		return -1
	}
	switch err := e.(type) {
	case *Error:
		return err.Find(ie)
	case error:
		return New(err).(*Error).Find(ie)
	default:
		panic("invalid type, must be *Error")
	}
}
1085310
func (str String) Find(path Ref) (Value, error) {
	if len(path) == 0 {
		return str, nil
	}
	return nil, fmt.Errorf("find: not found")
}
982670
func (session *SafeSession) Find(keyspace, shard string, tabletType topodatapb.TabletType) int64 {
	if session == nil {
		return 0
	}
	session.mu.Lock()
	defer session.mu.Unlock()
	for _, shardSession := range session.ShardSessions {
		if keyspace == shardSession.Target.Keyspace && tabletType == shardSession.Target.TabletType && shard == shardSession.Target.Shard {
			return shardSession.TransactionId
		}
	}
	return 0
}
670812
func (c Channels) Find(names ...string) *Channel {
	root := c[0]
	if names == nil || root == nil {
		return root
	}
	return root.Find(names...)
}
392973
func (r *RedisStore) Find(token string) (b []byte, exists bool, err error) {
	conn := r.pool.Get()
	defer conn.Close()

	b, err = redis.Bytes(conn.Do("GET", r.prefix+token))
	if err == redis.ErrNil {
		return nil, false, nil
	} else if err != nil {
		return nil, false, err
	}
	return b, true, nil
}
1152629
func (d *dir) find(q string) node {
	q = strings.Trim(q, "/")
	i := strings.Index(q, "/")

	if q == "" {
		return d
	}

	if i == 0 {
		panic("shouldn't happen, no root paths")
	}

	var component string
	if i < 0 {
		// No more path components
		component = q
	} else {
		component = q[:i]
	}

	child, ok := d.children[component]
	if !ok {
		// Node was not found. Return p and the current node.
		return d
	}

	if child.isdir() {
		// traverse down!
		q = q[i+1:]
		return child.(*dir).find(q)
	}

	return child
}
165202
func Find(source string, targets []string) []string {
	return find(source, targets, noop)
}
453595
func (t *PairTree) Find(key string) *Pair {
	v := t.ObjectTree.Find(Pair{key, nil})
	if v != nil {
		x := v.(Pair)
		return &x
	}
	return nil
}