using System;
using System.Collections.Generic;
class Sentence
{
static void Main()
{
double ticks0 = DateTime.Now.Ticks;
for (int i = 0; i < int.MaxValue; i++)
{
//...
利用JavaScriptSerializer 序列化json 时间格式,得到的DateTime值值显示为“/Date(700000+0500)/”形式的JSON字符串,显然要进行转换\/Date(1404098342309)\/,经过分析,其实这个1404098342309数值,是1970年1月1日...
分类:
编程语言 时间:
2015-06-19 08:58:13
阅读次数:
150
获取当前月的第一天和最后一天DateTime now = DateTime.Now;DateTime firstDay = new DateTime(now.Year, now.Month, 1);DateTime lastDay = firstDay.AddMonths(1).AddDays(-1...
Python版本:3.4.3安装Lib库:pymysql代码结构树:主函数代码片dbcheck.py #!/usr/bin/python# -*- coding: utf-8 -*-import configinitimport pymysqldef execute_mysql(): conn...
分类:
数据库 时间:
2015-06-18 15:21:05
阅读次数:
155
之前使用mysql存储日期类型的数据用datetime,timestamp,现在把它存为int,对于表的数据量比较大的话,这样节省空间
看下面表字段
看下查询语句
SELECT uptime,FROM_UNIXTIME(uptime) FROM qlm_urlbridges
2.SELECT uptime,FROM_UNIXTIME(uptime) FROM qlm_...
分类:
数据库 时间:
2015-06-18 13:37:13
阅读次数:
217
Quadratic primes
Problem 27
Euler discovered the remarkable quadratic formula:
n² + n + 41
It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. Howe...
分类:
编程语言 时间:
2015-06-17 21:37:46
阅读次数:
149
Distinct powers
Problem 29
Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:
22=4, 23=8, 24=16, 25=32
32=9, 33=27, 34=81, 35=243
42=16, 43=64, 44=256, 45=1024
52=25, 5...
分类:
编程语言 时间:
2015-06-17 21:36:18
阅读次数:
220
Python 日期和时间 —— datetime Python提供了多个内置模块用于操作日期时间,如calendar,time,datetime。time提供的接口与C标准库time.h基本一致。其中应用最广的是datetime,相比于time模块,datetime模块的接口则更直观、更容易调用。....
分类:
编程语言 时间:
2015-06-17 18:14:45
阅读次数:
180
HttpCookie hc = Request.Cookies["user"]; hc.Expires = DateTime.Now.AddDays(-1); Response.AppendCookie(hc);
分类:
Web程序 时间:
2015-06-17 15:02:50
阅读次数:
157
第四章 模板 在前一章中,你可能已经注意到我们在例子视图中返回文本的方式有点特别。 也就是说,HTML被直接硬编码在 Python 代码之中。 def current_datetime(request): now = datetime.datetime.now() html = "It is now...
分类:
编程语言 时间:
2015-06-17 13:11:13
阅读次数:
149