<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>xiongxin8802 (小熊)</title>
    <link>https://ruby-china.org/xiongxin8802</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>求一个计算发布帖子距离现在有多长时间 javascript 插件</title>
      <description>&lt;p&gt;求一个计算发布帖子距离现在有多长时间 javascript 插件&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Wed, 19 Nov 2014 16:04:39 +0800</pubDate>
      <link>https://ruby-china.org/topics/22762</link>
      <guid>https://ruby-china.org/topics/22762</guid>
    </item>
    <item>
      <title>不知道 Elixir 用哪个 web 框架好，找到了一份 Elixir 的中文文档</title>
      <description>&lt;p&gt;不知道 Elixir 用哪个 web 框架好，中文文档地址：&lt;a href="https://github.com/elixir-lang-china/elixir_guide_cn" rel="nofollow" target="_blank"&gt;https://github.com/elixir-lang-china/elixir_guide_cn&lt;/a&gt;&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Wed, 17 Sep 2014 11:34:35 +0800</pubDate>
      <link>https://ruby-china.org/topics/21570</link>
      <guid>https://ruby-china.org/topics/21570</guid>
    </item>
    <item>
      <title> Regularjs : 用于构建数据驱动型组件的 下一代模板引擎</title>
      <description>&lt;p&gt;Regularjs : 用于构建数据驱动型组件的 下一代模板引擎，&lt;a href="http://t.cn/RPLbj3F" rel="nofollow" target="_blank"&gt;http://t.cn/RPLbj3F&lt;/a&gt; regularjs 集合了 string-based 的 parser 和 dom-based compiler 帮助你在保留同类字符串模板 (如 ejs 等) 的灵活性的同时获得数据绑定等 dom-based 模板 (如 angular) 的功能，中文指南地址 &lt;a href="http://t.cn/RPmvr9G" rel="nofollow" target="_blank"&gt;http://t.cn/RPmvr9G&lt;/a&gt;&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Thu, 04 Sep 2014 09:24:28 +0800</pubDate>
      <link>https://ruby-china.org/topics/21378</link>
      <guid>https://ruby-china.org/topics/21378</guid>
    </item>
    <item>
      <title>大概学习多久可以自己写 gem</title>
      <description>&lt;p&gt;学习有一段时间了，今天尝试看看 gem 的源码，但是感觉好复杂，新手如何去学习 gem 的源码？我感觉如果能慢慢看懂 gem 的话，对于自己的技术水平应该会有很大的提升。所以请教各位大侠是如何去学习 gem 的。&lt;/p&gt;

&lt;p&gt;找到了一个比较新的关于创建 gem 的文章：
&lt;a href="http://www.smashingmagazine.com/2014/04/08/how-to-build-a-ruby-gem-with-bundler-test-driven-development-travis-ci-and-coveralls-oh-my/" rel="nofollow" target="_blank"&gt;http://www.smashingmagazine.com/2014/04/08/how-to-build-a-ruby-gem-with-bundler-test-driven-development-travis-ci-and-coveralls-oh-my/&lt;/a&gt;&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Wed, 04 Jun 2014 10:36:55 +0800</pubDate>
      <link>https://ruby-china.org/topics/19724</link>
      <guid>https://ruby-china.org/topics/19724</guid>
    </item>
    <item>
      <title>国内有 rubydoc 的镜像吗？</title>
      <description>&lt;p&gt;国内有 rubydoc 的镜像吗？这里访问好慢&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Tue, 03 Jun 2014 16:06:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/19703</link>
      <guid>https://ruby-china.org/topics/19703</guid>
    </item>
    <item>
      <title>html 编辑器中的图片上传功能很难实现吗？</title>
      <description>&lt;p&gt;html 编辑器中的图片上传功能很难实现吗？感觉使用 ckeditor 配置起来好麻烦，体积又大，有没有小巧一点的呢？&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Sun, 01 Jun 2014 17:08:25 +0800</pubDate>
      <link>https://ruby-china.org/topics/19669</link>
      <guid>https://ruby-china.org/topics/19669</guid>
    </item>
    <item>
      <title>问一个关于 ajax 的问题</title>
      <description>&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;workers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;张三&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; 
                        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;李四&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; 
                        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;王五&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}]};&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;打开这个页面的时候，我就需要从数据库提取信息并且转换成 json 格式，传递给 js 渲染页面。&lt;/p&gt;

&lt;p&gt;我是一个新手，之前看到的 ajax 请求都是通过点击事件来获取的，但是我需要页面一开始加载就获取数据，控制器该怎么写呢？是否是写一个如下面的单独的控制器&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="ss"&gt;json: &lt;/span&gt;&lt;span class="vi"&gt;@username&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;但是如果我还需要&lt;code&gt;@articles&lt;/code&gt;呢，还有很多其他的数据呢？这个控制器该怎么写？&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Tue, 27 May 2014 10:21:36 +0800</pubDate>
      <link>https://ruby-china.org/topics/19556</link>
      <guid>https://ruby-china.org/topics/19556</guid>
    </item>
    <item>
      <title>关于 KISSY 的一个问题</title>
      <description>&lt;p&gt;&lt;code&gt;S.all("#playlist li")&lt;/code&gt;是所有项的集合，当前有一个触发事件的元素&lt;code&gt;S.one(ev.target)&lt;/code&gt;，我怎么能获取到该触发事件的元素在集合的索引位置呢？&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Sat, 24 May 2014 17:29:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/19513</link>
      <guid>https://ruby-china.org/topics/19513</guid>
    </item>
    <item>
      <title>可不可以将循环写在&lt;script&gt;&lt;/script&gt;之间</title>
      <description>&lt;p&gt;比如下面这样子的写法&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sx"&gt;% articles.ecah &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;article&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="sx"&gt;%&amp;gt;
var articles = [{
  'id' = article.id,
  'body' = article.body
}]
&amp;lt;% end %&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Wed, 21 May 2014 16:55:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/19450</link>
      <guid>https://ruby-china.org/topics/19450</guid>
    </item>
    <item>
      <title>用户注册发送的邮件，用 google 邮箱可以吗？</title>
      <description>&lt;p&gt;不知道大家用的是什么邮件服务。。&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Mon, 19 May 2014 15:28:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/19381</link>
      <guid>https://ruby-china.org/topics/19381</guid>
    </item>
    <item>
      <title>求一个 @ 用户名 的正则表达式，写了半天也写不出来？</title>
      <description>&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/\s?@\S+\s?/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"回复 @奥巴马 @奥巴马  @是的 @韩国 更何况就空间了"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我想把所有@和后面的字符都匹配出来&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Sat, 17 May 2014 16:13:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/19326</link>
      <guid>https://ruby-china.org/topics/19326</guid>
    </item>
    <item>
      <title>初学 rails 到底学习哪个版本好，网上资源最多的是 3.2 的，官方最新的是 4.1 的？</title>
      <description>&lt;p&gt;初学 rails 到底学习哪个版本好，网上资源最多的是 3.2 的，官方最新的是 4.1 的？&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Sun, 04 May 2014 10:21:22 +0800</pubDate>
      <link>https://ruby-china.org/topics/18991</link>
      <guid>https://ruby-china.org/topics/18991</guid>
    </item>
    <item>
      <title>如何在 html.erb 文件中写 coffeescript 呢？</title>
      <description>&lt;p&gt;如何在 html.erb 文件中写 coffeescript 呢？&lt;/p&gt;</description>
      <author>xiongxin8802</author>
      <pubDate>Fri, 02 May 2014 10:04:44 +0800</pubDate>
      <link>https://ruby-china.org/topics/18963</link>
      <guid>https://ruby-china.org/topics/18963</guid>
    </item>
  </channel>
</rss>
