For a user defined section def a header field is present
        which should not be printed as such, so we comment it in the
        output.
188435
def do_header(self, node):
        """"""
        data = self.extract_text(node)
        self.add_text('\n/*\n %s \n*/\n' % data)
        # If our immediate sibling is a 'description' node then we
        # should comment that out also and remove it from the parent
        # node's children.
        parent = node.parentNode
        idx = parent.childNodes.index(node)
        if len(parent.childNodes) >= idx + 2:
            nd = parent.childNodes[idx + 2]
            if nd.nodeName == 'description':
                nd = parent.removeChild(nd)
                self.add_text('\n/*')
                self.subnode_parse(nd)
                self.add_text('\n*/\n')
1018216
def write_header(self):
        

        self.output.seek(0)
        self.output.write(struct.pack('!HHHHHH', self.id, self.flags,
                                      self.counts[0], self.counts[1],
                                      self.counts[2], self.counts[3]))
        self.output.seek(0, 2)
708539
def showDosHeaderData(peInstance):
    
    
    dosFields = peInstance.dosHeader.getFields()
    print "[+] IMAGE_DOS_HEADER values:\n"
    for field in dosFields:
        if isinstance(dosFields[field],  datatypes.Array):
            print "--> %s - Array of length %d" % (field,  len(dosFields[field]))
            counter = 0
            for element in dosFields[field]:
                print "[%d] 0x%08x" % (counter,  element.value)
                counter += 1
        else:
            print "--> %s = 0x%08x" % (field,  dosFields[field].value)
1193446
private static Message generateHeader(HeaderValues param) {

        HeaderFields header = new HeaderFields();
        setValues(header, param);

        Message headerMsg = header.unwrap();

        for (String comment : param.comments) {
            headerMsg.addComment(comment);
        }

        return headerMsg;
    }
1228254
public void writeDownloadSpreadsheetHeader(List<TemplateTokenInfo> variableTokenNames) {
        StringBuilder headerBuilder = new StringBuilder();
        headerBuilder.append(UPLOAD_COMMENTS);
        headerBuilder.append("\n");
        for (TemplateTokenInfo tokenInfo : variableTokenNames) {
            if (tokenInfo.getName().equals(TemplateProcessorConstants.COMMENTS_TOKEN)) {
                headerBuilder.append("#The field '" + tokenInfo.getDisplayName() +
                        "' allows return characters. To add return characters add '<br>'; e.g. line1<br>line2");
                headerBuilder.append("\n");
            }
        }
        headerBuilder.append(HEADER_TOKEN);
        headerBuilder.append(UPLOAD_DELIMITER);

        for (TemplateTokenInfo variable : variableTokenNames) {
            headerBuilder.append(variable.getDisplayName());
            headerBuilder.append(UPLOAD_DELIMITER);
        }

        String headerLine = headerBuilder.toString();
        headerLine = headerLine.substring(0, headerLine.length() - 1);//get rid of trailing delimiter

        this.lineWriter.println(headerLine);
    }
190149
def compile_header_pattern(comments)
        re = comments.map { |c|
          case c
          when String
            "(?:#{Regexp.escape(c)}.*\\n?)+"
          when Array
            "(?:#{Regexp.escape(c[0])}(?m:.*?)#{Regexp.escape(c[1])})"
          else
            raise TypeError, "unknown comment type: #{c.class}"
          end
        }.join("|")
        Regexp.compile("\\A(?:(?m:\\s*)(?:#{re}))+")
      end
237082
def commented(self, user):
        
        for comment in self.comments:
            # Description (comment #0) is not considered as a comment
            if comment["count"] == 0:
                continue
            if (comment.get('author', comment.get('creator')) == user.email and
                    comment["creation_time"] >= self.options.since.date and
                    comment["creation_time"] < self.options.until.date):
                return True
        return False
115085
def add_comment(self, body, allow_create=False, allow_hashes=False,
                    summary=None):
        ""

        if allow_hashes:
            raise ValueError('allow_hashes not implemented for %s yet' % (
                self.__class__.__name__))
        if self.thread_id is None:
            self.thread_id = self.lookup_thread_id()
        if not os.path.exists(self.thread_id):
            if not allow_create:
                raise KeyError(self.topic)
            with open(self.thread_id, 'a', newline='') as fdesc:
                csv.writer(fdesc).writerow(self.header)

        with open(self.thread_id, 'a', newline='') as fdesc:
            writer = csv.writer(fdesc)
            writer.writerow([self.user, datetime.datetime.utcnow(), summary,
                             body, ''])
1255079
private function enrichHeaderWithFields(
        array &$headers,
        string $section,
        array $fields
    ) {
        foreach ($fields as $fieldName => $_) {
            if (!in_array($fieldName, $headers[$section])) {
                $headers[$section][] = $fieldName;
            }
        }
    }
2912
def _do_comment(self, node):
        '''
        '''
        if not _in_subset(self.subset, node): return
        if self.comments:
            W = self.write
            if self.documentOrder == _GreaterElement: W('\n')
            W('<!--')
            W(node.data)
            W('-->')
            if self.documentOrder == _LesserElement: W('\n')
73892
def section(self, section):
        
        # check if the named section exists
        if self.config.has_section(section):
            return (True, self.config.items(section))
        return (False, 'Section: ' + section + ' does not exist')
818808
Rule FieldUserdefPrint() {
		return Sequence(String("U:"),
				ZeroOrMore(WSP()).suppressNode(),
				Userdef(), HeaderEol()).label(FieldUserdefPrint);
	}
596648
def WriteHeader(self):
    """"""
    output_text = self._field_delimiter.join(self._fields)
    output_text = '{0:s}\n'.format(output_text)
    self._output_writer.Write(output_text)
1371991
def _add_definition(self):
        """"""
        header_part, rId = self._document_part.add_header_part()
        self._sectPr.add_headerReference(self._hdrftr_index, rId)
        return header_part
541262
private int
sectionToWire(DNSOutput out, int section, Compression c,
	      int maxLength)
{
	int n = sections[section].size();
	int pos = out.current();
	int rendered = 0;
	Record lastrec = null;

	for (int i = 0; i < n; i++) {
		Record rec = (Record)sections[section].get(i);
		if (lastrec != null && !sameSet(rec, lastrec)) {
			pos = out.current();
			rendered = i;
		}
		lastrec = rec;
		rec.toWire(out, section, c);
		if (out.current() > maxLength) {
			out.jump(pos);
			return n - rendered;
		}
	}
	return 0;
}
598919
public void printHeader(PrintWriter pw)
   {
      pw.print(description);
      pw.print("-Min,");
      pw.print(description);
      pw.print("-Max,");
      pw.print(description);
      pw.print("-Total,");
      pw.print(description);
      pw.print("-Avg,");
      pw.print(description);
      pw.print("-Times");
   }
636649
def header(self):
        '''
        

        '''
        lines = ['element %s %d' % (self.name, self.count)]

        # Some information is lost here, since all comments are placed
        # between the 'element' line and the first property definition.
        for c in self.comments:
            lines.append('comment ' + c)

        lines.extend(list(map(str, self.properties)))

        return '\n'.join(lines)