263859-361206

263621-313397 subjects 264092-266981

How to operate an existing Excel file?
263859 [alexeyomux@y] <<Programming Ruby 2nd>> teaches me how to create a new Excel file and add
+ 263863 [promos@bu ch] .connect establishes a connection between your ruby and an already
+ 263893 [greg.kujawa@] What the other posters suggested are great tips. Personally I have

[ANN] Seeking qualified, interested maintainer(s)...
263865 [halostatue@g] for PDF::Writer and its ancillary libraries.

File parsing
263867 [matthewlagac] I have a tab delimited file, I have no headers in the file, and one
263868 [olsonas@gm i] Maybe this?
263869 [matthewlagac] It works! Thanks!

Win32ole WMI fetch
263875 [morbusg@tr o] I wonder what am I missing when trying to put together a script to
263878 [gthiesfeld@g] You're using string interpolation, but that's not what's needed in

a problem 'require'ing
263879 [significants] irb(main):001:0> require 'classifier'
+ 263880 [olsonas@gm i] require 'rubygems'
+ 263882 [gthiesfeld@g] Did you require rubygems?
  263883 [significants] I've just noticed that that's probably the problem. but unfortunately,
  263894 [significants] an update: I CAN require 'rubygems' if I start irb from the
  263901 [drbrain@se m] You need to install rubygems for ruby 1.9 as well as 1.8.
  263914 [significants] could I also maybe stick to 1.8 ? I don't know if I really need 1.9
  263922 [drbrain@se m] I have both ruby 1.8.x and ruby 1.9.x installed, but with separate

[ANN] RMagick OS X Installer 1.0.0
263881 [TimHunter@nc] This is the first production release of the RMagick OS X installer
263884 [yudi.xue@gm ] ...

from irb to .rb? and general question
263886 [significants] say I've been mucking about in irb and want to save some of/all
263887 [ben@bl yt in] and writes those lines to the file.

Can't get 'require' to work
263889 [drhowarddrfi] I just started tinkering with Ruby.  From "The Poignant Ruby Programmer"
263906 [m_goldberg@a] require is working fine. What you have is a scoping problem. The
263974 [drhowarddrfi] None of that worked.
263999 [rogerpack200] make sure you change it to $code_words in all instances :)
264004 [drhowarddrfi] Well, there ya' go.  Thanks!

Open link/DL file
263890 [schmode93@ya] I was wondering what the command is for Ruby to DL files, and or open
263899 [rogerpack200] look up open-uri
263904 [schmode93@ya] Well i have tried looking that up on google, and other different key
264054 [schmode93@ya] I'm not sure if I'm totally lost on how to install the gem watir? I
264058 [prime2@gm il] A gem is...
264093 [schmode93@ya] Ah, thanks, thats funny i just found that site before i read you post

[ANN]  August Phoenix Ruby User Group Meeting
263891 [james.britt@] August Phoenix Ruby User Group Meeting

Re: threads and resolving names
263900 [rogerpack200] In-reply-to: 10481
263902 [drbrain@se m] It was fixed ages ago.

[OT] Markaby How to yield to a capture block?
263903 [has.sox@gm i] ...

[ANN] rabal 0.1.0 Released
263913 [jeremy@hi eg] rabal version 0.1.0 has been released.

how to add external modules' dir?
263915 [ruby@re or .] In Perl, there is default module directory, say C:\perl\lib;
263920 [come.news@fr] * Setting the env variable RUBYLIB

Deep Clone of array?
263923 [ronald.fisch] Is there a standard way of doing a deep copy of an object (in
+ 263924 [shortcutter@] copy_of_your_array = Marshal.load(Marshal.dump(your_array))
+ 263957 [wayneeseguin] ...
| 263961 [wayneeseguin] ...
+ 263968 [kbloom@gm il] Marshal.load(Marshsl.dump(array))
| 361206 [heizusan@gm ] I'm curious, has anybody done any benchmarking of this method?
+ 263969 [kbloom@gm il] It's annoying -- the ruby-doc core documentation includes all of the

calculating the difference of to dates
263926 [gissmoh@fi g] I want to calculate the difference (days, hours, minutes)
263931 [konrad@ty er] charset="iso-8859-15"

Collect objects from an array based on one unique parameter
263930 [knirirr@gm i] If one has an array of objects, each containing various values, what
263932 [konrad@ty er] charset="utf-8"

Re: Collect objects from an array based on one unique parame
263933 [knirirr@gm i] Not only those, but the entire objects.
263937 [shortcutter@] Why don't you use #select?
263939 [knirirr@gm i] That is closer, but still not quite it.
+ 263944 [dblack@ru yp] module UniqBy
| 263951 [dblack@ru yp] uniq_by would be more like one per unique name (rather than only
| 263952 [dblack@ru yp] Sorry -- s/Miles/Milo/
| 263953 [knirirr@gm i] No problem - it happens all the time.
+ 263946 [shortcutter@] Your code seems to implement something different from your wording.
  + 263948 [dblack@ru yp] I think you mean selection = things :-)
  | 263950 [shortcutter@] Good catches! Thanks!  /me confesses I did not try - just check for syntax. :-}
  + 263949 [knirirr@gm i] It is my code that gives the correct meaning in this case. Evidently it

SWIG question: how to return an array from C to Ruby ?
263935 [wuttke1@we .] I need to make some C functions available to Ruby. One of them sets an
263998 [konrad@ty er] charset="iso-8859-1"

monitor postgres transactions in realtime
263940 [gianmh@gm il] I would like to monitor postgres transactions in realtime

RCR #14
263945 [transfire@gm] ...

Help with string matching algorythm
263954 [rex14012001@] I would be so gratefull to ANYONE who can help me!
+ 263955 [promos@bu ch] strcmp()
+ 263972 [shortcutter@] There is no general answer to your question.  It depends on what you
| 263996 [adam.shelly@] The problem description made me think of bioinformatics - especially
+ 263979 [dzwell@gm il] That sounds like a fun problem. As someone already said in a reply, the
+ 263981 [phrogz@ma .c] You might want to google for string "correlation" algorithms.
| 263986 [lopx@ga et .] You might try: http://amatch.rubyforge.org/
+ 264524 [o.renaud@la ] You problem is similar to finding the edit distance between two strings.
| 264528 [o.renaud@la ] levenshtein_distance(a, b) / max(a.size, b.size)
+ 264545 [han.holl@gm ] As others already said, it depends on your needs.

[SUMMARY] Numbers Can Be Words (#133)
263958 [james@gr yp ] We all know this problem isn't tough at all.  Myself and several others solved
263960 [james@gr yp ] My apologies for the repeated post.

[SUMMARY] Numbers Can Be Words (#133)
263959 [james@gr yp ] We all know this problem isn't tough at all.  Myself and several others solved

New releases on RubyForge
263963 [tom@in oe he] Just FYI, on RubyForge we're having a bit of a problem with the process

Ruby/mkmf manual on line ???
263964 [yvon.thorava] because i need to do some special things with mkmf i'm looking for a
263967 [yvon.thorava] or a way to do it over my mac because mkmf doesn't appears in the

Net/SMTP Question
263970 [lovell.mcilw] I am trying to get Net/SMTP to send emails to 2 separate arrays of

RubyDBI install fails during make
263975 [thedossone@g] I downloaded Ruby DBI 0.1.1 from Rubyforge.
264022 [drbrain@se m] Those last three lines say it all.
264071 [thedossone@g] Use one of these (--with-sqlite-dir is best) to tell extconf.rb where
264088 [thedossone@g] Actually, why does it require SQLite at all? I specifically want an ODBC

WEBRick: Problem to get the multipart/form-data decoded correctly.
263976 [robert.dober] I have to admit that I feel this is a stupid question, but two days of
+ 263982 [celtic@sa ry] Here's something I found from Google. It may not be definitive, sorry,
| 263987 [robert.dober] That was indeed one of my first hits and it was useful to get the form
+ 264038 [pit.capitain] Bonsoir Robert.
  264067 [robert.dober] I knew it would be simple, but that simple!!!
  264084 [robert.dober] ...

watir
263980 [ja_bowen@ya ] I been teaching myself Ruby for three months now and
+ 263983 [kyleaschmitt] Umm, did you require watir first?
| 263984 [kyleaschmitt] But it helps if you spell correctly...
+ 264027 [lrlebron@gm ] require 'watir'
  + 264030 [kyleaschmitt] Luis,
  | + 264041 [matt_watir@h] When writing portable code, it is extremely helpful to include the full
  | + 264046 [lrlebron@gm ] That's the only real advantage. Of course in a script this short it is
  + 264048 [ja_bowen@ya ] Thanks  I'll check the version I'm running.  That's
    264050 [promos@bu ch] This is kind of a side question...
    264051 [pmr16366@gm ] watir provides a nicer interface than useing ie/ole directly

Bug or bad documentation for Array.insert()
263988 [Tam@ed .u i-] I just came across ruby and noticed a difference between the behavior of
+ 263997 [djberg96@gm ] Nope, the docs show that the second argument is optional. As it stands
| 264255 [Tam@ed .u i-] Thanks, when I read the "obj..." as you say it's clear.
+ 264014 [flori@ni e. ] b = [] # maybe a result from some other method

define_method with default parameters
263989 [oga_emmanuel] how can i use define_method to assign default parameters?
+ 263994 [gthiesfeld@g] On Aug 9, 11:40 am, Emmanuel Oga <oga_emmanuel_...@yahoo.com.ar>
| + 264000 [oga_emmanuel] eval <<-EOMETHDEF
| + 264005 [pubsub@ru yi] Has the addition of block argument defaults to the language been
| | + 264006 [konrad@ty er] charset="iso-8859-1"
| | | 264009 [gthiesfeld@s] ...
| | + 264011 [dblack@ru yp] Yes, quite often :-)
| |   264025 [pubsub@ru yi] That's never stopped Ruby from doing other things on a single line.
| + 264026 [ara.t.howard] i prefer
|   264028 [dblack@ru yp] one, two, = *optional
|   264032 [ara.t.howard] i used to use that, but people 'correct it' to
|   264035 [dblack@ru yp] Or maybe I'm too sanguine :-)
+ 264039 [dan-ml@da 42] Why don't you just use the regular "def"? Am I missing something?
  264043 [dblack@ru yp] In this particular example you could, but the issue of defaults for

come on!!~All kinds of brand shoes ,clothes,belt,..bag..
263990 [zhihang108@h] shoes369,supply all kinds of brand

[ADV] Ruport Book Blog
263995 [gregory.t.br] this is a one time announcement / advertisement for a new blog on the

standard IO directory surf
264007 [globyy3000@h] how would i go about surfing a whole directory instead of using a
+ 264017 [globyy3000@h] oh and i also want to pipe the find.... find -blah -blah | ./program.rb
| 264056 [kbloom@gm il] do it without ruby and just use the shell?
+ 264021 [alex@bl ck e] file_list = Dir.glob('**/*').select{|filename|
+ 264023 [ara.t.howard] cheers.
+ 264069 [shortcutter@] non_directory_count = Integer `find / -not -type d | wc -l`

precision loss with pack/unpack ?
264012 [lparravi@gm ] I'm reading Java class files using ruby and found some problems when
+ 264020 [robert.dober] Hmm I am not sure that this is exactly related but I would rather find
+ 264031 [konrad@ty er] charset="iso-8859-1"
+ 264045 [vunangluc@ya] On 10 Tha ng T?m, 02:06, "Luis Parravicini" <lparr...@gmail.com>

Using the spaceship operator to compare nil?
264015 [dan.croak@na] Hey folks,
264033 [dan.croak@na] assert_ordered_by :last_name, :users, "<="
264034 [gregory.t.br] has_nil, doesnt = collection.partition { |r| r.send(attribute).nil? }
264152 [dan.croak@na] Thanks, Gregory. This is what I ended up with (works well) ~

converting xml to MYSQL that reflects the "tag's embedding"?
264029 [rvoogdgeert@] Dear Ruby guru's,
+ 264076 [AEtzold@gm .] Dear Robert,
+ 264080 [alex@bl ck e] I think what you need is a standard nested set structure, with the
  264157 [rvoogdgeert@] Thanks both Axel and Alex, I try out some of the suggestions.

[ANN] London Ruby User Group - 13th August 2007
264036 [murray.steel] ...

(none)
264037 [luis.ramirez] ...

`rake` fails: Exec format error
264040 [lfast@md i. ] I'm trying to start rake running for a sub-component of our system.
+ 264047 [lfast@md i. ] A more complete version of what I'm doing is...
| 264063 [stefano.croc] %x{rake ...}
+ 264066 [nobu@ru y- a] It depends on what's your platform and how you've installed
  264103 [lfast@md i. ] ruby -e '%x{rake}'  produces the same error message
  264105 [lfast@md i. ] rake - near the top it reads  # This file was generated by RubyGems.
  264137 [nobu@ru y- a] `rake.cmd` would work.
  264147 [lfast@md i. ] Just tried it and yes, `rake.cmd` works.

Net::HTTP works on localhost, but error Errno::ECONNRESET
264044 [tommy_tam@in] Newbie here, on XP with Ruby 1.8.6.25, I am trying to post a request to
+ 264065 [rking@pa op ] Well, good news and bad news. I can't offer to give you one or the
+ 264068 [shortcutter@] The first thing I would make sure is that there are no network issues

RubyGems Problems
264049 [toontownahol] shell output.
+ 264053 [yudi.xue@gm ] ...
+ 264061 [drbrain@se m] For some reason RubyGems' documentation didn't build.  RubyGems will

option parse
264052 [globyy3000@h] is there a better, or different way to pipe arguments to a program
+ 264060 [lutz.horn@fa] But all depends on what is your meaning of "best". On the question of
+ 264632 [ari@ar br wn] Check out the OptionParser gem. I find it to be simpler than
+ 264910 [ara.t.howard] i prefer not to parse options, or at least i've written it one final
  265049 [botp@de mo t] # i prefer not to parse options, or at least i've written it one final

Changing Test::Unit::Assertion messages
264055 [cjs@cy ic ne] In many of my tests, I do something along the lines of
+ 264057 [cjs@cy ic ne] Never mind, this does actually work if I set it in a different place.
+ 264064 [rking@pa op ] Don't forget about the third parameter to the assert messages. It is
  264185 [phlip2005@gm] When inventing a new assertion - maybe an arbitrarily complex one - you

[ANN] Lone Star Rubyconf 2007 - Registration Re-opened
264059 [jim@fr ez .o] Greetings

Rinda: start_keeper bug? Looking for second opinion
264062 [dazuma@gm il] I believe I've found a race condition in Rinda. But it seems a little
264164 [drbrain@se m] I think you are right.  I have CC'd Masatoshi SEKI.

newbie question: how to seek in a file
264070 [macro.peng@g] I want to find a string in a text file, then read some bytes data after
+ 264072 [lutz.horn@fa] File.open("my-file.txt") do |f|
| 264074 [konrad@ty er] charset="utf-8"
+ 264073 [konrad@ty er] charset="utf-8"
  264075 [konrad@ty er] charset="utf-8"
  264079 [macro.peng@g] I don't care about huge file at present and this method works for me.
  + 264081 [alex@bl ck e] I believe you can also do this with RExpect, but I'm on Windows right
  + 264082 [shortcutter@] But be careful because #index returns the starting position of the

Re: converting xml to MYSQL that reflects the "tag's embeddi
264077 [lutz.horn@fa] Should one use a XML parser for this?

stderr stdout redirection with Ruby ???
264078 [yvon.thorava] `man "#{arg}" 2> "#{tmp}/#{fm}" PIPE man2html > "#{tmp}/#{f1}"`
+ 264083 [ronald.fisch] If you want to do it completely within Ruby, you could first slurp the
| + 264090 [yvon.thorava] OK, fine thanks, in fact f1 is never overwritten the way i use it ...
| + 264144 [konrad@ty er] charset="iso-8859-1"
+ 264150 [ara.t.howard] require 'rubygems'
  + 264183 [yvon.thorava] Fine ! thanks a lot !!!
  + 264189 [yvon.thorava] i've tested allready, unfortunately i get a " undefined method spawn
    264192 [logancapaldo] ...

[QUIZ] Cellular Automata (#134)
264089 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 264091 [cdemyanovich] Noticed a typo in the quiz. 1110 is not 30 in binary; 11110 is.
| 264099 [gareth.adams] In addition, you'll be padding the left side, Shirley?
| 264195 [james@gr yp ] Thanks guys.  I've updated the web site description.
+ 264159 [m_goldberg@a] ...
| + 264169 [dangerwillro] are these not fractals?
| | 264177 [alex@bl ck e] Some are, most aren't.  The majority of rules (as far as I remember -
| | 264196 [james@gr yp ] True, but some of the rules are very interesting.
| + 264309 [neoneye@gm i] ...
+ 264266 [doug@ds if r] ...
+ 264267 [SimonKroeger] require 'enumerator'
+ 264273 [ruby-talk@lo] ruby cellular_automaton.rb -r 41 -s 20 -w 30 100100
+ 264306 [justin.ethie] ...
+ 264559 [martin@sn wp] I didn't have much time this weekend, but I had a bit more than
+ 264575 [justin.ethie] ...
threads.html
top