Examples of Count


Examples of com.otakingex.fourtypes.model.Count

      req.setAttribute(
          REQ_ATTRKEY_HIDDENMAP,
          hiddens);
     
      Count c = BigTableStoreManager.getInstance().getCount();
      req.setAttribute(REQ_ATTRKEY_COUNT, c);
     
     
     
      sendRedirect(JSP_SUMMARY, req, resp);
View Full Code Here

Examples of com.otakingex.fourtypes.model.Count

  private Logger log = Logger.getLogger(getClass().getName());

  public void doGet(HttpServletRequest req, HttpServletResponse resp){
    try{
      BigTableStoreManager manager = BigTableStoreManager.getInstance();
      Count c = manager.getCount();
   
      req.setAttribute(REQ_KEY_COUNT, c);
     
      sendRedirect(JSP_STATUS, req, resp);
    }catch(Exception e){
View Full Code Here

Examples of com.otakingex.fourtypes.model.Count

    PersistenceManagerFactory pmf = PMF.get();
    PersistenceManager pm = null;
    try{
      pm = pmf.getPersistenceManager();
      Transaction tx = pm.currentTransaction();
      Count c = null;
      try{
        tx.begin();
        try{
          c = pm.getObjectById(Count.class, ViewConstants.PRIMARYKEY_ID);
        }catch(Exception e){
          log.log(Level.INFO, "Count 取得中例外", e);
          c = new Count();
        }
        c.setTotal(c.getTotal() + 1);
        if(con.getKingOrSolderScore()>con.getScholarOrCraftsmanScore()){
          c.setKingOrSolder(c.getKingOrSolder() + 1);
          if(con.getKingScore()>con.getSolderScore()){
            c.setKing(c.getKing() + 1);
          }else if(con.getKingScore()<con.getSolderScore()){
            c.setSolder(c.getSolder() + 1);
          }
         
        }else if(con.getKingOrSolderScore()<con.getScholarOrCraftsmanScore()){
          c.setScholarOrCraftsman(c.getScholarOrCraftsman() + 1);
          if(con.getScholarScore()>con.getCraftsmanScore()){
            c.setScholar(c.getScholar() + 1);
          }else if(con.getScholarScore()<con.getCraftsmanScore()){
            c.setCraftsman(c.getCraftsman() + 1);
          }
        }
        pm.makePersistent(c);
       
        tx.commit();
        log.info("Count:" + c.toString());
        return c;
      }finally{
        if(tx.isActive()) tx.rollback();
      }
    }finally{
View Full Code Here

Examples of com.otakingex.fourtypes.model.Count

    PersistenceManagerFactory pmf = PMF.get();
    PersistenceManager pm = null;
    try{
      pm = pmf.getPersistenceManager();
      Transaction tx = pm.currentTransaction();
      Count c = null;
      try{
        tx.begin();
        try{
          c = pm.getObjectById(Count.class, ViewConstants.PRIMARYKEY_ID);
        }catch(Exception e){
          log.log(Level.INFO, "Count 取得中例外", e);
          c = new Count();
        }
        tx.commit();
        log.info("Count:" + c.toString());
        return c;
      }finally{
        if(tx.isActive()) tx.rollback();
      }
    }finally{
View Full Code Here

Examples of gannuNLP.data.Count

            counts.get(index).increaseFrequency();
          }
          else
          {
            lemmas.add(word.getLemma());
            counts.add(new Count(1.0,this.name));
          }
          bow.add(word.getLemma());
        }
        for(AmbiguousWord word:sentence)
        {
View Full Code Here

Examples of gannuNLP.data.Count

      aux=aux.substring(aux.indexOf(this.countPrepIn)+this.countPrepIn.length());
      aux=aux.substring(0,aux.indexOf(this.countPrepOut));
      aux=aux.replaceAll("\\D", "");
      w=Double.parseDouble(aux);
    }
    Count c=new Count(w, this.name);
    return c;
  }
View Full Code Here

Examples of gannuNLP.data.Count

   * @return The frequency is stored inside an ArrayList<Count> of size=1.
   */
  public ArrayList<Count> getCounts(String lemma) {
    int i=Collections.binarySearch(wordCounts,lemma);
    ArrayList<Count> counts=new ArrayList<Count>();
    Count c;
    if(i>=0)
      c=new Count(Double.parseDouble(wordCounts.get(i).getString()),this.name);
    else
      c=new Count(0.0,this.name);
    counts.add(c);
    return counts;
  }
View Full Code Here

Examples of it.stefanobertini.zebra.cpcl.labelmode.Count

public class CountTest {

    @Test
    public void test() {
  Count command = new Count(10);

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("COUNT 10");

  assertCommand(output, command);
View Full Code Here

Examples of jcascalog.op.Count

        .predicate(Playground.GENDER, "?person", "m"));
  }

  public static void followsManyFollows() {
    Subquery manyFollows = new Subquery("?person").predicate(Playground.FOLLOWS, "?person", "_")
        .predicate(new Count(), "?count").predicate(new GT(), "?count", 2);
    Api.execute(new StdoutTap(), new Subquery("?person1", "?person2")
        .predicate(manyFollows, "?person1").predicate(manyFollows, "?person2")
        .predicate(Playground.FOLLOWS, "?person1", "?person2"));
  }
View Full Code Here

Examples of jmockmongo.commands.Count

      public ChannelPipeline getPipeline() {

        final ReplyHandler handler = new ReplyHandler();
        handler.setCommandHandler("isMaster", new IsMaster());
        handler.setCommandHandler("listDatabases", new ListDatabases());
        handler.setCommandHandler("count", new Count(MockMongo.this));
        handler.setCommandHandler("findandmodify", new FindAndModify(
            MockMongo.this));
        handler.setCommandHandler("dbstats", new DbStats(
            MockMongo.this.data));
        handler
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.