Examples of nextInt()


Examples of java.util.Scanner.nextInt()

             "3: Remove a domain " +
             "4:Enquire Domain " +
             "5:Exit";
        
         System.out.println(commandStr);
         int choice = in.nextInt();
        
         switch(choice)
         {
            case 0: //Encrypt Keystore Password
               System.out.println("Enter Keystore password");
View Full Code Here

Examples of java.util.concurrent.ThreadLocalRandom.nextInt()

                       ResultSet.TYPE_FORWARD_ONLY,
                       ResultSet.CONCUR_READ_ONLY))
            {
              for (int i = 0; i < queries; i++)
              {
                  statement.setInt(1, random.nextInt(DB_ROWS) + 1);
                  try (ResultSet resultSet = statement.executeQuery())
                  {
                      resultSet.next();
                      worlds[i] = new World(
                              resultSet.getInt("id"),
View Full Code Here

Examples of net.yacy.document.importer.OAIPMHLoader.nextInt()

                Random r = new Random(System.currentTimeMillis());
               
                // start jobs for the sources
                DigestURI url = null;
                while (sourceList.size() > 0) {
                    String oaipmhurl = sourceList.remove(r.nextInt(sourceList.size()));
                    try {
                        url = new DigestURI(oaipmhurl);
                        OAIPMHImporter job = new OAIPMHImporter(sb.loader, url);
                        job.start();
                    } catch (MalformedURLException e) {
View Full Code Here

Examples of org.ajax4jsf.util.Zipper2.nextInt()

  if (objectArray != null) {
      Zipper2 zipper2 = new Zipper2(objectArray);

      data.setGradientType(GradientType.values()[zipper2.nextByte()]);
      data.setGradientAlignment(GradientAlignment.values()[zipper2.nextByte()]);
      data.setGradientHeight(zipper2.nextInt());
      data.setBaseColor(Integer.valueOf(zipper2.nextIntColor()));

      if (zipper2.hasMore()) {
    data.setGradientColor(Integer.valueOf(zipper2.nextIntColor()));
      } else {
View Full Code Here

Examples of org.apache.cassandra.stress.generate.FasterRandom.nextInt()

        for (int loop = 0 ; loop < 100 ; loop++)
        {
            System.out.println(loop);
            for (int i = 0 ; i < 100000 ; i++)
            {
                int index = rand.nextInt(100000);
                Integer seed = list.get(index);
//                assert canon.headSet(seed, false).size() == index;
                list.remove(nodes.remove(seed));
                canon.remove(seed);
                nodes.put(c, list.append(c));
View Full Code Here

Examples of org.apache.commons.math.random.RandomData.nextInt()

        RandomData randomData = new RandomDataImpl();

        // Fill weights array with random int values between 1 and 5
        int[] intWeights = new int[len];
        for (int i = 0; i < len; i++) {
            intWeights[i] = randomData.nextInt(1, 5);
            weights[i] = intWeights[i];
        }

        // Fill values array with random data from N(mu, sigma)
        // and fill valuesList with values from values array with
View Full Code Here

Examples of org.apache.commons.math.random.RandomDataImpl.nextInt()

        ResizableDoubleArray eDA2 = new ResizableDoubleArray(2);
        assertEquals("Initial number of elements should be 0", 0, eDA2.getNumElements());

        RandomData randomData = new RandomDataImpl();
        int iterations = randomData.nextInt(100, 1000);

        for( int i = 0; i < iterations; i++) {
            eDA2.addElement( i );
        }
View Full Code Here

Examples of org.apache.commons.math3.random.MersenneTwister.nextInt()

          TAXI_CAPACITY));
    }
    for (int i = 0; i < NUM_CUSTOMERS; i++) {
      simulator.register(new Customer(roadModel.getRandomPosition(rng),
          roadModel.getRandomPosition(rng), SERVICE_DURATION, SERVICE_DURATION,
          1 + rng.nextInt(3)));
    }

    simulator.addTickListener(new TickListener() {
      @Override
      public void tick(TimeLapse time) {
View Full Code Here

Examples of org.apache.commons.math3.random.RandomData.nextInt()

        ResizableDoubleArray eDA2 = new ResizableDoubleArray(2);
        Assert.assertEquals("Initial number of elements should be 0", 0, eDA2.getNumElements());

        RandomData randomData = new RandomDataImpl();
        int iterations = randomData.nextInt(100, 1000);

        for( int i = 0; i < iterations; i++) {
            eDA2.addElement( i );
        }
View Full Code Here

Examples of org.apache.commons.math3.random.RandomDataImpl.nextInt()

        ResizableDoubleArray eDA2 = new ResizableDoubleArray(2);
        Assert.assertEquals("Initial number of elements should be 0", 0, eDA2.getNumElements());

        RandomData randomData = new RandomDataImpl();
        int iterations = randomData.nextInt(100, 1000);

        for( int i = 0; i < iterations; i++) {
            eDA2.addElement( i );
        }
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.