Prints the given range in a formatted table either in a plain ASCII or HTML.
    The only required argument is the range definition, e.g. "A2s+ A5o+ 55+"
428123
def range_(range, no_border, html):
    
    from .hand import Range

    border = not no_border
    result = Range(range).to_html() if html else Range(range).to_ascii(border)
    click.echo(result)
356374
def _format_output(selected_number, raw_data):
    """"""
    tmp_data = {}
    data = collections.defaultdict(lambda: 0)
    balance = raw_data.pop('balance')
    for number in raw_data.keys():
        tmp_data = dict([(k, int(v) if v is not None else "No limit")
                         for k, v in raw_data[number].items()])
        tmp_data['number'] = number
        if selected_number is None or selected_number == number:
            data[number] = tmp_data

    output = ("""Account Balance
=======

Balance:      {:.2f} $
""")
    print(output.format(balance))
    for number_data in data.values():
        _print_number(number_data)
817550
def _print_ll(self):
        
        print "#  ",
        for i in range(self.width):
            print "  %4d   "%i,
        print
        for L in ['A', 'C', 'T', 'G']:
            print "#%s "%L,
            for i in range(self.width):
                print  "%8.3f "%self.ll[i][L],
            print
874802
def PrintFieldValue(field,
                    value,
                    out,
                    indent=0,
                    as_utf8=False,
                    as_one_line=False,
                    pointy_brackets=False,
                    use_index_order=False,
                    float_format=None):
  """"""
  printer = _Printer(out, indent, as_utf8, as_one_line, pointy_brackets,
                     use_index_order, float_format)
  printer.PrintFieldValue(field, value)
280660
function basic(tag, range) {
  tag = lower(tag)
  range = lower(range)
  return range === asterisk || tag === range || tag.indexOf(range + dash) !== -1
}
267124
def _printClassRange(self, hrlinetop=True, print_inferred=False):
        
        if not self.currentEntity:  # ==> ontology level
            return
        x = self.currentEntity['object']
        if self.currentEntity['type'] == 'class':
            if hrlinetop:
                self._print("----------------")
            self._print("RANGE OF:", "IMPORTANT")
            self._print("[%d] Explicitly declared" % len(x.range_of), "IMPORTANT")
            for i in x.range_of:
                if i.domains:
                    domains = ",".join([y.qname if hasattr(y, "qname") else str(y)
                                        for y in i.domains])
                else:
                    domains = "owl:Thing"
                print(Style.DIM + domains + Style.RESET_ALL + " => " + Fore.MAGENTA + i.qname +
                      Style.RESET_ALL + " => " + Fore.GREEN + x.qname + Style.RESET_ALL)

            # inferred stuff
            if print_inferred:
                for _dict in x.range_of_inferred:
                    _class = list(_dict.items())[0][0]
                    _propslist = list(_dict.items())[0][1]
                    if _class.id != x.id and len(_propslist):  # print only inferred properties
                        self._print("[%d] Inherited from [%s]" % (len(_propslist), _class.qname),
                                    "IMPORTANT")
                        for i in _propslist:
                            if i.domains:
                                domains = ",".join(
                                    [y.qname if hasattr(y, "qname") else str(y) for y in i.domains])
                            else:
                                domains = "owl:Thing"
                            print(Style.DIM + domains + Style.RESET_ALL + " => " + Fore.MAGENTA +
                                  i.qname + Style.RESET_ALL + " => " + Fore.GREEN + x.qname + Style.RESET_ALL)

            self._print("----------------")
        return
526586
def pretty_print_table_instance(table):
    """"""
    assert isinstance(table, Table)

    def pretty_print_row(styled, plain):
        """Pretty print a row."""
        click.secho(
            " | ".join(
                v + " " * (table.column_widths[k] - len(plain[k]))
                for k, v in enumerate(styled)
            )
        )

    pretty_print_row(table.headers, table.plain_headers)
    for k, row in enumerate(table.rows):
        pretty_print_row(row, table.plain_rows[k])
663877
function(value, attr, range, model) {
        if (!_.isString(value) || value.length < range[0] || value.length > range[1]) {
          return this.format(getMessageKey(this.msgKey, defaultMessages.rangeLength), this.formatLabel(attr, model), range[0], range[1]);
        }
      }
1129711
def print_input message, level=:debug
      return if LEVELS.index(level) > LEVELS.index(@@log_level)
      puts format_lhs("", "", "<") + message, :default
    end
118301
def normal_print(raw):
    ''' '''
    lines = raw.split('\n')
    for line in lines:
        if line:
            print(line + '\n')
730306
def print_table(lines, separate_head=True):
	""""""
	#Count the column width
	widths = []
	for line in lines:
			for i,size in enumerate([len(x) for x in line]):
					while i >= len(widths):
							widths.append(0)
					if size > widths[i]:
							widths[i] = size
	   
	#Generate the format string to pad the columns
	print_string = ""
	for i,width in enumerate(widths):
			print_string += "{" + str(i) + ":" + str(width) + "} | "
	if (len(print_string) == 0):
			return
	print_string = print_string[:-3]
	   
	#Print the actual data
	for i,line in enumerate(lines):
			print(print_string.format(*line))
			if (i == 0 and separate_head):
					print("-"*(sum(widths)+3*(len(widths)-1)))
713958
def range(input)
      return auto_range(@match[1] || "+") unless input

      b, e = parse_range(input)
      raise("Invalid line range") unless valid_range?(b, e)

      [b, e]
    end
20287
def printSequence(x, formatString="%d"):
  
  numElements = len(x)
  s = ""
  for j in range(numElements):
    s += formatString % x[j]
  print s
519980
def print_table(table):
    
    table = [[str(cell) for cell in row] for row in table]
    column_widths = [len(cell) for cell in table[0]]
    for row in table:
        for x, cell in enumerate(row):
            column_widths[x] = max(column_widths[x], len(cell))

    formatters = []
    for width in column_widths:
        formatters.append('{:>' + str(width) + '}')
    formatter = '  '.join(formatters)
    for row in table:
        print(formatter.format(*row))
749030
def float_range(value):
    
    try:
        value = float(value)
    except Exception:
        raise argparse.ArgumentTypeError('Invalid float value: \'{}\''.format(value))
    if value < 0.0 or value > 1.0:
        raise argparse.ArgumentTypeError('Invalid float value: \'{}\''.format(value))
    return value
893470
@Override
    public int print(
        ChronoDisplay formattable,
        Appendable buffer,
        AttributeQuery attributes,
        Set<ElementPosition> positions, // optional
        boolean quickPath
    ) throws IOException {

        BigDecimal value = toDecimal(formattable.get(this.element));
        BigDecimal min = toDecimal(formattable.getMinimum(this.element));
        BigDecimal max = toDecimal(formattable.getMaximum(this.element));

        if (value.compareTo(max) > 0) {
            value = max;
        }

        BigDecimal fraction =
            value.subtract(min).divide(
                max.subtract(min).add(BigDecimal.ONE),
                9,
                RoundingMode.FLOOR);

        fraction = (
            (fraction.compareTo(BigDecimal.ZERO) == 0)
            ? BigDecimal.ZERO
            : fraction.stripTrailingZeros()
        );

        char zeroChar = (
            quickPath
                ? this.zeroDigit
                : attributes.get(Attributes.ZERO_DIGIT, Character.valueOf('0')).charValue());

        int start = -1;
        int printed = 0;

        if (buffer instanceof CharSequence) {
            start = ((CharSequence) buffer).length();
        }

        if (fraction.scale() == 0) {
            // scale ist 0, wenn value das Minimum ist
            if (this.minDigits > 0) {
                if (this.hasDecimalSeparator()) {
                    this.decimalSeparator.print(
                        formattable,
                        buffer,
                        attributes,
                        positions,
                        quickPath);
                    printed++;
                }

                for (int i = 0; i < this.minDigits; i++) {
                    buffer.append(zeroChar);
                }

                printed += this.minDigits;
            }
        } else {
            if (this.hasDecimalSeparator()) {
                this.decimalSeparator.print(
                    formattable,
                    buffer,
                    attributes,
                    positions,
                    quickPath);
                printed++;
            }

            int outputScale =
                Math.min(
                    Math.max(fraction.scale(), this.minDigits),
                    this.maxDigits);
            fraction = fraction.setScale(outputScale, RoundingMode.FLOOR);
            String digits = fraction.toPlainString();
            int diff = zeroChar - '0';

            for (int i = 2, n = digits.length(); i < n; i++) {
                char c = (char) (digits.charAt(i) + diff);
                buffer.append(c);
                printed++;
            }
        }

        if (
            (start != -1)
            && (printed > 1)
            && (positions != null)
        ) {
            positions.add( // Zählung ohne Dezimaltrennzeichen
                new ElementPosition(this.element, start + 1, start + printed));
        }

        return printed;

    }
1175015
def to_html(threshold=50)
      html = "<html><table><tr><td></td>"
      html += @labels.map{|label| "<th>" + label.to_s +  "</th>"}.join
      html += "</tr>"
      self.each_row.with_index do |row, pos|
        next if pos > threshold && pos != self.length-1
        html += "<tr><th>" + @index[pos].to_s + "</th>"
        html += @labels.map{|label| "<td>" + row[label].to_s + "</td>"}.join
        html += "</tr>"
        html += "<tr><th>...</th>" + "<td>...</td>"*@labels.length + "</tr>" if pos == threshold
      end
      html += "</table>"
    end