Set the total number of records.
@method setTotalRecords
@param total {number} the new total number of records
@param silent {boolean} whether to forcibly avoid firing the changeRequest event
772024
function (total,silent) {
        if (Paginator.isNumeric(total) && +total >= 0 &&
            +total !== this.get('totalRecords')) {
            if (this.get('updateOnChange') || silent) {
                this.set('totalRecords',total);
            } else {
                this.fireEvent('changeRequest',
                    this.getState({'totalRecords':+total}));
            }
        }
    }
844979
public void setPage(int totalCount) {

        //
        // 缓存中的数据
        //
        page.put(FrontEndInterfaceConstant.PAGE_NO, ThreadContext.getContext(FrontEndInterfaceConstant.PAGE_NO));
        page.put(FrontEndInterfaceConstant.PAGE_SIZE, ThreadContext.getContext(FrontEndInterfaceConstant.PAGE_SIZE));
        page.put(FrontEndInterfaceConstant.PAGE_ORDER_BY,
                    ThreadContext.getContext(FrontEndInterfaceConstant.PAGE_ORDER_BY));
        page.put(FrontEndInterfaceConstant.PAGE_ORDER, ThreadContext.getContext(FrontEndInterfaceConstant.PAGE_ORDER));

        // 业务总数
        page.put(FrontEndInterfaceConstant.TOTAL_COUNT, totalCount);
    }
928122
public function updateTotals()
    {
        foreach ($this->totals_plan as $key => $val) {

            // if value is array, then we treat it as built-in or callable aggregate method
            if (is_array($val)) {
                $f = $val[0]; // shortcut

                // initial value is always 0
                if (!isset($this->totals[$key])) {
                    $this->totals[$key] = 0;
                }

                // closure support
                // arguments - current value, key, \atk4\ui\Table object
                if ($f instanceof \Closure) {
                    $this->totals[$key] += ($f($this->model[$key], $key, $this) ?: 0);
                }
                // built-in methods
                elseif (is_string($f)) {
                    switch ($f) {
                        case 'sum':
                            $this->totals[$key] += $this->model[$key];
                            break;
                        case 'count':
                            $this->totals[$key] += 1;
                            break;
                        case 'min':
                            if ($this->model[$key] < $this->totals[$key]) {
                                $this->totals[$key] = $this->model[$key];
                            }
                            break;
                        case 'max':
                            if ($this->model[$key] > $this->totals[$key]) {
                                $this->totals[$key] = $this->model[$key];
                            }
                            break;
                        default:
                            throw new Exception(['Aggregation method does not exist', 'method' => $f]);
                    }
                }
            }
        }
    }
712092
void recordStats(@Nullable String value) {
    requireArgument(value == null, "record stats does not take a value");
    requireArgument(!recordStats, "record stats was already set");
    recordStats = true;
  }
526162
func (s *FaultStatistics) SetTotalCount(v int64) *FaultStatistics {
	s.TotalCount = &v
	return s
}
1316157
public function set_count($try, $count) {
        $this->totalcount = $this->totalcount + $count;
        $this->trycount[$try] = $count;
    }
134536
function updateDisplayCount() {
  let visibleCount = 0;
  let totalCount = Object.keys(receivers).length;
  let trs = Array.from(tbody.getElementsByTagName('tr'));

  trs.forEach(function(tr) {
    if(tr.style.display === '') {
      visibleCount++;
    }
  });
  displayCount.value = visibleCount + ' of ' + totalCount;
}
883665
func (s *SearchRoomsOutput) SetTotalCount(v int64) *SearchRoomsOutput {
	s.TotalCount = &v
	return s
}
381821
public void record(long amount) {
    if (amount >= 0) {
      totalAmount.increment(amount);
      count.increment();
      max.update(amount);
      min.update(amount);
    }
  }
1016177
func (s *BatchPrediction) SetTotalRecordCount(v int64) *BatchPrediction {
	s.TotalRecordCount = &v
	return s
}
167672
public void setTotalBudget(com.google.api.ads.admanager.axis.v201902.Money totalBudget) {
        this.totalBudget = totalBudget;
    }
187924
function _calculateTotals() {
        if (empty($this->_calculateTotals)) {
            return;
        }

        $this->addSeparator();

        $totals = array();
        foreach ($this->_data as $row) {
            if (is_array($row)) {
                foreach ($this->_calculateTotals as $columnID) {
                    $totals[$columnID] += $row[$columnID];
                }
            }
        }

        $this->_data[] = $totals;
        $this->_updateRowsCols();
    }
380280
public function run(int $totalRecords = null, string $startKey = null, string $stopKey = null): array
    {
        if ($totalRecords !== null) {
            $this->totalRecords = abs($totalRecords);
        }

        if ($startKey) $this->startKey = $startKey;
        if ($stopKey) $this->stopKey = $stopKey;

        // get params could be manipulated by developer setting autorun false
        if ($this->autorun) {
            $this->start = abs($_GET[$this->startKey] ?? 0);
            $this->stop = abs($_GET[$this->stopKey] ?? 0);
        }

        $stop = ($this->stop > 0) ? $this->stop : $this->stopDefault;
        $start = ($this->start > 1) ? ($this->start * $stop) - $stop : 0;

        $this->stop = $stop;
        $this->start = $start;
        if ($this->totalRecords > 0) {
            $this->totalPages = abs((int) ceil($this->totalRecords / $this->stop));
        }

        // safety..
        if (isset($_GET[$this->startKey])) {
            $start = $_GET[$this->startKey];
            if ($start && $start[0] == '-') {
                $this->redirect($this->prepareQuery() . $this->startKey .'='. abs($start), 301);
            } elseif ($start > $this->totalPages) {
                $this->redirect($this->prepareQuery() . $this->startKey .'='. $this->totalPages, 307);
            } elseif ($start == '' || $start == '0' || !ctype_digit($start)) {
                $this->redirect(trim($this->prepareQuery(), '&'), 301);
            }
        }

        // fix start,stop
        if ($this->totalRecords == 1) {
            $this->stop = 1;
            $this->start = 0;
        }

        return [$this->stop, $this->start];
    }
17027
function toggleRecording() {
            mockService.toggleRecord({}, function (response) {
                vm.record = response.record;
                if (vm.record) {
                    interval = $interval(refreshMocks, 5000);
                } else {
                    $interval.cancel(interval);
                    refreshMocks();
                }
            });
        }
127430
function _set(n) {
        if (!started) {
          return;
        }
        var pct = (n * 100) + '%';
        loadingBar.css('width', pct);
        status = n;

        // increment loadingbar to give the illusion that there is always
        // progress but make sure to cancel the previous timeouts so we don't
        // have multiple incs running at the same time.
        if (autoIncrement) {
          $timeout.cancel(incTimeout);
          incTimeout = $timeout(function() {
            _inc();
          }, 250);
        }
      }
466817
private void fillTotalCount(JsonObject summary) {
    if (totalCount == 0 && summary != null && summary.get("total_count") != null) {
      totalCount = summary.getLong("total_count", totalCount);
    }
  }
1371683
function(index, silent) {
            var panel = this.panels.eq(index);

            if(!silent) {
                this._trigger('change', null, {'index': index});
            }
            
            //update state
            if(this.options.multiple) {
                this._addToSelection(index);
            }
            else {
                this.options.activeIndex = index;
            }
            this._show(panel);
        }