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 cli...
分类:
编程语言 时间:
2015-05-16 20:11:55
阅读次数:
134
1、编码转换一般硬盘存储为utf-8,读入内存中为unicode,二者如何转换a=‘你好‘‘\xe4\xbd\xa0\xe5\xa5\xbd‘<type‘str‘>b=u‘你好‘u‘\u4f60\u597d‘<type‘unicode‘>a.decode(‘utf-8‘)u‘\u4f60\u597d‘(utf-8格式解码为unicode)b.encode(‘utf-8‘)‘\xe4\xbd\xa0\xe5\xa5\x..
分类:
编程语言 时间:
2015-05-16 18:41:38
阅读次数:
135
Little Petya likes points a lot. Recently his mom has presented him n points lying on the line OX.
Now Petya is wondering in how many ways he can choose three distinct points so that the distance be...
分类:
其他好文 时间:
2015-05-16 16:33:10
阅读次数:
138
在Sina App Engine(SAE)上用python flask框架+MySQL搭app服务器时,select返回中文时jsonify函数报如下错误:(为调试放拜我异常时return的traceback.format_exc())
Traceback (most recent call last): File “/data1/www/htdocs/245/jcguo/1/myapp.py”...
分类:
数据库 时间:
2015-05-14 08:43:09
阅读次数:
962
在Sina App Engine(SAE)上用python flask框架+MySQL搭app服务器时,select返回中文时jsonify函数报错误:UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0xb7 in position 4: invalid start byte 的解决方案...
分类:
数据库 时间:
2015-05-14 08:41:43
阅读次数:
365
oracle认为 null 最大。升序排列,默认情况下,null值排后面。降序排序,默认情况下,null值排前面。有几种办法改变这种情况:(1)用 nvl 函数或decode 函数 将null转换为一特定值(2)用case语法将null转换为一特定值(oracle9i以后版本支持。和sqlserve...
分类:
数据库 时间:
2015-05-13 19:31:56
阅读次数:
474
Bitmap是Android系统中的图像处理的最重要类之一。用它可以获取图像文件信息,进行图像剪切、旋转、缩放等操作,并可以指定格式保存图像文件。本文从应用的角度,着重介绍怎么用Bitmap来实现这些功能。一、Bitmap的生成1.1 BitmapFactory decode出Bitmap Bitm...
分类:
移动开发 时间:
2015-05-13 16:03:44
阅读次数:
293
1- 问题描述 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 .....
分类:
其他好文 时间:
2015-05-13 12:45:35
阅读次数:
115
封装加密方法:
public string DecodeBase64(string code_type, string code)
{
string decode = "";
byte[] bytes = Convert.FromBase64String(code);
try
{
decode = Encoding.GetEncoding(code_type).G...
分类:
其他好文 时间:
2015-05-13 10:43:38
阅读次数:
236
题目A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.Find the larges...
分类:
其他好文 时间:
2015-05-13 00:51:35
阅读次数:
228