Concatenate multiple serialized binders into one byte string.
4426
def merge_bytes(binder_strings):
    """"""
    output = None
    for byte_string in binder_strings:
        binder = Binder().from_bytes(byte_string)
        if output is None:
            output = binder
        else:
            output.merge(binder)
    return output.to_bytes()
450564
public static byte[] concat(Bytes... listOfBytes) {
    int offset = 0;
    int size = 0;

    for (Bytes b : listOfBytes) {
      size += b.length() + checkVlen(b.length());
    }

    byte[] data = new byte[size];
    for (Bytes b : listOfBytes) {
      offset = writeVint(data, offset, b.length());
      b.copyTo(0, b.length(), data, offset);
      offset += b.length();
    }
    return data;
  }
803700
def serialize(dictionary):
    

    data = []
    for key, value in dictionary.items():
        data.append('{0}="{1}"'.format(key, value))
    return ', '.join(data)
1342445
private void bindNamespaces(SerializerContext serializerContext) throws IOException
	{
		if (serializerContext.knownNamespaces == null)
		{
			return;
		}

		StringBuilder nsBuilder = new StringBuilder(8);
		int count = 0;

		for (String ns : serializerContext.knownNamespaces)
		{
			int num = count;
			do
			{
				nsBuilder.append(PREFIX_CHARS[num % PREFIX_CHARS.length]);
				num /= PREFIX_CHARS.length;
			} while (num > 0);

			serializerContext.serializer.setPrefix(nsBuilder.toString(), ns);
			nsBuilder.setLength(0);
			++count;
		}
	}
328802
def _generate_union_serializer(self, union):
        """"""
        union_name = fmt_class_prefix(union)

        with self.block_func(
                func='serialize',
                args=fmt_func_args_declaration([('valueObj',
                                                 '{} *'.format(union_name))]),
                return_type='NSDictionary<NSString *, id> *',
                class_func=True):

            if not union.all_fields:
                self.emit('#pragma unused(valueObj)')

            self.emit(
                'NSMutableDictionary *jsonDict = [[NSMutableDictionary alloc] init];'
            )
            self.emit()

            first_block = True
            for field in union.all_fields:
                with self.block('{} ([valueObj is{}])'.format(
                        'if' if first_block else 'else if',
                        fmt_camel_upper(field.name))):
                    data_type, nullable = unwrap_nullable(field.data_type)
                    input_value = 'valueObj.{}'.format(fmt_var(field.name))
                    serialize_call = self._fmt_serialization_call(
                        field.data_type, input_value, True)

                    def emit_serializer():
                        if is_user_defined_type(data_type):
                            if is_struct_type(data_type) and \
                                    not data_type.has_enumerated_subtypes():
                                self.emit('jsonDict = [{} mutableCopy];'.
                                          format(serialize_call))
                            else:
                                self.emit(
                                    'jsonDict[@"{}"] = [{} mutableCopy];'.
                                    format(field.name, serialize_call))
                        elif is_primitive_type(data_type):
                            self.emit('jsonDict[@"{}"] = {};'.format(
                                field.name, input_value))
                        else:
                            self.emit('jsonDict[@"{}"] = {};'.format(
                                field.name, serialize_call))

                    if not is_void_type(data_type):
                        if not nullable:
                            emit_serializer()
                        else:
                            with self.block('if (valueObj.{})'.format(
                                    fmt_var(field.name))):
                                emit_serializer()

                    self.emit('jsonDict[@".tag"] = @"{}";'.format(field.name))

                if first_block:
                    first_block = False

            with self.block('else'):
                if not union.closed:
                    self.emit('jsonDict[@".tag"] = @"other";')
                else:
                    self._generate_throw_error(
                        'InvalidTag',
                        '@"Object not properly initialized. Tag has an unknown value."'
                    )

            self.emit()
            self.emit('return [jsonDict count] > 0 ? jsonDict : nil;')

        self.emit()
639088
def write_bytes(self, data, n):
        """"""
        for pos in xrange(0, n):
            self.payload[self.pos + pos] = data[pos]
            
        self.pos += n
251986
def concat(self, formatted_text):
        """"""
        assert self._is_compatible(formatted_text), "Cannot concat text with different modes"
        self.text += formatted_text.text
        return self
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);
	}
1279375
def concat_namedtuples(*tup, **kwargs):
    '''
    
    '''
    name = kwargs['name'] if 'name' in kwargs else None

    # filter out empty elements
    filtered = [i for i in filter(None, tup)]
    if filtered:
        if len(filtered) == 1:
            return filtered[0]
        else:
            fields = chain(*(t._fields for t in filtered))
            values = chain(*(t for t in filtered))
            if not name:
                name = 'SDMXNamedTuple'
            ConcatType = namedtuple_factory(name, fields)
            return ConcatType(*values)
    else:
        return ()
9960
public void serializeMerge(QueryMetadata metadata, RelationalPath<?> entity,
            List<Path<?>> keys, List<Path<?>> columns, List<Expression<?>> values,
            SubQueryExpression<?> subQuery, SQLSerializer context) {
        context.serializeForMerge(metadata, entity, keys, columns, values, subQuery);

        if (!metadata.getFlags().isEmpty()) {
            context.serialize(Position.END, metadata.getFlags());
        }
    }
1097391
public static StringBinding join(final ObservableList<?> items, final ObservableValue<String> delimiter) {
        return Bindings.createStringBinding(() -> items.stream().map(String::valueOf).collect(Collectors.joining(delimiter.getValue())), items, delimiter);
    }
1029239
private static String toHexString(byte[] bytes) {
        if (bytes.length == 0) {
            return "(empty)";
        }

        StringBuilder sb = new StringBuilder(bytes.length * 3 - 1);
        boolean isInitial = true;
        for (byte b : bytes) {
            if (isInitial) {
                isInitial = false;
            } else {
                sb.append(':');
            }

            int k = b & 0xFF;
            sb.append(HEXES[k >>> 4]);
            sb.append(HEXES[k & 0xF]);
        }

        return sb.toString();
    }
1117444
def concat(self, operand, start=0, end=0, offset=0):
        """"""
        if not Gauged.map_concat(self.ptr, operand.ptr, start, end, offset):
            raise MemoryError
595286
def serialize_operations(self, operations):
        """"""

        serialized_ops = []
        for operation in operations:
            serializer = self.get_serializer_class(operation.__class__)
            serialized_ops.append(serializer(operation).data)
        return serialized_ops
838264
def rewrap_bytes(data):
    '''
    '''
    return b'\n'.join(
        data[index:index+70] for index in range(0, len(data), 70)
    )
679913
public static byte[] join(byte[] a, byte[] b) {
        byte[] result = new byte[a.length + b.length];
        System.arraycopy(a, 0, result, 0, a.length);
        System.arraycopy(b, 0, result, a.length, b.length);
        return result;
    }
44333
public static byte[] join(byte[] separator, byte[]... components) {
    if (components == null || components.length == 0) {
      return Constants.EMPTY_BYTES;
    }

    int finalSize = 0;
    if (separator != null) {
      finalSize = separator.length * (components.length - 1);
    }
    for (byte[] comp : components) {
      finalSize += comp.length;
    }

    byte[] buf = new byte[finalSize];
    int offset = 0;
    for (int i=0; i < components.length; i++) {
      System.arraycopy(components[i], 0, buf, offset, components[i].length);
      offset += components[i].length;
      if (i < (components.length-1) && separator != null && separator.length > 0) {
        System.arraycopy(separator, 0, buf, offset, separator.length);
        offset += separator.length;
      }
    }
    return buf;
  }