PRINTING FUNCTIONS
557262
public static String toBinaryString(byte[] b) {
    StringBuilder s = new StringBuilder();
    for (byte by : b) {
      for (int j = 7; j >= 0; j--) {
        if ((by & (1 << j)) > 0) {
          s.append('1');
        } else {
          s.append('0');
        }
      }
      s.append(' ');
    }
    return s.toString();
  }
814598
function print(results) {
  results.map(page => {
    if (page[1] instanceof Error) {
      printHeader('red', page[0])
      console.log(page[1].toString())
    } else {
      page[1].status > 200
        ? printHeader('red', page[0])
        : printHeader('green', page[0])
      printHtml(page[1].data)
    }
  })
}
724881
function (toPrint, indent, indentEnd) {
      if (!indent) {
        indent = '&nbsp;&nbsp;'
      }
      if (!indentEnd) {
        indentEnd = ''
      }
      var s = ''
      var name
      if (toPrint instanceof Object) {
        s = 'Object (\n'
        for (name in toPrint) {
          if (toPrint.hasOwnProperty(name)) {
            s += indent + indent + '[' + name + '] => ' + this.printR(toPrint[name], indent + '&nbsp;&nbsp;', indent + indent)
          }
        }
        s += indentEnd + ')\n'
        return s
      } else if (toPrint instanceof Array) {
        s = 'Array (\n'
        for (name in toPrint) {
          if (toPrint.hasOwnProperty(name)) {
            s += indent + indent + '[' + name + '] => ' + this.printR(toPrint[name], indent + '&nbsp;&nbsp;', indent + indent)
          }
        }
        s += indentEnd + ')\n'
        return s
      } else if (toPrint instanceof Boolean) {
        var bool = 'false'
        if (bool === true) {
          bool = 'true'
        }
        return bool + '\n'
      } else {
        return (toPrint + '\n')
      }
    }
242889
function printMatrix2 (m) {
  const tStr = m.elements.map(formatPrintNumber);
  const matrixString = `
  +-                -+
  | ${tStr[0]}  ${tStr[2]} |
  | ${tStr[1]}  ${tStr[3]} |
  +-                -+`;
  return matrixString;
}
476135
function prettyPrint0(fs, indent) {
    logger.debug('prettyPrint0: ' + fs);
    var result = '';

    if (fs) {
      if (Object.keys(fs.incoming).length > 1) {
        if (fs.printed) {
          // Return the label
          return (fs.getLabel());
        }
        else {
          // Print the label
          result += fs.getLabel() + space;
          indent += fs.getLabel().length + 1;
          // and continue to print the substructure
        }
      }
      // mark the current node as printed
      fs.printed = true;

      if (!Object.keys(fs.features).length) {
        logger.debug('prettyPrint0() ' + fs.type.name);
        result += (debug ? fs.getLabel() : '');
        if (fs.type === signature.typeLattice.string) {
          // Print the lexical string
          result += '\"' + fs.lexicalString + '\"';
        }
        else {
          if (fs.type === signature.typeLattice.list) {
            // Distinguish ordinary references from list of references
            if (fs.listOfCrossRefs) {
              // Print the list of cross references
              result += '<';
              fs.listOfCrossRefs.forEach(function (ref) {
                if (ref.printed) {
                  result += ref.getLabel() + ', ';
                }
                else { // Print the referred fs
                  result += prettyPrint0(ref, indent + 1) + ',\n';
                }
              });
              // Remove the last comma plus space, if necessary
              if (fs.listOfCrossRefs.length) {
                result = result.substr(0, result.length - 2);
              }
              result += '>';
            }
            else {
              // Print the type
              result += fs.type.prettyPrint();
            }
          }
          else {
            if (fs.type === signature.typeLattice.concatlist) {
              // Print concatenation of lists of cross referenced nodes
              if (fs.listOfCrossRefs) {
                result += '<';
                var nrPrinted = 0;
                fs.listOfCrossRefs.forEach(function (ref) {
                  if (ref.printed) {
                    result += ref.getLabel() + ' + ';
                  }
                  else {
                    result += prettyPrint0(ref, indent + 1) + ' +\n';
                  }
                  nrPrinted++;
                });
                // Remove the last comma plus space, if one or more elements
                // were printed
                if (nrPrinted) {
                  result = result.substr(0, result.length - 3);
                }
                result += '>';
              }
              else {
                // Print the type
                result += fs.type.prettyPrint();
              }
            }
            else {
              // Print the type
              result += fs.type.prettyPrint();
            }
          }
        }
      }
      else {
        // Print the substructure
        result += '[' + (debug ? fs.getLabel() : '');
        Object.keys(fs.features).forEach(function (feature, index) {
          if (index === 0) {
            // first print the type of the substructure
            logger.debug('prettyPrint0(): ' + fs.type.name);
            result += fs.type.prettyPrint() + '\n'; // + ' (incoming: ' +' +
            //' Object.keys(fs.incoming).length + ')' + '\n';
            result += space.repeat(indent + 1);
            result += feature + ':' + space;
            result += prettyPrint0(fs.features[feature], indent + feature.length + 3) + '\n';
          }
          else {
            result += space.repeat(indent + 1) + feature + ':' + space;
            result += prettyPrint0(fs.features[feature], indent + feature.length + 3) + '\n';
          }
        });
        result += space.repeat(indent) + ']';
      }
    }
    else {
      result += 'WARNING: empty fs\n';
    }
    return (result);
  }
805593
def print_cols(words, print_func, termwidth=79):
    
    width = max([word_len(word) for word in words])
    nwords = len(words)
    ncols = max(1, (termwidth + 1) // (width + 1))
    nrows = (nwords + ncols - 1) // ncols
    for row in range(nrows):
        for i in range(row, nwords, nrows):
            word = words[i]
            if word[0] == '\x1b':
                print_func('%-*s' % (width + 11, words[i]),
                           end='\n' if i + nrows >= nwords else ' ')
            else:
                print_func('%-*s' % (width, words[i]),
                           end='\n' if i + nrows >= nwords else ' ')
409009
def pretty_print(x, numchars):
    
    s = maybe_truncate(x, numchars)
    return s + ' ' * max(numchars - len(s), 0)
775710
function print (msgArray) {
    var i
    for (i = 0; i < msgArray.length; i += 1) {
      console.log(msgArray[i])
    }
  }
1310827
def print(self, *objects, **kwargs):
		""""""
		file = kwargs.get("file")

		if file is not None and file is not sys.stdout:
			PRINT(*objects, **kwargs)

		else:
			sep = STR(kwargs.get("sep", " "))
			end = STR(kwargs.get("end", "\n"))

			text = sep.join(STR(o) for o in objects)

			self.imp_print(text, end)

		for callback in self.listeners:
			callback(text)
1304890
def main():
    
    t, kf, t0, major, minor, prod, beta = sympy.symbols(
        't k_f t0 Y Z X beta', negative=False)
    for f in funcs:
        args = [t, kf, prod, major, minor]
        if f in (pseudo_rev, binary_rev):
            args.insert(2, kf/beta)
        expr = f(*args, backend='sympy')
        with open(f.__name__ + '.png', 'wb') as ofh:
            sympy.printing.preview(expr, output='png', filename='out.png',
                                   viewer='BytesIO', outputbuffer=ofh)
        with open(f.__name__ + '_diff.png', 'wb') as ofh:
            sympy.printing.preview(expr.diff(t).subs({t0: 0}).simplify(),
                                   output='png', filename='out.png',
                                   viewer='BytesIO', outputbuffer=ofh)
1133157
function printNodes(node, indent) {
            indent = indent || 0;

            // This is hacky, but this is just a debugging function anyway
            function print(str, indent, inline) {
                var lines = str.split("\n");

                for (var i = 0; i < lines.length; i++) {
                    if (lines[i]) {
                        if ((inline && i > 0) || !inline) {
                            for (var j = 0; j < indent; j++) {
                                util.print(" ");
                            }
                        }
                    }

                    if (i === lines.length - 1) {
                        util.print(lines[i]);
                    } else {
                        util.puts(lines[i]);
                    }
                }
            }

            print(node.typename + ": ", indent);

            if (node instanceof NodeList) {
                print('\n');
                lib.each(node.children, function(n) {
                    printNodes(n, indent + 2);
                });
            } else if (node instanceof CallExtension) {
                print(node.extName + '.' + node.prop);
                print('\n');

                if (node.args) {
                    printNodes(node.args, indent + 2);
                }

                if (node.contentArgs) {
                    lib.each(node.contentArgs, function(n) {
                        printNodes(n, indent + 2);
                    });
                }
            } else {
                var nodes = null;
                var props = null;

                node.iterFields(function(val, field) {
                    if (val instanceof Node) {
                        nodes = nodes || {};
                        nodes[field] = val;
                    } else {
                        props = props || {};
                        props[field] = val;
                    }
                });

                if (props) {
                    print(util.inspect(props, true, null) + '\n', null, true);
                } else {
                    print('\n');
                }

                if (nodes) {
                    for (var k in nodes) {
                        printNodes(nodes[k], indent + 2);
                    }
                }

            }
        }
1300265
public void print()
    {
        for (int c = 0; c < nCols; ++c) {
            System.out.print("  " + values[0][c]);
        }
        System.out.println();
    }
1203518
def on_print(self, node):    # ('dest', 'values', 'nl')
        
        dest = self.run(node.dest) or self.writer
        end = ''
        if node.nl:
            end = '\n'
        out = [self.run(tnode) for tnode in node.values]
        if out and len(self.error) == 0:
            self._printer(*out, file=dest, end=end)
643971
def dbg_print(self, indent=0):
        
        lst = []
        more_data = False
        for i, addr in enumerate(self.mem.keys()):
            lst.append(addr)
            if i >= 20:
                more_data = True
                break

        for addr in sorted(lst):
            data = self.mem[addr]
            if isinstance(data, SimMemoryObject):
                memobj = data
                print("%s%xh: (%s)[%d]" % (" " * indent, addr, memobj, addr - memobj.base))
            else:
                print("%s%xh: <default data>" % (" " * indent, addr))
        if more_data:
            print("%s..." % (" " * indent))
430783
function printStats() {
  _.each(statsTracker, function(vals, stat) {
    var numStats = vals.length;
    var total = _.reduce(vals, function(memo, num) {
      return memo + num;
    }, 0);
    var avg = parseFloat(total / numStats).toFixed(4) + 'ms';
    var printableTotal = parseFloat(total).toFixed(4) + 'ms';
    logger.log(stat + ': ' + avg + ' (' + printableTotal + ' / ' + numStats + ')');
  });
  statsTracker = {};
}
826022
def print_declarations(
        decls,
        detailed=True,
        recursive=True,
        writer=lambda x: sys.stdout.write(x + os.linesep),
        verbose=True):
    
    prn = decl_printer_t(0, detailed, recursive, writer, verbose=verbose)
    if not isinstance(decls, list):
        decls = [decls]
    for d in decls:
        prn.level = 0
        prn.instance = d
        algorithm.apply_visitor(prn, d)
764276
def _print_result_info(traces, events):
    
    print_v('Returning %i traces:'%len(traces))
    for r in sorted(traces.keys()):
        x = traces[r]
        print_v('  %s (%s): %s -> %s (min: %s, max: %s, len: %i)'%(r, type(x), x[0],x[-1],min(x),max(x),len(x)))
    print_v('Returning %i events:'%len(events))
    for r in sorted(events.keys()):
        x = events[r]
        print_v('  %s: %s -> %s (len: %i)'%(r, x[0] if len(x)>0 else '-',x[-1] if len(x)>0 else '-',len(x)))