1. 程式人生 > >java 獲取當天0點0分0秒(00:00:00)+Calendar工具類

java 獲取當天0點0分0秒(00:00:00)+Calendar工具類

    /**
     * 獲取當天0點0分0秒(00:00:00)
     *
     * @return
     */
    private static String getTimesmorning() {
        Calendar cal = Calendar.getInstance();
        cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
        Date beginOfDate = cal.getTime();
        SimpleDateFormat formatter = new
SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return formatter.format(beginOfDate); }
package com.boluo.util;

import java.text.DateFormat;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

/**
 * 常用日曆操作輔助類  
 *
 * @author
steven 2010-08-10 * @email:[email protected] */
public class CalendarUtil { private int weeks = 0;// 用來全域性控制 上一週,本週,下一週的週數變化 private int MaxDate; // 一月最大天數 private int MaxYear; // 一年最大天數 /** * 測試 * * @param args */ public static void main(String[] args) { CalendarUtil tt = new
CalendarUtil(); System.out.println("獲取當天日期:" + tt.getNowTime("yyyy-MM-dd")); System.out.println("獲取本週一日期:" + tt.getMondayOFWeek()); System.out.println("獲取本週日的日期~:" + tt.getCurrentWeekday()); System.out.println("獲取上週一日期:" + tt.getPreviousWeekday()); System.out.println("獲取上週日日期:" + tt.getPreviousWeekSunday()); System.out.println("獲取下週一日期:" + tt.getNextMonday()); System.out.println("獲取下週日日期:" + tt.getNextSunday()); System.out.println("獲得相應周的週六的日期:" + tt.getNowTime("yyyy-MM-dd")); System.out.println("獲取本月第一天日期:" + tt.getFirstDayOfMonth()); System.out.println("獲取本月最後一天日期:" + tt.getDefaultDay()); System.out.println("獲取上月第一天日期:" + tt.getPreviousMonthFirst()); System.out.println("獲取上月最後一天的日期:" + tt.getPreviousMonthEnd()); System.out.println("獲取下月第一天日期:" + tt.getNextMonthFirst()); System.out.println("獲取下月最後一天日期:" + tt.getNextMonthEnd()); System.out.println("獲取本年的第一天日期:" + tt.getCurrentYearFirst()); System.out.println("獲取本年最後一天日期:" + tt.getCurrentYearEnd()); System.out.println("獲取去年的第一天日期:" + tt.getPreviousYearFirst()); System.out.println("獲取去年的最後一天日期:" + tt.getPreviousYearEnd()); System.out.println("獲取明年第一天日期:" + tt.getNextYearFirst()); System.out.println("獲取明年最後一天日期:" + tt.getNextYearEnd()); System.out.println("獲取本季度第一天:" + tt.getThisSeasonFirstTime(11)); System.out.println("獲取本季度最後一天:" + tt.getThisSeasonFinallyTime(11)); System.out.println("獲取兩個日期之間間隔天數2008-12-1~2008-29:" + CalendarUtil.getTwoDay("2008-12-1", "2008-9-29")); System.out.println("獲取當前月的第幾周:" + tt.getWeekOfMonth()); System.out.println("獲取當前年份:" + tt.getYear()); System.out.println("獲取當前月份:" + tt.getMonth()); System.out.println("獲取今天在本年的第幾天:" + tt.getDayOfYear()); System.out.println("獲得今天在本月的第幾天(獲得當前日):" + tt.getDayOfMonth()); System.out.println("獲得今天在本週的第幾天:" + tt.getDayOfWeek()); System.out.println("獲得半年後的日期:" + tt.convertDateToString(tt.getTimeYearNext())); } /** * 獲得當前年份 * * @return */ public static int getYear() { return Calendar.getInstance().get(Calendar.YEAR); } /** * 獲得當前月份 * * @return */ public static int getMonth() { return Calendar.getInstance().get(Calendar.MONTH) + 1; } /** * 獲得今天在本年的第幾天 * * @return */ public static int getDayOfYear() { return Calendar.getInstance().get(Calendar.DAY_OF_YEAR); } /** * 獲得今天在本月的第幾天(獲得當前日) * * @return */ public static int getDayOfMonth() { return Calendar.getInstance().get(Calendar.DAY_OF_MONTH); } /** * 獲得今天在本週的第幾天 * * @return */ public static int getDayOfWeek() { return Calendar.getInstance().get(Calendar.DAY_OF_WEEK); } /** * 獲得今天是這個月的第幾周 * * @return */ public static int getWeekOfMonth() { return Calendar.getInstance().get(Calendar.DAY_OF_WEEK_IN_MONTH); } /** * 獲得半年後的日期 * * @return */ public static Date getTimeYearNext() { Calendar.getInstance().add(Calendar.DAY_OF_YEAR, 183); return Calendar.getInstance().getTime(); } /** * 將日期轉換成字串 * * @param dateTime * @return */ public static String convertDateToString(Date dateTime) { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); return df.format(dateTime); } /** * 得到二個日期間的間隔天數 * * @param sj1 * @param sj2 * @return */ public static String getTwoDay(String sj1, String sj2) { SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd"); long day = 0; try { java.util.Date date = myFormatter.parse(sj1); java.util.Date mydate = myFormatter.parse(sj2); day = (date.getTime() - mydate.getTime()) / (24 * 60 * 60 * 1000); } catch (Exception e) { return ""; } return day + ""; } /** * 根據一個日期,返回是星期幾的字串 * * @param sdate * @return */ public static String getWeek(String sdate) { // 再轉換為時間 Date date = CalendarUtil.strToDate(sdate); Calendar c = Calendar.getInstance(); c.setTime(date); // int hour=c.get(Calendar.DAY_OF_WEEK); // hour中存的就是星期幾了,其範圍 1~7 // 1=星期日 7=星期六,其他類推 return new SimpleDateFormat("EEEE").format(c.getTime()); } /** * 將短時間格式字串轉換為時間 yyyy-MM-dd * * @param strDate * @return */ public static Date strToDate(String strDate) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); ParsePosition pos = new ParsePosition(0); Date strtodate = formatter.parse(strDate, pos); return strtodate; } /** * 兩個時間之間的天數 * * @param date1 * @param date2 * @return */ public static long getDays(String date1, String date2) { if (date1 == null || date1.equals("")) return 0; if (date2 == null || date2.equals("")) return 0; // 轉換為標準時間 SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd"); java.util.Date date = null; java.util.Date mydate = null; try { date = myFormatter.parse(date1); mydate = myFormatter.parse(date2); } catch (Exception e) { } long day = (date.getTime() - mydate.getTime()) / (24 * 60 * 60 * 1000); return day; } /** * 計算當月最後一天,返回字串 * * @return */ public String getDefaultDay() { String str = ""; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar lastDate = Calendar.getInstance(); lastDate.set(Calendar.DATE, 1);// 設為當前月的1號 lastDate.add(Calendar.MONTH, 1);// 加一個月,變為下月的1號 lastDate.add(Calendar.DATE, -1);// 減去一天,變為當月最後一天 str = sdf.format(lastDate.getTime()); return str; } /** * 上月第一天 * * @return */ public String getPreviousMonthFirst() { String str = ""; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar lastDate = Calendar.getInstance(); lastDate.set(Calendar.DATE, 1);// 設為當前月的1號 lastDate.add(Calendar.MONTH, -1);// 減一個月,變為下月的1號 // lastDate.add(Calendar.DATE,-1);//減去一天,變為當月最後一天 str = sdf.format(lastDate.getTime()); return str; } /** * 獲取當月第一天 * * @return */ public String getFirstDayOfMonth() { String str = ""; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar lastDate = Calendar.getInstance(); lastDate.set(Calendar.DATE, 1);// 設為當前月的1號 str = sdf.format(lastDate.getTime()); return str; } /** * 獲得本週星期日的日期 * * @return */ public String getCurrentWeekday() { weeks = 0; int mondayPlus = this.getMondayPlus(); GregorianCalendar currentDate = new GregorianCalendar(); currentDate.add(GregorianCalendar.DATE, mondayPlus + 6); Date monday = currentDate.getTime(); DateFormat df = DateFormat.getDateInstance(); String preMonday = df.format(monday); return preMonday; } /** * 獲取當天時間 * * @param dateformat * @return */ public String getNowTime(String dateformat) { Date now = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat(dateformat);// 可以方便地修改日期格式 String hehe = dateFormat.format(now); return hehe; } /** * 獲得當前日期與本週日相差的天數 * * @return */ private int getMondayPlus() { Calendar cd = Calendar.getInstance(); // 獲得今天是一週的第幾天,星期日是第一天,星期二是第二天...... int dayOfWeek = cd.get(Calendar.DAY_OF_WEEK) - 1; // 因為按中國禮拜一作為第一天所以這裡減1 if (dayOfWeek == 1) { return 0; } else { return 1 - dayOfWeek; } } /** * 獲得本週一的日期 * * @return */ public String getMondayOFWeek() { weeks = 0; int mondayPlus = this.getMondayPlus(); GregorianCalendar currentDate = new GregorianCalendar(); currentDate.add(GregorianCalendar.DATE, mondayPlus); Date monday = currentDate.getTime(); DateFormat df = DateFormat.getDateInstance(); String preMonday = df.format(monday); return preMonday; } /** * 獲得相應周的週六的日期 * * @return */ public String getSaturday() { int mondayPlus = this.getMondayPlus(); GregorianCalendar currentDate = new GregorianCalendar(); currentDate.add(GregorianCalendar.DATE, mondayPlus + 7 * weeks + 6); Date monday = currentDate.getTime(); DateFormat df = DateFormat.getDateInstance(); String preMonday = df.format(monday); return preMonday; } /** * 獲得上週星期日的日期 * * @return */ public String getPreviousWeekSunday() { weeks = 0; weeks--; int mondayPlus = this.getMondayPlus(); GregorianCalendar currentDate = new GregorianCalendar(); currentDate.add(GregorianCalendar.DATE, mondayPlus + weeks); Date monday = currentDate.getTime(); DateFormat df = DateFormat.getDateInstance(); String preMonday = df.format(monday); return preMonday; } /** * 獲得上週星期一的日期 * * @return */ public String getPreviousWeekday() { weeks--; int mondayPlus = this.getMondayPlus(); GregorianCalendar currentDate = new GregorianCalendar(); currentDate.add(GregorianCalendar.DATE, mondayPlus + 7 * weeks); Date monday = currentDate.getTime(); DateFormat df = DateFormat.getDateInstance(); String preMonday = df.format(monday); return preMonday; } /** * 獲得下週星期一的日期 */ public String getNextMonday() { weeks++; int mondayPlus = this.getMondayPlus(); GregorianCalendar currentDate = new GregorianCalendar(); currentDate.add(GregorianCalendar.DATE, mondayPlus + 7); Date monday = currentDate.getTime(); DateFormat df = DateFormat.getDateInstance(); String preMonday = df.format(monday); return preMonday; } /** * 獲得下週星期日的日期 */ public String getNextSunday() { int mondayPlus = this.getMondayPlus(); GregorianCalendar currentDate = new GregorianCalendar(); currentDate.add(GregorianCalendar.DATE, mondayPlus + 7 + 6); Date monday = currentDate.getTime(); DateFormat df = DateFormat.getDateInstance(); String preMonday = df.format(monday); return preMonday; } private int getMonthPlus() { Calendar cd = Calendar.getInstance(); int monthOfNumber = cd.get(Calendar.DAY_OF_MONTH); cd.set(Calendar.DATE, 1);// 把日期設定為當月第一天 cd.roll(Calendar.DATE, -1);// 日期回滾一天,也就是最後一天 MaxDate = cd.get(Calendar.DATE); if (monthOfNumber == 1) { return -MaxDate; } else { return 1 - monthOfNumber; } } /** * 獲得上月最後一天的日期 * * @return */ public String getPreviousMonthEnd() { String str = ""; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar lastDate = Calendar.getInstance(); lastDate.add(Calendar.MONTH, -1);// 減一個月 lastDate.set(Calendar.DATE, 1);// 把日期設定為當月第一天 lastDate.roll(Calendar.DATE, -1);// 日期回滾一天,也就是本月最後一天 str = sdf.format(lastDate.getTime()); return str; } /** * 獲得下個月第一天的日期 * * @return */ public String getNextMonthFirst() { String str = ""; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar lastDate = Calendar.getInstance(); lastDate.add(Calendar.MONTH, 1);// 減一個月 lastDate.set(Calendar.DATE, 1);// 把日期設定為當月第一天 str = sdf.format(lastDate.getTime()); return str; } /** * 獲得下個月最後一天的日期 * * @return */ public String getNextMonthEnd() { String str = ""; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar lastDate = Calendar.getInstance(); lastDate.add(Calendar.MONTH, 1);// 加一個月 lastDate.set(Calendar.DATE, 1);// 把日期設定為當月第一天 lastDate.roll(Calendar.DATE, -1);// 日期回滾一天,也就是本月最後一天 str = sdf.format(lastDate.getTime()); return str; } /** * 獲得明年最後一天的日期 * * @return */ public String getNextYearEnd() { String str = ""; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar lastDate = Calendar.getInstance(); lastDate.add(Calendar.YEAR, 1);// 加一個年 lastDate.set(Calendar.DAY_OF_YEAR, 1); lastDate.roll(Calendar.DAY_OF_YEAR, -1); str = sdf.format(lastDate.getTime()); return str; } /** * 獲得明年第一天的日期 * * @return */ public String getNextYearFirst() { String str = ""; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar lastDate = Calendar.getInstance(); lastDate.add(Calendar.YEAR, 1);// 加一個年 lastDate.set(Calendar.DAY_OF_YEAR, 1); str = sdf.format(lastDate.getTime()); return str; } /** * 獲得本年有多少天 * * @return */ private int getMaxYear() { Calendar cd = Calendar.getInstance(); cd.set(Calendar.DAY_OF_YEAR, 1);// 把日期設為當年第一天 cd.roll(Calendar.DAY_OF_YEAR, -1);// 把日期回滾一天。 int MaxYear = cd.get(Calendar.DAY_OF_YEAR); return MaxYear; } private int getYearPlus() { Calendar cd = Calendar.getInstance(); int yearOfNumber = cd.get(Calendar.DAY_OF_YEAR);// 獲得當天是一年中的第幾天 cd.set(Calendar.DAY_OF_YEAR, 1);// 把日期設為當年第一天 cd.roll(Calendar.DAY_OF_YEAR, -1);// 把日期回滾一天。 int MaxYear = cd.get(Calendar.DAY_OF_YEAR); if (yearOfNumber == 1) { return -MaxYear; } else { return 1 - yearOfNumber; } } /** * 獲得本年第一天的日期 * * @return */ public String getCurrentYearFirst() { int yearPlus = this.getYearPlus(); GregorianCalendar currentDate = new GregorianCalendar(); currentDate.add(GregorianCalendar.DATE, yearPlus); Date yearDay = currentDate.getTime(); DateFormat df = DateFormat.getDateInstance(); String preYearDay = df.format(yearDay); return preYearDay; } // 獲得本年最後一天的日期 * public String getCurrentYearEnd() { Date date = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy");// 可以方便地修改日期格式 String years = dateFormat.format(date); return years + "-12-31"; } // 獲得上年第一天的日期 * public String getPreviousYearFirst() { Date date = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy");// 可以方便地修改日期格式 String years = dateFormat.format(date); int years_value = Integer.parseInt(years); years_value--; return years_value + "-1-1"; } // 獲得上年最後一天的日期 public String getPreviousYearEnd() { weeks--; int yearPlus = this.getYearPlus(); GregorianCalendar currentDate = new GregorianCalendar(); currentDate.add(GregorianCalendar.DATE, yearPlus + MaxYear * weeks + (MaxYear - 1)); Date yearDay = currentDate.getTime(); DateFormat df = DateFormat.getDateInstance(); String preYearDay = df.format(yearDay); return preYearDay; } /** * 獲得本季度第一天 * * @param month * @return */ public String getThisSeasonFirstTime(int month) { int array[][] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }, { 10, 11, 12 } }; int season = 1; if (month >= 1 && month <= 3) { season = 1; } if (month >= 4 && month <= 6) { season = 2; } if (month >= 7 && month <= 9) { season = 3; } if (month >= 10 && month <= 12) { season = 4; } int start_month = array[season - 1][0]; int end_month = array[season - 1][2]; Date date = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy");// 可以方便地修改日期格式 String years = dateFormat.format(date); int years_value = Integer.parseInt(years); int start_days = 1;// years+"-"+String.valueOf(start_month)+"-1";//getLastDayOfMonth(years_value,start_month); int end_days = getLastDayOfMonth(years_value, end_month); String seasonDate = years_value + "-" + start_month + "-" + start_days; return seasonDate; } /** * 獲得本季度最後一天 * * @param month * @return */ public String getThisSeasonFinallyTime(int month) { int array[][] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }, { 10, 11, 12 } }; int season = 1; if (month >= 1 && month <= 3) { season = 1; } if (month >= 4 && month <= 6) { season = 2; } if (month >= 7 && month <= 9) { season = 3; } if (month >= 10 && month <= 12) { season = 4; } int start_month = array[season - 1][0]; int end_month = array[season - 1][2]; Date date = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy");// 可以方便地修改日期格式 String years = dateFormat.format(date); int years_value = Integer.parseInt(years); int start_days = 1;// years+"-"+String.valueOf(start_month)+"-1";//getLastDayOfMonth(years_value,start_month); int end_days = getLastDayOfMonth(years_value, end_month); String seasonDate = years_value + "-" + end_month + "-" + end_days; return seasonDate; } /** * 獲取某年某月的最後一天 * * @param year * 年 * @param month * 月 * @return 最後一天 */ private int getLastDayOfMonth(int year, int month) { if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { return 31; } if (month == 4 || month == 6 || month == 9 || month == 11) { return 30; } if (month == 2) { if (isLeapYear(year)) { return 29; } else { return 28; } } return 0; } /** * 是否閏年 * * @param year * 年 * @return */ public boolean isLeapYear(int year) { return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); } /** * 是否閏年 * * @param year * @return */ public boolean isLeapYear2(int year) { return new GregorianCalendar().isLeapYear(year); } }

相關推薦

java中 快速獲取當天00000:00:00,23595923:59:59

// 利用Apache lang包快速獲取凌晨0點0分0秒,23點59分59秒字串         System.out.println(DateFormatUtils.format(new Date(), "yyyy-MM-dd 00:0

java 獲取當天00000:00:00+Calendar工具

/** * 獲取當天0點0分0秒(00:00:00) * * @return */ private static String getTimesmorning() { Calendar ca

Java基礎五十九-集合工具Java集框架

1:Stack棧 棧是一種先進後出的資料結構。例如:在文字編輯器上都有撤銷功能,那麼每次使用的時候,最後一次的編輯操作永遠是最先撤銷的,那麼這個功能就是利用棧來實現的,棧的基本操作形式如下。 案例:實現棧的操作 import java.util.Stack;

獲取當天000的日期和235959的日期

方法一:也是推薦使用的方法 //可以定義一個函式,函式的引數有小時、分、秒、相比今天的日期,今天就輸入0,明天輸入1,昨天輸入-1,以此類推 //(毫秒是可選引數,可以輸入也可以不輸入,毫秒的取值範圍是0到999) private Date getNeedTime(int

SQL Server 取前一天的0和235959

nbsp getdate etime sel end bsp detail add sele DECLARE @startDate1 DATE;DECLARE @startDate DATETIME;SET @startDate1=GETDATE();SELECT @sta

java獲取使用者ip地址,處理0:0:0:0:0:0:0:1

/** * 獲得使用者遠端地址 */ public static String getRemoteAddr(HttpServletRequest request){ /*String remoteAddr = request.getHeader("X-Real-IP"); if (is

java 獲取當天今日零點零

pri main void timezone println second one amp offset 兩種方法 一種得到的是時間戳,一種得到是日期格式: 1.日期格式的 Calendar calendar = Calendar.getI

Android Studio 2.0 正式版公布啦 首次中文翻譯

2.0 play user attribute ast 調試 iou osi watermark Android Studio 2.0 公布了,添加了一些新特性: 1. 更加完好的 Instant Run 2. 更快的 A

區塊鏈教程Fabric1.0源代碼分析PeerEndorser服務端

java安裝 sys sch rop 版本 返回 The nal input 區塊鏈教程Fabric1.0源代碼分析Peer(Endorser服務端),2018年下半年,區塊鏈行業正逐漸褪去發展之初的浮躁、回歸理性,表面上看相關人才需求與身價似乎正在回落。但事實上,正是初期

0開始的圖形學大師5~未完

從0開始的圖形學大師 標籤(空格分隔):圖形學 peter Shirley <計算機圖形學> 第5章 線性代數 大學知識。 三維行列式為平行六面體體積,體積為零,共面,線性相關。 特徵向量不相等為正交。對稱矩陣特徵值是實數。 第6章 矩陣變換

5分鐘學會java獲取當天、昨天、本週、上週、本月、上月的起始結束時間

                              獲取當天/昨天/本週/上週/本月/上月的起始結束時間   一、獲取當天日

Quartus II 13.0 下載安裝、破解教程親測有效

作者因為安裝過程沒有截圖,所以沒有圖片,但是一定正確,因為裝過不止一次,有問題,可以聯絡作者 一、 首先是Quartus II 13.0.1 軟體的下載 如果你沒有那麼高的要求,用個低版本的Quartus II 就足夠了,而且低版本的軟體比較穩定, 為了免去大家找安裝檔案版本號不匹配的情況,

Centos 7.4 Mysql 8.0 Setting up master-master replication主-主複製叢集模式

介紹 主主模式基於上一篇文章主從模式,為了排版好看我省略上一篇的內容,以下是連線 https://blog.csdn.net/ciqingloveless/article/details/82866462 上一篇文章配置的是Mater傳送資料到Slave節點,這

Spring Boot 2.0深度實踐之核心技術篇雲盤分享

第1章 系列總覽 總覽 Spring Boot 2.0 深度實踐系列課程的整體議程,包括 Spring Boot 三大核心特性(元件自動裝配、嵌入式Web容&#64056;、生產準備特性)、Web 應用(傳統 Servlet、Spring Web MVC、Spri

Spring Boot 2.0深度實踐之核心技術篇雲盤下載

第1章 系列總覽 總覽 Spring Boot 2.0 深度實踐系列課程的整體議程,包括 Spring Boot 三大核心特性(元件自動裝配、嵌入式Web容&#64056;、生產準備特性)、Web 應用(傳統 Servlet、Spring Web MVC、Spri

Android Retrofit 2.0 的詳細 使用攻略含例項講解

前言 在Andrroid開發中,網路請求十分常用 而在Android網路請求庫中,Retrofit是當下最熱的一個網路請求庫 Github截圖 今天,我將獻上一份非常詳細Retrofit v2.0的使用教程,希望你們會喜歡。 目錄 目錄 1. 簡介

Vczh Library++ 3.0之可配置語法分析器FpMacro及程式碼

    上一篇文章基本上把分析的過程都講完了,於是這次就把FpMacro作為一個Demo拿了出來。不第一次就發的原因主要是那個時候FpMacro剛剛寫完,當然寫完就要用的,於是後來就在Vczh Library++ 3.0的庫裡面大量使用了FpMacro作為程式碼生成的一個工具,用來代替一部分的巨集

Android :RxJava2.0到底更新了什麼?含使用建議

前言 Rxjava由於其基於事件流的鏈式呼叫、邏輯簡潔 & 使用簡單的特點,深受各大 Android開發者的歡迎。 RxJava 2.0已於2016 - 10.29正式釋出,對 RxJava 1.0進行了1次重大升級:實際使用的API

servlet3.0以上form表單提交ajax非同步提交

一、普通form提交 1、jsp <form id="form" method="post" name="upload" enctype="multipart/form-data" action="/index.do"> <input type=

c++實現0-1揹包問題完整原始碼動態規劃實現

轉自:東風破的部落格 http://blog.sina.com.cn/jaydongfengpo #include  #define MAX_NUM 5 #define MAX_WEIGHT 10 usingnamespace std;   //動態規劃求解 int