1,使用python链接mysql # -*- coding: utf-8 -*-#
connect.py --连接到MySQL服务器import sysimport MySQLdbtry: conn = MySQLdb.connect(db =
"cookbook", host = "localh...
分类:
数据库 时间:
2014-07-22 23:11:15
阅读次数:
518
参考资料:
http://sebug.net/paper/books/dive-into-python3/native-datatypes.html
http://blog.csdn.net/hazir/article/details/101597091、Boolean【布尔型】# coding.....
分类:
编程语言 时间:
2014-07-22 23:10:15
阅读次数:
371
Given a strings, partitionssuch that every
substring of the partition is a palindrome.Return all possible palindrome
partitioning ofs.For example, giv...
分类:
其他好文 时间:
2014-07-22 23:08:15
阅读次数:
446
#安装1.进入Eclipse, Help->Install New
Software,点击Add按钮:Name: PyDev(随意) Location:
http://pydev.org/updates2.选择PyDev下的PyDev for Eclipse,别的都不要选,否则依赖检查那关过不去。按...
分类:
编程语言 时间:
2014-07-22 23:07:35
阅读次数:
415
1. 指针使用2. 在循环体内使用 return 的坏处3. quick and dirty,
performance and design strategy
分类:
编程语言 时间:
2014-07-22 23:06:33
阅读次数:
356
一个通常的函数调用的例子://声明(一般头文件中)void MyFun(int x);
//此处的申明也可写成:void MyFun( int );int main(int argc, char* argv[]){ MyFun(10);
//这里是调用MyFun(10);函数 return 0;}v...
分类:
其他好文 时间:
2014-07-22 23:06:16
阅读次数:
239
function trimStr(str){ return
str.replace(/(^\s*)|(\s*$)/g,"");}用的时候就是直接 var 变量=trimStr(需要去空格的字符串);
分类:
Web程序 时间:
2014-05-01 15:47:26
阅读次数:
347
使用正则表达式,对QQ群聊天记录进行解析,用于分析日期、成员等维度发言情况。
原始文本是2014-03-28 15:04:25 №┽◎Eagle(369029696) 解析之后yyyy=2014mm = 03dd = 28hh =
15mi =04ss = 25nick = №┽◎Eagleqq =...
分类:
编程语言 时间:
2014-05-01 15:44:08
阅读次数:
388
原题地址:http://oj.leetcode.com/problems/reorder-list/题意:Given
a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You
must do this...
分类:
编程语言 时间:
2014-05-01 15:37:03
阅读次数:
441
Given a strings, partitionssuch that every
substring of the partition is a palindrome.Return the minimum cuts needed for a
palindrome partitioning ofs...
分类:
其他好文 时间:
2014-05-01 14:47:09
阅读次数:
409