http://www.cnblogs.com/huangcong/archive/2011/08/29/2158268.html去空格及特殊符号s.strip().lstrip().rstrip(',')复制字符串#strcpy(sStr1,sStr2)sStr1 = 'strcpy'sStr2 =...
分类:
编程语言 时间:
2014-07-18 09:37:40
阅读次数:
236
http://www.cnblogs.com/lovebread/archive/2009/12/24/1631108.html[Python]读写文件方法http://www.cnblogs.com/xuxn/archive/2011/07/27/read-a-file-with-python.h...
分类:
编程语言 时间:
2014-07-18 09:34:22
阅读次数:
240
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;mysql> GRANT ALL PRIVILEGES ON *.* TO ...
分类:
数据库 时间:
2014-07-17 22:04:27
阅读次数:
317
连接数据库 输入值 存入数据库 关闭import stringimport mysql.connectorconn=mysql.connector.connect(user='root',password='test',database='dalian',use_unicode=True)curso...
分类:
数据库 时间:
2014-07-17 22:02:37
阅读次数:
412
??
Description
Petya has k matches, placed in n matchboxes lying in a line from left to right.
We know that k is divisible by n. Petya wants all boxes to have the same number of matches in...
分类:
其他好文 时间:
2014-07-17 20:35:53
阅读次数:
249
perl:warning:Settinglocalefailed解决办法:$sudovi/etc/profile按a或i进入编辑模式exportLC_ALL=en_US.UTF-8exportLANGUAGE=en_US.UTF-8按Esc键退出编辑模式:wq(保存并退出)$source/etc/profile
分类:
其他好文 时间:
2014-07-17 20:31:02
阅读次数:
178
安装pythonsetup.pyinstall使用1.创建工程django-admin.pystartprojectData_Collet_Center2.运行开发serverpythonmanage.pyrunserver0.0.0.0:80003.创建应用pythonmanage.pystartappDCC4.配置Data_collect_Center/settings.py配置DB:‘ENGINE‘:‘django.db.backends.sqlite3‘,#Ad..
分类:
Web程序 时间:
2014-07-17 20:30:29
阅读次数:
286
上篇我们给出了一个简单的猜数游戏,还有很多不足的地方:(1)输入的时候当我们输入其他非数字的字符时,系统会报错,因为非数字字符无法转换为整数,那么我们如何修改可使程序更加健壮呢?为了解决这个问题我们先来了解一下python中的input输入函数。在python2中从控制台接收..
分类:
编程语言 时间:
2014-07-17 20:19:35
阅读次数:
300
shell&python脚本的对比下面是收集系统信息的脚本,对比一下,shell和python的区别。#!/bin/bash
#Asysteminformationgatheringscript
functionuname_func()
{
UNAME="uname-a"
printf"Gatheringsysteminformationwiththe$UNAMEcommand:\n\n"
$UNAME
}
functiondisk_func(..
分类:
其他好文 时间:
2014-07-17 19:38:27
阅读次数:
274
一、下载pip并安装
# wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-1.4.tar.gz#md5=ca790be30004937987767eac42cfa44a
# tar -zxf pip-1.4.tar.gz
# cd pip-1.4
# python setup....
分类:
编程语言 时间:
2014-07-17 19:32:09
阅读次数:
271