List available page sizes.
503531
def availablePageSizes(self):
		

		sizes = [x for x in dir(QPagedPaintDevice)
		         if type(getattr(QPagedPaintDevice, x)) == QPagedPaintDevice.PageSize]
		return sizes
811794
function(options) {
        var pages = [];
        var fromPage = options.page - 2;
        if (fromPage < 2) {
          fromPage = 2;
        }
        for (var page = fromPage; (page < (fromPage + options.shown)); page++) {
          pages.push(page);
        }
        return pages;
      }
1295214
private int calculatePageSize()
    {
        int meanColumnCount = hintStore.getMeanColumns();
        if (meanColumnCount <= 0)
            return PAGE_SIZE;

        int averageColumnSize = (int) (hintStore.getMeanRowSize() / meanColumnCount);
        if (averageColumnSize <= 0)
            return PAGE_SIZE;

        // page size of 1 does not allow actual paging b/c of >= behavior on startColumn
        return Math.max(2, Math.min(PAGE_SIZE, 4 * 1024 * 1024 / averageColumnSize));
    }
173179
def cache_page(page_cache, page_hash, cache_size):
    """"""
    page_cache.append(page_hash)
    if len(page_cache) > cache_size:
        page_cache.pop(0)
1059182
def avail_sizes(call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The avail_sizes function must be called with '
            '-f or --function, or with the --list-sizes option'
        )

    conn = get_conn()
    data = conn.list_role_sizes()
    ret = {}
    for item in data.role_sizes:
        ret[item.name] = object_to_dict(item)
    return ret
208421
function set_pagesize($size)
    {
        $this->page_size = (int)$size;
        $this->ldap->set_vlv_page($this->list_page, $this->page_size);
    }
668692
def list_shops(self, page_index=1, page_size=20):
        
        res = self._post(
            'shop/list',
            data={
                'pageindex': page_index,
                'pagesize': page_size,
            },
            result_processor=lambda x: x['data']
        )
        return res
1297154
def PaperSize(s):
    """"""
    size = s.lower()
    f = "p"
    if size.endswith("-l"):
        f = "l"
        size = size[:-2]
    if size.endswith("-p"):
        size = size[:-2]
    rc = paperSizes.get(size, (-1, -1))
    if f == "p":
        return rc
    return (rc[1], rc[0])
1201966
def avail_sizes(conn=None):
    '''
    
    '''
    if not conn:
        conn = get_conn()
    raw_sizes = conn.list_sizes('all')  # get *all* the machine types!
    sizes = []
    for size in raw_sizes:
        zone = size.extra['zone']
        size.extra['zone'] = {}
        size.extra['zone'].update(zone.__dict__)
        mtype = {}
        mtype.update(size.__dict__)
        sizes.append(mtype)
    return sizes
313126
def total_pages(key, page_size)
      (Amico.redis.zcard(key) / page_size.to_f).ceil
    end
600922
def sizes(x):
  """"""
  def size(x):
    try:
      return x.size
    except Exception:  # pylint: disable=broad-except
      return 0
  return nested_map(x, size)
1138728
def pages(self):
        """"""
        rev = self.db.get('site:rev')
        if int(rev) != self.revision:
            self.reload_site()

        return self._pages
266260
def page_slice(self):
        """"""
        return (
            None
            if self.query is None
            else (self.query.get("from", 0), self.query.get("size", 10))
        )
51529
def pages(self, limit=0):
        """"""
        if limit > 0:
            self.iterator.limit = limit
        return self.iterator
34831
def aggregate(self, **filters):
        """"""
        url = URL.aggregate.format(**locals())
        return self.get_pages(url, **filters)
947479
def list_licenses(page_size=200, page_index=0, sort="", q=""):
    
    response = utils.checked_api_call(pnc_api.licenses, 'get_all', page_size=page_size, page_index=page_index, sort=sort, q=q)
    if response:
        return utils.format_json_list(response.content)
1099954
@Override
  public Sizes getAvailableSizes(Integer pageNo)
      throws DigitalOceanException, RequestUnsuccessfulException {
    validatePageNo(pageNo);
    return (Sizes) perform(new ApiRequest(ApiAction.AVAILABLE_SIZES, pageNo, DEFAULT_PAGE_SIZE))
        .getData();
  }