Get the line of HTML describing one Option.

@param oi the option to describe
@param padding the number of spaces to add at the begginning of the detail line (after the line
with the option itself)
@return HTML describing oi
420779
public String optionToHtml(Options.OptionInfo oi, int padding) {
    StringBuilder b = new StringBuilder();
    Formatter f = new Formatter(b);
    if (oi.shortName != null) {
      f.format("<b>-%s</b> ", oi.shortName);
    }
    for (String a : oi.aliases) {
      f.format("<b>%s</b> ", a);
    }
    String prefix = getUseSingleDash() ? "-" : "--";
    f.format("<b>%s%s=</b><i>%s</i>", prefix, oi.longName, oi.typeName);
    if (oi.list != null) {
      b.append(" <code>[+]</code>");
    }
    f.format(".%n ");
    f.format("%s", StringUtils.repeat(" ", padding));

    String jdoc = ((oi.jdoc == null) ? "" : oi.jdoc);
    if (oi.noDocDefault || oi.defaultStr == null) {
      f.format("%s", jdoc);
    } else {
      String defaultStr = "default " + oi.defaultStr;
      // The default string must be HTML-escaped since it comes from a string
      // rather than a Javadoc comment.
      String suffix = "";
      if (jdoc.endsWith("</p>")) {
        suffix = "</p>";
        jdoc = jdoc.substring(0, jdoc.length() - suffix.length());
      }
      f.format("%s [%s]%s", jdoc, StringEscapeUtils.escapeHtml4(defaultStr), suffix);
    }
    if (oi.baseType.isEnum()) {
      b.append(lineSep).append("<ul>").append(lineSep);
      assert oi.enumJdoc != null
          : "@AssumeAssertion(nullness): dependent: non-null if oi.baseType is an enum";
      for (Map.Entry<String, String> entry : oi.enumJdoc.entrySet()) {
        b.append("  <li><b>").append(entry.getKey()).append("</b>");
        if (entry.getValue().length() != 0) {
          b.append(" ").append(entry.getValue());
        }
        // b.append("</li>");
        b.append(lineSep);
      }
      b.append("</ul>").append(lineSep);
    }
    return b.toString();
  }
303234
public String html() {
        StringBuilder sb = StringUtil.borrowBuilder();
        for (Element element : this) {
            if (sb.length() != 0)
                sb.append("\n");
            sb.append(element.html());
        }
        return StringUtil.releaseBuilder(sb);
    }
690721
public String html() {
        if (html != null) {
            return html;
        }

        if (content == null) {
            return null;
        }
        if (charset == null) {
            charset = CharsetDetector.guessEncoding(content());
        }
        try {
            html = new String(content, charset);
        } catch (UnsupportedEncodingException e) {
            LOG.info("Exception when decoding "+ key(),e);
            return null;
        }
        return html;
    }
206807
public AT_Row setPadding(int padding){
		if(this.hasCells()){
			for(AT_Cell cell : this.getCells()){
				cell.getContext().setPadding(padding);
			}
		}
		return this;
	}
863091
public static String padding(int width) {
        if (width < 0)
            throw new IllegalArgumentException("width must be > 0");

        if (width < padding.length)
            return padding[width];
        char[] out = new char[width];
        for (int i = 0; i < width; i++)
            out[i] = ' ';
        return String.valueOf(out);
    }
1109201
function paddingHTML(n) {
	if (n <= 3) {
		return repeat(' ', n);
	} else {
		var pad = '';
		for (var i = 0, ii = Math.floor(n / 4), spaces = (n - 3 * ii) / ii; i < ii; i++) {
			pad += repeat(' ', Math.floor(spaces * (i + 1)) - Math.floor(spaces * i)) + 'pad';
		}
		return pad;
	}
}
239684
public String toHTML() {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, "toHTML");
        }
        StringBuffer strbuf = new StringBuffer();
        String appName = _sap.getJ2EEName();
        String globalScopeComment;
        MemoryStore ms = (MemoryStore) _coreHttpSessionManager.getIStore();
        int size = 0;
        if (ms._sessions != null) {
            size = ms._sessions.size();
        }
        globalScopeComment = "<b> (for this webapp) : </b> ";
        strbuf.append("<center><h3>J2EE NAME(AppName#WebModuleName):: " + appName + " </h3></center>" + "<UL>\n");
        strbuf.append("<b>  cloneId</b> : ");
        strbuf.append(((SessionAffinityManager) _sam).getCloneId());
        strbuf.append("<BR>");
        strbuf.append("<BR>");
        strbuf.append("<b>  Number of sessions in memory: </b>");
        strbuf.append(globalScopeComment);
        strbuf.append(size);
        strbuf.append("<BR>");
        if (_smc.isUsingMemory()) {
            strbuf.append("<b>  use overflow</b> : ");
            strbuf.append(_smc.getEnableOverflow());
            strbuf.append("<BR>");
            if (_smc.getEnableOverflow()) {
                strbuf.append("<b>  overflow size</b> ");
                strbuf.append(globalScopeComment);
                strbuf.append(((SessionSimpleHashMap) ms._sessions).getOverflowSize());
                strbuf.append("<BR>");
            }
        }
        strbuf.append("<b>  Invalidation alarm poll interval (for this webapp) </b> : ");
        strbuf.append(_smc.getInvalidationCheckInterval());
        strbuf.append("<BR>");
        strbuf.append("<b> Max invalidation timeout (for this webapp) </b> : ");
        strbuf.append(_smc.getSessionInvalidationTime());
        strbuf.append("<BR>");
        strbuf.append("<b> Using Cookies </b> : ");
        strbuf.append(_smc.getEnableCookies());
        strbuf.append("<BR>");
        strbuf.append("<b> Using URL Rewriting </b> : ");
        strbuf.append(_smc.getEnableUrlRewriting());
        strbuf.append("<BR>");
        strbuf.append("<b> use SSLId </b> : ");
        strbuf.append(_smc.useSSLId());
        strbuf.append("<BR>");
        strbuf.append("<b> URL Protocol Switch Rewriting </b> : ");
        strbuf.append(_smc.getEnableUrlProtocolSwitchRewriting());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Name </b> : ");
        strbuf.append(_smc.getSessionCookieName());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Comment </b> : ");
        strbuf.append(_smc.getSessionCookieComment());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Domain </b> : ");
        strbuf.append(_smc.getSessionCookieDomain());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Path </b> : ");
        strbuf.append(_smc.getSessionCookiePath());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie MaxAge </b> : ");
        strbuf.append(_smc.getSessionCookieMaxAge());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Secure </b> : ");
        strbuf.append(_smc.getSessionCookieSecure());
        strbuf.append("<BR>");
        strbuf.append("<b> Maximum in memory table size </b> : ");
        strbuf.append(_smc.getInMemorySize());
        strbuf.append("<BR>");
        strbuf.append("<b> current time </b> : ");
        strbuf.append(new Date(System.currentTimeMillis()).toString());
        strbuf.append("<BR>");
        strbuf.append("<b>  integrateWASSec</b> :");
        strbuf.append(_smc.getIntegrateSecurity());
        strbuf.append("<BR><b>Session locking </b>: ");
        strbuf.append(_smc.getAllowSerializedSessionAccess());
        if (_smc.getAllowSerializedSessionAccess()) {
            strbuf.append("<BR><b>Session locking timeout</b>: ");
            strbuf.append(_smc.getSerializedSessionAccessMaxWaitTime());
            strbuf.append("<BR><b>Allow access on lock timeout</b>:");
            strbuf.append(_smc.getAccessSessionOnTimeout());
        }
        if (ms.getSessionStatistics() != null) {
            strbuf.append(ms.getSessionStatistics().toHTML());
        }
        strbuf.append(ms.toHTML());
        // .append(this.scPmiData.toHTML())
        // .append(this.mbeanAdapter.toHTML()); //done in WsSessionContext

        return (strbuf.toString());
    }
456780
@NonNull
    public IconicsDrawable paddingRes(@DimenRes int sizeResId) {
        return paddingPx(mContext.getResources().getDimensionPixelSize(sizeResId));
    }
891937
private function pad($padding = 1, $direction = STR_PAD_BOTH): string
    {
        return str_pad($this->number, $padding, 0, $direction);
    }
350620
public static InputStream getHTMLInputStream(Class<?> clazz) throws IOException {
		return HTMLInputStreamPage.class.getResourceAsStream('/'+clazz.getName().replace('.', '/')+".html");
	}
505745
public static String pad(final Object obj, final int count)
   {
      return pad(new StringBuffer(), String.valueOf(obj), count);
   }
15375
public AT_Row setPaddingLeftRight(int padding){
		if(this.hasCells()){
			for(AT_Cell cell : this.getCells()){
				cell.getContext().setPaddingLeftRight(padding);
			}
		}
		return this;
	}
87919
public static PrintWriter initHTML(ServletResponse response, String title
      ) throws IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>\n"
        + "<link rel='stylesheet' type='text/css' href='/static/hadoop.css'>\n"
        + "<title>" + title + "</title>\n"
        + "<body>\n"
        + "<h1>" + title + "</h1>\n");
    return out;
  }
79176
public String toHtml() {
        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder
                .append("<p>")
                .append(objectNode.get(TYPE).asText()).append(": ")
                .append(objectNode.get(MESSAGE).asText()).append(" -> ")
                .append(objectNode.get(DETAILS).toString())
                .append("</p>");

        return stringBuilder.toString();
    }
1329724
public static String defaultHelpHtml(String helpId, String helpText) {

        StringBuffer html = new StringBuffer(1024);
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(helpText)) {
            html.append("<div class='help' id='help");
            html.append(helpId);
            html.append("' onMouseOut=\"hMH('");
            html.append(helpId);
            html.append("');\">");
            html.append(helpText);
            html.append("</div>\n");
        }
        return html.toString();
    }
664807
public org.jsoup.nodes.Document getFromHtml(String uri){
        // 取回資料
        String html = getFromRemote(uri);

        // 轉化為 Jsoup 物件
        return htmlToJsoupDoc(html);
    }
979477
function(str, pad) {
			var padding = '';
			var il = str.length;
				
			while (pad > il++) padding += '0';
			return padding + str; 
		}