Search Results

Search found 2860 results on 115 pages for 'javaone feed'.

Page 20/115 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Ruby - Feedzirra and updates

    - by mplacona
    Hi, trying to get my head around Feedzirra here. I have it all setup and everything, and can even get results and updates, but something odd is going on. I came up with the following code: def initialize(feed_url) @feed_url = feed_url @rssObject = Feedzirra::Feed.fetch_and_parse(@feed_url) end def update_from_feed_continuously() @rssObject = Feedzirra::Feed.update(@rssObject) if @rssObject.updated? puts @rssObject.new_entries.count else puts "nil" end end Right, what I'm doing above, is starting with the big feed, and then only getting updates. I'm sure I must be doing something stupid, as even though I'm able to get the updates, and store them on the same instance variable, after the first time, I'm never able to get those again. Obviously this happens because I'm overwriting my instance variable with only updates, and lose the full feed object. I then thought about changing my code to this: def update_from_feed_continuously() feed = Feedzirra::Feed.update(@rssObject) if feed.updated? puts feed.new_entries.count else puts "nil" end end Well, I'm not overwriting anything and that should be the way to go right? WRONG, this means I'm doomed to always try to get updates to the same static feed object, as although I get the updates on a variable, I'm never actually updating my "static feed object", and newly added items will be appended to my "feed.new_entries" as they in theory are new. I'm sure I;m missing a step here, but I'd really appreciate if someone could shed me a light on it. I've been going through this code for hours, and can't get to grips with it. Obviously it should work fine, if I did something like: if feed.updated? puts feed.new_entries.count @rssObject = initialize(@feed_url) else Because that would reinitialize my instance variable with a brand new feed object, and the updates would come again. But that also means that any new update added on that exact moment would be lost, as well as massive overkill, as I'd have to load the thing again. Thanks in advance!

    Read the article

  • Problem: How to display a Wordpress RSS feed in a browser that doesn't have a built in RSS reader?

    - by StephenMeehan
    If I can, i'd rather not use a service like FeedBurner. My setup: I've setup a RSS feed link on a self-hosted Wordpress website, clicking the RSS link in Safari shows the feed - because Safari has a built in RSS reader. Great. Unfortunately clicking the same RSS link in Chrome displays the raw XML feed. I know why this happens - Chrome doesn't have a built in RSS reader. I also assume this will be the same in older versions of Internet Explorer. Possible solution? I've noticed http://www.bbc.co.uk/news has a nice solution: Click the RSS feed (top tight of the page) in a RSS enabled browser (Safari) and it uses the built in RSS reader to display the RSS feed. Click the same RSS feed link in Chrome (Chrome has no built in RSS reader) it displays the RSS feed using what looks like a custom page. Is there a way to check if a browser has a built in RSS reader? How would I provide alternative content (like the BBC site) to a browser that doesn't have a RSS reader installed? Any help on this would be brilliant, thanks for taking the time to read this. Stephen

    Read the article

  • News feed APIs for general news

    - by dassouki
    I'm building a database + tool that scours news feeds for a certain term. For example "food poisoning from nuts". I want to scour social media sites, news sites, major news aggregators, etc... for that term. Question 1: What are some of the news aggregator APIs out there? Question 2: How Would you go about coding and receiving only the latest news from the API?

    Read the article

  • Show choosen option in a notification Feed, Django

    - by apoo
    Hey I have a model where : LIST_OPTIONS = ( ('cheap','cheap'), ('expensive','expensive'), ('normal', 'normal'), ) then I have assigned the LIST_OPTIONS to nature variable. nature = models.CharField(max_length=15, choices=LIST_OPTIONS, null=False, blank=False). then I save it: if self.pk: new=False else: new=True super(Listing, self).save(force_insert, force_update) if new and notification: notification.send(User.objects.all().exclude(id=self.owner.id), "listing_new", {'listing':self, }, ) then in my management.py: def create_notice_types(app, created_models,verbosity, **kwargs): notification.create_notice_type("listing_new", _("New Listing"), _("someone has posted a new listing"), default=2) and now in my notice.html I want to show to users different sentences based on the options that they have choose so something like this: LINK href="{{ listing.owner.get_absolute_url }} {{listing.owner}} {% ifequal listing.nature "For Sale" %} created a {{ listing.nature }} listing, <a href="{{ listing.get_absolute_url }}">{{listing.title}}</a>. {% ifequals listing.equal "Give Away"%} is {{ listing.nature }} , LINK href="{{ listing.get_absolute_url }}" {{listing.title}}. {% ifequal listing.equal "Looking For"%} is {{ listing.nature }} , LINK href="{{ listing.get_absolute_url }}" {{listing.title}} {% endifequal %} {% endifequal %} {% endifequal %} Could you please help me out with this. Thank you

    Read the article

  • Error Creating RSS Feed XML file - Java

    - by GigaPr
    Hi, i am trying to create an RssFeed using java this is the class i use import com.rssFeed.domain.RSS; import com.rssFeed.domain.RSSItem; import java.io.FileOutputStream; import java.util.Iterator; import javax.xml.stream.XMLEventFactory; import javax.xml.stream.XMLEventWriter; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.Characters; import javax.xml.stream.events.EndElement; import javax.xml.stream.events.StartDocument; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; public class RssBuilder { private static String XML_BLOCK = "\n"; private static String XML_INDENT = "\t"; public static void BuildRss(RSS rss, String xmlfile) throws Exception { XMLOutputFactory output = XMLOutputFactory.newInstance(); XMLEventWriter writer = output.createXMLEventWriter(new FileOutputStream(xmlfile)); try { XMLEventFactory eventFactory = XMLEventFactory.newInstance(); XMLEvent endSection = eventFactory.createDTD(XML_BLOCK); StartDocument startDocument = eventFactory.createStartDocument(); writer.add(startDocument); writer.add(endSection); StartElement rssStart = eventFactory.createStartElement("", "", "rss"); writer.add(rssStart); writer.add(eventFactory.createAttribute("version", "2.0")); writer.add(endSection); writer.add(eventFactory.createStartElement("", "", "channel")); writer.add(endSection); createNode(writer, "title", rss.getTitle()); createNode(writer, "description", rss.getDescription()); createNode(writer, "link", rss.getLink()); createNode(writer, "dateCreated", rss.getDateCreated().toString()); createNode(writer, "language", rss.getLanguage()); createNode(writer, "pubDate", rss.getPubDate().toString()); createNode(writer, "dateModified", rss.getDateModified().toString()); createNode(writer, "dateModified", rss.getDateModified().toString()); createNode(writer, "pubDate", rss.getPubDate().toString()); createNode(writer, "lastBuildDate", rss.getLastBuildDate().toString()); createNode(writer, "language", rss.getLanguage().toString()); createNode(writer, "rating", rss.getRating().toString()); Iterator<RSSItem> iterator = rss.getRssItems().iterator(); while (iterator.hasNext()) { RSSItem entry = iterator.next(); writer.add(eventFactory.createStartElement("", "", "item")); writer.add(endSection); createNode(writer, "title", entry.getTitle()); createNode(writer, "description", entry.getDescription()); createNode(writer, "link", entry.getLink()); createNode(writer, "dateCreated", entry.getDateCreated().toString()); createNode(writer, "pubDate", entry.getDateModified().toString()); writer.add(eventFactory.createEndElement("", "", "item")); writer.add(endSection); } writer.add(endSection); writer.add(eventFactory.createEndElement("", "", "channel")); writer.add(endSection); writer.add(eventFactory.createEndElement("", "", "rss")); writer.add(endSection); writer.add(eventFactory.createEndDocument()); writer.close(); } catch(Exception e) { writer.close(); } } private static void createNode(XMLEventWriter eventWriter, String name, String value)throws XMLStreamException { XMLEventFactory eventFactory = XMLEventFactory.newInstance(); XMLEvent endSection = eventFactory.createDTD(XML_BLOCK); XMLEvent tabSection = eventFactory.createDTD(XML_INDENT); StartElement sElement = eventFactory.createStartElement("", "", name); eventWriter.add(tabSection); eventWriter.add(sElement); Characters characters = eventFactory.createCharacters(value); eventWriter.add(characters); EndElement eElement = eventFactory.createEndElement("", "", name); eventWriter.add(eElement); eventWriter.add(endSection); } } But i get the following error type Exception report message descriptionThe server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is javax.xml.stream.XMLStreamException: Can not write DOCTYPE declaration (DTD) when not in prolog any more (state 2; start element(s) written) root cause javax.xml.stream.XMLStreamException: Can not write DOCTYPE declaration (DTD) when not in prolog any more (state 2; start element(s) written) what does it mean?

    Read the article

  • Correct syntax for php inside a feed request

    - by Simon Hume
    Hi guys, I have a very basic query string which passes a ID to a receiving page. On that page, I need to dynamically call the YouTube API, giving my playlistID. I'm having to use PHP for this, and it's a little out of my comfort zone, so hopefully someone can wade in with a quick fix for me. Here is my variable $playlist; And I need to replace the 77DC230FBBCE4D58 below with that variable. $feedURL = 'http://gdata.youtube.com/feeds/api/playlists/77DC230FBBCE4D58?v=2'; Any help, as always, greatly appreciated!

    Read the article

  • Export to RSS Feed

    - by citronas
    I'm looking for class that can generate RSS feeds. I'm thinking of a usage like this. RssClass foo = new RssClass(); foo.addEntry("title", URL); foo.Export("myexportpath.rss"); Has anybody seen such a class available for free usage?

    Read the article

  • Customize a WCF RIA Services EndpointRSS Feed

    - by Andrew Garrison
    Is it possible to customize the parameters of a WCF RIA Services endpoint? Specifically, I would like to create a custom binding for the endpoint and increase the maxReceivedMessageSize to allow sending the contents of a file that is a few megabytes in size. I've tried meddling in the web.config, but I'm getting the following error: [InvalidOperationException]: The contract name MyNamespace.MyService could not be found in the list of contracts implemented by the service MyNamespace.MyService web.config <system.serviceModel> <bindings> <customBinding> <binding name="CustomBinaryHttpBinding"> <binaryMessageEncoding /> <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" /> </binding> </customBinding> </bindings> <services> <service name="MyNamespace.MyService"> <endpoint address="" binding="wsHttpBinding" contract="MyNamespace.MyService" /> <endpoint address="/binary" binding="customBinding" bindingConfiguration="CustomBinaryHttpBinding" contract="MyNamespace.MyService" /> </service> </services> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> </system.serviceModel>

    Read the article

  • Rss Feed Java MVC

    - by GigaPr
    Hi, i would like to create some RSS Feeds for my website. I managed to crate the XML file but How do i display it in a nice format like http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml and how do i crate the little icon in the url box? by the way my XML file looks like <?xml version='1.0' encoding='UTF-8'?> <rss version="2.0"> <channel> <title>title</title> <description>desciption</description> <link>LINK</link> <dateCreated>2010-05-31 00:00:00.0</dateCreated> <language>Italian</language> <item> <title>pojpoj</title> <description>pojpojpoj</description> <link>ojpojpoj</link> <dateCreated>2010-06-03 00:00:00.0</dateCreated> <pubDate>2010-06-03 00:00:00.0</pubDate> </item> <item> <title>dfojp</title> <description>pojpojpoj</description> <link>pojpoj</link> <dateCreated>2010-06-03 00:00:00.0</dateCreated> <pubDate>2010-06-03 00:00:00.0</pubDate> </item> </channel> </rss> Thanks

    Read the article

  • placing pop up based on the mouse position(x,y)RSS Feed

    - by prince23
    hi, right now i am showing pop at the botton of the screen. i need to change them according to the value(x,y) whhere i have moved the mouse here i need to get the MouseEventArgs e postion that is its x:value and y:value based on that i need to place the pop up in the screen i need to get the mouse x, y postion? is it possiable to get its value? private void DG_LoadingRow(object sender, DataGridRowEventArgs e) { DataGridRow row = e.Row; int index = 0; foreach (DataGridColumn colGrid in DG.Columns) { if(colGrid .Header == "ID" || colGrid .Header == "Name") { FrameworkElement cellContent = colGrid .GetCellContent(e.Row); DataGridCell cell = cellContent.Parent as DataGridCell; cell.MouseEnter -= cell_MouseEnter; cell.MouseEnter += new MouseEventHandler(cell_MouseEnter); cell.MouseLeave -= cell_MouseLeave; cell.MouseLeave += new MouseEventHandler(cell_MouseLeave); } } } void cell_MouseLeave(object sender, MouseEventArgs e) { //Hide your popup } void cell_MouseEnter(object sender, MouseEventArgs e) { **// here i need to get the mouse position that is its x,y value based on that i can place my modal pop up in that postion. my pop is defined in xaml page here i will be assigning only its position where i need to place my modal pop up.** //

    Read the article

  • How do I read a public twitter feed using .Net

    - by Jeff Weber
    I'm trying to read the public twitter status of a user so I can display it in my Windows Phone application. I'm using Scott Gu's example: http://weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx When my code comes back from the async call, I get a "System.Security.SecurityException" as soon as I try to use the e.Result. I know my uri is correct because I can plop it in the browser and get good results. Here is my relavent code: public void LoadNewsLine() { WebClient twitter = new WebClient(); twitter.DownloadStringCompleted += new DownloadStringCompletedEventHandler(twitter_DownloadStringCompleted); twitter.DownloadStringAsync(new Uri("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=krashlander")); } void twitter_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { XElement xmlTweets = XElement.Parse(e.Result); //exception thrown here! var message = from tweet in xmlTweets.Descendants("status") select tweet.Element("text").Value; //Set message and tell UI to update. //NewsLine = message.ToString(); //RaisePropertyChanged("NewsLine"); } Any ideas anyone?

    Read the article

  • iPhone OS: Posting an image + text "story" to a user's news feed through the facebook api

    - by nickthedude
    So what I am trying to do is post an image that has been created by a user on an iphone into that users newsfeed. The functionality I am having a hard time understanding if it is possible: Can I pass a local NSURL (or URL?)(to a png file that lives in the documents folder) through a JSON string and onto Facebook? i want to mimic the action of a user going to his/her facebook page, clicking into the textfield for their newsfeeld, uploading an image by clicking the "photos" icon and selecting an image from a local disk and uploading it. I would also like to add some text into the post optionally. I'm just getting started with the Facebook api and it seems pretty tough right now, any help would be appreciated. code examples appreciated. Thanks, Nick

    Read the article

  • Carriage Return\Line feed in Java

    - by Manu
    Guys, i have created text file in unix enviroment using java code. For writing the text file i am using java.io.FileWriter and BufferedWriter. and for newline after each row i am using bw.newLine() method. (where bw is object of BufferedWriter ) and sending that text file by attaching in mail from unix environment itself (automated that using unix commands). My issue is, after i download the text file from mail in windows system, if i opened that text file the data's are not properly aligned. newline() character is not working i think so. I want same text file alignment as it is in unix environment, if i opened the text file in windows environment also. How to resolve the problem.Please help ASAP. Thanks for your help in advance. pasting my java code here for your reference..(running java code in unix environment) File f = new File(strFileGenLoc); BufferedWriter bw = new BufferedWriter(new FileWriter(f, false)); rs = stmt.executeQuery("select * from jpdata"); while ( rs.next() ) { bw.write(rs.getString(1)==null? "":rs.getString(1)); bw.newLine(); }

    Read the article

  • looking to streamline my RSS feed mashup

    - by Mark Cejas
    Hello crafty developers, I have aggregated RSS feeds from various sources with RSSowl, fetching directly from the social mention API. The RSS feeds are categorized into the following major categories: blogs, news, twitter, Q&A and social networking sites. Each major category is nested with a common group of RSS feeds that represent a particular client/brand ontology. Merging these feeds into the RSSowl reader application, allows me to conduct and save refined search queries (from the aggregated data) into a single file - that I can then tag and further segment for analysis. This scheme is utilized for my own research needs and has helped me considerably. However, I find this RSS mashup scheme kinda clumsy, it requires quite a bit of time to initially organize all of the feeds and I would like to be able to do further natural language processing to the data as well as eventually be able to rank the collected list of URL's into some order of media prominence - right I don't want to pay the ridiculous radian6 web analytics fees, when my intuition is telling me that with a bit of 'elbow grease' I can maybe leverage some available resources online to develop a functional low scale web mining application and get some good intelligence from it. I am now starting to learn a little about computer science - my background is in physical science/statistics so is my thinking in the right track? So, I guess I am imagining an application that allows me to query in a refined manner. A manner that allows me to search for keyword combinations, applying AND/OR operators, selectively focus my queries into particular sources - like a collection of blogs or twitter, or social networking communities, then save the results of my queries into a structured format that can then be manipulated and explored. Am I dreaming? I just had to get all of this out. any bit of advice and insight would be hugely appreciated. my best, Mark

    Read the article

  • Making a jQuery plugin to feed Tumblr to site

    - by tylorreimer
    I have some experience with PHP and a little with JS but I'm far from anything proficient. I'm trying to make a jQuery plugin for my site that I can call in my HTML via something like this: $('.new').tumble({username: "tylor", count: 9}); Which would basically put the Tumblr list the code should make into the DIV with class 'new' in this case. Here is my code so far; the problem seems to be how to get it to pick up class/id from the original call (in the HTML) and use that in the jQuery. Here's the code so far: (function($) { $.fn.tumble = function(options){ var settings = $.extend({ username: null, // [string or array] required to get url for tumblr account count: 3, // [integer] how many posts to display? }, options); //url construction var url = "http://" + settings.username + ".tumblr.com"; var jsonurl = url + "/api/read/json?num=" + settings.count + "&callback=?"; $.getJSON(jsonurl, function(data) { var items = []; $.each(data.posts, function(id, url) { // Goes over each post in the JSON document retrieved from data URL var url = this.url; // Just assigns a variable to the url to avoid constantly writing "this.whatever" var photourl = this['photo-url-250']; // photo-url-xxx needs to be called this way due to integers in the name items.push('<li><a href="' + url + '">' + photourl + '</a></li>'); }); $('<ul/>', { // Creates an empty list html: items.join('') // Takes the values in the item array and puts 'em together }).appendTo('.new'); // I don't want this to have the class set in the jQuery itself }); //end json }; })( jQuery ); Any help you can lend would be wonderful. Thank you

    Read the article

  • Replace XML Bullet Points Found in Feed in Classic ASP

    - by StevieB
    Hey I am currently reading in a XML file which contains bullet list in the following container i.e. ? the average pension contribution rate for executive directors . I am having a problem with symbol directly before the text of each bullet point I want to remove it i.e Replace(text,"old","new") but i cant seem to find what value that bullet point actually is to replace of that makes sense. Thanks

    Read the article

  • which jquery plugin can do the dynamic smooth vertical menu scroll?

    - by helltohigh
    ok i'm new to jquery, but how can i do a feed like the one at twitter.com where they have the "top tweets" update with the latest tweet by scrolling the whole menu down just enough space to allow the new item to fade into the top spot? easy to do? do i need a plugin? i looked around and what i don't want is just a carousal type plugin that just loops in a cirle. i want to add a new news feed item dynamically like in the twitter top tweets. thanks

    Read the article

  • Can multiple wordpress's feed off one database?

    - by ThomasReggi
    I am a template designer and I want to create one wordpress with all generic posts, but I don't want to have to keep logging in and copy & pasteing the same wordpress posts everytime. Can I point multiple WP installs to one database? A harder way would be export a master db and importing it to each install. Before I go crazy and try to hack something together, does anyone have any advise? -Thanks in advance.

    Read the article

  • mySQL php query - news/ friends feed

    - by rpsep2
    I want to show a user the recent uploads from their friends. I have the users friends id's in an array: $friends A user could have, potentially, thousands of friends. I can select the uploads from 1 of a users friends with: $row = $mysqli->query("SELECT * FROM photos WHERE uploader_id = ".$friend." ORDER BY date_uploaded DESC LIMIT ".$page.", 25"); But I need to find all of a users friends uploads. I thought about doing this in a loop iterating over the $friends array, but then I'd be potentially running thousands of mysql queries. How can I do this most efficiently? so to clarify: search a 'photos' table for photos which are uploaded by specific users(friends), held in $friends variable, sort by date_uploaded and limit to x results so I can have pages 1, 2, 3 etc.

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >