<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>kww</title>
    <link>https://ruby-china.org/kww</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>弱问开机密码与权限密码是否可以分离</title>
      <description>&lt;p&gt;使用 Mac 的 terminal，如果输入 sudo 之类的命令的话，它会让你输入密码。&lt;/p&gt;

&lt;p&gt;请问这个密码可否能够和开机密码不同？如果可以的话，应当如何设置？&lt;/p&gt;

&lt;p&gt;多谢！&lt;/p&gt;</description>
      <author>kww</author>
      <pubDate>Tue, 23 Sep 2014 03:21:03 +0800</pubDate>
      <link>https://ruby-china.org/topics/21673</link>
      <guid>https://ruby-china.org/topics/21673</guid>
    </item>
    <item>
      <title>借宝地一问，哪里有比较活跃的 JavaScript 论坛</title>
      <description>&lt;p&gt;最近在学习 Ext JS，即 Sencha（生茶），总是感觉不得章法。因此想找个中文论坛问问。可是发现都远远没有这里活跃。因此借宝地一问。&lt;/p&gt;</description>
      <author>kww</author>
      <pubDate>Sun, 06 Jul 2014 00:18:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/20337</link>
      <guid>https://ruby-china.org/topics/20337</guid>
    </item>
    <item>
      <title>写了一个快排算法，总是报错：stack level too deep (SystemStackError)</title>
      <description>&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;quick_sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;size&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="nb"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sample&lt;/span&gt;
    &lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;partition&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;elmt&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;elmt&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nb"&gt;p&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;quick_sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;quick_sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;quick_sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我真没看出有何问题。但是却报错：&lt;code&gt;4: stack level too deep (SystemStackError)&lt;/code&gt;
第四行&lt;code&gt;left, right = list.partition{|elmt| elmt &amp;lt;= p}&lt;/code&gt;有何问题？&lt;/p&gt;

&lt;p&gt;多谢！&lt;/p&gt;</description>
      <author>kww</author>
      <pubDate>Thu, 03 Jul 2014 04:22:38 +0800</pubDate>
      <link>https://ruby-china.org/topics/20286</link>
      <guid>https://ruby-china.org/topics/20286</guid>
    </item>
    <item>
      <title>弱问 Sublime Text 2 使用 subl . 的问题</title>
      <description>&lt;p&gt;希望做个设置，使得在 terminal 里面只需要输入 subl . 就能打开文件。&lt;/p&gt;

&lt;p&gt;网上查询的方法是：&lt;code&gt;sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;但是我开始运行 &lt;code&gt;subl .&lt;/code&gt; 的时候依然被告知：&lt;code&gt;-bash: subl: command not found&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;我的是 Mac。&lt;/p&gt;

&lt;p&gt;望达人解答。多谢！&lt;/p&gt;</description>
      <author>kww</author>
      <pubDate>Thu, 26 Jun 2014 10:28:15 +0800</pubDate>
      <link>https://ruby-china.org/topics/20173</link>
      <guid>https://ruby-china.org/topics/20173</guid>
    </item>
    <item>
      <title>弱问 sublime text 如何用快捷键给 ruby 代码注释</title>
      <description>&lt;p&gt;如题。多谢！&lt;/p&gt;</description>
      <author>kww</author>
      <pubDate>Fri, 30 May 2014 03:35:52 +0800</pubDate>
      <link>https://ruby-china.org/topics/19635</link>
      <guid>https://ruby-china.org/topics/19635</guid>
    </item>
    <item>
      <title>弱问如何输入浮点</title>
      <description>&lt;p&gt;只知道输入整数是：gets.chomp.to_i&lt;/p&gt;

&lt;p&gt;那么输入 double 型的应该是什么？试了下 gets.chomp.to_d 被报错了。&lt;/p&gt;

&lt;p&gt;多谢！&lt;/p&gt;

&lt;p&gt;最后，像此类弱问题一般去哪里找答案。我去过 ruby-doc.com，但是难以搜索到。&lt;/p&gt;

&lt;p&gt;再谢！&lt;/p&gt;</description>
      <author>kww</author>
      <pubDate>Thu, 29 May 2014 19:53:33 +0800</pubDate>
      <link>https://ruby-china.org/topics/19630</link>
      <guid>https://ruby-china.org/topics/19630</guid>
    </item>
  </channel>
</rss>
