Ruby世界:看看如何解析Ruby语言代码
由Gudao Luo在2011-05-31 at 10:16发表的
代码世界:如何添加页面按钮twitthis
由Gudao Luo在2011-05-16 at 10:04发表的
- 说明
- 下面参考文献1中有代码,如下面的图所示。
- 把该代码复制到博客软件相关的显示页面,如本网站所使用的软件Simplelog,其页面文件为:$ROOT_RAILS/themes/simplelog/views/posts/_item_detailed.rhtml
- 网站lycom.de使用说明
- 点击页面日期链接,如,’由 Gudao Luo 在 2011-05-15 at 08:59 发表的’。
- 一旦点击日期链接以后,就出现如上面的图所示的按钮”twitthis“,且点击之。
- 参考资料
- 写代码添页面按钮twitthis http://cranialsoup.blogspot.com/2009/01/add-twitthis-button-to-your-blogger.html
Rails框架语言:使用Rails框架函数link_to
由Gudao Luo在2011-03-26 at 14:10发表的

- 参考资料
- http://pradeep88.wordpress.com/2010/04/19/link_toimage_tag-in-rails/
- http://snippets.dzone.com/posts/show/6722
- http://snipplr.com/view/5595/rails-link-to-an-image-instead-of-text/
- http://www.railsrocket.com/image_tag-and-link_to-helpers
- http://jquery-ui.googlecode.com/svn/tags/1.6rc5/tests/static/icons.html
- http://tinyurl.com/alocdk
- http://tinyurl.com/7htryn
代码世界:如何理解Ruby类及其函数?
由Gudao Luo在2010-02-16 at 18:15发表的

- 说明
- 首先要理解类的函数是什么意思。
- 其次类没有我们所需要的函数,但是有自己想法。
- 最后就自己写个相关函数,与大家共享。
- 参考资料
- http://chinaonrails.com/topic/view/3730.html http://chinaonrails.com/topic/view/3730.html
- http://ruby-doc.org/core/classes/Array.html http://ruby-doc.org/core/classes/Array.html
- http://carsonified.com/blog/dev/ruby-arrays/ http://carsonified.com/blog/dev/ruby-arrays/
- http://tinyurl.com/yge2k4c http://tinyurl.com/yge2k4c
代码世界:灰色对象、灰色操作、灰色关联和灰色。。。
由Gudao Luo在2010-01-28 at 20:57发表的

- 参考资料
- What’s New in Edge Rails: Dirty Objects http://ryandaigle.com/articles/2008/3/31/what-s-new-in-edge-rails-dirty-objects
- Introducing the Dirty Associations Plugin http://opensource.sha.cornell.edu/blog/2010/01/25/introducing-the-dirty-associations-plugin/
- Dirty Associations插件首页 http://github.com/daphonz/dirty_associations
- 专业名称翻译
- 灰色对象(Dirty Objects)、灰色操作(Dirty Operations)、灰色关联(Dirty Associations)和灰色(Dirty)。。。
Ruby世界:2009年代码段网站
由Gudao Luo在2010-01-06 at 22:53发表的
Ruby代码世界:Array排序代码实例
由Gudao Luo在2009-09-06 at 10:33发表的
代码世界:对于数组的运算符“<<”和“+=”的差异
由Gudao Luo在2008-11-27 at 21:53发表的
代码世界:逆向循环语句
由Gudao Luo在2008-11-27 at 09:58发表的
- 说明
- 在下面资料的逆向循环语句中,do前面多了一个点。
- 参考资料
- http://www.railsrocket.com/articles/looping-backwards-in-ruby
代码世界:开源软件Redmin版本0.7.3的代码问题
由Gudao Luo在2008-11-11 at 13:54发表的
文章推荐:以Ruby语言开发Cocoa框架软件实例
由Gudao Luo在2008-08-05 at 04:28发表的
代码世界: 如何在软件SimpleLog中更好地显示代码
由Gudao Luo在2008-08-03 at 03:32发表的

解决方案
- 切换到软件SimpleLog的根目录
cd %SIMPLELOG_ROOT%
- 下载CSS文件
cd public/themes/simplelog/stylesheets
wget http://www.lycom.de/themes/simplelog/stylesheets/coderay.css
cd %SIMPLELOG_ROOT%
- 打开SimpleLog软件的主模板文件,并且把所下载的CSS文件连接到程序中去
vi themes/simplelog/layouts/site.rhtml
<%= theme_stylesheet_link_tag 'coderay.css', :title => Site.site_name, :media => 'screen' %>
<div class="CodeRay"><pre>
—你的代码—
</pre></div>
代码世界:介绍使用jQuery UI标签功能
由Gudao Luo在2008-08-02 at 19:04发表的

使用实例
- 下载CSS文件及其图片
1 svn co http://jquery-ui.googlecode.com/svn/tags/latest/themes/flora/
- 下载jQuery软件及其UI库
或者使用命令1 curl -O http://code.jquery.com/jquery-latest.js 2 curl -O http://dev.jquery.com/view/tags/ui/latest/ui/ui.core.js 3 curl -O http://dev.jquery.com/view/tags/ui/latest/ui/ui.tabs.js
1 wget http://code.jquery.com/jquery-latest.js 2 wget http://dev.jquery.com/view/tags/ui/latest/ui/ui.core.js 3 wget http://dev.jquery.com/view/tags/ui/latest/ui/ui.tabs.js
- 创建一个HTML文件
1 vi tabs.html - 该HTML文件必须包含三部分内容:
1 <html><head> 2 <!— 1. 说明CSS文件和jQuery文件的位置 BEGIN —> 3 <script src="jquery-latest.js"></script> 4 <link rel="stylesheet" href="flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)"> 5 <script type="text/javascript" src="ui.core.js"></script> 6 <script type="text/javascript" src="ui.tabs.js"></script> 7 <!— 1. 说明CSS文件和jQuery文件的位置 END —> 8 9 <!— 2. jQuery代码 BEGIN —> 10 <script> 11 $(document).ready(function(){ 12 $("#example > ul").tabs(); 13 }); 14 </script> 15 <!— 2. jQuery代码 END —></head><body> 16 17 <!— 3. 与jQuery代码相关的HTML代码 BEGIN —> 18 <div id="example" class="flora"> 19 <ul> 20 <li><a href="#fragment-1"><span>One</span></a></li> 21 <li><a href="#fragment-2"><span>Two</span></a></li> 22 <li><a href="#fragment-3"><span>Three</span></a></li> 23 </ul> 24 <div id="fragment-1">tab1 内容</div> 25 <div id="fragment-2">tab2 内容</div> 26 <div id="fragment-3">tab3 内容</div> 27 </div> 28 <!— 3. 与jQuery代码相关的HTML代码 END —></body></html>
- 参考资料
Ruby世界:解决Ruby的重大安全
由Gudao Luo在2008-06-14 at 07:06发表的
代码世界:使用Proc.new 和 lambda的区别
由Gudao Luo在2008-04-07 at 18:19发表的
网站推荐:Ruby语言代码段网站
由Gudao Luo在2008-01-10 at 14:27发表的

- 说明
- Ruby语言代码段网站 Refactor :my => ‘code’
- 晒晒你的代码,学习他人的代码
Rails框架:页面代码实例
由Gudao Luo在2007-06-18 at 21:51发表的
Ruby语言最重要的代码库PLEAC-Ruby
由Gudao Luo在2007-03-08 at 23:12发表的

- PLEAC-Ruby首页:http://pleac.sourceforge.net/pleac_ruby/index.html
- 说明:PLEAC-Ruby网站包含了大量十分重要的Ruby语言代码实例。
- Ruby语言最大的代码库:http://snippets.dzone.com/tag/ruby









