import poplib
import sys
import smtplib
from email.mime.text import MIMEText
import os
from email.header import decode_header
import email
import time
def check_email():
try:
p = poplib.PO...
分类:
编程语言 时间:
2015-03-14 15:24:04
阅读次数:
147
1、request.getRequestURL()返回的是完整的url,包括Http协议,端口号,servlet名字和映射路径,但它不包含请求参数。2、request.getRequestURI()得到的是request URL的部分值,并且web容器没有decode过的3、request.getC...
分类:
Web程序 时间:
2015-03-13 15:58:09
阅读次数:
157
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?...
分类:
其他好文 时间:
2015-03-13 14:26:07
阅读次数:
120
URLEncode:是对网页url所包含中文字符的一种编码转化方式,URLEncode有两种常见方式,一种是基于GB2312的 Encode(Baidu、Yisou等搜索引擎使用),另一种是基于UTF-8的Encode(Google、Yahoo等使用)。下面来看两种方式的 Encode与Decode...
分类:
Web程序 时间:
2015-03-12 22:06:22
阅读次数:
152
1、request.getRequestURL() 返回的是完整的url,包括Http协议,端口号,servlet名字和映射路径,但它不包含请求参数。 2、request.getRequestURI() 得到的是request URL的部分值,并且web容器没有decode过的 3、...
分类:
Web程序 时间:
2015-03-12 17:24:41
阅读次数:
176
A 本期B 同期(环期)同比(环比) = (A-B)/BDECODE(NVL(B,0),0,0,ROUND(((A-B)/B),4)), --环比 DECODE(NVL(B),0,0,ROUND(((A-B)/B),4)) --同比
分类:
数据库 时间:
2015-03-12 11:12:09
阅读次数:
176
题意:这是一个简单的生存游戏,你控制一个机器人从一个棋盘的起始点(1,1)走到棋盘的终点(n,m)。游戏的规则描述如下:1.机器人一开始在棋盘的起始点并有起始点所标有的能量。2.机器人只能向右或者向下走,并且每走一步消耗一单位能量。3.机器人不能在原地停留。4.当机器人选择了一条可行路径后,当他走到...
分类:
其他好文 时间:
2015-03-11 21:07:11
阅读次数:
102
对已知中文字符串进行分割,以“(”和“)”来截取字符串;str1="白雪皑皑雪橇行,胡子老人把人惊(落花无声)";print(str1);num1 = string.find(str1,'(')num2 = string.find(str1,')')print(num1,":",num2);prin...
分类:
其他好文 时间:
2015-03-10 16:45:24
阅读次数:
303
(Version 0.0)Decode Ways这道题从原理上说是一个比较简单的一维DP题目,用一个一维数组的元素dp[i] (i >= 1)来记录从头开始长度为i的substring有多少种decode ways。不过实际操作起来第一次写还是在输入为"0"时犯了错误,另外第一次写的时候没有意识到当...
分类:
其他好文 时间:
2015-03-10 11:44:39
阅读次数:
149
Problem Description
We wish to tile a grid 4 units high and N units long with rectangles (dominoes) 2 units by one unit (in either orientation). For example, the figure shows the five different ways ...
分类:
其他好文 时间:
2015-03-10 10:31:34
阅读次数:
174