Displaying 20 results from an estimated 1000 matches similar to: "Problem with RSS feed from Rails Recipes"
2005 Mar 09
21
Converting time retrieved from MySQL
I''m having a problem converting a date retrieved from my MySQL database
and I''m hoping someone can help.
MySQL stores the date/time as this:
2005-03-08 17:00:34.0
and according to my Pickaxe book Ruby stores times as "the number of
seconds and microseconds since [...] January 1, 1970". All well and good.
Unfortunately, RoR is converting my date to this:
2008 Mar 20
6
Parsing multiple RSS & Atom feed formats
I''m working on a RSS aggregator, and I''ve based the parser on a script
from this post;
http://www.superwick.com/archives/2007/06/09/rss-feed-parsing-in-ruby-on-rails/
But, being the complete newbie, I''ve found that this parser only works
for specifically formatted feeds. For example, some feeds will throw a
''nil text'' error. I know that I could make
2006 Jan 22
8
Date Calculation
I am trying to calculate the number of days between 2 dates using
Time.now - object.date where object.date is a date pulled from a
database. I want to display the age of the entry in the database in
days. I keep getting an error about not being able to convert a date
into a float. What am I doing wrong. If I use object.date -
object.date it seems to work but the answer is useless (0). I
2008 Nov 18
2
rss feed is not detected in firefox ?
my rails version is 2.2.0
i have created a rss feed
It is working fine in IE
but in fire fox
only xml content is showned
like
"This XML file does not appear to have any style information associated
with it. The document tree is shown below."
any idea ?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because
2006 Mar 20
3
can''t get my rss to validate with feedtools
I know that I''m doing something wrong, but I can''t figure out what.
I''ve looked at every wiki and tutorial I can find on feedtools but I
still can''t get my rss feed working. Here''s my code.
feed = FeedTools::Feed.new
feed.entries << FeedTools::FeedItem.new
feed.entries[0].author.name = "Charlie Bowman"
feed.entries[0].title =
2008 Apr 22
2
How to convert time from rss feed to another format ?
Hi,
I need to parse the rss feed and use the pubDate field to generate a
field in a xml file to use as an input to simile timeline. RSS returns
the pubDate as :
Sun Feb 24 06:33:32 UTC 2008
But I need it as a string :
"Feb 24 2008 06:33:32 PST"
When I do :
...
@dt=feed_item.time
@dt=@dt.to_date
word_date=''%b %d %Y %H:%M:%S %z''
puts @dt.strftime(word_date)
...
2006 Jul 14
1
Converting Date string to Time Object
Hi,
I have MySQL model with created_on specified as :date. This means that the
day the record was created on is stored in the database as a string like
"2006-04-28". I want to be able output a something like "5 days ago". From
looking in the API I''ve found "strftime" and "*distance_of_time_in_words*".
Distance_of_time_in_words only accepts Time
2006 Mar 17
1
RSS problem when trying to display ID - HELP
I want to append "#comment-1" or whatever, depending on the id to the
end of my xml.link(" ... /#comment-1") attribute in my generated xml.
Well, when I put:
xml.link(" ... /#comment-" + comment.id)
I get an Application error (rails) message when I look at the generated
XML. This is what I''m doing without the id on the comments (its working
fine):
2006 Jun 30
6
RSS::Parser Documentation
Hi
I am trying to use the RSS classes from "rss/2.0" and everything works
but I want to know what attributes and properties I can get at from each
of the classes I am getting back.
For example, the class has a "channel" which I can tell has a "title"
attribute (because it works when I query it :) but I would really like a
list of every attribute that is
2006 May 16
10
Date verus Time class
I''m using the date_select and datetime_select helpers in my view, and
they return Date classes from the params hash.
But how do I work with Date classes, they don''t print human readable
dates or times, Time classes work well I can use strftime("%H:%M") to
print to the screen.
Is it possible to convert a Date to a Time, Ive been tinkering in irb
but have got
2009 Jun 18
3
Date.new.to_time.to_i
What''s going on here!?
>> Date.new.to_time.to_i
NoMethodError: undefined method `to_i'' for Mon, 01 Jan -4712 00:00:00
-0800:DateTime
from (irb):25
>> Date.today.to_time.to_i
=> 1245308400
>> RUBY_VERSION
=> "1.8.7"
>> Rails.version
=> "2.1.1"
(I''m not sure if this is a rails thing, or just a ruby thing)
--
2005 May 08
2
Extract just some fields from XML
Hello!
I am trying to get specific fields from an XML document and I am totally
puzzled. I hope someone can help me.
# URL
URL<-"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=11877539,11822933,11871444&retmode=xml&rettype=citation"
# download a XML file
tmp <- xmlTreeParse(URL, isURL = TRUE)
tmp <- xmlRoot(tmp)
Now I want to extract only
2007 Sep 24
3
Oracle Date + RoR
Hi Experts,
I''ve a model called Product where i''ve column called created_at,
updated_at
where i''ve made a query based on Oracle date format
like
date_of_created = ''23-SEP-07''
@product = Product.find(:all, :conditions => ["created_at=?",
date_of_created])
but in view its empty.
AND EXPERTS I''VE DATA WITH 24-SEP-07 FOR MORE
2008 Jun 08
20
how to parse a "dd/mm/yyyy" formatted date string???
Hi,
I''m stuck. How do you parse a "dd/mm/yyyy" formatted date string???
I get a date format error.
Thanks in advance
Greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Jul 22
0
RSS XML Generation Problem
I''m getting an interesting problem. I''d trying to generate an RSS document
and then real it from outside of my app. Here''s what the view looks like.
xml.instruct! :xml, :version=>"1.0"
xml.rss(:version=>"2.0"){
xml.channel{
xml.title("mytitle")
xml.link("http://www.myapp.com")
2014 Nov 28
0
[PATCH 3/4] Update news feed
---
feeds/feed.xml | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/feeds/feed.xml b/feeds/feed.xml
index 0d16cd9..2390cd0 100644
--- a/feeds/feed.xml
+++ b/feeds/feed.xml
@@ -7,6 +7,30 @@
<atom:link href="http://xiph.org/flac/feeds/feed.xml" rel="self" type="application/rss+xml" />
<item>
+ <title>FLAC
2007 Jun 20
1
NULL ptr dereferences found with Calysto static checker
Hi,
I've ran my static checker Calysto on openssh and found the following bug:
Possible NULL-ptr deref (vc536):
@/work/benchmarks/SOURCES/openssh-4.6p1/moduli.c:173
+ ptr gtm returned from gmtime dereferenced without checking (gmtime can
return NULL).
There are probably more possible NULL-ptr dereferences, but Calysto
currently does not check the usage of library functions (for instance,
if
2008 May 03
11
Date comparisons
I occasionally get this error:
1)
''A puzzle once featured, should no longer be nominated'' FAILED
expected: Sun May 04 09:10:26 -0700 2008,
got: Sun May 04 09:10:26 -0700 2008 (using ==)
./spec/models/puzzle_spec.rb:180:
So, the dates looks the same to me. Any ideas for how to debug?
Joe
2019 Oct 03
2
[PATCH] Avoiding Dereferencing of NULL pointer
Signed-off-by: krishnaiah bommu <krishnaiah.bommu at intel.com>
---
moduli.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/moduli.c b/moduli.c
index 578fc48..c1fa484 100644
--- a/moduli.c
+++ b/moduli.c
@@ -153,12 +153,14 @@ static int
qfileout(FILE * ofile, u_int32_t otype, u_int32_t otests, u_int32_t otries,
u_int32_t osize, u_int32_t ogenerator, BIGNUM *
2006 Mar 01
3
Convert Date to Time
Hi,
How do i convert a Date to a Time??
I have a date returned from sql and i need to be able to use handy
functions like next_week or beggining of week.
Any help appreciated
Thanks,
Chris
--
Posted via http://www.ruby-forum.com/.