打印进度条

@param showChar 进度条提示字符，例如“#”
@param totalLen 总长度
@param rate 总长度所占比取值0~1
@since 4.5.6
339540
public static void printProgress(char showChar, int totalLen, double rate) {
		Assert.isTrue(rate >= 0 && rate <= 1, "Rate must between 0 and 1 (both include)");
		printProgress(showChar, (int) (totalLen * rate));
	}
322015
public static String show(String s) {
        StringBuilder builder = new StringBuilder();
        if (s != null) {
            for (char ch : s.toCharArray()) {
                addCharacter(builder, ch);
            }
        }
        return builder.toString();
    }
302595
function (rate) {
      var start = this.options.step > 0 ? this.options.start : this.options.stop;
      var stop = this.options.step > 0 ? this.options.stop : this.options.start;
      return start <= rate && rate <= stop;
    }
685114
public void characters(char[] ch, int start, int length) {

        if (ignore)
            return;

        String content = new String(ch, start, length);
        // System.err.println("'" + content + "'");

        if (content.trim().length() == 0 && content.indexOf(' ') < 0) {
            return;
        }

        StringBuffer buf = new StringBuffer();
        int len = content.length();
        char character;
        boolean newline = false;
        for (int i = 0; i < len; i++) {
            switch (character = content.charAt(i)) {
            case ' ':
                if (!newline) {
                    buf.append(character);
                }
                break;
            case '\n':
                if (i > 0) {
                    newline = true;
                    buf.append(' ');
                }
                break;
            case '\r':
                break;
            case '\t':
                break;
            default:
                newline = false;
                buf.append(character);
            }
        }
        if (currentChunk == null) {
        	if (bf == null) {
        		currentChunk = new Chunk(buf.toString());
        	}
        	else {
        		currentChunk = new Chunk(buf.toString(), new Font(this.bf));
        	}
        } else {
            currentChunk.append(buf.toString());
        }
    }
499404
function isCharEnglishPunctuation(char = '') {
  if (isEmpty(char)) return false;
  return ENGLISH_PUNCTUATION_RANGES.some(([start, end]) => isCharInRange(char, start, end));
}
626596
func (t TRand) Rate(rate int8) Input {
	CheckRate(rate)
	(&t).defaults()
	return NewInput("TRand", rate, 0, 1, t.Lo, t.Hi, t.Trig)
}
1199217
public static double logpdf(double val, double rate) {
    return FastMath.log(.5 * rate) - rate * Math.abs(val);
  }
758128
func (tg TGrains) Rate(rate int8) Input {
	CheckRate(rate)
	(&tg).defaults()
	return NewInput("TGrains", rate, 0, tg.NumChannels, tg.Trigger, tg.BufNum, tg.GRate, tg.CenterPos, tg.Dur, tg.Pan, tg.Amp, tg.Interp)
}
1147118
public boolean rateLimited(Throwable throwable) {
    GoogleJsonResponseException jsonException = getJsonResponseExceptionOrNull(throwable);
    if (jsonException != null) {
      return rateLimited(getDetails(jsonException));
    }
    return false;
  }
1246380
func (sel Select) Rate(rate int8) Input {
	CheckRate(rate)
	inputs := append([]Input{sel.Which}, sel.Inputs...)
	return NewInput("Select", rate, 0, 1, inputs...)
}
1246990
func (fv FreeVerb) Rate(rate int8) Input {
	CheckRate(rate)
	if fv.In == nil {
		panic("FreeVerb expects In to not be nil")
	}
	(&fv).defaults()
	return NewInput("FreeVerb", rate, 0, 1, fv.In, fv.Mix, fv.Room, fv.Damp)
}
735401
function checkFillingChar( doc )
	{
		var fillingChar = doc && getFillingChar( doc );
		if ( fillingChar )
		{
			// Use this flag to avoid removing the filling char right after
			// creating it.
			if ( fillingChar.getCustomData( 'ready' ) )
				removeFillingChar( doc );
			else
				fillingChar.setCustomData( 'ready', 1 );
		}
	}
618856
func (l LinPan2) Rate(rate int8) Input {
	CheckRate(rate)
	if l.In == nil {
		panic("LinPan2 requires an input signal")
	}
	(&l).defaults()
	in := NewInput("LinPan2", rate, 0, 1, l.In, l.Pos, l.Level)
	return Multi(in, in)
}
655252
private void displayNode(JspWriter out, ViewNode node, String url_Path, int level, int width) throws IOException {

		// ----------------------------------------显示节点本身信息，如节点名称等开始
		String encodedNodeKey = URLEncoder.encode(node.getKey(), "UTF-8");
		String action = replace(nodeAction, "${key}", encodedNodeKey);
		StringBuilder url = new StringBuilder(url_Path);
		url.append(action);
		if (nodeAction.indexOf("?") < 0)
			url.append("?");
		else
			url.append("&");
		url.append("key=").append(node.getKey());
		String treeNodeAction = url.toString();

		url = new StringBuilder(url_Path);
		url.append(treeAction);
		if (treeAction.indexOf("?") < 0)
			url.append("?");
		else
			url.append("&");
		url.append("select=").append(node.getKey());
		String updateNodeAction = url.toString();

		// Render the label for this node (if any)
		out.print("    <td colspan=\"");
		out.print(width - level + 1);
		out.print("\">");

		// 这里省略了icon

		if (node.getLabel() != null) {
			String labelStyle = null;
			if (node.isSelected())
				labelStyle = CSS_STYLE_SELECTED;
			else if (!node.isSelected())
				labelStyle = CSS_STYLE_UN_SELECTED;
			if (treeNodeAction != null) {
				// Note the leading space so that the text has some space
				// between it and any preceding images
				out.print(" <a href=\"");
				out.print(treeNodeAction);
				out.print("\"");
				if (target != null) {
					out.print(" target=\"");
					out.print(target);
					out.print("\"");
				}
				if (labelStyle != null) {
					out.print(" class=\"");
					out.print(labelStyle);
					out.print("\"");
				}
				// to refresh the tree in the same 'self' frame
				out.print(" onclick=\"");
				out.print("self.location.href='" + updateNodeAction + "'");
				out.print("\"");
				out.print(">");
			} else if (labelStyle != null) {
				out.print("<span class=\"");
				out.print(labelStyle);
				out.print("\">");
			}
			out.print(node.getLabel());
			if (treeNodeAction != null)
				out.print("</a>");
			else if (labelStyle != null)
				out.print("</span>");
		}

		out.println("</td>");

		// ----------------------------------------显示节点本身信息，如节点名称等结束

	}
40036
function TableEntry(rate, amount) {
    this._rate = rate;
    this._amount = amount;

    // Calculate total (in the same currency as the rate)
    this._total = rate * amount;
}
593589
func (e *ErrorStats) rate(l string) float64 {
	if e.total[l] == 0 {
		return 0.0
	}
	return float64(e.enum[l]) / float64(e.total[l])
}
422920
public static final BigDecimal printRate(Rate rate)
   {
      BigDecimal result = null;
      if (rate != null && rate.getAmount() != 0)
      {
         result = new BigDecimal(rate.getAmount());
      }
      return result;
   }