<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>tony (Tony)</title>
    <link>https://ruby-china.org/tony</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Google Project Glass 在中国</title>
      <description>&lt;p&gt;&lt;span class="embed-responsive embed-responsive-16by9"&gt;&lt;iframe class="embed-responsive-item" src="//player.youku.com/embed/XMzgxNzY5OTcy" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;When Project Glass in China  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Tue, 17 Apr 2012 11:11:54 +0800</pubDate>
      <link>https://ruby-china.org/topics/2652</link>
      <guid>https://ruby-china.org/topics/2652</guid>
    </item>
    <item>
      <title>关于类似网易评论盖楼的数据库设计</title>
      <description>&lt;p&gt;关于类似网易评论盖楼的数据库设计
或者 reddit 那种方式，对评论进行评论
表应该怎么设计？&lt;/p&gt;

&lt;p&gt;我的想法是一次性把某主题下所有的评论全部读取处理，做完处理再显示
但要是评论很多，一次性全部取出来耗资源，大家有没有更优化的设计想法？  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Wed, 11 Apr 2012 18:23:47 +0800</pubDate>
      <link>https://ruby-china.org/topics/2533</link>
      <guid>https://ruby-china.org/topics/2533</guid>
    </item>
    <item>
      <title>关于 Javascript 调试 socket 的疑问</title>
      <description>&lt;p&gt;一般的网页调试用 chrome 自带的调试工具都可以看到数据
但网页中的 flash 用 socket 通信无法看到
可以用 js 来写插件，监听 socket 端口来进行调试么？  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Mon, 19 Mar 2012 11:16:13 +0800</pubDate>
      <link>https://ruby-china.org/topics/1960</link>
      <guid>https://ruby-china.org/topics/1960</guid>
    </item>
    <item>
      <title>一个奇怪的错误 Maybe IRB bug!!</title>
      <description>&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;gt;User.create(:username=&amp;gt;'test',:email=&amp;gt;'xx@xxx.com')
SystemStackError: stack level too deep
    from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/workspace.rb:80
Maybe IRB bug!! 

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;User_Model 没动过，忽然出现这种错误，不知道有人遇到过同样的情况没？  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Mon, 05 Mar 2012 17:26:40 +0800</pubDate>
      <link>https://ruby-china.org/topics/1625</link>
      <guid>https://ruby-china.org/topics/1625</guid>
    </item>
    <item>
      <title>关于 rails 生成静态文件的问题</title>
      <description>&lt;p&gt;我想把数据库中的东西生成静态的文件存储在&lt;strong&gt;&lt;em&gt;指定目录&lt;/em&gt;&lt;/strong&gt;
比如 rss 或 json 格式，用于同步到 CDN 进行访问&lt;/p&gt;

&lt;p&gt;有没有好用的插件，或常用的方法？&lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Tue, 10 Jan 2012 15:41:53 +0800</pubDate>
      <link>https://ruby-china.org/topics/805</link>
      <guid>https://ruby-china.org/topics/805</guid>
    </item>
    <item>
      <title>关于前端页面 js 的编写习惯疑问</title>
      <description>&lt;p&gt;有个页面用到 jquery
页面中有多个地方需要 js 来控制
在每个 div 下面写&lt;/p&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;span class="p"&gt;....&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这样可行么？对页面速度会不会造成影响&lt;/p&gt;

&lt;p&gt;还是把所有的都放在一个 $() 里面？  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Wed, 21 Dec 2011 17:22:00 +0800</pubDate>
      <link>https://ruby-china.org/topics/550</link>
      <guid>https://ruby-china.org/topics/550</guid>
    </item>
    <item>
      <title>关于 db 的疑问</title>
      <description>&lt;p&gt;使用 
&lt;code&gt;rails g migration ***&lt;/code&gt;
会在 db/migrate 下生成一个 rb 文件
再用 
&lt;code&gt;rake db:migrate&lt;/code&gt;
会执行之前修改或创建的表&lt;/p&gt;

&lt;p&gt;1，rails 是怎么判断执行刚才生成的 rb 的，而不是将以前的全部执行
2，可不可以维护一个 migration 文件？每次修改删除之前的表，执行这一个统一的 sql 文件，如同 mysql 的备份文件一样
3，db/schema.rb 是干什么用的？&lt;/p&gt;

&lt;p&gt;关于掌握 Rails 的这种开发思路有没有比较直观的说明书籍或文档可推荐？&lt;/p&gt;

&lt;p&gt;Thx  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Wed, 02 Nov 2011 15:59:44 +0800</pubDate>
      <link>https://ruby-china.org/topics/20</link>
      <guid>https://ruby-china.org/topics/20</guid>
    </item>
    <item>
      <title>关于 yield 的问题</title>
      <description>&lt;p&gt;有这么一段代码&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def initialize(api_key, secret_key, options={})
  @api_key=api_key
  @secret_key=secret_key
  @oauth_request_option = @@default_oauth_request_options.merge(options)
  @oauth_access_option = @@default_oauth_access_options.merge(options)
  yield self if block_given?
  self
end 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;不太明白其中的&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yield self if block_given?
self
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;是什么意思&lt;/p&gt;

&lt;p&gt;我看了  &lt;a href="https://gist.github.com/1152377" rel="nofollow" target="_blank"&gt;https://gist.github.com/1152377&lt;/a&gt; 的例子
但还是不太明白为什么要这么写，或者在什么情况下需要用 yield  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Tue, 01 Nov 2011 15:22:40 +0800</pubDate>
      <link>https://ruby-china.org/topics/16</link>
      <guid>https://ruby-china.org/topics/16</guid>
    </item>
    <item>
      <title>怎么用 bundle 安装 https://github.com 上的库</title>
      <description>&lt;p&gt;比如我找到一个库 &lt;a href="https://github.com/ballantyne/omniauth-douban" rel="nofollow" target="_blank"&gt;https://github.com/ballantyne/omniauth-douban&lt;/a&gt;
想要安装到我的项目中使用，怎么用 bundle 进行安装
下载下来后总提示 require 错误&lt;/p&gt;

&lt;p&gt;另外，这种库安装后，我可以给原理的 class 中添加新的方法么？或者重写  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Tue, 01 Nov 2011 10:07:57 +0800</pubDate>
      <link>https://ruby-china.org/topics/14</link>
      <guid>https://ruby-china.org/topics/14</guid>
    </item>
    <item>
      <title>Ruby 中有 strtotime 这种时间转换函数么？</title>
      <description>&lt;p&gt;将字符串转换为时间戳
比如将 "2011-10-31" 或 "2011-10-30 15:00:22"
转换为时间戳  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Mon, 31 Oct 2011 15:31:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/10</link>
      <guid>https://ruby-china.org/topics/10</guid>
    </item>
    <item>
      <title>关于 rails 调试的问题</title>
      <description>&lt;p&gt;1，在用 gem 安装一些插件之后，比如 devise，怎么查看这些插件的所有方法以及参数？ 
2，有没有办法让 rails 页面输出调试信息，如同 codeigniter 里面一样，输出 sql 执行时间等信息
3，rails 当中在什么地方写一个函数可以全局都能调用？  &lt;/p&gt;</description>
      <author>tony</author>
      <pubDate>Mon, 31 Oct 2011 11:10:32 +0800</pubDate>
      <link>https://ruby-china.org/topics/7</link>
      <guid>https://ruby-china.org/topics/7</guid>
    </item>
  </channel>
</rss>
