A main method that will display the results of a few example value
distributions. Useful for tweaking the charts and UI.

@param args
196869
public static void main(final String[] args) {
        LookAndFeelManager.get().init();

        final Injector injector = Guice.createInjector(new DCModuleImpl());

        // run a small job
        final AnalysisJobBuilder ajb = injector.getInstance(AnalysisJobBuilder.class);
        final Datastore ds = injector.getInstance(DatastoreCatalog.class).getDatastore("orderdb");
        final DatastoreConnection con = ds.openConnection();
        final SchemaNavigator sn = con.getSchemaNavigator();
        ajb.setDatastore(ds);
        ajb.addSourceColumns(sn.convertToTable("PUBLIC.CUSTOMERS").getColumns());

        final AnalyzerComponentBuilder<ValueDistributionAnalyzer> singleValueDist =
                ajb.addAnalyzer(ValueDistributionAnalyzer.class);
        singleValueDist.addInputColumn(ajb.getSourceColumnByName("PUBLIC.CUSTOMERS.ADDRESSLINE2"));

        final AnalyzerComponentBuilder<ValueDistributionAnalyzer> groupedValueDist =
                ajb.addAnalyzer(ValueDistributionAnalyzer.class);
        groupedValueDist.addInputColumn(ajb.getSourceColumnByName("PUBLIC.CUSTOMERS.CITY"));
        groupedValueDist.setConfiguredProperty("Group column", ajb.getSourceColumnByName("PUBLIC.CUSTOMERS.COUNTRY"));

        final ResultWindow resultWindow = injector.getInstance(ResultWindow.class);
        resultWindow.setVisible(true);
        resultWindow.startAnalysis();
    }
1086042
public static void main(String[] args) {
    SparkSession spark = SparkSession
      .builder()
      .appName("Java Spark SQL user-defined Datasets aggregation example")
      .getOrCreate();

    // $example on:typed_custom_aggregation$
    Encoder<Employee> employeeEncoder = Encoders.bean(Employee.class);
    String path = "examples/src/main/resources/employees.json";
    Dataset<Employee> ds = spark.read().json(path).as(employeeEncoder);
    ds.show();
    // +-------+------+
    // |   name|salary|
    // +-------+------+
    // |Michael|  3000|
    // |   Andy|  4500|
    // | Justin|  3500|
    // |  Berta|  4000|
    // +-------+------+

    MyAverage myAverage = new MyAverage();
    // Convert the function to a `TypedColumn` and give it a name
    TypedColumn<Employee, Double> averageSalary = myAverage.toColumn().name("average_salary");
    Dataset<Double> result = ds.select(averageSalary);
    result.show();
    // +--------------+
    // |average_salary|
    // +--------------+
    // |        3750.0|
    // +--------------+
    // 
    spark.stop();
  }
809489
public static void main(String[] args)
    {
        System.out.println("fact(5)=" + factorial(5));
        System.out.println("fact(3)=" + factorial(3));
        List<String> list = Arrays.asList("1", "2", "3", "4", "5");
        CombinationGenerator<String> combos = new CombinationGenerator<String>(list, 3);
        int count = 1;
        System.out.println("Total number=" + combos.getTotalNumberOfCombinations());
        for (List<String> combination : combos)
        {
            System.out.println(count + ": " + combination + " {" + combos.indexesAsString + "}");
            count++;
        }
    }
697908
public static void main(String[] args) {
		// get the sample tree
		String treeName = (args.length > 0) ? args[0] : "";
		TreeForTreeLayout<TextInBox> tree = getSampleTree(treeName);
				
		// setup the tree layout configuration
		double gapBetweenLevels = 50;
		double gapBetweenNodes = 10;
		DefaultConfiguration<TextInBox> configuration = new DefaultConfiguration<TextInBox>(
				gapBetweenLevels, gapBetweenNodes);

		// create the NodeExtentProvider for TextInBox nodes
		TextInBoxNodeExtentProvider nodeExtentProvider = new TextInBoxNodeExtentProvider();

		// create the layout
		TreeLayout<TextInBox> treeLayout = new TreeLayout<TextInBox>(tree,
				nodeExtentProvider, configuration);

		// Create a panel that draws the nodes and edges and show the panel
		TextInBoxTreePane panel = new TextInBoxTreePane(treeLayout);
		showInDialog(panel);
	}
725657
public static void main( String... args )
    {
        System.out.println( "Display parameters as parsed by Maven (in canonical form) and comparison result:" );
        if ( args.length == 0 )
        {
            return;
        }

        ComparableVersion prev = null;
        int i = 1;
        for ( String version : args )
        {
            ComparableVersion c = new ComparableVersion( version );

            if ( prev != null )
            {
                int compare = prev.compareTo( c );
                System.out.println( "   " + prev.toString() + ' '
                    + ( ( compare == 0 ) ? "==" : ( ( compare < 0 ) ? "<" : ">" ) ) + ' ' + version );
            }

            System.out.println( String.valueOf( i++ ) + ". " + version + " == " + c.getCanonical() );

            prev = c;
        }
    }
1103833
public static void main(String[] args) {

		showTitle("JRE Properties"); //$NON-NLS-1$

		showPropertyValue("java.class.path"); //$NON-NLS-1$
		showPropertyValue("java.library.path"); //$NON-NLS-1$
		showPropertyValue("java.home"); //$NON-NLS-1$
		showPropertyValue("os.name"); //$NON-NLS-1$
		showPropertyValue("os.version"); //$NON-NLS-1$
		showPropertyValue("file.separator"); //$NON-NLS-1$
		showPropertyValue("path.separator"); //$NON-NLS-1$
		showPropertyValue("sun.arch.data.model"); //$NON-NLS-1$
		showPropertyValue("user.dir"); //$NON-NLS-1$
		showPropertyValue("user.name"); //$NON-NLS-1$
		showPropertyValue("user.home"); //$NON-NLS-1$

		showTitle("FileSystem"); //$NON-NLS-1$

		showValue("getUserHomeDirectoryName()", FileSystem.getUserHomeDirectoryName()); //$NON-NLS-1$
		try {
			showValue("getUserHomeDirectory()", FileSystem.getUserHomeDirectory()); //$NON-NLS-1$
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		showTitle("OperatingSystem"); //$NON-NLS-1$

		showValue("getCurrentOSName()", OperatingSystem.getCurrentOSName()); //$NON-NLS-1$
		showValue("getCurrentOSVersion()", OperatingSystem.getCurrentOSVersion()); //$NON-NLS-1$
		showValue("getOSSerialNumber()", OperatingSystem.getOSSerialNumber()); //$NON-NLS-1$
		showValue("getOSUUID()", OperatingSystem.getOSUUID()); //$NON-NLS-1$
		showValue("getIdentificationType()", OperatingSystem.getIdentificationType().name()); //$NON-NLS-1$
		showValue("getOperatingSystemArchitectureDataModel()", //$NON-NLS-1$
				Integer.toString(OperatingSystem.getOperatingSystemArchitectureDataModel()));
		showValue("getCurrentOS()", OperatingSystem.getCurrentOS().name()); //$NON-NLS-1$
		showValue("is32BitOperatingSystem()", Boolean.toString(OperatingSystem.is32BitOperatingSystem())); //$NON-NLS-1$
		showValue("is64BitOperatingSystem()", Boolean.toString(OperatingSystem.is64BitOperatingSystem())); //$NON-NLS-1$
	}
108893
public static void main(String[] args) {
        DEBUG_MODE_V = DebugMode.SCREEN;
        Log.initScreen();
        printVerbose(null, null);
    }
522297
public static void main(String[] args)
   {
      final int argsLength = args.length;
      if (argsLength < 1)
      {
         usage();
         System.exit(OTHER);
      }
      String rarFile = "";
      String[] cps = null;
      boolean stdout = false;
      String reportFile = "";

      for (int i = 0; i < argsLength; i++)
      {
         String arg = args[i];
         if (arg.equals(ARGS_CP))
         {
            cps = args[++i].split(System.getProperty("path.separator"));
         }
         else if (arg.equals(ARGS_STDOUT))
         {
            stdout = true;
         }
         else if (arg.equals(ARGS_OUT))
         {
            reportFile = args[++i];
         }
         else if (arg.endsWith("rar"))
         {
            rarFile = arg;
         }
         else
         {
            usage();
            System.exit(OTHER);
         }
      }
      int exitCode = rarInfo(rarFile, cps, stdout, reportFile);
      if (exitCode == SUCCESS)
      {
         System.out.println("Done.");
      }
      System.exit(exitCode);
   }
703402
public static void main(String[] args) {
		Test instance = JKFactory.instance(Test.class);
		System.out.println(instance.hello());
		System.out.println(instance.hello());
		System.out.println(instance.hello());
		System.out.println(instance.hello());

	}
423492
public static void main(String[] args) {
		if (args.length != 1) {
			System.err.println("usage: java " + Builder.class.getName() + " <expression string>");
			System.exit(1);
		}
		PrintWriter out = new PrintWriter(System.out);
		Tree tree = null;
		try {
			tree = new Builder(Feature.METHOD_INVOCATIONS).build(args[0]);
		} catch (TreeBuilderException e) {
			System.out.println(e.getMessage());
			System.exit(0);
		}
		NodePrinter.dump(out, tree.getRoot());
		if (!tree.getFunctionNodes().iterator().hasNext() && !tree.getIdentifierNodes().iterator().hasNext()) {
			ELContext context = new ELContext() {
				@Override
				public VariableMapper getVariableMapper() {
					return null;
				}
				@Override
				public FunctionMapper getFunctionMapper() {
					return null;
				}
				@Override
				public ELResolver getELResolver() {
					return null;
				}
			};
			out.print(">> ");
			try {
				out.println(tree.getRoot().getValue(new Bindings(null, null), context, null));
			} catch (ELException e) {
				out.println(e.getMessage());
			}
		}
		out.flush();
	}
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);
        }
      }
    });
  }
668334
public static void main(String[] args) {
    Counter<String> c2 = new ClassicCounter<String>();
    c2.incrementCount("p", 13);
    c2.setCount("q", 12);
    c2.setCount("w", 5);
    c2.incrementCount("x", 7.5);
    // System.out.println(getDistribution(c2).getCount("w") + " should be 0.13333");

    ClassicCounter<String> c = new ClassicCounter<String>();

    final double p = 1000;

    String UNK = "!*UNKNOWN*!";
    Set<String> s = new HashSet<String>();
    s.add(UNK);

    // fill counter with roughly Zipfian distribution
    //    "1" : 1000
    //    "2" :  500
    //    "3" :  333
    //       ...
    //  "UNK" :   45
    //       ...
    //  "666" :    2
    //  "667" :    1
    //       ...
    // "1000" :    1
    for (int rank = 1; rank < 2000; rank++) {
      String i = String.valueOf(rank);
      c.setCount(i, Math.round(p / rank));
      s.add(i);
    }
    for (int rank = 2000; rank <= 4000; rank++) {
      String i = String.valueOf(rank);
      s.add(i);
    }

    Distribution<String> n = getDistribution(c);
    Distribution<String> prior = getUniformDistribution(s);
    Distribution<String> dir1 = distributionWithDirichletPrior(c, prior, 4000);
    Distribution<String> dir2 = dynamicCounterWithDirichletPrior(c, prior, 4000);
    Distribution<String> add1;
    Distribution<String> gt;
    if (true) {
      add1 = laplaceSmoothedDistribution(c, 4000);
      gt = goodTuringSmoothedCounter(c, 4000);
    } else {
      c.setCount(UNK, 45);
      add1 = laplaceWithExplicitUnknown(c, 0.5, UNK);
      gt = goodTuringWithExplicitUnknown(c, UNK);
    }
    Distribution<String> sgt = simpleGoodTuring(c, 4000);

    System.out.printf("%10s %10s %10s %10s %10s %10s %10s%n",
                      "Freq", "Norm", "Add1", "Dir1", "Dir2", "GT", "SGT");
    System.out.printf("%10s %10s %10s %10s %10s %10s %10s%n",
                      "----------", "----------", "----------", "----------", "----------", "----------", "----------");

    for (int i = 1; i < 5; i++) {
      System.out.printf("%10d ", Math.round(p / i));
      String in = String.valueOf(i);
      System.out.printf("%10.8f ", n.probabilityOf(String.valueOf(in)));
      System.out.printf("%10.8f ", add1.probabilityOf(in));
      System.out.printf("%10.8f ", dir1.probabilityOf(in));
      System.out.printf("%10.8f ", dir2.probabilityOf(in));
      System.out.printf("%10.8f ", gt.probabilityOf(in));
      System.out.printf("%10.8f ", sgt.probabilityOf(in));
      System.out.println();
    }

    System.out.printf("%10s %10s %10s %10s %10s %10s %10s%n",
                      "----------", "----------", "----------", "----------", "----------", "----------", "----------");
    System.out.printf("%10d ", 1);
    String last = String.valueOf(1500);
    System.out.printf("%10.8f ", n.probabilityOf(last));
    System.out.printf("%10.8f ", add1.probabilityOf(last));
    System.out.printf("%10.8f ", dir1.probabilityOf(last));
    System.out.printf("%10.8f ", dir2.probabilityOf(last));
    System.out.printf("%10.8f ", gt.probabilityOf(last));
    System.out.printf("%10.8f ", sgt.probabilityOf(last));
    System.out.println();

    System.out.printf("%10s %10s %10s %10s %10s %10s %10s%n",
                      "----------", "----------", "----------", "----------", "----------", "----------", "----------");
    System.out.printf("%10s ", "UNK");
    System.out.printf("%10.8f ", n.probabilityOf(UNK));
    System.out.printf("%10.8f ", add1.probabilityOf(UNK));
    System.out.printf("%10.8f ", dir1.probabilityOf(UNK));
    System.out.printf("%10.8f ", dir2.probabilityOf(UNK));
    System.out.printf("%10.8f ", gt.probabilityOf(UNK));
    System.out.printf("%10.8f ", sgt.probabilityOf(UNK));
    System.out.println();

    System.out.printf("%10s %10s %10s %10s %10s %10s %10s%n",
                      "----------", "----------", "----------", "----------", "----------", "----------", "----------");
    System.out.printf("%10s ", "RESERVE");
    System.out.printf("%10.8f ", n.getReservedMass());
    System.out.printf("%10.8f ", add1.getReservedMass());
    System.out.printf("%10.8f ", dir1.getReservedMass());
    System.out.printf("%10.8f ", dir2.getReservedMass());
    System.out.printf("%10.8f ", gt.getReservedMass());
    System.out.printf("%10.8f ", sgt.getReservedMass());
    System.out.println();

    System.out.printf("%10s %10s %10s %10s %10s %10s %10s%n",
                      "----------", "----------", "----------", "----------", "----------", "----------", "----------");
    System.out.printf("%10s ", "Total");
    System.out.printf("%10.8f ", n.totalCount());
    System.out.printf("%10.8f ", add1.totalCount());
    System.out.printf("%10.8f ", dir1.totalCount());
    System.out.printf("%10.8f ", dir2.totalCount());
    System.out.printf("%10.8f ", gt.totalCount());
    System.out.printf("%10.8f ", sgt.totalCount());
    System.out.println();

  }
435644
public static void main(final String[] args) {
          final JFrame j = new OSMMapTilePackagerUI();
          j.setPreferredSize(new Dimension(640, 400));
          j.setDefaultCloseOperation(EXIT_ON_CLOSE);
          j.pack();
          j.setVisible(true);
     }
955966
@SuppressWarnings("unused")
	public static void main(String[] args) {
		if (false) {
			long capacity = 1;
			int count = 1;
			while (capacity < Integer.MAX_VALUE) {
				capacity = java.math.BigInteger.valueOf(capacity).nextProbablePrime().longValue();
				System.out.print(capacity + ", ");
				final double inc = Math.log(2) / Math.log(capacity << 5) * 10 + 1;
				// System.out.println(inc);
				capacity *= inc;
				if (count % 5 == 0) {
					System.out.println();
				}
				count++;
			}
			System.out.println(Integer.MAX_VALUE);
			System.out.println("------");

			System.out.println(count);
			System.out.println(PrimeFinder.nextPrime((int) 1e6));
		}
		if (true) {
			IntHashMap<Integer> hash = new IntHashMap<Integer>(16, Integer.class);
			hash.put(1, 2);
			hash.put(2, 4);
			for (Integer i : hash.getValues()) {
				System.out.println(i);
			}
		}
	}
934842
public static void main(String[] args) {

    CifarDAO.init("/usr/local/Datasets"); // setup data
    try {
      CifarImageDisplayApp cifarImageDisplayApp = new CifarImageDisplayApp();
      cifarImageDisplayApp.go(args);
    } catch (Exception e) {
      // eat it.
    } finally {
      CifarDAO.release();// release data resources
    }
  }
1097959
public static void main(String[] args) {
    SparkSession spark = SparkSession
      .builder()
      .appName("Java Spark SQL user-defined DataFrames aggregation example")
      .getOrCreate();

    // $example on:untyped_custom_aggregation$
    // Register the function to access it
    spark.udf().register("myAverage", new MyAverage());

    Dataset<Row> df = spark.read().json("examples/src/main/resources/employees.json");
    df.createOrReplaceTempView("employees");
    df.show();
    // +-------+------+
    // |   name|salary|
    // +-------+------+
    // |Michael|  3000|
    // |   Andy|  4500|
    // | Justin|  3500|
    // |  Berta|  4000|
    // +-------+------+

    Dataset<Row> result = spark.sql("SELECT myAverage(salary) as average_salary FROM employees");
    result.show();
    // +--------------+
    // |average_salary|
    // +--------------+
    // |        3750.0|
    // +--------------+
    // 

    spark.stop();
  }
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();
	}