similar to: Accessing ''many'' variables

Displaying 20 results from an estimated 2000 matches similar to: "Accessing ''many'' variables"

2006 Sep 11
15
ruby method names
Hi Attached is a patch that adds aliases to the API for methods that look like attribute accessors. So a_frame.set_title(''The title'') # currently a_frame.title = ''The title'' # now an alternative textctrl.get_value # currently textctrl.value # now an alternative Also, C++ methods named ''IsXXX'' are now exposed in ruby with
2006 Jul 30
8
Method_missing from Ruby for Rails book
I''m having a problem getting this example from the book to work: class Cookbook attr_accessor :title, :author def initialize @recipes = [] end def method_missing(m, *args, &block) @recipes.send(m, *args, &block) end end cb = Cookbook.new cb << recipe_for_cake cb << recipe_for_chicken beef_dishes = cb.find_all {|recipes| recipe.main_ingredient ==
2006 Jul 17
14
REST Relationship Models
I''m trying to figure out an elegant way to do this: I have the following three tables: people, employer, employees And consequently the following three models: class Person < ActiveRecord::Base end class Employer < ActiveRecord::Base has_many :employees end class Employee < ActiveRecord::Base belongs_to :person belongs_to :employer end I want to be able to say:
2003 Mar 23
2
Convert you FXS port to FXO cheap
If you have an FXS port and would like to attach a PSTN analog line to it this device would do the job by converting the FXS port to FXO. It's a small external device. Works well with VOIP FXS and other FXS interfaces. Interface: 2 RJ11 Jacks (one for the FXS port and one for the PSTN outlet.) Cost: $35.00 with USPS regular mail included. Power: 9 to 20V dc power supply (Not
2006 Aug 08
12
delete_if doesn''t work for has_and_belongs_to_many
I''m using Rails-1.1.4 with Ruby-1.8.4 So let''s say I have 2 model classes: class Item has_and_belongs_to_many :things end class Thing has_and_belongs_to_many :items end i = Item.new i.things << Thing.new( :value => "Something").save i.things << Thing.new( :value => "Something Else" ).save i.save Fine, now I have two records in the
2006 Apr 27
5
ERb on he command line re: Ruby For Rails book
Hi, I am working thru the Ruby for rails book. On page 30 David Black talks about running erb from the command line i.e. $ erb erbdemo.rb just as you would a normal ruby prog ($ ruby erbdemo.rb) but when I try to do this I get command not found. How do I make this work? I am running Linux (Ubuntu Breezy) Regards, Paul
2020 Feb 10
2
Re: [libnbd PATCH 1/1] generator: Add support for NBD_INFO_INIT_STATE extension
The idea and patch is fine, but I wonder if it would be more useful to callers if it was exposed as two separate APIs. Callers would then not need to deal with masking out unknown flags, and it works more like the other is_* / can_* ("flag calls") we already have. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and
2006 Feb 10
15
"Ruby for Rails" in early access release
Hi -- My book "Ruby for Rails" is now being released one chapter at a time through the Manning Early Access Program, with the whole book due to appear on May 1. If you''re interested, see http://www.manning.com/books/black (I guess I could have just sent my sig with no body, but anyway :-) David -- David A. Black (dblack@wobblini.net) Ruby Power and Light
2006 May 11
7
[ANN/ADV] Ruby for Rails now published in paper!
Hi -- I''m on the road, so I haven''t laid eyes on it yet -- but word on the virtual street is that "Ruby for Rails: Ruby techniques for Rails developers" is now out in paper. It will probably take a little longer to trickle to your neighborhood Barnes and Noble... but you can order it now from the publisher. See http://www.manning.com/black. And trickle it will, too.
2006 May 31
7
How to render from with <%%> ?
I have a loop that I iterate through in my view. <% coll.each do |itm| puts(itm.value) end %> How do I render the itm.value without using a <%= %> tag? Should puts not work? Joerg P.S. There is a good enough reason for me wanting to do this :-) -- Posted via http://www.ruby-forum.com/.
2006 Mar 20
11
has_many brings back ''uninitialized constant''
hello. first things first - I am new to ruby on rails (ruby, too), so I''m figuring this is just a basic newbie error. I''m creating a basic photography website. And I have two tables with a relationship: photos: - id (set up as PK) - title - shutter - aperture - date - the_order ...etc photo_comments: - id (set up as a PK) - photos_id (set up as a FK) - author - date -
2006 Jun 09
1
any errata for second printing of "Ruby for Rails"?
Hi all -- The second printing of "Ruby for Rails" is happening soon. If you''ve spotted any small errors, let me know... like... *very* soon :-) (I want to know about large errors too, but those fixes won''t make it into this printing :-) Thanks! David -- David A. Black (dblack@wobblini.net) Ruby Power and Light, LLC (http://www.rubypowerandlight.com) See what
2018 May 12
5
Tripp Lite SU5000RT3U
On May 8, 2018, at 10:05 PM, Charles Lepple <clepple at gmail.com> wrote: > >> I'm new to this, so let me know what you need from me and I will try my best. This UPS does power our production servers, so shutting things down aren't an easy task, but this weekend might open up some opportunity for that if need be. If I need to test it by unplugging the main power, that I can
2023 Nov 18
1
APC Modbus support is finally here!
Got an update for APC Modbus users: a new PR is waiting for real-life testing for settable variables and instant commands support. https://github.com/networkupstools/nut/pull/2184 As before, a custom build of libmodbus may be needed for USB support (detailed in the earlier PR), but Serial and TCP may already be well served by a distro near you! Jim On Sun, Oct 22, 2023, 01:08 Jim Klimov
2023 Nov 18
1
APC Modbus support is finally here!
Got an update for APC Modbus users: a new PR is waiting for real-life testing for settable variables and instant commands support. https://github.com/networkupstools/nut/pull/2184 As before, a custom build of libmodbus may be needed for USB support (detailed in the earlier PR), but Serial and TCP may already be well served by a distro near you! Jim On Sun, Oct 22, 2023, 01:08 Jim Klimov
2023 Nov 22
1
APC Modbus support is finally here!
Great! Thanks for the info, and hope the driver author can address the nits (forwarding now...) Jim On Wed, Nov 22, 2023, 15:05 d tbsky <tbskyd at gmail.com> wrote: > Jim Klimov via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> > > > > Got an update for APC Modbus users: a new PR is waiting for real-life > testing for settable variables and instant commands
2023 Nov 22
1
APC Modbus support is finally here!
Great! Thanks for the info, and hope the driver author can address the nits (forwarding now...) Jim On Wed, Nov 22, 2023, 15:05 d tbsky <tbskyd at gmail.com> wrote: > Jim Klimov via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> > > > > Got an update for APC Modbus users: a new PR is waiting for real-life > testing for settable variables and instant commands
2023 Nov 24
1
APC Modbus support is finally here!
I believe some fixes were applied to the branch since your report (most visibly, about battery time settings), are you in position to test how it behaves now? :) Thanks in advance, Jim Klimov On Wed, Nov 22, 2023 at 3:20?PM Jim Klimov <jimklimov+nut at gmail.com> wrote: > Great! Thanks for the info, and hope the driver author can address the > nits (forwarding now...) > > Jim
2023 Nov 24
1
APC Modbus support is finally here!
I believe some fixes were applied to the branch since your report (most visibly, about battery time settings), are you in position to test how it behaves now? :) Thanks in advance, Jim Klimov On Wed, Nov 22, 2023 at 3:20?PM Jim Klimov <jimklimov+nut at gmail.com> wrote: > Great! Thanks for the info, and hope the driver author can address the > nits (forwarding now...) > > Jim
2023 Nov 22
1
APC Modbus support is finally here!
Jim Klimov via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> > > Got an update for APC Modbus users: a new PR is waiting for real-life testing for settable variables and instant commands support. > > https://github.com/networkupstools/nut/pull/2184 > > As before, a custom build of libmodbus may be needed for USB support (detailed in the earlier PR), but Serial and