300767-305330

300569-301509 subjects 300930-318954

^ Reading from file, create a class with variables
300767 [aardtwig msn] title     :Person
+ 300876 [kackihamas h] Im also curious about how this could be solved...
| 300946 [dan danfinni] I think that the Doodle Rubygem might be a good fit for this purpose, unless
| 301037 [sean.ohalpin] Indeed it is - see the code below. This requires the latest version
| 301039 [sean.ohalpin] It's not evident in the example I gave in my last post that Doodle
+ 300948 [jgabrielygal] This is my first try at solving this problem. It might not be very good,
+ 301044 [ara.t.howard] i'd do something like
  301385 [sean.ohalpin] Always a pleasure reading your code. One question: why are you
  301387 [ara.t.howard] class Specd
  301407 [sean.ohalpin] D'oh! Overlooked the obvious.
  301422 [ara.t.howard] heh

^ Unable to handle a browser window
300769 [pranjal.jain] In one web site  when i  am clicking on the page,  a new browser window

^ Hot to call to any parent class method?
300770 [ibc aliax.ne] SGksIEkndmUgbW9kaWZpZWQgImRlbGV0ZSIgY2xhc3MgaW4gTXlBcnJheSBjbGFzcyBidXQgaW4g
300779 [sandro.pagan] I've found this way...

^ I know this code is not very 'ruby'
300771 [ads theboohe] there would be a much better way to code this function. In particular, I
+ 300773 [sandro.pagan] Compressed version :D
+ 300774 [eleanor game] def discount(discount_category)
| 300802 [shortcutter ] I guess this should read
| + 300807 [cmdjackryan ] I don't like this.
| | 300810 [cmdjackryan ] Well, not even that bit of due diligence. *sighs*
| + 300809 [eleanor game] That's what happens when I write code before my second cup of tea of
+ 300800 [caduceass gm] You already have a hash structure...

^ Conversion mask in hex to bit mask
300776 [m.tyman inte] I have 0xffff0000   ->  it can be represent by 255.255.0.0 or by string
+ 300803 [caduceass gm] irb(main):001:0> 0xffff0000.to_s(2) =~ /0*$/
+ 300814 [shortcutter ] Not sure what exactly you mean by this.  Do you want to count 1's?
  300823 [caduceass gm] I think Marcin wants to eventually convert/print out to shorthand the
  300829 [shortcutter ] Sounds reasonable.  Marcin?

^ installation update newbie question
300778 [ ma rwdi.com] I am installing a the win32-api gem and it gives an option of 4
300781 [jazzezravi g] difference between ruby vs x86-mswin32-60

^ Rule engine creation????
300782 [varun.rajesh] I wanna make one dynamic rule engine for that suppose i create one
300783 [jeremymcanal] Check out a project named Ruleby.  It can help you with this.

^ Yet another question about extending ruby with C
300784 [btrichardson] I'm still working on figuring how how to extend ruby with C libraries.
300847 [albertschlef] "works perfectly"? I don't see how it can print "Bryan", for two
300849 [btricha gmai] Thanks for responding. Sorry for not making things clear and easy to

^ Script not working
300785 [pranjal.jain] I am having a script which is not working when I am writing it inside a
300955 [u.alberton g] When you define a method, it's not automatically executed by Ruby. So,

^ Ruby Hoedown 2008 - August 8-9, Huntsville, AL - Keynotes, Registration, and CFP OPEN!
300788 [jeremymcanal] The Ruby Hoedown, the southeastern regional Ruby conference, is
305330 [robertonrail] If anyone on the list is going to be attending the Hoedown let me know

^ trying to create an array with AA-ZZ for dutch postal codes
300790 [bookie988 gm] the array postcodes should be filled with strings starting looking
+ 300792 [list.push gm] ("AA".."ZZ").each {|x| p x}
+ 300793 [farrel.lifso] postcodes = "AA".."ZZ".to_a
+ 300794 [peter semant] postcodes = Array.new
  300795 [bookie988 gm] thanx
  300796 [sandro.pagan] ((a = ('A'..'Z').to_a) * (b=a.length)).zip(a.collect{|e|

^ Re: trying to create an array with AA-ZZ for dutch postal co
300791 [jrb562 drexe] ("AA".."ZZ").to_a

^ Performing a postback using Ruby
300797 [wjenkins bca] I am trying to automate a page that is written in .Net and uses
300798 [AEtzold gmx.] you can use AutoIt
300890 [wjenkins bca] I'd rather keep it all within Ruby if possible.  It's not the IE window

^ cgi.header redirect
300806 [fbogdanovic ] I tried to redirect a html page to itself to avoid browser's question about
+ 301396 [dev-null pma] The browser is doing the right thing.  It doesn't matter that the
| 301448 [hurikhan77 g] According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
+ 301450 [albertschlef] You need both a '302' line and a 'Location' header. (btw, according to

^ yaml load error (when using cgi)
300808 [unbewusst.se] i've a cgi wanted to make use of yaml and i get this error reported by
301397 [dev-null pma] Can you load the yaml file from outside your CGI script?  Are both the
301410 [unbewusst.se] Nope...
301413 [dev-null pma] I think the core issue is that your YAML file is malformed.  How did
301443 [unbewusst.se] File.open( history_file, "w" ) {|f| f.write( history.to_yaml ) }

^ Enter text into web save as box or authentication popup
300811 [nigel uprich] I have a web page that pops up a Authentication box and also a save as

^ Expect.pm like module in ruby
300816 [praveen pers] <http://search.cpan.org/%7Ergiersig/Expect-1.21/Expect.pod>
300819 [ryand-ruby z] % ruby -ve 'p require("expect")'

^ display the cover page of a pdf document in jpg or png
300821 [yves_dufour ] I would like to display in my app the image of the cover page af an
300837 [TimHunter nc] RMagick can convert a PDF to either PNG or JPG. If you just want the
300923 [yves_dufour ] Thanks a lot ! that's exactly what I want to do...

^ ANN: Mack 0.5.0 Released
300832 [markykang-ru] Mack 0.5.0 has been released today with the much debated ORM support

^ Where to put code for extending a class?
300834 [manuel.meure] I want to extend the String class with a capitalize_each_word method
300839 [robert.dober] I would clearly monkeypatch String itself.
300859 [manuel.meure] Robert, could you explain a bit more what you mean?
300864 [cmdjackryan ] !: Why is top posting bad?
+ 300868 [manuel.meure] Hehe, this took me a second to understand, but I got your clue.
| 300871 [d_rems yahoo] Anywhere in your program flow.
| 300889 [s.korteling ] Well, anywhere before you actually use the new method.
+ 300893 [dblack rubyp] Not by everyone :-) I know I'm in the minority, but I'll put in a word
  + 300928 [cmdjackryan ] Ruby and monkepatching produces results on Google. :P
  + 300970 [james.britt ] I'm with David.
    301025 [robert.dober] I understand David's POV as well as Philip's, I would have said MP as

^ get method in Array subclass: where's it defined?
300835 [RichardDummy] Daniel Finnie in another tread help me define a Matrix of essentially
300836 [TimHunter nc] There is no get method in Array. The get method comes from your original
300851 [RichardDummy] Thank you very much for your response.
+ 300852 [phrogz mac.c] On May 6, 8:51=A0pm, RichardOnRails
| 300932 [RichardDummy] Thank you for responding.
+ 300872 [albertschlef] Your code "works with no definition of get anywhere" because it doesn't
  300957 [RichardDummy] As you obviously recognized that I was totally out at sea on this
  + 300979 [dan danfinni] * is the splat operator.  It means that all of the arguments to the method
  + 300983 [albertschlef] Daniel Finnie was faster than me ;-) but I'll my answer nevertheless; it
  + 301109 [RichardDummy] On May 7, 12:41 pm, RichardOnRails

^ SocketError: getaddrinfo: nodename nor servname provided, or
300838 [baq ning.com] I'm on Mac OS X, Leopard, check out my ruby version/gem env below.

^ Re: SocketError: getaddrinfo: nodename nor servname provided
300843 [me michaelbo] Can we pleas see the code that is causing this error?
300844 [baq ning.com] require 'net/http'
300845 [me michaelbo] require 'net/http'
300846 [baq ning.com] Great, that did it!

^ [ANN] quartermaster 1.0.0 Released
300848 [dave.myron c] A collection of shortcuts and helpers for leveraging a request's env

^ Ruby in HTML
300850 [loadeddesign] I've been googling this, but with no concrete answers... Ruby 186-26 is
+ 300853 [tim.pease gm] Might you be looking for something like Webby?
+ 300863 [cmdjackryan ] Rails and Merb are probably the easiest way to get started.
+ 301042 [jeremy hineg] Do you mean use ruby to serve the local html files to your browser?  This can be

^ Date Parsing
300854 [clement.ow a] I have a script which I need to create a new Time or Date object to
300861 [bbxx789_05ss] strptime() is essentially undocumented, so I can't help you there.  But
300865 [clement.ow a] However, I have 2 formats, one yyyymmdd and the other just ddmmyyyy(w/o
300867 [clement.ow a] or is there any way that we can convert something like ddmmyyyy to
+ 300874 [phasis gmail] [sidns@ns ~]$ irb
| 300877 [bbxx789_05ss] $ irb
| + 300883 [phasis gmail] Ruby 1.8.4 fails but Ruby 1.8.6 works.
| + 300884 [clement.ow a] Date.strptime('20081020',"%Y%m%d")
|   300888 [clement.ow a] and im running ruby 1.8.5.. could it be why this has a prob? Like a bug
|   + 300894 [phasis gmail] I guess you missed
|   + 300992 [bbxx789_05ss] It appears that Date.parse() and Date.strptime() are/were broken, and
|     302651 [khaines enig] require 'date'
+ 300875 [bbxx789_05ss] Any string can be parsed using one of the examples I posted.

^ Plain english to condition??
300855 [varun.rajesh] 1. Use will type plain English in text box like designation equals PM or
300943 [dan danfinni] Why not have one input box on the right and one on the left with an equals

^ flexmock not working in cygwin
300858 [pood.forums ] require 'flexmock/test_unit'
301010 [gthiesfeld g] Did you
301011 [pood.forums ] lol, totally forgot! thanks!

^ Create a new file name by appending timestamp to original
300869 [sunny_bogawa] i want a new file name from existing file name but with attaching time
300878 [shortcutter ] If you do not tell us what you did and what error you saw we cannot

^ Where to start if I want to print to
300870 [d_rems yahoo] 1. Linux (CUPS) printers
+ 300873 [cmdjackryan ] 1.) The CUPS API documentation
| 300887 [d_rems yahoo] Seriously. I thought this would be simplier.
| 300895 [cmdjackryan ] Beats me. My mind-reading powers are in the shop for maintenance at the
| 300897 [d_rems yahoo] So why do you answer if you are on maintenence.
+ 300901 [aff28 delete] You could look into the cross-platform GUI toolkits, for example wxRuby,

^ How to use to_yaml_style?
300879 [sgwong513 ho] def a.to_yaml_style

^ Cisco Wants You Back!
300880 [kill-test ho] As a networking professional whose certification has lapsed, you are

^ Re: Create a new file name by appending timestamp to origina
300881 [sunny_bogawa] i want  attaches a timestamps to file for this i doing Time.now_filename
+ 300886 [botp delmont] RnJvbTogU3VubnkgQm9nYXdhdCBbbWFpbHRvOnN1bm55X2JvZ2F3YXRAbmVvdmFzb2x1dGlvbnMu
+ 301159 [shortcutter ] Not sure what you are really doing, I get

^ timestamp
300882 [sunny_bogawa] i want  attaches a timestamps to file for this i doing Time.now_filename
300892 [AEtzold gmx.] Dear Sunny,

^ [ANN] London Ruby User Group - 12th May 2008
300885 [murray.steel] The next meeting of the London Ruby Users Group is on Monday the 12th of

^ sax parsing
300891 [shweta_kadam] Has anybody used sax parsing in ruby
300896 [shortcutter ] Yes.
300898 [shweta_kadam] I'm using sax parsing in my code but confused about how to add
300965 [robert.dober] # There are more ways, but I like most to use blocks

^ Interesting result of a newbie mistake
300899 [vmgoldberg v] Instead of writing
+ 300902 [shortcutter ] irb(main):001:0> a = %{ ant cat dog }
| 300905 [kranthicu gm] When you have somthing like
+ 300906 [ttmrichter g] irb(main):001:0> a =3D %{ ant cat dog }
  300926 [maestroiut-r] =0A=0A----- Original Message ----=0A> From: VICTOR GOLDBERG <vmgoldberg@ver=
  300931 [vmgoldberg v] Thank you all that responded.

^ Posting Culture
300900 [shortcutter ] All,
+ 300910 [rick.denatal] Now why didn't <strong>I</strong> think of doing that? It would have
+ 300911 [hramrach cen] I usually try to look up some docs (which are quite hard to search,
| 300922 [ttmrichter g] It doesn't help that ri is prone to random breakage and that you can't
+ 300917 [eeklund gmai] My impression is that this comes and goes a bit; occasionally, people
+ 300942 [synfinatic g] It's not just a Ruby issue.  I see it in a variety of other forums and
| 300947 [albertschlef] I second that.
+ 300963 [globyy3000 h] Well forums have been an ultimate resource for the under-educated. They
| 301051 [shortcutter ] I am not sure about that: if people do not bother to do their work
+ 301052 [robert.dober] good to post this because I was kind of surprised of some of your
| + 301064 [shortcutter ] actually several reasons for it: lack of time (i.e. increased work
| | 301067 [robert.dober] I however stumbled on one post which was a perfect proof of your
| + 301068 [ttmrichter g] Actually the only real tendency I've seen in posting culture in the
| | 301070 [cmdjackryan ] It is difficult to help somebody who posts something like
| | 301074 [shevegen lin] Do you want to get paid for help?
| | 301082 [cmdjackryan ] Ideally, yes. :)
| | 301085 [robert.dober] I would like to add some general ideas I have about this.
| | 301097 [rmagick gmai] People who know me personally know that it is my nature to act like a
| + 301405 [mo_mail ongh] I see this as a sign that Ruby is picking up and gaining traction in
|   301416 [shortcutter ] the few 100 kilometers between us are negligible. :)
|   301417 [hein_dauven ] To be honest I'm a Delphi programmer :P but I needed to use Ruby for an
+ 301409 [hein_dauven ] Hmm... I usually ask myself that question too ( I do programming but

^ idiom for Hash like map...
300903 [raasdnil gma] class Fruit
+ 300907 [dblack rubyp] hash = Hash[*array.map {|e| [e.name, e.price] }.flatten ]
+ 300908 [Rob AgileCon] If your general question is something like, "How can I take an array
+ 300936 [ara.t.howard] class Fruit
  301040 [raasdnil gma] Hmm.. put the responsibility back into the class.  I guess that
  301136 [shortcutter ] But this approach has the drawback to create a lot of temporary

^ Code for connecting to SQL Server?
300904 [anukul.singh] I want to connect to my SQL Server DB through ruby code.
+ 300909 [kranthicu gm] Hey,
| + 300912 [anukul.singh] Thanks for the info.
| | 300915 [cmdjackryan ] You could use ActiveRecord. It is seperate from Rails, too.
| + 300913 [jazzezravi g] Try this. I am working windows here.
|   300914 [kranthicu gm] it a lil
|   300916 [cmdjackryan ] modifing
+ 301016 [lrlebron gma] require 'dbi'

^ changing hash key
300918 [tim.wolak gm] I am working with a script to record accounts and their balances.  I
+ 300924 [sandro.pagan] This is not working because you're using a string called '@acctnum'
| 300961 [tim.wolak gm] I've created the hash and can store all keys and values however I'm
| 301058 [robert.dober] Given the limited amount of information I have I would guess that you
+ 301066 [d_rems yahoo] sktylist = Hash.new
  301130 [sepp2k googl] sktylist =3D Hash.new(0)

^ Word for monkeypatching
300919 [marick visib] I got tired of that, so I
+ 300920 [fred lacave.] Reopen(ed) ?
+ 300921 [james graypr] Open classes or redefined?
| 300927 [dblack rubyp] Yes, or: I added a [] method to NSNotification.
+ 300929 [cmdjackryan ] While I'm not David, nor do I play him (or any David) on TV, here's my
| + 300933 [mike stok.ca] I am a little confused, and maybe my understanding of Ruby classes is
| | + 300934 [shevegen lin] Personally I think it would be nice is if all extensions of standard
| | + 300935 [cmdjackryan ] The intention is to make clear that the functionality was added after
| |   300937 [kyleaschmitt] Perhaps if you don't like the term monkeypatching, you'd prefer ninjapatching.
| |   300962 [avdi avdi.or] Hey now, let's not start diluting the Ninja Patching(TM) brand.
| + 300969 [james.britt ] It's a useful distinction.
|   300971 [cmdjackryan ] Most of the time, I use 'reopen' when talking about this sort of issue.
+ 300950 [why ruby-lan] To their credit, monkeys are rather playful.  And they do use their
+ 300954 [robert.dober] Well David at first I wanted to disagree with you, because it is just
  300991 [dblack rubyp] I don't dislike the word monkey (and of course none of this has to do
  301022 [robert.dober] I see some ignorance of subtle semantics from part of a non native
  301024 [dblack rubyp] I should say: the word "monkeypatching" has never come up. The topic
  301026 [robert.dober] Understood, I meant "interesting" in the sense that I was kind of
  301030 [dblack rubyp] So is not looking for trouble :-) Believe me, there's plenty to do in
  301053 [robert.dober] ooops I meant something completely different :)
threads.html
top