Merge the given data either in csv format or as array.

@param array|string $merge
@param boolean $csv
181877
public function mergeWithBinded( $data, $csv = false ) {

		$merge = [];

		if( $csv && strlen( $merge ) > 1 ) {

			$merge = preg_split( '/,/',  $data );
		}

		$this->binded = ArrayHelper::merge( $this->binded, $merge );
	}
213856
protected function mergeAttribute(string $key, $mergeValue)
    {
        $current = $this[$key];

        if ($current instanceof DataObjectInterface && method_exists($current, 'merge')) {

            $class = get_class($current);

            if (is_array($mergeValue)) {
                $mergeValue = new $class($mergeValue);
            }

            // If we have nothing to merge with, don't bother
            if (null === $mergeValue) {
                return;
            }

            $mergeValue = $current->merge($mergeValue);
        }

        if (null === $mergeValue) {
            return;
        }

        $this[$key] = $mergeValue;
    }
968952
public function merge(array $data) : Vector
    {
        $values = $this->_merge($data);
        $this->setValues($values);
        return $this;
    }
25402
public static function merge($base, $merge)
    {
        if (is_string($merge)) {
            $explode = explode('=>', $merge);

            $merge = [
                trim($explode[0]) => trim($explode[1]),
            ];
        }

        return array_merge($base, $merge);
    }
790113
protected static function MergeConfig(&$Data, &$Loaded) {
      foreach ($Loaded as $Key => $Value) {
         if (array_key_exists($Key,$Data) && is_array($Data[$Key]) && is_array($Value)) {
            self::MergeConfig($Data[$Key], $Value);
         } else {
            $Data[$Key] = $Value;
         }
      }
   }
692192
public function rawColumns(array $columns, $merge = false)
    {
        if ($merge) {
            $config = $this->config->get('datatables.columns');

            $this->columnDef['raw'] = array_merge($config['raw'], $columns);
        } else {
            $this->columnDef['raw'] = $columns;
        }

        return $this;
    }
1085546
public function setOptions(array $options, $merge = true)
    {
        $this->options = $merge ? ArrayHelper::merge($this->options, $options) : $options;

        return $this;
    }
1374003
public function mergeAll(array $values)
    {
        foreach ($values as $key => $value) {
            $this->merge($key, $value);
        }
    }
1279430
public function loadFile($filePath, $merge = false)
    {
        if (is_file($filePath)) {
            $confData = require_once $filePath;
            if (is_array($confData) && !empty($confData)) {
                $basename = strtolower(basename($filePath, '.php'));
                if (!$merge) {
                    $this->conf[$basename] = $confData;
                } else {
                    $this->conf = new SplArray(array_merge($this->toArray(), $confData));
                }
            }
        }
    }
511701
def mergecsv(args):
    
    p = OptionParser(mergecsv.__doc__)
    opts, args = p.parse_args(args)

    if len(args) < 1:
        sys.exit(not p.print_help())

    csvfiles = args
    arrays = []
    samplekeys = []
    for csvfile in csvfiles:
        samplekey = op.basename(csvfile).split(".")[0]
        a = np.fromfile(csvfile, sep=",", dtype=np.int32)
        x1 = a[::2]
        x2 = a[1::2]
        a = x1 * 1000 + x2
        a[a < 0] = -1
        arrays.append(a)
        samplekeys.append(samplekey)
        print(samplekey, a, file=sys.stderr)
    print("Merging", file=sys.stderr)
    b = np.concatenate(arrays)
    b.tofile("data.bin")

    fw = open("samples", "w")
    print("\n".join(samplekeys), file=fw)
    fw.close()
349095
public function setMetaData(array $metaData, $merge = true)
    {
        $this->config->setMetaData($metaData, $merge);

        return $this;
    }
377506
public static function array_merge_deep(array $array1, array $array2)
	{
		$merged = $array1;

		foreach ($array2 as $key => $value) {
			if (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) {
				$merged[$key] = self::array_merge_deep($merged[$key], $value);
			} elseif (is_numeric($key)) {
				// Numeric key. Look at values instead of keys to determine if it already exists.
				if (!in_array($value, $merged)) {
					$merged[] = $value;
				}
			} else {
				$merged[$key] = $value;
			}

		}

		return $merged;
	}
1068117
public function setData($data, $key = '', $merge = false)
    {
        if ($key) {
            if ($merge && !empty($this->data[$key])) {
                $this->data[$key] = array_merge($this->data[$key], (array) $data);
            } else {
                $this->data[$key] = $data;
            }
        } else {
            if (is_object($data)) {
                $data = get_object_vars($data);
            }
            if (is_array($data)) {
                $this->data = array_merge($this->data, $data);
            }
        }
    }
1023200
public function setConfig(Config $config, $merge = true)
    {
        if ($this->config && $merge) {
            $this->config->merge($config);
        } else {
            $this->config = $config;
        }
    }
207700
public function setBind($bind, $merge = true)
    {
        $this->_bind = $merge ? array_merge($this->_bind, $bind) : $bind;

        return $this;
    }
1365109
public function merge(/* array($field => $value), ... */)
    {
        $merged = array();

        foreach (func_get_args() as $criteria) {
            if (empty($criteria)) {
                continue;
            }

            $merged['$and'][] = $criteria;
        }

        return (isset($merged['$and']) && count($merged['$and']) === 1)
            ? $merged['$and'][0]
            : $merged;
    }
1062844
public function setVars($data, $merge = true)
    {
        if ($merge) {
            $this->_vars = $data + $this->_vars;
        } else {
            $this->_vars = $data;
        }

        return $this;
    }