269766-271136
269542-271087 subjects 269935-277412
^ convert a line with whitespaces into a string containing lin
269766 [hariharan.sp] Dear Friends,
269767 [fxn hashref.] str = "\n\n"
^ Re: convert a line with whitespaces into a string containing
269768 [hariharan.sp] very very Thank you.
269774 [fxn hashref.] Hmmmm... just in case, that was kind of a joke about the strict
^ Read and workout the program after you have to post.
269771 [hariharan.sp] Dear Friends,
^ Convert numbers from one base to another
269773 [hariharan.sp] Hai friends,
^ Parse XML that isn't well formed
269775 [knirirr gmai] I have some XML looking like the following, other than being very much
+ 269780 [cliveharber ] <?xml version="1.0" encoding="UTF-8"?>
+ 269898 [aledonne.lis] Note that there should be no </xml> - the line at the top is a
270030 [knirirr gmai] Good point about the XML. Unfortunately, these are the files I have
270183 [jan.svitok g] You should have done two things: 1. add root node <server> (with
270186 [knirirr gmai] Great, thanks.
^ what is the uses of inject()
269776 [hariharan.sp] Can anybody tell me the answer.
+ 269786 [sepp2k googl] It allows you to combine the elements of an array using a block (passing the
+ 269788 [anders.u.per] On 19 Sep, 12:06, Vellingiri Arul <hariharan....@rediffmail.com>
| 269792 [hariharan.sp] very very thank you friends.
+ 269790 [shortcutter ] A general hint: search engines can go a long way in helping answering questions.
^ how can I connect ruby with postgreSQL
269777 [hariharan.sp] Dear Friends,
269964 [d_rems yahoo] Google for "ruby DBI"
269970 [hariharan.sp] Ok Friends,
269989 [mailing.mr g] RFTM
^ replace multiple patterns of a string in single pass
269778 [hariharan.sp] Dear Friends,
269824 [cohen.jeff g] On Sep 19, 5:13 am, Vellingiri Arul <hariharan....@rediffmail.com>
269848 [daniel.akeru] What you need to do is put multiple regular expressions into String#gsub
^ how can I remove all the comments in my c program.
269779 [hariharan.sp] Dear Friends,
+ 269781 [sepp2k googl] The most simple regexen would be %r(//.*$) to match single line comments
| + 269784 [hariharan.sp] Hai,
| + 269809 [dan fluentra] It is actually possible to do this reliably using regular expressions,
+ 269793 [ a b.com] Why would anyone want to remove the comments from a program?
| 269822 [mailing.mr g] becouse they have to release it as open source becouse of GPL or other
| + 269846 [peter semant] Can we have the name of the company / project please. I wish to add it
| + 269886 [konrad tyler] charset="utf-8"
| 269921 [mailing.mr g] well, i had "pleasure" of having internship in company which policy was
| 269937 [ a b.com] snip
| 269939 [cdcarter gma] Nowhere did the OP state that this is the reason. Someone else threw
| + 269941 [phlip2005 gm] Worshipping comments is an intermediate, not advanced, behavior.
| | 269987 [mailing.mr g] well, i guess this flamewar is becouse of me, so... it's of course
| | + 269996 [peter semant] Some programmers seem to think that comments are an excuse for badly
| | + 270002 [paulymer5ml ] Perhaps the original poster is going to run some custom code metrics
| | 270003 [hariharan.sp] What do you want?Why are you scolding me like that.
| | 270007 [paulymer5ml ] We're curious why you want to strip out comments, and whether it may
| | + 270009 [cliveharber ] I would say that if you had been open about your reasons for wanting to remove the comments from the C code then you would have got a better reception. You still haven't given a clear and open reason for doing this, instead you are hiding behind the "I'm the wounded party here" clause.
| | + 270010 [hariharan.sp] I am also working in software company.
| | + 270230 [ara.t.howard] man lint
| | + 270231 [ara.t.howard] sorry, i meant
| + 270211 [ a b.com] I was referring to the GPL comment dodge.
| 270233 [ara.t.howard] people need to step back and realize that this is a religious issue
| 270309 [ a b.com] snip
+ 269838 [ara.t.howard] /* comment be gone */
+ 269938 [caduceass gm] Please try to meet your helpers half way.
^ Week number
269782 [citrix_linux] I¡Çm newbie on Ruby and I like to know how I can manage to print out the
+ 269785 [hariharan.sp] Dear Ilias,
+ 269794 [lists bertra] require "date"
269830 [citrix_linux] Thanks Bertram!
^ iterate over a series of alphabetically increasing strings
269783 [hariharan.sp] Dear Friends,
269787 [shortcutter ] alphabetically_increasing_strings.each {|str| ...}
^ Re: iterate over a series of alphabetically increasing strin
269789 [hariharan.sp] Yes,
269797 [sepp2k googl] Then use Enumerable#sort
^ Indenting strings - elegant alternatives?
269796 [ronald.fisch] Given a string of lines (for example, "abc\nde\nfgh\n") and a number n,
+ 269801 [dan fluentra] " "*n + s.gsub("\n", "\n"+" "*n)
| 269807 [ronald.fisch] Indeed! Thank you for pointing this out!
+ 269803 [fxn hashref.] s.gsub(/^/, ' ' * n)
| 269818 [lists bertra] Or even
+ 269805 [w_a_x_man ya] On Sep 19, 6:13 am, "Ronald Fischer" <ronald.fisc...@venyon.com>
+ 269960 [fzagarzazu g] something like this?
269984 [lists bertra] /\b/ always matches before and after /\w+/.
^ Is it possible to change TCP/IP settings of your computer using Ruby
269802 [enogrob gmai] I would like to have easier and fast way to change the TCP/IP settings
269804 [jan.svitok g] if you're on windows, you can use WMI through Win32OLE, or netsh via
^ Dynamic detection of bang and question methods
269812 [augustlillea] I got this idea of a sort of neat syntatic sugar of bang (foo!) and
+ 269845 [sepp2k googl] You could implement something similar for ?-methods, but I don't see the
+ 269847 [rick.denatal] It doesn't seem to carry it's own weight so as to merit the
270074 [augustlillea] I would, however, argue that bang_given? would look a lot more clean.
270076 [sepp2k googl] Unless there's something I'm missing, I *did* implement this and actually it
^ YAML & readlines & modify text files
269813 [endege gmail] In ruby I'm trying to read all *.txt files in the current folder and
269834 [stefano.croc] I'm not at all sure I understand correctly what you want to do. I think you
269879 [endege gmail] You are correct, that is what I want!
269888 [stefano.croc] I think it's because of a mistake in my code: the [1] part of line 45
269910 [endege gmail] Stefano thanks for your replies so far.
269913 [stefano.croc] There's nothing obvious in the problem you're having (at least, not obvious
269925 [endege gmail] First of all thanks for all your help so far.
269926 [stefano.croc] This changes everything. I assumed (according to the example lines you posted)
269932 [endege gmail] All I can say is that in each text file there will only be one Name-
269934 [stefano.croc] If each file contains only one Name-line and one instance of the corresponding
269982 [endege gmail] Thanks for your reply Stefano!
269985 [stefano.croc] Another couple of mistakes on my part, I'm afraid. This should work
270006 [endege gmail] Thank you Stefano! Works like a charm now :)
+ 270017 [endege gmail] And I have another question since I couldn't find anything about this
| 270019 [endege gmail] City": NYC in the YAML file :)
+ 270366 [stefano.croc] I've been using ruby for about two years. And don't worry: you only need a
^ 1.class vs method1.class
269814 [summercoolne] so 1.class will give Fixnum...
+ 269817 [james graypr] => nil
+ 269819 [mailing.mr g] becouse foo returns what puts returns and it's nil, and nil have NilClass
^ How to compute Sunrise / Sunset ?
269816 [joepetrini g] I need to compute sunrise/set times in ruby for a given long lat. Does
+ 269820 [mailing.mr g] sunrise/sunset differ based on location and time, i think there are very
| + 269823 [summercoolne] and it changes during the year too...
| + 269837 [ ssbm2 o2.pl] Moderately complicated, I would say ;)
| + 269840 [joepetrini g] I found some python code to do it. It's pretty complicated and before I
| | 269844 [mailing.mr g] well looks like 3/4 of the code is simple unit exchange, anyway if you
| + 269842 [mailing.mr g] did you actually read article, to use that "moderately" complicated
+ 269849 [ ssbm2 o2.pl] I found solutions in basic, common lisp and java. No Ruby :(
+ 269854 [ ssbm2 o2.pl] I overlooked straight solution...
+ 269855 [kbloom gmail] I have previously posted code for this at
| 269861 [joepetrini g] I just came across that and had a little trouble getting it working but
+ 269906 [ara.t.howard] this is a c extension to nrel's c code: which is about as accurate as
^ https authentication & storing https page in string
269825 [email dhanuk] I have to write a ruby script which will give me the dynamic page on a
+ 269827 [email dhanuk] I forgot to say that the URL of the dynamic page is static.
+ 269829 [cmdjackryan ] Either do the authorization via Ruby Net::HTTP, or use the cookie the site
^ unsubscribe
269835 [nick314 gmai] unsubscribe
^ open uri buf read overflow
269839 [chuckdawit g] I'm using open-uri to open approx 3500 web pages to check to see if they
^ Open Source CMS project started Volunteers needed
269843 [amaurya bric] We have started a Open Source CMS Project based on Ruby on Rails . We
+ 269853 [jameskilton ] Care to post details on why you think we need another Rails CMS and why the
| 269859 [amaurya bric] Radiant is not active or has very slow development cycle . furthermore
| 270000 [glenn.gillen] John, Daniel, and Sean are very active on the Radiant list, and a
+ 269864 [jaimeiniesta] What kind of CMS are you thinking of? Blog, e-commerce, portal, or
^ ruby and paths
269850 [fibre_optic ] $ruby -v
269858 [stefano.croc] ruby -e 'puts $:'
269872 [fibre_optic ] ./configure \
^ Re: IP to Country (#139)
269852 [ruby thomasz] mark@server1:~/rubyquiz/139$ time ./ip2country.rb 195.135.211.255
269857 [james graypr] Pretty clever.
^ special Array method about Unix pathes
269862 [unbewusst.se] forbidden = ["/Volumes/U3 System",
+ 269865 [charleshixsn] Array doesn't seem the proper class to have a includePath? method,
| + 269866 [sepp2k googl] self.any? {|x| path.starts_with?(x) }
| | + 269869 [unbewusst.se] fine thanks, i didn't know the #any?
| | + 269896 [shortcutter ] You can even leave the "self." out. :-)
| | 269909 [unbewusst.se] OK !
| | 269918 [shortcutter ] If it's sorted anyway that's probably the approach I'd take.
| | 269963 [unbewusst.se] i've found a simpler approach, in fact, this list of pathes is entered
| + 269870 [unbewusst.se] i'll lokk if there is something more related to Unix pathes...
+ 269890 [stefano.croc] def select_toplevel_paths arg
| + 269895 [nobu ruby-la] i.rindex(j, 0) is faster than i.index(j) == 0 when j matches in
| + 269907 [unbewusst.se] clever solution, thanks a lot !
| + 269911 [stefano.croc] nil
| + 269914 [unbewusst.se] forbidden = [
+ 270046 [gareth.adams] In contrast to everyone else's points about your naming, I'm not happy with your
^ scraping web pages for cisco products
269873 [chuckdawit g] I submitted a post a few days ago about scraping the web for Cisco
+ 269877 [damnbigman g] Not to make your problem worse but you will need to differentiate between
| 269878 [damnbigman g] I don't remember who but someone suggested using Froogle and parsing that
| 269882 [konrad tyler] charset="utf-8"
| 269897 [chuckdawit g] But see I need to use only the list that I have with Cisco in the domain
| + 269899 [konrad tyler] charset="utf-8"
| + 269900 [damnbigman g] Why is the domain important if you are looking for fraudulent equipment
| 269901 [chuckdawit g] I'm looking for copywright infrigment on Cisco's name 2. So I'm not only
| 269905 [damnbigman g] Kind of smelled like it. Too heavy handed for me, sorry.
+ 269916 [brabuhr gmai] www.cnn.com
| + 269936 [chuckdawit g] With this method do I need to know the name of the form to use it? With
| | 269943 [brabuhr gmai] It helps to know someway to distinguish the form you're looking for
| | 269962 [chuckdawit g] I agree but I have around 2000 sites to look at and I can't look at each
| | 269972 [phelan tttec] This query seems to work
| + 270100 [chuckdawit g] I'm checking the size of the form like in the code above but when it
+ 270146 [caduceass gm] I suspect that if Cisco has a problem with counterfeit products that
^ exceptions and eval'ing a string
269874 [christopher.] Here's my situation
+ 269881 [christopher.] sorry, there's a typo in the example, that eval line should read
+ 269884 [jan.svitok g] You can handle those exceptions by adding 'rescue' clause to your run method.
+ 269919 [shortcutter ] I'd say you get a syntax error here.
^ Spam from leaked (?) user details
269889 [rubfor recit] I get a disturbing amount of email spam addressed to the email address I
+ 269891 [sepp2k googl] Anyone with usenet access can download your messages from comp.lang.ruby and
+ 269892 [cmdjackryan ] Your email is clear text *at least* on usenet.
^ Do C Extensions Block Ruby?
269902 [wayneeseguin] charset=US-ASCII;
+ 269904 [nobu ruby-la] Yes.
| 269924 [vjoel path.b] ...except when you call back into ruby from your C code (right?). Then
| 270044 [wayneeseguin] charset=US-ASCII;
| 270055 [ilmari.heikk] Or rb_funcall(). Basically any call that executes ruby code.
| 270060 [gethemant gm] rb_funcall() is slow as shit, avoid it if you can.
| 270069 [ilmari.heikk] And logging touches disk, not like the 10 usec or so spent in rb_funcall
| 270073 [wayneeseguin] charset=US-ASCII;
| + 270091 [drbrain segm] Most of the C functions in IO will allow threads to be switched.
| | 270092 [wayneeseguin] charset=US-ASCII;
| | 270105 [drbrain segm] io/nonblock.rb and IO#read_nonblock should get you started.
| + 270096 [garbagecat10] You might mention this to Kirk Haines. He 's already written an asynchronous
| 270099 [wayneeseguin] charset=US-ASCII;
+ 269930 [gethemant gm] You may be aware but you can use rb_thread_schedule() for letting your
270041 [wayneeseguin] charset=US-ASCII;
270053 [gethemant gm] Yes, once you are finished with your Ruby thread and assuming no other
^ statistical software and data transformation?
269908 [irishhacker ] How many ruby-ists have to do statistical analysis or data cleaning
+ 269946 [znmeb cesmai] I do a lot of data cleaning/pre-processing. Most of it is numerical data
| + 269947 [james graypr] We're all hurt Ed. You know how we enjoy those, "Help me extract
| | 269954 [znmeb cesmai] Hey, I *started* with "nawk" ;)
| + 269948 [jmettraux op] I haven't had a chance to play with it. It seems a bit Rails-focused.
| + 269955 [znmeb cesmai] Yeah ... I've seen that too. Then again, when it comes to databases and
| + 270008 [anthonyeden ] FWIW, ActiveWarehouse has a Rails plugin on one side but it also has
+ 270025 [aff28 delete] I use Ruby quite a lot at work for data cleaning, transformation and
270155 [znmeb cesmai] Interesting ... how does Ruby compare with other languages for this
270559 [aff28 delete] Ruby works nicely for generating SPSS syntax, mainly because of its
^ How to install RoR on chrooted environment
269923 [fibre_optic ] /home/user1/tmp/root_fs/.....
269933 [jan.svitok g] [Obvious note] This question is (at least partially) better asked on
269979 [fibre_optic ] First of all thank you Jano for the prompt answer.
270001 [jan.svitok g] Just a quick hin, I don't have more time now.
270049 [fibre_optic ] it seems it still doeas not work for some reason...
270063 [chris.lowis ] Should read
270087 [fibre_optic ] "(in /tmp/0/testapp)
^ cgi scripts don't know hostname
269927 [mark.pelleti] Forgive me if this is a dumb question, but it's got me stumped.
270222 [mark.pelleti] It turns out that the cgi scripts run this way have an empty or at least
^ How to parse a unicode url?
269931 [nerdytenor y] I would really like to be able to do the following. Is this even
269961 [dolgun excit] require "uri"
269967 [shortcutter ] There is no such thing as a Unicode URL. The RFC for URI and URL
269973 [dolgun excit] According to wikipedia, all those characters are valid for a uri.
+ 270013 [ollivier.rob] They are but host & domain names do not accept Unicode characters at all and are limited to 7 bits ASCII. Search for IDN for more information.
| 270059 [nerdytenor y] I thought this might be the case. However, typing the following into
| 271062 [celtic sairy] That's because Firefox automatically translates into the equivalent IDN;
+ 271136 [drbrain segm] It says that what characters are valid for each piece of a URI is
threads.html
top