- 浏览: 11882 次
- 来自: ...
最近访客 更多访客>>
最新评论
-
toostupid:
添加索引
引用
add_index :acls, [" ...
rails学习笔记: rake db
文章列表
/etc/init.d# more svn
#!/bin/bash
SVN_HOME=/home/xxx/svn/
if [ ! -f "/usr/bin/svnserve" ]
then
echo "svnserver startup: cannot start"
exit
fi
case "$1" in
start)
echo "Starting svnserve..."
su xxx -c "svnserve -d -r /home/xxx/svn"
echo "Finish ...
- 2009-02-08 04:50
- 浏览 1103
- 评论(0)
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A INPUT -p tcp --dport 3000 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -j DROP
root@xx:/home/xxxx# more /etc/ip ...
- 2009-02-08 04:04
- 浏览 1225
- 评论(0)
引用myfile.py
title="Life Sucks"
一个文件被导入时相当于执行了代码,
重复导入不会再执行
import myfile
print myfile.title
from myfile import title
print title
可以用
reload(myfile)在执行一次,
一般不建议这么做。
dir() 交互空间中所有定义了的名字
import myfile
dir(myfile)
#! 给文件可执行权, 第一行是解释器的位置
PATH 系统
PYTHONPATH 导入模块
PYTHO ...
- 2009-02-04 15:52
- 浏览 1031
- 评论(0)
script/plugin install svn://errtheblog.com/svn/plugins/will_paginate
Model -> Controller
http://hideto.iteye.com/blog/108118
Ajax
http://www.letrails.cn/archives/07-10-25-ajax-will-paginate
def will_paginate_remote(paginator, options={})
update = options.delete(:update)
url = options.d ...
- 2008-03-23 01:46
- 浏览 1470
- 评论(0)
命令行
引用
script/generate model task name:string priority:integer
script/generate migration add_description_to_task description:string
script/generate migration remove_description_from_task description:string
数据类型
引用# :string, :text, :integer, :float,:decimal, :datetime, :timestamp, :time, :da ...
- 2008-02-24 20:37
- 浏览 3704
- 评论(1)
http://www.amonline.cn/blog/article.asp?id=48
表单开始标签:
Use :multipart => true to define a Mime-Multipart form (for file uploads)
表单结束标签:
文本框 Text fields
生成:
实例:
text_field "post", "title", "size" => 20
size="20" value="#{@post.t ...
- 2007-07-29 21:34
- 浏览 1625
- 评论(0)
1. Download RMagick For Win
2. Unzip the file to local folder.
#gem install rmagick --local
3. Install file-column as plugin
#ruby script/plugin install http://opensvn.csie.org/rails_file_column/plugins/file_column/trunk
Code 1:
class Entry < ActiveRecord ...
- 2007-04-01 16:11
- 浏览 1726
- 评论(0)