Examples of Stat


Examples of beans.enumeration.Stat

        }
    }

    private Cost getFromRowSet(final ResultSet set) {
        try {
            final Stat stat = Stat.valueOf(set.getString(STAT));
            final int impact = set.getInt(IMPACT);
            return new Cost(stat, impact);
        } catch (final SQLException ex) {
            Logger.getLogger(ChangeStatutControl.class.getName()).log(Level.SEVERE, null, ex);
            return null;
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.Stat

        fieldShowName = "title";
        fieldShowValue =  XMLUtil.toSafeXMLString(task.getTitle());
      }
      else if( "status_id".equals( fieldName ) || "状态".equals( fieldName ) ){
        fieldShowName = "status_id";
        Stat stat = flow.getStat(task.getStatusId());
        if (stat != null) {
          fieldShowValue =  stat.getName();
        }
      }
      else if( "create_user".equals( fieldName ) || "创建人".equals( fieldName ) ){
        fieldShowName = "create_user";
        fieldShowValue = task.getCreateUsername();
View Full Code Here

Examples of com.threerings.stats.data.Stat

        Where where = new Where(StatRecord.PLAYER_ID, playerId,
                                StatRecord.STAT_CODE, modifier.getType().code());

        for (int ii = 0; ii < MAX_UPDATE_TRIES; ii++) {
            StatRecord record = load(StatRecord.class, where); // TODO: force cache skip on ii > 0
            Stat stat = (record == null) ? modifier.getType().newStat() :
                decodeStat(record.statCode, record.statData, record.modCount);
            @SuppressWarnings("unchecked") T tstat = (T)stat;
            modifier.modify(tstat);
            if (!tstat.isModified()) {
                return null;
View Full Code Here

Examples of flanagan.analysis.Stat

        am = new ArrayMaths(yTransform);
        am = am.sort();
        double[] yTrans = am.array();

        // Standardize
        st = new Stat(yTrans);
        yTransform = st.standardize();

        // Calculate and return probability plot correlation coefficient
        reg = new Regression(gaussianOrderMedians, yTransform);
        reg.linear();
View Full Code Here

Examples of model.Stat

            pstmt.setInt(3, activityStartDay);
            pstmt.setInt(4, activityEndDay);
            ResultSet rs = pstmt.executeQuery();

            while (rs.next()) {
              Stat stats = new Stat();
              stats.setActivityDay(rs.getInt("activity_day"));
              int plantTypeID = rs.getInt("plant_type_id");
              stats.setPlantTypeId(plantTypeID);
              stats.setActivityType(rs.getString("activity_type"));
              stats.setCount(rs.getInt("plant_count"));
              //stats.setEnvironmentScore(rs.getInt("env_score"));
              //stats.setActivityMessage(rs.getString("activity_message"));
            
              String plantName= GameServer.getPlantName(plantTypeID);
              stats.setPlantName(plantName);
              statsList.add(stats);
            }

            rs.close();
            pstmt.close();
View Full Code Here

Examples of org.apache.accumulo.core.util.Stat

   
    for (String c : columns) {
      scanner.fetchColumnFamily(new Text(c));
    }
   
    Stat rowLen = new Stat();
    Stat cfLen = new Stat();
    Stat cqLen = new Stat();
    Stat cvLen = new Stat();
    Stat valLen = new Stat();
    Stat colsPerRow = new Stat();
   
    Text lastRow = null;
    int colsPerRowCount = 0;
   
    for (Entry<Key,Value> entry : scanner) {
     
      Key key = entry.getKey();
      Text row = key.getRow();
     
      if (lastRow == null) {
        lastRow = row;
      }
     
      if (!lastRow.equals(row)) {
        colsPerRow.addStat(colsPerRowCount);
        lastRow = row;
        colsPerRowCount = 0;
      }
     
      colsPerRowCount++;
View Full Code Here

Examples of org.apache.hadoop.io.nativeio.NativeIO.POSIX.Stat

      String mode, String expectedOwner, String expectedGroup)
      throws IOException {
    RandomAccessFile raf = new RandomAccessFile(f, mode);
    boolean success = false;
    try {
      Stat stat = NativeIO.POSIX.getFstat(raf.getFD());
      checkStat(f, stat.getOwner(), stat.getGroup(), expectedOwner,
          expectedGroup);
      success = true;
      return raf;
    } finally {
      if (!success) {
View Full Code Here

Examples of org.apache.hadoop.io.nativeio.NativeIO.Stat

    }

    FileInputStream fis = new FileInputStream(f);
    boolean success = false;
    try {
      Stat stat = NativeIO.fstat(fis.getFD());
      checkStat(f, stat.getOwner(), stat.getGroup(), expectedOwner,
          expectedGroup);
      success = true;
      return fis;
    } finally {
      if (!success) {
View Full Code Here

Examples of org.apache.hadoop.mapred.StatisticsCollector.Stat

    StatisticsCollector collector = new StatisticsCollector(1);
    TimeWindow window = new TimeWindow("test", 6, 2);
    TimeWindow sincStart = StatisticsCollector.SINCE_START;
    TimeWindow[] windows = {sincStart, window};
   
    Stat stat = collector.createStat("m1", windows);
   
    stat.inc(3);
    collector.update();
    assertEquals(0, stat.getValues().get(window).getValue());
    assertEquals(3, stat.getValues().get(sincStart).getValue());
   
    stat.inc(3);
    collector.update();
    assertEquals((3+3), stat.getValues().get(window).getValue());
    assertEquals(6, stat.getValues().get(sincStart).getValue());
   
    stat.inc(10);
    collector.update();
    assertEquals((3+3), stat.getValues().get(window).getValue());
    assertEquals(16, stat.getValues().get(sincStart).getValue());
   
    stat.inc(10);
    collector.update();
    assertEquals((3+3+10+10), stat.getValues().get(window).getValue());
    assertEquals(26, stat.getValues().get(sincStart).getValue());
   
    stat.inc(10);
    collector.update();
    stat.inc(10);
    collector.update();
    assertEquals((3+3+10+10+10+10), stat.getValues().get(window).getValue());
    assertEquals(46, stat.getValues().get(sincStart).getValue());
   
    stat.inc(10);
    collector.update();
    assertEquals((3+3+10+10+10+10), stat.getValues().get(window).getValue());
    assertEquals(56, stat.getValues().get(sincStart).getValue());
   
    stat.inc(12);
    collector.update();
    assertEquals((10+10+10+10+10+12), stat.getValues().get(window).getValue());
    assertEquals(68, stat.getValues().get(sincStart).getValue());
   
    stat.inc(13);
    collector.update();
    assertEquals((10+10+10+10+10+12), stat.getValues().get(window).getValue());
    assertEquals(81, stat.getValues().get(sincStart).getValue());
   
    stat.inc(14);
    collector.update();
    assertEquals((10+10+10+12+13+14), stat.getValues().get(window).getValue());
    assertEquals(95, stat.getValues().get(sincStart).getValue());
  }
View Full Code Here

Examples of org.apache.zookeeper.data.Stat

   * @throws KeeperException if unexpected zookeeper exception
   */
  public static int getNumberOfChildren(ZooKeeperWatcher zkw, String znode)
  throws KeeperException {
    try {
      Stat stat = zkw.getRecoverableZooKeeper().exists(znode, null);
      return stat == null ? 0 : stat.getNumChildren();
    } catch(KeeperException e) {
      LOG.warn(zkw.prefix("Unable to get children of node " + znode));
      zkw.keeperException(e);
    } catch(InterruptedException e) {
      zkw.interruptedException(e);
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.