python 安装成功后,默认的编码是ascii码,当程序中出现非ascii编码时,通常就会报这样的错。处理方法就是将python的默认编码改为uft-8在python安装文件中的Lib\site-packages里新建一个文件sitecustomize.py,里面代码如下:#encoding=ut...
分类:
其他好文 时间:
2015-06-17 15:14:38
阅读次数:
117
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl...
分类:
其他好文 时间:
2015-06-17 14:48:01
阅读次数:
110
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/46530865
Given two strings s and t, determine if they are isomorphic.
Two strings are isomorphic if the characters in s can be replaced to get t.
All occurrences of a ch...
分类:
其他好文 时间:
2015-06-17 11:35:30
阅读次数:
123
I try now to start a post where all the FAQ/solution about KESSV2 and Ktag can be found.
分类:
其他好文 时间:
2015-06-17 11:04:06
阅读次数:
231
", "&"),array('\r','\n','\x3c','\x3e','\x26'),addslashes($var)) .'"';case'array':// Arrays in JSON can't be associative. If the array is empty or if i...
分类:
Web程序 时间:
2015-06-17 08:14:46
阅读次数:
118
if a website does not have jQuery, and we want to use jQuery in chrome console.You can copy the code from herehttp://code.jquery.com/jquery-latest.min...
分类:
Web程序 时间:
2015-06-17 01:49:34
阅读次数:
120
模拟linux的cat命令,打印从命令行输入的文件名
#!/usr/bin/python
#Filename:cat.py
helpString = '''This program prints files to the standard output.
Any number of files can be specified.
Options include:
--version : P...
分类:
编程语言 时间:
2015-06-16 21:16:23
阅读次数:
156
一int表示的字节数?问题是,我们经常得到的答案4.但int究竟占多少个字节,却跟你的机器环境有关.As you can see, the typical data type sizes match the ILP32LL model, which is what most compilers ad...
分类:
其他好文 时间:
2015-06-16 21:12:35
阅读次数:
106
problem:Reverse a singly linked list.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?solution:头插法逆转链表/*...
分类:
其他好文 时间:
2015-06-16 21:09:03
阅读次数:
175
最近使用Android Studio开发一个新项目,刚做完几个界面,跑在android 5.0上面很正常,因为都是挺简单的布局,本以为应该不存在兼容性问题(Flag啊)。偶然用了一个4.x的实机测试,发现杯具了,直接报错退出了,发现log里面打出这么一句:java.lang.UnsupportedO...
分类:
编程语言 时间:
2015-06-16 18:46:14
阅读次数:
128