Adds counter with dimensions to the registry
556695
def counter(self, key, **dims):
        """"""
        return super(RegexRegistry, self).counter(self._get_key(key), **dims)
127456
def AddValue(self, registry_value):
    
    name = registry_value.name.upper()
    if name in self._values:
      raise KeyError(
          'Value: {0:s} already exists.'.format(registry_value.name))

    self._values[name] = registry_value
369788
public function addRegistry($registry)
	{
		if ($this->registryExists($registry)) {
			return false;
		}
		$this->data[self::REGISTRY][$registry] = array();
		$this->dirty = true;
		return true;
	}
825698
public static void installDefaultRegistry(@NonNull final DefaultResolverRegistry registry) {
            /*
             * register built-in cards & mCells
             */
        MVHelper mvHelper = new MVHelper(new MVResolver());
        registry.setMVHelper(mvHelper);

        // built-in mCells
        registry.registerCell(TYPE_EXTENDED_VIEW_COMPACT, Card.PlaceholderCell.class,
            SimpleEmptyView.class);
        registry.registerCell(TYPE_EMPTY_VIEW_COMPACT, BaseCell.class, SimpleEmptyView.class);
        //registry.registerCell(TYPE_SIMPLE_IMAGE_COMPACT, Cell.class, SimpleImgView.class);
        registry.registerCell(TYPE_CAROUSEL_CELL_COMPACT, BannerView.class);
        registry.registerCell(TYPE_CONTAINER_BANNER, BannerView.class);
        registry.registerCell(TYPE_LINEAR_SCROLL_CELL_COMPACT, LinearScrollView.class);
        registry.registerCell(TYPE_CONTAINER_SCROLL, LinearScrollView.class);

        // built-in cards
        registry.registerCard(TYPE_CAROUSEL_COMPACT, BannerCard.class);
        registry.registerCard(TYPE_CONTAINER_BANNER, BannerCard.class);
        registry.registerCard(TYPE_SINGLE_COLUMN_COMPACT, SingleColumnCard.class);
        registry.registerCard(TYPE_CONTAINER_1C_FLOW, SingleColumnCard.class);
        registry.registerCard(TYPE_DOUBLE_COLUMN_COMPACT, DoubleColumnCard.class);
        registry.registerCard(TYPE_CONTAINER_2C_FLOW, DoubleColumnCard.class);
        registry.registerCard(TYPE_TRIPLE_COLUMN_COMPACT, TripleColumnCard.class);
        registry.registerCard(TYPE_CONTAINER_3C_FLOW, TripleColumnCard.class);
        registry.registerCard(TYPE_FOUR_COLUMN_COMPACT, FourColumnCard.class);
        registry.registerCard(TYPE_CONTAINER_4C_FLOW, FourColumnCard.class);
        registry.registerCard(TYPE_ONE_PLUS_N_COMPACT, OnePlusNCard.class);
        registry.registerCard(TYPE_CONTAINER_ON_PLUSN, OnePlusNCard.class);
        registry.registerCard(TYPE_FLOAT_COMPACT, FloatCard.class);
        registry.registerCard(TYPE_CONTAINER_FLOAT, FloatCard.class);
        registry.registerCard(TYPE_PIN_BOTTOM_COMPACT, PinBottomCard.class);
        registry.registerCard(TYPE_FIVE_COLUMN_COMPACT, FiveColumnCard.class);
        registry.registerCard(TYPE_CONTAINER_5C_FLOW, FiveColumnCard.class);
        registry.registerCard(TYPE_STICKY_COMPACT, StickyCard.class);
        registry.registerCard(TYPE_CONTAINER_STICKY, StickyCard.class);
        registry.registerCard(TYPE_STICKY_START_COMPACT, StickyCard.class);
        registry.registerCard(TYPE_STICKY_END_COMPACT, StickyEndCard.class);
        registry.registerCard(TYPE_PIN_TOP_COMPACT, PinTopCard.class);
        registry.registerCard(TYPE_CONTAINER_FIX, FixCard.class);
        registry.registerCard(TYPE_STAGGER_COMPACT, StaggeredCard.class);
        registry.registerCard(TYPE_CONTAINER_WATERFALL, StaggeredCard.class);

        registry.registerCard(TYPE_FUSION_TABS_COMPACT, FusionCard.class);
        registry.registerCard(TYPE_FLOW_COMPACT, FlowCard.class);
        registry.registerCard(TYPE_CONTAINER_FLOW, FlowCard.class);
        registry.registerCard(TYPE_SCROLL_FIX_COMPACT, ScrollFixCard.class);
        registry.registerCard(TYPE_CONTAINER_SCROLL_FIX, ScrollFixCard.class);

        registry.registerCard(TYPE_LINEAR_SCROLL_COMPACT, LinearScrollCard.class);
        registry.registerCard(TYPE_CONTAINER_SCROLL, LinearScrollCard.class);
        registry.registerCard(TYPE_SCROLL_FIX_BANNER_COMPACT, FixLinearScrollCard.class);
        registry.registerCard(TYPE_CONTAINER_SCROLL_FIX_BANNER, FixLinearScrollCard.class);

        // extend cards
        registry.registerCard(TYPE_FIX_COMPACT, FixCard.class);
        registry.registerCard(TYPE_GRID_COMPACT, GridCard.class);
        registry.registerCard(TYPE_LINEAR_COMPACT, LinearCard.class);
        registry.registerCard(TYPE_X_COLUMN_COMPACT, ColumnCard.class);
    }
253961
public void addAll(IntCounter<E> counter) {
    for (E key : counter.keySet()) {
      int count = counter.getIntCount(key);
      incrementCount(key, count);
    }
  }
524144
def add(self, opener):
        

        index = len(self.openers)
        self.openers[index] = opener
        for name in opener.names:
            self.registry[name] = index
686477
def static_dimensions(self):
        
        dimensions = []
        for dim in self.kdims:
            if len(set(self.dimension_values(dim.name))) == 1:
                dimensions.append(dim)
        return dimensions
912274
def counter(self, name):
        
        with self._lock:
            if name not in self._counters:
                if self._registry._ignore_patterns and any(
                    pattern.match(name) for pattern in self._registry._ignore_patterns
                ):
                    counter = noop_metric
                else:
                    counter = Counter(name)
                self._counters[name] = counter
            return self._counters[name]
188655
function calculateDimensionsList(toIndex) {
        var i, prevDimension, dim;
        for (i = Math.max(0, dimensionsIndex); i <= toIndex && (dim = dimensions[i]); i++) {
          prevDimension = dimensions[i - 1] || EMPTY_DIMENSION;
          dim.primarySize = self.getItemPrimarySize(i, data[i]);
          dim.secondarySize = self.scrollSecondarySize;
          dim.primaryPos = prevDimension.primaryPos + prevDimension.primarySize;
          dim.secondaryPos = 0;
        }
      }
984540
public void add(RationalCounter<? extends T> counter) {
        for (Map.Entry<? extends T,Double> e : counter) {
            T t = e.getKey();
            Double cur = counts.get(t);
            counts.put(t, (cur == null) ? e.getValue() : cur + e.getValue());
        }
    }
1244126
function (store, type/*, record*/) {
    var key, counters;
    key = dasherize(this._parseModelOrType(store, type).typeKey);
    counters = this.get('_generatedCounterId');
    if (!counters[key]) {
      counters[key] = 1;
    }
    return 'fixture-' + key + '-' + (counters[key]++);
  }
783247
def counter(name, desc)
      return @registry.counter(name, desc)
    rescue Prometheus::Client::Registry::AlreadyRegisteredError
      return @registry.get(name)
    end
1138711
def with_added_dimensions(self, n):
        
        if n > 0:
            return Rect(np.pad(self.data, ((0, 0), (0, n)), 'constant'))
        return Rect(self.data[:, :self.dimensions + n])
85572
def count_calls_with_dims(**dims):
    
    def counter_wrapper(fn):
        @functools.wraps(fn)
        def fn_wrapper(*args, **kwargs):
            counter("%s_calls" %
                    pyformance.registry.get_qualname(fn), **dims).inc()
            return fn(*args, **kwargs)
        return fn_wrapper
    return counter_wrapper
790957
public void add(Counter<? extends T> counter) {
        for (Map.Entry<? extends T,Integer> e : counter) {
            T t = e.getKey();
            Integer cur = counts.get(t);
            counts.put(t, (cur == null) ? e.getValue() : cur + e.getValue());
        }
    }
813086
def _add_width_of(self, other_tc):
        
        if self.width and other_tc.width:
            self.width += other_tc.width
1018810
def _add_referencer(registry):
    
    referencer = registry.queryUtility(IReferencer)
    if referencer is not None:
        return referencer
    ref = registry.settings['urireferencer.referencer']
    url = registry.settings['urireferencer.registry_url']
    r = DottedNameResolver()
    registry.registerUtility(r.resolve(ref)(url), IReferencer)
    return registry.queryUtility(IReferencer)