249291-252053

249098-278074 subjects 249514-277705

Decode password
249291 [mitijain123@] i had encoded the password using,
+ 249292 [codeblogger@] ...
+ 249295 [chris.hulber] Thats impossible, basically. A hash is a one-way function.
| 249363 [ck.stonedrag] What a luck for us unix-administrators ;-)
| 249378 [fwmailinglis] charset="us-ascii"
+ 249317 [logancapaldo] ...
+ 249381 [leslieviljoe] Perhaps you are trying to do authentication like this? The usual

using Ruby for line-wrapping
249301 [perrin@ap th] I don't necessarily need code examples -- but if anyone has ideas for a
+ 249303 [martindemell] Check out Text::Format
| 249305 [perrin@ap th] Thanks.  I'll give it a look.
+ 249306 [w_a_x_man@ya] str = "\
| 249311 [perrin@ap th] Thanks.  The scan method's pretty nice.  I had no idea it existed.
+ 249324 [pbrannan@at ] irb(main):001:0> require 'prettyprint'
+ 249413 [gavin@re in ] Also relevant are some of the regexp used in the thread "halving a

php's chunk_split alternative in ruby
249304 [kronidas@gm ] how could I chunk_split string
+ 249307 [alex@bl ck e] irb(main):005:0> "some long long long string".scan(/.{1,3}/)
| 249309 [mzilenas@gm ] Exactly like that :)
| 249312 [botp@de mo t] # Exactly like that :)
| 249313 [mzilenas@gm ] class String
+ 249308 [w_a_x_man@ya] long_string = "some long long long string"

[QUIZ] Checking Credit Cards (#122)
249315 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 249318 [dangerwillro] For completeness and to make this Quiz exercise valid to more people,
| 249321 [a2800276@gm ] UK had Switch and Solo till recently which are now rebranded under the
| + 249325 [dangerwillro] Wow, those are some broad ranges.
| | 249335 [a2800276@gm ] should be 3528-3589, obviously.
| | 249341 [dangerwillro] My grandmother used to have a Diners Club card. Last time I saw that
| + 249410 [rajsahae@gm ] There's no way to differentiate between a JCB starting with 34 and an
|   249411 [mday@ma .c m] So I don't think a leading 34 is ambiguous.  It would be American
|   249412 [rajsahae@gm ] Sorry, didn't see that email for some reason, even though it's right
+ 249322 [martin@sn wp] May I make an additional suggestion?  Treat spaces in the card number
| 249323 [james@gr yp ] $ ruby -e 'p ARGV.join' 1111 2222 3333 4444
+ 249361 [matthew.moss] So is a card number like "4012 3456 7890" a valid Unknown, or an invalid Visa?
| 249364 [james@gr yp ] Visa Invalid
| + 249373 [matthew.moss] So I took this as an opportunity to try doing a little TDD, something
| + 249377 [kazaam@ol co] Nope thats no Visa number but a unknown one. Visa Cards have a certain
|   249384 [james@gr yp ] You are right.  I didn't read well.  It's Unknown.
|   249422 [lerno@dr go ] Do we display Valid/Invalid for unknown cards?
|   + 249428 [kazaam@ol co] We desplay unknown for unkown cards :) and valid/invalid for valid or
|   | 249429 [kazaam@ol co] 13 or 16 of course...
|   + 249442 [james@gr yp ] I would go ahead and display Valid/Invalid normally.  That way people
+ 249447 [jeremy@hi eg] Wikipedia has a great chart showing all the prefixes of most known
+ 249483 [ari@ar br wn] <snippage>
| + 249484 [gattster@gm ] You move back to the beginning after doubling the 2nd to last. You
| | 249520 [ari@ar br wn] Ohh, I see what he did now! Thanks for your help!
| + 249491 [mday@ma .c m] ...
+ 249485 [list.push@gm] This Ruby Quiz has been translated into Japanese.
+ 249506 [list.push@gm] Here is my solution.
+ 249509 [kazaam@ol co] 48 hours are past so here is my first solution. I'm just coding ruby for
+ 249511 [greenpenguin] My solution (the second I've submitted, so please be nice :).
+ 249513 [sepp2k@go gl] I'm rather new to ruby and this is the first time I participated in this quiz.
| 249515 [robert.dober] Yet another Great Ruby Quiz ;)
+ 249544 [jeremy@hi eg] ...
+ 249556 [mday@ma .c m] Thanks for another simple but fun quiz!   James, thanks for your
+ 249560 [bryan.weathe] ...
+ 249565 [gabhijit@gm ] Here is my solution a bit schoolboyish :-(
+ 249639 [bulliver@ba ] This is just a class, with a bit of starter code at the bottom to get going.
+ 249885 [bob@li bo ne] My second ever Ruby Quiz.
+ 249946 [chneukirchen] #!ruby
  + 249969 [ruby@fr mm n] Wow, very nice solution! Impressive how short it is...
  | 249978 [chase.southa] ...
  + 249991 [martin@sn wp] You do know that (e*f > 9 ? e*f-9 : e*f) is equivalent to e*f%9,
    + 249993 [james@gr yp ] => [0, 2, 4, 6, 8, 1, 3, 5, 7, 0]
    + 250235 [chneukirchen] I first thought that too, and it cost me 10min to find that 9%9 == 0.

File#size and File#size? follow links?
249339 [dangerwillro] Do File#size and File#size? follow links?
249345 [djberg96@gm ] On Apr 27, 7:57 am, John Joyce <dangerwillrobinsondan...@gmail.com>
249348 [dangerwillro] Thanks, Dan!

Building one-click installer compatible C extensions on windows with VS2005
249344 [hhausman@gm ] I had an idea for a quick C extension and thought I'd see what it was
249352 [jan.svitok@g] 1. Ruby 1.8.6. should be compilable by VS2005. The one-click installer
249371 [renard@nc rr] VS6 is no longer available from Microsoft ... so where can someone
249386 [jan.svitok@g] VS6 is not officially available - due to java settlement with sun (the

Ruby DBI transaction support bug?
249355 [pmeunier@pu ] According to http://www.kitebird.com/articles/ruby-dbi.html "Using the
249356 [pmeunier@ce ] I forgot to mention, this is of course with the last version of DBI,

Re: Looking for thoughts and opinions on Ruport, and reporti
249368 [edder@tk sp ] Have you ever looked at tioga. It creates figures directly in pdf and
249389 [gregory.t.br] These really are quite beautiful.   I think I saw tioga before and

Net::LDAP vs ruby/ldap
249369 [fdacat@gm il] The basic premise of this test was to see how long it would take to do
+ 249372 [djberg96@gm ] While it's interesting, I'm afraid I have to stick with net-ldap. The
| 249379 [ara.t.howard] my good friend justin crawford works heavily with ruby and ldap for the
| 252053 [ian@ca ib n.] I'd be interested to discover exactly what "unstable" means here, so
+ 249380 [garbagecat10] ...

(none)
249375 [donald.ball@] I've looked at Ruport before but as far as I can tell, it doesn't really

String substitution?
249387 [roberto.rive] Im working on a small rails app that uses a text editor component
249391 [robert.dober] First of all there is nothing wrong with this(1), I like it a lot,
249396 [roberto.rive] Indeed, I was trying to get a more concise alternative. Yours is

regexp help needed
249390 [rpardee@gm i] Hey All,
+ 249392 [aaron@te de ] Hey Roy,
+ 249393 [duane.johnso] str = "1 'Not qualified' 2 'Overquota' 3 'Qualified'"
+ 249394 [tim.pease@gm] r = %r/(\d+)\s+('[^']*')/
  249398 [rpardee@gm i] Ah--that's the magic!  Thanks guys!

[ANN] RubyInline 3.6.3 Released
249399 [ryand-ruby@z] RubyInline version 3.6.3 has been released!

[ANN] slave-1.2.1
249401 [ara.t.howard] SYNOPSIS

Editing a text file
249402 [barjunk@at g] There is a task to edit a text file.  It is entirely possible that
249425 [shortcutter@] I consider Ara the definitive source especially when it comes to
249454 [barjunk@at g] <snip old stuff>
249660 [shortcutter@] No, I meant: the basic mechanism uses io.flock, e.g.

Ruport In 10 Minutes (was Looking for thoughts and opinions...)
249403 [gregory.t.br] This has to be the strangest thing I've ever created.
249404 [pbooth@no oi] Gregory,
249405 [gregory.t.br] I'm not sure, really.   I do think that Ruport could be helpful for

unresolved external symbol __DllMainCRTStartup@12
249406 [axgle@12 .c ] Manifest file not generated for extensions with VC++ 2005 express.
249438 [nobu@ru y- a] How did you build ruby?
249469 [axgle@12 .c ] #include "ruby.h"
249470 [axgle@12 .c ] Oh, I found "C:\Program Files\Microsoft Visual Studio 8\VC\lib" also
249472 [axgle@12 .c ] thanks  Nobuyoshi Nakada. yes ,  VC6 does not supports AMD64
249474 [axgle@12 .c ] mt -manifest test.so.manifest -outputresource:test.so;2
249478 [axgle@12 .c ] Oh,yeah,I am successful!

Re: RubyInline 3.6.3 Released
249407 [axgle@12 .c ] I get "Define INLINEDIR or HOME in your environment and try again"
249408 [axgle@12 .c ] cl : Command line warning D9035 : option 'Og-' has been deprecated and

problem with YAML:load
249409 [bino@in oa s] Dear All.
+ 249421 [christian@su] I'm not an expert on YAML, but I think YAML has to know about the classes Nota
| 249601 [bino@in oa s] Dear Surlykke and all
| 249662 [bino@in oa s] OOppps ... my stupidity ..
+ 249426 [shortcutter@] Without looking too deep into your issue: did you make sure that all

ruby conditional operator ? :
249417 [rubyforum@gm] in java, I can use ? : shorthand operators to ensure s is assigned to
249418 [dangerwillro] The same old ternary operator is in Ruby as in most languages these
249419 [jan.svitok@g] For assigning default value ||= is usually used (for non-logic values)
249420 [dangerwillro] of course there are many ways to set default values. The Perl slogan

Re : RubyInline 3.6.3 Released
249423 [etorreborre@] I've recently had the same issues trying to recompile the ParseTree library (which uses RubyInline) on windows XP.

cyclic array
249430 [josselin@wa ] I would like to print  n elements from an Array in a cyclic way.
+ 249432 [dangerwillro] sounds like classic (?) Ruby. you just need a block. in the block,
+ 249434 [list.push@gm] ...
+ 249436 [fxn@ha hr f.] module Enumerable
| + 249453 [vjoel@pa h. ] Here is a slight variation, for amusement, but it doesn't work for
| + 249599 [rick.denatal] This method won't work for Enumerables in general, although I guess it
|   249658 [fxn@ha hr f.] Oh right, thank you. I don't know why ri Enumerable lists length
|   + 249659 [fxn@ha hr f.] By "there" I mean defining that method in Array, leaving the
|   + 249738 [rick.denatal] By the way I think that there's a typo that should be an open range in
|   + 249815 [fxn@ha hr f.] It took me a while to discover where that non-core Enumerable#length
|     249838 [Rob@Ag le on] For those who aren't reading Rick's blog (where this is now in a
+ 249437 [gavin@re in ] Not a direct answer to your question, but regarding circular lists
| 249487 [gavin@re in ] irb(main):001:0> require 'Ouroboros.rb'
+ 249439 [josselin@wa ] Thanks to all of u . As always different ways .. the most difficult
| 249441 [dangerwillro] Indeed, as a newbie myself, (forever I think) it is often a bit
+ 249475 [list.push@gm] ...
+ 249477 [list.push@gm] ...
+ 249480 [list.push@gm] I did a poor job of cleaning that code.

Shiping headers with a ruby extension
249433 [detlef.reich] i have written a ruby extension, that should be the base for other

java translation into Ruby
249440 [baykalmehmet] i have recenlty started Ruby;

Ruby must run in c:\ruby in order to find libraries (xp sp2)
249443 [comp.lang.ze] Microsoft Windows(c) XP SP2 with the latest patches, bugfixes, etc.
249550 [comp.lang.ze] Ok, I've gone about installing Ruby from the download binaries. Same

code block which allows dynamical numbers of arguments
249445 [kazaam@ol co] #begin
+ 249448 [brabuhr@gm i] test = lambda {|c,d| @check = c if 12 == d}=> #<Proc:0xb7df9528@(irb):14>
+ 249449 [ymendel@po o] You'd want to use the excellent splat (*) operator for that.
+ 249451 [kazaam@ol co] thank you both :D worked like a charm

need help to parse xml (foaf)
249446 [patcito@gm i] hey all,
249459 [gavin@re in ] require 'rexml/document'

Valid name for a method
249455 [monfort.germ] I'm trying to add a new method to a class but I want to name it like `<<<' or
249456 [ara.t.howard] class C

Infix to Postfix Method
249460 [evil_grunger] I'm still getting to grips with Ruby, but I think I'm doing well. My
+ 249467 [ezmobius@gm ] based auth system. It uses a stack and converts to postfix before
+ 249479 [pbrannan@at ] In general it's better not to explicitly specify ASCII values, so I'd
  + 249496 [evil_grunger] Could you explain why please, I can't see how it makes any difference,
  | 249498 [dzwell@gm il] In a high level language, it's good to use the high level functions.
  | + 249500 [evil_grunger] Thanks for that explination, it makes quite a lot of sense!
  | + 249559 [tom.hurst@cl] Your implementation is very similar to mine (though I'm parsing boolean
  |   249566 [dzwell@gm il] That's pretty neat. I hadn't thought of using this stuff to generate
  |   249585 [tom.hurst@cl] irb(main):025:0> query = NSearch::QueryParser.new.parse('foo bar NOT heh')
  + 249567 [logancapaldo] ...

Ruby training materials suggestions required
249461 [    z@xa ne ] I am trying to learn Ruby, reading the "pickaxe" book v 2.0. It seems
+ 249462 [TimHunter@nc] Welcome to Ruby!
| + 249465 [dangerwillro] what system do you have to work on?
| + 249466 [znmeb@ce ma ] There may be no "best", but there's certainly a rather short list. On a
|   + 249473 [gattster@gm ] I'm a textmate/vim user, but I sure would love an editor with bundled
|   + 249481 [TimHunter@nc] I said 75 answers, not 75 editors.
|     249482 [znmeb@ce ma ] You said "75 answers, each one advocating a *different* editor or IDE".
|     249494 [dangerwillro] oh, let's not be nitpicky like C programmers!
+ 249476 [rajsahae@gm ] My personal preference happens to be the Pragmatic Programmers Ruby

Re: Checking Credit Cards (#122)
249486 [gavin@re in ] The confusing part (that I didn't catch when I read it) is that step 2
249489 [james@gr yp ] Yes, most descriptions tell you to mod 10 the bigger numbers to get
249552 [cmshea@gm il] Here's what I came up with.  I hope it's as short and to the point as I

[ANN] ruby-msg-1.2.16
249490 [aquasync@gm ] ruby-msg is "A library for reading Outlook msg files, and for converting

Connecting to a socket
249492 [petr@pu ch o] I've got a mailfilter (dspam) that runs in a daemon mode and thus can be
249507 [msoulier@di ] A two-second google search found this.

Strange error with HTTPS request
249493 [gthomas@ta a] I am interested in downloading, from the New Zealand TAB (Totalisator Agency
249497 [aaron@te de ] Do you really need to use Net::HTTP?  I was able to fetch the page with
249562 [gthomas@ta a] Thanks! It worked a treat.

Re: [QUIZ][SOLUTION] Checking Credit Cards (#122)
249499 [rajsahae@gm ] My second ever rubyquiz submission, so be nice.
+ 249503 [kazaam@ol co] I'll wait with my solution for a further hour ;) but a comment to your
| 249510 [jesse.d.merr] [QUIZ][SOLUTION] Checking Credit Cards (#122)
+ 249551 [gattster@gm ] This is my first rubyquiz. Here is my solution.
  249555 [brad@br de i] [QUIZ][SOLUTION] Checking Credit Cards (#122)
  249557 [brad@br de i] [QUIZ][SOLUTION] Checking Credit Cards (#122)
  + 249630 [akbarhome@gm] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  + 249923 [james@gr yp ] Wow, a semi-local solving the quiz.  I guess that means you need to
  + 249936 [james@gr yp ] That's pretty darn clever.  You can collapse it to one line with
    + 249963 [brad@br de i] Didn't even think about inject here. Awesome. I'm sure that I'm going
    + 249971 [pit@ca it in] def mapn(&b)

gem headache
249501 [Frantisek.Ps] gem install rmagick-1.14.1-win32 --local --install-dir c:/TEMP
249504 [msoulier@di ] Can't you just do
249543 [frantisek.ps] i have tried it, there is no such file in rubyforge repository. i must
249545 [TimHunter@nc] RMagick-1.14.1_IM-6.3.0-7-Q8.zip is a zip file that contains both the
249561 [frantisek.ps] yes, really thank you. i was confused, because when i explicitely

Strange DRb and fork issues
249502 [farrel.lifso] ...
249547 [ezmobius@gm ] Hey Farrel-
249564 [farrel.lifso] Thanks, I'll check it out, although I would really like to work out
249579 [ara.t.howard] i reccomend trying to using slave.rb if you can - of course, as the author,
249582 [farrel.lifso] def create_client(hostname=nil,port=nil)
249679 [ara.t.howard] that looks reasonable.
249681 [farrel.lifso] Thanks for the help, I hope you don't  mind me badgering you but from
249755 [ara.t.howard] i'll try to look at it soon...

Re: [QUIZ] Checking Credit Cards (#122) [SOLUTION]
249505 [m_goldberg@a] <code>

Partitioning with Set.divide
249508 [peter@ru yr ] I have been playing with partitioning a set recently and I am stuck with
+ 249516 [sonoflilit@g] Well, you could first count how many repetitions there are of each
| 249517 [sonoflilit@g] h = Hash.new {0} # is this how I set a default value?
| 249522 [sonoflilit@g] Sorry for the triple post, but I've read the article and propose a
| 249523 [sonoflilit@g] Ah, sorry. tryruby.hobix.com helped me find that hash.map() is
| 249525 [peter@ru yr ] Well the problem was that I just came across Set.divide and wanted to
+ 249663 [shortcutter@] Basically you need bags.  Since a quick check does not reveal any, you
threads.html
top