`
文章列表
from:http://dreamerslab.com/blog/en/preload-images-with-jquery-preload-plugin/    需求 jQuery 1.2.3+   浏览器      Firefox
#开发模式 development:  adapter: mysql2   # 数据版本    database: zyt  #数据库名  host: localhost  # 数据库主机名  username: root  # 数据库用户名  password:  #数据库密码   pool: 5   timeout: 5000 # Warning: The database defined as "test" will be erased and# re-generated from your development database when you ...
1.1 创建一个Rails应用程序 $ rails app_name 可选项: -d, database=xxx 指定安装一个数据库(mysql oracle postgresql sqlite2 sqlite3 ), 默认情况下是数据库 -r, ruby-path= 指定Ruby的安装路径,如果没有指定,scripts使用env去找Ruby  -f, freeze (冻结)freezes Rails在vendor/rails目录 1.2 API Documentation $ gem_server 启动一个WEBrick服务器。这时候你可以通过Http://localhost:8808/ 打开 ...
jquery 表格内容排序插件,插件来源:http://www.veryhuo.com/   以下是使用方法和内容 插件说明 ----------------------------[说明]------------------------------ 用于把Table转为可排序的Table ----------------------------[使用]------------------------------ 1、给设置标题行添加名自定义属性role=&qu ...
有两种极端原型的程序员——“禅宗的程序员”,我们称为心如止水的程序员,还有“不能克制分心的程序员”,我们称为心绪不定的程序员。两者都是非常极端的,所以他们应该处于贝尔钟形曲线的两端,对吗?错。实际上, ...
jquery如何获得页面元素的坐标值 jquery如何获得页面元素的坐标值   yulutxt是输入经典语录的输入框,feedBackMessage函数见http://www.wesoho.com/article/asp/2765.htm var p = $("#yulutxt");var yuluoffset = p.offset();feedBackMessage(msg,yuluoffset.left+p.width()+10,yuluoffset.top,5000); ------------------- 1,获取对象(自定义调整打开新窗口参照元素)va ...
  写两个简单的rails 上传图片功能   一 rails 插件:   paperclip-2.4.3.gem      1 gem install paperclip-2.4.3.gem,当数据删除时,自己做删除文件操作      2  新建model 表图片字段,        字段分为三个,假设model 引用字段名:p ...
写一个简单ajax登录和注册方法,缩简写法 以注册为例!!!请看注意点 四步:1 ruby 表单提交,2 controller ajax验证方法,3 jquery ajax 验证,4 ruby 表单提交     1 ruby 表单提交   假设有以下ruby 表单 注册提交     <%form_for :client_user,:url => {:controller=>'new',:action => 'regirest' },:html=>{:id=>'regirest_up'} do |f|%> <div id=& ...
 可以在controller与view中直接通过session与cookies访问,在model中无法访问。 Session #存信息 session[:current_user_id] = user.id #取信息 session[:current_user_id] #删除信息 session[:current_user_id] = nil #清空信息 reset_session   Cookies cookies操作稍微有点多,因为关系到明文/加密,过期时长1、默认为关闭浏览器,自动过期;明文存储。 #存信息 cookies[:id] = "rubye ...
以下推存一下代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/htm ...
FORM:http://renhaichaocisco.blog.51cto.com/717382/144191 随着社会的进步!WIFI上网日益普及,特别是大城市中随便在一个小区搜索一下就能找到好多热点,搜索到热点然后链接上去那么我们就可以尽情的享受免费上网服务了。 不过除了公共 ...
      命令列表   rake db:migrate 命令作用:将所有未实施的迁移任务都实施到目标数据库上。   rake db:migrate VERSION=20080906120000 命令作用:撤销迁移任务到指定版本 迁移版本信息可以在所创建库(如elvuel_deployment数据库)下schema_info表中查看到相关记录信息。   rake db:migrate VERSION=0 命令作用:将数据库返回到最初状态(即,只有schema_migrations表,其他表都删除)   rake db:migrate VERBOS ...
Rails 3 如何定制 404 and 500 错误页面     在application_controller.rb 中使用rescue_from 可以完成大部分工作:   class ApplicationController < ActionController::Base def self.rescue_errors rescue_from Exception, :with => :render_error rescue_from RuntimeError, :with => :render_error rescue_from ActiveR ...
from :http://samyulong.iteye.com/blog/638142 1. render :action => "long_goal", :layout => "spectacular"   2. render :partial => "person", :locals => { :name => "david" }    3. render :template => "weblog/show", :locals => { ...
What’s the 404 error pages and the page role?   The 404 error pages’mean 404是http协议所定义的一种协议名称,也可说是一种形为,即 服务器找不到请求的网页。例如,对于服务器上不存在的网页经常会返回此代码。从某种意义上来讲,只是一种名称。当然,http协议还规定了其它多种协议名称,最常用500。   百度百科:404是W3C规定的HTTP状态码中的一种错误,是WWW网站访问比较经常出现的错误。最常见的出错提示:404 NOT FOUND。404页面就是当用户输入了错误的链接时,返回的页面。404页面的目的是:告 ...
Global site tag (gtag.js) - Google Analytics