Prints the usage of the main class for this ArgParser.
337939
public void printUsage() {
        String name = mainClass == null ? "<MainClass>" : mainClass.getName();
        String usage = "java " + name + " [OPTIONS]";
        final HelpFormatter formatter = new HelpFormatter();
        formatter.setWidth(120);
        formatter.printHelp(usage, options, true);
    }
1083958
def main(self, main):
    
    if not main or not isinstance(main, string_types):
      raise ValueError('The main entry must be a non-empty string')
    self._main = main
6950
public static void main(String[] args) {
    final PrintWriter out = new PrintWriter(System.out);
    final PrintWriter err = new PrintWriter(System.err);
    final int code = Launcher.main2(out, err, Arrays.asList(args));
    System.exit(code);
  }
930678
public static void main(String[] args) {
        System.out.println(version);

        if (args.length < 1) {
            // No arguments - lazily initialize readme, print readme and usage
            initReadme();
            if (readme != null) {
                System.out.println(readme);
            }
            printUsage(System.out);
            return;
        }

        // Last argument should be a path to the document root
        String name = args[args.length-1];

        // Analyze the rest of parameters
        for (int i = 0 ; i < args.length -1; i++) {
            if ("-R".equalsIgnoreCase(args[i])) {
                recursive = true;
            } else if ("-C".equalsIgnoreCase(args[i])) {
                doPatch = false;
            } else {
                System.err.println("Unknown option passed: "+args[i]);
                printUsage(System.err);
                return;
            }
        }
        new JavadocFixTool().proceed(name);
    }
676389
public static void invokeMain(Class<?> mainClass, List<String> args)
			throws Exception
	{
		Method mainMethod = mainClass.getMethod("main", Class.forName("[Ljava.lang.String;"));

		mainMethod.invoke(null, convertToArray(args));
	}
92048
public static void main(String[] args) {

		ListRepo listRepo = new ListRepo();
		try {
			listRepo.run(args);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
194598
public static void main(String[] args) {
        DirectoryIterator iter = new DirectoryIterator(args);
        while(iter.hasNext())
            System.out.println(iter.next().getAbsolutePath());
    }
1080793
def main(name, klass):
    

    # Common args parser.
    parser = create_args_parser(name)

    # Common args
    cargs = get_common_args(parser)
    logging.getLogger().setLevel(cargs['log_level'])
    wrapper = klass(certfile=cargs['certfile'], keyfile=cargs['keyfile'],
                    cafile=cargs['cafile'])

    if cargs['version']:
        print_version(wrapper)
        sys.exit()

    if cargs['foreground']:
        console = logging.StreamHandler()
        console.setFormatter(
            logging.Formatter(
                '%(asctime)s %(name)s: %(levelname)s: %(message)s'))
        logging.getLogger().addHandler(console)
    elif cargs['log_file']:
        logfile = logging.handlers.WatchedFileHandler(cargs['log_file'])
        logfile.setFormatter(
            logging.Formatter(
                '%(asctime)s %(name)s: %(levelname)s: %(message)s'))
        logging.getLogger().addHandler(logfile)
        go_to_background()
    else:
        syslog = logging.handlers.SysLogHandler('/dev/log')
        syslog.setFormatter(
            logging.Formatter('%(name)s: %(levelname)s: %(message)s'))
        logging.getLogger().addHandler(syslog)
        # Duplicate syslog's file descriptor to stout/stderr.
        syslog_fd = syslog.socket.fileno()
        os.dup2(syslog_fd, 1)
        os.dup2(syslog_fd, 2)
        go_to_background()

    if not wrapper.check():
        return 1
    return wrapper.run(cargs['address'], cargs['port'], cargs['unix_socket'])
9845
public static void main(String[] args) throws Throwable {
		CliArguments arguments = CliArguments.parse(args);
		if (arguments.isSet() && !arguments.isUsageMode()) {
			CliRunner runner = new CliRunner(arguments);
			try {
				runner.run();
			} finally {
				runner.close();
			}
		} else {
			PrintWriter out = new PrintWriter(System.out);
			printUsage(out);
			FileHelper.safeClose(out);
		}
	}
1625
def _main():
    
    import sys

    def log(message):
        print(message)

    def print_usage():
        log('usage: %s <application key> <application secret> send <number> <message> <from_number>' % sys.argv[0])
        log('       %s <application key> <application secret> status <message_id>' % sys.argv[0])

    if len(sys.argv) > 4 and sys.argv[3] == 'send':
        key, secret, number, message = sys.argv[1], sys.argv[2], sys.argv[4], sys.argv[5]
        client = SinchSMS(key, secret)
        if len(sys.argv) > 6:
            log(client.send_message(number, message, sys.argv[6]))
        else:
            log(client.send_message(number, message))
    elif len(sys.argv) > 3 and sys.argv[3] == 'status':
        key, secret, message_id = sys.argv[1], sys.argv[2], sys.argv[4]
        client = SinchSMS(key, secret)
        log(client.check_status(message_id))
    else:
        print_usage()
        sys.exit(1)

    sys.exit(0)
1124592
public static void main(String[] args) {
    Arrays.stream(args).forEach(binaryClassName -> {
      System.out.printf("class [%1$s] %2$s%n", binaryClassName, resolve(binaryClassName)
        .map(url -> String.format("was found in [%s]", url)).orElse("was not found"));
    });
  }
410911
private static void printUsageMessage() {
        System.err.println("Descrption:");
        System.err.println("");
        System.err.println("Required arguments:");
        System.err.println("  The paths to one or more binary classes, jars, or");
        System.err.println("  directories to scan for classes and jars are required");
        System.err.println("  parameters.");
        System.err.println("");
        System.err.println("  Class files must have a .class extension.");
        System.err.println("  Jar files must have a .jar or a .zip extension.");
        System.err.println("  Directories are recursively scanned for .class files");
        System.err.println("  to process.");
    }
836284
public void print() {
    Iterator<String> iter = getKeys();
    while (iter.hasNext()) {
      String key = iter.next();
      log.info(key + " = " + getRawString(key));
    }
  }
591091
def main():
    
    if len(argv) < 2:
        print 'Usage: %s fst_file [optional: save_file]' % argv[0]
        return
    flex_a = Flexparser()
    mma = flex_a.yyparse(argv[1])
    mma.minimize()
    print mma
    if len(argv) == 3:
        mma.save(argv[2])
806258
def print_usage (msg, exit_code=2):
    """"""
    program = sys.argv[0]
    print(_("Error: %(msg)s") % {"msg": msg}, file=console.stderr)
    print(_("Execute '%(program)s -h' for help") % {"program": program}, file=console.stderr)
    sys.exit(exit_code)
936336
def main(cls):
        """"""
        cmd = cls()
        cmd._parse_args()
        cmd._setup_logging()
        response = cmd._run()
        output = cmd._handle_response(response)
        if output is not None:
            print(output)
1293026
def main(pargs):
    
    input_file = sys.argv[1]
    fp = ParseFileLineByLine(input_file)
    for i in fp:
        print(i)