Saturday, 8 March 2014

Installing VLC player in fedora


Any video player needs codecs to play the videos on linux, Unfortunately default installation of fedora wont provide it...

First You Need to install a codec,
  1. Get Rpm Fusion,
    • Run this command
      su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
  2. Get Livna
    • su -c "rpm -ivh http://rpm.livna.org/livna-release.rpm"
  3. Get gstreamer codec
    • su -c 'yum install gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer-plugins-ffmpeg vlc'
  4. Optionally I Prefer Amarok music player, here is the command
    • su -c 'yum install amarok'
Thats It.... Vlc Should be listed under the Application Tab...

Wednesday, 2 October 2013

First Java Spring Program:

Having Basic Knowledge Of Spring Application Context and Container, We will look into a very basic Working Program developed in eclipse,
  • Pr-Requisites of spring framework:
    • Either Spring Tool Suite OR Eclipse need to be installed.
    • In Spring Tool Suite Create New --> Spring Project Will Do All necessary configurations.
    • In Eclipse, User Library need to be configured containing all jars of spring,
      • Menu Bar ->> Window -->> Preferences -->> Search for User Libraries -->> Create New Library -->> Add External Jars -->> add all jars listed in below figure into it.










Now We Going To write XML, Interface and Classes Which Are Used In Program, This Program Is Basically An Example Of Creating a Bean In Spring Framework

Create An Interface Called Figure: With draw() method


A Class Triangle Implementing Figure

Class Contains 2 property height and type, A Constructor accepting 2 argument (type and height), and implementation of draw method of Figure interface.

Create Spring.xml in src folder of project for triangle bean used to create in spring context

Finally The Implementation Class Which Uses Aplication Context to inject the Triangle Bean into container
 

 At Last the project Folder structure Should Look Like
 
 Note That  Spring user library into the project and an additional .jar for logging information/Error messages from spring to console.


The Output