<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://groups.google.com/group/comp.lang.ruby</id>
  <title type="text">comp.lang.ruby Google Group</title>
  <subtitle type="text">
  The Ruby dynamic OO programming language.
  </subtitle>
  <link href="/group/comp.lang.ruby/feed/atom_v1_0_msgs.xml" rel="self" title="comp.lang.ruby feed"/>
  <updated>2009-11-22T14:55:55Z</updated>
  <generator uri="http://groups.google.com" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>cmic</name>
  <email>c...@live.fr</email>
  </author>
  <updated>2009-11-22T14:55:55Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/0fa3dbb99a99c982/40fc7a5f557c2986?show_docid=40fc7a5f557c2986</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/0fa3dbb99a99c982/40fc7a5f557c2986?show_docid=40fc7a5f557c2986"/>
  <title type="text">newbie question</title>
  <summary type="html" xml:space="preserve">
  Hello &lt;br&gt; I noticed the following example somewhere &lt;br&gt; def mymethod(opts) &lt;br&gt; p opts &lt;br&gt; end &lt;br&gt; mymethod(:aaa =&amp;gt; &amp;quot;something&amp;quot;) &lt;br&gt; I&#39;m wondering what this :aaa stands for. If I omit the &lt;br&gt; colon before the dummy aaa, it doesn&#39;t works. &lt;br&gt; Thanks for any hint/light.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Florian Frank</name>
  <email>fl...@ping.de</email>
  </author>
  <updated>2009-11-22T14:49:46Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/995b00a60a03d178/28fa8bc4dc03ac72?show_docid=28fa8bc4dc03ac72</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/995b00a60a03d178/28fa8bc4dc03ac72?show_docid=28fa8bc4dc03ac72"/>
  <title type="text">Re: really crazy about this (do/while)</title>
  <summary type="html" xml:space="preserve">
  Another possibility is using a small, but &amp;gt;0, epsilon and check if the &lt;br&gt; distance between the number and the limit is less than its value. Ruby &lt;br&gt; does this automatically for you, if you use its #step functions: &lt;br&gt; &amp;gt;&amp;gt; 98.3.step(98.6, 0.1).to_a &lt;br&gt; # =&amp;gt; [98.3, 98.4, 98.5, 98.6] &lt;br&gt; &amp;gt;&amp;gt; 98.4.step(98.6, 0.1).to_a &lt;br&gt; # =&amp;gt; [98.4, 98.5, 98.6]
  </summary>
  </entry>
  <entry>
  <author>
  <name>Robert Klemme</name>
  <email>shortcut...@googlemail.com</email>
  </author>
  <updated>2009-11-22T14:50:50Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/0e4bf01ff258b2e0/1de69df8c24cbfb5?show_docid=1de69df8c24cbfb5</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/0e4bf01ff258b2e0/1de69df8c24cbfb5?show_docid=1de69df8c24cbfb5"/>
  <title type="text">Re: Pseudo array for Rails migration</title>
  <summary type="html" xml:space="preserve">
  What stops you from doing &lt;br&gt; N_X = 20 # size of pseudo array &lt;br&gt; class CreatePeople &amp;lt; ActiveRecord::Migration &lt;br&gt; create_table :people do |t| &lt;br&gt; t.string :first_name , :null =&amp;gt; false &lt;br&gt; . &lt;br&gt; . &lt;br&gt; . &lt;br&gt; N_X.times do |i| &lt;br&gt; t.integer((&amp;quot;x%02d&amp;quot; % i).to_sym) &lt;br&gt; end &lt;br&gt; t.timestamps
  </summary>
  </entry>
  <entry>
  <author>
  <name>Douglas Seifert</name>
  <email>d...@dseifert.net</email>
  </author>
  <updated>2009-11-22T14:42:34Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/995b00a60a03d178/17331366640b03e0?show_docid=17331366640b03e0</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/995b00a60a03d178/17331366640b03e0?show_docid=17331366640b03e0"/>
  <title type="text">Re: really crazy about this (do/while)</title>
  <summary type="html" xml:space="preserve">
  [Note: parts of this message were removed to make it a legal post.] &lt;br&gt; BigDecimal is probably easier to code with, but can kill performance as has &lt;br&gt; been mentioned previously. Recalling the old Fortran days, we always had a &lt;br&gt; constant called EPS we used in these kind of situations. EPS (short for &lt;br&gt; epsilon) was set to a small number, usually 1e-7. Anytime we needed to
  </summary>
  </entry>
  <entry>
  <author>
  <name>Robert Klemme</name>
  <email>shortcut...@googlemail.com</email>
  </author>
  <updated>2009-11-22T14:45:50Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/3948f56cb5d7573f/59b1086dd4571d5b?show_docid=59b1086dd4571d5b</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/3948f56cb5d7573f/59b1086dd4571d5b?show_docid=59b1086dd4571d5b"/>
  <title type="text">Re: How to match and count</title>
  <summary type="html" xml:space="preserve">
  The code above does not close the file handle properly. Also if can be &lt;br&gt; done shorter: &lt;br&gt; File.foreach &amp;quot;file.txt&amp;quot; do |line| &lt;br&gt; ... &lt;br&gt; end &lt;br&gt; You can even use Ruby like awk which seems to be rarely done - but it&#39;s &lt;br&gt; possible. &lt;br&gt; Can be done like &lt;br&gt; ruby -nae &#39;BEGIN {$i=0}; $i+=1 if /something/ =~ $F[3]; END {puts $i}&#39;
  </summary>
  </entry>
  <entry>
  <author>
  <name>Phrogz</name>
  <email>phr...@mac.com</email>
  </author>
  <updated>2009-11-22T14:42:04Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/6c1e2006c4bce337/6c487b4a91897923?show_docid=6c487b4a91897923</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/6c1e2006c4bce337/6c487b4a91897923?show_docid=6c487b4a91897923"/>
  <title type="text">Re: Finding the closest value from a matrix</title>
  <summary type="html" xml:space="preserve">
  Create a one-dimensional array where each entry records the value, row &lt;br&gt; and column number (or row and column headers). &lt;br&gt; Descriptor = Struct.new :row, :col, :value &lt;br&gt; a = [ &lt;br&gt; Descriptor.new(0, 0, 1.183), &lt;br&gt; Descriptor.new(0, 1, 1.118), &lt;br&gt; Descriptor.new(0, 1, 1.006), &lt;br&gt; # ..etc. &lt;br&gt; ] &lt;br&gt; a = a.sort_by{ |desc| desc.value }
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ralph Shnelvar</name>
  <email>ral...@dos32.com</email>
  </author>
  <updated>2009-11-22T14:06:02Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/0e4bf01ff258b2e0/0f14a6c2c5b36fae?show_docid=0f14a6c2c5b36fae</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/0e4bf01ff258b2e0/0f14a6c2c5b36fae?show_docid=0f14a6c2c5b36fae"/>
  <title type="text">Pseudo array for Rails migration</title>
  <summary type="html" xml:space="preserve">
  Consider &lt;br&gt; N_X = 20 # size of pseudo array &lt;br&gt; class CreatePeople &amp;lt; ActiveRecord::Migration &lt;br&gt; create_table :people do |t| &lt;br&gt; t.string :first_name , :null =&amp;gt; false &lt;br&gt; . &lt;br&gt; . &lt;br&gt; . &lt;br&gt; t.integer :x00 &lt;br&gt; t.integer :x01 &lt;br&gt; t.integer :x02 &lt;br&gt; . &lt;br&gt; . &lt;br&gt; . &lt;br&gt; t.integer :x18
  </summary>
  </entry>
  <entry>
  <author>
  <name>Yukihiro Matsumoto</name>
  <email>m...@ruby-lang.org</email>
  </author>
  <updated>2009-11-22T13:44:31Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/86c6570111778d9a/178990d8a3369306?show_docid=178990d8a3369306</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/86c6570111778d9a/178990d8a3369306?show_docid=178990d8a3369306"/>
  <title type="text">Re: COW-friendly Ruby 1.9?</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; In message &amp;quot;Re: COW-friendly Ruby 1.9?&amp;quot; &lt;br&gt; The REE patch made Ruby so slow on some non-Web cases. AuthorNari &lt;br&gt; made the faster patch. But it&#39;s still (much) slower than the original &lt;br&gt; GC for non forking programs. Besides that, the patch had the serious &lt;br&gt; bug which we could not identify for long time. &lt;br&gt; Ko1 is working on improvement on Ruby&#39;s memory management (not GC).
  </summary>
  </entry>
  <entry>
  <author>
  <name>ooshopsky@msn.com</name>
  <email>ooshop...@msn.com</email>
  </author>
  <updated>2009-11-22T13:41:43Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/55906154479204d9/8d19c7f9cf17efe3?show_docid=8d19c7f9cf17efe3</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/55906154479204d9/8d19c7f9cf17efe3?show_docid=8d19c7f9cf17efe3"/>
  <title type="text">cheaper nike shoes g-satr kidrobot hoodies ed hardy star red monkey gino green global true</title>
  <summary type="html" xml:space="preserve">
  Get Nike Shoes at Super Cheap Prices &lt;br&gt; Discount Ed hardy tshirt (&lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://www.withadream.com&quot;&gt;[link]&lt;/a&gt;) &lt;br&gt; Discount Ed hardy jean (&lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://www.withadream.com&quot;&gt;[link]&lt;/a&gt;) &lt;br&gt; Discount Ed hardy shoes (&lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://www.withadream.com&quot;&gt;[link]&lt;/a&gt;) &lt;br&gt; Discount Ed hardy handbag (&lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://www.withadream.com&quot;&gt;[link]&lt;/a&gt;) &lt;br&gt; Discount Ed hardy other porduct (&lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://www.withadream.com&quot;&gt;[link]&lt;/a&gt;) &lt;br&gt; Discount Nike air jordans (&lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://www.withadream.com&quot;&gt;[link]&lt;/a&gt;)
  </summary>
  </entry>
  <entry>
  <author>
  <name>Abigail Headroom</name>
  <email>grap...@walala.org</email>
  </author>
  <updated>2009-11-22T13:40:19Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/c14a52d87d406b49/6498e993f68939d5?show_docid=6498e993f68939d5</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/c14a52d87d406b49/6498e993f68939d5?show_docid=6498e993f68939d5"/>
  <title type="text">OCR of PDF-documents using GData</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; Has anybody been able to perform OCR on a pdf document using GData? &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://googledataapis.blogspot.com/2009/09/import-scans-or-go-multilingual.html&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; Png and jpgs work fine after setting @client.version = &#39;3&#39; in &lt;br&gt; GData::Client::DocList but when I try pdf-files I get: &lt;br&gt; xmlns=&#39;&lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://schemas.google.com/g/2005&#39;&quot;&gt;[link]&lt;/a&gt;&amp;gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>Zhenning Guan</name>
  <email>g.zhen.n...@gmail.com</email>
  </author>
  <updated>2009-11-22T13:20:14Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/ba531ac6f8a475e2/57c218d054b4ab62?show_docid=57c218d054b4ab62</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/ba531ac6f8a475e2/57c218d054b4ab62?show_docid=57c218d054b4ab62"/>
  <title type="text">Re: confuse about initialize hash</title>
  <summary type="html" xml:space="preserve">
  the hash options I saw in atom_feed , but it doesn&#39;t the last argument. &lt;br&gt; ============================== ============================== == &lt;br&gt; def atom_feed(options = {}, &amp;amp;block) &lt;br&gt; 95: if options[:schema_date] &lt;br&gt; 96: options[:schema_date] = &lt;br&gt; options[:schema_date].strftime (&amp;quot;%Y-%m-%d&amp;quot;) if &lt;br&gt; options[:schema_date].respond_ to?(:strftime)
  </summary>
  </entry>
  <entry>
  <author>
  <name>Haoqi Haoqi</name>
  <email>ax...@126.com</email>
  </author>
  <updated>2009-11-22T10:39:54Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/564554dcae348661/fffe817cbc55e9e4?show_docid=fffe817cbc55e9e4</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/564554dcae348661/fffe817cbc55e9e4?show_docid=fffe817cbc55e9e4"/>
  <title type="text">Re: where to find the help document?</title>
  <summary type="html" xml:space="preserve">
  man ri
  </summary>
  </entry>
  <entry>
  <author>
  <name>Robert Klemme</name>
  <email>shortcut...@googlemail.com</email>
  </author>
  <updated>2009-11-22T10:33:06Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/18727048f0c45b93/289c9059026d7432?show_docid=289c9059026d7432</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/18727048f0c45b93/289c9059026d7432?show_docid=289c9059026d7432"/>
  <title type="text">Re: Removing optional white space - doh! - refined</title>
  <summary type="html" xml:space="preserve">
  Because it avoids accidentally doing the substitution of other text &lt;br&gt; which consists of two characters. Even if that text is not supposed to &lt;br&gt; appear in your input, using the explicit form helps documenting what&#39;s &lt;br&gt; intended. And the code is more robust: it will not break if the input &lt;br&gt; changes. &lt;br&gt; Cheers
  </summary>
  </entry>
  <entry>
  <author>
  <name>Robert Klemme</name>
  <email>shortcut...@googlemail.com</email>
  </author>
  <updated>2009-11-22T10:29:25Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/f0796f1481b6af67/15767bd223915ec3?show_docid=15767bd223915ec3</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/f0796f1481b6af67/15767bd223915ec3?show_docid=15767bd223915ec3"/>
  <title type="text">Re: Same name for class and instance method</title>
  <summary type="html" xml:space="preserve">
  Yes. &lt;br&gt; First of all, using the same name for a class and instance method can &lt;br&gt; cause confusion, so it&#39;s probably not a too good idea in the general &lt;br&gt; case. That doesn&#39;t mean that there aren&#39;t valid use cases for this though. &lt;br&gt; The way you seem to be using a block (definition of c is missing in your &lt;br&gt; example) is a bit unusual. Usually you would do
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ruby Newbee</name>
  <email>rubynew...@gmail.com</email>
  </author>
  <updated>2009-11-22T10:06:11Z</updated>
  <id>http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/564554dcae348661/8488dc2ae8ee8e91?show_docid=8488dc2ae8ee8e91</id>
  <link href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/564554dcae348661/8488dc2ae8ee8e91?show_docid=8488dc2ae8ee8e91"/>
  <title type="text">Re: where to find the help document?</title>
  <summary type="html" xml:space="preserve">
  2009/11/22 nas &amp;lt;nasi...@googlemail.com&amp;gt;: &lt;br&gt; Thanks all. &lt;br&gt; So, is there a convenient way to check the usage of a function? &lt;br&gt; like unix&#39;s `man printf` or Perl&#39;s perldoc -f print &lt;br&gt; Regards.
  </summary>
  </entry>
</feed>
