`
wtm_mac
  • 浏览: 89160 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
vi /etc/make.conf ##add content## FETCH_CMD=axel FETCH_BEFORE_ARGS= -n 10 -a FETCH_AFTER_ARGS= DISABLE_SIZE=yes
当我们要测试的接口服务器比较多的时候,更改hosts指向很麻烦,通过socket我们可以在程序中绑定接口域的ip,增加测试的灵活性,代码如下 <?php /** * 访问域名url时绑定ip地址 * * @author tonywang(wtmmac(@)gmail.com) * @param string $url 目标url * @param string $ip_address 绑定IP地址 * @param bool $return_header 是否返回头信息 * * @return string 返回GET到的信息 */ funct ...
nginx的upstream目前支持4种方式的分配 1、轮询(默认) 每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除。 2、weight 指定轮询几率,weight和访问比率成正比,用于后端服务器性能不均的情况。 例如:     upstream bakend {          server 192.168.0.14 weight=10;          server 192.168.0.15 weight=10;     } 2、ip_hash 每个请求按访问ip的hash结果分配,这样每个访客固定访问一个后端服务器,可以解决session的 ...
某台机器发现没有mysql驱动,进入源码目录安装 cd php-5.3.3 cd ext/ cd mysql /opt/modules/php5.3/bin/phpize ./configure --with-php-config=/opt/modules/php5.3/bin/php-config --with-mysql=/opt/modules/mysql/ make make install cd /opt/modules/php5.3/lib/php/extensions/no-debug-non-zts-20090626/ ll 编辑php.ini,加载my ...
#install check yum -y install yum-fastestmirror yum -y install patch make gcc gcc-c++ gcc-g77 yum -y install libevent libevent-devel wget -c http://launchpadlibrarian.net/51244438/gearmand-0.14.tar.gz tar zxvf gearmand-0.14.tar.gz cd gearmand-0.14 ./configure make && make install ...
#include <fcgi_stdio.h> int main( int argc, char *argv[] ) { int counter = 0; FILE *fp; char buffer[20]; while( FCGI_Accept() >= 0 ) { counter = counter + 1; printf( "Content-Type: text/plain\n\n" ); printf( "%d",co ...
#!/usr/bin/python import time def readfile(): fd = open("/proc/net/dev", "r") for line in fd.readlines(): if line.find("eth0") > 0: field = line.split() recv = field[0].split(":")[1] send = field[ ...
NPM的安装 除Node本身提供的API外,现在有不少第三方模块可极大的提高开发效率,如:WEB框架-express,HTTP中间件-connect,模板-ejs等,为了管理这些模块我们需要安装NPM,安装过程如下: 1、安装NPM >curl http://npmjs.org/install.sh | sh 2、完成后安装第三方模块也很简单,>npm install modules_name,安装Express,>npm install express 注:如果安装模块的过程中报域名错误的话,请清空缓存 >npm cache clean 或重启计算机即可。
1、修改settings.py如下 import os # Additional locations of static files STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/static". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative path ...
1、编写方法 在welcome控制器加入test方法 public function test($argv1 = null,$argv2 = null) {     if (isset($_SERVER['REMOTE_ADDR'])) exit('No direct script access allowed');     echo "cli ok\n";     echo $argv1;     echo "\n";     echo $argv2; } 2、执行cli $ cd /ci目录/ $ php index.php welcome test ...

图表组件收藏

http://www.amcharts.com/javascript/multiple-value-axes/ http://www.amcharts.com/line/ ===== http://www.jscharts.com/examples ===== http://teethgrinder.co.uk/open-flash-chart/ ===== http://www.highcharts.com/
cd /usr/ports/devel/subversion make WITHOUT_BDB=yes WITH_MOD_DAV_SVN=yes WITH_APACHE2_APR=yes htpasswd /usr/local/svn.passwd username #创建密码文件 mkdir -p /usr/local/svncode #创建svn库目录 touch /usr/local/etc/apache2/Includes/dav.conf vi /usr/local/etc/apache2/Includes/dav.conf 录入如下: <Location /svn> ...
cd /usr/local/include/python2.6 ln -s /usr/local/include/pth/pth.h
本次录制采用了开源的Redb5服务器,效果也是不错的,相信在中小型网站中的应用会越来越多 演示地址:http://www.chinaswans.com/php/flash_rec/flv/index.php red5官方网址:http://www.red5.org
8.3  充分利用 Explain 和 Profiling 8.3.1  Explain 的使用(1) 说到Explain,肯定很多读者之前已经用过了,MySQL Query Optimizer 通过执行 EXPLAIN 命令来告诉我们它将使用一个怎样的执行计划来优化Query。所以,可以说 Explain 是在优化 Query ...
Global site tag (gtag.js) - Google Analytics