1.在页面上引入js <head> <meta http-equiv="Content-Type" content="text/html; charset=GB18030"> <title>Insert title here</title> <script src="../scripts/jquery.min.js" type="text/javascript">&l…
大家都是如何度过周末时光的呢?好多人都认为一周的工作后要好好休息下,于是在家疯狂的补觉,刷剧,打游戏,自我觉得很是正常,工作几天了,休息下不是当然嘛.是的,休息下很正常,但是把周末的时光都用到这些东西上不是很浪费吗?以前的我到周末也是疯狂的放飞自我,结果周一上班时反而状态不佳,自我总结是放松过度.做什么事情都要有个度,把握不好的话,就会向反方向发展.后来,认识了现在的男朋友,因为他是学计算机的,计算机玩的特别好,我很是崇拜,因为我完全是一个计算机小白,于是乎,我决定也学习计算机方面的知识,他就给…
版本1.0(获取周日存在问题,请勿使用,仅用于引以为戒) 存在问题,获取周日的时候,当当前时间正好是周日,会获取下一周的周日,而非本周周日. ,)),) ),, ,)),) 版本2.0 看到版本1.0的代码,真的是有点随意,大写的小写的... --周一 , ) ), ); --周日(最懒得办法,将获取的周一的数据,+6) , , ) ), )); , , ) ), ));…
[NSDate date]获取的是GMT时间,要想获得某个时区的时间,以下代码可以解决这个问题 NSDate *date = [NSDate date]; NSTimeZone *zone = [NSTimeZone systemTimeZone]; NSInteger interval = [zone secondsFromGMTForDate: date]; NSDate *localeDate = [date  dateByAddingTimeInterval: interval]; NS…
# -*- coding: UTF8 -*- import timeimport datetime import os 1. '''把时间戳转化为时间: 1479264792 to 2016-11-16 10:53:12''' def TimeStampToTime(timestamp): timeStruct = time.localtime(timestamp) return time.strftime('%Y-%m-%d %H:%M:%S',timeStruct) 2. '''获取文件的大…
需要两个文件,一个用于存储域名信息,另一个是检测脚本 注意:这两个文件是在一个目录下 domain_ssl.info [存储域名信息] [root@mini05 ]# cat domain_ssl.info # 检测百度域名 www.baidu.com: check_domain_time.sh [检测脚本] [root@mini05 ]# cat check_domain_time.sh #!/bin/bash ################ Version Info ###########…
获取当前系统的时间,每隔一秒,打印一次. import java.util.Date; public class TestDate { public static void main(String[] args) { while (true) { System.out.println(new Date()); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } } } 获取当前…
在做测试的时候,经常需要获取系统信息,并且用获取到的系统时间给生成的报告取名字. 以下代码实在TestNG展示的,没有Test NG的话需要些一个main方法. import java.net.InetAddress; import java.util.Properties; import java.util.Calendar; import java.util.Date; import java.text.SimpleDateFormat; import org.testng.annotati…
/// <summary> /// 根据第几周 获取开始时间和结束时间 /// </summary> /// <param name="week">周数</param> /// <param name="month">月份</param> /// <returns></returns> private Tuple<DateTime, DateTime> Get…
os.path.getmtime(name) #获取文件的修改时间 os.stat(path).st_mtime#获取文件的修改时间 os.stat(path).st_ctime #获取文件修改时间 os.path.getctime(name)#获取文件的创建时间…