python提供了一个进行hash加密的模块:hashlib下面主要记录下其中的md5加密方式(sha1加密一样把MD5换成sha1)[python]view plaincopyprint?>>>importhashlib>>>m=hashlib.md5()>>>m.update("Nobodyin...
分类:
编程语言 时间:
2014-06-17 20:26:49
阅读次数:
233
/// /// 通过汉字区位码得到其首字母(小写)/// /// 汉字编码/// public string FirstLetter(int nCode) {if (nCode >= 1601 && nCode = 1637 && nCode = 1833 && nCode = 2078 && nC...
分类:
Web程序 时间:
2014-06-17 20:09:37
阅读次数:
198
gcc -c CStringAndPointer.c -o CStringAndPointer.o执行时出现问题:./CStringAndPointer.obash: ./CStringAndPointer.o:权限不够查看文件属性ll CStringAndPointer.o-rw-r--r-- 1...
分类:
其他好文 时间:
2014-06-17 19:59:12
阅读次数:
197
http://hi.baidu.com/yobin/item/166e3a46537781d3c1a59257乱码原因:因为你的文件声明为utf-8,并且也应该是用utf-8的编码保存的源文件。但是windows的本地默认编码是cp936,也就是gbk编码,所以在控制台直接打印utf-8的字符串当然...
分类:
编程语言 时间:
2014-06-17 19:55:59
阅读次数:
273
Model类 public class MenuModel { public int Id { get; set; } public string Title { get; set; } public string Url { get; set; } public string Icon {...
分类:
其他好文 时间:
2014-06-17 19:41:06
阅读次数:
212
输入的日期字符串形如:@"1992-05-21 13:08:08"- (NSDate*)dateFromString:(NSString*)dateString{NSDateFormatter*dateFormatter = [[NSDateFormatter alloc]init];[dateFo...
分类:
其他好文 时间:
2014-06-17 16:00:25
阅读次数:
131
例:string Content =“"<p style="TEXT-ALIGN:center;"><span style="font-family:宋体;">&l...
分类:
其他好文 时间:
2014-06-17 15:44:56
阅读次数:
218
以2.7升级到3.3为例1.删除原版本a)删除系统库中的版本sudo rm -R /System/Library/Frameworks/Python.framework/Versions/2.7b)删除Current版本sudo rm /System/Library/Frameworks/Pytho...
分类:
编程语言 时间:
2014-06-17 15:35:13
阅读次数:
518
在使用的时候,先用WriteOut生成一个临时文件(UTF-8带BOM),然后用Convert2utf8将BOM头的前三个字节删除。----------------------------------------------------------Private Sub WriteOut(strPa...
分类:
其他好文 时间:
2014-06-17 15:31:55
阅读次数:
760
1 public class DBUtil 2 { 3 /// 4 /// 数据库连接字符串 5 /// 6 private static string DataBase_Connection = System...
分类:
移动开发 时间:
2014-06-17 15:29:25
阅读次数:
410