Entry point to the tool, just pack the current directory of images

@param argv The arguments to the program
@throws IOException Indicates a failure to write out files
169530
public static void main(String[] argv) throws IOException {
		File dir = new File(".");
		dir = new File("C:\\eclipse\\grobot-workspace\\anon\\res\\tiles\\indoor1");
		
		ArrayList list = new ArrayList();
		File[] files = dir.listFiles();
		for (int i=0;i<files.length;i++) {
			if (files[i].getName().endsWith(".png")) {
				if (!files[i].getName().startsWith("output")) {
					list.add(files[i]);
				}
			}
		}
		
		Pack packer = new Pack();
		packer.pack(list, 512, 512, 1, new File(dir, "output.png"));
		System.out.println("Output Generated.");
	}
275914
public static void main(final String[] args) {

        List<Image> images = describeAllImages();

        if (null != images) {
            for (Image image : images) {
                System.out.println(image.getImageId());
            }
        }

    }
560619
public static void writeableDirectory(final String path, String message) throws IllegalArgumentException {
        notNullOrEmpty(path, message);
        File file = new File(path);
        if (!file.exists() || !file.isDirectory() || !file.canWrite() || !file.canExecute()) {
            throw new IllegalArgumentException(message);
        }

    }
968085
public static void main(String argv[]) {
    if (argv.length == 0) {
      System.out.println("Usage : java CHTBLexer <inputfile>");
    }
    else {
      for (int i = 0; i < argv.length; i++) {
        CHTBLexer scanner = null;
        try {
          scanner = new CHTBLexer( new java.io.FileReader(argv[i]) );
          while ( !scanner.zzAtEOF ) scanner.yylex();
        }
        catch (java.io.FileNotFoundException e) {
          System.out.println("File not found : \""+argv[i]+"\"");
        }
        catch (java.io.IOException e) {
          System.out.println("IO error scanning file \""+argv[i]+"\"");
          System.out.println(e);
        }
        catch (Exception e) {
          System.out.println("Unexpected exception:");
          e.printStackTrace();
        }
      }
    }
  }
1261876
public void run( String[] args ) throws Exception {

		// Check
		File baseDirectory = null;
		if( args.length != 1
				|| ! (baseDirectory = new File( args[ 0 ])).exists())
			throw new RuntimeException( "The path of the module's directory was expected as an argument." );

		// Update
		UpdateSwaggerJson updater = new UpdateSwaggerJson();
		JsonObject newDef = updater.prepareNewDefinitions();
		updater.updateSwaggerJson( baseDirectory, newDef );
	}
1354521
private void createOutputFile() throws IOException {
        this.fileChannel = Files.newByteChannel(Paths.get(filePath), StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);
    }
791188
public static void outputImage(int w, int h, File outputFile, String code) throws IOException{
        if(outputFile == null){
            return;
        }
        File dir = outputFile.getParentFile();
        if(!dir.exists()){
            dir.mkdirs();
        }
        try{
            outputFile.createNewFile();
            FileOutputStream fos = new FileOutputStream(outputFile);
            outputImage(w, h, fos, code);
            fos.close();
        } catch(IOException e){
            throw e;
        }
    }
186334
public static void main(String[] args) throws IOException {
    if (args.length == 0 || args[0].equals("--help")) {
      help();
      return;
    }
    if (args[0].equals("--list")) {
      listFilesystems();
      return;
    }
    if (args[0].equals("--check")) {
      checkGcs();
      return;
    }
    for (String a : args) {
      statFile(a);
    }
  }
645638
public static void main(String[] argv) {
		JFrame frame = new JFrame("Whiskas Gradient Editor");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		JPanel main = new JPanel();
		main.setLayout(new BoxLayout(main, BoxLayout.Y_AXIS));
		main.setBackground(Color.CYAN);
		frame.getContentPane().add(main);

		//
		GraphEditorWindow bottom = new GraphEditorWindow();

		ArrayList curve = new ArrayList();
		curve.add(new Vector2f(0.0f, 0.0f));
		curve.add(new Vector2f(1.0f, 255.0f));
		LinearInterpolator test = new ConfigurableEmitter("bla").new LinearInterpolator(
				curve, 0, 255);
		bottom.registerValue(test, "Test");

		curve = new ArrayList();
		curve.add(new Vector2f(0.0f, 255.0f));
		curve.add(new Vector2f(1.0f, 0.0f));
		test = new ConfigurableEmitter("bla").new LinearInterpolator(curve, 0,
				255);
		bottom.registerValue(test, "Test 2");

		main.add(bottom);

		frame.pack();
		frame.setVisible(true);
		frame.setSize(600, 300);
		frame.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
		});

		frame.setVisible(true);
	}
1353406
public static void main(String[] args)
    {
        if (args.length != 3)
        {
            System.err.println("Usage: ImageRenderer <url> <output_file> <format>");
            System.err.println();
            System.err.println("Renders a document at the specified URL and stores the document image");
            System.err.println("to the specified file.");
            System.err.println("Supported formats:");
            System.err.println("png: a Portable Network Graphics file (bitmap image)");
            System.err.println("svg: a SVG file (vector image)");
            System.exit(0);
        }
        
        try {
            Type type = null;
            if (args[2].equalsIgnoreCase("png"))
                type = Type.PNG;
            else if (args[2].equalsIgnoreCase("svg"))
                type = Type.SVG;
            else
            {
                System.err.println("Error: unknown format");
                System.exit(0);
            }
            
            FileOutputStream os = new FileOutputStream(args[1]);
            
            ImageRenderer r = new ImageRenderer();
            r.renderURL(args[0], os, type);
            
            os.close();
            System.err.println("Done.");
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
        }
        
    }
1201914
void genCode() throws IOException {
        if (!outputDirectory.exists()) {
            if (!outputDirectory.mkdirs()) {
                throw new IOException("unable to create output directory "
                        + outputDirectory);
            }
        }
        FileWriter cc = new FileWriter(new File(outputDirectory, mName + ".cc"));
        FileWriter hh = new FileWriter(new File(outputDirectory, mName + ".hh"));

        hh.write("/**\n");
        hh.write("* Licensed to the Apache Software Foundation (ASF) under one\n");
        hh.write("* or more contributor license agreements.  See the NOTICE file\n");
        hh.write("* distributed with this work for additional information\n");
        hh.write("* regarding copyright ownership.  The ASF licenses this file\n");
        hh.write("* to you under the Apache License, Version 2.0 (the\n");
        hh.write("* \"License\"); you may not use this file except in compliance\n");
        hh.write("* with the License.  You may obtain a copy of the License at\n");
        hh.write("*\n");
        hh.write("*     http://www.apache.org/licenses/LICENSE-2.0\n");
        hh.write("*\n");
        hh.write("* Unless required by applicable law or agreed to in writing, software\n");
        hh.write("* distributed under the License is distributed on an \"AS IS\" BASIS,\n");
        hh.write("* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n");
        hh.write("* See the License for the specific language governing permissions and\n");
        hh.write("* limitations under the License.\n");
        hh.write("*/\n");
        hh.write("\n");

        cc.write("/**\n");
        cc.write("* Licensed to the Apache Software Foundation (ASF) under one\n");
        cc.write("* or more contributor license agreements.  See the NOTICE file\n");
        cc.write("* distributed with this work for additional information\n");
        cc.write("* regarding copyright ownership.  The ASF licenses this file\n");
        cc.write("* to you under the Apache License, Version 2.0 (the\n");
        cc.write("* \"License\"); you may not use this file except in compliance\n");
        cc.write("* with the License.  You may obtain a copy of the License at\n");
        cc.write("*\n");
        cc.write("*     http://www.apache.org/licenses/LICENSE-2.0\n");
        cc.write("*\n");
        cc.write("* Unless required by applicable law or agreed to in writing, software\n");
        cc.write("* distributed under the License is distributed on an \"AS IS\" BASIS,\n");
        cc.write("* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n");
        cc.write("* See the License for the specific language governing permissions and\n");
        cc.write("* limitations under the License.\n");
        cc.write("*/\n");
        cc.write("\n");

        hh.write("#ifndef __" + mName.toUpperCase().replace('.', '_') + "__\n");
        hh.write("#define __" + mName.toUpperCase().replace('.', '_') + "__\n");

        hh.write("#include \"recordio.hh\"\n");
        for (Iterator<JFile> i = mInclFiles.iterator(); i.hasNext();) {
            JFile f = i.next();
            hh.write("#include \"" + f.getName() + ".hh\"\n");
        }
        cc.write("#include \"" + mName + ".hh\"\n");

        for (Iterator<JRecord> i = mRecList.iterator(); i.hasNext();) {
            JRecord jr = i.next();
            jr.genCppCode(hh, cc);
        }

        hh.write("#endif //" + mName.toUpperCase().replace('.', '_') + "__\n");

        hh.close();
        cc.close();
    }
690935
public static void main(String[] args) throws IOException {
    if (args.length != 2) {
      System.out.println("java -cp " + RuntimeConstants.ALLUXIO_JAR
          + " alluxio.examples.BasicCheckpoint <FileFolder> <Files>");
      System.exit(-1);
    }
    FileSystemContext fsContext =
        FileSystemContext.create(new InstancedConfiguration(ConfigurationUtils.defaults()));
    boolean result = CliUtils.runExample(new BasicCheckpoint(args[0], Integer.parseInt(args[1]),
        fsContext));
    System.exit(result ? 0 : 1);
  }
485819
public static void createFile(String filePath) throws IOException {
    Path storagePath = Paths.get(filePath);
    Files.createDirectories(storagePath.getParent());
    Files.createFile(storagePath);
  }
265671
static public void main(String[] argv) throws IOException,FileNotFoundException
    {
	SoftDictionary m = new SoftDictionary();
	System.out.println("loading...");
	m.loadAliases(new File(argv[0]));
	System.out.println("loaded...");
	for (int i=1; i<argv.length; i++) {
	    System.out.println("lookup: "+argv[i]);
	    String[] f = argv[i].split(":");
	    if (f.length==1) {
		System.out.println(argv[i] +" => "+m.lookup(argv[i])+" at "+m.lookupDistance(argv[i]));
	    } else {
		System.out.println(f[1] +" => "+m.lookup(f[0],f[1])+" at "+m.lookupDistance(f[0],f[1]));
	    }
	}
    }
131369
private void createSystemFolder() throws IOException {
        if(!Files.exists(systemLocation.toPath()))
            Files.createDirectories(systemLocation.toPath());
    }
194598
public static void main(String[] args) {
        DirectoryIterator iter = new DirectoryIterator(args);
        while(iter.hasNext())
            System.out.println(iter.next().getAbsolutePath());
    }
1174950
public static void main(String[] argv) {
    if (argv.length == 0) {
      printUsage("");
      System.exit(-1);
    }

    String inputPathsString = null;
    Path outputPath = null;
    String shardsString = null;
    String indexPath = null;
    int numShards = -1;
    int numMapTasks = -1;
    Configuration conf = new Configuration();
    String confPath = null;

    // parse the command line
    for (int i = 0; i < argv.length; i++) { // parse command line
      if (argv[i].equals("-inputPaths")) {
        inputPathsString = argv[++i];
      } else if (argv[i].equals("-outputPath")) {
        outputPath = new Path(argv[++i]);
      } else if (argv[i].equals("-shards")) {
        shardsString = argv[++i];
      } else if (argv[i].equals("-indexPath")) {
        indexPath = argv[++i];
      } else if (argv[i].equals("-numShards")) {
        numShards = Integer.parseInt(argv[++i]);
      } else if (argv[i].equals("-numMapTasks")) {
        numMapTasks = Integer.parseInt(argv[++i]);
      } else if (argv[i].equals("-conf")) {
        // add as a local FS resource
        confPath = argv[++i];
        conf.addResource(new Path(confPath));
      } else {
        System.out.println("Unknown option " + argv[i] + " w/ value "
            + argv[++i]);
      }
    }
    LOG.info("inputPaths = " + inputPathsString);
    LOG.info("outputPath = " + outputPath);
    LOG.info("shards     = " + shardsString);
    LOG.info("indexPath  = " + indexPath);
    LOG.info("numShards  = " + numShards);
    LOG.info("numMapTasks= " + numMapTasks);
    LOG.info("confPath   = " + confPath);

    Path[] inputPaths = null;
    Shard[] shards = null;

    JobConf jobConf = new JobConf(conf);
    IndexUpdateConfiguration iconf = new IndexUpdateConfiguration(jobConf);

    if (inputPathsString != null) {
      jobConf.set("mapred.input.dir", inputPathsString);
    }
    inputPaths = FileInputFormat.getInputPaths(jobConf);
    if (inputPaths.length == 0) {
      inputPaths = null;
    }

    if (outputPath == null) {
      outputPath = FileOutputFormat.getOutputPath(jobConf);
    }

    if (inputPaths == null || outputPath == null) {
      System.err.println("InputPaths and outputPath must be specified.");
      printUsage("");
      System.exit(-1);
    }

    if (shardsString != null) {
      iconf.setIndexShards(shardsString);
    }
    shards = Shard.getIndexShards(iconf);
    if (shards != null && shards.length == 0) {
      shards = null;
    }

    if (indexPath == null) {
      indexPath = getIndexPath(conf);
    }
    if (numShards <= 0) {
      numShards = getNumShards(conf);
    }

    if (shards == null && indexPath == null) {
      System.err.println("Either shards or indexPath must be specified.");
      printUsage("");
      System.exit(-1);
    }

    if (numMapTasks <= 0) {
      numMapTasks = jobConf.getNumMapTasks();
    }

    try {
      // create shards and set their directories if necessary
      if (shards == null) {
        shards = createShards(indexPath, numShards, conf);
      }

      long startTime = now();
      try {
        IIndexUpdater updater =
            (IIndexUpdater) ReflectionUtils.newInstance(
                iconf.getIndexUpdaterClass(), conf);
        LOG.info("sea.index.updater = "
            + iconf.getIndexUpdaterClass().getName());

        updater.run(conf, inputPaths, outputPath, numMapTasks, shards);
        LOG.info("Index update job is done");

      } finally {
        long elapsedTime = now() - startTime;
        LOG.info("Elapsed time is  " + (elapsedTime / 1000) + "s");
        System.out.println("Elapsed time is " + (elapsedTime / 1000) + "s");
      }
    } catch (Exception e) {
      e.printStackTrace(System.err);
    }
  }