Prints help menu for command.

@param stream PrintStream object for output
@throws IOException
18601
public static void printHelp(PrintStream stream) throws IOException {
            stream.println();
            stream.println("NAME");
            stream.println("  meta set - Set metadata on nodes");
            stream.println();
            stream.println("SYNOPSIS");
            stream.println("  meta set <meta-key>=<meta-value>[,<meta-key2>=<meta-value2>] -u <url>");
            stream.println("           [-n <node-id-list> | --all-nodes] [--confirm]");
            stream.println();
            stream.println("COMMENTS");
            stream.println("  To set one metadata, please specify one of the following:");
            stream.println("    " + MetadataStore.CLUSTER_KEY
                           + " (meta-value is cluster.xml file path)");
            stream.println("    " + MetadataStore.STORES_KEY
                           + " (meta-value is stores.xml file path)");
            stream.println("    " + MetadataStore.SLOP_STREAMING_ENABLED_KEY);
            stream.println("    " + MetadataStore.PARTITION_STREAMING_ENABLED_KEY);
            stream.println("    " + MetadataStore.READONLY_FETCH_ENABLED_KEY);
            stream.println("    " + MetadataStore.QUOTA_ENFORCEMENT_ENABLED_KEY);
            stream.println("    " + MetadataStore.REBALANCING_SOURCE_CLUSTER_XML);
            stream.println("    " + MetadataStore.REBALANCING_STEAL_INFO);
            stream.println("    " + KEY_OFFLINE);
            stream.println("  To set a pair of metadata values, valid meta keys are:");
            stream.println("    " + MetadataStore.CLUSTER_KEY
                           + " (meta-value is cluster.xml file path)");
            stream.println("    " + MetadataStore.STORES_KEY
                           + " (meta-value is stores.xml file path)");
            stream.println();
            getParser().printHelpOn(stream);
            stream.println();
        }
123900
public static void printHelp(String message) {
    System.err.println(message);
    HelpFormatter help = new HelpFormatter();
    help.printHelp(LOG_LEVEL, OPTIONS, true);
  }
110093
public void print(PrintStream ps, String message){
        if(SUPPORTED)
            ps.print(start);
        ps.print(message);
        if(SUPPORTED)
            ps.print(END);
    }
647277
public static void executeHelp(String[] args, PrintStream stream) throws Exception {
        String subCmd = (args.length > 0) ? args[0] : "";
        if(subCmd.equals("orphaned-data")) {
            SubCommandCleanupOrphanedData.printHelp(stream);
        } else if(subCmd.equals("vector-clocks")) {
            SubCommandCleanupVectorClocks.printHelp(stream);
        } else if(subCmd.equals("slops")) {
            SubCommandCleanupSlops.printHelp(stream);
        } else {
            printHelp(stream);
        }
    }
302005
public static void printHelp() {
    String defaultFlowDirMessage;
    if (DEFAULT_FLOW_DIR() == null) {
      // If you start h2o on Hadoop, you must set -flow_dir.
      // H2O doesn't know how to guess a good one.
      // user.home doesn't make sense.
      defaultFlowDirMessage =
      "          (The default is none; saving flows not available.)\n";
    }
    else {
      defaultFlowDirMessage =
      "          (The default is '" + DEFAULT_FLOW_DIR() + "'.)\n";
    }

    String s =
            "\n" +
            "Usage:  java [-Xmx<size>] -jar h2o.jar [options]\n" +
            "        (Note that every option has a default and is optional.)\n" +
            "\n" +
            "    -h | -help\n" +
            "          Print this help.\n" +
            "\n" +
            "    -version\n" +
            "          Print version info and exit.\n" +
            "\n" +
            "    -name <h2oCloudName>\n" +
            "          Cloud name used for discovery of other nodes.\n" +
            "          Nodes with the same cloud name will form an H2O cloud\n" +
            "          (also known as an H2O cluster).\n" +
            "\n" +
            "    -flatfile <flatFileName>\n" +
            "          Configuration file explicitly listing H2O cloud node members.\n" +
            "\n" +
            "    -ip <ipAddressOfNode>\n" +
            "          IP address of this node.\n" +
            "\n" +
            "    -port <port>\n" +
            "          Port number for this node (note: port+1 is also used by default).\n" +
            "          (The default port is " + ARGS.port + ".)\n" +
            "\n" +
            "    -network <IPv4network1Specification>[,<IPv4network2Specification> ...]\n" +
            "          The IP address discovery code will bind to the first interface\n" +
            "          that matches one of the networks in the comma-separated list.\n" +
            "          Use instead of -ip when a broad range of addresses is legal.\n" +
            "          (Example network specification: '10.1.2.0/24' allows 256 legal\n" +
            "          possibilities.)\n" +
            "\n" +
            "    -ice_root <fileSystemPath>\n" +
            "          The directory where H2O spills temporary data to disk.\n" +
            "\n" +
            "    -log_dir <fileSystemPath>\n" +
            "          The directory where H2O writes logs to disk.\n" +
            "          (This usually has a good default that you need not change.)\n" +
            "\n" +
            "    -log_level <TRACE,DEBUG,INFO,WARN,ERRR,FATAL>\n" +
            "          Write messages at this logging level, or above.  Default is INFO." +
            "\n" +
            "\n" +
            "    -flow_dir <server side directory or HDFS directory>\n" +
            "          The directory where H2O stores saved flows.\n" +
            defaultFlowDirMessage +
            "\n" +
            "    -nthreads <#threads>\n" +
            "          Maximum number of threads in the low priority batch-work queue.\n" +
            "          (The default is " + (char)Runtime.getRuntime().availableProcessors() + ".)\n" +
            "\n" +
            "    -client\n" +
            "          Launch H2O node in client mode.\n" +
            "\n" +
            "    -notify_local <fileSystemPath>" +
            "          Specifies a file to write when the node is up. The file contains one line with the IP and" +
            "          port of the embedded web server. e.g. 192.168.1.100:54321" +
            "\n" +
            "    -context_path <context_path>\n" +
            "          The context path for jetty.\n" +
            "\n" +
            "Authentication options:\n" +
            "\n" +
            "    -jks <filename>\n" +
            "          Java keystore file\n" +
            "\n" +
            "    -jks_pass <password>\n" +
            "          (Default is '" + DEFAULT_JKS_PASS + "')\n" +
            "\n" +
            "    -hash_login\n" +
            "          Use Jetty HashLoginService\n" +
            "\n" +
            "    -ldap_login\n" +
            "          Use Jetty Ldap login module\n" +
            "\n" +
            "    -kerberos_login\n" +
            "          Use Jetty Kerberos login module\n" +
            "\n" +
            "    -spnego_login\n" +
            "          Use Jetty SPNEGO login service\n" +
            "\n" +
            "    -pam_login\n" +
            "          Use Jetty PAM login module\n" +
            "\n" +
            "    -login_conf <filename>\n" +
            "          LoginService configuration file\n" +
            "\n" +
            "    -spnego_properties <filename>\n" +
            "          SPNEGO login module configuration file\n" +
            "\n" +
            "    -form_auth\n" +
            "          Enables Form-based authentication for Flow (default is Basic authentication)\n" +
            "\n" +
            "    -session_timeout <minutes>\n" +
            "          Specifies the number of minutes that a session can remain idle before the server invalidates\n" +
            "          the session and requests a new login. Requires '-form_auth'. Default is no timeout\n" +
            "\n" +
            "    -internal_security_conf <filename>\n" +
            "          Path (absolute or relative) to a file containing all internal security related configurations\n" +
            "\n" +
            "Cloud formation behavior:\n" +
            "\n" +
            "    New H2O nodes join together to form a cloud at startup time.\n" +
            "    Once a cloud is given work to perform, it locks out new members\n" +
            "    from joining.\n" +
            "\n" +
            "Examples:\n" +
            "\n" +
            "    Start an H2O node with 4GB of memory and a default cloud name:\n" +
            "        $ java -Xmx4g -jar h2o.jar\n" +
            "\n" +
            "    Start an H2O node with 6GB of memory and a specify the cloud name:\n" +
            "        $ java -Xmx6g -jar h2o.jar -name MyCloud\n" +
            "\n" +
            "    Start an H2O cloud with three 2GB nodes and a default cloud name:\n" +
            "        $ java -Xmx2g -jar h2o.jar &\n" +
            "        $ java -Xmx2g -jar h2o.jar &\n" +
            "        $ java -Xmx2g -jar h2o.jar &\n" +
            "\n";

    System.out.print(s);

    for (AbstractH2OExtension e : extManager.getCoreExtensions()) {
      e.printHelp();
    }
  }
1144645
protected final void printCommandLine(@Nonnull String[] cmd, @CheckForNull FilePath workDir) {
        StringBuilder buf = new StringBuilder();
        if (workDir != null) {
            buf.append('[');
            if(showFullPath)
                buf.append(workDir.getRemote());
            else
                buf.append(workDir.getRemote().replaceFirst("^.+[/\\\\]", ""));
            buf.append("] ");
        }
        buf.append('$');
        for (String c : cmd) {
            buf.append(' ');
            if(c.indexOf(' ')>=0) {
                if(c.indexOf('"')>=0)
                    buf.append('\'').append(c).append('\'');
                else
                    buf.append('"').append(c).append('"');
            } else
                buf.append(c);
        }
        listener.getLogger().println(buf.toString());
        listener.getLogger().flush();
    }
675789
static void printHelp(OutputStream prtStr)
    {
        try {
            InputStream is = SQLCommand.class.getResourceAsStream(m_readme);
            while (is.available() > 0) {
                byte[] bytes = new byte[is.available()]; // Fix for ENG-3440
                is.read(bytes, 0, bytes.length);
                prtStr.write(bytes); // For JUnit test
            }
        }
        catch (Exception x) {
            System.err.println(x.getMessage());
            m_exitCode = -1;
            return;
        }
    }
516745
public static void executeHelp(String[] args, PrintStream stream) throws Exception {
        String subCmd = (args.length > 0) ? args[0] : "";
        if(subCmd.equals("fetch-entries")) {
            SubCommandStreamFetchEntries.printHelp(stream);
        } else if(subCmd.equals("fetch-keys")) {
            SubCommandStreamFetchKeys.printHelp(stream);
        } else if(subCmd.equals("mirror")) {
            SubCommandStreamMirror.printHelp(stream);
        } else if(subCmd.equals("update-entries")) {
            SubCommandStreamUpdateEntries.printHelp(stream);
        } else {
            printHelp(stream);
        }
    }
187396
@Override
    public void handle(CommandContext ctx, String commandLine) {
        // TODO Validate command
        if (commandLine.contains("--help")) {
            this.printHelp(commandLine, ctx);
            return;
        }
        ctx.sendMessage(commandLine);
    }
708561
public static void printHelp(Collection<CustomCommandLine<?>> customCommandLines) {
		System.out.println("./flink <ACTION> [OPTIONS] [ARGUMENTS]");
		System.out.println();
		System.out.println("The following actions are available:");

		printHelpForRun(customCommandLines);
		printHelpForInfo();
		printHelpForList(customCommandLines);
		printHelpForStop(customCommandLines);
		printHelpForCancel(customCommandLines);
		printHelpForSavepoint(customCommandLines);

		System.out.println();
	}
1341492
public static void print(String string, File file) throws IOException {
		PrintWriter out = null;
		try {
			out = new PrintWriter(new BufferedWriter(new FileWriter(file)));
			out.print(string);
			out.flush();
			out.close();
		} finally {
			if (out != null) out.close();
		}
	}
1159127
public static void print(Object o) throws IOException {
		OutputStreamWriter w=new OutputStreamWriter(System.out,"UTF-8");
		print(o, w, true);
		w.flush();
	}
1178970
public void print(boolean b) throws IOException
  {
    if (_startLine)
      printIndent();

    _os.print(b);
    _lastCr = false;
  }
157031
public static void executeHelp(String[] args, PrintStream stream) throws Exception {
        String subCmd = (args.length > 0) ? args[0] : "";
        args = AdminToolUtils.copyArrayCutFirst(args);
        if(subCmd.equals("async-job")) {
            AdminCommandAsyncJob.executeHelp(args, stream);
        } else if(subCmd.equals("scheduled")) {
            AdminCommandScheduled.executeHelp(args, stream);
        } else if(subCmd.equals("cleanup")) {
            AdminCommandCleanup.executeHelp(args, stream);
        } else if(subCmd.equals("debug")) {
            AdminCommandDebug.executeHelp(args, stream);
        } else if(subCmd.equals("meta")) {
            AdminCommandMeta.executeHelp(args, stream);
        } else if(subCmd.equals("quota")) {
            AdminCommandQuota.executeHelp(args, stream);
        } else if(subCmd.equals("store")) {
            AdminCommandStore.executeHelp(args, stream);
        } else if(subCmd.equals("stream")) {
            AdminCommandStream.executeHelp(args, stream);
        } else {
            args = AdminToolUtils.copyArrayAddFirst(args, subCmd);
            AdminCommandOther.executeHelp(args, stream);
        }
    }
270476
public void printHelp() {
        final HelpFormatter formatter = new HelpFormatter();
        final Options options = new Options();
        addStandardOptions(options);
        if (line != null && line.hasOption(ARGUMENT.ADVANCED_HELP)) {
            addAdvancedOptions(options);
        }
        final String helpMsg = String.format("%n%s"
                + " can be used to identify if there are any known CVE vulnerabilities in libraries utilized by an application. "
                + "%s will automatically update required data from the Internet, such as the CVE and CPE data files from nvd.nist.gov.%n%n",
                settings.getString("application.name", "DependencyCheck"),
                settings.getString("application.name", "DependencyCheck"));

        formatter.printHelp(settings.getString("application.name", "DependencyCheck"),
                helpMsg,
                options,
                "",
                true);
    }
809804
public static void printOptions(PrintStream out, String command, GroupedOptions... groupings)
    {
        out.println();
        boolean firstRow = true;
        for (GroupedOptions grouping : groupings)
        {
            if (!firstRow)
            {
                out.println(" OR ");
            }
            firstRow = false;

            StringBuilder sb = new StringBuilder("Usage: " + command);
            for (Option option : grouping.options())
            {
                sb.append(" ");
                sb.append(option.shortDisplay());
            }
            out.println(sb.toString());
        }
        out.println();
        final Set<Option> printed = new HashSet<>();
        for (GroupedOptions grouping : groupings)
        {
            for (Option option : grouping.options())
            {
                if (printed.add(option))
                {
                    if (option.longDisplay() != null)
                    {
                        out.println("  " + option.longDisplay());
                        for (String row : option.multiLineDisplay())
                            out.println("      " + row);
                    }
                }
            }
        }
    }
463562
def print_help(self, file: TextIO = None) -> None:
        """"""
        if file is None:
            file = sys.stderr
        print("Usage: %s [OPTIONS]" % sys.argv[0], file=file)
        print("\nOptions:\n", file=file)
        by_group = {}  # type: Dict[str, List[_Option]]
        for option in self._options.values():
            by_group.setdefault(option.group_name, []).append(option)

        for filename, o in sorted(by_group.items()):
            if filename:
                print("\n%s options:\n" % os.path.normpath(filename), file=file)
            o.sort(key=lambda option: option.name)
            for option in o:
                # Always print names with dashes in a CLI context.
                prefix = self._normalize_name(option.name)
                if option.metavar:
                    prefix += "=" + option.metavar
                description = option.help or ""
                if option.default is not None and option.default != "":
                    description += " (default %s)" % option.default
                lines = textwrap.wrap(description, 79 - 35)
                if len(prefix) > 30 or len(lines) == 0:
                    lines.insert(0, "")
                print("  --%-30s %s" % (prefix, lines[0]), file=file)
                for line in lines[1:]:
                    print("%-34s %s" % (" ", line), file=file)
        print(file=file)