Merge all attributes with &gt;0 attributions buffers. Return the merged attribute of the
specified symbol.
333504
public Attribute merge(List<AgBuffer> copyBuffers, int symbol, Type mergedType) {
        Map<Attribute, Merger> mapping;    // map old attribute to merger objects. null: don't merge.
        List<Merger> mergers;
        Merger merger;
        int i;
        int max;

        mapping = new HashMap<Attribute, Merger>();
        mergers = new ArrayList<Merger>();
        max = copyBuffers.size();
        for (i = 0; i < max; i++) {
            copyBuffers.get(i).createMergers(mergers, mapping, mergedType);
        }
        runMergers(mergers, mapping);
        merger = Merger.forSymbol(mergers, symbol);
        if (merger == null) {
            throw new IllegalStateException();
        }
        return merger.dest;
    }
610060
public boolean merge(ResourceMetadata other) {
        boolean modified = m_metrics.addAll(other.m_metrics);
        if (!modified) {
            modified = !m_attributes.equals(other.m_attributes);
        }
        m_attributes.putAll(other.m_attributes);
        return modified;
    }
173977
function merge(target) {
  for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    sources[_key - 1] = arguments[_key];
  }

  if (!sources.length) return target;
  var source = sources.shift();

  if ((0, _isObject2.default)(target) && (0, _isObject2.default)(source)) {
    for (var key in source) {
      if ((0, _isObject2.default)(source[key])) {
        if (!target[key]) Object.assign(target, _defineProperty({}, key, {}));
        merge(target[key], source[key]);
      } else {
        Object.assign(target, _defineProperty({}, key, source[key]));
      }
    }
  }

  return merge.apply(undefined, [target].concat(sources));
}
829578
function getAttribute(buffer, i, l) {
  for (; i < l; i++) {
    let c = buffer[i];
    // space or /
    if (isSpaceCharacter(c) || c === 0x2F) {
      continue;
    }
    // ">"
    if (c === 0x3E) {
      i++;
      break;
    }
    let name = "";
    let value = "";
    nameLoop:for (; i < l; i++) {
      c = buffer[i];
      // "="
      if (c === 0x3D && name !== "") {
        i++;
        break;
      }
      // space
      if (isSpaceCharacter(c)) {
        for (i++; i < l; i++) {
          c = buffer[i];
          // space
          if (isSpaceCharacter(c)) {
            continue;
          }
          // not "="
          if (c !== 0x3D) {
            return { attr: { name, value }, i };
          }

          i++;
          break nameLoop;
        }
        break;
      }
      // / or >
      if (c === 0x2F || c === 0x3E) {
        return { attr: { name, value }, i };
      }
      // A-Z
      if (c >= 0x41 && c <= 0x5A) {
        name += String.fromCharCode(c + 0x20); // lowercase
      } else {
        name += String.fromCharCode(c);
      }
    }
    c = buffer[i];
    // space
    if (isSpaceCharacter(c)) {
      for (i++; i < l; i++) {
        c = buffer[i];
        // space
        if (isSpaceCharacter(c)) {
          continue;
        } else {
          break;
        }
      }
    }
    // " or '
    if (c === 0x22 || c === 0x27) {
      const quote = c;
      for (i++; i < l; i++) {
        c = buffer[i];

        if (c === quote) {
          i++;
          return { attr: { name, value }, i };
        }

        // A-Z
        if (c >= 0x41 && c <= 0x5A) {
          value += String.fromCharCode(c + 0x20); // lowercase
        } else {
          value += String.fromCharCode(c);
        }
      }
    }

    // >
    if (c === 0x3E) {
      return { attr: { name, value }, i };
    }

    // A-Z
    if (c >= 0x41 && c <= 0x5A) {
      value += String.fromCharCode(c + 0x20); // lowercase
    } else {
      value += String.fromCharCode(c);
    }

    for (i++; i < l; i++) {
      c = buffer[i];

      // space or >
      if (isSpaceCharacter(c) || c === 0x3E) {
        return { attr: { name, value }, i };
      }

      // A-Z
      if (c >= 0x41 && c <= 0x5A) {
        value += String.fromCharCode(c + 0x20); // lowercase
      } else {
        value += String.fromCharCode(c);
      }
    }
  }
  return { i };
}
631616
def merge!(scope)
      @options.merge!(scope.options)

      @attributes += scope.attributes
      @associations.merge!(scope.associations)

      @attributes.uniq!

      self
    end
659013
public function mergeAttr()
    {
        $arrays = func_get_args();
        $result = array();

        foreach ($arrays as $array) {
            $result = $this->mergeRecursive($result, $array);
        }

        return $result;
    }
1326060
private void mergeSymbol(Symbol from, Symbol to) {
    for (Node nodeToMove : from.references.keySet()) {
      if (!nodeToMove.equals(from.getDeclarationNode())) {
        to.defineReferenceAt(nodeToMove);
      }
    }
    removeSymbol(from);
  }
470496
def merge_links_on(attribute, concat_string = ',')
      links_group_by(attribute)
           .select { |key, link_list| links.size > 1 }
           .map do |key, link_list| 
              merge_attributes = Link::ATTRS - [attribute]
              link_list.first
                   .update(Hash[extract_columns(link_list, merge_attributes)
                                .map { |c| c.uniq.join(concat_string) }
                                .collect { |v| [merge_attributes.shift, v] }])
              link_list.shift
              link_list.each { |link| links.delete(link) }
            end
    end
679863
def _collapse_attributes(self, line, header, indexes):
        
        names = []
        vals = []
        pat = re.compile("[\W]+")
        for i in indexes:
            names.append(pat.sub("_", self._clean_header(header[i])))
            vals.append(line[i])
        Attrs = collections.namedtuple('Attrs', names)
        return Attrs(*vals)
900920
def merge(self, obj):
        
        for attribute in dir(obj):
            if '__' in attribute:
                continue
            setattr(self, attribute, getattr(obj, attribute))
49669
async function mergeSignatures(source, dest, attr, checkFn) {
  source = source[attr];
  if (source) {
    if (!dest[attr].length) {
      dest[attr] = source;
    } else {
      await Promise.all(source.map(async function(sourceSig) {
        if (!sourceSig.isExpired() && (!checkFn || await checkFn(sourceSig)) &&
            !dest[attr].some(function(destSig) {
              return util.equalsUint8Array(destSig.signature, sourceSig.signature);
            })) {
          dest[attr].push(sourceSig);
        }
      }));
    }
  }
}
934724
def merge_attrs(list_of_attrs):
    
    result = DEFAULT_ATTRS

    for attr in list_of_attrs:
        result = Attrs(
            color=attr.color or result.color,
            bgcolor=attr.bgcolor or result.bgcolor,
            bold=attr.bold or result.bold,
            underline=attr.underline or result.underline,
            italic=attr.italic or result.italic,
            blink=attr.blink or result.blink,
            reverse=attr.reverse or result.reverse)

    return result
30595
def merge_with(self, other):
        """"""
        result = ValuesAggregation()
        result.total = self.total + other.total
        result.count = self.count + other.count
        result.min = min(self.min, other.min)
        result.max = max(self.max, other.max)
        return result
566719
def _merge_with_defaults(params):
    
    marks_params = [
        tz.merge(default, param) for default, param in
        zip(itertools.repeat(_default_params['marks']), params['marks'])
    ] if 'marks' in params else [_default_params['marks']]

    merged_without_marks = tz.merge_with(
        tz.merge, tz.dissoc(_default_params, 'marks'),
        tz.dissoc(params, 'marks')
    )

    return tz.merge(merged_without_marks, {'marks': marks_params})
1191964
def MergeData(self, merge_data, raw_data=None):
    """"""
    self.FlushCache()
    if raw_data is None:
      raw_data = self.raw_data

    for k, v in iteritems(merge_data):
      # A context clause.
      if isinstance(v, dict) and k not in self.type_infos:
        if k not in self.valid_contexts:
          raise InvalidContextError("Invalid context specified: %s" % k)
        context_data = raw_data.setdefault(k, collections.OrderedDict())
        self.MergeData(v, context_data)

      else:
        # Find the descriptor for this field.
        descriptor = self.type_infos.get(k)
        if descriptor is None:
          msg = ("Missing config definition for %s. This option is likely "
                 "deprecated or renamed. Check the release notes." % k)
          if flags.FLAGS.disallow_missing_config_definitions:
            raise MissingConfigDefinitionError(msg)

        if isinstance(v, string_types):
          v = v.strip()

        # If we are already initialized and someone tries to modify a constant
        # value (e.g. via Set()), break loudly.
        if self.initialized and k in self.constants:
          raise ConstModificationError(
              "Attempting to modify constant value %s" % k)

        raw_data[k] = v
946337
function merge(target, source) {
  // Check if font name is changed
  if (source['font-name']) {
    target['font-name'] = source['font-name'];
  }

  // Check if root dir is changed
  if (source['root-dir']) {
    target['root-dir'] = source['root-dir'];
  }

  // Check for icon changes
  if (source.icons) {
    for (let icon of source['icons']) {
      let index = iconsIndex.indexOf(icon.name);

      // Icon is replaced
      if (index !== -1) {
        target.icons[index] = icon;
      }
      // New icon is added
      else {
        target.icons.push(icon);
        iconsIndex.push(icon.name);
      }
    }
  }

  return target;
}
1139706
def mergeValues(self, iterator):
        
        # speedup attribute lookup
        creator, comb = self.agg.createCombiner, self.agg.mergeValue
        c, data, pdata, hfun, batch = 0, self.data, self.pdata, self._partition, self.batch
        limit = self.memory_limit

        for k, v in iterator:
            d = pdata[hfun(k)] if pdata else data
            d[k] = comb(d[k], v) if k in d else creator(v)

            c += 1
            if c >= batch:
                if get_used_memory() >= limit:
                    self._spill()
                    limit = self._next_limit()
                    batch /= 2
                    c = 0
                else:
                    batch *= 1.5

        if get_used_memory() >= limit:
            self._spill()