`
PBFox
  • 浏览: 66083 次
  • 性别: Icon_minigender_1
  • 来自: China
文章分类
社区版块
存档分类
最新评论
文章列表
安装需要的软件包: Apr :APR-1.2.12和APR-util-1.2.12 Apache :httpd-2.2.6.tar.gz Subversion:subversion-1.4.5.tar.gz subversion-deps-1.4.5.tar.gz Php :php-5.2.5.tar.gz Php支持库:libxml2-2.6.19.tar.gz 1、安装APR-1.2.12和APR-util-1.2.12 1) #tar zxvfapr-1.2.12.tar.gz #cd apr-1.2.12 #./configure Make;make install 2 ...
client让我远程 帮他把项目部署到服务器上。什么都没给,只好自己想办法,边查资料边部署。首先把代码给搞下来。[yzhang@localhost ~]$ mkdir trust[yzhang@localhost ~]$ cd trust[yzhang@localhost trust]$ svn checkout http://...............................................................用户名:密码:[yzhang@localhost trust]$ cd trunk[yzhang@localhost trunk]$ lsapp ...
1.安装 ruby script/plugin install http://lipsiasoft.googlecode.com/svn/trunk/lightbox_helper2.装好好把插件包里面的css,图片,javascript放到程序的相应地方3.在页面中加入 <%= javascript_include_tag :defaults %> 和 <%= stylesheet_link_tag 'lightbox' %>4.在程序的view中使用:<%= lightbox_link_to "Link Name", "/path ...
Nginx+Mongrel 1.Download Nginx You can download Nginx in this url( http://nginx.net/) . The last stable version is nginx-0.5.34 The last development version is nginx-0.6.21 I use nginx-0.5.34 2.Setup Mongrel gem install mongrel gem install mongrel_cluster 3.Setup ...
接boss通知,要做个google maps 的api。查了半天资料才做完。记录下来。<html><head><title>test api</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="Master_css/MainText.css" rel="stylesheet" type="text/css" ...
1.gem install pdf-writer2.在contrallor里面加入require 'pdf/writer' 3.在public下建文件夹pdf4. def pdf gen_pdf redirect_to("#{@request.relative_url_root}/pdf/user.pdf") end private def gen_pdf pdf = PDF::Writer.new pdf.text "User List", :font_size => 12, :justification => :center users = ...
看到一个很不错的插件ez_where,便用它做了个例子,贴出来与大家分享一下:首先,新建一个项目:ez_whereD:\>rails ez_whereD:\rubyonrails>cd ez_where其次,执行如下命令,生成rest 形式的脚手架 D:\rubyonrails\ez_where>ruby script/generate scaffold_resource user login:stringfirstname:string lastname:string exists app/models/ exists app/controllers/ exists app/ ...
javascript代码:function clearText(thefield){ if (Element.readAttribute(thefield, "defaultvalue")==thefield.value){ thefield.value = "" thefield.style.color="black" }}function refill(thefield){ if(thefield.value==""){ thefield.value=Element.readAttribute(thefield, ...
首先是安装:gem install win32-soundwin32-sound.rb代码:require "win32/sound"include Win32wav = "c:\\windows\\media\\chimes.wav" #文件路径puts "Playing 'chimes' sound once"sleep 1Sound.play(wav)执行ruby win32-sound.rb 就可以听到声音文件了。
首先是安装:gem install rtf代码:#!/usr/bin/env rubyrequire 'rubygems'require 'rtf'include RTF# Create required styles.styles = {}styles['HEADER'] = CharacterStyle.newstyles['HEADER'].bold = truestyles['HEADER'].font_size = 28styles['NORMAL'] = ParagraphStyle.newstyles['NORMAL'].justification = ParagraphStyle ...
‘400’.to_i #=>400'405' .to_i(8) #=>261'405'.to_i(16) #=>1029随机数:rand(5) #=>2rand(5) #=>1rand(5) #=>5rand(1000) #=>369获取对数:Math.log(1) #=>0.0Math.log(Math::E) #=>1.0Math.log(10) #=>2.302585...平均数:de ...
一、项目管理的"螺帽和螺栓"(基础知识) 显而易见地,基本的项目管理知识是每一个行业内人士所必须掌握的,大多数企业使用项目管理知识结构的九个方面来定义这些"螺帽和螺栓",而且通过要求这些从业人员获得PMP资格证书来检验他们是否掌握了这九个方面的知识。  另外,企业要求这些人员在不同的情况中的各种项目中表现和运用这些知识。很多项目经理是从在项目团队中工作开始的,然后发展成为团队领导,实施和管理小的项目,并逐渐接手规模更大和责任更大的项目。 除了要求掌握这些" ...
string="My first string"string.length #=>15string.length.next #=>16string.slice(3,5) #=>firststring.upcase #=>MY FIRST STRINGstring.empty? #falsestring.include? 'My' #truehash={"key1"=>"val1","key2"=>"val2"}string=""hash.ea ...
11.执行 rakedb:migrate 打开http://localhost:3000/assets试试效果吧
rcov是一个用于诊断Ruby代码覆盖率的工具,它最主要的用途就是用于确定单元测试是否覆盖到了所有代码 。1:gem install rcov2:rcov的使用相当简单:rcov test/*.rb
Global site tag (gtag.js) - Google Analytics