// -- First --
// first takes the first page of search results.
499557
func (s *ScrollService) first(ctx context.Context) (*SearchResult, error) {
	// Get URL and parameters for request
	path, params, err := s.buildFirstURL()
	if err != nil {
		return nil, err
	}

	// Get HTTP request body
	body, err := s.bodyFirst()
	if err != nil {
		return nil, err
	}

	// Get HTTP response
	res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
		Method:          "POST",
		Path:            path,
		Params:          params,
		Body:            body,
		Retrier:         s.retrier,
		Headers:         s.headers,
		MaxResponseSize: s.maxResponseSize,
	})
	if err != nil {
		return nil, err
	}

	// Return operation response
	ret := new(SearchResult)
	if err := s.client.decoder.Decode(res.Body, ret); err != nil {
		return nil, err
	}
	s.mu.Lock()
	s.scrollId = ret.ScrollId
	s.mu.Unlock()
	if ret.Hits == nil || len(ret.Hits.Hits) == 0 {
		return ret, io.EOF
	}
	return ret, nil
}
145361
func (h *HTML) firstChild() jsObject {
	if h == nil || h.node == nil {
		return nil
	}
	return h.node.Get("firstChild")
}
390152
func (s *SkipList) SeekToFirst() Iterator {
	if s.length == 0 {
		return nil
	}

	current := s.header.next()

	return &iter{
		current: current,
		key:     current.key,
		list:    s,
		value:   current.value,
	}
}
1294553
func (s *IPCredentialList) FirstPage() (*IPCredentialList, error) {
	return s.getPage(s.Meta.FirstPageUri)
}
504023
func (doc PluginDocument) GetRST() string {
	result := ""

	// Print top comment
	result += ".. Autogenerated by Gollum RST generator (docs/generator/*.go)\n\n"

	// Print heading
	result += doc.PluginName + "\n"
	result += strings.Repeat("=", len(doc.PluginName)) + "\n"

	// Print description
	result += "\n"
	result += docBulletsToRstBullets(doc.Description) + "\n"
	result += "\n"

	// Print native metadata
	if len(doc.Metadata.slice) > 0 {
		result += formatRstHeading("Metadata")
		result += doc.Metadata.getRST(false, 0)
	}

	// Print inherited metadata
	for _, parentName := range sortInheritedKeys(doc.InheritedMetadata) {
		if len(doc.InheritedMetadata[parentName].slice) == 0 {
			// Skip title for empty sets
			continue
		}
		result += formatRstHeading(
			"Metadata (from " + /* strings.TrimPrefix(*/ parentName /*, "core.") */ + ")")

		result += doc.InheritedMetadata[parentName].getRST(false, 0)
	}

	// Print native parameters
	if len(doc.Parameters.slice) > 0 {
		result += formatRstHeading("Parameters")
		result += doc.Parameters.getRST(true, 0)
	}

	// Print inherited parameters
	for _, parentName := range sortInheritedKeys(doc.InheritedParameters) {
		if len(doc.InheritedParameters[parentName].slice) == 0 {
			// Skip title for empty param sets
			continue
		}
		result += formatRstHeading(
			"Parameters (from " + /* strings.TrimPrefix(*/ parentName /*, "core.") */ + ")")
		result += doc.InheritedParameters[parentName].getRST(true, 0)
	}

	// Print config example
	if len(doc.Example) > 0 {
		result += formatRstHeading("Examples")
		codeBlock := false

		for _, line := range strings.Split(doc.Example, "\n") {

			if strings.Index(line, " ") == 0 {
				if !codeBlock {
					result += ".. code-block:: yaml\n\n"
					codeBlock = true
				}
			} else {
				if codeBlock {
					result += "\n"
					codeBlock = false
				}
			}

			if codeBlock {
				result += "\t" + line + "\n"
			} else {
				result += line + "\n"
			}
		}
	}

	return result
}
1127415
func (c *Cursor) First() ([]byte, []byte) {
	if c.Reverse {
		return c.C.Last()
	}

	return c.C.First()
}
1334372
func (it *Iter) Next() bool {
	if len(it.values) == 0 && it.meta.HasMore && !it.listParams.Single {
		// determine if we're moving forward or backwards in paging
		if it.listParams.EndingBefore != nil {
			it.listParams.EndingBefore = String(listItemID(it.cur))
			it.formValues.Set(EndingBefore, *it.listParams.EndingBefore)
		} else {
			it.listParams.StartingAfter = String(listItemID(it.cur))
			it.formValues.Set(StartingAfter, *it.listParams.StartingAfter)
		}
		it.getPage()
	}
	if len(it.values) == 0 {
		return false
	}
	it.cur = it.values[0]
	it.values = it.values[1:]
	return true
}
278948
func (l SecondaryLayer) SeekFirst() (e *SecondaryEnumerator, err error) {
	l.lock.Lock()
	e, err = l.store.SeekFirst()
	l.lock.Unlock()
	return
}
858685
func (l PrimaryLayer) SeekFirst() (e *PrimaryEnumerator, err error) {
	l.lock.Lock()
	e, err = l.store.SeekFirst()
	l.lock.Unlock()
	return
}
384903
func (s *Client) First(username string) []byte {
	s.username = prepare(username)
	return append(s.bindString(), s.bareClientFirst()...)
}
1211843
func (t *PrimaryTree) SeekFirst() (e *PrimaryEnumerator, err error) {
	q := t.first
	if q == nil {
		return nil, io.EOF
	}

	return btEPool1.get(nil, true, 0, q.d[0].k, q, t, atomic.LoadUint64(&t.ver)), nil
}
1088068
func (s *IPRoleList) FirstPage() (*IPRoleList, error) {
	return s.getPage(s.Meta.FirstPageUri)
}
1366232
func (f *Frame) First() (noder.Noder, bool) {
	if f.Len() == 0 {
		return nil, false
	}

	top := f.Len() - 1

	return f.stack[top], true
}
682191
func (s *Deque) First() interface{} {
	s.RLock()
	defer s.RUnlock()

	item := s.container.Front()
	if item != nil {
		return item.Value
	} else {
		return nil
	}
}
1179643
func (list *List) FirstN(n int) []string {
	if n < 1 || n >= list.length {
		return emptySlice()
	}
	return list.Slice(0, n-1)
}
1140128
def first_page(self):
        
        try:
            start_url = self.start_url
        except AttributeError:
            raise PageError("Page %r is already the first page" % self)
        return self.page_for_url(start_url)
1263674
func (iter *dbCacheIterator) First() bool {
	// Seek to the first key in both the database and cache iterators and
	// choose the iterator that is both valid and has the smaller key.
	iter.dbIter.First()
	iter.cacheIter.First()
	return iter.chooseIterator(true)
}