Hi everyone,
We're going to be moving this group to the new Yahoo! Developer Network
forums. This group will be closing at the end of March.
The forums will make it easier and faster to get answers, as you will
be able to search for answers from other related groups, too.
The new Ruby Development Forum is at:
http://developer.yahoo.net/forum/index.php?showforum=75
Please post all future questions and comments there!
Sincerely,
Robyn Tippins
Community Manager, YDN
I'm using YUI-tree view,in these tree,i need only the checked child
nodes while checking the parent node.I tried this,but it showing both
the parent node data with child node data.Can someone help on this?
Can someone send the sample javascript code for this issue?
Thanks in advance...
Regards,
Viswa.J
Hi,
I am a Junior at MIT in EECS. I am starting a new non-profit, uService,
with the goal to get more college students volunteering. I am looking
for ruby developpers for our web-based tool.
Although uService is a non-profit, it has a interesting business model,
and a large potential for significant growth. If you are interested in
learning more about joining the team, please send an email to
maarnold@....
Thanks,
---
Marvin Arnold
Massachusetts Institute of Technology
Department of Electrical Engineering and Computer Science
Class of MMX
Hi, has anybody managed to use Yahoo's OAuth from Ruby ?
There seems to be a discussion on oauth-ruby[1] mailing list but so far no fix
has been
found.
Thank you
[1] http://groups.google.com/group/oauth-
ruby/browse_thread/thread/4059b81775752caf?hl=en
Dear all,
I coded a library named Yahoo-LifeType-API, and I placed it on
GoogleCode(RubyForge is not available now, I will update it soon).
This is the GoogleCode page:http://code.google.com/p/yahoo-lifetype-api/
Yahoo! LifeType is the service for Taiwanese, the URL:
http://tw.local.yahoo.com
The Taiwan YDN just released the API these months, the version is 0.1.
You can get more details on:
http://tw.developer.yahoo.com/lifestyle_api.html
If you find some bugs, please post a issues on Google Code page or mail
me the bug, thanks a lot!
Hi,
I am currently writing a script that gets statistics for a stock. I
tried to use the yahoo finance module but I would like to fetch more
fields from the API.
Can anyone tell me where I can find the complete API specification for
YahooFinance please?
Thank you very much in advance
When this list was started, I recommended that people
subscribe to ruby-talk instead of/in addition to it. At the
time I said I have nothing against Yahoo, but that I thought
starting a new Ruby list was premature and potentially
divisive.
I think I've been born out. I just forwarded the anouncements
of a series of Yahoo related Ruby libraries to this list after
they'd been posted on ruby-talk without ever showing up
here. (I even waited a while to make sure I wasn't being
over-anxious).
Please, if you're subscribed here and working with Yahoo
services from Ruby, please subscribe to ruby-talk.
There's a whole lot of community interaction you really
should be a part of.
--
thanks,
-pate
-------------------------
http://on-ruby.blogspot.com
Since this isn't really Yahoo specific, you'll probably have much better
results posting it to the main ruby-talk mailing list.
On 11/20/06, jeffgrice95 <jmgrice@...> wrote:
> I am new to Ruby, so I am still learning to do things in a "ruby-ish"
> way. In my job I do a fair amount of mapping, and thus I have a need to
> get latitude/longitude coordinates for addresses that I have. I have
> written the program below and though I might share it in case anyone
> else needs something similar.
>
> Please feel free to offer suggestions for improvement. As I said I am
> new to Ruby! I have commented the code, so you can build it with rdoc
> and get at least a very rudimentary documentation.
>
> Code:
>
> # This program is an implementation of geocoding services offered by
> {Yahoo! Maps Web
> Services}[http://developer.yahoo.com/maps/rest/V1/geocode.html].
> #
> # * Author: Jeff Grice
> # * Date: 11.16.2006
> # ---
>
> require 'net/http'
> require 'rexml/document'
>
> # The YGeocoder class implements Yahoo! geocoding services. Given an
> address, city, state, and zip, the service returns
> # an XML response with the result set containing the latitude,
> longitude, precision, an any warnings associated with the result.
> class YGeocoder
> attr_reader :latitude, :longitude, :precision, :warning, :city, :state,
> :zip, :address
> YURL = 'http://api.local.yahoo.com/MapsService/V1/geocode'
> APPID = 'your_app_id' # use your yahoo! app id here!
> @@count = 0
>
> # Class attribute to return the total number of geocodes found.
> def YGeocoder.count
> @@count
> end
>
> # Constructor which takes strings for address, city, state, and zip
> def initialize(address, city, state, zip)
> @addressArgs = {
> 'appid' => APPID,
> 'city' => city,
> 'state' => state,
> 'street' => address,
> 'zip' => zip
> }
> @qs = buildQueryString(@addressArgs)
> @warning = ""
> geocode()
> end
>
> # Method to write results to a semi-colon delimited string for easy
> output to text file
> def to_s
>
> ";#{@address};#{@city};#{@state};#{@zip};#{@latitude};#{@longitude};#{@p\
> recision};#{@warning}"
> end
>
> # Method to return array of address, city, state, zip, latitude,
> longitude, precision, warning
> def to_a
> [@address, @city, @state, @zip, @latitude, @longitude, @precision,
> @warning]
> end
> private
> # Private Method to return query string based on hash variable
> supplied. The address information is passed to this method
> # from the class constructor
> def buildQueryString(hash)
> qs = ""
> hash.each {|key, value| qs += "&" + URI.encode(key) + "=" +
> URI.encode(value) }
> qs[0] = "?"
> return YURL + qs
> end
>
> # Private Method that does the bulk of the work of the class. Sends
> request to Yahoo geocoding service, then parses
> # the result and stores them to instance variables that are exposed as
> attributes.
> def geocode
> begin
> data = Net::HTTP.get_response(URI.parse(@qs)).body
> doc = REXML::Document.new(data)
> #only get the data if there is only 1 result
> if doc.elements.size == 1 then
> doc.elements.each('ResultSet/Result') do |result|
> result.attributes.each_attribute do |attr|
> case attr.name
> when "precision": @precision = attr.value
> when "warning": @warning = attr.value
> end
> end
> end
> #get the element text and assign to instance variables
> @latitude = getElementText(doc, 'ResultSet/Result/Latitude')
> @longitude = getElementText(doc, 'ResultSet/Result/Longitude')
> @city = getElementText(doc, 'ResultSet/Result/City')
> @state = getElementText(doc, 'ResultSet/Result/State')
> @zip = getElementText(doc, 'ResultSet/Result/Zip')
> @address = getElementText(doc, 'ResultSet/Result/Address')
> @@count += 1
> else
> @warning = "More than one location returned"
> end
> rescue
> puts "Connection Error"
> @warning = "Site cannot be geocoded"
> end
> end
>
> # Method to help extract text out of the XML elements returned from
> Yahoo web service.
> def getElementText(doc, xpath)
> s = ""
> doc.elements.each(xpath) do |ele|
> s = ele.text.strip
> end
> return s
> end
> end
>
>
--
thanks,
-pate
-------------------------
http://on-ruby.blogspot.com
I am new to Ruby, so I am still learning to do things in a "ruby-ish"
way. In my job I do a fair amount of mapping, and thus I have a need to
get latitude/longitude coordinates for addresses that I have. I have
written the program below and though I might share it in case anyone
else needs something similar.
Please feel free to offer suggestions for improvement. As I said I am
new to Ruby! I have commented the code, so you can build it with rdoc
and get at least a very rudimentary documentation.
Code:
# This program is an implementation of geocoding services offered by
{Yahoo! Maps Web
Services}[http://developer.yahoo.com/maps/rest/V1/geocode.html].
#
# * Author: Jeff Grice
# * Date: 11.16.2006
# ---
require 'net/http'
require 'rexml/document'
# The YGeocoder class implements Yahoo! geocoding services. Given an
address, city, state, and zip, the service returns
# an XML response with the result set containing the latitude,
longitude, precision, an any warnings associated with the result.
class YGeocoder
attr_reader :latitude, :longitude, :precision, :warning, :city, :state,
:zip, :address
YURL = 'http://api.local.yahoo.com/MapsService/V1/geocode'
APPID = 'your_app_id' # use your yahoo! app id here!
@@count = 0
# Class attribute to return the total number of geocodes found.
def YGeocoder.count
@@count
end
# Constructor which takes strings for address, city, state, and zip
def initialize(address, city, state, zip)
@addressArgs = {
'appid' => APPID,
'city' => city,
'state' => state,
'street' => address,
'zip' => zip
}
@qs = buildQueryString(@addressArgs)
@warning = ""
geocode()
end
# Method to write results to a semi-colon delimited string for easy
output to text file
def to_s
";#{@address};#{@city};#{@state};#{@zip};#{@latitude};#{@longitude};#{@p\
recision};#{@warning}"
end
# Method to return array of address, city, state, zip, latitude,
longitude, precision, warning
def to_a
[@address, @city, @state, @zip, @latitude, @longitude, @precision,
@warning]
end
private
# Private Method to return query string based on hash variable
supplied. The address information is passed to this method
# from the class constructor
def buildQueryString(hash)
qs = ""
hash.each {|key, value| qs += "&" + URI.encode(key) + "=" +
URI.encode(value) }
qs[0] = "?"
return YURL + qs
end
# Private Method that does the bulk of the work of the class. Sends
request to Yahoo geocoding service, then parses
# the result and stores them to instance variables that are exposed as
attributes.
def geocode
begin
data = Net::HTTP.get_response(URI.parse(@qs)).body
doc = REXML::Document.new(data)
#only get the data if there is only 1 result
if doc.elements.size == 1 then
doc.elements.each('ResultSet/Result') do |result|
result.attributes.each_attribute do |attr|
case attr.name
when "precision": @precision = attr.value
when "warning": @warning = attr.value
end
end
end
#get the element text and assign to instance variables
@latitude = getElementText(doc, 'ResultSet/Result/Latitude')
@longitude = getElementText(doc, 'ResultSet/Result/Longitude')
@city = getElementText(doc, 'ResultSet/Result/City')
@state = getElementText(doc, 'ResultSet/Result/State')
@zip = getElementText(doc, 'ResultSet/Result/Zip')
@address = getElementText(doc, 'ResultSet/Result/Address')
@@count += 1
else
@warning = "More than one location returned"
end
rescue
puts "Connection Error"
@warning = "Site cannot be geocoded"
end
end
# Method to help extract text out of the XML elements returned from
Yahoo web service.
def getElementText(doc, xpath)
s = ""
doc.elements.each(xpath) do |ele|
s = ele.text.strip
end
return s
end
end
I'm a few steps beyond "clueless newby" in creating an RoR
application, one of whose presentations is a Yahoo! map showing the
locations in the DB with all the nifty AJAXy stuff.
Before reinventing the wheel, are there worked examples, advice for
the lovelorn, etc. on how to:
* create a RoR find for the points that might be in view on a current map
* AJAXy ways to grab these as the user pans, zooms etc. the map, e.g.
don't do the find until things stop moving
If I can get this stuff even barely ticking over, I'll share the
results (like the whole app).
HANDY HINT: I *love* Aptana (http://www.aptana.org) as a multi-lingual
IDE for building RoR apps, RadRails plugs in seamlessly, and you have
the templates etc for CSS, HTML & JavaScript. There is a magic way to
load up API docs for onthefly prompts, but I haven't spent much time
playing with it. Aptana is an Eclipse-based thingy, so is available on
all the popular platforms.
jay
...what is new here is this news was published in ADT magazine. I
thought that the scope would also be an important thing. In Ruby that
matters, anyway thanks by this feedback.
--- In ydn-ruby@yahoogroups.com, "pat eyler" <pat.eyler@...> wrote:
>
> *sigh*
>
> On 9/25/06, ROBERTO NOGUEIRA <enogrob@...> wrote:
> > Sun Microsystems announced last week that Charles Nutter and Thomas
> > Enebo, the chief maintainers of JRuby, are joining the company as
> > full-time employees. Nutter and Enebo are set to spend all their time
> > working on the open-source JRuby project, with a particular focus on
> > developer tools. Specifically, they are charged with bringing JRuby to
> > 1.0 status.
> > http://www.adtmag.com/article.aspx?id=19265
> >
>
>
> At the risk of seeming like a curmudgeon, I'd like to make a couple
> of points here.
>
> First, this is old news ... it broke on the 7th of September. It's
important,
> but it's not new.
>
> Second, and much more important, general ruby discussion really ought
> to take place on the ruby-talk mailing list. Compartmentalizing
ydn-ruby
> from ruby-talk cuts the ydn-ruby users off from the (vast)
experience of the
> ruby-talk (and comp.lang.ruby) user base. You really don't want to lose
> out on that.
>
> I'm looking forward to seeing cool things happening in the ydn-ruby
> space. I'm hoping one of them will be integration with the rest of the
> Ruby community.
>
>
> --
> thanks,
> -pate
> -------------------------
> http://on-ruby.blogspot.com
>
*sigh*
On 9/25/06, ROBERTO NOGUEIRA <enogrob@...> wrote:
> Sun Microsystems announced last week that Charles Nutter and Thomas
> Enebo, the chief maintainers of JRuby, are joining the company as
> full-time employees. Nutter and Enebo are set to spend all their time
> working on the open-source JRuby project, with a particular focus on
> developer tools. Specifically, they are charged with bringing JRuby to
> 1.0 status.
> http://www.adtmag.com/article.aspx?id=19265
>
At the risk of seeming like a curmudgeon, I'd like to make a couple
of points here.
First, this is old news ... it broke on the 7th of September. It's important,
but it's not new.
Second, and much more important, general ruby discussion really ought
to take place on the ruby-talk mailing list. Compartmentalizing ydn-ruby
from ruby-talk cuts the ydn-ruby users off from the (vast) experience of the
ruby-talk (and comp.lang.ruby) user base. You really don't want to lose
out on that.
I'm looking forward to seeing cool things happening in the ydn-ruby
space. I'm hoping one of them will be integration with the rest of the
Ruby community.
--
thanks,
-pate
-------------------------
http://on-ruby.blogspot.com
Sun Microsystems announced last week that Charles Nutter and Thomas
Enebo, the chief maintainers of JRuby, are joining the company as
full-time employees. Nutter and Enebo are set to spend all their time
working on the open-source JRuby project, with a particular focus on
developer tools. Specifically, they are charged with bringing JRuby to
1.0 status.
http://www.adtmag.com/article.aspx?id=19265
Hi All,
I've installed RoR on my local machine. During the process I learnt it
is a good idea to note down the steps. I've done that as well as
posted the steps on my blog. Please visit the blog at:
http://ehsan.bdwebwork.com/blog?a=d&b=40&s=4
If you think any of the step mentioned is wrong or should be modified
or if you have any suggestion please type in your comment.
Thank you.
Ehsanul Haque
http://ehsan.bdwebwork.com/