Examples of choose()


Examples of com.facebook.LinkBench.distributions.ProbabilityDistribution.choose()

    ProbabilityDistribution dist = getDist();
    long min = 453, max = 26546454;
    dist.init(min, max, getDistParams(), "");
    Random rng = initRandom("testChooseSanity");
    for (int i = 0; i < 100000; i++) {
      long id = dist.choose(rng);
      assertTrue(id >= min);
      assertTrue(id < max);
    }
  }

Examples of com.facebook.LinkBench.distributions.UniformDistribution.choose()

    for (long max: maxes) {
      UniformDistribution dist = new UniformDistribution();
      dist.init(0, max, 1);
      for (int trial = 0; trial < trials; trial++) {
        long i = dist.choose(rng);
        assertTrue(i >= 0);
        assertTrue(i < max);
      }
    }
  }

Examples of com.intellij.openapi.fileChooser.FileChooserDialog.choose()

        });
        results.getXsltButton().addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent actionEvent) {
                final FileSaverDescriptor descriptor = new FileSaverDescriptor("Choose xsl file", "xsl");
                final FileChooserDialog dialog = FileChooserFactory.getInstance().createFileChooser(descriptor, javaPuzzlersGame.getProject());
                VirtualFile[] xsl = dialog.choose(null, javaPuzzlersGame.getProject());
                results.transformXML(javaPuzzlersGame.getProject(), login.getLogin(), xsl[0]);

            }
        });

Examples of com.intellij.openapi.fileChooser.FileSaverDialog.choose()

        });
        results.getXsltButton().addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent actionEvent) {
                final FileSaverDescriptor descriptor = new FileSaverDescriptor("Choose xsl file", "xsl");
                final FileChooserDialog dialog = FileChooserFactory.getInstance().createFileChooser(descriptor, javaPuzzlersGame.getProject());
                VirtualFile[] xsl = dialog.choose(null, javaPuzzlersGame.getProject());
                results.transformXML(javaPuzzlersGame.getProject(), login.getLogin(), xsl[0]);

            }
        });

Examples of com.ipc.oce.query.OCQueryResult.choose()

    // set parameters
    query.setParameter("NUM_A", new OCVariant(number));
    query.setParameter("DATE_A", new OCVariant(docDate));
   
    OCQueryResult result = query.execute();
    OCQueryResultSelection selection = result.choose();
    OCDocumentRef ref = null;
    if (selection.next()) {
      ref = new OCDocumentRef(selection.getObject(0));
    } else {
      ref = emptyRef();

Examples of edu.isi.karma.cleaning.ExampleSelection.Choose()

        if (entries.size() <= 1)
          return;
        ExampleSelection expsel = new ExampleSelection();
        ExampleSelection.firsttime = true;
        expsel.inite(xHashMap, null);
        int target = Integer.parseInt(expsel.Choose());
        String[] mt = { "<_START>" + entries.get(target)[0] + "<_END>",
            entries.get(target)[1] };
        examples.add(mt);
        ExampleSelection.firsttime = false;
        // accuracy record code

Examples of io.fabric8.gateway.loadbalancer.LoadBalancer.choose()

     * Chooses a back end service from the set of destination templates
     */
    public UriTemplateDefinition chooseBackEndService(ClientRequestFacade requestFacade) {
        LoadBalancer loadBalancer = getLoadBalancer().getLoadBalancer();
        List<UriTemplateDefinition> uriDefList = new ArrayList<UriTemplateDefinition>(destinationUriTemplates);
        return loadBalancer.choose(uriDefList, requestFacade);
    }

    // DSL
    //-------------------------------------------------------------------------

Examples of mage.players.Player.choose()

      Card card = player.getLibrary().removeFromTop(game);
      cards.add(card);
      game.setZone(card.getId(), Zone.PICK);
    }
    TargetCard target1 = new TargetCard(Zone.PICK, filter1);
    while (cards.size() > 0 && player.choose(cards, target1, game)) {
      Card card = cards.get(target1.getFirstTarget(), game);
      cards.remove(card);
      card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
      target1.clearChosen();
    }

Examples of mage.target.Target.choose()

                    target = new TargetCardInYourGraveyard(Math.min(player.getGraveyard().count(filter, game), amount), filter);
                    break;
                default:
            }
            if (target != null && target.canChoose(player.getId(), game)) {
                if (target.choose(Outcome.Exile, player.getId(), source.getSourceId(), game)) {
                    for (UUID cardId : target.getTargets()) {
                        Card card = game.getCard(cardId);
                        if (card != null) {
                            card.moveToExile(exileId, exileName, source.getSourceId(), game);
                        }

Examples of mage.target.TargetPermanent.choose()

            if (cost instanceof RemoveVariableCountersSourceCost) {
                numberToTap = ((RemoveVariableCountersSourceCost) cost).getAmount();
            }
        }
        TargetPermanent target = new TargetPermanent(numberToTap, filter);
        if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.Tap, source.getControllerId(), source.getSourceId(), game)) {
            if (!target.getTargets().isEmpty()) {
                List<UUID> targets = target.getTargets();
                for (UUID targetId : targets) {
                    Permanent permanent = game.getPermanent(targetId);
                    if (permanent != null) {
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.