Entry point to run the search utility
@param args Command line arguments
@throws Exception If something goes wrong
5933
public static void main(String[] args) throws Exception {
    ArgP argp = new ArgP();
    CliOptions.addCommon(argp);
    argp.addOption("--use-data-table",
        "Scan against the raw data table instead of the meta data table.");
    args = CliOptions.parse(argp, args);
    if (args == null) {
      usage(argp, "Invalid usage");
      System.exit(2);
    } else if (args.length < 1) {
      usage(argp, "Not enough arguments");
      System.exit(2);
    }
    
    final boolean use_data_table = argp.has("--use-data-table");
    
    Config config = CliOptions.getConfig(argp);
    final TSDB tsdb = new TSDB(config);
    tsdb.checkNecessaryTablesExist().joinUninterruptibly();
    
    int rc;
    try {
      rc = runCommand(tsdb, use_data_table, args);
    } finally {
      try {
        tsdb.getClient().shutdown().joinUninterruptibly();
        LOG.info("Gracefully shutdown the TSD");
      } catch (Exception e) {
        LOG.error("Unexpected exception while shutting down", e);
        rc = 42;
      }
    }
    System.exit(rc);
  }
716407
public static final void main(String [] args) throws Exception {
        ManagerApiMicroService microService = new ManagerApiMicroService();
        microService.start();
        microService.join();
    }
678203
public static void main(final String args[])
		throws Exception {
		if (hasParameter(args,"--help") ||
			hasParameter(args,"-h")) {
			showUsage(null);
		}
		String  url				 = getParameter(args, "--url");
		String  outfile			 = getParameter(args, "--out");
		String  fontPath	 	 = getParameter(args, "--fontpath");
		String  password		 = getParameter(args, "--password");
		String  keystorePath     = getParameter(args, "--ks");
		String  keystorePassword = getParameter(args, "--kspassword");
		String  keyPassword		 = getParameter(args, "--keypassword");
		String  cryptReason		 = getParameter(args, "--cryptreason");
		String  cryptLocation    = getParameter(args, "--cryptlocation");
		
		if (outfile == null) {
			showUsage("--out file must exists !");
		} // end if

		try {
			new URL(url);
		} // end try
		catch (final Exception e) {
			showUsage("--url must be a valid URL !");
		} // end catch
		try {
			File fout = new File(outfile);

			List			 headerFooterList = new ArrayList();

			FileOutputStream out = new FileOutputStream(fout);
			System.out.println("before conversion");

			Map properties = new HashMap();

			headerFooterList.add(new IHtmlToPdfTransformer.CHeaderFooter(
					"<table width=\"100%\"><tbody><tr><td align=\"left\">Generated with YaHPConverter.</td><td align=\"right\">Page <pagenumber>/<pagecount></td></tr></tbody></table>",
					IHtmlToPdfTransformer.CHeaderFooter.HEADER));
			headerFooterList.add(new IHtmlToPdfTransformer.CHeaderFooter(
					"© 2011 Quentin Anciaux",
					IHtmlToPdfTransformer.CHeaderFooter.FOOTER));
			
			properties.put(IHtmlToPdfTransformer.PDF_RENDERER_CLASS,
					IHtmlToPdfTransformer.FLYINGSAUCER_PDF_RENDERER);
			if (fontPath != null)
				properties.put(IHtmlToPdfTransformer.FOP_TTF_FONT_PATH, fontPath);

			if (password != null) {
				System.out.println(password);
				properties.put(IHtmlToPdfTransformer.USE_PDF_ENCRYPTION,
					"true");
				properties.put(IHtmlToPdfTransformer.PDF_ALLOW_SCREEN_READERS,
					"true");
				properties.put(IHtmlToPdfTransformer.PDF_ENCRYPTION_PASSWORD,
					password);

				if (keystorePath != null) {
					properties.put(IHtmlToPdfTransformer.USE_PDF_SIGNING,
						"true");
					properties.put(IHtmlToPdfTransformer.PDF_SIGNING_PRIVATE_KEY_FILE,
						keystorePath);
					properties.put(IHtmlToPdfTransformer.PDF_SIGNING_KEYSTORE_PASSWORD,
						keystorePassword);
					properties.put(IHtmlToPdfTransformer.PDF_SIGNING_PRIVATE_KEY_PASSWORD,
						keyPassword);

					if (cryptReason != null) {
						properties.put(IHtmlToPdfTransformer.PDF_SIGNING_REASON,
							cryptReason);
					} // end if

					if (cryptLocation != null) {
						properties.put(IHtmlToPdfTransformer.PDF_SIGNING_LOCATION,
							cryptLocation);
					} // end if
				} // end if
			} // end if

			converter.convertToPdf(new URL(url),
				IHtmlToPdfTransformer.A4P, headerFooterList, out,
				properties);
			System.out.println("after conversion");
			out.flush();
			out.close();
		} // end try
		catch (final Throwable t) {
			t.printStackTrace();
			System.err.println("An error occurs while converting '" +
				url + "' to '" + outfile + "'. Cause : " +
				t.getMessage());
			System.exit(-1);
		} // end catch

		System.exit(0);
	}
275
public static void main(String[] args) {
    System.err.println(toString(new int[] { Integer.parseInt(args[0]) }));
  }
357601
public static void main(String[] args) throws Exception {
		
		if(!parseParameters(args)) {
			return;
		}

		final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

		// get input data
		DataSet<Tuple2<String, String>> documents = getDocumentsDataSet(env);
		DataSet<Tuple3<Integer, String, Integer>> ranks = getRanksDataSet(env);
		DataSet<Tuple2<String, String>> visits = getVisitsDataSet(env);
		
		// Retain documents with keywords
		DataSet<Tuple1<String>> filterDocs = documents
				.filter(new FilterDocByKeyWords())
				.project(0).types(String.class);

		// Filter ranks by minimum rank
		DataSet<Tuple3<Integer, String, Integer>> filterRanks = ranks
				.filter(new FilterByRank());

		// Filter visits by visit date
		DataSet<Tuple1<String>> filterVisits = visits
				.filter(new FilterVisitsByDate())
				.project(0).types(String.class);

		// Join the filtered documents and ranks, i.e., get all URLs with min rank and keywords
		DataSet<Tuple3<Integer, String, Integer>> joinDocsRanks = 
				filterDocs.join(filterRanks)
							.where(0).equalTo(1)
							.projectSecond(0,1,2)
							.types(Integer.class, String.class, Integer.class);

		// Anti-join urls with visits, i.e., retain all URLs which have NOT been visited in a certain time
		DataSet<Tuple3<Integer, String, Integer>> result = 
				joinDocsRanks.coGroup(filterVisits)
								.where(1).equalTo(0)
								.with(new AntiJoinVisits());

		// emit result
		if(fileOutput) {
			result.writeAsCsv(outputPath, "\n", "|");
		} else {
			result.print();
		}

		// execute program
		env.execute("WebLogAnalysis Example");
		
	}
139546
public boolean run(String... arguments) throws Exception {
        try {
            if (isFlag(HELP, arguments)) {
                parser.printHelp(stdOut);
            } else if (isFlag(VERSION, arguments)) {
                parser.printVersion(stdOut);
            } else {
                final Namespace namespace = parser.parseArgs(arguments);
                final Command command = requireNonNull(commands.get(namespace.getString(COMMAND_NAME_ATTR)),
                    "Command is not found");
                try {
                    command.run(bootstrap, namespace);
                } catch (Throwable e) {
                    // The command failed to run, and the command knows
                    // best how to cleanup / debug exception
                    command.onError(this, namespace, e);
                    return false;
                }
            }
            return true;
        } catch (HelpScreenException ignored) {
            // This exception is triggered when the user passes in a help flag.
            // Return true to signal that the process executed normally.
            return true;
        } catch (ArgumentParserException e) {
            stdErr.println(e.getMessage());
            e.getParser().printHelp(stdErr);
            return false;
        }
    }
1368589
public static void main(final String[] args) throws Exception {
		// Set the logger to use the text area logger
		System.setProperty("org.apache.commons.logging.Log",
				"com.github.bordertech.wcomponents.lde.StandaloneLauncher$TextAreaLogger");

		// Set the port number to a random port
		Configuration internalWComponentConfig = Config.getInstance();
		CompositeConfiguration config = new CompositeConfiguration(new MapConfiguration(
				new HashMap<String, Object>()));
		config.addConfiguration(internalWComponentConfig); // Internal WComponent config next
		config.setProperty(ConfigurationProperties.LDE_SERVER_PORT, 0);
		Config.setConfiguration(config);

		getInstance().launcher.run();
		getInstance().log("LDE now running on " + getInstance().launcher.getUrl() + '\n');
	}
709656
public static void main(String[] args) throws Exception {
        for (String arg : args) {
            Class clazz = Class.forName(arg);
            System.out.println("Examining: " + clazz.getName());
            try {
                examine(clazz);
                System.out.println("Passed");
            } catch (MalformedTypeException e) {
                System.out.println("Malformed type: " + e.getMalformedType().getName());
                for (String message : e.getMessages()) {
                    System.out.println(message);
                }
            }
        }
    }
1293717
public static void main(String... args) throws Exception {
    ClientConfiguration.Builder configBuilder = ClientConfiguration.newBuilder(
        ADDRESS, TARGET_QPS, CLIENT_PAYLOAD, SERVER_PAYLOAD, TLS,
        TESTCA, TRANSPORT, DURATION, SAVE_HISTOGRAM, FLOW_CONTROL_WINDOW);
    ClientConfiguration config;
    try {
      config = configBuilder.build(args);
    } catch (Exception e) {
      System.out.println(e.getMessage());
      configBuilder.printUsage();
      return;
    }
    OpenLoopClient client = new OpenLoopClient(config);
    client.run();
  }
22619
public static void main(final String[] args)
	{

		if (args.length != 1) {
			throw new IllegalArgumentException(
					"Configuration File ist missing.");
		}

		try {

			// Reads the configuration
			ConfigSettings config = readConfiguration(args[0]);
			new DiffToolThread(config).run();
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
213205
public static void main(String[] args) {
        if (args.length < 1) {
            System.out.println("java twitter4j.examples.search.SearchTweets [query]");
            System.exit(-1);
        }
        Twitter twitter = new TwitterFactory().getInstance();
        try {
            Query query = new Query(args[0]);
            QueryResult result;
            do {
                result = twitter.search(query);
                List<Status> tweets = result.getTweets();
                for (Status tweet : tweets) {
                    System.out.println("@" + tweet.getUser().getScreenName() + " - " + tweet.getText());
                }
            } while ((query = result.nextQuery()) != null);
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
            System.out.println("Failed to search tweets: " + te.getMessage());
            System.exit(-1);
        }
    }
979198
public static void main(final String[] args) {
    GUIUtil.logUncaughtExceptions(LOG);
    GUIUtil.setLookAndFeel();
    OutputStep.setDefaultHandlerVisualizer();

    javax.swing.SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        try {
          final MultiStepGUI gui = new MultiStepGUI();
          gui.run();
          if(args != null && args.length > 0) {
            gui.setParameters(new SerializedParameterization(args));
          }
          else {
            gui.setParameters(new SerializedParameterization());
          }
        }
        catch(Exception | Error e) {
          // Restore error handler, as the GUI is likely broken.
          LoggingConfiguration.replaceDefaultHandler(new CLISmartHandler());
          LOG.exception(e);
        }
      }
    });
  }
469208
public static void main(String[] args) throws Exception{
        String google = "http://google.com";
        String yahoo = "http://yahoo.com";

        XMLDocument xml = new XMLDocument(new StreamResult(System.out), false, 4, null);

        xml.startDocument();{
            xml.addProcessingInstruction("san", "test='1.2'");
            xml.declarePrefix("google", google);
            xml.declarePrefix("yahoo", yahoo);
            xml.declarePrefix("http://msn.com");

            xml.startElement(google, "hello");{
                xml.addAttribute("name", "value");
                xml.addElement("xyz", "helloworld");
                xml.addElement(google, "hai", "test");
                xml.addXML(new InputSource("xml/xsds/note.xsd"), true);
                xml.addComment("this is comment");
                xml.addCDATA("this is sample cdata");
            }
        }
        xml.endDocument();
    }
131921
public static void main(final String... args) throws Exception {
        try (ConfigurableApplicationContext context = SpringApplication.run(Application.class, args)) {
            log.info("Arguments: {}", Arrays.asList(args));

            try {
                context.getBean(Application.class).run(context);
            } catch (Exception e) {
                log.error("Exception in command execution", e);
            }
        }
    }
758472
public static void main(String[] args) throws Exception
    {
        Server server = new Server(8080);
        server.setStopAtShutdown(true);
        server.setHandler(new WebAppContext("web","/dwr"));
        server.start();
        server.join();
    }
436930
public static void main(String[] args) throws Exception {
        initCache();
        List<String> allClassnames = getAllClassNames();
        PrintStream out = System.out;
        if (args.length > 0)
            out = new PrintStream(new File(args[0]));
        Collections.sort(allClassnames);
        for (String clsname: allClassnames)
            out.println(clsname);
        out.flush();
        if (args.length > 0)
            out.close();
    }
102892
public static void main(String[] args) {
		PrintStream out = System.out;
		if (args.length > 0) {
			try {
				out = new PrintStream(new File(args[0]));
			} catch (FileNotFoundException e) {
				System.out.printf(ERR_FILE, args[0]);
			}
		}
		MBeanScanner mBeanScanner = new MBeanScanner();
		List<Config> configs = mBeanScanner.scan();
		ConfigWriter cw;
		cw = new ConfigWriter(out, configs);
		cw.write();
	}