Posts

Showing posts from 2013

Changing your YouTube video preview thumbnail

Image
To change preview thumbnail of your youtube video Option 1 You can choose a thumbnail from the three options that youtube automatically generates  Go to  Video Manager  by clicking on your  username  in the upper right corner. On the My Videos/Upload Page, click  Edit  for the corresponding video you'd like to change. Once you are on Edit Video Page you can choose from the three options provided by YouTube as highlighted in the screen grab below. Option 2 If don't find any image suitable for your video in the options provided by YouTube then you can also add a "Custom Thumbnail" for your video. Please note you will be able to see this option only if your YouTube account is a verified account . If you are already viewing the Custom Thumbnail option you can simply upload a image of your choice and set it as your video preview thumbnail. P.S. I would recommend to keep 16:9 ratio as it's the most used in YouTube Players and

Making PDF files SEO friendly

Image
Are you trying to figure out a way to get search engines to drill down your online PDF files and improve its ranking? If that is the case then you have a reason to cheer up :), this post will guide you to follow few very basic steps to improve your PDFs online visibility. Best Practices in SEO for PDF files Smartly name your PDFs -  Typically, the PDF filename will become part of the URL, so give your document a good key-word rich filename.  Set the PDF title - Yes, most of us just don't set PDF title properties, but the matter of fact is  that the title tag is a huge ranking factor. To set title of a PDF file, open it in Adobe Acrobat or any other PDF creator and go to, File --> Properties Set the other document properties too - don't  just  ignore the other properties provide a good Subject (Description) and Keywords as you do it for your HTMLs Prefer text-based PDFs over image-dominated PDFs Set "alt" text for all the images - this will also

Custom PagingNavigator for SEO friendly URL

Apache Wickets biggest strength is its focus on  components  - Among a very large set of components is PagingNavigator component. It is a Wicket Panel component to draw and maintain a complete page navigation. I found this component very useful but the only problem that compelled me to write my own CustomPagingNavigator is the wicket URLs that are being created by clicking the page links.  The Java Part... public class CustomPaginationLinksPanel<T> extends Panel{   private static final long serialVersionUID = 10002L;   /** Pageable List View to be displayed  */   private PageableListView<T> mainView ;   /** Max count of links  default  value = 5 */   private int linksPerPage = 5;   /**  Page Number currently visible */   private int    currPgNum ;     /** first page number */   private int firstNum ;   /** last page number */   private int lastNum ;   //Calculated on the basic of List size   private int maxPages ;

sorting a List containing Object[] elements

Problem Statement:  How can we  sort a List containing Object[] elements? The Solution: Ever wondered how to sort a list full of Object[]? The answer is to use a Comparator I have used an anonymous class which implements compare method to sort the List of Object[] package  example.collections; import  java.util.ArrayList; import  java.util.Collections; import  java.util.Comparator; import  java.util.List; public   class  Sorting {         public   static   void  main(String[] args) {               List<Object[]> list =  new  ArrayList<Object[]>();                             list.add( new  Object[]{123,  "abc" , 212});               list.add( new  Object[]{423,  "qwert" , 2131});               list.add( new  Object[]{656,  "asda" , 45});               list.add( new  Object[]{111,  "zxcz" , 43});               list.add( new  Object[]{10,  "poiu" , 890});               Collect