Package java.util

Examples of java.util.Date


        try {
            for (int i=0; i<50000; i++) {
                Test test = new JUnit4TestAdapter(MdcInjectionFilterTest.class);
                runner.doRun(test);
                System.out.println("i = " + i + " " + new Date());
            }
            System.out.println("done");
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here


      }
     
      m_outputQueues =
        new BatchClassifierEvent[e.getMaxRunNumber()][e.getMaxSetNumber()];
      m_completedSets = new boolean[e.getMaxRunNumber()][e.getMaxSetNumber()];
      m_currentBatchIdentifier = new Date();
    }
   
    // create a new task and schedule for execution
    TrainingTask newTask = new TrainingTask(e.getRunNumber(), e.getMaxRunNumber(),
        e.getSetNumber(), e.getMaxSetNumber(), e.getTrainingSet());
View Full Code Here

        return;
      }
     
      testSet = e.getTestSet();
      if (e.getRunNumber() == 1 && e.getSetNumber() == 1) {
        m_currentBatchIdentifier = new Date();
      }
     
      if (testSet != null) {       
        if (!m_trainingSet.equalHeaders(testSet) &&
            !(classifierToUse instanceof weka.classifiers.misc.InputMappedClassifier)) {
View Full Code Here

     *
     * @param format  the format of the timestamp
     * @see    SimpleDateFormat
     */
    public Timestamp(String format) {
      this(new Date(), format);
    }
View Full Code Here

        url.append("/html/photo/show.vm?sid=");
        url.append(pbean.getSite().getId());
        url.append("&pid=");
        url.append(pbean.getId());
        String curTime = new SimpleDateFormat("yyyy-MM-dd HH:mm")
            .format(new Date());
        StringBuffer img = new StringBuffer();
        img.append(urlPrefix);
        img.append(contextPath);
        img.append(pbean.getPreviewURL());
        String[] s_mails = new String[mails.size()];
        mails.toArray(s_mails);
        try {
          // �����ʼ�
          String mail_content = MessageFormat.format(template,
              new String[]{loginUser.getNickname(),img.toString(), url.toString(),curTime});
          //System.out.println(mail_content);
          Parser html = new Parser();
          html.setEncoding(Globals.ENC_8859_1);
          html.setInputHTML(mail_content);
          Node[] nodes = html.extractAllNodesThatMatch(
              HtmlNodeFilters.titleFilter).toNodeArray();
          String title = nodes[0].toPlainTextString();
          MailSender sender = MailSender.getHtmlMailSender(null, 25,
              null, null);
          sender.setSubject(title);
          sender.setSendDate(new Date());
          sender.setMailContent(mail_content);
          sender.setMailTo(s_mails, "to");
          MailTransportQueue queue = (MailTransportQueue) getServlet()
              .getServletContext().getAttribute(
                  Globals.MAIL_QUEUE);
View Full Code Here

          .getClientType()));
      String content = StringUtils.abbreviate(super.autoFiltrate(null,
          reply.getContent()), MAX_REPLY_LENGTH);
      rbean.setContent(super.filterScriptAndStyle(content));
      rbean.setDiary(diary);
      rbean.setReplyTime(new Date());
      rbean.setSite(site);
      rbean.setStatus(DiaryReplyBean.STATUS_NORMAL);
      rbean.setOwnerOnly(reply.getOwnerOnly());
      DiaryDAO.createDiaryReply(rbean);
      // �ж��Ƿ���Ҫ�ʼ�����
View Full Code Here

          .getClientType()));
      String content = StringUtils.abbreviate(super.autoFiltrate(null,
          reply.getContent()), MAX_REPLY_LENGTH);
      rbean.setContent(super.filterScriptAndStyle(content));
      rbean.setPhoto(photo);
      rbean.setReplyTime(new Date());
      rbean.setSite(site);
      rbean.setStatus(DiaryReplyBean.STATUS_NORMAL);
      rbean.setOwnerOnly(reply.getOwnerOnly());
      PhotoDAO.createPhotoReply(rbean);
      break;
View Full Code Here

          url.append("&log_id=");
          url.append(rbean.getDiary().getId());
          url.append("#");
          url.append(rbean.getId());
          String curTime = new SimpleDateFormat("yyyy-MM-dd HH:mm")
              .format(new Date());
          // �����ʼ�����
          String notify_content = MessageFormat.format(template,
              new String[]{rbean.getDiary().getOwner().getNickname(),
              rbean.getDiary().getTitle(), rbean.getAuthor(),
              url.toString(), curTime, rbean.getContent()});
          Parser html = new Parser();
          html.setEncoding(Globals.ENC_8859_1);
          html.setInputHTML(notify_content);
          Node[] nodes = html.extractAllNodesThatMatch(
              HtmlNodeFilters.titleFilter).toNodeArray();
          String title = nodes[0].toPlainTextString();
          MailSender sender = MailSender.getHtmlMailSender(null, 25,
              null, null);
          sender.setSubject(title);
          sender.setSendDate(new Date());
          sender.setMailContent(notify_content);
          sender.setMailTo(new String[] { rbean.getDiary().getOwner()
              .getContactInfo().getEmail() }, "to");
          MailTransportQueue queue = (MailTransportQueue) getServlet()
              .getServletContext().getAttribute(
View Full Code Here

      }
      if(add_bookmark){
        BookmarkBean bmb = new BookmarkBean();
        bmb.setOwner(journal.getOwner());
        bmb.setSite(journal.getSite());
        bmb.setCreateTime(new Date());
        bmb.setParentId(journal.getId());
        bmb.setParentType(_BeanBase.TYPE_DIARY);
        bmb.setTitle(journal.getTitle());
        journal.getOwner().getCount().incBookmarkCount(1);
        ssn.save(bmb);
View Full Code Here

      int max_reply_count = ConfigDAO.getMaxReplyCount(reply.getSite().getId());
      beginTransaction()
      reply.getDiary().incReplyCount(1);
      if(reply.getDiary().getReplyCount()>=max_reply_count && max_reply_count > 0)
        reply.getDiary().setLock(1);
      reply.getDiary().setLastReplyTime(new Date());
      if(reply.getUser()!=null)
        reply.getUser().getCount().incArticleReply(1);
      ssn.save(reply);
      commit();
    }catch(HibernateException e){
View Full Code Here

TOP

Related Classes of java.util.Date

Copyright © 2018 www.massapicom. 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.