Examples of Sequence


Examples of buildcraft.tests.testcase.Sequence

      startTestTime = time;
    } else if (testSequence == null) {
      if (time - startTestTime > 10) {

        try {
          testSequence = new Sequence(world);

          File file = new File(testFile);
          FileInputStream f = new FileInputStream(file);
          byte[] data = new byte[(int) file.length()];
          f.read(data);

Examples of cc.mallet.types.Sequence

      System.out.println("Testing  Accuracy after training = "
          + crf.averageTokenAccuracy(lists[1]));
      System.out.println("Training results:");
      for (int i = 0; i < lists[0].size(); i++) {
        Instance inst = lists[0].get(i);
        Sequence input = (Sequence) inst.getData();
        Sequence output = crf.transduce(input);
        System.out.println(output);
      }
      System.out.println("Testing results:");
      for (int i = 0; i < lists[1].size(); i++) {
        Instance inst = lists[1].get(i);
        Sequence input = (Sequence) inst.getData();
        Sequence output = crf.transduce(input);
        System.out.println(output);
      }
    }
  }

Examples of com.alibaba.sample.petstore.dal.dataobject.Sequence

import com.alibaba.sample.petstore.dal.dataobject.Sequence;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class IbatisSequenceDao extends SqlMapClientDaoSupport implements SequenceDao {
    public synchronized int getNextId(String name) {
        Sequence sequence = new Sequence(name, -1);

        sequence = (Sequence) getSqlMapClientTemplate().queryForObject("getSequence", sequence);

        assertNotNull(sequence, "unknown sequence name: {}", name);

        Object parameterObject = new Sequence(name, sequence.getNextId() + 1);

        getSqlMapClientTemplate().update("updateSequence", parameterObject);

        return sequence.getNextId();
    }

Examples of com.consol.citrus.container.Sequence

       
        assertEquals(builder.testCase().getActions().size(), 1);
        assertEquals(builder.testCase().getActions().get(0).getClass(), Sequence.class);
        assertEquals(builder.testCase().getActions().get(0).getName(), "sequential");
       
        Sequence container = (Sequence)builder.testCase().getActions().get(0);
        assertEquals(container.getActions().size(), 2);
        assertEquals(container.getActions().get(0).getClass(), EchoAction.class);
    }

Examples of com.dmissoh.biologic.models.Sequence

    errorLabel.getParent().layout();
  }

  private void restoreSequenceData() {
    if (isReadOnly()) {
      Sequence sequence = getInputAsSequence();
      sequenceEditorTableViewer.setStartTime(TimeUtils
          .formatToTime(sequence.getStartTime()));
      sequence.setFamilies(ModelUtils.spitIntoFamilies(sequence));
    }
  }

Examples of com.foundationdb.ais.model.Sequence

            }

            @Override
            public Row next() {
                while(it.hasNext()) {
                    Sequence sequence = it.next();
                    if(isAccessible(session, sequence.getSequenceName()) &&
                            !sequence.isInternalSequence()) {
                        return new ValuesRow(rowType,
                                             null,      //sequence catalog
                                             sequence.getSequenceName().getSchemaName(),
                                             sequence.getSequenceName().getTableName(),
                                             datatype,
                                             sequence.getStartsWith(),
                                             sequence.getMinValue(),
                                             sequence.getMaxValue(),
                                             sequence.getIncrement(),
                                             boolResult(sequence.isCycle()),
                                             sequence.getStorageNameString(),
                                             ++rowCounter);
                    }
                }
                return null;
            }

Examples of com.google.code.lightssh.project.sequence.entity.Sequence

  public Sequence nextSequence(String key,int step ){
    if( key == null )
      throw new ApplicationException("获取序列的参数KEY为空!");
   
    boolean inserted = false;
    Sequence seq = dao.read( key );
    if( seq == null ){
      seq = new Sequence( key );
      inserted =true;
    }
    seq.incLastNumber( step );
   
    if( inserted )
      dao.create( seq );
    else
      dao.update( seq );

Examples of com.google.gwt.query.client.impl.research.SelectorEngineJS.Sequence

    } else if (eq("only-of-type", pseudoClass)) {
      xpath = "not(preceding-sibling::" + tag + " or following-sibling::" + tag
          + ")";
    } else if (eq("nth-child", pseudoClass)) {
      if (!eq("n", pseudoClass)) {
        Sequence sequence = SelectorEngineJS.getSequence(pseudoValue);
        if (sequence != null) {
          if (sequence.start == sequence.max) {
            xpath = "count(preceding-sibling::*) = " + (sequence.start - 1);
          } else {
            xpath = "(count(preceding-sibling::*) + 1) mod " + sequence.add
                + " = " + sequence.modVal
                + ((sequence.start > 1) ? " and count(preceding-sibling::*) >= "
                + (sequence.start - 1) : "") + ((sequence.max > 0) ?
                " and count(preceding-sibling::*) <= " + (sequence.max - 1)
                : "");
          }
        }
      }
    } else if (eq("nth-of-type", pseudoClass)) {
      if (!pseudoValue.startsWith("n")) {
        Sequence sequence = SelectorEngineJS.getSequence(pseudoValue);
        if (sequence != null) {
          if (sequence.start == sequence.max) {
            xpath = pseudoValue;
          } else {
            xpath = "position() mod " + sequence.add + " = " + sequence.modVal

Examples of com.ibatis.jpetstore.domain.Sequence

   * @param name The name of the sequence.
   * @return The Next ID
   * @
   */
  public synchronized int getNextId(String name) {
    Sequence sequence = new Sequence(name, -1);

    sequence = (Sequence) queryForObject("getSequence", sequence);
    if (sequence == null) {
      throw new DaoException("Error: A null sequence was returned from the database (could not get next " + name + " sequence).");
    }
    Object parameterObject = new Sequence(name, sequence.getNextId() + 1);
    update("updateSequence", parameterObject);

    return sequence.getNextId();
  }

Examples of com.iisigroup.cap.base.model.Sequence

   *            最大序號
   * @return next seq
   */
  private int getDBNextSeq(String seqNode, int interval, int startSeq,
      int maxSeq) {
    Sequence thisSeq = getSequence(seqNode);
    int returnSeq = -1;
    try {
      if (thisSeq == null || thisSeq.getSeqNode().length() == 0) {
        thisSeq = new Sequence();
        thisSeq.setSeqNode(seqNode);
        thisSeq.setNextSeq(startSeq + 1);
        thisSeq.setUpdateTime(CapDate.getCurrentTimestamp());
        thisSeq.setRounds(1);
        saveSeq(thisSeq, -1);
        return startSeq;
      } else {
        Sequence nextSeq = thisSeq;
        returnSeq = thisSeq.getNextSeq();
        int next = returnSeq + 1;
        if (maxSeq > 0 && (next * interval) >= maxSeq) {
          next = startSeq;
          nextSeq.setRounds(thisSeq.getRounds() + 1);
        }
        nextSeq.setNextSeq(next);
        nextSeq.setUpdateTime(CapDate.getCurrentTimestamp());
        int row = saveSeq(nextSeq, returnSeq);
        if (row != 1) {
          return getDBNextSeq(seqNode, interval, startSeq, maxSeq);
        }
      }
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.