上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页

[python]pyramid 学习2 (create project)

摘要: 创建项目使用pyramid_starter模板paster create -t pyramid_starter projectname使用pyramid_projectnamealchemy模板paster create -t pyramid_routesalchemy projectname两种项目模板有一些文件不相同,具体的深入学习以后再说运行测试用例cd projectname./setup.py test -q运行项目paster serve development.iniStarting server in PID 3983.serving on 0.0.0.0:6543 view 阅读全文
posted @ 2011-10-17 23:32 bluefrog 阅读(932) 评论(0) 推荐(0) 编辑

删除目录下的.svn目录

摘要: find . -type d -name ".svn"|xargs rm -rf 阅读全文
posted @ 2011-10-17 15:08 bluefrog 阅读(254) 评论(0) 推荐(0) 编辑

[gvim]vim批量缩进

摘要: 按v进入visual状态,选择多行,用>或<缩进或缩出 阅读全文
posted @ 2011-10-10 11:33 bluefrog 阅读(2994) 评论(0) 推荐(0) 编辑

ubuntu10.04 安装php-fpm

摘要: ubuntu10.04 官方没有php-fpm的源 10.10开始已经有了加入非官方的源/etc/apt/source.listdeb http://ppa.launchpad.net/jdub/devel/ubuntu maverick maindeb http://ppa.launchpad.net/brianmercer/php/ubuntu lucid maindeb-src http://ppa.launchpad.net/brianmercer/php/ubuntu lucid main安装sudo apt-get updatesudo apt-get install php5-f 阅读全文
posted @ 2011-10-08 20:12 bluefrog 阅读(1633) 评论(0) 推荐(0) 编辑

[php]php操作svn

摘要: 扩展安装sudo apt-get install php5-svn详细地址http://cn.php.net/manual/zh/book.svn.php 阅读全文
posted @ 2011-10-08 15:34 bluefrog 阅读(500) 评论(0) 推荐(0) 编辑

[python]pyramid 学习1 (hello world)

摘要: 安装easy_install pyramid异常情况:安装的时候要求zope.interface 3.80以上easy_install zope.interfacehello world 1 from paste.httpserver import serve 2 from pyramid.config import Configurator 3 from pyramid.response import Response 4 from pyramid.view import view_config 5 6 @view_config(name='hello',request_me 阅读全文
posted @ 2011-09-29 17:17 bluefrog 阅读(981) 评论(3) 推荐(0) 编辑

[gvim]vim批量注释

摘要: 批量注释ctrl+v 进入列编辑模式,向下或向上移动光标,把需要注释的行的开头标记起来,然后按大写的I(shift+i),再插入注释符,比如"//",再按Esc,就会全部注释了批量去掉注释ctrl+v,进入列编辑模式,横向选中列的个数(如"//"注释符号,需要选中两列),然后按d, 就会删除注释符号 阅读全文
posted @ 2011-09-27 16:02 bluefrog 阅读(3715) 评论(0) 推荐(0) 编辑

sphinx 配置&demo

摘要: 下载0.99稳定版本http://sphinxsearch.com/downloads/release解压tar -zvxf sphinx-0.9.9.tar.gz安装cd sphinx-0.9.9./configuremake && make install以下是sphinx自带一个例子(使用mysql, 还支持其它数据库)导入测试数据mysql-u root -p </usr/local/sphinx/etc/example.sql创建配置文件cd /usr/local/sphinx/etccp sphinx.conf.dist sphinx.confvi sphin 阅读全文
posted @ 2011-09-19 16:28 bluefrog 阅读(811) 评论(0) 推荐(0) 编辑

[php]数据结构&算法(PHP描述) 简单选择排序 simple selection sort

摘要: 1 <?php 2 /** 3 * 简单选择排序 simple selection sort 4 * 5 * 原理: 一次选定数组中的每一个数,记下当前位置并假设它是从当前位置开始后面数中的最小数min=i,从这个数的下一个数开始扫描直到最后一个数,并记录下最小数的位置min,扫描结束后如果min不等于i,说明假设错误,则交换min与i位置上数。 6 */ 7 function sort_simple_selection($list) 8 { 9 $len=count($list);10 if(empty($len)) return$list;11 12 for($i=0;$i<$ 阅读全文
posted @ 2011-08-09 00:00 bluefrog 阅读(589) 评论(0) 推荐(0) 编辑

命令行下 svn 设置externals

摘要: 在实际开发当中有一些库不是自己开发的 为了保持最新的版本,我们使用svn的svn:externals这个属性来引入我们需要的库代码先认识几命令显示当前svn目录下的所有设置的属性svn proplist删除当前目录下指定的属性svn propdel PROPNAME当前目录下设置指定的属性svn propset PROPNAME .-F xxx.txt#== 这里开始设置svn:externals===========先在svn目录下新建一文件并写入cat >test.txtZend http://svn.my.com/path/to/zendframeworkThinkPhP http 阅读全文
posted @ 2011-08-08 13:44 bluefrog 阅读(10158) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页