days

Apache2.4 性能优化

纵然是瞬间 提交于 2019-11-30 19:21:26
前几天买了阿里云主机后,配置了基本的web环境,apache性能没有做优化;导致今天在公布 opms 系统的时候,访问太慢,本身的云主机配置是低配,自己玩的。具体环境配置请看《 再谈centOS7.2 LAMP源码安装及注意要点 》。 现把apache性能优化上做一下配置: 一. deflate和expires 我在安装apache的时候,已经自动静态编译了deflate和expires模块,所以可能在配置文件里直接添加相关指令: #deflate gzip启用 可以在主机配置文件httpd.conf或虚拟主机vhost下添加下面指令 DeflateCompressionLevel 9 SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/html text/plain text/xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE image/gif image/png image/jpe image/swf image/jpeg image/bmp #expires 缓存模块,这里配置了1天的时间

万年历

可紊 提交于 2019-11-30 13:00:35
可以获取某年的指定月份或者是全年的日历 package rili; //1800.1.1周三 public class Calendar { int year,month; public void Monthtop(){ System.out.println("Sun\tMon\tTues\tWed\tThur\tFri\tsat"); } public Calendar(int y,int m){ year=y; month=m; } public Calendar(int y){ year=y; } public int FirstDayofMonth(int m){ int totaldays=0; for(int i=1800;i<year;i++){ if(isLeapYear(i)){ totaldays+=366; }else{ totaldays+=365; } } for(int i=1;i<m;i++){ totaldays+=DaysofMonth(year,i); }totaldays+=3; return (totaldays%7); } public void printLine(){ System.out.println(); System.out.println("___________________________________________

MathParser.org-mXparser 数学表达式计算

岁酱吖の 提交于 2019-11-30 12:58:01
背景 在系统中需要计算公式,参数可以配置,类似excel的情况,可以实现数据的计算。 mXparser 实例 public static void main(String[] args) throws InterruptedException { Argument days = new Argument("days = 30"); Expression min = new Expression("min(days/10,1)", days); mXparser.consolePrint(min.getExpressionString() + "----" + min.calculate()); Expression e = new Expression("2-(32-4)/(23+4/5)-(2-4)*(4+6-98.2)+4"); mXparser.consolePrintln("Res: " + e.getExpressionString() + " = " + e.calculate()); Expression abs = new Expression("abs(-1)"); mXparser.consolePrintln("Res: " + abs.getExpressionString() + " = " + abs.calculate()); Expression

Getting the dates of the current week in Android

纵饮孤独 提交于 2019-11-30 09:21:52
问题 I have these 5 buttons in my program: Monday, Tuesday, Wednesday, Thursday and Friday, which are on my menu screen. What I want now is that when my program starts and my menu screen opens, the buttons contain the days + the dates of the day. For example, today we're the fourth of may (happy Star Wars day!) and the buttons should be like this: Monday 04/30 Tuesday 05/01 Wednesday 05/02 Thursday 05/03 Friday 05/04 But when I open the menu screen next monday it should be like this: Monday 05/07

php阴历阳历换算(1950开始)

吃可爱长大的小学妹 提交于 2019-11-30 03:25:20
一、主程序index.php代码 <?php require_once 'Lunar.php'; //调用数据文件 $today = date("Y-m-d"); //可改为其它时间,但格式保持一致 $lunar = new Lunar(); //公历转农历 $nl = date("Y-m-d",$lunar->S2L($today)); //农历转公历 $gl = date("Y-m-d",$lunar->L2S($nl)); echo "今天公历是:$today<br/>"; echo "转为农历是:$nl<br/>"; echo "转回公历是:$gl<br/>"; ?> 二、nular.php代码 <?php /* 云南省曲靖师范学院计算机科学与工程学院-杨海熙编写 2009-9-3 */ class Lunar { private $_SMDay = array(1 => 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);//定义公历月分天数 private $_LStart = 1950 ;//农历从1950年开始 private $_LMDay = array( //差:该年的农历正月初一到该年公历1月1日的天数;1~12:农历月份天数;闰:如有闰月,记录该月平月天数 // 差 1 2 3 4 5 6 7 8 9 10 11

springboot中的util方法

六月ゝ 毕业季﹏ 提交于 2019-11-30 01:44:00
1.获取俩个long类型的是否是同一天 public static boolean isSameDay(long time1, long time2) { Calendar calendar1 = Calendar.getInstance(); calendar1.setTimeInMillis(time1); Calendar calendar2 = Calendar.getInstance(); calendar1.setTimeInMillis(time2); return calendar1.get(Calendar.DAY_OF_MONTH) == calendar2.get(Calendar.DAY_OF_MONTH); } 2.获取俩个long相差天数 //获取俩个时间的相差天数 public static long between_days(Date time1, Date time2) { Calendar cal = Calendar.getInstance(); cal.setTime(time1); long time11 = cal.getTimeInMillis(); cal.setTime(time2); long time22 = cal.getTimeInMillis(); long between_days=(time22-time11)/

选择年月日、

限于喜欢 提交于 2019-11-29 17:57:12
<html> <body> <script src=" http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script > <select name='years' id='years' onchange="updateDays()"> <option value ='0'>0</option> <option value ='1'>1</option> <option value ='2'>2</option> <option value ='3'>3</option> <option value ='4'>4</option> <option value ='5'>5</option> </select>年 <select name='months' id='months' onchange="updateDays()"> <option value ='0'>0</option> <option value ='1'>1</option> <option value ='2'>2</option> <option value ='3'>3</option> <option value ='4'>4</option> <option value ='5'>5</option> <option

年月日日历选择组件

北慕城南 提交于 2019-11-29 17:56:43
功能:年月日日历选择插件,可指定显示日期。 目的:仅为项目需要,所以封装为一个组件,同时也作为对工作的日常记录,用以以后复用。 1.html简单代码: <!doctype html> <html> <head> <meta charset="utf-8"> <title>年月日插件</title> </head> <body> <div class="ymdCalendar"> <select class="year" name="year"></select> <select class="month" name="month"></select> <select class="day" name="day"></select> </div> </body> </html> 2.以下为jquery完整代码: <script> /** *@file 年月日选择插件 *@author Zhou *@time 2016/10/31 */ ;(function($){ $.fn.ymdCalendar = function (options) { var defaults = { Yclass: '.year', // 默认年份选择器 Mclass: '.month',// 默认月份选择器 Dclass: '.day', // 默认日选择器 Year: '', // 默认年 Month:

Js 日期加减天数

ⅰ亾dé卋堺 提交于 2019-11-29 05:39:35
<SCRIPT language="javascript"> function addDate(dd,dadd){ var a = new Date(dd) a = a.valueOf() a = a + dadd * 24 * 60 * 60 * 1000 a = new Date(a) return a; } //抓取现在日期 var now = new Date("2008/03/01"); var years = now.getYear()+1; var months = now.getMonth()+1; var days = now.getDate(); var hours = now.getHours(); //抓取前一天日期 NextNow = addDate(months+"/"+days+"/"+years,-1); years = NextNow.getYear(); months = NextNow.getMonth()+1; days = NextNow.getDate(); alert("加一年减一天的日期:"+years+"年"+months+"月"+days+"日"); </SCRIPT> 来源: http://www.cnblogs.com/mingforyou/p/3551188.html

js 日期相差的天数

强颜欢笑 提交于 2019-11-29 05:37:42
function DateDiff(sDate1, sDate2){ //sDate1和sDate2是2006-12-18格式 var aDate, oDate1, oDate2, iDays aDate = sDate1.split("-") oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) //转换为12-18-2006格式 aDate = sDate2.split("-") oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 /24) //把相差的毫秒数转换为天数 return iDays + 1 } var day1 = (new Date).setFullYear(2011, 7, 16); var day2 = (new Date).setFullYear(2011, 7, 20); var number_of_days = (day2 - day1) / 86400000; // 输出 4 alert(number_of_days); // 将值赋予 input document