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
前言:我们为什么要学会使用find命令?转自:http://blog.chinaunix.net/uid-24648486-id-2998767.html每一种操作系统都有成千上万的文件组成,对于linux这样“一切皆文件”的操作系统来说更不例外,大家应该都能很轻松使用windows下的文件查找功能...
分类:
系统相关 时间:
2014-07-22 23:10:56
阅读次数:
608
参考资料:
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
原地址:http://www.cnblogs.com/svage/p/3700122.html1、删除目录及子目录下的 .svn目录 find . -type
d -name ".svn" | xargs rm -rf2、/tmp 目录的权限drwxrwxrwt rwt的意思是:对目录有执行权...
分类:
系统相关 时间:
2014-07-22 23:09:34
阅读次数:
552
查看当前目录下的文件:find.-typef查看当前目录下的文件夹:find.-typed如果文件file1不为空:if[-sfile1];thenecho"file1不为空"fi#!/bin/shforfin`find./testdir-typef`;doif[-s$f];thenecho$fis...
分类:
系统相关 时间:
2014-07-22 23:09:14
阅读次数:
407
这两天又看了一遍《算法导论》上面的字符串匹配那一节,下面是实现的几个程序,可能有错误,仅供参考和交流。关于详细的讲解,网上有很多,大多数算法及数据结构书中都应该有涉及,由于时间限制,在这就不重复了。需要说明的是: stra:主串,及需要从中寻找模式串的字符串 strb:模式串 《算法导论》上面包括严...
分类:
其他好文 时间:
2014-07-22 23:08:34
阅读次数:
320
#安装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
Single NumberGiven an array of integers, every
element appearstwiceexcept for one. Find that single one.Note:Your algorithm
should have a linear runti...
分类:
其他好文 时间:
2014-07-22 23:07:14
阅读次数:
337
Given a binary tree, find its maximum depth.The
maximum depth is the number of nodes along the longest path from the root node
down to the farthest le...
分类:
其他好文 时间:
2014-07-22 23:07:13
阅读次数:
379
SQL 攻击(SQL
injection,台湾称作SQL资料隐码攻击),简称注入攻击,是发生于应用程序之数据库层的安全漏洞。简而言之,是在输入的字符串之中注入SQL指
令,在设计不良的程序当中忽略了检查,那么这些注入进去的指令就会被数据库服务器误认为是正常的SQL指令而运行,因此遭到破坏。有部...
分类:
数据库 时间:
2014-07-22 23:07:13
阅读次数:
582