combineWithHeader
977584
protected function ( $cells ) {

		if( $header = $this->getHeader() ) {

			if( count($header) == count($cells) ) {

				return array_combine($header, $cells);
			}
			else {

				throw new \Exception('Bad number of arguments, CSV line '.$this->index.'. '.count($header).','.count($cells), 1);
			}
		}
	}
594856
function formatUsageHeader(headerContent) {
  var headerString =  headerContent instanceof Array ?
    headerContent.join(EOL) :
    headerContent;

  return headerString + EOL;
}
1348941
public RequestHeader withMethod(Method method) {
        return new RequestHeader(method, uri, protocol, acceptedResponseProtocols, principal, headers, lowercaseHeaders);
    }
105619
def _bg_combine(self, bgs):
        """"""
        out = np.ones(self.h5["raw"].shape, dtype=float)
        # bg is an h5py.DataSet
        for bg in bgs:
            out *= bg[:]
        return out
587753
private void appendHeaders(OutputStream outputStream,
            InternetHeaders internetHeaders) {
        try {
            // Headers
            @SuppressWarnings("unchecked")
            Enumeration<Header> headers = internetHeaders.getAllHeaders();
            while (headers.hasMoreElements()) {
                Header header = headers.nextElement();
                String headerLine = String.format("%s: %s\r\n",
                        header.getName(), header.getValue());
                outputStream.write(headerLine.getBytes("UTF-8"));
            }

            // Empty line
            outputStream.write("\r\n".getBytes("UTF-8"));
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
881501
public void combine(WSStatistic otherStat) {
        if (!validate(otherStat))
            return;

        CountStatisticImpl other = (CountStatisticImpl) otherStat;
        count += other.count;

        // Compare lastSampleTime
        if (other.lastSampleTime > lastSampleTime)
            lastSampleTime = other.lastSampleTime;
    }
166381
function serializeHeaders(mHeaders) {
		var sHeaderName,
			aHeaders = [];

		for (sHeaderName in mHeaders) {
			aHeaders = aHeaders.concat(sHeaderName, ":", mHeaders[sHeaderName], "\r\n");
		}

		return aHeaders;
	}
694319
def merge_headers(event):
    
    headers = event.get('headers') or {}
    multi_headers = (event.get('multiValueHeaders') or {}).copy()
    for h in set(headers.keys()):
        if h not in multi_headers:
            multi_headers[h] = [headers[h]]
    for h in multi_headers.keys():
        multi_headers[h] = ', '.join(multi_headers[h])
    return multi_headers
582519
public void addHeader( String name, String value )
    {
        headers.add( new BasicHeader( name, value ) );
    }
589545
function mergeAllowedClientHeaders({ headers, request }) {
  const prohibited = ['accept-encoding', 'connection', 'host', 'origin']
  request.headers = Object.entries(headers).reduce((memo, header) => {
    const [key, val] = header
    if (prohibited.indexOf(key) === -1) memo[key] = val // eslint-disable-line
    return memo
  }, request.headers)
  return request
}
1176109
private static Properties mergeExtraHeaders(File baseDir, Properties properties) throws IOException {
        File extra = new File(baseDir, EXTRA_HEADERS_FILE);
        return Instructions.merge(properties, extra);
    }
676975
def add_header(self, name, value):
        '''
        '''
        if self.headers is None:
            self.headers = []
        self.headers.append(dict(Name=name, Value=value))
793644
protected function combineHeader(Iterator $iterator, array $header): Iterator
    {
        if ([] === $header) {
            return $iterator;
        }

        $field_count = count($header);
        $mapper = static function (array $record) use ($header, $field_count): array {
            if (count($record) != $field_count) {
                $record = array_slice(array_pad($record, $field_count, null), 0, $field_count);
            }

            return array_combine($header, $record);
        };

        return new MapIterator($iterator, $mapper);
    }
529933
public TDHttpClient withHeaders(Multimap<String, String> headers)
    {
        Multimap<String, String> mergedHeaders = ImmutableMultimap.<String, String>builder()
                .putAll(this.headers)
                .putAll(headers)
                .build();
        return new TDHttpClient(config, httpClient, objectMapper, mergedHeaders);
    }
562996
public void mergeHeader(InputStream is) throws java.io.IOException {
        if (is == null)
            return;
        char s[] = new char[10];
        int firstc = is.read();
        while (firstc != '\n' && firstc != '\r' && firstc >= 0) {
            int len = 0;
            int keyend = -1;
            int c;
            boolean inKey = firstc > ' ';
            s[len++] = (char) firstc;
    parseloop:{
                while ((c = is.read()) >= 0) {
                    switch (c) {
                      case ':':
                        if (inKey && len > 0)
                            keyend = len;
                        inKey = false;
                        break;
                      case '\t':
                        c = ' ';
                      case ' ':
                        inKey = false;
                        break;
                      case '\r':
                      case '\n':
                        firstc = is.read();
                        if (c == '\r' && firstc == '\n') {
                            firstc = is.read();
                            if (firstc == '\r')
                                firstc = is.read();
                        }
                        if (firstc == '\n' || firstc == '\r' || firstc > ' ')
                            break parseloop;
                        /* continuation */
                        c = ' ';
                        break;
                    }
                    if (len >= s.length) {
                        char ns[] = new char[s.length * 2];
                        System.arraycopy(s, 0, ns, 0, len);
                        s = ns;
                    }
                    s[len++] = (char) c;
                }
                firstc = -1;
            }
            while (len > 0 && s[len - 1] <= ' ')
                len--;
            String k;
            if (keyend <= 0) {
                k = null;
                keyend = 0;
            } else {
                k = String.copyValueOf(s, 0, keyend);
                if (keyend < len && s[keyend] == ':')
                    keyend++;
                while (keyend < len && s[keyend] <= ' ')
                    keyend++;
            }
            String v;
            if (keyend >= len)
                v = new String();
            else
                v = String.copyValueOf(s, keyend, len - keyend);
            add(k, v);
        }
    }
1257222
private void setHeaderList(Map<String, List<String>> headers, String name, String value) {

        List<String> values = new ArrayList<String>();
        values.add(SET_HEADER + value);
        headers.put(name, values);
    }
202127
protected void fillHeaders(JSONObject eachRow, List<String> joinFields, ActionType action) {
        if (action == ActionType.FIRST_CUT) {
            baseFieldNames.add("timestamp");
        } 
        if (eachRow != null) {
            if (isJoinType(action)) {
                Set<String> keysCopy = new LinkedHashSet<>(eachRow.keySet());
                keysCopy.removeAll(joinFields);
                baseFieldNames.addAll(keysCopy);
            } else {
                baseFieldNames.addAll(eachRow.keySet());
            }
        }
    }