摘要: Hey everyone! This is the fourth post in my new node.js modules you should know about article series.The first post was about dnode - the freestyle rpc library for node, the second was about optimist - the lightweight options parser for node, the third was about lazy - lazy lists for node.This time 阅读全文
posted @ 2013-07-24 11:20 Fcicada · Sunny 阅读(358) 评论(0) 推荐(0) 编辑
摘要: What’s CapybaraCapybara is a webrat alternative which aims to support all browser simulators.As you know, webrat can not run javascript on the webpage. In order to test javascript and AJAX based website we need install Selenium-clientgithub.com/ph7/selenium-client and learn extra API and also some c 阅读全文
posted @ 2012-12-17 14:41 Fcicada · Sunny 阅读(879) 评论(0) 推荐(0) 编辑
摘要: The Purpose of the Rails RouterThe Rails router recognizes URLs and dispatches them to a controller’s action. It can also generate paths and URLs, avoiding the need to hardcode strings in your views.1.1 Connecting URLs to CodeWhen your Rails application receives an incoming requestGET /patients/17it 阅读全文
posted @ 2012-10-26 16:44 Fcicada · Sunny 阅读(328) 评论(0) 推荐(0) 编辑
摘要: Using MongoMapper with Rails 3 is easier than ever. Thanks to new features in ActiveSupport, and the new ActiveModel framework (which MongoMapper 0.9+ uses), your app can be up and running on MongoDB in a matter of seconds.First, if you’re generating a new Rails 3 application, it is recommended to l 阅读全文
posted @ 2012-10-26 16:33 Fcicada · Sunny 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 一、准备工作1、 下载mongoDB下载地址:http://www.mongodb.org/downloads选择合适你的版本相关文档:http://www.mongodb.org/display/DOCS/Tutorial2、 安装mongoDBA、 不解压模式:将下载下来的mongoDB-xxx.zip打开,找到bin目录,运行mongod.exe就可以启动服务,默认端口27017,db保存的路径是系统C硬盘目录的根目录的/data/db目录。也就是说,如果你的mongoDB-xxx.zip在E盘,那么你需要在C盘下建立data/db目录。mongoDB不会帮你建立这个目录的。然后运行mo 阅读全文
posted @ 2012-10-26 16:20 Fcicada · Sunny 阅读(227) 评论(0) 推荐(1) 编辑
摘要: 使用中发现CakePHP的ActiveRecord有的时候也不是很好用。举个例子:数据库MySQL,SQL文如下:DROP TABLE IF EXISTS `works`;CREATE TABLE `works` ( `id` int(11) NOT NULL auto_increment, `adate` date NOT NULL, `btime` varchar(4) NOT NULL, `ctime` varchar(4) NOT NULL, `content` text, `ip` varchar(15) NOT NULL, PRIMARY KEY (`id`)) E... 阅读全文
posted @ 2012-10-05 12:02 Fcicada · Sunny 阅读(547) 评论(0) 推荐(0) 编辑
摘要: This post will covers the steps to configure static ip address, default gateway, netmask, dns server and make a network auto start at boot on linux CentOS 6.3. Server normally configured with static ip address, so that easier to maintain the configuration on it’s client and DNS server will always .. 阅读全文
posted @ 2012-09-25 14:10 Fcicada · Sunny 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 一、前面的话HTML5提供专门的拖拽与拖放的API,以后实现这类效果就不必乱折腾了。但是,考虑到Opera浏览器似乎对此不感冒,在通用性上有待商榷,所以这里也就简单说一说。二、相关重点DataTransfer对象:退拽对象用来传递的媒介,使用一般为Event.dataTransfer。draggable属性:就是标签元素要设置draggable=true,否则不会有效果,例如:<div title="拖拽我" draggable="true">列表1</div>ondragstart事件:当拖拽元素开始被拖拽的时候触发的事件,此事 阅读全文
posted @ 2012-08-29 10:58 Fcicada · Sunny 阅读(419) 评论(0) 推荐(0) 编辑
摘要: cake folder:<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L]</IfModule>cake/app folder:<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$1 [L] </IfModule>cake/a... 阅读全文
posted @ 2012-07-26 14:38 Fcicada · Sunny 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Step 1: Install needed packagesyou will need remove installed ruby because repo version is 1.8.7 and we need 1.9 at leastyum remove rubyyum install wgetenable epel reposwget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpmrpm -Uvh epel-release-6-5.noarch.rpminstall requi 阅读全文
posted @ 2012-05-04 18:07 Fcicada · Sunny 阅读(1388) 评论(0) 推荐(0) 编辑