320024-398284

319770-320964 subjects 320207-324948

how to collect all the href links in a single page to a log file
320024 [sitaramiredd] ...
320036 [srinivasarao] for colors do you applied any css?
320040 [sitaramiredd] ...

Special UTF8 characters as methods in ruby
320026 [john.d.perki] I'm trying to figure out how to define as a method a special math
320028 [john.d.perki] Nevermind, figured it out.

Advanced arrays
320027 [stuart.clark] I have a quick brain teaser. I  have an array full of data broken down
+ 320029 [caduceass@gm] Depends on the objects in the array, but you might try #join followed
| + 320030 [Rob@Ag le on] See Enumerable#each_cons
| + 320033 [caduceass@gm] That may have been a bit unfair (and wrong too, because you might have
+ 320031 [mike@st k. a] It might be a case where Enumerable.each_cons will do what you want.
| 320034 [dblack@ru yp] You can also take advantage of the fact that each_cons returns an
+ 320032 [brabuhr@gm i] def foo?(array, a, b, c)

unexpected return (LocalJumpError)
320038 [kdream95@gm ] def a
+ 320043 [mike.gold.44] % ruby -e 'return'
+ 320048 [b.candler@po] For the differences between lambda and Proc, including a lot of gory
  320051 [robert.dober] or better dont,
  320090 [b.candler@po] In what way?

1.upto(4) in ruby 1.8.6
320039 [hombre@gm il] indices     = 1.upto(points.size)
+ 320041 [hombre@gm il] (1..4).to_a => [1,2,3,4]
+ 320042 [botp@de mo t] # indices     =3D 1.upto(points.size)
  320044 [hombre@gm il] In later steps, the list gets sorted by the 'distance' field, then

check a checkbox
320047 [geagneske83@] ...
+ 320050 [geagneske83@] ...
| 320055 [s.korteling@] puts ie.checkbox(:name,"Test1").checked?
+ 377439 [ramesh.yatam] I have tired usign this but still not working, can anyone help me on

SCHOOL LOAN
320053 [dalilaf29@ya] SCHOOL LOAN

[ANN] First Cincinnati.rb Meeting
320054 [mguterl@gm i] If you live in or near Cincinnati, love Ruby and want to get together

Convert text string i.e 'Peter' into integer ID
320057 [ohlhaver@gm ] is there any method to quickly convert a text string such as 'Peter'
+ 320060 [shourya.sarc] code=3D0
+ 320063 [hgs@dm .a .u] What properties do you want the string:integer relationship to have?
| 320066 [ohlhaver@gm ] Thanks for your help. No I need to turn the string which would usually
| + 320067 [caduceass@gm] Why does it have to be a number?  Your db should already index.
| + 320068 [janfri.rubyf] require 'digest/md5'
| | 320073 [caduceass@gm] Unless I'm missing something here, strings are just numbers in order.
| | + 320074 [ohlhaver@gm ] Thanks a lot everybody.  I'm really impressed by the quick and useful
| | | + 320079 [caduceass@gm] To be honest, I know almost nothing about mysql.  I will say, however,
| | | + 320081 [funkaster@gm] You should just index the column you need, and if you want that column
| | | + 320088 [b.candler@po] This is what's known as "premature optimisation".
| | | + 320211 [lloyd@2l ve ] Well, it depends.
| | + 320075 [janfri.rubyf] 'Peter'.to_i(36) # => 42681699
| + 320069 [peter@ru yr ] If you just want to check for duplicates, just store a SHA1 hash of
| + 320071 [shourya.sarc] You need to generate a SHA1 or MD5 hash from your string.
| + 320087 [cidza@ti .i ] Viewing your problem from a theoretical point of view, something similar
+ 320065 [peter@ru yr ] There are a lot of easy ways to do the string -> integer part - e.g.
| 320070 [sepp2k@go gl] =A0
+ 320076 [kbloom@gm il] Does "Peter".hash do what you want?
  320077 [ohlhaver@gm ] Yes, thanks it seems to do what I need, except for two possible
  320096 [kbloom@gm il] I'm going to suggest what Todd Benson and Rolando Abarca suggested, which
  320098 [ohlhaver@gm ] Thanks again for all you help everyone!
  320099 [peter@ru yr ] Adds a new index with the name of the column. Other options

Can't get output from MiniTest
320062 [dblack@ru yp] I feel like a lamb to the slaughter, since I'm almost certainly doing
320093 [jbarnette@gm] Minitest doesn't install an at_exit hook by default. I think the
320094 [dblack@ru yp] Thanks -- that's the missing piece of the puzzle.
320095 [ryand-ruby@z] I've been talking to both John and Dave Thomas about this
320097 [dave@pr gp o] (As you know.. :) I'd vote for autorun being the default, as most
322615 [ryand-ruby@z] after careful consideration, I decided against this. One of Jeremy
322650 [jballanc@gm ] Quick question from the unwashed masses: I admit I have not been
322654 [ryand-ruby@z] um. this got kinda big. sorry.
322891 [dchelimsky@g] How about The Principle of Least Surprise?

Clone of http://tryruby.hobix.com/
320064 [ibnesayeed@g] ...

Accessing the system log on Windows
320082 [aldric@tr vo] This is in a production environment, so ruby 1.8.6. How would I go about
320089 [jcmoore@pr s] Posted via http://www.ruby-forum.com/.
320091 [aldric@tr vo] Shu-weet! Thank you!

Ruby Sub Regular Expression
320083 [dave.a.rober] irb(main):017:0> a = "Hello - 1 - World"
+ 320084 [jim.mckercha] your regex.
| 320206 [henrik@ny .s] ...
| 320209 [jim.mckercha] Thanks Henrik
+ 320085 [jgabrielygal] Because * by default is greedy, so it tries to match as much as it can.
| + 320092 [dave.a.rober] Thank you Jim and Jesus
| + 320100 [shortcutter@] Other variants would be
+ 320086 [bwalton@ar s] ...

Issue with block and getting to local variables
320101 [cashew250@ya] Ok I'm new to ruby and want to do the following, I want to define a
320102 [shortcutter@] irb(main):001:0> bl = lambda {|a,b| puts a, b}
320110 [cashew250@ya] Thank you Robert but the problem with that approach is the need to pass
320113 [caduceass@gm] x, y (and a, b) are objects.  They don't have to be integers.  They
320115 [cashew250@ya] Yes I understand that. I dont want to have to do this because I dont
+ 320120 [rubytraining] Yes, this is the standard behavior of blocks.  Blocks are closures,
| + 320123 [list.rb@gm i] One thing with locals that got me is that you have to define them
| + 320195 [shortcutter@] I believe with "caller" OP means the method that invokes the block.  Not
+ 320124 [ara.t.howard] block.call
  + 320126 [cashew250@ya] Can someone explain why this doesnt work
  | 320132 [b.candler@po] def my_function(&block)
  + 320128 [sepp2k@go gl] No, they don't. They enclose the scope from where they were created.

Need tutoring on using a path environment variable
320103 [donn@cm cm .] I don't know what to do.  I have an environment variable, PW_PATH,
+ 320105 [s.korteling@] ENV contains all environment variables; ENV['PW_PATH'] is the content of
| 320107 [donn@cm cm .] the
+ 320106 [donn@cm cm .] First question answered:  pw =3D ENV['pw_path']  I got that.  But I
| 320108 [bwalton@ar s] ...
+ 320109 [donn@cm cm .] And the application I want to execute is presort.exe, which is located
  320117 [funkaster@gm] old_path = ENV['path']
  + 320119 [Rob@Ag le on] begin
  | 320154 [funkaster@gm] totally right... although, I don't think that system will raise an
  + 320157 [ymendel@po o] First,
    320159 [funkaster@gm] question about this for the ruby-basic java black belt[1]

Matching
320111 [shandybleu@y] I am trying to parse out some characters from a string and I am having
320112 [peter@ru yr ] If you want to grab everything in brackets, why do you care about the
+ 320114 [peter@ru yr ] ...
| 320180 [shandybleu@y] I have had to refine my search a little, mostly because getting the last
| + 320184 [Rob@Ag le on] OK, you're trying to pull the three-letter airport code from within
| + 320188 [Rob@Ag le on] Oh, I see part of your problem: You need to group the alternation to
|   320215 [shandybleu@y] Can you direct me to some good online resources where some Ruby methods
|   320221 [Rob@Ag le on] If you don't have a copy of "Programming Ruby"[1] aka, the Pickaxe
+ 320156 [shandybleu@y] I realized that after I made this post - that I was over thinking the

Re: Connect to Windows Share using Ruby
320116 [howardrobert] Nick,
320122 [aldric@tr vo] I couldn't find the original post so I'll reply to this one..
320158 [ruby@gm il c] Yeah, all of the above works for me.  I just didn't know if there was a

Priority inheritance
320118 [daniel.ccunh] I would like to now if there is a library that implements priority

[ANN] nokogiri 1.0.5 Released
320125 [aaron@te de ] nokogiri version 1.0.5 has been released!
+ 320127 [yedingding@g] ...
| 320160 [aaron@te de ] xml =
+ 320176 [mailing.mr@g] Great work!

Oddness with gems
320129 [peter@se an ] I am running 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] and I
320162 [matt@ti bi s] The namespace changed. It is now called LibXML::XML::Document (and so
320163 [peter@se an ] Ah, thanks for that. Will get on with things now.

winclicker problem
320130 [geagneske83@] ...

Re: Regular expression for matching spaced letters needed
320131 [janfischer@m] Sorry, wanted it here.
+ 320133 [peter@ru yr ] Yeah, it is! :-)
+ 320134 [peter@ru yr ] ...
  320139 [Rob@Ag le on] => ["A B C D E", "a b c d e", "hello A B C world"]
  320155 [janfischer@m] Looks great, thank you very much!

'#' characters are breaking my regexp
320135 [toastkid.wil] I'm trying to build a regexp that includes music notes, eg Bb or C#.
+ 320136 [peter@ru yr ] ...
| + 320140 [toastkid.wil] Posted via http://www.ruby-forum.com/.
| | 320141 [peter@ru yr ] ...
| | 320143 [toastkid.wil] Bugger.  How annoying...maybe i have some weird gem interference or
| | 320149 [b.candler@po] 1. Run plain irb, don't load any libraries yet,
| + 320152 [james@gr yp ] # also becomes a comment character inside a Regexp if the /x
+ 320144 [michael.c.li] The # must be confusing the parser into thinking some #{} style
  320145 [toastkid.wil] I tried that already, no joy :(
  + 320147 [phlip2005@gm] When you mash like /#{string}/, the inserted item is not treated as a
  | 320150 [toastkid.wil] => "abc#def"
  + 320148 [toastkid.wil] And it works fine on our server...it's just on mine and my colleagues'
  + 320151 [fred@la av .] Are you sure it's not simply a display problem in IRB ?
    320153 [toastkid.wil] That's it exactly!  Fred, you're a genius - it was working properly all

Using Class methods
320137 [s_ayalon@ho ] work. What I'm trying to figure out is how to access the class methods
320138 [jgabrielygal] Did you try it?
320142 [s_ayalon@ho ] That's exactly what I needed -- I completely forgot about the

Re: FFI 0.1.1 (Foreign Function Interface) for Ruby 1.8.6/7 and 1.9
320146 [luislavena@g] Nop, count me on that too.

Getting the comments(RDoc/ri) while running
320161 [damphyr@fr e] There is this parser, dynamically extensible with methods from modules.
320165 [aldric@tr vo] It's a little open-ended ... I use Netbeans as my IDE when I write code,
320170 [damphyr@fr e] I use these methods in my app and they add functionality that needs
+ 320171 [hgs@dm .a .u] ri gets docs built with rdoc. When you build those docs with rdoc, do
+ 320174 [ryand-ruby@z] you can certainly access the data directly. look at rdoc/ri/
  320178 [dave@pr gp o] If all you want is the comment, you could also just use caller() to
  320220 [simon.a.chia] For that exact thing, check out Lazydoc (http://tap.rubyforge.org/

Re: nokogiri 1.0.5 Released
320164 [mark@th ma z] ub=ADbody></body></root>"

mapping C long unsigned integer with swig for ruby
320166 [lyesjob@gm i] ...
320168 [nobu@ru y- a] $1 = ULL2NUM($input);
320223 [lyesjob@gm i] ...

[SUMMARY] Sudoku Generator (#182)
320167 [matt@mo s. a] In this week's quiz, I ended up dropping the requirement to select or
320194 [kbloom@gm il] This will punch out, on average, 44 holes.

experience with ruby on serialport
320173 [stefan.eder@] i want to use http://rubyforge.org/projects/ruby-serialport/ to communicate
+ 320297 [robert.dober] Maybe this is useful?
+ 320363 [dido.sevilla] I actually used EventMachine and the Ruby-Serialport project you

Mechanize Select List Help Needed
320179 [cschaller@gm] I thought that I'd tap into the group to find out if anyone has had this
320210 [cschaller@gm] Any thoughts on where to look for help with my mechanize question?  I am

Active Directory access - not just users, but computers too
320181 [aldric@tr vo] Most Active Directory access really just goes through LDAP and I don't
+ 320182 [slarbi@gm il] ...
+ 320192 [brabuhr@gm i] (first hit on google for "ldap active directory query examples")
  320201 [no@sp m. le ] You can do this query using either objectClass or objectCategory.
  320212 [aldric@tr vo] Thank you to everyone - it's working like a charm!
  320231 [MR-Mencel@wi] Aldric,
  + 320237 [aldric@tr vo] I pretty much followed the sample ruby-ldap documentation - here's how
  + 320250 [kou@co mi ng] Please show the detail for the ActiveLdap try.
    320279 [MR-Mencel@wi] I know you from the ActiveLdap list and probably should have asked my question there first.  :)  My AD server requires secure LDAP so I have to use 636.
    320322 [kou@co mi ng] It seems that you miss :method => :ssl option in

Background option like script/server -d has
320185 [rabbitblue@g] $ ruby my_program.rb
320190 [saji@ap c2 .] The 'daemons' library may help
320353 [rabbitblue@g] That's exactly what I need, thank you Saji. :)

Unable to rescue Errno::ECONNRESET during
320189 [ambivalence@] For some reason my rescue clause is not catching this exception. Here's
320199 [b.candler@po] def receive_responses

Subject: [ANN] rubygoo 0.0.6 Released
320193 [shawn42@gm i] ...

ruby-net-ldap :replace_attribute error
320196 [mike.rood@in] I'm trying to use ruby-net-ldap to update Active Directory user
398284 [lists@ru y- ] ldap.replace_attribute userDn, :pwdlastset, "0"

One-Click Ruby Installer project stopped?
320200 [cfb@jn at .d] I am wondering if work on the One-Click Ruby Installer for Windows has
320203 [luislavena@g] Hey Claus,
320222 [hgs@dm .a .u] It might be worth adding a news item about this sort of thing to the
320233 [luislavena@g] Guilty of charge.
320252 [dave@pr gp o] What should I recommend to PickAxe readers? I'm planning to ship the
320268 [luislavena@g] As you may know One-Click bundles almost the world in Rubyland. Some
320284 [hgs@dm .a .u] ...
320308 [dave@pr gp o] One simple suggestion. Change RubyGems in 1.9 so the default value for =20=
320326 [luislavena@g] =A0

Highline - question with multiple choices
320202 [szimek@gm il] I've got an array of user logins and need to provide a way to select
320208 [james@gr yp ] Is it okay to ask the user to enter one login per line with a blank
320270 [szimek@gm il] Thanks, I'll probably use this solution for now, but is it possible at
320285 [james@gr yp ] Not with autocompletion, no.  HighLine doesn't allow you to manually
323657 [4life@in er ] Can you tell me what I'm doing wrong?
323659 [james@gr yp ] Welcome.
323970 [4life@in er ] def ParsePING(tvChann, tvIP, tvPort)
+ 323991 [james@gr yp ] OK, if you trust it, we will take it out of our consideration.
| 324045 [4life@in er ] Yes it is ok but I'm in need to create that menu dynamically. I've done
| 324085 [james@gr yp ] Did you notice that the example I gave created a menu dynamically?
| 324126 [4life@in er ] Thank you James for your patience :)
| 324157 [james@gr yp ] I'm glad we're getting it figured out.
| 324170 [4life@in er ] "The moral (my opinion, of course): for is evil because it's surprising
+ 323992 [james@gr yp ] I also believe you can simplify this code quite a bit.  I recommend

File.fnmatch? doesn't distinguish between .filename and ./filename ?
320204 [stefano.croc] I know that File.fnmatch? returns false for file names starting with a dot,

Power Trend Line
320205 [johnnybutler] Im using some graphing software to produce charts which contain various
+ 320334 [chris.lowis@] although, unless you have a compelling reason to use Ruby (such as
+ 320351 [AEtzold@gm .] Dear John,
  320352 [chris.lowis@] I interpreted the original message to mean code to fit a, for example,
  320355 [AEtzold@gm .] Dear Chris,
threads.html
top