2.2.1、创建项目MyOSS激活django虚拟python环境$source bin/activate创建一个web目录$Mkdir web$Cd web创建项目$django-admin.py startproject MyOSS项目创建完成进入MyOSS目录/MyOSS…manage.py…...
分类:
其他好文 时间:
2014-07-14 23:45:07
阅读次数:
299
出现Out of resources when opening file './xxx.MYD' (Errcode: 24)错误是因为打开的文件数超过了my.cnf的--open-files-limit。open-files-limit选项无法在mysql命令行直接修改,必须在my.cnf中设定,最...
分类:
数据库 时间:
2014-07-14 21:16:24
阅读次数:
247
静态NAT(一对一)1.定义转换规则Gateway(config)# ip nat inside source static [Inside local IP address] [Inside global IP address]*1.1 具体端口映射Gateway(config)# ip nat ...
分类:
其他好文 时间:
2014-07-14 20:56:51
阅读次数:
743
说明 本文在《MDU某产品OMCI模块代码质量现状分析》一文的基础上,分享作者对该模块进行重构时的实践经验。 具体的重构手段可参考《代码大全2》或《重构:改善既有代码的设计》,本文不再班门弄斧,而侧重重构时一些粗浅的“方法论”,旨在提高重构效率。 作者未采用重量级的重构工具,仅用到Source...
分类:
其他好文 时间:
2014-07-14 19:51:11
阅读次数:
607
1) http://ruby-hacking-guide.github.io/intro.htmlIt has one part to discuss “Technique to read source code”. BTW, you could download kindle file from....
分类:
其他好文 时间:
2014-07-14 19:44:11
阅读次数:
271
数据库连接可以说是学习web最基础的部分,也是非常重要的一部分,今天我们就来介绍下数据库的连接为下面学习真正的web打下基础java中连接数据库一般有两种方式:1.ODBC——Open Database Connectivity(开放数据库连接性):基于C语言的一套数据库编程接口,主要功能是提供数据...
分类:
数据库 时间:
2014-07-14 18:51:36
阅读次数:
371
长字符串截取示例
<%!
public static String strTruncate(String source, int len, String delim)
{
// 截取字符串函数,返回处理后的字符串
// 参数说明:source表示需要截断的字符串,
...
分类:
Web程序 时间:
2014-07-14 18:40:39
阅读次数:
313
有一定的难度,作者只做了前三题!
题目请见 http://download.csdn.net/download/wangpegasus/5701765
1、char *find_char(char const *source, char const *chars)
{
char *ptr;
if(source != NULL && chars != NULL)
{
for (; ...
分类:
其他好文 时间:
2014-07-14 18:16:35
阅读次数:
289
#!/usr/bin/pythonimportredefbuffer_line():buf=open("/etc/sae/buffer_1").read()ifnotbuf:return0else:returnint(re.findall("^\d*",buf)[0])defset_last_pos(pos):open("/etc/sae/buffer_1","w").write(str(pos))if__name__==‘__main__‘:appname={}fh=open("/data0/l7.acce..
分类:
编程语言 时间:
2014-07-14 16:41:57
阅读次数:
319
#coding=utf-8import osimport httplibimport socketdictlist ={};def ReadHost(): hosts = []; obn = open('d:/sss.txt', 'rb'); for line in obn: ...
分类:
其他好文 时间:
2014-07-14 16:01:28
阅读次数:
212