农历01

1、NongLi.cpp

// NongLi.cpp : Defines the entry point for the console application.
//

#include <stdio.h>
#include "xDate.h"// http://www.chinapyg.com/forum.php?mod=viewthread&tid=2928int main(int argc, char* argv[])
{xDate *dateX = new xDate();//取系统时间初始化-:) 
printf("公历(年份) : %d\n", dateX->GetYear());printf("公历(月份) : %d\n", dateX->GetMonth());printf("公历(日期) : %d\n", dateX->GetDay());if(dateX->IsLeapYear(dateX->GetYear()))printf("今年是闰年\n");elseprintf("今年不是闰年\n");printf("今天是星期%d\n", dateX->WeekDay(dateX->GetYear(), dateX->GetMonth(), dateX->GetDay()));printf("公历:本月%d天\n", dateX->MonthDays(dateX->GetYear(), dateX->GetMonth()));printf("阴历:本月%d天\n", dateX->LunarMonthDays(dateX->GetYear(), dateX->GetMonth()));printf("阴历今年%d天\n", dateX->LunarYearDays(dateX->GetYear()));//==================================================================// char ch0[60]="天干记年法表示:";char Buffer0[18] = {0};dateX->FormatLunarYear(dateX->GetYear(), Buffer0);strcat(ch0, Buffer0);printf("%s\n", ch0);//==================================================================//
    char ch1[20]="月份中文表示法:";char Buffer1[8];dateX->FormatMonth(dateX->GetMonth(), Buffer1, true);strcat(ch1, Buffer1);printf("%s\n", ch1);//==================================================================//
    char ch2[20]="Day中文表示法:";char Buffer2[8];dateX->FormatLunarDay(dateX->GetDay(), Buffer2);strcat(ch2,Buffer2);printf("%s\n", ch2);//==================================================================////计算两个日期相差的天数printf("距1956,2,21有%d天\n:", dateX->CalcDateDiff(dateX->GetYear(), dateX->GetMonth(), dateX->GetDay(), 1956,2,21));//节气计算
    WORD iLunarYear, iLunarMonth, iLunarDay;WORD n = dateX->GetLunarDate(dateX->GetYear(), dateX->GetMonth(), dateX->GetDay(), iLunarYear, iLunarMonth, iLunarDay);if(n)printf("%d\n", n);elseprintf("不是节气\n");printf("今天阴历是:%d-%d-%d\n", iLunarYear, iLunarMonth, iLunarDay);return 0;
}

 

2、xDate.h

//xDate.h 
/************************************************************************************************************ Author  :xShandow Dest    :A Date Class For C++ Email   :chenzg@hftd.com HomePage:http://www.hftd.com Dev Env :Visual C++6.0 OS.     :Windows 2000 Professinal Date    :2003-NOV-15 
************************************************************************************************************/ 
#ifndef XDATE_H 
#define XDATE_H  #include <windows.h> 
extern const WORD START_YEAR; 
extern const WORD END_YEAR ; class xDate 
{ 
private: WORD    m_iYear, m_iMonth, m_iDay; void    l_InitData(); //计算从1901年1月1日过iSpanDays天后的阴历日期    static void   l_CalcLunarDate(WORD &iYear, WORD &iMonth ,WORD &iDay,LONG iSpanDays); //计算公历iYear年iMonth月iDay日对应的节气 0-24,0表不是节气 static WORD   l_GetLunarHolDay(WORD iYear, WORD iMonth, WORD iDay); 
public:  //=====================================================================================// 
   xDate(WORD iYear, WORD iMonth, WORD iDay);  xDate(); //=====================================================================================// 
WORD GetYear(){return m_iYear;}  WORD GetMonth(){return m_iMonth;} WORD GetDay(){return m_iDay;}  //=====================================================================================// void GetDate(WORD &iYear, WORD &iMonth, WORD &iDay);  BOOL SetDate(WORD iYear , WORD iMonth , WORD iDay); //=====================================================================================// //判断iYear是不是闰年  static BOOL IsLeapYear(WORD iYear)  {return !(iYear%4)&&(iYear%100) || !(iYear%400);}  //计算iYear,iMonth,iDay对应是星期几 1年1月1日 --- 65535年12月31日  static WORD WeekDay(WORD iYear, WORD iMonth, WORD iDay); //返回iYear年iMonth月的天数 1年1月 --- 65535年12月  static WORD MonthDays(WORD iYear, WORD iMonth);  //返回阴历iLunarYer年阴历iLunarMonth月的天数,如果iLunarMonth为闰月, //高字为第二个iLunarMonth月的天数,否则高字为0  // 1901年1月---2050年12月  static LONG LunarMonthDays(WORD iLunarYear, WORD iLunarMonth);  //返回阴历iLunarYear年的总天数 // 1901年1月---2050年12月  static WORD LunarYearDays(WORD iLunarYear);  //返回阴历iLunarYear年的闰月月份,如没有返回0  // 1901年1月---2050年12月 static WORD GetLeapMonth(WORD iLunarYear);  //把iYear年格式化成天干记年法表示的字符串  static void FormatLunarYear(WORD  iYear, char *pBuffer);  //把iMonth格式化成中文字符串  static void FormatMonth(WORD iMonth, char *pBuffer, BOOL bLunar = TRUE);  //把iDay格式化成中文字符串  static void FormatLunarDay(WORD  iDay, char *pBuffer); //计算公历两个日期间相差的天数  1年1月1日 --- 65535年12月31日  static LONG CalcDateDiff(WORD iEndYear, WORD iEndMonth, WORD iEndDay,WORD iStartYear = START_YEAR,WORD iStartMonth =1, WORD iStartDay =1);  //计算公历iYear年iMonth月iDay日对应的阴历日期,返回对应的阴历节气 0-24 //1901年1月1日---2050年12月31日  static WORD GetLunarDate(WORD iYear, WORD iMonth, WORD iDay,WORD &iLunarYear, WORD &iLunarMonth, WORD &iLunarDay); 
};  #endif //XDATE_H

 

3、xDate.cpp

//xDate.cpp 
#include "xDate.h"
#include <windows.h>extern WORD gLunarMonthDay[];
extern BYTE gLunarMonth[];
extern BYTE gLunarHolDay[];const  WORD START_YEAR =1901;
const  WORD END_YEAR   =2050;
//===========================================================================//
void xDate::l_InitData()
{SYSTEMTIME systime;::GetSystemTime(&systime);m_iYear  = systime.wYear;m_iMonth = systime.wMonth;m_iDay   = systime.wDay;
}
//===========================================================================//
xDate::xDate(WORD iYear, WORD iMonth, WORD iDay)
{if(!SetDate(iYear, iMonth, iDay))l_InitData();
}
//===========================================================================//
xDate::xDate()
{l_InitData();
}
//===========================================================================//
LONG xDate::CalcDateDiff(WORD iEndYear, WORD iEndMonth, WORD iEndDay,WORD  iStartYear, WORD iStartMonth, WORD iStartDay)
{WORD monthday[]={0, 31, 59 ,90, 120, 151, 181, 212, 243, 273, 304, 334};//计算两个年份1月1日之间相差的天数LONG iDiffDays =(iEndYear - iStartYear)*365;iDiffDays += (iEndYear-1)/4 - (iStartYear-1)/4;iDiffDays -= ((iEndYear-1)/100 - (iStartYear-1)/100);iDiffDays += (iEndYear-1)/400 - (iStartYear-1)/400;//加上iEndYear年1月1日到iEndMonth月iEndDay日之间的天数iDiffDays += monthday[iEndMonth-1] +(IsLeapYear(iEndYear)&&iEndMonth>2? 1: 0);iDiffDays += iEndDay;//减去iStartYear年1月1日到iStartMonth月iStartDay日之间的天数iDiffDays -= (monthday[iStartMonth-1] +(IsLeapYear(iStartYear)&&iStartMonth>2 ? 1: 0));iDiffDays -= iStartDay;return iDiffDays;
}
//===========================================================================//
void  xDate::l_CalcLunarDate(WORD &iYear, WORD &iMonth ,WORD &iDay, LONG iSpanDays)
{//阳历1901年2月19日为阴历1901年正月初一//阳历1901年1月1日到2月19日共有49天if(iSpanDays <49){iYear = START_YEAR-1;if(iSpanDays <19){iMonth = 11;iDay = 11+WORD(iSpanDays);}else{iMonth = 12;iDay = WORD(iSpanDays) -18;}return;}//下面从阴历1901年正月初一算起 iSpanDays -=49;iYear = START_YEAR;iMonth = 1;iDay = 1;//计算年LONG tmp = LunarYearDays(iYear);while(iSpanDays >= tmp){iSpanDays -= tmp;tmp = LunarYearDays(++iYear);}//计算月tmp = LOWORD(LunarMonthDays(iYear, iMonth));  while(iSpanDays >= tmp)  {  iSpanDays -= tmp;  if(iMonth == GetLeapMonth(iYear))  {  tmp  = HIWORD(LunarMonthDays(iYear, iMonth));  if(iSpanDays < tmp) break; iSpanDays -= tmp; } tmp = LOWORD(LunarMonthDays(iYear, ++iMonth)); } //计算日 iDay += WORD(iSpanDays); 
} 
//===========================================================================// 
WORD xDate::GetLunarDate(WORD iYear, WORD iMonth, WORD iDay,WORD &iLunarYear, WORD &iLunarMonth, WORD &iLunarDay) 
{ l_CalcLunarDate(iLunarYear, iLunarMonth, iLunarDay,CalcDateDiff(iYear, iMonth, iDay)); return l_GetLunarHolDay(iYear, iMonth, iDay); 
} 
//===========================================================================// 
//根据节气数据存储格式,计算阳历iYear年iMonth月iDay日对应的节气, 
WORD xDate::l_GetLunarHolDay(WORD iYear, WORD iMonth, WORD iDay) { BYTE &flag = gLunarHolDay[(iYear - START_YEAR)*12+iMonth -1]; WORD day; if(iDay <15) day= 15 - ((flag>>4)&0x0f);  else  day = ((flag)&0x0f)+15;  if(iDay == day)  return (iMonth-1) *2 + (iDay>15? 1: 0) +1;  else  return 0;  
}  
//===========================================================================// 
void xDate::GetDate(WORD &iYear, WORD &iMonth, WORD &iDay)  
{  iYear  = m_iYear;  iMonth = m_iMonth;  iDay   = m_iDay;  
}  
//===========================================================================// 
BOOL xDate::SetDate(WORD iYear, WORD iMonth, WORD iDay)  
{  if(iYear < START_YEAR || iYear > END_YEAR || iMonth <1 || iMonth >12)  return FALSE;  if(iDay <1 || iDay > MonthDays(iYear, iMonth))  return FALSE;  m_iYear   = iYear;  m_iMonth  = iMonth;  m_iDay    = iDay;  return TRUE;  
}  
//===========================================================================// 
WORD xDate::WeekDay(WORD iYear, WORD iMonth, WORD iDay)  
{  //数组元素monthday表示第i个月以前的总天数除以7的余数  WORD monthday[]={0,3,3,6,1,4,6,2,5,0,3,5};  WORD iDays = (iYear-1)%7 + (iYear-1)/4 - (iYear-1)/100 +(iYear-1)/400;  iDays += (monthday[iMonth-1] +iDay) ;  //如果iYear是闰年  if(IsLeapYear(iYear) && iMonth>2)  iDays++;  //返回:0,1,2,3,4,5,6表日、一、二、三、四、五、六  return iDays%7;  
}  
//===========================================================================// 
WORD xDate::MonthDays(WORD iYear, WORD iMonth)  
{  switch(iMonth)  {  case 1: //一  (月) case 3: //三  (月) case 5: //五  (月) case 7: //七  (月) case 8: //八  (月) case 10://十  (月) case 12://十二(月) return 31;  case 4: //四  (月) case 6: //六  (月) case 9: //九  (月) case 11://十一(月)  return 30;  case 2: //二  (月) //如果是闰年  if(IsLeapYear(iYear))  return 29;  else  return 28;  }  return 0;  
}  
//===========================================================================// 
WORD xDate::GetLeapMonth(WORD iLunarYear)  
{  BYTE &flag = gLunarMonth[(iLunarYear - START_YEAR)/2];  return  (iLunarYear - START_YEAR)%2 ? flag&0x0f : flag>>4;  
}  
//===========================================================================// 
LONG xDate::LunarMonthDays(WORD iLunarYear, WORD iLunarMonth)  
{  if(iLunarYear < START_YEAR) return 30L; WORD height =0 ,low =29; int iBit = 16 - iLunarMonth; if(iLunarMonth > GetLeapMonth(iLunarYear) && GetLeapMonth(iLunarYear))  iBit --;  if(gLunarMonthDay[iLunarYear - START_YEAR] & (1<<iBit)) low ++; if(iLunarMonth == GetLeapMonth(iLunarYear)) if(gLunarMonthDay[iLunarYear - START_YEAR] & (1<< (iBit -1))) height =30; else height =29; return MAKELONG(low, height); 
} 
//===========================================================================// 
WORD xDate::LunarYearDays(WORD iLunarYear) 
{ 
/* WORD days=348 ; //12*29 int month = 12 ; //如果iYear年有闰月,则为13个月 if(gLanarMonth[iYear - START_YEAR]) month ++; //如果某月是三十天则days++ while(month >=0 && (gLanarMonthDay[iYear - START_YEAR] & (1 << (16 - month)))) { days ++; month --; } return days; 
*/ WORD days =0; for(WORD i=1; i<=12; i++) { LONG tmp = LunarMonthDays(iLunarYear ,i); days += HIWORD(tmp); days += LOWORD(tmp); } return days; 
} 
//===========================================================================// 
void xDate::FormatLunarYear(WORD iYear, char *pBuffer) 
{ char szText1[]="甲乙丙丁戊己庚辛壬癸"; char szText2[]="子丑寅卯辰巳午未申酉戌亥"; char szText3[]="鼠牛虎免龙蛇马羊猴鸡狗猪"; memcpy(pBuffer  ,szText1+((iYear-4)%10)*2,2); memcpy(pBuffer+2,szText2+((iYear-4)%12)*2,2); pBuffer[4]=' '; memcpy(pBuffer+5,szText3+((iYear-4)%12)*2,2); strcpy(pBuffer+7,""); 
} 
//===========================================================================// 
void xDate::FormatMonth(WORD iMonth, char *pBuffer, BOOL bLunar) { if(!bLunar && iMonth==1) { strcpy(pBuffer, " 一月"); return; } char szText[]="正二三四五六七八九十"; if(iMonth<=10) { memcpy(pBuffer  ," ", 2); memcpy(pBuffer+2, szText + (iMonth -1)*2, 2); strcpy(pBuffer+4, ""); return; } if (iMonth == 11) strcpy(pBuffer, "十一"); else strcpy(pBuffer, "十二"); strcpy(pBuffer+4  , ""); } 
//===========================================================================// 
void xDate::FormatLunarDay(WORD iDay, char *pBuffer) 
{ char szText1[]="初十廿三"; char szText2[]="一二三四五六七八九十"; if(iDay != 20 && iDay !=30) { memcpy(pBuffer  , szText1 + (iDay-1)/10*2   ,2); memcpy(pBuffer+2, szText2 + ((iDay-1)%10)*2 ,2); pBuffer[4]='\0'; } else { memcpy(pBuffer  , szText1 + iDay/10*2, 2); strcpy(pBuffer+2, szText2 +18); } 
} /******************************************************************************  
下面为阴历计算所需的数据,为节省存储空间,所以采用下面比较变态的存储方法.  
*******************************************************************************/  
//数组gLunarDay存入阴历1901年到2100年每年中的月天数信息,  
//阴历每月只能是29或30天,一年用12(或13)个二进制位表示,对应位为1表30天,否则为29天  
WORD gLunarMonthDay[]=  
{  //测试数据只有1901.1.1 --2050.12.31  0X4ae0, 0Xa570, 0X5268, 0Xd260, 0Xd950, 0X6aa8, 0X56a0, 0X9ad0, 0X4ae8, 0X4ae0,   //1910  0Xa4d8, 0Xa4d0, 0Xd250, 0Xd548, 0Xb550, 0X56a0, 0X96d0, 0X95b0, 0X49b8, 0X49b0,   //1920  0Xa4b0, 0Xb258, 0X6a50, 0X6d40, 0Xada8, 0X2b60, 0X9570, 0X4978, 0X4970, 0X64b0,   //1930  0Xd4a0, 0Xea50, 0X6d48, 0X5ad0, 0X2b60, 0X9370, 0X92e0, 0Xc968, 0Xc950, 0Xd4a0,   //1940  0Xda50, 0Xb550, 0X56a0, 0Xaad8, 0X25d0, 0X92d0, 0Xc958, 0Xa950, 0Xb4a8, 0X6ca0,   //1950  0Xb550, 0X55a8, 0X4da0, 0Xa5b0, 0X52b8, 0X52b0, 0Xa950, 0Xe950, 0X6aa0, 0Xad50,   //1960  0Xab50, 0X4b60, 0Xa570, 0Xa570, 0X5260, 0Xe930, 0Xd950, 0X5aa8, 0X56a0, 0X96d0,   //1970  0X4ae8, 0X4ad0, 0Xa4d0, 0Xd268, 0Xd250, 0Xd528, 0Xb540, 0Xb6a0, 0X96d0, 0X95b0,   //1980  0X49b0, 0Xa4b8, 0Xa4b0, 0Xb258, 0X6a50, 0X6d40, 0Xada0, 0Xab60, 0X9370, 0X4978,   //1990  0X4970, 0X64b0, 0X6a50, 0Xea50, 0X6b28, 0X5ac0, 0Xab60, 0X9368, 0X92e0, 0Xc960,   //2000  0Xd4a8, 0Xd4a0, 0Xda50, 0X5aa8, 0X56a0, 0Xaad8, 0X25d0, 0X92d0, 0Xc958, 0Xa950,   //2010  0Xb4a0, 0Xb550, 0Xb550, 0X55a8, 0X4ba0, 0Xa5b0, 0X52b8, 0X52b0, 0Xa930, 0X74a8,   //2020  0X6aa0, 0Xad50, 0X4da8, 0X4b60, 0X9570, 0Xa4e0, 0Xd260, 0Xe930, 0Xd530, 0X5aa0,   //2030  0X6b50, 0X96d0, 0X4ae8, 0X4ad0, 0Xa4d0, 0Xd258, 0Xd250, 0Xd520, 0Xdaa0, 0Xb5a0,   //2040  0X56d0, 0X4ad8, 0X49b0, 0Xa4b8, 0Xa4b0, 0Xaa50, 0Xb528, 0X6d20, 0Xada0, 0X55b0,   //2050  
       
};  //数组gLanarMonth存放阴历1901年到2050年闰月的月份,如没有则为0,每字节存两年  
BYTE  gLunarMonth[]=  
{  0X00, 0X50, 0X04, 0X00, 0X20,   //1910  0X60, 0X05, 0X00, 0X20, 0X70,   //1920  0X05, 0X00, 0X40, 0X02, 0X06,   //1930  0X00, 0X50, 0X03, 0X07, 0X00,   //1940  0X60, 0X04, 0X00, 0X20, 0X70,   //1950  0X05, 0X00, 0X30, 0X80, 0X06,   //1960  0X00, 0X40, 0X03, 0X07, 0X00,   //1970  0X50, 0X04, 0X08, 0X00, 0X60,   //1980  0X04, 0X0a, 0X00, 0X60, 0X05,   //1990  0X00, 0X30, 0X80, 0X05, 0X00,   //2000  0X40, 0X02, 0X07, 0X00, 0X50,   //2010  0X04, 0X09, 0X00, 0X60, 0X04,   //2020  0X00, 0X20, 0X60, 0X05, 0X00,   //2030  0X30, 0Xb0, 0X06, 0X00, 0X50,   //2040  0X02, 0X07, 0X00, 0X50, 0X03    //2050  
};  //数组gLanarHoliDay存放每年的二十四节气对应的阳历日期  
//每年的二十四节气对应的阳历日期几乎固定,平均分布于十二个月中  
//   1月          2月         3月         4月         5月         6月  
//小寒 大寒   立春  雨水   惊蛰 春分   清明 谷雨   立夏 小满   芒种 夏至  
//   7月          8月         9月         10月       11月        12月  
//小暑 大暑   立秋  处暑   白露 秋分   寒露 霜降   立冬 小雪   大雪 冬至  
/*********************************************************************************  
节气无任何确定规律,所以只好存表,要节省空间,所以....  
下面这种存法实在是太变态了,你就将就着看吧  
**********************************************************************************/  
//数据格式说明:  
//如1901年的节气为  
//  1月     2月     3月   4月    5月   6月   7月    8月   9月    10月  11月     12月  
// 6, 21, 4, 19,  6, 21, 5, 21, 6,22, 6,22, 8, 23, 8, 24, 8, 24, 8, 24 , 8, 23, 8, 22  
// 9, 6,  11,4,   9, 6,  10,6,  9,7,  9,7,  7, 8,  7, 9,  7,  9, 7,  9, 7,  8, 7, 15  
//上面第一行数据为每月节气对应日期,15减去每月第一个节气,每月第二个节气减去15得第二行  
// 这样每月两个节气对应数据都小于16,每月用一个字节存放,高位存放第一个节气数据,低位存放  
//第二个节气的数据,可得下表  

BYTE gLunarHolDay[]=  
{  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1901  0X96, 0XA4, 0X96, 0X96, 0X97, 0X87, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1902  0X96, 0XA5, 0X87, 0X96, 0X87, 0X87, 0X79, 0X69, 0X69, 0X69, 0X78, 0X78,   //1903  0X86, 0XA5, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X78, 0X87,   //1904  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1905  0X96, 0XA4, 0X96, 0X96, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1906  0X96, 0XA5, 0X87, 0X96, 0X87, 0X87, 0X79, 0X69, 0X69, 0X69, 0X78, 0X78,   //1907  0X86, 0XA5, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1908  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1909  0X96, 0XA4, 0X96, 0X96, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1910  0X96, 0XA5, 0X87, 0X96, 0X87, 0X87, 0X79, 0X69, 0X69, 0X69, 0X78, 0X78,   //1911  0X86, 0XA5, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1912  0X95, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1913  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1914  0X96, 0XA5, 0X97, 0X96, 0X97, 0X87, 0X79, 0X79, 0X69, 0X69, 0X78, 0X78,   //1915  0X96, 0XA5, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1916  0X95, 0XB4, 0X96, 0XA6, 0X96, 0X97, 0X78, 0X79, 0X78, 0X69, 0X78, 0X87,   //1917  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X77,   //1918  0X96, 0XA5, 0X97, 0X96, 0X97, 0X87, 0X79, 0X79, 0X69, 0X69, 0X78, 0X78,   //1919  0X96, 0XA5, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1920  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X78, 0X79, 0X78, 0X69, 0X78, 0X87,   //1921  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X77,   //1922  0X96, 0XA4, 0X96, 0X96, 0X97, 0X87, 0X79, 0X79, 0X69, 0X69, 0X78, 0X78,   //1923  0X96, 0XA5, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1924  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X78, 0X79, 0X78, 0X69, 0X78, 0X87,   //1925  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1926  0X96, 0XA4, 0X96, 0X96, 0X97, 0X87, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1927  0X96, 0XA5, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1928  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1929  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1930  0X96, 0XA4, 0X96, 0X96, 0X97, 0X87, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1931  0X96, 0XA5, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1932  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1933  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1934  0X96, 0XA4, 0X96, 0X96, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1935  0X96, 0XA5, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1936  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1937  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1938  0X96, 0XA4, 0X96, 0X96, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1939  0X96, 0XA5, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1940  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1941  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1942  0X96, 0XA4, 0X96, 0X96, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1943  0X96, 0XA5, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1944  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1945  0X95, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X78, 0X69, 0X78, 0X77,   //1946  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1947  0X96, 0XA5, 0XA6, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //1948  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X79, 0X78, 0X79, 0X77, 0X87,   //1949  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X78, 0X79, 0X78, 0X69, 0X78, 0X77,   //1950  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X79, 0X79, 0X79, 0X69, 0X78, 0X78,   //1951  0X96, 0XA5, 0XA6, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //1952  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1953  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X78, 0X79, 0X78, 0X68, 0X78, 0X87,   //1954  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1955  0X96, 0XA5, 0XA5, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //1956  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1957  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1958  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1959  0X96, 0XA4, 0XA5, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //1960  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1961  0X96, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1962  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1963  0X96, 0XA4, 0XA5, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //1964  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1965  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1966  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1967  0X96, 0XA4, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //1968  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1969  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1970  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X79, 0X69, 0X78, 0X77,   //1971  0X96, 0XA4, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //1972  0XA5, 0XB5, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1973  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1974  0X96, 0XB4, 0X96, 0XA6, 0X97, 0X97, 0X78, 0X79, 0X78, 0X69, 0X78, 0X77,   //1975  0X96, 0XA4, 0XA5, 0XB5, 0XA6, 0XA6, 0X88, 0X89, 0X88, 0X78, 0X87, 0X87,   //1976  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //1977  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X78, 0X87,   //1978  0X96, 0XB4, 0X96, 0XA6, 0X96, 0X97, 0X78, 0X79, 0X78, 0X69, 0X78, 0X77,   //1979  0X96, 0XA4, 0XA5, 0XB5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //1980  0XA5, 0XB4, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X77, 0X87,   //1981  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1982  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X78, 0X79, 0X78, 0X69, 0X78, 0X77,   //1983  0X96, 0XB4, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X87,   //1984  0XA5, 0XB4, 0XA6, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //1985  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1986  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X79, 0X78, 0X69, 0X78, 0X87,   //1987  0X96, 0XB4, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86,   //1988  0XA5, 0XB4, 0XA5, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //1989  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //1990  0X95, 0XB4, 0X96, 0XA5, 0X86, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1991  0X96, 0XB4, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86,   //1992  0XA5, 0XB3, 0XA5, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //1993  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1994  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X76, 0X78, 0X69, 0X78, 0X87,   //1995  0X96, 0XB4, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86,   //1996  0XA5, 0XB3, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //1997  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //1998  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //1999  0X96, 0XB4, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86,   //2000  0XA5, 0XB3, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //2001  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //2002  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //2003  0X96, 0XB4, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86,   //2004  0XA5, 0XB3, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //2005  0XA5, 0XB4, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //2006  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X69, 0X78, 0X87,   //2007  0X96, 0XB4, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X87, 0X78, 0X87, 0X86,   //2008  0XA5, 0XB3, 0XA5, 0XB5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //2009  0XA5, 0XB4, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //2010  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X78, 0X87,   //2011  0X96, 0XB4, 0XA5, 0XB5, 0XA5, 0XA6, 0X87, 0X88, 0X87, 0X78, 0X87, 0X86,   //2012  0XA5, 0XB3, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X87,   //2013  0XA5, 0XB4, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //2014  0X95, 0XB4, 0X96, 0XA5, 0X96, 0X97, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //2015  0X95, 0XB4, 0XA5, 0XB4, 0XA5, 0XA6, 0X87, 0X88, 0X87, 0X78, 0X87, 0X86,   //2016  0XA5, 0XC3, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X87,   //2017  0XA5, 0XB4, 0XA6, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //2018  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //2019  0X95, 0XB4, 0XA5, 0XB4, 0XA5, 0XA6, 0X97, 0X87, 0X87, 0X78, 0X87, 0X86,   //2020  0XA5, 0XC3, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86,   //2021  0XA5, 0XB4, 0XA5, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //2022  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X79, 0X77, 0X87,   //2023  0X95, 0XB4, 0XA5, 0XB4, 0XA5, 0XA6, 0X97, 0X87, 0X87, 0X78, 0X87, 0X96,   //2024  0XA5, 0XC3, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86,   //2025  0XA5, 0XB3, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //2026  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //2027  0X95, 0XB4, 0XA5, 0XB4, 0XA5, 0XA6, 0X97, 0X87, 0X87, 0X78, 0X87, 0X96,   //2028  0XA5, 0XC3, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86,   //2029  0XA5, 0XB3, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //2030  0XA5, 0XB4, 0X96, 0XA5, 0X96, 0X96, 0X88, 0X78, 0X78, 0X78, 0X87, 0X87,   //2031  0X95, 0XB4, 0XA5, 0XB4, 0XA5, 0XA6, 0X97, 0X87, 0X87, 0X78, 0X87, 0X96,   //2032  0XA5, 0XC3, 0XA5, 0XB5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X86,   //2033  0XA5, 0XB3, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X78, 0X88, 0X78, 0X87, 0X87,   //2034  0XA5, 0XB4, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //2035  0X95, 0XB4, 0XA5, 0XB4, 0XA5, 0XA6, 0X97, 0X87, 0X87, 0X78, 0X87, 0X96,   //2036  0XA5, 0XC3, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86,   //2037  0XA5, 0XB3, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //2038  0XA5, 0XB4, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //2039  0X95, 0XB4, 0XA5, 0XB4, 0XA5, 0XA6, 0X97, 0X87, 0X87, 0X78, 0X87, 0X96,   //2040  0XA5, 0XC3, 0XA5, 0XB5, 0XA5, 0XA6, 0X87, 0X88, 0X87, 0X78, 0X87, 0X86,   //2041  0XA5, 0XB3, 0XA5, 0XB5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87,   //2042  0XA5, 0XB4, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //2043  0X95, 0XB4, 0XA5, 0XB4, 0XA5, 0XA6, 0X97, 0X87, 0X87, 0X88, 0X87, 0X96,   //2044  0XA5, 0XC3, 0XA5, 0XB4, 0XA5, 0XA6, 0X87, 0X88, 0X87, 0X78, 0X87, 0X86,   //2045  0XA5, 0XB3, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X87,   //2046  0XA5, 0XB4, 0X96, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X78, 0X78, 0X87, 0X87,   //2047  0X95, 0XB4, 0XA5, 0XB4, 0XA5, 0XA5, 0X97, 0X87, 0X87, 0X88, 0X86, 0X96,   //2048  0XA4, 0XC3, 0XA5, 0XA5, 0XA5, 0XA6, 0X97, 0X87, 0X87, 0X78, 0X87, 0X86,   //2049  0XA5, 0XC3, 0XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X78, 0X78, 0X87, 0X87    //2050  
       
};

 

4、

5、

 

转载于:https://www.cnblogs.com/cppskill/p/5930558.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/470040.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

java内联_JAVA中的内联函数

在说内联函数之前&#xff0c;先说说函数的调用过程。调用某个函数实际上将程序执行顺序转移到该函数所存放在内存中某个地址&#xff0c;将函数的程序内容执行完后&#xff0c;再返回到转去执行该函数前的地方。这种转移操作要求在转去前要保护现场并记忆执行的地址&#xff0…

两端对齐布局与text-align:justify

百分比实现 首先最简单的是使用百分比实现&#xff0c;如下一个展示列表&#xff1a; 1 <!DOCTYPE html>2 <html>3 <head>4 <meta charset"UTF-8">5 <title></title>6 <style type"text/cs…

java拆分单元格_Java 拆分Excel单元格数据为多列

一、概述及使用工具在Excel表格里面&#xff0c;可设置将单元格中的文本数据按分隔符拆分为多列&#xff0c;下面通过Java程序来介绍具体实现方法。这里使用Free Spire.XLS for Java(免费版)来实现数据分列&#xff0c;需要导入Spire.Xls.jar文件到Java程序&#xff0c;可参考以…

win10下安装centos7双系统

国庆最后一天了&#xff0c;闲来无事装个双系统&#xff0c;用虚拟机的linux总有些不方便。 window下安装linux双系统有两中方法&#xff1a; 1.U盘安装 &#xff08;我采用的方法&#xff0c;后面详述&#xff09; 2.EasyBCD工具安装 &#xff08;使用EasyBCD完美实现Windows7…

css 相对定位与绝对定位

相对定位的规律&#xff1a; 使用相对定位的盒子&#xff0c;会相对于它原来的位置&#xff0c;通过偏移指定的距离&#xff0c;到达新的位置。 使用相对定位的盒子仍在标准流中&#xff0c;它对父亲和兄弟盒子都没有任何影响。 绝对定位的规律&#xff1a; 使用绝对定位的盒子…

java swing进度条_Java Swing创建自定义闪屏:在闪屏上添加Swing进度条控件(转)

本文将讲解如何做一个类似MyEclipse启动画面的闪屏&#xff0c;为Java Swing应用程序增添魅力。首先看一下效果图吧&#xff0c;原理很简单&#xff0c;就是创建一个Dialog&#xff0c;Dialog有一个进度条和一个Label用来分别显示进度和进度信息&#xff0c;而Dialog的宽度和高…

java excel 模板 替换_JAVA POI替换EXCEL模板中自定义标签(XLSX版本)满足替换多个SHEET中自定义标签...

个人说明&#xff1a;为了简单实现导出数据较少的EXCEL(根据自定义书签模板)一、替换Excel表格标签方法/*** 替换Excel模板文件内容* param map* 需要替换的标签建筑队形式* param intPath* Excel模板文件路径* param outPath* Excel生成文件路径*/public static boolean repla…

【JZOJ4817】【NOIP2016提高A组五校联考4】square

题目描述 输入 输出 样例输入 3 4 1 1 0 1 0 1 1 0 0 1 1 0 5 1 1 2 3 2 1 3 2 3 2 3 4 1 1 3 4 1 2 3 4 样例输出 1 1 1 2 2 数据范围 解法 设f[i][j]为以(i,j)为右下角的正方形的最大边长。 则f[i][j]min(f[i−1][j],f[i−1][j−1],f[i][j−1])1(a[i][j]1) 考虑…

java单例模式 uml_Java设计模式系列之单例模式

单例模式的定义一个类有且仅有一个实例&#xff0c;并且自行实例化向整个系统提供。比如&#xff0c;多程序读取一个配置文件时&#xff0c;建议配置文件时&#xff0c;建议配置文件封装成对象。会方便操作其中的数据&#xff0c;又要保证多个程序读到的是同一个配置文件对象&a…

Linux安全基础:grep命令的使用

grep &#xff08;缩写来自Globally search a Regular Expression and Print&#xff09;是一种强大的文本搜索工具&#xff0c;它能使用正则表达式搜索文本&#xff0c;并把匹配的行打印出来。Unix的grep家族包括grep、egrep和fgrep。 grep的工作方式是这样的&#xff0c;它在…

oschina mysql limit_Mysql中limit的用法

Mysql中limit的用法&#xff1a;在我们使用查询语句的时候&#xff0c;经常要返回前几条或者中间某几行数据&#xff0c;这个时候怎么办呢?不用担心&#xff0c;mysql已经为我们提供了这样一个功能。SELECT * FROM table LIMIT [offset,] rows | rows OFFSET offsetLIMIT 子句…

centos yum “The requested URL returned error: 404”错误

CentOS-Base.repo里面变量不能被引用。直接修改CentOS-Base.repo修改baseurl这一行的变量即可&#xff0c; [rootbogon yum.repos.d]# yum makecache 转载于:https://www.cnblogs.com/bulvlanshan/p/5952155.html

php面试题2018mysql_PHP程序员必会的MySQL面试题

01数据库字段类型MySQL常见的数据类型有哪些&#xff1f;MySQL数据类型分为数值类型、日期时间型和字符串类型。数值类型常见的是TINYINT、INT、DECIMAL&#xff0c;日期类型常见的有DATE、DATETIME&#xff0c;字符串类型常见的有CHAR、VARCHAR、TEXT。详细介绍见文章末尾的图…

html5移动端制作知识点总结

一、测试工具&#xff1a;1.Chrome 2.Opera Mobile二、分辨率&#xff1a;一般现代手机最小320px&#xff0c;最大640px。三、全屏流体设计&#xff1a; 1.腾讯新闻&#xff1a;http://xw.qq.com/ 2.途牛旅游&#xff1a;http://m.tuniu.com/ 固屏类流体设计 1.京东商城&#x…

python counter模块_python collections模块 计数器(counter)

一、计数器(counter)Counter是对字典类型的补充&#xff0c;用于追踪值的出现次数。ps&#xff1a;具备字典的所有功能 自己的功能把我写入的元素出现的多少次都计算出来import collections# 创建一个Counter对象obj collections.Counter(ddccbbqqaaa)print(obj)把我写入的元…

C#-类-string/Manth/Random/DateTime-及练习

类一、string类&#xff1a;.Length 字符串的长度 .Trim() 去掉开头以及结尾的空格.TrimStart() 去掉开头的空格.TrimEnd() 去掉结尾的空格 .ToLower() 全部转换为小写.ToUpper() 全部转换为大写 .Substring(m,n) 从m位开始截取n长度的字符串.Substring(m) 从m位开始截取至字符…

【开发软件】推荐一款MAC OS X 下php集成开发环境mamp

这里给大家推荐一款在mac上搭建WEB服务器环境的集成环境安装软件&#xff0c;非常的好用&#xff0c;需要的朋友可以拿去&#xff0c;不用谢 ^_^之前苦于mac上搭建本地服务器之艰辛&#xff0c;找寻好久都没找到一款类似windows上集成的本地服务器环境&#xff0c;诸如phpstudy…

java操作日志记录_通用日志记录(java)

/*** 统一日志处理Handler*authorMingchenchen**/public classLogAopHandler {AutowiredprivateAuditLogDao auditLogDao;/*** controller层面记录操作日志* 注意此处是aop:around的 因为需要得到请求前的参数以及请求后接口返回的结果*throwsThrowable*/public Object doSaveL…

python数据类型-----字典

今天来总结下python3.4版本字典的一些操作方法。 字典是Python里面一种无序存储结构&#xff0c;存储的是键值对 key - value。关键字应该为不可变类型&#xff0c;如字符串、整数、包含不可变对象的元组。字典的创建很简单&#xff0c;用 d {key1 : value2, key2 : value2}的…

getmodifiers java_java – getModifiers()方法如何计算多个修饰符的值?

TL; DR&#xff1a;它将它们组合在一起形成bit field.要理解这一点,你需要了解二进制如何工作,这类似于十进制 – 让我们从那里开始&#xff1a;1 - public10 - static100 - final那么,101意味着什么&#xff1f;它必须是公共最终的,因为除了单个100和单个1之外,十进制系统中没…