- 浏览: 692409 次
- 性别:
- 来自: 中山
-
最新评论
-
wuhuizhong:
jFinal支持Rest风格吗?可以想spring mvc那样 ...
在JFinal的Controller中接收json数据 -
wuhuizhong:
在jfinal中应如何获取前端ajax提交的Json数据?ht ...
在JFinal的Controller中接收json数据 -
wuhuizhong:
jfinal如何处理json请求的数据:问题: 在某些api接 ...
在JFinal的Controller中接收json数据 -
wuhuizhong:
Ubuntu14.04 安装 Oracle 11g R2 Ex ...
Oracle 11g release 2 XE on Ubuntu 14.04 -
alanljj:
这个很实用,已成功更新,谢过了!
odoo薪酬管理模块l10n_cn_hr_payroll
文章列表
在開發的網頁中使用 jQuery
,為 jQuery 增加一個 log
function:
jQuery.fn.log = function (msg) {
console.log("%s: %o", msg, this);
return this;
};
這樣只需要對 $(...)
這樣的 jQuery object 呼叫 .log("Debug message")
就可以在 firebug 的 console 看到該物件的 context 了.
- 2008-08-31 18:43
- 浏览 1019
- 评论(0)
I’m currently preparing the deployment of our RoR application (a kind of portal for our enterprise) in Oracle App Server 10g.
Our application is currently deployed under Litespeed Web Server,
running with Ruby MRI: we encounter some problems of performances with
Database connections and we also have ...
- 2008-08-31 17:32
- 浏览 1554
- 评论(0)
(NOTE: JRubyWorks keeps moving forward and this article may not be up to date.)
How to run your Rails
application with J2EE
web servers (such as Jetty
and Tomcat
)? Here’s a solution:
1. Set JRUBY
_HOME environment variable properly.
export JRUBY_HOME=/usr/lib/jruby
2. Install ActiveRecord-JDBC
. ...
- 2008-08-31 17:22
- 浏览 543
- 评论(0)
Rails 內置 Prototype 和 scriptaculous 。
jRails is a drop-in jQuery replacement for the Rails Prototype/script.aculo.us helpers.
== Resources
Install
* .script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails
Project Site
* http://code.google.com/p/ennerchi/
Web Site
* htt ...
- 2008-08-31 10:08
- 浏览 990
- 评论(0)
jQuery 中文社区
jQuery 中文社区官方论坛
《精通JavaScript+jQuery》视频教程(共16讲)
- 来自:前沿视频教室
jQuery 1.2 中文参考文档
Visual jQuery1.1文档 - 中文版(按功能排序)
jQuery中文入门指南,翻译加实例,jQuery的起点教程
jQuery技巧总结
jQuery 學習心得
小试牛刀——一篇jQuery小教程
jQuery简单入门(系列)
- 2008-08-30 23:08
- 浏览 2370
- 评论(0)
当你需要采用动态树型视图的时候,你会自然的使用xloadtree(主页:http://webfx.eae.net/dhtml/xloadtree/xloadtree.html),那么在rails中如何使用xloadtree呢,我这里有一些经过测试的步骤,提供给大家参考:1.下载xtree2下载地址:http://webfx.eae.net/dhtml/xtree2b/下载文件:js/xtree2.js,js/xloadtree2.js,css/xtree2.css,以及images/*.*然后,把xtree2.js,xloadtree2.js放置在你的项目的public/javascripts ...
- 2008-08-23 11:03
- 浏览 1987
- 评论(0)
Quest公司提供的免费PLSQL代码库,提供了不少增强型功能,如果是做Oracle数据库开发的人,可以拿来学习或者直接使用。一、说明The PL/Vision Code Library provides over 1,000 PL/SQL functions and procedures that extend the capabilities of the PL/SQL language.PL/Vision Code Library is a freeware product. Quest Support does not support this product. If you have ...
- 2008-08-22 09:48
- 浏览 1135
- 评论(0)
CREATE OR REPLACE PACKAGE p
-- Adapted from PL/Vision library copyright 2002 Quest Software Inc.
IS
c_linelen CONSTANT PLS_INTEGER := 80;
-- Set line length before wrap
PROCEDURE set_linelen (len IN PLS_INTEGER := c_linelen);
FUNCTION linelen
RETURN PLS_INTEGER;
PROCEDURE l ...
- 2008-08-22 09:07
- 浏览 863
- 评论(0)
原E文地址:http://blog.hasmanythrough.com/2006/04/20/many-to-many-dance-off
我已注意到使用 Rails 关联在创建多对多关系的两种方式上有些混乱。出现混乱是可以理解的,因为has_many :through 还有些新,写它的文章并不多。Has_and_belongs_to_many 出现的较早,确定的角色与资料超出了你为什么使用多对多关系的假设。事实上,许多人似乎并没有抓住本质上的区别。就像我们从观看经典影片所学到的,告诉我们两个预期选择之间的区别最好方式是它们的舞蹈。你得观察每个人的表演。那么我们必须在两者之间选择哪个演员呢 ...
- 2008-08-21 15:45
- 浏览 6196
- 评论(0)
注意==、eql?()、equal?()的區別
- 博客分类:
- ROR
==判断的是值;eql?()判断的是值以及类型;equal?()判断的是地址。
irb> 0==0
=> true
irb> 0==0.0
=> true
irb> "0"=="0"
=> true
irb> 0.eql?(0)
=> true
irb> 0.eql?(0.0)
=> false
irb> "0".eql?("0")
=> true
irb> 0.equal?(0)
=> true
irb> 0.equal? ...
- 2008-08-18 15:53
- 浏览 736
- 评论(0)
rchardet,是python-chardet的port. 而python-chardet, 是mozilla browser的encoding auto-detection实现的port.关于细节, 可以看这里: http://nextlib.lifegoo.com/user/sishen/article/2605 : A composite approach to language/encoding detection
安装:
$gem install rchardet
使用:
$irb -rubygems
irb(main):001:0> require 'rchardet' ...
- 2008-08-12 17:09
- 浏览 1387
- 评论(0)
CREATE OR REPLACE FUNCTION num2rmb(je NUMBER) RETURN VARCHAR2 IS
result varchar2(100);
i pls_integer;
snum varchar2(20) := ltrim(replace(to_char(abs(je), '9999999999999990.99'), '.'));
len pls_integer := length(snum);
sch varchar2(20) := '零壹贰叁肆伍陆柒捌玖';
sjin varchar2(50) := '分角圆拾佰仟万拾佰仟亿拾佰仟万拾佰仟';
srmb v ...
- 2008-08-10 09:19
- 浏览 1599
- 评论(0)
#does ruby guy notice about this pain?
#翻转斜杠
def reverse_slash(str)
str.gsub(/\//) { |x| "\\" }
end
#加上双引号
#double-quote str
def dquote(str)
"\"#{str}\""
end
#execute and wait for each line
#执行命令行工具并捕获命令行输出
def execute_and_watch(str)
putsflush " comma ...
- 2008-08-07 15:21
- 浏览 692
- 评论(0)
#比如: 138 <=> 一百三十八
$KCODE = 'u'
require 'jcode'
require 'iconv'
$cn_nums = %w{零 一 二 三 四 五 六 七 八 九}
$cn_decs = %w{十 百 千 万 十 百 千 亿}
$conv = Iconv.new('gbk', 'utf-8')
$cn_nums_map = {
'〇' => 0,
'一' => 1,
'二' => 2,
'三' => 3,
'四' => 4,
'五' => 5,
'六' ...
- 2008-08-07 15:10
- 浏览 1561
- 评论(1)
1. 表单:<% form_for([:admin, @album], :html => {:multipart => true}) do |f| %>;文件上传控件: <%= file_field :file, :album_img%>.曾试过将文件控件也写出与Model相关联的方式: <%= f.file_field :album_img%>, 但在修改记录时处理有些麻烦, 所以将文件上传的控件与Model属性分类开.
2. 获得文件: @file = params[:file][:album_img]* 判断是否上传文件 if(@file= ...
- 2008-08-07 12:08
- 浏览 1222
- 评论(0)