准备环境 python生成二维码,需要依赖包qrcode和PIL(二维码的实质就是一个url。) python3安装PIL:pip install PIL python2安装PIL:pip install pillow 生成二维码的方法 1.将url生成二维码的最简单的示例如下: import qr ...
分类:
编程语言 时间:
2016-05-18 14:37:11
阅读次数:
664
create database newtestdb use newtestdbgo drop table t1go create table t1 (id int not null identity(1,1) primary key,vdate datetime default (getdate() ...
分类:
数据库 时间:
2016-05-18 14:28:49
阅读次数:
261
http://www.dannysite.com/blog/122/ Python标准库中的datetime模块提供了各种对日期和时间的处理方法。从本文的主题着手,首先利用datetime中提供的utcnow()方法获取到当前UTC时间: 1 2 3 4 >>> import datetime >> ...
分类:
其他好文 时间:
2016-05-18 14:24:12
阅读次数:
358
from pytz import timezone def datetime_as_timezone(date_time, time_zone): tz = timezone(time_zone) utc = timezone('UTC') return date_time.replace(tzin ...
分类:
编程语言 时间:
2016-05-18 14:11:56
阅读次数:
325
JAXB binds all three of the schema types xsd:date, xsd:time and xsd:dateTime to XMLGregorianCalendar. This class is in the package javax.xml.datatype. ...
分类:
其他好文 时间:
2016-05-18 14:10:44
阅读次数:
235
centos 6.7默认安装的python是2.6.6,大家可以先查看一下自己操作系统的python版本,python -v; hot-backup.py是基于python2写的,python3的语法有些地方不一样,所以在python3上不一定能运行,我没有测试,有空的同学可以测试一下,目前linu ...
分类:
其他好文 时间:
2016-05-18 12:11:03
阅读次数:
136
1、符号对照表 符号 语法 示例(2016-05-09 13:09:55:2350) y DateTime.Now.ToString() 2016/5/9 13:09:55 d DateTime.Now.ToString("d") 2016/5/9 D DateTime.Now.ToString(" ...
分类:
其他好文 时间:
2016-05-17 22:37:59
阅读次数:
202
1、在mysql 中建立一个数据库 test1 语句:create database test1 2、创建表examinfo create table examinfo( id int auto_increment not null, endtime datetime, primary key(id ...
分类:
数据库 时间:
2016-05-17 19:20:48
阅读次数:
257
SQL Server类型C#类型 bit bool tinyint byte smallint short int int bigint long real float float double money decimal datetime DateTime char string varchar ...
分类:
数据库 时间:
2016-05-17 19:17:29
阅读次数:
247
春风和煦,略有小恙。心若平安,万事大吉。能和爱的人一起并肩战斗是一种很美的事情。 Aaron.shen 5月15日晴 今天上课的的主要内容如下: 1,字符编码: python3 默认是utf8 摘抄: 字符编码 python解释器在加载.py文件时,会对内容进行编码(默认ascill) ASCII( ...
分类:
编程语言 时间:
2016-05-17 07:29:09
阅读次数:
227