// NumericLurkers returns a slice of uint64 representing the ids of the users that lurked the post
769126
func (post *UserPost) NumericLurkers() (lurkers []uint64) {
	Db().Model(UserPostLurk{}).Where(&UserPostLurk{Hpid: post.ID()}).Pluck(`"from"`, &lurkers)
	return
}
480439
func numericToLetters(colRef int) string {
	parts := intToBase26(colRef)
	return formatColumnName(smooshBase26Slice(parts))
}
155743
func (nn *nn) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleUnknown
}
913614
func (post *ProjectPost) NumericOwners() (ret []uint64) {
	ret = append(ret, post.From)
	project, _ := NewProject(post.To)
	ret = append(ret, project.NumericOwner())
	ret = append(ret, project.NumericMembers()...)
	return
}
656089
func (e MultiError) NumErrors() int {
	if e.err == nil {
		return 0
	}
	return len(e.errors) + 1
}
348446
func (r Network_Storage) GetNotificationSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) {
	err = r.Session.DoRequest("SoftLayer_Network_Storage", "getNotificationSubscribers", nil, &r.Options, &resp)
	return
}
511165
func (ur *ur_IN) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleOther
}
94652
func (user *User) NumericProjects() (projects []uint64) {
	Db().Model(ProjectOwner{}).Where(ProjectOwner{From: user.ID()}).Pluck(`"to"`, &projects)
	return
}
203565
func (s *Server) NumClients() int {
	s.mu.Lock()
	defer s.mu.Unlock()
	return len(s.clients)
}
410849
func (ac *AddressCache) NumAddresses() int {
	ac.mtx.RLock()
	defer ac.mtx.RUnlock()
	return len(ac.a)
}
24670
func (post *ProjectPost) LurkersCount() (count uint8) {
	Db().Model(ProjectPostLurk{}).Where(&ProjectPostLurk{Hpid: post.ID()}).Count(&count)
	return
}
71830
func (h *UserHandler) ListTrackers(ctx context.Context, arg keybase1.ListTrackersArg) ([]keybase1.Tracker, error) {
	eng := engine.NewListTrackers(h.G(), arg.Uid)
	return h.listTrackers(ctx, arg.SessionID, eng)
}
636510
func (i *PostingsIterator) nextDocNumAtOrAfter(atOrAfter uint64) (uint64, bool, error) {
	if i.normBits1Hit != 0 {
		if i.docNum1Hit == DocNum1HitFinished {
			return 0, false, nil
		}
		if i.docNum1Hit < atOrAfter {
			// advanced past our 1-hit
			i.docNum1Hit = DocNum1HitFinished // consume our 1-hit docNum
			return 0, false, nil
		}
		docNum := i.docNum1Hit
		i.docNum1Hit = DocNum1HitFinished // consume our 1-hit docNum
		return docNum, true, nil
	}

	if i.Actual == nil || !i.Actual.HasNext() {
		return 0, false, nil
	}

	if i.postings == nil || i.postings.postings == i.ActualBM {
		return i.nextDocNumAtOrAfterClean(atOrAfter)
	}

	n := i.Actual.Next()
	for uint64(n) < atOrAfter && i.Actual.HasNext() {
		n = i.Actual.Next()
	}
	if uint64(n) < atOrAfter {
		// couldn't find anything
		return 0, false, nil
	}
	allN := i.all.Next()

	nChunk := n / i.postings.sb.chunkFactor

	// when allN becomes >= to here, then allN is in the same chunk as nChunk.
	allNReachesNChunk := nChunk * i.postings.sb.chunkFactor

	// n is the next actual hit (excluding some postings), and
	// allN is the next hit in the full postings, and
	// if they don't match, move 'all' forwards until they do
	for allN != n {
		// we've reached same chunk, so move the freq/norm/loc decoders forward
		if i.includeFreqNorm && allN >= allNReachesNChunk {
			err := i.currChunkNext(nChunk)
			if err != nil {
				return 0, false, err
			}
		}

		allN = i.all.Next()
	}

	if i.includeFreqNorm && (i.currChunk != nChunk || i.currChunkFreqNorm == nil) {
		err := i.loadChunk(int(nChunk))
		if err != nil {
			return 0, false, fmt.Errorf("error loading chunk: %v", err)
		}
	}

	return uint64(n), true, nil
}
384074
func NewTrackIndexedDBForOriginArgs(origin string) *TrackIndexedDBForOriginArgs {
	args := new(TrackIndexedDBForOriginArgs)
	args.Origin = origin
	return args
}
223420
func ExtractNumericFilters(opts ...interface{}) *opt.NumericFiltersOption {
	for _, o := range opts {
		if v, ok := o.(*opt.NumericFiltersOption); ok {
			return v
		}
	}
	return nil
}
400385
func AtMostPosts(n uint64) uint8 {
	return uint8(utils.AtMost(n, MinPosts, MaxPosts))
}
947419
func InitWorkers(workerNum int64, queueNum int64) {
	LogAccess.Debug("worker number is ", workerNum, ", queue number is ", queueNum)
	QueueNotification = make(chan PushNotification, queueNum)
	for i := int64(0); i < workerNum; i++ {
		go startWorker()
	}
}