If basket was finished completely add it to overfiew statistics.
763399
protected function AddCompleteOrderToStatistics()
    {
        if (array_key_exists(TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.completed'), $this->aCancelStep)) {
            ++$this->aCancelStep[TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.completed')];
        } else {
            $this->aCancelStep[TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.completed')] = 1;
        }
    }
989947
private void cleanup() {
        StatsDataReference ref = null;
        while ((ref = (StatsDataReference) statisticsReferenceQueue.poll()) != null) {
            StatsData oldStats = null;
            StatsData updatedStats = null;
            do {
                oldStats = terminatedThreadStats.get();
                updatedStats = aggregateStats(oldStats, ref.statsData);
            } while (!terminatedThreadStats.compareAndSet(oldStats, updatedStats));
            allReferences.remove(ref);
        }
    }
1207873
@GuardedBy("this")
  private void rehashIfNeeded() {
    int currentSize = table.length;
    if (currentSize - count >= currentSize / (MAX_EXPECTED_COLLISION_COUNT + 1)) {
      // Still enough overhead.
      return;
    }

    Object[] oldTable = table;
    // Grow the table so it increases by 1 / GROWTH_DENOMINATOR.
    int newSize = currentSize + currentSize / GROWTH_DENOMINATOR;

    table = new Object[newSize];
    count = 0;

    for (Object element : oldTable) {
      if (element != null) {
        intern(element);
      }
    }
  }
1220866
function (element, quantity, callback) {
                if (this.$.basket) {

                    this.fixBasketCurrency();

                    var basketItem = this.$.basket.addElement(element, quantity);
                    element = basketItem.$.element;

                    var originId = this.$.originId;
                    if (originId) {
                        basketItem.set('origin', new Entity({
                            id: originId
                        }));
                    }

                    this.extendElementWithLinks(element);
                }

                callback && callback();
            }
951328
def finish(self):
        """"""

        # Combine all the suffix files into the data file.
        self.cov.stop()
        self.cov.combine()
        self.cov.save()
715812
function() {
        this._calculateColumns();

        this.fireEvent('rendering');

        var element = this.element,
            items = this.items;

        // No items
        if (!items.length) {
            element.removeAttr('style');

        // Single column
        } else if (this.colCount <= 1) {
            element.removeAttr('style').addClass('no-columns');
            items.removeAttr('style');

        // Multi column
        } else {
            element.removeClass('no-columns');

            this._organizeItems();
            this._positionItems();
        }

        this.fireEvent('rendered');
    }
256081
def finish(self):
        """"""
        self.update(self.maxval)
        if self.signal_set:
            signal.signal(signal.SIGWINCH, signal.SIG_DFL)
688240
def add(self, key, value,
            description='',
            history_max_size=None):
        """"""
        if key not in self.stats_history:
            self.stats_history[key] = GlancesAttribute(key,
                                                       description=description,
                                                       history_max_size=history_max_size)
        self.stats_history[key].value = value
213643
protected void createStats() {
    if (stats == null) {
      stats = new DescriptiveStatistics();
      for (T1 value : fullValues) {
        stats.addValue(value.doubleValue());
      }
    }
  }
751260
protected function cutStats()
	{
		if ( count($this->stats) > 100 )
		{
			reset($this->stats);
			$first = key($this->stats);
			unset($this->stats[$first]);
		}
	}
1028888
def make_bd(self):
        ""
        self.bd = concatenate((
            # These values will dim the particles
            random.normal(
                self.bd_mean - self.bd_mu, self.bd_sigma, 16).astype(int),
            # These values will brighten the particles
            random.normal(
                self.bd_mean + self.bd_mu, self.bd_sigma, 16).astype(int)),
            axis=0)
846224
function addStats(collection, pkg) {
      var coverageType, stat;
      for (coverageType in collection) {
        if (collection.hasOwnProperty(coverageType)) {
          for (stat in collection[coverageType]) {
            if (collection[coverageType].hasOwnProperty(stat)) {
              collection[coverageType][stat] = collection[coverageType][stat] +
              pkg[coverageType][stat];
            }
          }
        }
      }
    }
1278099
def add(self, data):
		
		if len(self) + len(data) > self.sizelimit:
			raise OmapiSizeLimitError()
		self.buff.write(data)
		return self
390153
def merge(data,skip=50,fraction=1.0):
    """"""

    w,s,d = data.chains.shape
    
    start = int((1.0 - fraction) * s)
    total = int((s - start) / skip)
        
    return data.chains[:,start::skip,:].reshape((w*total,d))
471396
public function deleteBasket()
    {
        $this->_aBasketContents = [];
        $this->getSession()->delBasket();

        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blPsBasketReservationEnabled')) {
            $this->getSession()->getBasketReservations()->discardReservations();
        }

        // merging basket history
        $this->_deleteSavedBasket();
    }
991305
private void recomputeLoadSums() {
        loadsHaveChanged.set(false);
        for (int d = 0; d < nbDims; d++) {
            int sli = 0;
            int sls = 0;
            for (int b = 0; b < nbBins; b++) {
                sli += loads[d][b].getLB();
                sls += loads[d][b].getUB();
            }
            this.sumLoadInf[d].set(sli);
            this.sumLoadSup[d].set(sls);
        }
    }
254120
protected void addToOverlaps(Intervalable interval, List<Intervalable> overlaps, List<Intervalable> newOverlaps)
    {
        for (Intervalable currentInterval : newOverlaps)
        {
            if (!currentInterval.equals(interval))
            {
                overlaps.add(currentInterval);
            }
        }
    }