Sets the number of items that should be visible in a page.  Setting the
        value to 0 will use all sizes
        
        :return     <int>
555836
def setPageSize( self, pageSize ):
        
        if self._pageSize == pageSize:
            return
        
        self._pageSize = pageSize
        
        # update the display size
        ssize = nativestring(pageSize)
        if ( ssize == '0' ):
            ssize = ''
        
        self._pageSizeCombo.blockSignals(True)
        index = self._pageSizeCombo.findText(ssize)
        self._pageSizeCombo.setCurrentIndex(index)
        self._pageSizeCombo.blockSignals(False)
895332
def pageSize(self):
        

        # update the size based on the new size
        page_size = self.fixedPageSize()
        if page_size.isEmpty():
            w = self.width() - 80
            h = self.height() - 80

            min_w = self.minimumPageSize().width()
            min_h = self.minimumPageSize().height()
            max_w = self.maximumPageSize().width()
            max_h = self.maximumPageSize().height()

            page_size = QtCore.QSize(min(max(min_w, w), max_w), min(max(min_h, h), max_h))
        return page_size
479262
protected function setNextNumPage()
	{
		$this->next_num_page = 0;
		if ( $this->current_page_number < $this->num_pages )
		{
			$this->next_num_page = ( $this->current_page_number + 1 );
		}
	}
1019958
public void setRecordsAmount(int amount) {
        int ipp = Integer.parseInt(itemsPerPageEditor.getValueAsString());
        pageTotal = amount % ipp == 0? amount / ipp : amount / ipp + 1;
        draw(0);
    }
393904
public void setMaxVisiblePageCount(final int pageCount) {
        Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "setMaxVisiblePageCount pageCount = %d mLayouts.size = %d",
                pageCount, mLayouts.size());
        if (mMaxVisiblePageCount != pageCount) {
            mMaxVisiblePageCount = pageCount;
            recalculateViewPort(mAdapter);
            requestLayout();
        }
    }
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));
    }
682501
protected function setPagerListCollectionItem()
    {
        $options = $this->query_filter;
        $options['count'] = true;
        $options['collection_id'] = $this->data_collection['collection_id'];

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->collection_item->getList($options)
        );

        return $this->data_limit = $this->setPager($pager);
    }
885691
public int size() {
        int count=0;
        for(Value val: map.values())
            count+=val.count();

        return count;
    }
1115401
def calculate_size(name, items):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += INT_SIZE_IN_BYTES
    for items_item in items:
        data_size += calculate_size_data(items_item)
    return data_size
1013571
function () {
            var state = this.state,
                pages = state.pages,
                viewportHeight = state.viewportDimensions.clientHeight,
                viewportWidth = state.viewportDimensions.clientWidth;

            // no pages are visible, but this case breaks the logic below,
            // becasue page widths/heights will also be 0
            if (viewportWidth === 0 || viewportHeight === 0) {
                return {
                    min: -1,
                    max: -1
                };
            }

            var viewportY0 = state.scrollTop,
                viewportY1 = viewportY0 + viewportHeight,
                viewportX0 = state.scrollLeft,
                viewportX1 = viewportX0 + viewportWidth,
                lowY = util.bisectLeft(pages, viewportY0, 'y1'),
                highY = util.bisectRight(pages, viewportY1, 'y0') - 1,
                lowX = util.bisectLeft(pages, viewportX0, 'x1'),
                highX = util.bisectRight(pages, viewportX1, 'x0') - 1,
                low = Math.max(lowX, lowY),
                high = Math.min(highX, highY);

            return util.constrainRange(low, high, this.numPages - 1);
        }
806267
function() {
        var w = 0;
        for (var p=0;p<this.pages.length;++p) {
            var cal = this.pages[p];
            w += cal.oDomContainer.offsetWidth;
        }
        if (w > 0) {
            this.oDomContainer.style.width = w + "px";
        }
    }
1150022
public void setCustomViewSizes(Dimension... sizes) {
		assert customSizes != null;
		if (sizes == null) {
			customSizes.clear();
			return;
		}
		customSizes = Arrays.asList(sizes);
	}
283945
def num_pages(self):
        

        if self.count == 0 and not self.allow_empty_first_page:
            return 0

        hits = max(1, self.count - self.orphans)

        return int(ceil(hits / float(self.per_page)))
754501
function _setViewSize() {
        if (hasScrollContainer) {
            const width = viewEl.offsetWidth;
            const height = viewEl.offsetHeight;
            return view.setSize(width, height);
        }

        const html = document.documentElement;
        const width = window.innerWidth || html.clientWidth;
        const height = window.innerHeight || html.clientHeight;

        return view.setSize(width, height);
    }
867107
public int setItemStackSize(int stackSize)
	{
		if (itemStack.isEmpty())
			return 0;

		int start = itemStack.getCount();
		itemStack.setCount(Math.min(stackSize, Math.min(itemStack.getMaxStackSize(), getSlotStackLimit())));
		return itemStack.getCount() - start;
	}
1273293
def pages_count(self):
        ''''''
        if not self.limit or self.count<self.limit:
            return 1
        if self.count % self.limit <= self.orphans:
            return self.count // self.limit
        return int(math.ceil(float(self.count)/self.limit))
1084315
def page_count(self):
        
        postcount = self.post_set.count()
        max_pages = (postcount / get_paginate_by())
        if postcount % get_paginate_by() != 0:
            max_pages += 1
        return max_pages