`
sogo6
  • 浏览: 109875 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表

web报表

    博客分类:
  • web
http://www.css88.com/demo/jQuery-printPage-plugin/
在用Google的PageSpeed或Yahoo!的Y!Slow查看网页速度时,会看到“…specify a vary: accept-encoding header”的建议,那么怎么来解决这个问题呢? 在博客程序的根目录下找到.htaccess文件,然后文本编辑器编辑它。在文件最后添加下面的代码: <IfModule mod_headers.c> <FilesMatch “\.(js|css|xml|gz)$”> Header append Vary Accept-Encoding </FilesMatch> </IfMod ...
def writeSysLog(message): if 'win32' in sys.platform: os.popen('eventcreate /T information /ID 1000 /D "%s"'%message) else: os.popen('logger -p local0.info "%s"'%message)
from xml.dom import minidom import os def parse_svcfile(svc_file): xmldoc = minidom.parse(svc_file) params = xmldoc.getElementsByTagName('param') procName = '' depends = '' for param in params: #print param.toxml() #print param.attributes['name'].value ...
For Mac OS X 10.5 and later you can use the Directory Utility instead of NetInfo. For just Mac OS X 10.5 you will find it in the Application/Utilities folder. For Mac OS X 10.6 and later you start the Directory Utility from the System Preferences as follows:     Start System Preferences and select &q ...
linux/unix 级别:err/warning/info 扩展标识:固定填local0,和级别组合,比如“local0.err” 例如: logger -p local0.warning "bbbbbb" windows 级别:error/warning/information 事件ID:固定填1000 eventcreate /T warning /ID 1000 /D "aaaaaa" C++的使用: ACE_OS::system(“eventcreate /T error /ID 1000 /D \"install xxx ver ...
ifeq ($(debug), 0) DEBUG_FLAG = -O2 -g OBJ_DIR = release BUILD_CONFIG = RELEASE DBG_CONFIG = -DRWDEBUG=0 -D_RWCONFIG=m else DEBUG_FLAG = -g OBJ_DIR = debug BUILD_CONFIG = DEBUG DBG_CONFIG = -D_DEBUG -DRWDEBUG=1 -D_RWCONFIG=md endif $(MOD_BIN):$(MOD_OBJ) @mkdir -p $(dir $(M ...

linux 系统操作

1. 取一个进程的内存,cpu等信息 ps -p 进程ID -o pid,pcpu,vsz,thcount,sz|grep -v CPU 2. 获取CPU的个数: cat /proc/cpuinfo |grep processor|wc -l 3. 获取某一个进程的句柄 int getPrFdNum(const string& sPid, int& fdNum) { fdNum = 0; if (sPid.empty()) { ErrorOut("getPrFdNum: failed ,pid is null!" ...
#include <sys/resource> int getrusage(int who, struct rusage *r_usage); 利用getrusage可以得到进程的相关资源信息。如:用户开销时间,系统开销时间,接收的信号量等等; 下面是rusage的结构: struct rusage { struct timeval ru_utime; /* user time used */ struct timeval ru_stime; /* system time used */ long ru_maxrss; #define ru_firs ...

sql处理之5

    博客分类:
  • C++
int CSQLMake::MakeOnFilter(std::string &strOn, CParaSet &oInPara) { int iRet = 0; std::string::size_type stPos = strOn.find(" on "); if (stPos != std::string::npos) { std::string strOnCond = strOn.substr(stPos+4); MakeOnFilter(strOnCond, oInPar ...

给sql填充数据

    博客分类:
  • C++
int CSQLMake::MakeSqlFit(std::string &strSql, CParaSet &oInPara) { int iRet = 0; std::string::size_type iPos = strSql.find("where"); if (iPos == std::string::npos) { return iRet; } std::string strSelect = strSql.substr(0, iPos); // 此处来处 ...
int CSQLMake::DoSqlFit(std::string &strSql, CParaSet &oInPara) { int iRet = 0; // 拆分sql std::vector<std::string> vctSql; SplitSql(strSql, vctSql); // 循环处理sql std::vector<std::string> vctSqlFit; std::vector<std::string>::iterator itr; ...
int CSQLMake::MergeSql(std::string &strSql, std::vector<std::string> &vctSql) { int iRet = 0; boost::regex regEx("@@([\\d]+)"); boost::match_flag_type flags = boost::match_default; std::vector<std::string>::iterator itr; std::string strTemp; ...
int CSQLMake::SplitSql(std::string &strSql, std::vector<std::string> &vctSql) { int iRet = 0; boost::regex regEx("\\(select[\\w\\s='<>!#,.@]*\\)"); std::string::const_iterator start, end; boost::match_results<std::string::const_iterator> what ...
这一节讲解的是如何使用Nginx和FastCGI搭建Web.py应用 环境依赖的软件包 引用Nginx 0.8.* or 0.7.* (需要包含fastcgi和rewrite模块)。 Webpy 0.32 Spawn-fcgi 1.6.2 Flup 注意:Flup是最常见的忘记装的软件,需要安装 更老的版本应该也可以工作,但是没有测试过,最新的是可以工作的 一些资源 Nginx wiki Spawn-fcgi Flup Notes 你可以重命名index.py为任何你想要的文件名。 /path/to/www 为代码路径。 /path/to/www/index.py为python代码的完整路 ...
Global site tag (gtag.js) - Google Analytics