// PrintLeaf prints the data for a leaf page.
338055
func (cmd *PageCommand) PrintLeaf(w io.Writer, buf []byte) error {
	p := (*page)(unsafe.Pointer(&buf[0]))

	// Print number of items.
	fmt.Fprintf(w, "Item Count: %d\n", p.count)
	fmt.Fprintf(w, "\n")

	// Print each key/value.
	for i := uint16(0); i < p.count; i++ {
		e := p.leafPageElement(i)

		// Format key as string.
		var k string
		if isPrintable(string(e.key())) {
			k = fmt.Sprintf("%q", string(e.key()))
		} else {
			k = fmt.Sprintf("%x", string(e.key()))
		}

		// Format value as string.
		var v string
		if (e.flags & uint32(bucketLeafFlag)) != 0 {
			b := (*bucket)(unsafe.Pointer(&e.value()[0]))
			v = fmt.Sprintf("<pgid=%d,seq=%d>", b.root, b.sequence)
		} else if isPrintable(string(e.value())) {
			v = fmt.Sprintf("%q", string(e.value()))
		} else {
			v = fmt.Sprintf("%x", string(e.value()))
		}

		fmt.Fprintf(w, "%s: %s\n", k, v)
	}
	fmt.Fprintf(w, "\n")
	return nil
}
503396
func (w *Wrapper) PrintColor(ctx *ansiterm.Context, value interface{}) {
	if ctx != nil {
		ctx.Fprintf(w.TabWriter, "%v\t", value)
	} else {
		fmt.Fprintf(w, "%v\t", value)
	}
}
397736
func (p FmtPrinter) Print(logger *Logger, a ...interface{}) {
	b := make([]interface{}, 1)
	b[0] = logger.Color(logger.Name)
	a = append(b, a...)
	fmt.Fprint(os.Stderr, a...)
}
378692
func printTree(w io.Writer, rpt *Report) error {
	const separator = "----------------------------------------------------------+-------------"
	const legend = "      flat  flat%   sum%        cum   cum%   calls calls% + context 	 	 "

	g, err := newGraph(rpt)
	if err != nil {
		return err
	}

	origCount, droppedNodes, _ := g.preprocess(rpt)
	fmt.Fprintln(w, strings.Join(legendDetailLabels(rpt, g, origCount, droppedNodes, 0), "\n"))

	fmt.Fprintln(w, separator)
	fmt.Fprintln(w, legend)
	var flatSum int64

	rx := rpt.options.Symbol
	for _, n := range g.ns {
		name, flat, cum := n.info.prettyName(), n.flat, n.cum

		// Skip any entries that do not match the regexp (for the "peek" command).
		if rx != nil && !rx.MatchString(name) {
			continue
		}

		fmt.Fprintln(w, separator)
		// Print incoming edges.
		inEdges := sortedEdges(n.in)
		inSum := inEdges.sum()
		for _, in := range inEdges {
			fmt.Fprintf(w, "%50s %s |   %s\n", rpt.formatValue(in.weight),
				percentage(in.weight, inSum), in.src.info.prettyName())
		}

		// Print current node.
		flatSum += flat
		fmt.Fprintf(w, "%10s %s %s %10s %s                | %s\n",
			rpt.formatValue(flat),
			percentage(flat, rpt.total),
			percentage(flatSum, rpt.total),
			rpt.formatValue(cum),
			percentage(cum, rpt.total),
			name)

		// Print outgoing edges.
		outEdges := sortedEdges(n.out)
		outSum := outEdges.sum()
		for _, out := range outEdges {
			fmt.Fprintf(w, "%50s %s |   %s\n", rpt.formatValue(out.weight),
				percentage(out.weight, outSum), out.dest.info.prettyName())
		}
	}
	if len(g.ns) > 0 {
		fmt.Fprintln(w, separator)
	}
	return nil
}
328915
func (t *Term) Println(prefix, str string) {
	if !t.dumb {
		terminalColorEscapeCode := fmt.Sprintf(terminalHighlightEscapeCode, t.conf.SourceListLineColor)
		prefix = fmt.Sprintf("%s%s%s", terminalColorEscapeCode, prefix, terminalResetEscapeCode)
	}
	fmt.Fprintf(t.stdout, "%s%s\n", prefix, str)
}
1170523
func (l *Logger) Print(v ...interface{}) {
	l.Fprint(l.flags, LEVEL_PRINT, 2, fmt.Sprint(v...), nil)
}
143383
func (e *Entry) Print() {
	fmt.Printf("DN: %s\n", e.DN)
	for _, attr := range e.Attributes {
		attr.Print()
	}
}
522730
func (h *Histogram) Print(w io.Writer) {
	h.h.RLock()
	defer h.h.RUnlock()
	fmt.Fprintf(w, h.h.String())
}
1363895
func (p *Printer) Println(v interface{}) (int, error) {
	return p.print(v, true)
}
102822
func (p *Printer) Print(vs ...interface{}) {
	for i, v := range vs {
		if i > 0 {
			fmt.Fprint(p.w, " ")
		}
		p.reprValue(map[reflect.Value]bool{}, reflect.ValueOf(v), "")
	}
}
898908
func printHeader(w io.Writer, rpt *Report) {
	fmt.Fprintln(w, `
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Pprof listing</title>`)
	fmt.Fprintln(w, weblistPageCSS)
	fmt.Fprintln(w, weblistPageScript)
	fmt.Fprint(w, "</head>\n<body>\n\n")

	var labels []string
	for _, l := range ProfileLabels(rpt) {
		labels = append(labels, template.HTMLEscapeString(l))
	}

	fmt.Fprintf(w, `<div class="legend">%s<br>Total: %s</div>`,
		strings.Join(labels, "<br>\n"),
		rpt.formatValue(rpt.total),
	)
}
1219190
func (self *Tree) Leaves() []Node {
	if self.Levels == nil {
		return nil
	} else {
		return self.Levels[len(self.Levels)-1]
	}
}
1323876
func PrintDroplet(droplet *Droplet) {
	fmt.Println("ID:", droplet.ID)
	fmt.Println("Name:", droplet.Name)
	fmt.Println("Status:", droplet.Status)
	fmt.Println("Locked:", fmt.Sprintf("%t", droplet.Locked))
	fmt.Println("CreatedAt:", droplet.CreatedAt.Format("2006-01-02 15:04:05"))
	fmt.Println("SizeSlug:", droplet.Size.Slug)
	fmt.Println("Region:", droplet.Region.Name)
	fmt.Println("Image:", droplet.Image.Name)
	for i, ip := range droplet.Networks.V4 {
		fmt.Println(fmt.Sprintf("IP: %d", i+1), ip.IPAddress, ip.Type)
	}
	for i, ip := range droplet.Networks.V6 {
		fmt.Println(fmt.Sprintf("IP: %d", i+1), ip.IPAddress, ip.Type)
	}
}
203801
func (m *ElementWriter) Print(e *Element) string {
	// if we are on the server && is this element marked as removed, if so we skip and return an empty string
	if detect.IsServer() {
		if e.Removed() && !m.allowRemoved {
			return ""
		}
	}

	//if we are dealing with a text type just return the content
	if e.Name() == "text" {
		return m.text.Print(e)
	}

	//collect uid and hash of the element so we can write them along
	hash := &Attribute{"hash", e.Hash()}
	uid := &Attribute{"uid", e.UID()}

	//management attributes
	mido := []*Attribute{hash, uid}

	// if e.Removed() {
	// 	mido = append(mido, &Attribute{"haikuRemoved", ""})
	// }

	//write out the hash and uid as attributes
	hashes := m.attrWriter.Print(mido)

	//write out the elements attributes using the AttrWriter
	attrs := m.attrWriter.Print(e.Attributes())

	//write out the elements inline-styles using the StyleWriter
	style := m.styleWriter.Print(e.Styles())

	var closer string
	var beginbrack string

	if e.AutoClosed() {
		closer = "/>"
	} else {
		beginbrack = ">"
		closer = fmt.Sprintf("</%s>", e.Name())
	}

	var children = []string{}

	for _, ch := range e.Children() {
		// if ch.Name() == "text" {
		// 	children = append(children, m.text.Print(ch))
		// 	continue
		// }
		if ech, ok := ch.(*Element); ok {
			if ech == e {
				continue
			}
			children = append(children, m.Print(ech))
		}
	}

	//lets create the elements markup now
	return strings.Join([]string{
		fmt.Sprintf("<%s", e.Name()),
		hashes,
		attrs,
		fmt.Sprintf(` style="%s"`, style),
		beginbrack,
		e.textContent,
		strings.Join(children, ""),
		closer,
	}, "")
}
430281
func (w *Wrapper) Print(values ...interface{}) {
	for _, v := range values {
		fmt.Fprintf(w, "%v\t", v)
	}
}
23895
func (p *Prog) findChildLeaf() string {
	for {
		if len(p.Child) == 0 {
			return p.Path
		}
		p = p.Child[p.keys()[0]]
	}
}
843358
func (that *JSONNode) print(indentlevel int, indentchar string) {
	switch that.t {
	case TypeValue:
		that.printValue(indentlevel, indentchar)
	case TypeMap:
		that.printMap(indentlevel, indentchar)
	case TypeArray:
		that.printArray(indentlevel, indentchar)
	case TypeUndefined:
		printfindent(indentlevel, indentchar, "Is of Type: TypeUndefined\n")
	}
}