Return the 1-based index of the last item on this page.
489582
def end_index(self):
        """"""
        paginator = self.paginator
        # Special case for the last page because there can be orphans.
        if self.number == paginator.num_pages:
            return paginator.count
        return (self.number - 1) * paginator.per_page + paginator.first_page
1081326
public int last() {
        int val;
        int i;

        for (i = data.length - 1; i >= 0; i--) {
            if (data[i] != 0) {
                val = data[i] >>> 1;
                i <<= SHIFT;
                while (val != 0) {
                    val >>>= 1;
                    i++;
                }
                return i;
            }
        }
        return -1;
    }
60512
def _last_bookmark(b0, b1):
    
    n = [None, None]
    _, _, n[0] = b0.rpartition(":")
    _, _, n[1] = b1.rpartition(":")
    for i in range(2):
        try:
            n[i] = int(n[i])
        except ValueError:
            raise ValueError("Invalid bookmark: {}".format(b0))
    return b0 if n[0] > n[1] else b1
706466
def last(self):
        """"""
        with self.lock:
            try:
                return self.data[-1][0]
            except IndexError as ex:
                ex.args = ('DEPQ is empty',)
                raise
1355841
def get_last(self):
        """"""
        response = self.session.get(self.mission_url, verify=False)
        soup = BeautifulSoup(response.text, 'html.parser')
        last = soup.select('#Main div')[-1].text
        return last
10814
def get_last(postid, limit=10):
        '''
        
        '''
        recs = TabPostHist.select().where(
            TabPostHist.post_id == postid
        ).order_by(TabPostHist.time_update.desc()).limit(limit)
        if recs.count():
            return recs.get()
        return None
1351730
def last(self):
        

        if self.limit > self.total:
            return None
        elif self.offset >= self.total:
            return None
        else:
            offset = (self.total / self.limit) * self.limit
            return {'page[offset]': offset, 'page[limit]': self.limit}
1123354
def last_part_number(self):
        """"""
        return int(self.size / self.chunk_size) \
            if self.size % self.chunk_size else \
            int(self.size / self.chunk_size) - 1
781267
function findLastCommonIndex(xs, ys) {
    for (let i = Math.min(xs.length, ys.length) - 1; i >= 0; --i) {
        if (xs[i] === ys[i]) {
            return i
        }
    }
    return -1
}
81222
function _lastHeadIndex(buffer, value) {
        for (var i = 0; i < buffer.length; i++) {
            if (buffer[i] !== value) {
                return i;
            }
        }
        return -1;
    }
1046985
def get_last_offset(self, field, filters_=[]):
        '''
            
        '''

        offset = self.get_last_item_field(field, filters_=filters_, offset=True)

        return offset
1324359
def lastChild(self):
        '''
            
        '''
        blocks = object.__getattribute__(self, 'blocks')
        # First block is empty string for indent, but don't hardcode incase that changes
        if blocks[0] == '':
           firstIdx = 1
        else:
           firstIdx = 0

        if len(blocks) <= firstIdx:
            return None

        return blocks[-1]
1274572
def last(self, n=1):
        
        res = self.obj[-n:]
        if len(res) is 1:
            res = res[0]
        return self._wrap(res)
585895
def last(self):
        
        if self._last is UNDETERMINED:
            # not necessarily the last one...
            self._last = self.sdat.tseries.index[-1]
        return self[self._last]
1103989
def last(self):
        
        last_items = []
        for (k, v) in self.items():
            if isinstance(v, NdMapping):
                item = (k, v.clone((v.last_key, v.last)))
            elif isinstance(v, AdjointLayout):
                item = (k, v.last)
            else:
                item = (k, v)
            last_items.append(item)
        return self.clone(last_items)
726456
def _getitem(self, key):
        """"""
        key = int(key)
        if key < 0:
            key %= self._len
        if len(self._pages) == 1 and 0 < key < self._len:
            index = self._pages[0].index
            return self.parent.pages._getitem(index + key)
        return self._pages[key]
227356
function Last() {
        $items = $this->ToArray();
        $cnt = count($items);
        return $cnt > 0 ? $items[$cnt -1] : null;
    }