`
a420144030
  • 浏览: 81642 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
1. 创建一个项目     cd ~/public_html rails railsapp   2.  Apache 需要激活 proxy 和 rewrite 模块        一般安装的apache 需要执行以下命令:     sudo a2enmod proxy sudo a2enmod proxy_balancer sudo a2enmod proxy_http sudo a2enmod rewrite   3. 重新加载 Apache     sudo /etc/init.d/apache2 force-reload   4. ...
Here is a list of The Different Modes of Opening a File: Modes Description r Read-only mode. The file pointer is placed at the beginning of the file. This is the default mode. r+ Read-write mode. The file pointer will be at the beginning of the file. w Write-only mode. Overwrites the ...
Ubuntu 是开发 Ruby on Rails Web 程序的理想平台,在 Ubuntu 上安装 Ruby on Rails 开发环境需要用到标准的 APT 工具和 RubyGems 软件包管理器。通常我们使用 APT 安装 Ruby 语言解释器,而其他用 Ruby 编写的程序,包括 Rails 框架,则通过 RubyGe ...
1.在 lib/task 中新建一个 install_system.rake   2. 复制这段代码   namespace :db do namespace :migrate do desc "Install system" task :install_system => :environment do raise "PLUGIN is require when specify PLUGIN_VERSION" if !ENV['PLUGIN'] plugin_path = &quo ...
一个好的关于color picker 的网站,里面不仅包含了颜色选择还包括图片预览,菜单、日历等等   http://www.supersite.me/index.php?p=1_2&c=2-Content-Sliding    
<html> <head> <script type="application/x-javascript"> function draw() { var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); //下面两种方式都可以设置颜色 //方法1: ctx.fillStyle = "red"; //方法2: //ctx.fillStyle = &quo ...
ABQIAAAAu7jR_kzRdPAl4_NjdEw-oRRkfkpJHqiRug8hI2fvMw33FU1tPRTX4WTgyocogFVRt3OZylAoSiNLwA
有时候我们希望我们的表单拥有一致的显示风格,今天我们就看看用Rails怎样创建一个Helper来自定义表单。 1,实现自己的FormBuilder 在app/helpers/application_helper.rb里加入以下代码: Java代码   1. class TabularFormBuilder < ActionView::Helpers::FormBuilder 2. (field_helpers - %w(check_box radio_button)).each do |selector| 3. src = <<-END ...
http://monoclestudios.com/cocos2d_whitepaper.html http://stagingbilling.riverwatcher.com/overview/create_invoice Object C源代码 http://www.koders.com/objectivec/fid9C0FECC71ED6D1D5BDBB9137BE7C3C6C7A189510.aspx?s=NSGetSizeAndAlignment iphone api : http://www.cocos2d.org/ http://cocos2d.org/doc/api/ ...
# simply inner join Member.find(:first, :joins=>:group) => SELECT * FROM members INNER JOIN groups ON groups.id = members.group_id LIMIT 1 # two inner joins Member.count(:joins=>[:group, :profile]) => SELECT count(*) AS count_all FROM members    INNER JOIN groups   ON groups.id = members ...
返回字符串substr在字符串str第一次出现的位置(str不包含substr时返回0) 由 admin 在 18 天 之前添加 POSITION 返回字符串substr在字符串str第一次出现的位置(str不包含substr时返回0) 例如: select * from train id  |name       |station_numbers   ----------------------------------------------------------------- 1   |1008/1009  |,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 ...
#当check该连接时重新打开一个页面     config.show.link.page=true     #create和update显示的字段     config.create.columns = config.update.columns =        [        :nombre, :descripcion, :fecha_emision, :fecha_pago,        :fecha_pagada, :esta_pagada, :es_pago_1, :es_pago_2, :es_pago_3,        :es_a_90_dias, :ruta_fich ...
节省点时间,少一些头痛,使用 Ruby on Rails ActiveScaffold 插件可以创建更容易维护的页面。ActiveScaffold 可以处理用户接口所需的所有 CRUD(创建、读取、更新和删除)操作,这样可以为您节省更多时间来重点关注更有挑战(也更有 ...
渲染   # 渲染UsersController   render :active_scaffold => 'users' # 同样是渲染UsersController,这次将标题改为"活跃用户"   render :active_scaffold => 'users', :label => '活跃用户' # 按`name`排序,正序(ASC)   render :active_scaffold => 'users', :sort => "name", :sort_direction => "ASC&q ...
Global site tag (gtag.js) - Google Analytics