w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Trying to Save Gmail Atom Feed to XML - C#
I have tried the code and it works fine (but I have no proxy in my network). I have changed the GmailHandler.cs, the constructor now accepts a internet proxy. using System; using System.Data; using System.Xml; using System.Net; using System.IO; /* * this code made by Ahmed Essawy * AhmedEssawy@gmail.com * http://fci-h.blogspot.com */ /// <summary> /// Summary description for Class1 /// </summary> public class GmailHandler { private string username; private string password; private string gmailAtomUrl; private string proxy; public string GmailAtomUrl { get { return gmailAtomUrl; } set { gmailAtomUrl = value; } } public string Password { get { return password; } set { password = value; } } public

Categories : C#

Search.twitter.com Atom Feed doesn't work (?)
This API has now been retired: Requests to search.twitter.com/search.* will receive HTTP 410 Gone. Use GET search/tweets instead. note also that: JSON is API v1.1's only output format. XML, RSS, and ATOM response formats will be retired along with API v1.

Categories : Twitter

Angular.js: How can I return a content without view? Returning atom feed to users
Use the following process: Append an <object> or <iframe> to the DOM with the XML within the tag OR: Return Atom from the service Store in a documentFragment Use transformToFragment or DOMParser to create a view Use XMLSerializer to convert the view to a string Insert an XML stylesheet into the string: <?xml-stylesheet href="feed.css"?> Use the string as the value of the srcdoc attribute: <iframe srcdoc="{{atomfeed}}" height="95%" width="100%"> For example: $scope.atomstyle='<?xml-stylesheet href="feed.css"?>' $scope.atomboilerplate='<feed xmlns="http://www.w3.org/2005/Atom">' $scope.atomhead='<title></title><link></link>' $scope.atomcontent='<entry><title></title><link></link></entry&

Categories : Angularjs

How To deserialize an Atom feed using DataContracts
I don't have enough reputation to comment, or I otherwise I would have asked for clarification in the comments... As per your example XML that you have to deserialize, the double quotes (") are escaped in the version, encoding and id attributes. As shown, this is not valid XML. Is the XML an output of your own program? If so, find where it is escaping the characters and prevent it from doing so when writing the output. If that is the file you have to work with, then I suggest removing all backslashes escaping a double quote: // We have to escape the backslash and the quote both, with a backslash xmlString.Replace("\#","#"); Perhaps that solves your problem? Lastly, you only mention that your code is 'failing', and fail to provide any kind of exception or error message... Please prov

Categories : C#

Adding categories to an Atom feed from Rails
This is what I ended up using. This actually gets 2 different models into the feed. views/entries/feed.atom.builder atom_feed language: 'en-US', schema_date: 2013 do |feed| feed.title @title feed.updated @updated @entries.each do |e| next if e.updated_at.blank? feed.entry e do |entry| entry.title e.name entry.summary e.summary.blank? ? truncate("#{strip_tags(e.content)}", length: 140, separator: ' ') : strip_tags(e.summary), type: 'html' entry.content e.content, type: 'html' entry.author do |author| author.name e.user.name end e.categories.map {|c| c.name}.each do |t| entry.category term: t, label: t, scheme: root_url end entry.category term: 'blog', label: 'blog', scheme: root_url end # end feed.entry

Categories : Ruby On Rails

Atom Feed shows header but no posts
If you are trying to get the article content, use $item->get_content(); instead of $item->get_description(); The feed you listed also does not have any articles. If you paste it directly in your browser you will see the feed page with no content.

Categories : PHP

Using Javascript to pull data from an RSS Atom feed
Two things to check for starters: 1) Your NewsFeed.aspx needs to be hosted at exactly the same protocol, sub-domain, domain, and port as the page calling it. Otherwise browser security kicks in and prevents you from using an XHR. If you're trying to read a 3rd party RSS feed you may need to use a proxy. 2) The content-type header of the response needs to be text/xml. There are ways to get around this, but it's better if the content-type is accurate.

Categories : Javascript

url in atom feed-builder behaves different to erb-template with nested resource
I'm not sure why, but after restarting the server and a cold reload, it works this way: feed.entry(feeditem, :url => url_for(:action =>'show', :controller =>'games',:category_id => feeditem.categorygames.first.category, :id => feeditem, :only_path => false)) do |entry|

Categories : Ruby On Rails

How to fix incorrect mime-type (atom-feed) showed in chrome-devtools?
The problem seems to be Chrome not regognizing the application/*+xml content type. It looks that you need to use plain old application/xml to get XSLT processing and correct Content-Type display to work in dev tools.

Categories : PHP

Import data to R from Atom-compliant data feed
Feeds just give you the information in XML format, which can be parsed using the XML package. library(XML) url <- 'http://housesofstones.com/blog/feed/atom/' # Download and parse the data xml_data <- xmlParse(url) # Convert the xml structure to a list so you can work with it in R xml_list <- xmlToList(xml_data) str(head(xml_list)) List of 6 $ title :List of 2 ..$ text : chr "Houses of Stones" ..$ .attrs: Named chr "text" .. ..- attr(*, "names")= chr "type" $ subtitle:List of 2 ..$ text : chr ""Science is facts; just as houses are made of stones, so is science made of facts; but a pile of stones is not a house and a c"| __truncated__ ..$ .attrs: Named chr "text" .. ..- attr(*, "names")= chr "type" $ updated : chr "2013-05-16T12:16:49Z" $ link : Named chr [1:3] "alternat

Categories : R

PHPMailer doesn't send mail to gmail
Try to change these lines: $mail->Port = 25; $mail->SMTPAuth = false; to $mail->Port = 485; $mail->SMTPAuth = true; Remember to change your login/password settings

Categories : PHP

Sending email from Gmail doesn't work on CloudBees
There is no network setting stopping outbound connections to any service from CloudBees. However, google may be wary of traffic coming from Amazon hosted IPs - for spam reasons. Amazon also are wary of spam and can control SMTP services. I expect it is one of these, have you looked up the google docs on why this may be stopped from working?

Categories : Spring

What are the way to generate rss feed for a site which doesn't have own rss?
I am not going to pretend I know how google read does it but here's a simple hint: When a browser loads a page for the first time, he keeps a copy in its cache. The next time the page needs to be loaded, the browser first checks if the page has changed since the last time it was loaded. If it wasn't, he will simply load the version in the cache, otherwise, he will refetch the page again. This mechanism is done, as far as I know, using the HEAD HTTP operation and the Last-Modified header. This should be your starting point as it manage to rapidly find out if some new content was published. The next step would be to use some clever algorithms to define what the change was, if it's relevant enough to be considered as a new content and how to present it. Reference

Categories : Java

inline image in html, base64, doesn't appear in gmail (but does in thunderbird)
To the best of my knowledge there are no rules about how Mail User Agents (i.e. your mail reader) has to treat inline images. The "usually" results in your testing are the most troubling. It isn't how you are sending them, it's how the reader chooses to render it. There's a reason that graphics heavy emails have a click here to view as a web page link, because there is too much variation. I'd suggest that route or just making them multipart-mime attachments and forget trying to inline them reliably.

Categories : Python

How to change reply-to and return-path header with gmail smtp in django
If you use smtp.gmail.com to send a message, and the sender's email address is not yourgoogleemailname@gmail.com, then Gmail will rewrite the headers and set the from address to yourgoogleemailname@gmail.com. See http://lifehacker.com/111166/how-to-use-gmail-as-your-smtp-server for more info, and for a possible solution.

Categories : Django

asp.net textarea line feed and preventing postback on return key
You can use this window.onload = function() { setEvent("text", onKeyDown); } function onKeyDown() { return (event.keyCode!=13) } Which will cancel return button in only textboxes

Categories : Javascript

XML line feed symbols are replaced with carriage return
XML parsing normalizes line breaks; XML serialization is responsible for deciding whether to convert them back to CRLF form. See http://www.w3.org/TR/REC-xml/#sec-line-ends

Categories : Xml

Capture content of xml feed that doesn't load immediately
It is very likely that the page is loading the XML using AJAX. (If you can grab the XHR using Firebug to see exactly the POST request they use to append the new XML it may give you/us a better idea) It is a bit sad to say, but Nokogiri, as well as Mechanize (another XML parsing/scraping tool built on Nokogiri) do not support Javascript in any way, and therefore won't be able to get data that is pushed to the page via AJAX without reloading the page (which may or may not be an option for you). But in a loop you have the option to load the page every 5 seconds for say 30 seconds, and compare the XML to the original scrape so that you do not get duplicates. How you would do so is completely up to you, but storing the values in a REXML and comparing to a newly scraped value does not seem lik

Categories : Ruby On Rails

API Feed Doesn't Give Me Data on Live Site
This sounds (and looks) suspiciously like the php flag allow_url_fopen has been shut off on your production server. If you have access to the php.ini file you can check that flag (it needs to be on to allow simplexml_load_file to load remote data). If it's a hosted environment where you don't have that access, you can check by writing a routine like this: if( ini_get('allow_url_fopen') ) { echo "it's on!"; } else { echo "it's off!"; } If this is the problem, and you don't have permissions to turn it back on, you can use curl instead: function curl_get_contents ($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); return $output; } $entryURL = 'https://g

Categories : PHP

ICal timezone setting doesn't work on DTEND on android, outlook and gmail works
Looks fine too me. Why don't you try to use a DURATION (RFC5545#section-3.8.2.5) instead of a DTEND, e.g. DURATION:PT1H for a 1 hour event.

Categories : Android

Facebook Real Time Update return only "changed_fields":["feed"] and not the actual comment
Update: found this, sounds promising: http://allfacebook.com/page-posts-real-time-updates-api_b111225 I have the same problem. As far as I can tell, this is what FB's system was designed to do, even though we would really LIKE to get higher granularity information pushed (and it would likely be more efficient for FB's servers, since as it is now, developers may have to write code that digs through the feed to find the relevant comment or such, possibly fetching quite a lot of stuff we through away, just to get one comment). Bummer. If anyone has any good ideas to offer, I'd be grateful. We want our app to react to certain comments on a user's wall, which we do already for the user's own status updates, but to do it for comments it looks like we would have to scrape the whole feed (which

Categories : Facebook

“Pushing” Gmail to GAS — using Gmail forwarding to trigger GAS script
Not possible from Google Apps Script: Google Apps Script currently available events: https://developers.google.com/apps-script/understanding_events Does Gmail have a Data API? FAQ: https://developers.google.com/gdata/faq#GmailAtomFeed Looks like IMAP is the only option, not sure if IMAP supports callback.

Categories : Google Apps Script

Using facebook graph api how to get news feed with large picture size if the feed type is photo?
I'm currently searching for the same thing. I know you can swap _s for _n at the end and get a larger size... but I haven't figured out how to have the api return the larger size on its own.

Categories : Facebook

How to redirect post feed to main blog feed with htaccess?
The rewriterule you are looking for looks something like this: RewriteRule ^[0-9]{4}/[0-9]{1,2}/[^/]+/feed/?$ /feed [R,L] It should be self-explenatory. Please refer to the documentation if you don't understand some of the syntax. Regex explaination [0-9] means match a character that is in the range of 0 to 9 (e.g. any number). [0-9]{4} means match 4 numbers. Similary [0-9]{1,2} means match 1 or 2 numbers. [^/] means match any character but the / character. [^/]+ means match 1 or more characters that are not a /. /? means match 0 or 1 / character. ^...$ means match the beginning of the string (^) and the end of the string $, forcing it to match the entire string, even if this regex could match a substring of the entire string.

Categories : Wordpress

Importing OData feed into PowerPivot where the feed is OAuth 2 protected
I registered this with Microsoft: http://connect.microsoft.com/SQLServer/feedback/details/802179/unable-to-import-data-from-odata-feed-protected-by-oauth-2 It turns out that this is a bug in PowerPivot. The decision from Microsoft is that they will fix the problem in PowerQuery rather than PowerPivot. At the moment, PowerQuery has the same limitation as PowerPivot.

Categories : Excel

Trying to get last item from JSON feed and update only if feed has changed
Use jQuery getJSON. Add a random number to your URL to prevent server caching, like this: http://cjzn.streamon.fm/metadata/recentevents/CJZN-48k.json?rand=3 Use a javascript timer: http://www.w3schools.com/js/js_timing.asp On every request, save your last item and check if the previous item you saved is equal

Categories : Jquery

iOS RSS feed data fetching : How to get Description / Content of feed
As shown in ray wenderlich website, you can get the feed details from GDataXML's GDataXMLElement. Check the key you are getting for description/content GDataXMLElement like: [item valueForChild:@"description"] and save that string in the nsobject class you created to save the rss feed required data. After that you can load html string in the webview and add your custom css styling for the html string if needed. You can load html string in webview using webview's - (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL method. Hope my answer helps.

Categories : IOS

post to friends feed facebook without feed dialog
No. But some other options (since your req could be batch post) you may like, such as: You can post feed/photo on the user's wall and tag the friend/s in that post using mention tagging or place parameter Read more about tagging on the developers site here: Tagging

Categories : Facebook

Simplexml & php rss feed (view image from rss feed)
The code echo $ns_dc->thumbnail; prints out the text contents of the <media:thumbnail> element, even though it has none. To access the value in the url attribute, use the following: echo $ns_dc->thumbnail->attributes()->url;

Categories : PHP

LINQ FUNCTION TO RETURN LIST BUT COMPILER SAYS function doesn't return a value on all code path
All code paths don't return a value. If searchtype = "withdatetime" Then Dim locs As New crimemsapslocationDataContext Dim giveloc = From locations In locs.crimelocations _ Where locations.INCIDENTTYPE = crime And (locations.DATE_COMTD >= Convert.ToDateTime(startdate) And locations.DATE_COMTD <= Convert.ToDateTime(enddate)) _ And (locations.gettimecom >= starttime And locations.gettimecom <= endtime) _ Select locations Return giveloc.ToList ElseIf searchtype = "withdate" Then Dim locs As New crimemsapslocationDataContext Dim giveloc = From locations In locs.crimelocations _ Where locations.INCIDENTTYPE = crime And (locations.DATE_COMTD >= Conv

Categories : Asp Net

Clojure - is this an appropriate use of an atom?
Your approach using an atom is fine and looks good and clojurish. If you are looking for other approaches as well; since you can split your problem into some code that will produce and answer (your visitor) and some other code that will need the answer when it is available, Clojure's promise and deliver functions may be well suited. If you create the promises in the let block, then have the visitor deliver the results to the promise.

Categories : Clojure

Ruby RSS/Atom documentation
RSS and Atom it only xml-document with known shema, which included some xml-tag: author, category. Therefore you can use any ruby library for generate xml. For example or nokogiri. Builder github For example: require 'builder' class Rss def initialize(hash) builder = Builder::XmlMarkup.new builder.instruct! :xml, :version => "1.0" builder.rss :version => "2.0" do builder.channel do |b| hash.each do |key, value| b.tag!(key) { value } end end end builder end end #hash of nodes with values rss_hash = {:title => "Some Title", :link => "http://example.com", :description => "foo bar"} Rss.new(rss_hash) #=> "<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title></t

Categories : Ruby

RSS == Atom? Issues when getting/parsing
Kind of obvious solution, the data variable was already an xml object, so I could traverse it with jquery: $(data).find('entry').find('author').text();

Categories : Jquery

Converting value of a term to an atom
I think you are doing more complicated than necessary: animals_that_are(mammal, [lion, elephant, dog]). animals_that_are(reptile, [lizard, turtle]). does_animal_belong_to_group(Animal, Group) :- animals_that_are(Group, Animals), member(Animal, Animals). ?- does_animal_belong_to_group(lion, mammal). true ; false. Also, I would change the style of those facts, tentatively, the predicate naming should reflect the positions of arguments: animals_group([lion, elephant, dog], mammal).

Categories : Prolog

Atom:link in RSS using Rome
The blog post Adding Atom links to an RSS feed generated by ROME answers exactly that question: there is no build-in immediate support for Atom elements inside an RSS feed ... I’ve implemented an AtomContent class that holds a list of com.sun.syndication.feed.atom.Link but is easy extensible. The code is published as https://github.com/michael-simons/java-syndication .

Categories : Java

ATOM XML is not accepted by IBM Connections Server
There are two things you want to double check 1) I wonder if you need an id element in the atom entry, in the example of Connections forums API document, no id is provided 2) I notice you use the topic uuid in ref="urn:lsid:ibm.com:forum:ee5878b5-65d4-4d44-8192-367e49c30e91" , in fact, you should use the correct forum uuid instead of the topic id.

Categories : Misc

Best way to remove item in a list for an atom in Clojure
Sure, you can use swap!, see A. Webb's answer. You might want to consider whether it's the best choice to store you clients in a list; a set or a map would be a more natural choice (for use with disj / dissoc). (Unless there is always a very small number of clients, in which case it may make sense to use the least complicated data structure available.) Also, the dosync does nothing here. dosync is for use with Refs (and alter, commute, ref-set, ensure). I'll also point out that if you run a loop like this: (doseq [c @clients] ...) then it'll always loop across the value of clients at the time the doseq form was entered, regardless of any swap!s to the clients Atom which might have occurred in the meantime. Not that it's likely to be a problem, just something to keep in mind. Anot

Categories : Multithreading

How to find element in atom xml file jquery?
You have to escape the colon (:) with a double backslash () : $(xml).find("d\:Message") For more information, see jQuery XML parsing with namespaces

Categories : Jquery

ld: Assertion failed: (src.atom != NULL), function addRelocFixup
I was having this issue with the Bump library on my simulator. This thread provides a simulator friendly version of the lib: https://github.com/bumptech/bump-api-ios/issues/15

Categories : IOS

My function doesn't return the right value
Are you sure your host and port match in http://194.78.58.118:9001? This can be Same origin policy problem. EDIT: AJAX is asynchronous JavaScript and XML. So you returning value before you get response from server.

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.