269269-292392

269105-271980 subjects 269542-271087

^ [SOLUTION] [QUIZ] IP to Country (#139)
269269 [SimonKroeger] one of the (without a doubt) many binary search solutions. This one reads a 1K

^ rbTenjin + Apache?
269273 [shevegen lin] looks nice. Does someone know how to set it up with Apache?
+ 269274 [konrad tyler] charset="utf-8"
+ 292313 [kenle545 gma] This is how I did it, I am not an Apache guru so please correct me
  292392 [kenle545 gma] I forgot to mention, you will need to have write permissions on the

^ blocks expected arguments and metaprogramming
269280 [pedro.delgal] module Kernel
+ 269295 [wilsonb gmai] def example
+ 269297 [transfire gm] On Sep 16, 8:10 am, "Pedro Del Gallego" <pedro.delgall...@gmail.com>
  269302 [pedro.delgal] Yes thats enough for me. I didnt now that the block was a Proc class.
  269308 [pedro.delgal] BTW, its works perfectly, with that i can decide what parameter return

^ Fwd: [QUIZ] IP to Country (#139) - early submission, please forward after deadline
269282 [james graypr] ...

^ Fwd: Please Forward: Ruby Quiz Submission
269283 [james graypr] ...

^ Fwd: [QUIZ] IP to Country (139)
269286 [james graypr] ...

^ IO#gets(sep_string) usage
269287 [Klauer gmail] in a file and make separators any sort of punctuation(",", ":", "\n",
269293 [wilsonb gmai] $/ is the 'output separator' global. It defaults to \n.

^ Run script against every file in a directory
269289 [cgallagher g] I'm currently tryin to implement a ruby script which will run through a
+ 269290 [mo_mail ongh] What kind of silly errors?  What is not working?
| 269299 [bigboss64 ip] Well in a Unix Shell this would probably do it, as would a for loop with a bit
+ 269376 [globyy3000 h] you would add the code from jsmin.rb (that performs god knows what
+ 269478 [pcdavid gmai] Dir["**/*.js"].each { |js| system("ruby jsmin.rb #{js}") }

^ Singleton pattern vs Class variables and methods
269292 [summercoolne] There seems to be a big thing about the Singleton Pattern... and the way
269294 [mailing.mr g] It's singleton is PATTERN, implementation is left to progammer, in Ruby

^ bug with assignment?
269300 [maruthim yah] The snippet illustrates my question.
+ 269303 [ben bleythin] It's this line, right here.
+ 269304 [tim.pease gm] You are assigning a new Array to the key "alpha" in the hash b. The
+ 269305 [TimHunter nc] Because, in the first case, both a["alpha"] and b["alpha"] refer to the

^ Newbie: what's Ruby idiom for word-by-word input?
269315 [alex.shulgin] What is the Ruby idiom for reading input word-by-word?  In other words
+ 269317 [ari aribrown] I believe that should be enough to show you the ruby way.
| 269487 [lists bertra] This isn't actually elaborate as it doesn't recognize tabs
+ 269326 [shortcutter ] If you do not need to treat every word before it is read from the input
  269407 [alex.shulgin] This is more or less the same code as I use, maybe a bit more
  + 269426 [shortcutter ] Well, you can use #getc and implement the word matching logic
  + 269441 [w_a_x_man ya] Awk is a very popular tool for text processing, but there is no
    269481 [alex.shulgin] I thought Ruby is not just a text processing tool, but a general
    269505 [w_a_x_man ya] You thought correctly.  But when you talk about reading a word at
    269524 [shortcutter ] I'd probably encapsulate the word reading in a module so the
    + 269541 [w_a_x_man ya] Very sophisticated.
    | + 269572 [shortcutter ] See also Bertram's remark. Btw, that's probably also the reason why
    | + 269661 [alex.shulgin] Yeah, that is my point.  I only see a way to do this efficiently (w/o
    |   269706 [shortcutter ] Why do you think Ruby solutions are inefficient?  If you fear that
    + 269568 [lists bertra] Loath to criticize it, but
      269592 [james graypr] $ irb -Ku

^ Mongrel/XMLRPC For Ruby - Max Post Size
269331 [wdierkes 5do] Mongrel= 1.0.1
269366 [wdierkes 5do] My apologies all.  I have found where my issue is.  Per the Rdoc for
269413 [mailing.mr g] well i suggest you fix this :P no use for confidential notice when you

^ Split
269334 [jarvo88 gmai] Ok guys im looking for something sexy to split this HTML (This HAS to be
+ 269335 [jarvo88 gmai] Oh, i want all the values inside the <b></b> tags, btw
| 269338 [ruby anthrop] str.split(/<b>|<\/b>,|<\/b>, <b>/)
| 269339 [phlip2005 gm] I thought, among other attrocities, that < was a reserved character for
+ 269340 [w_a_x_man ya] "<b>hi</b>, <b>there</b>, <b>fred</b>,".scan(/<b>(.*?)<.b>/).
+ 269392 [goswamiarind] There you go ---
| 269397 [jarvo88 gmai] Thanks, but i need to values inside the <b> tags, So <b>hello</b> I need
| 269404 [goswamiarind] Quick and dirty, but it works --
| 269408 [goswamiarind] This one is better--
+ 269398 [w_a_x_man ya] Why won't your teacher let you use anything
  269425 [jarvo88 gmai] Who said it was a teacher, This was for a challenge, And you're not

^ Variable / Method Ambiguity
269341 [summercoolne] the following program for showing Variable / Method Ambiguity
+ 269375 [globyy3000 h] interpreted.
| 269410 [summercoolne] for (i = 1; i <= 2; i++) {
+ 269382 [dblack rubyp] No, because there's no such variable in scope. The second time through
| + 269458 [jfs.world gm] so this is lexical scoping, then?
| | 269674 [gwtmp01 mac.] No, it is just that Ruby has a single-pass parser.  The parser needs
| + 269680 [dolgun excit] That doesn't seem to bear out.  If you switch the if statement around so
|   + 269684 [dolgun excit] Wait a minute.  'a' has gone out of scope?
|   | 269735 [botp delmont] # In ruby, for loops and if clauses don't create a scope.
|   + 269685 [flori nixe.p] for i in 1..2
|   + 282820 [vascoas gmai] 1)
+ 269434 [dan-ml dan42] It is interpreted but before being interpreted it is parsed. And whether

^ Rubyforge problem? Can not download rmagick-1.15.10
269347 [bpurnomo aka] Dear,
269361 [carl.lerche ] It seems that a new version was just added, so it'll take a bit for the gem

^ [ANN] dcov 0.2.1 released
269349 [jeremymcanal] I just pushed a new release of dcov to Rubyforge.  dcov is a tool to
269401 [unbewusst.se] ~%> sudo gem install dcov
+ 269420 [port001 gmai] TmljZS4gSSdtIGxvb2tpbmcgdG8gaW50ZWdyYXRlIERDb3YgaW50byBhIHByb2plY3QgSSdtIHdv
+ 269423 [jeremymcanal] Oops.  Seems I forgot to pull Ruport out of the gemspec.  I'll drop a
  269480 [unbewusst.se] Fine thanks !

^ Tk Ruby / Fx Ruby / Wx Ruby
269357 [williams.jay] I have looked at these three GUI's for Ruby, and would like to know
+ 269484 [alex deletem] There isn't a unified view held by "the community". The numerous
| 269488 [dangerwillro] Alex hit on a VERY good point, ease/difficulty of installation and
| + 269497 [williams.jay] That is a point I had not really considered. I am building the apps
| | 269515 [lrlebron gma] On Sep 17, 2:24 pm, "Jayson Williams" <williams.jay...@gmail.com>
| | 269555 [mo_mail ongh] Or even WideStudio if you are looking at GUI applications for multiple
| + 269582 [chauk.mean g] Here is my personal point of view ...
|   269658 [williams.jay] wxRuby was definately one near the top of the list. My only objection
|   269716 [alex deletem] I'm pretty sure there's a bug in current rubyscript2exe which makes it
|   269757 [chrisgame ex] ...and what's wrong with ruby-gtk2?
|   269770 [unbewusst.se] works fine over Mac OS X 10.4.10
+ 269514 [w3gat nwlaga] I've been using Fox for windows.  It works well.  foxGUIb makes it quite

^ is possible to edit text field in console?
269363 [tc tomcloyd.] A beginner question for sure, but one on which I'm stuck: I'm trying to
269373 [globyy3000 h] I dont quite understand why you would in fact want to have a line of
+ 269378 [tc tomcloyd.] Thanks. You are, of course, right. I'm a Windows refugee in the process
+ 269384 [_mwryder wor] I have a C routine that does exactly this without using any GUI.  It
+ 269403 [sepp2k googl] No, they wouldn't. Do you have to hit backspace if you want to edit a command
  269443 [dangerwillro] For console-based apps, you really would do well with the NCurses
  269460 [promos burch] I just bought this book last week.  Great book.  First book I've even

^ Representing arrow keys in a string
269371 [goswamiarind] I am using Ruby's Telnet class to establish a session with a remote
+ 269374 [globyy3000 h] instead of trying to make ruby know uve pushed an arrow key, think of
| 269396 [goswamiarind] In this case, only an option is selected in a UI menu ... and no, I cant
| 269406 [gaspard teti] ... type arrow ...
+ 269402 [sepp2k googl] Typing gets in irb and then hitting the four arrow keys (in the order up,
  269589 [goswamiarind] Thanks Gaspard and Sebastian,

^ How to put alert messages on changing screen access
269372 [pragati.agar] I have a small application. I have two features for instance, NEW and
269510 [jan.svitok g] Please specify your app type (web app - rails, standalone - gui gtk,

^ Re: uniforma-0.0.1 - converter for text formats
269383 [micathom gma] of
+ 269386 [micathom gma] BTW which makes me wonder, if you could your library into a parser and
| 269470 [vshepelev im] Internally, it's already here. Any parser creates Uniforma::Dom structures,
+ 269471 [vshepelev im] I meant, those whose parsers can be defined with some easy common DSL :)

^ inject method
269387 [shaiguitar g] can someone explain (verbosely!) the inject method to me, or point me to
+ 269388 [pergesu gmai] ...
+ 269395 [ycelik oytek] From command prompt if you type

^ Re:
269400 [pie2000 gmai] unsubscribe

^ [ANN] Gosu 0.7.5
269418 [julian rasch] for those interested in game/multimedia programming, Gosu 0.7.5 has
269431 [dangerwillro] Excellent news!

^ Re: Gosu 0.7.5
269437 [julianraschk] Thanks for the praise and feedback!

^ group array elements in groups of two
269440 [oga_emmanuel] arr= [1, 2, 3, 4, 5, 6, 7, 8]
+ 269442 [stefano.croc] require 'enumerator'
| 269447 [sepp2k googl] new = arr.enum_for(:each_slice , 2).to_a
+ 269444 [farrel.lifso] irb(main):012:0> require 'enumerator'
| 269451 [oga_emmanuel] very usefull. Thank you!
+ 269445 [james graypr] => [1, 2, 3, 4, 5, 6, 7, 8]
+ 269446 [w_a_x_man ya] On Sep 17, 10:18 am, Emmanuel Oga <oga_emmanuel_...@yahoo.com.ar>
+ 269449 [matz ruby-la] require 'enumerator'
  269459 [w_a_x_man ya] Nirvana at last!  I won a round of golf with
  + 269461 [phrogz mac.c] Perhaps, but you both sliced your shots.
  + 269462 [matz ruby-la] Well done, but your version does not work on 1.8. ;-)
  | 269511 [SimonKroeger] Will the world stop turning or am i just trapped in a parallel universe?
  + 269508 [SimonKroeger] cheers

^ how to use tuple as hash key
269450 [summercoolne] in Python, a hash key cannot be [1,2,3] but must be (1,2,3), a tuple.
+ 269453 [stefano.croc] ["a", "b"]
| 269469 [summercoolne] wow... this is deep... the reason I thought it uses the ID instead of
| 269566 [stefano.croc] This happens because you don't call h2.rehash after modifying the array you
| 269584 [summercoolne] actually if the code is
| 269587 [summercoolne] actually, i tried running it and watch ruby.exe in Windows or ruby in
| 269588 [stefano.croc] I think it's easier (and more efficient) to create a new array with the
| 269593 [summercoolne] that is already listed in the initial program.  the main requirement is
| 269597 [rick.denatal] But this code does meet this requirement.
| + 269599 [summercoolne] my application is this: i have an array with numbers in it.
| + 269602 [summercoolne] actually, my posting of "The meaning of a = b in object oriented
| + 269639 [summercoolne] fortunately, if the loop "dup" the key 100 million times, but the hash
+ 269463 [rick.denatal] Not sure that this is true, since I don't understand what you mean.

^ Using user supplied string String#include?
269455 [tobiasreif p] In a web app that will soon be out there in the vast and partially
269504 [jan.svitok g] No. Here it's perfectly safe - you have to call eval to evaluate #{},

^ Creating Arrays....
269465 [JNott dto.ie] charset="iso-8859-1"

^ Creating Arrays
269466 [JNott dto.ie] charset="iso-8859-1"
269575 [ronald.fisch] Since you want to mimic the spreadsheet idiom (a table of rows
+ 269581 [shortcutter ] Plus the reading / parsing could be done by a CSV library.
+ 269585 [w_a_x_man ya] On Sep 18, 2:39 am, "Ronald Fischer" <ronald.fisc...@venyon.com>

^ Re: launchy 0.3.1 Released
269468 [transfire gm] Thanks,

^ OpenGL?
269472 [fer.obbee gm] programming with Ruby...
269474 [ruby anthrop] It depends on your purpose. If you just want straight OpenGL, the

^ 3D-gfx + snd programming (like demoscene)
269473 [fer.obbee gm] Sorry, i've decided that i need any help in subj for Ruby...

^ Screen Scraping Advice
269475 [chuckdawit g] I work for Cisco Systems in San Jose Ca. I proposed a project to perform
+ 269489 [dangerwillro] Doesn't sound like much scraping, just searching text for a string.
| 269492 [chuckdawit g] Well, I disagree. Once I have all the websites with Cisco in its domain
| + 269498 [konrad tyler] charset="utf-8"
| + 269502 [dangerwillro] What I mean is, scraping usually relies on the document's structure
+ 269506 [brabuhr gmai] If someone knows of a super library that can recognize and interact
+ 269547 [flazzarino g] Hpricot
+ 269997 [glenn.gillen] I'm slightly biased, but scrubyt should be able to do most of the
  270083 [brabuhr gmai] require "rubygems"
  270228 [glenn.gillen] It's by no means a silver bullet, but could very well get you 80%

^ How do I parse a string to find a URL?
269479 [williams.jay] Is there a command in Ruby that will accept a string, and spit out a
269490 [jan.svitok g] ...
+ 269496 [williams.jay] Outstanding!
+ 269539 [dan-ml dan42] => ["behold:", "http://www.xyz.com."]
  + 269545 [flazzarino g] not a weakness, in that string 'behold:' is a valid uri, it has a
  | 269551 [dan-ml dan42] Is it a valid uri if nothing is present after the scheme? Anyway, I know
  | 269606 [flazzarino g] you could just select the ones with a scheme scpecific part? or screen
  + 269546 [flazzarino g] also the period is legal,

^ Cropping text strings
269493 [Cryptographi] This statement here can return a very long paragraph
+ 269495 [damnbigman g] openjob.ProblemDesc[0..49] should do the trick.
| + 269499 [fwmailinglis] charset="us-ascii"
| + 269501 [m_goldberg a] openjob.ProblemDesc.first(50)
| | + 269519 [Cryptographi] Thank you it worked great!
| | + 269836 [lists bertra] openjob.ProblemDesc[ 0, 50]
| + 269538 [dan-ml dan42] Hate to be anal, but that would return the first 50 *bytes*, not characters.
|   + 269561 [Rob AgileCon] ...
|   + 269600 [damnbigman g] Good point, I wasn't thinking in Unicode.
|     269730 [botp delmont] # > Hate to be anal, but that would return the first 50 *bytes*, not
|     269826 [damnbigman g] Nice!  I won't have to think in Unicode ;)
+ 269500 [Rob AgileCon] ...

^ [?] problem using set with hash objects
269509 [stephen.bann] I'm using set in the ruby standard library to produce collections of
+ 269516 [jan.svitok g] Your problem is in hash comparison. Set is internally using hash as
| 269525 [shortcutter ] This is only true for Strings - and even then only if the key is not frozen.
| 269548 [stephen.bann] Ribert, Stefano, and Jano, thanks for the pointers.
+ 269517 [stefano.croc] According to the ri documentation, Set internally stores items in a hash.

^ Re: IP to Country (#139)
269521 [erikveen gma] Class OrderedLinesFile implements method find_line, which is
269523 [erikveen gma] $ ruby quiz139.rb 0.1.1.1 1.1.1.1 2.1.1.1 3.1.1.1 4.1.1.1 5.1.1.1

^ Defining a Method
269528 [mac mackrack] I am new to Ruby from basic.  I am having a hard time getting my head
269530 [rick.denatal] buttonC.signal_connect("clicked") {
269531 [mac mackrack] Thank you, that did it for this one.  I thought something like this had

^ Is there a select and map for hashes instead of arrays?
269529 [cohen.jeff g] Hash#select and Hash#map return arrays.  In some cases I want to get
+ 269544 [flazzarino g] # use two vars in an map/select block (or use the index if one var)
| 269556 [cohen.jeff g] That was exactly my point - why doesn't Hash#select and Hash#map
| 269557 [james.herdma] My guess is because you need to enumerate over a Hash.  Recall that entries
| 269603 [rick.denatal] There's no problem enumerating over a Hash.  Hash#each is implemented
+ 269559 [botp delmont] # I can take the returned arrays and transform them back into hashes,
  269711 [cohen.jeff g] Thanks for the info.
  269832 [james.herdma] SGV5IEplZmYuCllvdSdyZSBpbiBsdWNrISAgVGhpcyBtb3JuaW5nIGFuIGFydGljbGUgd2FzIHBv

^ Re: [QUIZ] IP to Country (#139)
269533 [oksteev yaho] Yea it seems that mine will loop forever if you give an invalid ip address that evalutes to less than 0.  Changing to 'low < high' seems to fix that.  Also it incorrectly reports nil instead of no country on 0.0.0.0.  This is all running on the stock csv file (with comments), haven't tried it at all on a modified file.

^ retrieving yahoo! mail ?
269537 [dolgun excit] As an exercise, I'm trying to use Net::HTTP to retrieve my yahoo mail.
269540 [dolgun excit] response = http.post("/config/login?",
threads.html
top