Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 31-40 of 86 total

nowww!

set redirect from www.example.com to example.com for nginx web server

   1  
   2  server {
   3      listen       80;
   4      server_name  example.com www.example.com;
   5      if ( $host = www.example.com ) {
   6          rewrite ^\/(.*)$ http://example.com/$1 permanent;
   7      }
   8  
   9      .....
  10  }

yubnub.py

   1  
   2  #!/usr/bin/env python
   3  
   4  __author__="Andrew Pennebaker (andrew.pennebaker@gmail.com)"
   5  __date__="9 Dec 2006 - 10 Dec 2006"
   6  __copyright__="Copyright 2006 Andrew Pennebaker"
   7  __license__="GPL"
   8  __version__="0.0.1"
   9  __credits__="Based on Yubnub for Windows (http://www.opbarnes.com/blog/Programming/OPB/Utilities/yubnub.html)"
  10  __URL__="http://snippets.dzone.com/posts/show/3120"
  11  
  12  from html2txt import html2txt
  13  
  14  import webbrowser
  15  from urllib import urlopen
  16  import re
  17  
  18  import sys
  19  from getopt import getopt
  20  
  21  PARSER="http://yubnub.org/parser/parse?command="
  22  
  23  BROWSER_MODE="BROWSER"
  24  PLAIN_MODE="PLAIN"
  25  
  26  def space2plus(s):
  27  	return "+".join(s.split())
  28  
  29  def yubnub(command=""):
  30  	global PARSER
  31  
  32  	return PARSER+space2plus(command)
  33  
  34  def yubnubBrowser(command):
  35  	return webbrowser.open(yubnub(command))
  36  
  37  def cleanHTML(html):
  38  	h=html2txt()
  39  	h.feed(html)
  40  	h.close()
  41  
  42  	return h.output()
  43  
  44  def yubnubPlain(command, clean=True):
  45  	command=yubnub(command)
  46  
  47  	try:
  48  		url=urlopen(command)
  49  		lines=url.readlines()
  50  		url.close()
  51  
  52  		lines="".join(lines)
  53  
  54  		if clean:
  55  			return cleanHTML(lines)
  56  
  57  		return lines
  58  
  59  	except IOError, e:
  60  		return "Error connecting to "+command
  61  
  62  def usage():
  63  	print "Usage: "+sys.argv[0]+" [options] <command>"
  64  	print "-b --browser"
  65  	print "\n--plain (default)"
  66  	print "\t-c --clean (default)"
  67  	print "\t-d --dirty"
  68  	print "\n--parser <parser> (experimental)"
  69  	print "\n-h --help"
  70  
  71  	sys.exit()
  72  
  73  def main():
  74  	global PARSER
  75  
  76  	global BROWSER_MODE
  77  	global PLAIN_MODE
  78  
  79  	mode=PLAIN_MODE
  80  	parser=PARSER
  81  	clean=True
  82  
  83  	systemArgs=sys.argv[1:]
  84  	optlist, args=[], []
  85  	try:
  86  		optlist, args=getopt(systemArgs, "bhcd", ["browser", "plain", "clean", "dirty", "parser=", "help"])
  87  	except:
  88  		usage()
  89  
  90  	for option, value in optlist:
  91  		if option=="-h" or option=="--help":
  92  			usage()
  93  
  94  		elif option=="-b" or option=="--browser":
  95  			mode=BROWSER_MODE
  96  		elif option=="--plain":
  97  			mode=PLAIN_MODE
  98  		elif option=="-c" or option=="--clean":
  99  			clean=True
 100  		elif option=="-d" or option=="--dirty":
 101  			clean=False
 102  		elif option=="--parser":
 103  			parser=value
 104  
 105  	command=" ".join(args)
 106  
 107  	if mode==BROWSER_MODE:
 108  		yubnubBrowser(command)
 109  	elif mode==PLAIN_MODE:
 110  		for line in yubnubPlain(command, clean):
 111  			sys.stdout.write(line)
 112  		print ""
 113  
 114  if __name__=="__main__":
 115  	main()

PyS60 - BabelFish

// Translate from language A to language B
// code not complete but it works

   1  
   2  import urllib
   3  
   4  ####################################################################################### <BabelFish>
   5  class BabelFish(object):
   6      
   7      def translate(self, lang, message):
   8          
   9          try:
  10              url = urllib.URLopener()
  11          
  12              query = urllib.urlencode({
  13                                        'doit':'done',
  14                                        'intl':'1',
  15                                        'lp':lang,
  16                                        'tt':'urltext',
  17                                        'urltext':message
  18                                        })
  19          
  20              responde = url.open('http://babelfish.altavista.com/tr', query).read()
  21          
  22              start = responde.find('<div style=padding:10px;>') + 25
  23              stop = responde.find('</div>', start)
  24          
  25              return responde[start:stop]
  26          
  27          except Exception, error:
  28              return '-' + str(error)
  29  ####################################################################################### </BabelFish>
  30  
  31  ####################################################################################### <BabelFishUI>
  32  from graphics import *
  33  
  34  import appuifw
  35  import e32
  36  
  37  class BabelFishUI(object):
  38      
  39      def __init__(self):
  40          
  41          self.__lock = e32.Ao_lock()
  42          self.__img = Image.new((176, 144))
  43          self.__language = 'it_en'
  44          self.__textUI = None
  45          
  46          appuifw.app.exit_key_handler = lambda:self.__lock.signal()
  47          
  48          appuifw.app.title = u'BabelFish v1.0'
  49          appuifw.app.body = self.__canvas = appuifw.Canvas(redraw_callback=self.updateScreen)
  50          
  51          appuifw.app.menu = [(u'Translate', lambda:self.__translateUI()), (u'About', lambda:appuifw.note(u'BabelFish: v1.0", "Created by\nWhite Tiger\n<Z-TEAM@Libero.it>', 'info')), (u'Exit', lambda:self.__lock.signal)]
  52          
  53          self.updateScreen(None)
  54          
  55          self.__menuMain = appuifw.app.menu
  56          self.__bgMain = appuifw.app.body
  57          
  58          self.__lock.wait()
  59      
  60      def updateScreen(self, rect):
  61          
  62          self.__canvas.blit(self.__img)
  63      
  64      def __back(self):
  65          
  66          appuifw.app.menu = self.__menuMain
  67          appuifw.app.body = self.__bgMain
  68          
  69          appuifw.app.set_tabs([u'Back'], lambda x:None)
  70      
  71      def __translateUI(self):
  72          
  73          self.__textUI = appuifw.Text()
  74                  
  75          appuifw.app.menu = [(u'Translate', lambda:self.__translate()), (u'Language', lambda:self.__setLanguage()), (u'Clear', lambda:self.__textUI.clear()), (u'Back', lambda:self.__back())]
  76                     
  77          appuifw.app.body = self.__textUI
  78                  
  79      def __setLanguage(self):
  80          
  81          resp = appuifw.selection_list([u'italiano-inglese', u'inglese-italiano', u'inglese-francese', u'francese-inglese', u'inglese-tedesco', u'tedesco-inglese',
  82                                         u'francese-italiano', u'italiano-francese'], 1)
  83          
  84          if resp == 0:
  85              self.__language = 'it_en'
  86          elif resp == 1:
  87              self.__language = 'en_it'
  88          elif resp == 2:
  89              self.__language = 'en_fr'
  90          elif resp == 3:
  91              self.__language = 'fr_en'
  92          elif resp == 4:
  93              self.__language = 'en_de'
  94          elif resp == 5:
  95              self.__language = 'de_en'
  96          elif resp == 6:
  97              self.__language = 'fr_it'
  98          elif resp == 7:
  99              self.__language = 'it_fr'
 100              
 101      def __translate(self):
 102          
 103          babel = BabelFish()
 104          
 105          resp = babel.translate(self.__language, self.__textUI.get())
 106          
 107          if resp[0] == '-':
 108              self.__textUI.set(unicode(resp[1:]))
 109          else:
 110              self.__textUI.set(unicode(': ' +self.__textUI.get() + '\n: ' + resp))
 111                  
 112          appuifw.note(u'Translate', 'conf')
 113  ####################################################################################### </BabelFishUI>
 114  
 115  if __name__ == '__main__':
 116      
 117      BabelFishUI()

Python - My External IP Address

// My external ip address

   1  
   2  import urllib
   3  
   4  url = urllib.URLopener()
   5  resp = url.open('http://myip.dk')
   6  html = resp.read(114)
   7  
   8  end = html.find("</title>")
   9  start = html.find("IP:") + 3
  10  
  11  print html[start:end].strip()

HTML - AddIcon

   1  
   2  <head>
   3      <link rel="shortcut icon" href="img.ico" />
   4  </head>

RSS jsp taglib v 0.2

// taglib to display rss in jsp page

   1  
   2  package com.ranjan.feedreader;
   3  
   4  /**
   5   * Created by IntelliJ IDEA.
   6   * User: Rapid
   7   * Date: Oct 9, 2006
   8   * Time: 3:18:23 PM
   9   * To change this template use File | Settings | File Templates.
  10   */
  11  import java.net.URL;
  12  import java.util.Iterator;
  13  import java.util.HashMap;
  14  
  15  import com.sun.syndication.feed.module.Module;
  16  import com.sun.syndication.feed.synd.SyndEntry;
  17  import com.sun.syndication.feed.synd.SyndFeed;
  18  import com.sun.syndication.io.SyndFeedInput;
  19  import com.sun.syndication.io.XmlReader;
  20  import javax.servlet.jsp.JspContext;
  21  
  22  import javax.servlet.jsp.tagext.Tag;
  23  import javax.servlet.jsp.tagext.TagSupport;
  24  import javax.servlet.jsp.JspException;
  25  
  26  /* this tag should return the RSS feed as it is
  27   *it's purpose is to retrieve rss feeds
  28   *
  29   */
  30  
  31  public class FeedReader extends TagSupport{
  32  
  33      private String url = null;
  34  
  35  
  36  
  37  
  38  
  39      SyndFeedInput input ;
  40      URL feedUrl;
  41      SyndFeed feed ;
  42      String html ;
  43  
  44  
  45      public String getUrl() {
  46          return url;
  47      }
  48  
  49      public void setUrl(String url) {
  50          this.url = url;
  51      }
  52  
  53      public int doStartTag() throws JspException {
  54  
  55          return EVAL_BODY_INCLUDE;    //To change body of overridden methods use File | Settings | File Templates.
  56      }
  57  
  58      public int doEndTag() throws JspException {
  59  
  60  
  61  
  62  
  63              try  {
  64  
  65  
  66  
  67                  feedUrl  = new URL(url);
  68  
  69                  input  = new SyndFeedInput();
  70  
  71                  feed = input.build(new XmlReader(feedUrl));
  72  /*
  73                  String metaRSS = "Title: " + feed.getTitle() + "\n" +
  74                  "Author: " + feed.getAuthor()  + "\n" +
  75                   "Description: " + feed.getDescription()  + "\n" +
  76                   "Pub date: " + feed.getPublishedDate()  + "\n" +
  77                   "Copyright: " + feed.getCopyright() ;
  78  
  79                   pageContext.getOut().write( metaRSS );
  80  */
  81  
  82                    html =
  83  
  84                          "<table border='1'>" +
  85                          "<tr>" +
  86                              "<td>" + feed.getTitle() +
  87                              "</td>" +
  88                          "</tr>" +
  89                              "<tr>" +
  90                              "<td>" + feed.getDescription() +
  91                              "</td>" +
  92                          "</tr>" +
  93                           "<tr>" +
  94                              "<td>" + feed.getCopyright() +
  95                              "</td>" +
  96                          "</tr>" +
  97  
  98  
  99                          "<tr>" +
 100                              "<table>" ;
 101  
 102                                      //"<td> <a href = '#' onclick = " + "\"" + "popup_rss_article('" + /**/ + "') \"" + ">" + /**/  + "</a></td>"                      
 103                                     for( Iterator iter = feed.getEntries().iterator(); iter.hasNext(); ){
 104                                     
 105                                     html +=  "<tr>" +
 106                                                     createHREF(((SyndEntry)iter.next()).getLink() , ((SyndEntry)iter.next()).getTitle() )  +
 107                                     //             "<td> <a href = '#' onclick = " + "\"" + "popup_rss_article('" +((SyndEntry)iter.next()).getLink() + "') \"" + ">" + ((SyndEntry)iter.next()).getTitle()  + "</a></td>" +
 108                                              "</tr>"; 
 109                                     //((SyndEntry)iter.next()).getLink().toString()
 110                                      }
 111  
 112                          html +=
 113                                  "</table>" +
 114                           "</tr>" +
 115                          "</table>" ;
 116  
 117  
 118                  pageContext.getOut().write( html );
 119  
 120  
 121              }
 122              catch (Exception ex) {
 123                  ex.printStackTrace();
 124                  System.out.println("ERROR: " + ex.getMessage());
 125              }
 126  
 127  
 128  
 129  
 130  
 131  
 132          return EVAL_PAGE;    //To change body of overridden methods use File | Settings | File Templates.
 133      }
 134      public String createHREF( String link, String value )
 135      {
 136          return  "<td> <a href = '#' onclick = " + "\"" + "popup_rss_article('" + link + "') \"" + ">" + value  + "</a></td>";        
 137      }
 138  
 139  }
 140  
 141  //////////////////////////////////////////
 142  tld     /////////////////////////////////
 143  //////////////////////////////////////////
 144  

taglib for rss v 0.1

// jsp taglibrary for rss

   1  
   2  // the java code
   3  package com.ranjan.feedreader;
   4  
   5  /**
   6   * Created by IntelliJ IDEA.
   7   * User: Rapid
   8   * Date: Oct 9, 2006
   9   * Time: 3:18:23 PM
  10   * To change this template use File | Settings | File Templates.
  11   */
  12  import java.net.URL;
  13  import java.util.Iterator;
  14  import java.util.HashMap;
  15  
  16  import com.sun.syndication.feed.module.Module;
  17  import com.sun.syndication.feed.synd.SyndEntry;
  18  import com.sun.syndication.feed.synd.SyndFeed;
  19  import com.sun.syndication.io.SyndFeedInput;
  20  import com.sun.syndication.io.XmlReader;
  21  import javax.servlet.jsp.JspContext;
  22  
  23  import javax.servlet.jsp.tagext.Tag;
  24  import javax.servlet.jsp.tagext.TagSupport;
  25  import javax.servlet.jsp.JspException;
  26  
  27  /* this tag should return the RSS feed as it is 
  28   *it's purpose is to retrieve rss feeds 
  29   *
  30   */
  31  
  32  public class FeedReader extends TagSupport{
  33  
  34      private String url = null;
  35  
  36      
  37  
  38      
  39      
  40      SyndFeedInput input ;
  41      URL feedUrl;
  42      SyndFeed feed ;
  43      String html ;
  44      
  45  
  46      public String getUrl() {
  47          return url;
  48      }
  49  
  50      public void setUrl(String url) {
  51          this.url = url;
  52      }
  53      
  54      public int doStartTag() throws JspException {
  55  
  56          return EVAL_BODY_INCLUDE;    //To change body of overridden methods use File | Settings | File Templates.
  57      }
  58  
  59      public int doEndTag() throws JspException {
  60  
  61  
  62  
  63  
  64              try  {
  65  
  66      
  67  
  68                  feedUrl  = new URL(url);
  69  
  70                  input  = new SyndFeedInput();
  71                  
  72                  feed = input.build(new XmlReader(feedUrl));
  73  /*
  74                  String metaRSS = "Title: " + feed.getTitle() + "\n" +
  75                  "Author: " + feed.getAuthor()  + "\n" +
  76                   "Description: " + feed.getDescription()  + "\n" +
  77                   "Pub date: " + feed.getPublishedDate()  + "\n" +
  78                   "Copyright: " + feed.getCopyright() ;
  79  
  80                   pageContext.getOut().write( metaRSS );
  81  */
  82                 
  83                    html =       
  84  
  85                          "<table border='1'>" +
  86                          "<tr>" +
  87                              "<td>" + feed.getTitle() + 
  88                              "</td>" + 
  89                          "</tr>" +
  90                              "<tr>" +
  91                              "<td>" + feed.getDescription() + 
  92                              "</td>" + 
  93                          "</tr>" +
  94                           "<tr>" +
  95                              "<td>" + feed.getCopyright() +
  96                              "</td>" + 
  97                          "</tr>" +
  98                          
  99                                          
 100                          "<tr>" +
 101                              "<table>" ;
 102                    
 103                                     for( Iterator iter = feed.getEntries().iterator(); iter.hasNext(); ){
 104                                     html +=  "<tr>" +
 105                                                  "<td><a href = " + ((SyndEntry)iter.next()).getLink() + ">" +   
 106                                                      ((SyndEntry)iter.next()).getTitle() + "</a>" + 
 107  
 108                                                  "</td>" +
 109                                                
 110                                                  "</tr>" ;
 111                                     
 112                                     //((SyndEntry)iter.next()).getLink().toString() 
 113                                      }       
 114                     
 115                          html += 
 116                                  "</table>" +
 117                           "</tr>" +                        
 118                          "</table>" ;
 119                             
 120                  
 121                  pageContext.getOut().write( html );
 122                  
 123                  
 124              }
 125              catch (Exception ex) {
 126                  ex.printStackTrace();
 127                  System.out.println("ERROR: " + ex.getMessage());
 128              }
 129  
 130  
 131          
 132  
 133          
 134          
 135          return EVAL_PAGE;    //To change body of overridden methods use File | Settings | File Templates.
 136      }
 137  
 138  
 139  }
 140  //////////////////////////////////////////////////
 141  
 142  //  the tld file 
 143  //////////////////////////////////////////////////
 144  <?xml version="1.0" encoding="UTF-8"?>
 145  <taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd">
 146    <tlib-version>1.0</tlib-version>
 147    <short-name>rss</short-name>
 148    <uri>/WEB-INF/tlds/rss</uri>
 149    
 150    <tag>
 151         <name>rss</name>
 152         <tag-class>com.ranjan.feedreader.FeedReader</tag-class>
 153         <body-content>empty</body-content>
 154            <attribute>
 155              <name>url</name>
 156              <required>true</required>
 157              <rtexprvalue>false</rtexprvalue>
 158            </attribute>
 159  
 160         
 161    </tag>    
 162    <!-- A validator verifies that the tags are used correctly at JSP
 163           translation time. Validator entries look like this: 
 164        <validator>
 165            <validator-class>com.mycompany.TagLibValidator</validator-class>
 166            <init-param>
 167               <param-name>parameter</param-name>
 168               <param-value>value</param-value>
 169  	  </init-param>
 170        </validator>
 171     -->
 172    <!-- A tag library can register Servlet Context event listeners in
 173          case it needs to react to such events. Listener entries look
 174          like this: 
 175       <listener>
 176           <listener-class>com.mycompany.TagLibListener</listener-class> 
 177       </listener>
 178     -->
 179     
 180  </taglib>
 181  

Centered Box HTML and CSS

// HTML for web page with the content centered both vertically and horizontally

   1  
   2  <html>
   3  	<head>
   4  		<title>Centered HTML w/ CSS</title>
   5  		<style type="text/css" media="screen">
   6  			body, html { height:  100%; background-color:#000; }
   7  			#outer { height: 100%; width: 100%; overflow:  visible; position: relative; }
   8  			#outer[id] { display: table; position: static; }
   9  			#middle { position: absolute; top: 50%; }
  10  			#middle[id] { display: table-cell; vertical-align: middle; position: static; }
  11  			#inner { position:  relative; top: -50%; text-align: center; }
  12  			#inner[id] { position: static; text-align: center; }
  13  		</style>
  14  	</head>
  15  	<body>
  16  		<div id="outer">
  17  			<div id="middle">
  18  				<div id="inner">
  19  						This is the content
  20  				</div>
  21  			</div>
  22  		</div>
  23  	</body>
  24  </html>

Python - Query BabelFish

//Example di POST HTTP

   1  
   2  #!/usr/bin/python
   3  
   4  import urllib
   5  
   6  def translate(lang='it_en', text='ciao'):
   7  	
   8  	'''Converte delle frasi da una lingua sorgente ad una lingua destinazione'''
   9  
  10  	url = urllib.URLopener()
  11  	
  12  	query = urllib.urlencode({'doit':'done', 'intl':'1', 'lp':lang, 'tt':'urltext', 'urltext':text})
  13  	
  14  	responde = url.open('http://babelfish.altavista.com/tr', query).read()
  15  
  16  	start = responde.find('<div style=padding:10px;>') + 25
  17  	stop = responde.find('</div>', start)
  18  
  19  	print responde[start:stop]

RSS Reader - Reads Name and URL into HashMap

// description of your code here
// RSS reader for web reads them into HashMap

   1  
   2  
   3  
   4  /**
   5   * Created by IntelliJ IDEA.
   6   * User: Rapid
   7   * Date: Oct 9, 2006
   8   * Time: 3:18:23 PM
   9   * To change this template use File | Settings | File Templates.
  10   */
  11  import java.net.URL;
  12  import java.util.Iterator;
  13  import java.util.HashMap;
  14  
  15  import com.sun.syndication.feed.module.Module;
  16  import com.sun.syndication.feed.synd.SyndEntry;
  17  import com.sun.syndication.feed.synd.SyndFeed;
  18  import com.sun.syndication.io.SyndFeedInput;
  19  import com.sun.syndication.io.XmlReader;
  20  
  21  /**
  22   * Reads and prints any RSS/Atom feed type. Adopted from the example by the
  23   * same name at http://wiki.java.net/bin/view/Javawsxml/Rome05TutorialFeedReader
  24   *
  25   */
  26  public class FeedReader {
  27  
  28  
  29      HashMap hm = null;
  30      String[][] rss = null ;
  31      SyndFeedInput input ;
  32      URL feedUrl;
  33      SyndFeed feed ;
  34      int count =-1;
  35  
  36  
  37      public HashMap readRSS(String url) {
  38          boolean readOk = false;
  39  
  40              try {
  41  
  42                  hm = new HashMap();
  43  
  44                 feedUrl  = new URL(url);
  45  
  46                  input  = new SyndFeedInput();
  47                   feed = input.build(new XmlReader(feedUrl));
  48  
  49                  System.out.println("Title: " + feed.getTitle());
  50                  System.out.println("Author: " + feed.getAuthor());
  51                  System.out.println("Description: " + feed.getDescription());
  52                  System.out.println("Pub date: " + feed.getPublishedDate());
  53                  System.out.println("Copyright: " + feed.getCopyright());
  54                  System.out.println("Modules used:");
  55  
  56  
  57  
  58                  String metaRSS = "Title: " + feed.getTitle() + "\n" +
  59                  "Author: " + feed.getAuthor()  + "\n" +
  60                   "Description: " + feed.getDescription()  + "\n" +
  61                   "Pub date: " + feed.getPublishedDate()  + "\n" +
  62                   "Copyright: " + feed.getCopyright() ;
  63  
  64  
  65  
  66  
  67                  rss = new String[ feed.getEntries().size()][2];
  68  
  69  
  70                  System.out.println("Titles of the " + feed.getEntries().size() +
  71                                     " entries:");
  72                  for (final Iterator iter = feed.getEntries().iterator();
  73                       iter.hasNext();)
  74                  {
  75  
  76  
  77  
  78  
  79  
  80  
  81                      rss[++count][0] =      ((SyndEntry)iter.next()).getTitle().toString();
  82  
  83  
  84  
  85  
  86                  }
  87                  count = -1 ;
  88                  for (final Iterator iter = feed.getEntries().iterator();
  89                       iter.hasNext();)
  90                  {
  91  
  92                     rss[++count][1] =      ((SyndEntry)iter.next()).getUri().toString();
  93                  }
  94  
  95  
  96                  if (feed.getImage() != null)
  97                  {
  98                      System.out.println("Feed image URL: " +
  99                                         feed.getImage().getUrl());
 100                  }
 101  
 102                  readOk = true;
 103                  hm.put( feed.getTitle(), rss);
 104              }
 105              catch (Exception ex) {
 106                  ex.printStackTrace();
 107                  System.out.println("ERROR: " + ex.getMessage());
 108              }
 109  
 110  
 111          String[][] rs = (String[][])hm.get("LinuxInsider");
 112  
 113            System.out.println("************************");
 114          for( int i=0; i<rs.length; i++){
 115  
 116              System.out.println( rs[i][0]);
 117               System.out.println( rs[i][1]);
 118  //             System.out.println( rs[i][2]);
 119          }
 120          if (! readOk) {
 121              System.out.println();
 122              System.out.println("FeedReader reads and prints info on any RSS/Atom feed.");
 123              System.out.println("The first parameter must be the URL of the feed to read.");
 124              System.out.println();
 125          }
 126  
 127          return hm;
 128      }
 129  
 130  }
« Newer Snippets
Older Snippets »
Showing 31-40 of 86 total