Examples of Options


Examples of org.openflow.example.cli.Options

        sc.threadCount = Integer.valueOf(cmd.getOptionValue("t"));
        sc.run();
    }

    public static SimpleCLI parseArgs(String[] args) {
        Options options = new Options();
        options.addOption("h", "help", "print help");
        // unused?
        // options.addOption("n", true, "the number of packets to send");
        options.addOption("p", "port", 6633, "the port to listen on");
        options.addOption("t", "threads", 1, "the number of threads to run");
        try {
            SimpleCLI cmd = SimpleCLI.parse(options, args);
            if (cmd.hasOption("h")) {
                printUsage(options);
                System.exit(0);
View Full Code Here

Examples of org.openjdk.jmh.runner.options.Options

        counter.inc(nextValue);
        return counter;
    }

    public static void main(String[] args) throws RunnerException {
        Options opt = new OptionsBuilder()
                .include(".*" + CounterBenchmark.class.getSimpleName() + ".*")
                .warmupIterations(3)
                .measurementIterations(5)
                .threads(4)
                .forks(1)
View Full Code Here

Examples of org.openqa.selenium.WebDriver.Options

    public void test_webDriver_methods_which_should_not_return_proxy() {
        IsNotProxyable isNotProxyable = new IsNotProxyable();

        // when
        WebDriver driver = Mockito.mock(WebDriver.class, isNotProxyable);
        Options options = mock(Options.class, isNotProxyable);
        Navigation navigation = mock(Navigation.class, isNotProxyable);
        ImeHandler ime = mock(ImeHandler.class, isNotProxyable);
        Logs logs = mock(Logs.class, isNotProxyable);

        // then
        try {
            driver.toString();
            driver.close();
            driver.equals(new Object());
            driver.get("");
            driver.getClass();
            driver.getCurrentUrl();
            driver.getPageSource();
            driver.getTitle();
            driver.getWindowHandle();
            driver.hashCode();
            driver.quit();
            driver.toString();

            options.addCookie(mock(Cookie.class));
            options.deleteAllCookies();
            options.deleteCookie(mock(Cookie.class));
            options.deleteCookieNamed("");
            options.getCookieNamed("");

            navigation.back();
            navigation.forward();
            navigation.to("");
            navigation.to(new URL("http://localhost/"));
View Full Code Here

Examples of org.openquark.cal.compiler.SourceModelCodeFormatter.Options

    public Void visit_CALDoc_TextSegment_InlineTag_URL(
            CALDoc.TextSegment.InlineTag.URL segment, Options options) {

        SourceModel.verifyArg(segment, "segment");

        Options info = options;

        sb.append("{@url ");

        beginAtomicCalDocItem();
        segment.getContent().accept(this, info);
View Full Code Here

Examples of org.qi4j.api.value.ValueSerializer.Options

                        {
                            json.put( key, value );
                        }
                        else
                        {
                            String serialized = valueSerializer.serialize( new Options().withoutTypeInfo(), value );
                            // TODO Theses tests are pretty fragile, find a better way to fix this, Jackson API should behave better
                            if( serialized.startsWith( "{" ) )
                            {
                                json.put( key, new JSONObject( serialized ) );
                            }
View Full Code Here

Examples of org.renjin.eval.Options

    return true;
  }

  @Internal
  public static ListVector options(@Current Context context, @ArgumentList ListVector arguments) {
    Options options = context.getSession().getSingleton(Options.class);
   
    ListVector.NamedBuilder results = ListVector.newNamedBuilder();

    if (arguments.length() == 0) {
      // return all options as a list
      for (String name : options.names()) {
        results.add(name, options.get(name));
      }

    } else if (arguments.length() == 1
        && arguments.getElementAsSEXP(0) instanceof ListVector
        && StringVector.isNA(arguments.getName(0))) {
      ListVector list = (ListVector) arguments.getElementAsSEXP(0);
      if (list.getAttribute(Symbols.NAMES) == Null.INSTANCE) {
        throw new EvalException("list argument has no valid names");
      }
      for (NamedValue argument : list.namedValues()) {
        if (!argument.hasName()) {
          throw new EvalException("invalid argument");
        }
        String name = argument.getName();
        results.add(name, options.set(name, argument.getValue()));
      }

    } else {
      for (NamedValue argument : arguments.namedValues()) {
        if (argument.hasName()) {
          String name = argument.getName();
          results.add(name, options.set(name, argument.getValue()));

        } else if (argument.getValue() instanceof StringVector) {
          String name = ((StringVector) argument.getValue())
              .getElementAsString(0);
          results.add(name, options.get(name));

        } else {
          throw new EvalException("invalid argument");
        }
      }
View Full Code Here

Examples of org.rocksdb.Options

  public TemporaryFolder dbFolder = new TemporaryFolder();

  @Test
  public void rocksIterator() throws RocksDBException {
    RocksDB db = null;
    Options options = null;
    RocksIterator iterator = null;
    try {
      options = new Options();
      options.setCreateIfMissing(true)
          .setCreateMissingColumnFamilies(true);
      db = RocksDB.open(options,
          dbFolder.getRoot().getAbsolutePath());
      db.put("key1".getBytes(), "value1".getBytes());
      db.put("key2".getBytes(), "value2".getBytes());

      iterator = db.newIterator();

      iterator.seekToFirst();
      assertThat(iterator.isValid()).isTrue();
      assertThat(iterator.key()).isEqualTo("key1".getBytes());
      assertThat(iterator.value()).isEqualTo("value1".getBytes());
      iterator.next();
      assertThat(iterator.isValid()).isTrue();
      assertThat(iterator.key()).isEqualTo("key2".getBytes());
      assertThat(iterator.value()).isEqualTo("value2".getBytes());
      iterator.next();
      assertThat(iterator.isValid()).isFalse();
      iterator.seekToLast();
      iterator.prev();
      assertThat(iterator.isValid()).isTrue();
      assertThat(iterator.key()).isEqualTo("key1".getBytes());
      assertThat(iterator.value()).isEqualTo("value1".getBytes());
      iterator.seekToFirst();
      iterator.seekToLast();
      assertThat(iterator.isValid()).isTrue();
      assertThat(iterator.key()).isEqualTo("key2".getBytes());
      assertThat(iterator.value()).isEqualTo("value2".getBytes());
      iterator.status();
    } finally {
      if (db != null) {
        db.close();
      }
      if (options != null) {
        options.dispose();
      }
      if (iterator != null) {
        iterator.dispose();
      }
    }
View Full Code Here

Examples of org.snova.http.client.Options

    {
      return;
    }
    final IniProperties cfg = SnovaConfiguration.getInstance()
            .getIniProperties();
    Options options = new Options();
    options.maxIdleConnsPerHost = cfg.getIntProperty("C4",
            "ConnectionPoolSize", 5);
    final String proxy = cfg.getProperty("C4", "Proxy");
    if (null != proxy)
    {
View Full Code Here

Examples of org.wicketstuff.jquery.Options

  public Page4JGrowl() {

    final JGrowlFeedbackPanel feedback = new JGrowlFeedbackPanel("jgrowlFeedback");
    add(feedback);
   
    final Options errorOptions = new Options();
    errorOptions.set("header", "Error");
    errorOptions.set("theme", "error");
    errorOptions.set("glue", "before");
    feedback.setErrorMessageOptions(errorOptions);
   
    final Options infoOptions = new Options();
    infoOptions.set("header", "Info");
    infoOptions.set("theme", "info");
    infoOptions.set("glue", "after");
    feedback.setInfoMessageOptions(infoOptions);

    final AjaxLink<Void> link = new AjaxLink<Void>("showButton") {

      @Override
View Full Code Here

Examples of org.yinwang.pysonar.Options

        return f;
    }


    public static void main(@NotNull String[] args) throws Exception {
        Options options = new Options(args);

        List<String> argsList = options.getArgs();
        String fileOrDir = argsList.get(0);
        OUTPUT_DIR = new File(argsList.get(1));

//        System.out.println("options: " + options.getOptionsMap());
        new Demo().start(fileOrDir, options.getOptionsMap());
        _.msg(_.getGCStats());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.