Examples of Rank


Examples of net.bnubot.db.Rank

      if(account != null) {
        String name = account.getName();
        if(name != null)
          shortPrettyName = name;

        Rank rank = account.getRank();
        if(rank != null) {
          String prefix = rank.getShortPrefix();
          if(prefix == null)
            prefix = rank.getPrefix();
          if(prefix != null)
            shortPrettyName = prefix + " " + shortPrettyName;
        }
      }
    } catch(Exception e) {
View Full Code Here

Examples of net.bnubot.db.Rank

      if(account != null) {
        String name = account.getName();
        if(name != null)
          prettyName = name + " (" + prettyName + ")";

        Rank rank = account.getRank();
        if(rank != null) {
          String prefix = rank.getPrefix();
          if(prefix != null)
            prettyName = prefix + " " + prettyName;
        }
      }
    } catch(Exception e) {
View Full Code Here

Examples of net.bnubot.db.Rank

        throw new CommandFailedWithDetailsException("That command does not exist!");

      try {
        int oldAccess = rsCommand.getAccess();
        int access = Integer.parseInt(params[1]);
        Rank rank = Rank.get(access);
        if(rank == null)
          throw new CommandFailedWithDetailsException("That access level does not exist!");
        rsCommand.setRank(rank);
        rsCommand.updateRow();
View Full Code Here

Examples of net.bnubot.db.Rank

      }

      List<String> clauses = new LinkedList<String>();

      // Access
      Rank rsSubjectRank = rsSubjectAccount.getRank();
      if(rsSubjectRank != null) {
        String prefix = rsSubjectRank.getShortPrefix();
        String prefix2 = rsSubjectRank.getPrefix();
        if(prefix == null)
          prefix = prefix2;

        if(prefix == null)
          prefix = "";
        else
          prefix += " ";

        String result = prefix + rsSubjectAccount.getName();
        if(rsSubjectRank.getVerbstr() != null)
          result += " " + rsSubjectRank.getVerbstr();
        else {
          switch(prefix.charAt(0)) {
          case 'a': case 'e': case 'i': case 'o': case 'u':
          case 'A': case 'E': case 'I': case 'O': case 'U':
            result += " is an ";
View Full Code Here

Examples of net.bnubot.db.Rank

        }

      String out = "Accounts found: ";
      boolean first = true;
      for(int i = access; i <= accessUpper; i++) {
        Rank rank = Rank.get(i);
        if(rank == null)
          continue;
        for(Account account : rank.getAccountArray()) {
          if(!first)
            out += ", ";
          first = false;
          out += account.getName();
          out += " {" + i + "}";
View Full Code Here

Examples of net.bnubot.db.Rank

        timeElapsed = (long)Math.floor(te) + "." + timeElapsed;
      } else {
        timeElapsed = "?";
      }

      Rank rsRank = subject.getRank();
      if(rsRank == null) {
        String result = "Rank does not exist! ";
        result += subject.getName() + "'s current status is: ";
        result += timeElapsed + " days, ";
        result += wins[0] + " wins, ";
        result += wins[1] + " D2 level, ";
        result += wins[2] + " W3 level";

        throw new CommandFailedWithDetailsException(result);
      }

      Integer apDays = rsRank.getApDays();
      Integer apWins = rsRank.getApWins();
      Integer apD2Level = rsRank.getApD2Level();
      Integer apW3Level = rsRank.getApW3Level();
      Integer apRecruitScore = rsRank.getApRecruitScore();

      // Check if any fields are null
      boolean condition = false;
      condition |= (apDays == null);
      condition |= (apWins == null);
View Full Code Here

Examples of net.bnubot.db.Rank

  @SuppressWarnings("unchecked")
  private static void flush(ObjectContext context) {
    long defaultMaxAge = 90;
    {
      Rank rank = Rank.get(0);
      if(rank != null)
        defaultMaxAge = rank.getExpireDays();
    }

    boolean debugEnabled = Out.isDebug(DatabaseContext.class);

    for(BNLogin login : (List<BNLogin>)context.performQuery(new SelectQuery(BNLogin.class))) {
      long age = login.getLastSeen().getTime();
      age = System.currentTimeMillis() - age;
      age /= 86400000l; // convert to days

      long maxAge = defaultMaxAge;
      Account account = login.getAccount();
      if(account != null) {
        Rank rank = account.getRank();
        if(rank != null)
          maxAge = rank.getExpireDays();
      }

      if(maxAge == 0)
        continue;
      if(age <= maxAge)
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.Rank

        retval[197] = NumericFunction.TRUNC;
        retval[198] = LogicalFunction.ISLOGICAL;

        retval[212] = NumericFunction.ROUNDUP;
        retval[213] = NumericFunction.ROUNDDOWN;
        retval[216] = new Rank();
        retval[219] = new Address()//Aniket Banerjee
        retval[220] = new Days360();
        retval[221] = new Today();

        retval[227] = AggregateFunction.MEDIAN;
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.Rank

        retval[197] = NumericFunction.TRUNC;
        retval[198] = LogicalFunction.ISLOGICAL;

        retval[212] = NumericFunction.ROUNDUP;
        retval[213] = NumericFunction.ROUNDDOWN;
        retval[216] = new Rank();
        retval[219] = new Address()//Aniket Banerjee
        retval[220] = new Days360();
        retval[221] = new Today();

        retval[227] = AggregateFunction.MEDIAN;
View Full Code Here

Examples of org.boris.expr.function.excel.RANK

        QUARTILE q = new QUARTILE();
        fail("QUARTILE not implemented");
    }

    public void testRANK() throws Exception {
        RANK r = new RANK();
        fail("RANK not implemented");
    }
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.