287541-381197 subjects 287898-358777

from "int cfunc(char *data,int *num) " how can I get the value of  'num' in ruby/dl
287728 [dmkim@mk ec ] I have a question about "ruby/dl".

XML-RPC with client certificate
287730 [happy.madnes] I am struggling with the standard xmlrpc library and cannot figure out

Ruby Database Tutorials ( Oracle).
287732 [sayakyi@gm i] ...

LDAP Server not connected error
287735 [varun.rajesh] require 'net/ldap'
287752 [chiology@gm ] Pluck out the actual LDAP code into IRB and see if it works. I've not
+ 287758 [raasdnil@gm ] It will definitely work with the hash assignment - I do it here with
| 287839 [garbagecat10] ...
+ 287844 [varun.rajesh] Thanks for ur reply but i used ur code into irb but it's not
  287848 [varun.rajesh] Again if i made function like this
  287852 [raasdnil@gm ] Your "problem" is that your username and password are incorrect in the
  287855 [varun.rajesh] i am using the correct username and password but it's showing false and
  287856 [chiology@gm ] ldap.auth "username@ldap.server.com", "password"
  287858 [varun.rajesh] Sorry to have u disturb but i am new to LDAP server and RAILS
  287887 [chiology@gm ] You might need to check out your configuration of the LDAP server,
  288131 [varun.rajesh] Actually i made one function like this.

Foxit ole object
287736 [giel@de ek t] I'm looking for a way to make an ole object for Foxit (free pdf reader).

Kill Process by it's name
287738 [aart85@gm il] ...
+ 287747 [raasdnil@gm ] `taskkill /im excel.exe /f`
+ 287751 [larsch@be un] Here's a way that works well here, doesn't use OLE, and is even a sort
+ 287756 [tommy.nordgr] I'm not using win myself. But I've seen an example on killing
+ 287759 [petizinhio@g] ...

gsub and regexes on binary files...
287749 [kyleaschmitt] I'm having a few issues with gsubbing a regex on a binary file.
287783 [aledonne.lis] Could you send an example where the regex failed? Then we can try to
287809 [kyleaschmitt] I'll grab one off of the machine tomorrow.  Due to some of the

Ruby syntax in "respond_to do |format| line -- can clarify?
287757 [jbeall.ruby@] I'm new to both Ruby and Rails (I come from an ASP.NET/C# background,
+ 287765 [boss@ai bl d] Take heart, the code isn't entirely obvious if you're unfamiliar with
+ 287767 [andrew@an re] Joshua
  287812 [caduceass@gm] To illustrate this in a _very_ simple way...

new site for up-to-date Tk information
287760 [mark@ma kr s] I've recently launched a website to help people learn and use Tk,
287826 [justincollin] This looks really neat. Thanks for sharing.

syntax error on SQL statement
287763 [laredotornad] I'm using the latest version of Ruby for Fedora Core 6 Linux.  I want
287770 [frederick.ch] Fred

?? President Wilson Blackmailed by Samuel Untermeyer - How Brandeis  was appointed to the SUPREME COURT ??
287764 [thermate_911] ?? President Wilson Blackmailed by Samuel Untermeyer - How Brandeis

howto insert data into a database?
287766 [corrale211@g] I have a ruby script that I want to cron on a server. This script will
+ 287768 [chiology@gm ] If you'd like to not just execute a command in the Ruby script and
+ 287799 [hawat.thufir] Oooh, I really like your idea.  Is this open source?

Using RSpec to Describe Included Module Behavior
287771 [startrader@i] Greeting all,
287781 [nyarly@gm il] Try something like
287830 [pergesu@gm i] I would prefer to make a class, because if you intend to use include
287831 [ben@be ma ey] Why not just make a shared behavior and test the classes that you

lambda block doesn't work with upto iterator
287772 [eloyot@gm il] ...
+ 287773 [sepp2k@go gl] It has to be 0.upto(4,&proc2) or 0.upto 4, &proc2
+ 287774 [farrel.lifso] 0.upto(4,&proc2)
+ 287775 [radek.bulat@] PiA1LnRpbWVzICZwcm9jMgppcyB0aGUgc2FtZSBhcwo+IDUudGltZXMoJnByb2MyKQoKPiAwLnVw

Properly using Ruby's specialness
287776 [nefigah@gm i] I was recently reading a presentation on "10 things Java programmers
+ 287778 [jari.william] It seems like you want to read the book "Design Patterns in Ruby". It
+ 287780 [james@gr yp ] Open classes are best used sparingly.  There are problems with them, =20
| 287784 [rick.denatal] I think that rather than sparingly, the adverb should be carefully.
| 287786 [james@gr yp ] In an example in Practical Ruby Projects, the author has to load some
| 287792 [robert.dober] There is almost no Ruby quiz solution I have ever submitted that does
| 287803 [nefigah@gm i] Hmm... yeah, I think I may literally be too dumb for Ruby. I guess I
| 287905 [shevegen@li ] My personal rule of thumb is, that when something "appears" logical and
+ 287782 [fedzor@gm il] That was the correct way to do it! The advantage is you can

Re: howto insert data into a database? [fixed]
287777 [corrale211@g] Thanks for the tip, I'll look it.
292134 [hawat.thufir] Thank you, I'm sure that this will come in handy to insert data into

Re: Ruby syntax in "respond_to do |format| line -- can clari
287779 [jbeall.ruby@] Ok, I think I'm with you.  Correspondingly that would mean that I can
+ 287793 [justincollin] In this case { render :xml => @posts} is being interpreted as a Hash, not a block and that is messing things up for you.
| 287814 [jbeall.ruby@] So how do I construct the method call so that I can use parentheses?
| 287818 [justincollin] There is really no reason to do so in most cases, but you can if you
+ 287849 [boss@ai bl d] The syntax for a new hash and the syntax for a block can look the
  287896 [jbeall.ruby@] Ok, I follow all that now.  Thanks for the clarification!
  + 287968 [andrew@an re] Because the first one leaves Rails to deal with the responder and in the second, you're taking control.
  + 287991 [boss@ai bl d] You're welcome!

quick question
287787 [stu_09@ho ma] hey
287788 [coder68@ya o] Trick question!  There are no globals in ruby!  What do I win?
287789 [justincollin] Sorry...
+ 287790 [stu_09@ho ma] cheers guys
+ 287794 [coder68@ya o] Sorry.. I had a brain fart.. was thinking of methods.. should have read

require 'postgres'
287791 [redaudi@gm i] I'm trying to write a test application that queries a postgres
287810 [ondemannen@g] Not entirely sure I understand the problem with that statement.

DTrace segfaults on Leopard
287796 [win@wi ce t.] I'd like to use DTrace on Leopard to do some profiling of a Ruby app
288526 [careo@fa tm ] I can reproduce it every time. Happens without fail.
288528 [jmrepetti@gm] ...
288568 [linguist@gm ] ...
+ 288597 [a2800276@gm ] As far as I recall, I never got dtrace to work with irb at all. I'll
+ 288606 [laurent.sans] Yeah it seems to be a problem with the interpreter patch. I thought
+ 324044 [sfjuggernaut] Any update on this?  I'm still seeing this on OSX 10.5.6...

XML Validation
287797 [michel.casab] I need to validate XML documents in Ruby. I was told that REXML can't
287800 [vjoel@pa h. ] I wouldn't think of it. XML, now, that's something you don't need. ;-)
287806 [michel.casab] Well done ;o)

[SUMMARY] Counting Cards (#152)
287798 [james@gr yp ] Denis Hennessy put it very well when explained that there are two challenges to
+ 287811 [denis@he ne ] That's sweet. Time to go re-read Enumerable...
+ 287845 [gareth.adams] Easy to think that, but this is the exact same definition of a "naive algorithm"
  287860 [denis@he ne ] That's very interesting. The core of the bug is the the original

[ANN] wxRuby 1.9.4
287802 [alex@de et m] The wxRuby team is pleased to invite you to try the latest version of

Watir:  XML Element includes Escape Sequences
287804 [liscoo@sa ec] I'm working on a test script using Watir.  I'm new to Ruby and I'm
287808 [liscoo@sa ec] Never mind.  As soon as I posted, I figured it out.

CruiseControl problem. Broken Pipe?
287805 [mjin21@gm il] Build loop failed

Re: wxRuby 1.9.4
287813 [x11@ar ur z.] Cool ;)
+ 287816 [fedzor@gm il] There's one that I've found, called FarPY, which was initially for
+ 287841 [alex@de et m] There are numerous free and commercial GUI builders for wxWidgets, and
  287894 [dan@fl en ra] I'd love to give this a go for my latest project, but there's one thing
  + 287908 [jari.william] Best regards,
  + 287919 [alex@de et m] Thanks for the interest, but unfortunately there's nothing that meets
    + 287924 [devi.webmast] The one toolkit I know it's possible with is GTK, because Kazehakase uses it.
    + 287930 [dan@fl en ra] Thank you for your replies. WxRuby looks very nice though! Looking
      287995 [dominikho@gm] In my opinion, a binding to wxWidgets is a great chance for GUIs with ruby, but I'm wondering, if its very ruby-like.
      288107 [alex@de et m] As the tutorial front page warns, some of that material is dated. Much
      293613 [tao.wang.usa] Alex,
      293625 [dominikho@gm] Replace the line "load 'wx'" with "require 'wx'" and it should work. Its somewhere at the top.

[ANN] gem 'rufus-verbs' released
287817 [jmettraux@op] == what is it ?
+ 287859 [hutch@re ur ] You'll be able to not do this right?
| 287970 [jmettraux@op] Yes, the current behaviour should be the default. This greedy option
+ 287863 [hutch@re ur ] I also meant to say thank you. I think this will be put to very good
+ 287873 [m.fellinger@] Do you plan on adding automatic cookie handling?
  287972 [jmettraux@op] Yes, thinking about adding this to the EndPoint. But wondering if this

passing method references in python & ruby
287819 [rpardee@gm i] Hey all,
287828 [justincollin] irb(main):001:0> def dostuff(whichway, arg1, arg2)
+ 287881 [shortcutter@] #dostuff is really superfluous because the way you defined it it's
+ 287897 [rpardee@gm i] Ah--that is nicer--thanks!
  + 287914 [radek.bulat@] SW4gcHl0aG9uIHdoZW4geW91IHVzZSBtZXRob2QgbmFtZSB3aXRob3V0IHBhcmVudGhlc2lzZXMg
  | 287917 [justincollin] def doStuff(whichway, first_arg, second_arg)
  | 287989 [shortcutter@] Yeah, but do you really consider
  | 288034 [justincollin] Clearly this is just a toy example to show options for how one might
  | 292316 [q8pb97u001@s] What bugs me about ruby is that I can't do this
  | + 292317 [celtic@sa ry] ...
  | | + 292318 [celtic@sa ry] ...
  | | + 292319 [robert.dober] Oh you might do this even very often if you are writing Ruby1.8/1.9
  | | | 292321 [q8pb97u001@s] Could you both elaborate?  I'm not sure what it would mean to
  | | | + 292322 [q8pb97u001@s] I'd like to pass a surround method into another, where the surround
  | | | | 292323 [decoux@mo lo] Wait for 1.9, it will be easy to do it. It's marked actually as an "known
  | | | + 292331 [robert.dober] Symbol#to_proc exists in Ruby1.9 standard, if you want to have
  | | + 292508 [shortcutter@] Not necessary.  Here's another approach that has the added advantage
  | + 292320 [sepp2k@go gl] [3,6,8].map(&method(:add_one))
  + 287994 [robert.dober] Well that is good, but for the wrong reason :(
    287996 [decoux@mo lo] Without this restriction you can write
    287998 [robert.dober] Bad example of mine, what disturbs me is the following

? regarding Executing/Spawning Ruby calls in parallel
287820 [venkatesh.ma] I have "X" number of databases running and I need to send a query

what are your paths to gem?
287821 [dangerwillro] I'm writing an OS X GUI app that works with the gem command line tool.

from "int cfunc(char *data,int *num) " how can I get the value of  'num' in ruby/dl
287822 [dmkim@mk ec ] have a question about "ruby/dl".

from "int cfunc(char *data,int *num) " how can I get the value of  'num' in ruby/dl ?
287823 [dmkim@mk ec ] I have a question about "ruby/dl".
287824 [jameskilton@] ...
+ 287825 [konrad@ty er] charset="utf-8"
+ 287834 [kbloom@gm il] Calm down. The same message, posted two minutes apart, probably means a
  287836 [konrad@ty er] charset="utf-8"

Needing help using Rake from within a Ruby program
287829 [btricha@gm i] ...
287832 [gthiesfeld@g] Did you require the rakefile in you code?  rake does so automatically.
287833 [gthiesfeld@g] Wow, that was very terse.  Even for me.  What I mean is that the rake
287835 [btricha@gm i] ...
287867 [gthiesfeld@g] I was a little off.  I don't think you can use require, but you can use load.

Creating unit-test where RE required
287837 [RichardDummy] I have a Search class with a :nameRE setter which may validly be
287838 [ pm@ub t. om] You are using assert_raise improperly.  It should be
287961 [RichardDummy] Thanks for the reference.

go to specific char in a file
287842 [tabing16@ho ] I am looking for a way to get to a specific character in a file.
287843 [stefano.croc] Using a regexp is not the clearer way to do it, in my opinion. However, you
287847 [tabing16@ho ] thanks for the speedy reply and solving it
287878 [ljjarvis@gm ] Something like..

succ question of ip addr string
287846 [macro.peng@g] I have a ip addr string as "", I use succ! method to get
287872 [fwmailinglis] Instead of strings, use the IPAddr core class to represent IP addresses.
287876 [macro.peng@g] It works. Thank you very much!

Start a program, get it's output, then kill it. while  "multithreading"...
287851 [deadolus@gm ] i'd like to program a gui for iperf (http://sourceforge.net/projects/
287853 [shortcutter@] First of all killing a thread won't help because the process is in no
+ 287911 [deadolus@gm ] io = IO.popen("ping google.ch") #open a new io
+ 287927 [thgfrj@gm il] It's a little hard to find until you already know where it is, but
  287988 [shortcutter@] Thanks!  I use #popen too infrequently and when I use it I do not
  288195 [deadolus@gm ] I wasn't really happy about my solution, so I continued
  288209 [ara.t.howard] if you care about stderr this won't work on windows or nix.  threads,

Create variables with caller scope
287854 [jari.william] Is it possible for a method to create new variables that becomes in the
287861 [jftran@ru yf] Why not using a block ?
287864 [jari.william] Because the created variables will "only" get block scope, if I
287866 [shortcutter@] ks.

Aliasing class methods
287857 [btricha@gm i] I'm having trouble aliasing class methods. I've tried the following,
287862 [stefano.croc] The alias statement is executed as soon as it's found, i.e before Foo.bla is

[QUIZ] Longest Repeated Substring (#153)
287869 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 287874 [james@gr yp ] Posting the strings you find in a given text and/or timings is not a
+ 287884 [denis@he ne ] Should white space and punctuation be treated as part of the
| 287886 [james@gr yp ] I vote that we treat all characters equally.
+ 287889 [dave@pr gp o] Must they be adjacent, or does "aaabaaa" contain the repeating
| 287890 [james@gr yp ] They do not have to be adjacent.  aaa would be a valid answer for
| 287892 [gattster@gm ] I hope I get some time to take a shot at this one. It looks like fun.
+ 287929 [kbloom@gm il] =-=-=-=-=
+ 288072 [denis@he ne ] Here's my solution to the quiz. It's has O(n) behaviour and takes
+ 288073 [justin.ethie] ...
| 288086 [dave@pr gp o] My hack at the substring problem (nice one, James) is based on suffix
+ 288090 [guillaume.ca] Here is my solution using Suffix arrays
+ 288135 [dido.sevilla] I'm guessing that someone wants to break a Vigenere cipher.  The
| 288200 [jamesbkoppel] My solution finds substrings of length n, groups the identical ones together in a hash of their starting indices, prunes out cases where two of the "repeated" substring overlap each other, and then looks in the same places for substrings of length n+1.
+ 288227 [gm.vlkv@gm i] ...
+ 288240 [ursmr@gm .c ] thought first of two loops, one that moves the start position

using ruby to validate web pages
287875 [bondkate@go ] # the Watir gem
288389 [lrlebron@gm ] Your are missing the "puts" before the "URL # does not validate"
288432 [s.korteling@] If you had 200 pages to validate, you'd have to correct 200 lines of
288505 [bondkate@go ] Siep,

Avoiding Copy errors in Test::Unit (PATCH to Test::Unit::TestCase)
287879 [rocky@pa ix ] I use Test::Unit a lot, and a lot of the times I create a new test by
287883 [djberg96@gm ] I like it. However, I should point out that you'll already get a

Not able to click on pop-up window in watir
287882 [bhavesh1_sha] I have to create an script where i have to open an page in IE7.
287920 [kyleaschmitt] 1.  Popups are the bane of watir.  If you can't use wet or autoit
287981 [bhavesh1_sha] Thanks Kyle,

Request for new gem (DDE)
287893 [ernst@ta ak ] A request for senior rubyist to write a DDE Gem.
287900 [junkone1@gm ] I second that. I just dont know much ruby or dde mechanics to

[ANN] Thin 0.5.3 Purple Yogurt release
287895 [macournoyer@] Hey all,
287962 [cwdinfo@gm i] This has been working so well on my Mac dev machine, I built it out on =20=
+ 287966 [macournoyer@] someone reported that the --user and --group options are not working : =
+ 287973 [hutch@re ur ] Any luck with restarting or stop/start of apache?
  287984 [cwdinfo@gm i] Got it up and running ... for a while. It's running as root/root and
  287999 [macournoyer@] Thin runs in a single thread, no need for a mutex there.
  288001 [radek.bulat@] QW5kIGV2ZW4gaWYgaXQgd291bGQgYmUgbXVsdGkgdGhyZWFkZWQgaXQgd29uJ3Qgd29yay4gRXZl
  288002 [radek.bulat@] PiBBbmQgZXZlbiBpZiBpdCB3b3VsZCBiZSBtdWx0aSB0aHJlYWRlZCBpdCB3b24ndCB3b3JrLiBF
  288019 [cwdinfo@gm i] Oooooh, you're right. Unlock is called twice. This is code in a Rails  plugin, and I know that's no disclaimer of responsibility for its
  288029 [radek.bulat@] T2YgY291cnNlIGl0IGRlcGVuZHMgb24gc3BlY2lmaWMgc2l0dWF0aW9uIGJ1dCBpbiBhYm91dCA5
  288030 [cwdinfo@gm i] I have a rescue_exception function but this problem is happening in a  place where it kills off the server. It doesn't do the same with
  288031 [radek.bulat@] PiBJIGhhdmUgYSByZXNjdWVfZXhjZXB0aW9uIGZ1bmN0aW9uIGJ1dCB0aGlzIHByb2JsZW0gaXMg
  + 288035 [cwdinfo@gm i] Typically, I use Apache proxied to mongrel. It, evidently, does gobble  up ThreadError. This was a proof of concept for Apache proxied to
  + 288210 [cwdinfo@gm i] You were exactly right about the problem being that the mutex was
    288247 [macournoyer@] hey steve,