Concat takes in an array of audio files (same format) and concatenate them.
557117
def concat(options={})
      output_format = options[:output_format] ? options[:output_format] : "wav"
      dst = Tempfile.new(["out", ".#{output_format}"])
      files = get_array(@file)
      begin
        parameters = files.dup
        parameters << ":dest"
        parameters = parameters.flatten.compact.join(" ").strip.squeeze(" ")
        success = Cocaine::CommandLine.new("sox", parameters).run(:dest => get_path(dst))
      rescue => e
        raise AudioHeroError, "There was an error joining #{@file}"
      end
      # no garbage collect option for join
      dst
    end
469619
function _concat(buffOne, buffTwo) {
  if (!buffOne) return buffTwo;
  if (!buffTwo) return buffOne;

  let newLength = buffOne.length + buffTwo.length;
  return Buffer.concat([buffOne, buffTwo], newLength);
}
621118
public static byte[] combine(final Collection<byte[]> arrays) {
        int length = 0;
        for (final byte[] array : arrays) {
            length += array.length;
        }
        final byte[] joinedArray = new byte[length];
        
        int position = 0;
        for (final byte[] array : arrays) {
            System.arraycopy(array, 0, joinedArray, position, array.length);
            position += array.length;
        }
        return joinedArray;
    }
756108
public JcString concat(JcString concat) {
		JcString ret = new JcString(concat, this, OPERATOR.String.CONCAT);
		QueryRecorder.recordInvocationConditional(this, "concat", ret, QueryRecorder.placeHolder(concat));
		return ret;
	}
1019606
function combine(a) {
  const fn = function(n, src, got, all) {
    if (n === 0) {
      all.push(got);
      return;
    }

    for (let j = 0; j < src.length; j++) {
      fn(n - 1, src.slice(j + 1), got.concat([src[j]]), all);
    }
  };

  const all = [a];

  for (let i = 0; i < a.length; i++) {
    fn(i, a, [], all);
  }

  all.splice(1, 1); // Remove the empty array

  return all;
}
1370640
public static String join(String[] array, String delimiter) {
        if (empty(array)) { return ""; }
        StringBuilder sb = new StringBuilder();
        join(sb, array, delimiter);
        return sb.toString();
    }
1277325
function insert(arr, index, values) {
  [].splice.apply(arr, [index, 0].concat(values));
}
604904
function flatten(array) {
        return array.reduce(function (a, b) {
            return isArray(b) ? a.concat(flatten(b)) : a.concat(b);
        }, []);
    }
1191782
public static String concatStringWithDelimiter(String[] strings, String delimiter) {
        StringBuilder sbr = new StringBuilder();
        int size = strings.length;
        for (int i = 0; i < size - 1; i++) {
            sbr.append(strings[i]).append(delimiter);
        }
        sbr.append(strings[size - 1]);
        return sbr.toString();
    }
279401
function(arr, i) {
			var ret = arr.slice(0);
			for (var j = 0; j < i; j++) {
				ret = [ret[ret.length - 1]].concat(ret.slice(0, ret.length - 1));
			}
			return ret;
		}
949238
public static BinaryString concat(Iterable<BinaryString> inputs) {
		// Compute the total length of the result.
		int totalLength = 0;
		for (BinaryString input : inputs) {
			if (input != null) {
				input.ensureMaterialized();
				totalLength += input.getSizeInBytes();
			}
		}

		// Allocate a new byte array, and copy the inputs one by one into it.
		final byte[] result = new byte[totalLength];
		int offset = 0;
		for (BinaryString input : inputs) {
			if (input != null) {
				int len = input.sizeInBytes;
				SegmentsUtil.copyToBytes(input.segments, input.offset, result, offset, len);
				offset += len;
			}
		}
		return fromBytes(result);
	}
944712
def concat(*records)
      load_target
      flatten_records = records.flatten
      flatten_records.each { |val| raise_on_type_mismatch!(val) }
      target_ids = reflection.options[:target_ids]
      owner[target_ids] ||= []
      owner[target_ids].concat(flatten_records.map(&:id))

      flatten_records.each do |record|
        if index = @target.index(record)
          @target[index] = record
        else
          @target << record
        end
      end

      target
    end
864853
public static int[] ConcatenateInt(List<int[]> arrays) {

        int size = 0;
        for (int i = 0; i < arrays.size(); i++) {
            size += arrays.get(i).length;
        }

        int[] all = new int[size];
        int idx = 0;

        for (int i = 0; i < arrays.size(); i++) {
            int[] v = arrays.get(i);
            for (int j = 0; j < v.length; j++) {
                all[idx++] = v[i];
            }
        }

        return all;
    }
723197
function mergeArrays(objValue, srcValue) {
  if (isArray(objValue) && isArray(srcValue)) {
    return objValue.concat(srcValue)
  }
}
928946
protected static function concat( /*varags*/ ) {
		$args = [];
		foreach ( func_get_args() as $arg ) {
			if ( is_array( $arg ) ) {
				$args = array_merge( $args, $arg );
			} else {
				$args[] = $arg;
			}
		}

		return implode( ' ', $args );
	}
1116664
private static String js_concat(String target, Object[] args) {
        int N = args.length;
        if (N == 0) { return target; }
        else if (N == 1) {
            String arg = ScriptRuntime.toString(args[0]);
            return target.concat(arg);
        }

        // Find total capacity for the final string to avoid unnecessary
        // re-allocations in StringBuilder
        int size = target.length();
        String[] argsAsStrings = new String[N];
        for (int i = 0; i != N; ++i) {
            String s = ScriptRuntime.toString(args[i]);
            argsAsStrings[i] = s;
            size += s.length();
        }

        StringBuilder result = new StringBuilder(size);
        result.append(target);
        for (int i = 0; i != N; ++i) {
            result.append(argsAsStrings[i]);
        }
        return result.toString();
    }
529662
function mergeArrays (a, b) {
    // if target is array then add b to array otherwise return undefined
    // so normal _.merge will be performed
    return Array.isArray(a) ? a.concat(b) : undefined
}