convert string date format to other



import java.util.*;
import java.text.*;
public class StringToDate {
public static void main(String[] args) {
try {
String str_date="10-Sep-2009";
DateFormat formatter,formatter2 ;
Date date ;
formatter = new SimpleDateFormat("dd-MMM-yyyy");
date = (Date)formatter.parse(str_date);

String formattedDate = formatter.format(date);
System.out.println("dd-MMM-yyyy date is ==>"+formattedDate);
Date date1 = formatter.parse(formattedDate);

formatter = new SimpleDateFormat("yyyy-MM-dd");
formattedDate = formatter.format(date1);
System.out.println("yyyy-mm-dd date is ==>"+formattedDate);
}
catch(Exception e)

{System.out.println("Exception :"+e); }

}
}
[Read More...]


Date combo box



import java.awt.*;
import java.awt.event.*;
import java.util.Calendar;
import java.text.SimpleDateFormat;

import javax.swing.*;
import javax.swing.event.PopupMenuListener;
import javax.swing.event.PopupMenuEvent;
import javax.swing.plaf.ComboBoxUI;
import javax.swing.plaf.basic.ComboPopup;
import javax.swing.plaf.metal.MetalComboBoxUI;
import javax.swing.border.Border;
import javax.swing.border.EtchedBorder;
import javax.swing.border.EmptyBorder;

import com.sun.java.swing.plaf.motif.MotifComboBoxUI;
import com.sun.java.swing.plaf.windows.WindowsComboBoxUI;


public class DateComboBox extends JComboBox {

protected SimpleDateFormat dateFormat = new SimpleDateFormat("MMM d, yyyy");
public void setDateFormat(SimpleDateFormat dateFormat) {
this.dateFormat = dateFormat;
}
public void setSelectedItem(Object item) {
// Could put extra logic here or in renderer when item is instanceof Date, Calendar, or String
// Dont keep a list ... just the currently selected item
removeAllItems(); // hides the popup if visible
addItem(item);
super.setSelectedItem(item);
}

public void updateUI() {
ComboBoxUI cui = (ComboBoxUI) UIManager.getUI(this);
if (cui instanceof MetalComboBoxUI) {
cui = new MetalDateComboBoxUI();
} else if (cui instanceof MotifComboBoxUI) {
cui = new MotifDateComboBoxUI();
} else if (cui instanceof WindowsComboBoxUI) {
cui = new WindowsDateComboBoxUI();
}
setUI(cui);
}


class MetalDateComboBoxUI extends MetalComboBoxUI {
protected ComboPopup createPopup() {
return new DatePopup( comboBox );
}
}

class WindowsDateComboBoxUI extends WindowsComboBoxUI {
protected ComboPopup createPopup() {
return new DatePopup( comboBox );
}
}

class MotifDateComboBoxUI extends MotifComboBoxUI {
protected ComboPopup createPopup() {
return new DatePopup( comboBox );
}
}



class DatePopup implements ComboPopup, MouseMotionListener,
MouseListener, KeyListener, PopupMenuListener {

protected JComboBox comboBox;
protected Calendar calendar;
protected JPopupMenu popup;
protected JLabel monthLabel;
protected JPanel days = null;
protected SimpleDateFormat monthFormat = new SimpleDateFormat("MMM yyyy");

protected Color selectedBackground;
protected Color selectedForeground;
protected Color background;
protected Color foreground;

public DatePopup(JComboBox comboBox) {
this.comboBox = comboBox;
calendar = Calendar.getInstance();
//String[] dts = {dt};
int yr = calendar.get(Calendar.YEAR);
int mn = calendar.get(Calendar.MONTH);
int dts = calendar.get(Calendar.DATE);
String dt = dts+"/"+mn+"/"+yr;
comboBox.addItem(dt);
// check Look and Feel
background = UIManager.getColor("ComboBox.background");
foreground = UIManager.getColor("ComboBox.foreground");
selectedBackground = UIManager.getColor("ComboBox.selectionBackground");
selectedForeground = UIManager.getColor("ComboBox.selectionForeground");

initializePopup();
}


public void show() {
try {
// if setSelectedItem() was called with a valid date, adjust the calendar
calendar.setTime( dateFormat.parse( comboBox.getSelectedItem().toString() ) );
} catch (Exception e) {}
updatePopup();
popup.show(comboBox, 0, comboBox.getHeight());
}

public void hide() {
popup.setVisible(false);
}

protected JList list = new JList();
public JList getList() {
return list;
}

public MouseListener getMouseListener() {
return this;
}

public MouseMotionListener getMouseMotionListener() {
return this;
}

public KeyListener getKeyListener() {
return this;
}

public boolean isVisible() {
return popup.isVisible();
}

public void uninstallingUI() {
popup.removePopupMenuListener(this);
}


public void mousePressed( MouseEvent e ) {}
public void mouseReleased( MouseEvent e ) {}
// something else registered for MousePressed
public void mouseClicked(MouseEvent e) {
if ( !SwingUtilities.isLeftMouseButton(e) )
return;
if ( !comboBox.isEnabled() )
return;
if ( comboBox.isEditable() ) {
comboBox.getEditor().getEditorComponent().requestFocus();
} else {
comboBox.requestFocus();
}
togglePopup();
}

protected boolean mouseInside = false;
public void mouseEntered(MouseEvent e) {
mouseInside = true;
}
public void mouseExited(MouseEvent e) {
mouseInside = false;
}

// MouseMotionListener
public void mouseDragged(MouseEvent e) {}
public void mouseMoved(MouseEvent e) {}

// KeyListener
public void keyPressed(KeyEvent e) {}
public void keyTyped(KeyEvent e) {}
public void keyReleased( KeyEvent e ) {
if ( e.getKeyCode() == KeyEvent.VK_SPACE ||
e.getKeyCode() == KeyEvent.VK_ENTER ) {
togglePopup();
}
}


public void popupMenuCanceled(PopupMenuEvent e) {}
protected boolean hideNext = false;
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
hideNext = mouseInside;
}
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}


protected void togglePopup() {
if ( isVisible() || hideNext ) {
hide();
} else {
show();
}
hideNext = false;
}


// Note *** did not use JButton because Popup closes when pressed
protected JLabel createUpdateButton(final int field, final int amount) {
final JLabel label = new JLabel();
final Border selectedBorder = new EtchedBorder();
final Border unselectedBorder = new EmptyBorder(selectedBorder.getBorderInsets(new JLabel()));
label.setBorder(unselectedBorder);
label.setForeground(foreground);
label.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
calendar.add(field, amount);
updatePopup();
}
public void mouseEntered(MouseEvent e) {
label.setBorder(selectedBorder);
}
public void mouseExited(MouseEvent e) {
label.setBorder(unselectedBorder);
}
});
return label;
}


protected void initializePopup() {
JPanel header = new JPanel(); // used Box, but it wasn't Opaque
header.setLayout(new BoxLayout(header, BoxLayout.X_AXIS));
header.setBackground(background);
header.setOpaque(true);

JLabel label;
label = createUpdateButton(Calendar.YEAR, -1);
label.setText("<<");
label.setToolTipText("Previous Year");

header.add(Box.createHorizontalStrut(12));
header.add(label);
header.add(Box.createHorizontalStrut(12));

label = createUpdateButton(Calendar.MONTH, -1);
label.setText("<");
label.setToolTipText("Previous Month");
header.add(label);

monthLabel = new JLabel("", JLabel.CENTER);
monthLabel.setForeground(foreground);
header.add(Box.createHorizontalGlue());
header.add(monthLabel);
header.add(Box.createHorizontalGlue());

label = createUpdateButton(Calendar.MONTH, 1);
label.setText(">");
label.setToolTipText("Next Month");
header.add(label);

label = createUpdateButton(Calendar.YEAR, 1);
label.setText(">>");
label.setToolTipText("Next Year");

header.add(Box.createHorizontalStrut(12));
header.add(label);
header.add(Box.createHorizontalStrut(12));

popup = new JPopupMenu();
popup.setBorder(BorderFactory.createLineBorder(Color.black));
popup.setLayout(new BorderLayout());
popup.setBackground(background);
popup.addPopupMenuListener(this);
popup.add(BorderLayout.NORTH, header);
}

// update the Popup when either the month or the year of the calendar has been changed
protected void updatePopup() {
monthLabel.setText( monthFormat.format(calendar.getTime()) );
if (days != null) {
popup.remove(days);
}
days = new JPanel(new GridLayout(0, 7));
days.setBackground(background);
days.setOpaque(true);

Calendar setupCalendar = (Calendar) calendar.clone();
setupCalendar.set(Calendar.DAY_OF_WEEK, setupCalendar.getFirstDayOfWeek());
for (int i = 0; i < 7; i++) {
int dayInt = setupCalendar.get(Calendar.DAY_OF_WEEK);
JLabel label = new JLabel();
label.setHorizontalAlignment(JLabel.CENTER);
label.setForeground(foreground);
if (dayInt == Calendar.SUNDAY) {
label.setText("Sun");
} else if (dayInt == Calendar.MONDAY) {
label.setText("Mon");
} else if (dayInt == Calendar.TUESDAY) {
label.setText("Tue");
} else if (dayInt == Calendar.WEDNESDAY) {
label.setText("Wed");
} else if (dayInt == Calendar.THURSDAY) {
label.setText("Thu");
} else if (dayInt == Calendar.FRIDAY) {
label.setText("Fri");
} else if (dayInt == Calendar.SATURDAY){
label.setText("Sat");
}
days.add(label);
setupCalendar.roll(Calendar.DAY_OF_WEEK, true);
}

setupCalendar = (Calendar) calendar.clone();
setupCalendar.set(Calendar.DAY_OF_MONTH, 1);
int first = setupCalendar.get(Calendar.DAY_OF_WEEK);
for (int i = 0; i < (first - 1); i++) {
days.add(new JLabel(""));
}
for (int i = 1; i <= setupCalendar.getActualMaximum(Calendar.DAY_OF_MONTH); i++) {
final int day = i;
final JLabel label = new JLabel(String.valueOf(day));
label.setHorizontalAlignment(JLabel.CENTER);
label.setForeground(foreground);
label.addMouseListener(new MouseListener() {
public void mousePressed(MouseEvent e) {}
public void mouseClicked(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {
label.setOpaque(false);
label.setBackground(background);
label.setForeground(foreground);
calendar.set(Calendar.DAY_OF_MONTH, day);
comboBox.setSelectedItem(dateFormat.format(calendar.getTime()));
hide();
comboBox.requestFocus();
}
public void mouseEntered(MouseEvent e) {
label.setOpaque(true);
label.setBackground(selectedBackground);
label.setForeground(selectedForeground);
}
public void mouseExited(MouseEvent e) {
label.setOpaque(false);
label.setBackground(background);
label.setForeground(foreground);
}
});

days.add(label);
}

popup.add(BorderLayout.CENTER, days);
popup.pack();
}
}

public static void main(String args[])
{
JFrame f = new JFrame();
Container c = f.getContentPane();
c.setLayout(new FlowLayout());
c.add(new JLabel("Date:"));
DateComboBox dcb = new DateComboBox();
c.add(dcb);
f.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
f.setSize(200, 100);
f.show();
}

}
[Read More...]


CallableStatement



import java.sql.*;
class CallableDemo
{
public static void main(String s[])
{
try{
String name="sun";
String pwd="ktm";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:dsn7");

CallableStatement st=con.prepareCall("{call pselect1(?,?)}");
st.setString(1,"vinu");
st.registerOutParameter(2,Types.VARCHAR);
st.executeUpdate();
String status=st.getString(2);
System.out.println(status);
//con.close();

}catch(Exception e){System.out.println(e);}
}
}
[Read More...]


BufferedOutputStream



import java.io.*;
public class BufferedOut
{
public static void main(String args[])throws IOException
{
String str="India is my Countery";
byte buffer[]=str.getBytes();
FileOutputStream fs=new FileOutputStream("ss.text");
BufferedOutputStream br=new BufferedOutputStream(fs);
try
{
br.write(buffer,0,str.length());
br.flush();
}
catch(IOException e)
{
System.out.println(e);
}
}
}
[Read More...]


Batch execution



import java.sql.*;
class BatchDemo
{
public static void main(String s2[])
{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:syam");
Statement st=con.createStatement();

String str1="insert into login values('s','g')";
st.addBatch(str1);
String str2="insert into login values('q','w')";
st.addBatch(str2);
st.executeBatch();


}catch(Exception e){System.out.println(e);}
}
}
[Read More...]


Autocommit



import java.sql.*;
class AutoCommitDemo
{

public static void main(String s2[])
{
Connection con=null;
try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:syam");
con.setAutoCommit(false);
Statement st=con.createStatement();
st.executeUpdate("insert into student values(1,'veena')");
st.executeUpdate("insert into mark values(1,50)");
con.commit();
}catch(Exception e1){
try{
con.rollback();
}catch(Exception e2){System.out.println(e2);}
}
finally{
try{
con.setAutoCommit(true);
}catch(Exception e2){System.out.println(e2);}
}
}
}
[Read More...]


How to convert a java file folder in to jar



Consider we created a folder contains java classes.
To compile this programme yourself, make sure;
all the source code is in the same folder
all the images are in a folder called images

type in a DOS window, javac *.java to compile all the source code
type jar -cvfm chess.jar manifest.txt *.class images/*.gif

that will put all the files in an executable jar file
[Read More...]


Command for opening a JAR File



First save the jar inside A folder.Let us consider a jar file named sample.jar is saved inside a folder e:/syam. To get it we have to give the following in command prompt

E:/syam>jar -xvf sample.jar
[Read More...]


Diff b/w string and String Buffer



Java provides the StringBuffer and String classes, and the String class is used to manipulate character strings that cannot be changed. Simply stated, objects of type String are read only and immutable. The StringBuffer class is used to represent characters that can be modified.


The significant performance difference between these two classes is that StringBuffer is faster than String when performing simple concatenations. In String manipulation code, character strings are routinely concatenated. Using the String class, concatenations are typically performed as follows:

String str = new String ("Stanford ");
str += "Lost!!";




If you were to use StringBuffer to perform the same concatenation, you would need code that looks like this:

StringBuffer str = new StringBuffer ("Stanford ");
str.append("Lost!!");




Developers usually assume that the first example above is more efficient because they think that the second example, which uses the append method for concatenation, is more costly than the first example, which uses the + operator to concatenate two String objects.

The + operator appears innocent, but the code generated produces some surprises. Using a StringBuffer for concatenation can in fact produce code that is significantly faster than using a String. To discover why this is the case, we must examine the generated bytecode from our two examples. The bytecode for the example using String looks like this:

0 new #7
3 dup
4 ldc #2
6 invokespecial #12
9 astore_1
10 new #8
13 dup
14 aload_1
15 invokestatic #23
18 invokespecial #13
21 ldc #1
23 invokevirtual #15
26 invokevirtual #22
29 astore_1




The bytecode at locations 0 through 9 is executed for the first line of code, namely:

String str = new String("Stanford ");


Then, the bytecode at location 10 through 29 is executed for the concatenation:

str += "Lost!!";


Things get interesting here. The bytecode generated for the concatenation creates a StringBuffer object, then invokes its append method: the temporary StringBuffer object is created at location 10, and its append method is called at location 23. Because the String class is immutable, a StringBuffer must be used for concatenation.

After the concatenation is performed on the StringBuffer object, it must be converted back into a String. This is done with the call to the toString method at location 26. This method creates a new String object from the temporary StringBuffer object. The creation of this temporary StringBuffer object and its subsequent conversion back into a String object are very expensive.

In summary, the two lines of code above result in the creation of three objects:

A String object at location 0
A StringBuffer object at location 10
A String object at location 26


Now, let's look at the bytecode generated for the example using StringBuffer:

0 new #8
3 dup
4 ldc #2
6 invokespecial #13
9 astore_1
10 aload_1
11 ldc #1
13 invokevirtual #15
16 pop


The bytecode at locations 0 to 9 is executed for the first line of code:

StringBuffer str = new StringBuffer("Stanford ");


The bytecode at location 10 to 16 is then executed for the concatenation:

str.append("Lost!!");




Notice that, as is the case in the first example, this code invokes the append method of a StringBuffer object. Unlike the first example, however, there is no need to create a temporary StringBuffer and then convert it into a String object. This code creates only one object, the StringBuffer, at location 0.

In conclusion, StringBuffer concatenation is significantly faster than String concatenation. Obviously, StringBuffers should be used in this type of operation when possible. If the functionality of the String class is desired, consider using a StringBuffer for concatenation and then performing one conversion to String.
[Read More...]


Screen Capture program



import java.awt.*;
import java.io.*;
import java.awt.image.*;
import com.sun.image.codec.jpeg.*;
public class ScreenImage
{
public ScreenImage()
{
OutputStream out = null;
try
{
BufferedImage shot = (new

Robot()).createScreenCapture(new Rectangle(0, 0,

800,600));
out = new BufferedOutputStream(new

FileOutputStream("shot.jpg"));
JPEGImageEncoder encoder =

JPEGCodec.createJPEGEncoder(out);
encoder.encode(shot);
}
catch (Exception exc)
{
exc.printStackTrace();
}
finally
{
try
{
if (out != null)
{
out.close();
}
System.exit(0);
}
catch (Throwable t) {}
}
}
public static void main(String[] args)
{
new ScreenImage();
}
}
[Read More...]


Fibonacci Series



public class Fibonacci {
public static long fib(int n) {
if (n <= 1) return n;
else return fib(n-1) + fib(n-2);
}

public static void main(String[] args) {
int N = Integer.parseInt(args[0]);
for (int i = 1; i <= N; i++)
System.out.println(i + ": " + fib(i));
}
}
[Read More...]


Palindrome String



import java.util.*;

public class CheckPalindrome{
public static void main(String[] args) {
String str="madam";
Stack s= new Stack();
int i,count=0;
char array[]=str.toCharArray();
for(i=0;i(less than symbol)array.length;i++)
{
char arr=array[i];
s.push(arr);
}
for(i=0;i(less than symbol)array.length/2;i++)
{
char st=array[i];
Object ob=s.pop( );
if(st==ob) {
count++;
}
}
if(count==array.length/2) {
System.out.println("String is Palindrome");
}
else{
System.out.println("String is not a Palindrome");
}
}
}
[Read More...]


Palindrome number



import java.io.*;

public class Palindrome {
public static void main(String [] args){
try{
BufferedReader object = new BufferedReader(
new
InputStreamReader(System.in));
System.out.println("Enter number");
int num= Integer.parseInt(object.readLine());
int n = num;
int rev=0;
System.out.println("Number: ");
System.out.println(" "+ num);
for (int i=0; i<=num; i++){
int r=num%10;
num=num/10;
rev=rev*10+r;
i=0;
}
System.out.println("After reversing the number: "+ " ");
System.out.println(" "+ rev);
if(n == rev){
System.out.print("Number is palindrome!");
}
else{
System.out.println("Number is not palindrome!");
}
}
catch(Exception e){
System.out.println("Out of range!");
}
}
}
[Read More...]


File: Create a program for which out put wil be the same program



import java.util.*;
import java.io.*;
class Syam
{
public static void main(String args[])throws Exception
{
PrintWriter pw=new PrintWriter(System.out,true);
Scanner sc=new Scanner(new File("Syam.java"));
String s=null;
try
{
while((s=sc.nextLine())!=null)
{
pw.println(s);
}
}
catch(Exception e)
{
}
}
}
[Read More...]




Difference Between Two Days
import java.io.*;
import java.util.*;
import java.util.Date.*;
import java.util.Calendar;
import java.lang.Math.*;
import java.util.StringTokenizer;
public class DateDemo
{
String s,s1;
int i;
int d,d1,m,m1,y,y1;
public void add(String a,String b)
{
s=a;
s1=b;
StringTokenizer ss=new StringTokenizer(s,"/");
while(ss.hasMoreTokens())
{
d=Integer.parseInt(ss.nextToken());
m=Integer.parseInt(ss.nextToken());
y=Integer.parseInt(ss.nextToken());
}
StringTokenizer st=new StringTokenizer(s1,"/");
while(st.hasMoreTokens())
{
d1=Integer.parseInt(st.nextToken());
m1=Integer.parseInt(st.nextToken());
y1=Integer.parseInt(st.nextToken());
}
Calendar c1=Calendar.getInstance();
Calendar c2=Calendar.getInstance();
c1.set(y,m,d);
c2.set(y1,m1,d1);

long t1=c1.getTimeInMillis();
long t2=c2.getTimeInMillis();
long t3=Math.abs(t1-t2);
i=60*1000*60*24;
System.out.println(t3);
long diff= t3/i;
System.out.println("Difference btn"+ s+" and"+s1+" is"+diff+"days");
}
public static void main(String args[])throws Exception
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
DateDemo dd=new DateDemo();
System.out.println("Enter the date as dd/mm/yyyy");
String d1=br.readLine();
System.out.println("Enter second date as dd/mm/yy");
String d2=br.readLine();
dd.add(d1,d2);
}
}
[Read More...]


java coding For getting no of Days in a month



import java.util.Scanner;

public class DateDemo
{
public static void main(String[] args)
{
//Create scanner object to obtain input from user
Scanner input = new Scanner (System.in);

int MonthNum; //To hold the month from user input
int Year; //To hold the year
int numDays;
String Month;

System.out.print("Please enter the Month #");
MonthNum = input.nextInt();
System.out.print("Please enter the Year");
Year = input.nextInt();

if (MonthNum == 2)
{
if ( (Year % 4 == 0) && (Year % 400 == 0)
&& !(Year % 100 == 0) )
numDays = 29;
else
numDays = 28;
}
else if (MonthNum == 1 || MonthNum == 3 || MonthNum == 5 || MonthNum == 7 || MonthNum == 8
|| MonthNum == 10 || MonthNum == 12)
numDays = 31;
else
numDays = 30;

if (MonthNum == 1)
Month = "January";
else if (MonthNum == 2)
Month = "Feburary";
else if (MonthNum == 3)
Month = "March";
else if (MonthNum == 4)
Month = "April";
else if (MonthNum == 5)
Month = "May";
else if (MonthNum == 6)
Month = "June";
else if (MonthNum == 7)
Month = "July";
else if (MonthNum == 8)
Month = "August";
else if (MonthNum == 9)
Month = "September";
else if (MonthNum == 10)
Month = "October";
else if (MonthNum == 11)
Month = "November";
else if (MonthNum == 12)
Month = "December";


System.out.println(Month + " " + Year " has " + numDays "." );
System.out.println(Month);
System.out.println(numDays);
}
}

Difference Between Two Days

package org.kodejava.example.java.util;
02.
03.import java.util.Calendar;
04.
05.public class DateDifferentExample
06.{
07. public static void main(String[] args)
08. {
09. // Creates two calendars instances
10. Calendar cal1 = Calendar.getInstance();
11. Calendar cal2 = Calendar.getInstance();
12.
13. // Set the date for both of the calendar instance
14. cal1.set(2006, 12, 30);
15. cal2.set(2007, 05, 03);
16.
17. // Get the represented date in milliseconds
18. long milis1 = cal1.getTimeInMillis();
19. long milis2 = cal2.getTimeInMillis();
20.
21. // Calculate difference in milliseconds
22. long diff = milis2 - milis1;
23.
24. // Calculate difference in seconds
25. long diffSeconds = diff / 1000;
26.
27. // Calculate difference in minutes
28. long diffMinutes = diff / (60 * 1000);
29.
30. // Calculate difference in hours
31. long diffHours = diff / (60 * 60 * 1000);
32.
33. // Calculate difference in days
34. long diffDays = diff / (24 * 60 * 60 * 1000);
35.
36. System.out.println("In milliseconds: " + diff + " milliseconds.");
37. System.out.println("In seconds: " + diffSeconds + " seconds.");
38. System.out.println("In minutes: " + diffMinutes + " minutes.");
39. System.out.println("In hours: " + diffHours + " hours.");
40. System.out.println("In days: " + diffDays + " days.");
41. }
42.}
[Read More...]


 

Categories

Recent Comments

Popular Posts

Return to top of page Copyright © 2010 | Platinum Theme Converted into Blogger Template by HackTutors