以下这种方法是加密传输的简单实现1,base64.js/** * * Base64 encode / decode * * */function Base64() { // private property _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ...
分类:
其他好文 时间:
2014-07-09 22:08:28
阅读次数:
219
python乱码处理是一个比较头的话题。。。过程大概是这样子的。。。。字符串在python的内部表示为unicode,因此,在做编码转换的时,通常需要一unicode作为中间编码,即先把其他编码转换通过decode成unicode,再从unicode编码转化成另一种编码所以在编码转换的时候一定要先搞...
分类:
编程语言 时间:
2014-07-08 23:12:01
阅读次数:
267
Tiling
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 7437
Accepted: 3635
Description
In how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles?
...
分类:
其他好文 时间:
2014-07-08 18:57:27
阅读次数:
146
此文转载,原文地址:http://www.jb51.net/article/17560.htm为什么Python使用过程中会出现各式各样的乱码问题,明明是中文字符却显示成“\xe4\xb8\xad\xe6\x96\x87”的形式?为什么会报错“UnicodeEncodeError: 'ascii' ...
分类:
编程语言 时间:
2014-07-06 22:39:50
阅读次数:
292
A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message con...
分类:
其他好文 时间:
2014-07-06 14:42:59
阅读次数:
150
A message containing letters from A-Z is being encoded to numbers using the following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, determine the total numb...
分类:
其他好文 时间:
2014-07-05 23:41:41
阅读次数:
253
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?
有f(n) = f(n - 1) + f(n...
分类:
其他好文 时间:
2014-07-04 08:39:44
阅读次数:
304
Oracle 分割字符查询
select *
from view_psbaseinfo
where DECODE('410782001125,411100000043',
'',
NULL,
'410782001125,411100000043') IS NULL
or PSCODE in
...
分类:
数据库 时间:
2014-07-04 07:20:34
阅读次数:
349
Given an encoded message containing digits, determine the total number of ways to decode it.
分类:
其他好文 时间:
2014-07-02 14:47:02
阅读次数:
217
题目很简单,代码也很短。第一遍做的时候,我居然二乎乎的把input里面的小框框忽略掉了,所以WA了一次。每一行代表一个二进制的ASCII码,'o'代表1,空格代表0,中间的小黑点忽略。我直接把一行字符串全读进去,如果字符串以下划线开头说明输入结束(字符串的处理从第2行开始)。然后从左到右一个字符一个...
分类:
其他好文 时间:
2014-07-01 18:59:00
阅读次数:
228