304823-345733 subjects 305229-316188

^ Re: Barby 0.1 - Ruby barcode generator that doesn't suck (that much)
305025 [ramon.cahenz] It's not the only way, but if you're using Ruby FPDF, I've written a
307961 [toredarell g] require 'barby'
323109 [kevin.marsh ] Hate to resurrect an old thread, but I got this to work with Prawn, and it's

^ proc
305032 [sijo maxxion] I am learning Ruby and I got the following code from a book.
305047 [jgabrielygal] proc do
305145 [sijo maxxion] Thanks for giving me very nice explanation..Now I understood.

^ Bug when installing Mongrel on Windows
305033 [justcrystal ] I want to install Mongrel, for install Redmine after, but when the
305057 [luislavena g] -MD

^ Earn Rs.2000 daily. No Investment.
305038 [mourouganbal] Earn Rs.2000 daily. No Investment.

^ regular expression problem
305039 [bad_good_lio] string="something <a a> somethig <a a> something"
305040 [botp delmont] RnJvbTogYmFkX2dvb2RfbGlvbkB5YWhvby5jb20gW21haWx0bzpiYWRfZ29vZF9saW9uQHlhaG9v
305042 [bad_good_lio] thanks

^ launch exe from Ruby
305050 [emanuelef ti] it's my first post here, so I hope I'm in the right place to ask.
305051 [stefano.croc] I don't use Windows, so I can't be sure, but I think I read somewhere you need
305052 [emanuelef ti] Thanks! that worked!

^ Using element's text content as keys from xmlsimple
305056 [srijayanth g] <a>

^ [QUIZ] Circle Drawing (#166)
305058 [matthew.moss] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ 305063 [no spam.plea] What about bonus points for using only *integer* arithmetic and no transcendentals?
+ 305247 [andrea.fazzi] # Solution to Ruby Quiz #166 - Circle Drawing
| 305287 [andrea.fazzi] Oops.. I just realized that I made an error in canvas size calculation..
| 305291 [phillipsds y] Quick solution. Draws filled circles, corrected for non-square pixels. Can =
+ 305294 [jmrepetti gm] # circle.rb
+ 305341 [jgarvin.list] Here's mine before I delved into trying to add the aspect ratio feature.
| 305396 [sandro.pagan] Here's mine
+ 305414 [andrea.fazzi] A bit of ruby art :-)

^ pdf is not a class or module
305059 [neharohan.ch] In our application we have used the pdf writer to give us PDF outputs.

^ Browser/os detect (functions and example without JS)
305061 [alexey goldt] Many people say - How detecting browser and OS without JavaScript?

^ Reset the whole state
305067 [remigillig g] Each of these talk about how to reset the whole Ruby state, like
305075 [shortcutter ] I am wondering what you need that for.  I guess removal is pretty
305153 [remigillig g] It's actually embedding that I'm using right now. I am using Ruby as a

^ looping
305069 [tim.wolak gm] Can someone explain why my code is stopping after looking at the first
305070 [dmerrick ics] Perhaps you didn't mean to call "exit?"
305071 [tim.wolak gm] Even if I take that out it still only reads one file in and skips right
305073 [dmerrick ics] =20
305078 [tim.wolak gm] Thanks Dana,

^ Re: Preferable Pairs (#165)
305080 [micathom gma] Thanks for the script for generating specific types of preferences.
305092 [eric.mahurin] I think to reasonably memoize in this problem and keep the memory low, you

^ A good book for ruby
305081 [manish_leo g] i have just started ruby..and i have no proper study material for it..
+ 305082 [jameskilton ] The "Pickaxe" Book (The Pragmatic Programmers Guide to Ruby), which
| 305086 [manish_leo g] Thanks for suggestion Jason..but what i m lacking is the practice i
| 305088 [rmagick gmai] Check out http://rubyquiz.com/. A selection of the best quizzes is also
| 305089 [mcmohd gmail] Thanks
| 305090 [cdemyanovich] I've heard good things about http://rubylearning.org/class/ .
+ 305085 [saurabh.purn] I would suggest you the good book to start with is the "agile web
+ 305091 [james.britt ] James Britt
+ 305190 [ninja slapha] It has a tutorial built in, which hooks into the interactive prompt.

^ Trie search algorithm
305084 [tekmc hotmai] I'm lost--can't figure out the algorithm to output a trie.

^ ruby 1.8.6 - serialport.so (i386-mswin32)
305087 [hong.sereyvu] Am very new with ruby and use ruby 1.8.6 (i386-mswin32), for my first
305209 [nicholasmabr] On Jun 13, 12:58=A0pm, Sereyvuth Hong <hong.sereyv...@hotmail.com>

^ Fiber exists before require 'fiber'
305093 [rogerpack200] So, in 1.9 it appears that the Fiber class exists before you've required
+ 305095 [dave pragpro] Without the require, you get asymmetric fibers: they're useful as
| + 305105 [avdi avdi.or] Nope, that's not confusing at all! ;-)
| + 305359 [rogerpack200] Thanks that answered it.
+ 305107 [       x y.z] ...

^ compost from the Perl Community
305096 [vjoel path.b] Let's change the subject line, too.
+ 305097 [davividal si] Wouldn't be better leave thread die? JMO...
+ 305115 [martindemell] Is that what they mean by cross-fertiliser?

^ Documenting Networking in Ruby. Any volunteer
305100 [victor.reyes] Team,
+ 305103 [cmdjackryan ] RDoc.
+ 305108 [thehcdreamer] Well, it's not possible to cover all what you are looking for in one book.
+ 305143 [eleanor game] Not yet, although you can piece bits and bobs together from The Ruby
| 305233 [victor.reyes] * Phillip Gawlowski*: I actually have 1rst and 2nd Editions of The Ruby Way.
| 305256 [eleanor game] Probably quite inaccurately as I've pieced together all of my
| 305326 [victor.reyes] Actually, your code works fine, at least for what I needed it for.
+ 305328 [mguterl gmai] You might want to check out the Ruby Cookbook.  While it doesn't cover
  305337 [victor.reyes] Michael,
  308785 [amrkamel gma] @Victor Reyes,

^ raise and rescue
305104 [nicpon nicpo] Is is possible to raise an exception then rescue it and then go back to
+ 305109 [devi.webmast] No.
| 305112 [james.herdma] You _might_ be able to achieve something like that with an in-line rescue
+ 305113 [shortcutter ] There is no way - and for good reason.  An exception is thrown because
| + 305126 [_mwryder wor] So how would you do something that requires user intervention, say in
| | + 305127 [devi.webmast] def foo
| | | 305131 [_mwryder wor] Maybe I am missing the point here but it doesn't appear that it would do
| | | 305140 [nicholasmabr] On Jun 13, 6:25=A0pm, "Michael W. Ryder" <_mwry...@worldnet.att.net>
| | + 305128 [devi.webmast] def foo
| | + 305148 [shortcutter ] That's exactly the case where /retry/ is meant for.  Catch the
| + 305151 [ttmrichter g] This is not a "good reason".  Having used languages with restartable
|   305169 [avdi avdi.or] If you really must do this and you're using 1.8, just throw the
+ 305172 [sylvain.joye] There is no direct way, but you can implement it using continuations

^ validate a select (boolean)
305111 [tahura hotma] I am using
+ 305114 [thehcdreamer] Try to pass to the validator :allow_blank => false
| + 305116 [thehcdreamer] You can also use validates_presence_of, that will chech for the empty field
| | 305120 [tahura hotma] If I use validate_presence_of then it the field is only considered valid
| + 305119 [tahura hotma] I tried that and it did not work.
+ 305121 [tahura hotma] I'm beginning to think it has to do with with the Model field's (i.e

^ Print Numbers Vertically
305117 [cfoley7 gmai] I am trying to figure out how I can print an array of numbers
+ 305118 [cfoley7 gmai] The ouput should have each number in its own column.
+ 305124 [sepp2k googl] a =3D [  1, 24, 546, 1000, 32, 256 ]
  305132 [cfoley7 gmai] Wow, amazing what you can learn from a solution to a simple problem like

^ fire event when the value of a variable is changed
305125 [mehdi.adda g] what is the best way to execute a given method each time the value of a
+ 305142 [fedzor gmail] hej!
| 305144 [avdi avdi.or] Did you actually try this?  And if so, on what version of Ruby?
| 305175 [fedzor gmail] I tried it a while ago... but not *Exactly* that line of code... sorry!
+ 305147 [towb gmx.net] What kind of variable? Global, local, instance? For the latter you could
  305167 [mehdi.adda g] Thanks for the answer ... if fact when it's an instance variable, it's
  305170 [flo andersgr] Even if you change the setter, you won't be able to trace direct

^ Math::erfinv inverse error function
305137 [Bil.Kleb-use] Does anyone know where to find a Ruby /inverse/ error function?^1
305149 [AEtzold gmx.] Dear Bill,
305201 [Bil.Kleb-use] Excellent; thanks.

^ Trouble using ssh gem in OSX; can't load the library.
305138 [antonblaga g] Bare with me here as I am very new to all of this.
305139 [hassan.schro] require 'rubygems'
305141 [antonblaga g] I JUST figured this out before you posted... thanks though!

^ Re: Circle Drawing (#166)
305146 [micathom gma] I'm not sure if this is intentional but the circle is 15 characters
+ 305157 [robert.dober] 2*7 = 15, simple LOL.
+ 305168 [eric.mahurin] ...
  305203 [matthew.moss] It was quite intentional that my circle of radius 7 took up 15 rows of
  305253 [micathom gma] My solution makes circles with r=7 14 characters wide. This may be
  305340 [baldwina gma] Here is my solution.
  305401 [larsch belun] Don't reinvent the wheel (no pun intended :-)

^ Modules, Overloading, and some Confusion
305152 [kodama bluex] Here's something I've been pondering lately and was hoping to get a good
+ 305155 [thehcdreamer] Use namespace.Honda::start
| 305156 [thehcdreamer] My bad, you can't do it the way i've described before.
+ 305158 [davebass mus] The point is that it's the last-included start method that gets run.
+ 305163 [calamitates ] c = Car.new
+ 305164 [shortcutter ] This is a bad idea.  As others have pointed out, the last inclusion
  305171 [kodama bluex] Thank you for your responses. This is more of a philosophical rather
  305182 [shortcutter ] Well, first of all: as has been demonstrated, there *are* in fact ways

^ Binary string packing/unpacking issues
305154 [lucaslevin g] I have a packed string of raw binary pixel data that I want to
+ 305159 [davebass mus] "Pixels".each_byte { |b| printf("%08b\n", b) }
| 305161 [lucaslevin g] That's good for the first problem, thanks.
| 305165 [shortcutter ] irb(main):006:0> s="abc"
| 305214 [lucaslevin g] How can I replace portions of a packed binary string this way?
| 305215 [caduceass gm] Look closely at Robert's irb line number 9.
| 305217 [lucaslevin g] You'll have to bear with me on this, I struggle with this sort of this.
| 305221 [shortcutter ] It's the bitwise OR operator.
| 305225 [lucaslevin g] I don't really know why he uses it though.
| + 305226 [sepp2k googl] Because those numbers are in octal and 0377 == 0xFF
| + 305239 [shortcutter ] irb#1(main):006:0> "\377"
+ 305296 [ara.t.howard] use narray

^ What was YOUR first Ruby Project
305160 [ehegwer mac.] I though it be cool to hear what your first experience with Ruby was.
+ 305162 [dblack rubyp] I think my first non-tiny Ruby program was an implementation of the
| 305166 [ehegwer mac.] You are, sir.  What would be the correct syntax?
| 305173 [dblack rubyp] There never was a Rails 1.6 (though there was a Ruby 1.6.x, for
+ 305176 [btricha gmai] My first adventure with Ruby was with a passive network mapping tool I did
+ 305211 [dido.sevilla] SW4gMjAwMSBJIHdhcyB1c2luZyBSdWJ5IDEuNiBmb3Igb2RkIGpvYnMgdG8gc3RhcnQgcmVwbGFj
+ 305212 [m.fellinger ] My first encounter with ruby was on a sailing boat cruise along the
+ 305213 [ara.t.howard] i can't imagine having done it in perl ;-)
| 308276 [khaines enig] I'm late to the party, but I thought I'd answer this one.
+ 305234 [peter rubyra] My first longer-than-5-lines of code was scRUBYt! - probably the most
| 305250 [shevegen lin] I actually can not remember which was my first real ruby script.
+ 305329 [williams.jay] My first Ruby project was at work. I was given the responsibility of
+ 305343 [lloyd 2live4] I have written many snippets and fell in love with the language but I
| 305548 [nefigah gmai] Depends on what you write programs for! I started with Rails, and
+ 305351 [fred lacave.] A bit of both, actually.  I came into contact with the language through
| 305386 [d_rems yahoo] Mine was writing schedule calendar for BackupExec backup software. I am
+ 305405 [leslieviljoe] My first Ruby was a Rails project to show system status, similar to Webmin.
+ 305407 [hutch-lists ] My first project in Ruby was in 2002 and involved writing an XML pull
| 305420 [davebass mus] Translating an existing Java program of mine into Ruby. The Ruby version
+ 305430 [kyleaschmitt] My first ruby project was my first experience with it.
+ 305498 [cowkiller123] I've been learning programming these last 2 years, mostly C and C#, and
+ 305510 [bad_good_lio] i was started ruby at JUN-2007 as a ROR Project
+ 305551 [ragunathan.p] I remember it was when google started open source hosting (google code).
+ 305847 [jeremy hineg] Back in 2002/3 I was working on WebSphere based projects and I since I had been
+ 308277 [bob arkfrien] My first project was a database engine project for a graduate course in
+ 308286 [tim.pease gm] project. They laughed at me, but three people are using it now (two if

305174 [moneymakecas] ...

^ [sqlite3] ResultSet#to_a is not idempotent
305177 [vjoel path.b] I asked this on the rubyforge sqlite list, but it's very quiet there, so

^ Knowing which subclass called a superclass class method
305178 [rboell tupar] If I have class A and class B, and they both inherit from S.
305179 [sepp2k googl] self will be A or B.
+ 305180 [rboell tupar] thanks for the quick reply Sebastian.
| 305183 [rboell tupar] class S
| 305186 [dblack rubyp] Do you mean self.name, in both cases?
| 305198 [rboell tupar] This time I really made the class ;-)
+ 305181 [shortcutter ] No, self.name will be "A" or "B" - self.class.name is "Class".

^ sqlite 3 error
305184 [manish_leo g] I typed the following in my browser http://localhost:3000/My_test
305193 [mutati0n.313] ...

^ [ANN] Ruby-DTrace 0.2.5 released, with USDT probe support
305185 [chris nodnol] Ruby-DTrace version 0.2.5 has been released!

^ what is the error in this program
305187 [manish_leo g] class Customer
305188 [sepp2k googl] You set index to 0 at every iteration of the loop.
305200 [rick.denatal] Yes, but beyond that here's a critique of this code in the way of a

^ Definning "to_s" in a class -  inexpected result
305191 [ansuga gmail] I'm trying to obtain the cards of a Deck in a string like
+ 305192 [sepp2k googl] to_s needs to return a string otherwise puts will not use it. Your to_s=20
| 305196 [robert.dober] You dealt nice with this Sebastian ;)
+ 305194 [stefano.croc] There are two problems with your code. The first is the use of print in the=
  305199 [ansuga gmail] Thanks for the replies!

^ SOAP::SOAPBase64 (byte array) to Image (JPG/GIF)
305197 [soncara yaho] Attempting to convert and expand on an old Java project.  It pulls from

^ Inverted text in Ruby Tk canvas postscript
305204 [lcl tarazed.] A new problem with ruby-tk, specific to ruby1.8.7.  The underlying tk

^ alias throwing exception: undefined method `send_mail' for class `HeartBeat' (NameError)
305206 [tristin.colb] I'm having a problem with the code below.  when I try and alias the
305210 [mikael hoilu] The method isn't defined in the class until now. Move the alias lines

^ InstantRails Error on Vista
305207 [titus barik.] All,
305208 [titus barik.] Problem solved. Something in InstantRails is broken. If I uncheck

^ Ruby Q's
305216 [philcooperki] introduction to ruby. I've found my self using ruby more and more and
+ 305218 [sepp2k googl] Nothing.
+ 305219 [micathom gma] Nothing. It's a namespace thing.
| 305223 [philcooperki] Thanks guys.
| 305266 [nefigah gmai] Yes.
| 319229 [levipr gmail] In regards to this post, a more relevant example of an instance variable
| 319251 [TimHunter nc] Two approaches come to mind. The first is make the Game Object
+ 305220 [stefano.croc] Nothing special. As always, it's used to access a constant defined in another
  305222 [stefano.croc] Sorry, I misread the documentation. You can indeed undefine an instance

^ Fiber variables
305224 [m.fellinger ] I've been doing some playing with Fibers as a replacement of Thread
+ 305315 [robert.dober] I did not feel qualified to reply, but obviously nobody does :(. Well
| 305324 [m.fellinger ] ...
+ 305358 [rogerpack200] I ended up wrapping evented mongrel calls with a Fiber and it seemed to

^ why can't an instance instantiated within a class method access a protected instance method?
305227 [greg.hauptma] Why can't an instance instantiated within a class method access a protected
305228 [greg.hauptma] (complete email)Hi,
305236 [flo andersgr] Because calling a Method with an explicit receiver is like "calling
305240 [dblack rubyp] It's not quite that. Protected methods can be called with an explicit
305242 [greg.hauptma] (a) what do you mean by "explicit" - just to understand
305243 [shortcutter ] Guess so.
305245 [greg.hauptma] Thanks Robert - do you understand why Ruby allows the "send :x" method to
+ 305248 [dblack rubyp] Private and protected are really only advisory, since you can in fact
+ 305316 [jinx jinxdes] Should people use send() to get around protected method visibility? No.