Returns a headerfields object (dict) which contains information on
    fields of the header, including optional pool names
431596
def generate_headerfields(headertypes, allfield_defs, poolnames, db=False, genecentric=False):
    """"""
    hfields = {}
    for fieldtype in headertypes:
        if fieldtype == 'isoquant':
            continue
        elif fieldtype == 'proteindata':
            hfield_definitions = allfield_defs[fieldtype](poolnames, genecentric)
        else:
            hfield_definitions = allfield_defs[fieldtype](poolnames)
        hfields[fieldtype] = OrderedDict()
        for fieldname, poolnames in hfield_definitions.items():
            hfields[fieldtype][fieldname] = get_header_field(fieldname,
                                                             poolnames)
    if 'isoquant' in headertypes:
        hfield_definitions = allfield_defs['isoquant'](db, poolnames)
        hfields['isoquant'] = OrderedDict()
        for poolname in poolnames:
            for fieldname in hfield_definitions:
                hfields['isoquant'][fieldname] = get_header_field(
                    fieldname, poolnames)
    return hfields
1184624
@Override
    public Set<HeaderField> getHeaders() {
        HashSet<HeaderField> headerFields = new HashSet<HeaderField>();

        if (_headers.size() > 0) {
            Iterator<String> headerNames = _headers.keySet().iterator();
            while (headerNames.hasNext()) {
                Iterator<HttpHeaderField> headers = _headers.get(headerNames.next()).iterator();
                while (headers.hasNext()) {
                    HttpHeaderField field = headers.next();
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "getHeaders()", "add header name = " + field.getName() + ", value = " + field.asString());
                    }
                    headerFields.add(field);
                }
            }
        }

        return headerFields;
    }
770740
def get_list_header(self):
        
        model = self.object_list.model
        result = []
        if not self.get_fields():
            result.append(
                {"name": "", "verbose": str(model._meta.verbose_name)}
            )
        else:
            prefix = self.get_prefix()
            ordering_fields = self.get_ordering_fields()
            for field_name in self.get_fields():
                item = {}
                if isinstance(field_name, tuple):
                    # custom property that is not a field of the model
                    name = field_name[0]
                    item["label"] = field_name[1]
                else:
                    name = field_name
                    try:
                        field_meta = find_field_meta(model, field_name)
                        if field_meta._verbose_name:  # noqa
                            # explicitly set on the model, so don't change
                            item["label"] = field_meta._verbose_name  # noqa
                        else:
                            # title-case the field name (issue #80)
                            item["label"] = field_meta.verbose_name.title()
                    except FieldDoesNotExist:
                        item["label"] = field_name
                    except AttributeError:
                        item["label"] = field_name
                item["name"] = prefix + name
                if name in ordering_fields:
                    item["order_url"], item[
                        "order_direction"
                    ] = self.ordering_url(name)
                result.append(item)

        return result
217648
def _collect_headers(self):
        
        res = []

        for prop in self.get_sorted_columns():

            main_infos = self._get_prop_infos(prop)

            if self._is_excluded(prop, main_infos):
                continue

            if isinstance(prop, RelationshipProperty):
                main_infos = self._collect_relationship(main_infos, prop, res)

                if not main_infos:
                    # If still no success, we forgot this one
                    print("Maybe there's missing some informations \
about a relationship")
                    continue
            else:
                main_infos = self._merge_many_to_one_field_from_fkey(
                    main_infos, prop, res
                )
                if not main_infos:
                    continue

            if isinstance(main_infos, (list, tuple)):
                # In case _collect_relationship returned a list
                res.extend(main_infos)
            else:
                res.append(main_infos)
        return res
52313
def _extract_fields(self, line):
        
        acc = {}
        field_tokens = line.split("\t")
        for field_token in field_tokens:
            kv_tokens = field_token.split('::')
            if len(kv_tokens) == 2:
                (key, value) = kv_tokens
                acc[key] = value

        return acc
79364
function parseHeaders() {
  var str = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];

  var lines = str.split(/\r?\n/);
  var fields = {};
  var index = undefined;
  var line = undefined;
  var field = undefined;
  var val = undefined;

  lines.pop(); // trailing CRLF

  for (var i = 0, len = lines.length; i < len; i += 1) {
    line = lines[i];
    index = line.indexOf(':');
    field = line.slice(0, index).toLowerCase();
    val = trim(line.slice(index + 1));
    fields[field] = val;
  }

  return fields;
}
1005434
def get_headers(environ):
    
    for key, value in compat.iteritems(environ):
        key = str(key)
        if key.startswith("HTTP_") and key not in ("HTTP_CONTENT_TYPE", "HTTP_CONTENT_LENGTH"):
            yield key[5:].replace("_", "-").lower(), value
        elif key in ("CONTENT_TYPE", "CONTENT_LENGTH"):
            yield key.replace("_", "-").lower(), value
426300
def get_fields(cls):
        
        fields = {}
        for field_name in dir(cls):
            if isinstance(getattr(cls, field_name), Field):
                field = getattr(cls, field_name)
                field_name = field.field_name or field_name
                fields[field_name] = field
        return fields
1235382
def _get_headers(environ):
    # type: (Dict[str, str]) -> Iterator[Tuple[str, str]]
    
    for key, value in environ.items():
        key = str(key)
        if key.startswith("HTTP_") and key not in (
            "HTTP_CONTENT_TYPE",
            "HTTP_CONTENT_LENGTH",
        ):
            yield key[5:].replace("_", "-").title(), value
        elif key in ("CONTENT_TYPE", "CONTENT_LENGTH"):
            yield key.replace("_", "-").title(), value
534485
def _marshall_fields(self):
        
        values = {}
        for key, value in self.fields.items():
            if (isinstance(value, int) or
                    (isinstance(value, str) and value.isdigit() and
                     '.' not in value)):
                values[key] = '{}i'.format(value)
            elif isinstance(value, bool):
                values[key] = self._escape(value)
            elif isinstance(value, float):
                values[key] = '{}'.format(value)
            elif isinstance(value, str):
                values[key] = '"{}"'.format(self._escape(value))
        return ','.join(['{}={}'.format(self._escape(k), v)
                         for k, v in values.items()])
840079
def fields(self):
        ''''''
        out = dict()
        for operator in self.ops:
            out.update(**operator.fields)

        return out
1225834
def to_dict(self, include_readonly=True, field_names=None):
        '''
        
        '''
        fields = self.fields(writable=not include_readonly)

        if field_names is not None:
            fields = [f for f in fields if f in field_names]

        data = self.__dict__
        return {name: data[name] for name in fields}
761803
def get_headers(self):
        """"""

        try:
            return {
                'X-Auth-User': self.job_args['os_user'],
                'X-Auth-Key': self.job_args['os_apikey']
            }
        except KeyError as exp:
            raise exceptions.AuthenticationProblem(
                'Missing Credentials. Error: %s',
                exp
            )
187291
def getheader(self, field, default=''):
        
        if self.headers:
            for header in self.headers:
                if field.lower() == header.lower():
                    return self.headers[header]

        return default
465508
def headers(self):
        
        d = {}
        for k, v in self.message.items():
            d[k] = decode_header_part(v)
        return d
727206
def backend_fields(self, fields):
        ''''''
        dfields = self.dfields
        processed = set()
        names = []
        atts = []
        pkname = self.pkname()
        for name in fields:
            if name == pkname or name in processed:
                continue
            elif name in dfields:
                processed.add(name)
                field = dfields[name]
                names.append(field.name)
                atts.append(field.attname)
            else:
                bname = name.split(JSPLITTER)[0]
                if bname in dfields:
                    field = dfields[bname]
                    if field.type in ('json object', 'related object'):
                        processed.add(name)
                        names.append(name)
                        atts.append(name)
        return names, atts
1024387
def _from_fields(self, fields):
        '''
        

        '''
        return _np.dtype(self.dtype()).type(next(fields))