11 2014 档案
摘要:无标题文档 一级标题1 二级标题1--> level_ title 1 level_ title 2 level_ title 3 ...
阅读全文
摘要:本系列的前提是ngix已经配置好.一. 下载安装datatables.官网上给出了两种方式(http://datatables.net/manual/installation#Including-Javascript-/-CSS),我们选择下载到本地的方法.1. 到官网下载:http://datat...
阅读全文
摘要:一. cgi用前面小节的req_resp.cpp, 这里略去cgi的编译和部署.二. 下面的几个文件在同一个目录.1. index.py 增加两处:(1) (r"/index.py/angularjs_cgi", AngularjsCgiHandler)(2)class AngularjsCgi...
阅读全文
摘要:在fast-cgi源码的examples文件夹下有很多例子, 下面给出echo例子, 编译运行方法同上几节.fast-cgi的API google之.http://fossies.org/dox/fcgi-2.4.0/fcgiapp_8h.html#a32f6950798054a70404ce24c...
阅读全文
摘要:接上节, 上节只有响应---cout, 本节获取地址栏的QUERY_STRING, 然后响应.一. req_resp.cpp.#include #include #include #include "fcgio.h"#include "fcgi_config.h"using namespace st...
阅读全文
摘要:接上几节, 本节写有请求和响应的demo.一. myecho.cpp如下:#include #include #include "fcgio.h"#include "fcgi_config.h"using namespace std;int main (void){ int count = 0...
阅读全文
摘要:一.spawn_fastcgi的安装、部署与配置. 1. 下载spawn_fastcgi. https://github.com/lighttpd/spawn-fcgi 这里使用的是1.6.3的版本https://github.com/lighttpd/spawn-fcgi/release...
阅读全文
摘要:angularJS之$http:与服务器交互http://www.cnblogs.com/sytsyt/p/3297872.html
阅读全文
摘要:下面的文件在同一目录下.myTodoApp.jsmyTodoCtrl.jsindex.pyangularjs_test.htmlindex.py中内容:import tornado.ioloopimport tornado.webclass MainHandler(tornado.web.Reque...
阅读全文
摘要:一. 接上两节, 修改index.py如下:增加了/index.py/template和处理句柄.import tornado.ioloopimport tornado.web class MainHandler(tornado.web.RequestHandler): def get(se...
阅读全文
摘要:首先安装tornado.一. 在/var/www下新建文件index.py,内容如下:import tornado.ioloopimport tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): ...
阅读全文
摘要:参考 http://www.luokr.com/p/2上一节安装了tornado, 本节安装ngix,Nginx来将web请求代理到Tornado web server一. 首先安装Nginx.$ rpm -ivh http://nginx.org/packages/centos/6/noarch/...
阅读全文
摘要:8.更新Message类型如果现有message类型不能在满足业务需求,例如,需要新增一个字段,但是我们却希望依然能够使用原来的.proto生成的代码。完全没有问题,仅需记住如下规则:千万不要修改现有字段后边的数值标签只能新增optional或者repeated字段可以删除非必须字段,但是他们的数字...
阅读全文
摘要:print '0123'.ljust(20, '-')print '01234'.ljust(20, '-')print '012356'.ljust(20, '-')print '0123567'.ljust(20, '-')
阅读全文
摘要:strVal = "%.2f" % valfloatVal = round(val, 2)但是如果val为1.0, 则结果仍为1.0, 不是1.00
阅读全文

浙公网安备 33010602011771号