Every Problem (even Impossible ones) Have a Solution - Small Story (Must Read)

Many years ago in a small Indian village,

A farmer had the misfortune of owing a large sum of money to a village moneylender.

The Moneylender , who was old and ugly, fancied the farmer's beautiful daughter. So he proposed a bargain.
He said he would forgo the farmer's debt if he could marry his daughter. Both the farmer and his daughter were horrified by the proposal.

So the cunning money-lender suggested that they let Providence decide the matter.

He told them that he would put a black pebble and a white pebble into an empty money bag. Then the girl would have to pick one pebble from the bag.

1) If she picked the black pebble, she would become his wife and her father's debt would be forgiven.
2) If she picked the white pebble she need not marry him and her father's debt would still be forgiven.
3) But if she refused to pick a pebble, her father would be thrown into Jail.


They were standing on a pebble strewn path in the farmer's field. As they talked, the moneylender bent over to pick up two pebbles. As he picked them up, the sharp-eyed girl noticed that he had picked up two black pebbles and put them into the bag.


He then asked the girl to pick a pebble from the bag.

Careful analysis would produce three possibilities:

1. The girl should refuse to take a pebble.
2. The girl should show that there were two black pebbles in the bag and expose the money-lender as a cheat.
3. The girl should pick a black pebble and sacrifice herself in order to save her father from his debt and imprisonment.

Take a moment to ponder over the story. The above story is used with the hope that it will make us 
appreciate the difference between lateral and logical thinking.

The girl's dilemma cannot be solved with traditional logical thinking. Think of the consequences if she chooses the above logical answers.

Well, here is what she did ....

The girl put her hand into the moneybag and drew out a pebble. Without looking at it, she fumbled and let it fall onto the pebble-strewn path where it immediately became lost among all the other pebbles.

"Oh, how clumsy of me," she said. "But never mind, if you look into the bag for the one that is left, you will be able to tell which pebble I picked."

Since the remaining pebble is black, it must be assumed that she had picked the white one. And since the money-lender dared not admit his dishonesty, the girl changed what seemed an impossible situation into an extremely advantageous one.





Courtesy: Shiva. Thanks Buddy :)

Jaw-Dropping Belly-Dance by Sadie

You have to see it to believe it. I watched this video(which a friend sent me) with a pre-conviction that all I was going to get is some Egyptian girl dancing some silly steps to Shakira's 'Hips Don't Lie'. But what I got is something completely different.
Shakira has got some other talents, but when it comes to Belly Dancing, I don't think that she is anywhere near to Sadie. Just watch the first video for an idea of what I am talking about. If you liked Shakira (or even Mumaith Khan from South India), then you sure will adore this pro belly dancer.
 
I know this post is a little off-topic for ECEROCKS, but still, couldn't resist :D
Here is some background info on Sadie from her Bio:
Sadie

Sadie is an International performing artist, instructor and choreographer who is recognized worldwide as one of today's most exciting Belly Dance artists. First seen as a “Rising Star” on BD-TV Vol.II in 2004, Sadie now has dozens of instructional and performance DVDs available, has visited over 25 countires teaching and performing the art of Belly Dance and is one of the most watched bellydancers on youtube with over 10 million hits on just one video clip alone.

Sadie trained in gymnastics and swimming for 14 years as a child and adolescent. She began practicing Belly Dance in her late teens. As a student, Sadie studied with many reputable Middle Eastern dance and music teachers from around the world. Some of the most influential moments in her education include two extended trips to Turkey where she studied and observed the dance and learning to play the doombek (Middle Eastern hand drum) via master percussionist and musician Souhail Kaspar, which impressed a great understanding of the varied Middle Eastern rhythms as well as the relationship between the music and dance.

 

Have Fun :)

Apple’s Future Products - LOL

What with the recent problems (the iPhone 4 Antenna) that Apple’s facing, watching this parody had me rolling on the floor laughing. Have a look at the last two, especially the last one is damn funny.

Steve Jobs with Future Products

 

Courtesy: Shiva :)

The Hindu Newspaper Collection: Archive from Jan 1st,2000-today

I recently found myself very (I mean really very) much interested in reading the Editorial Section of the Hindu Newspaper (Opinion Section). So I tried searching for those pages in the Hindu page, but they only have ported some pages from the old site to the new site (although the new dates are also launched in the old site). I went to their archive page and found a form for searching through their archives.

I found that it was not sufficient for my needs, so I started modifying it and came up with my own version of the Archive Searching mechanism. And I ended up with the code you see below :). Instead of opening the Hindu page of the corresponding page in a new window, I put it up in a popup so that it is easy to maintain and light too.

I designed a blogger Gadget to boot, and added it to ECEROCKS.com. You can now see it the right column (the last one) in the site. Go on, give it a go.

I developed one extra feature of opening a particular date’s Opinion’s page directly along with the pre-existing feature of opening that dates newspaper (I know its lame and useless, but I use it like hell)

The Hindu archives is available from 1st January, 2000 till today on the Hindu’s legacy site at http://www.hindu.com and from 1st June, 2010 onwards in the new website. Please use the archiver given on the right to explore the Hindu’s archives.

LEGACY ARCHIVE (1ST JANUARY 2000 - Today)

The Hindu Archive - Felix

This is how it looks

This is the Javascript to be included along with the HTML Code give below this.
The script below is very easy to understand as you can see. It just checks the values that are selected once a submit button is clicked, then validates over a few basic conditions, and generates a URL, that follows the hindu legacy site’s format.

JAVASCRIPT:

<script javascript="JavaScript">  
<!--
function getHinduOpinionsforDate(){
if( document.archives.YEAR1.options[document.archives.YEAR1.selectedIndex].value == "2000" && document.archives.MONTH1.options[document.archives.MONTH1.selectedIndex].value <= 00)
{
alert("Year 2000 archives are available from January only");
}
else
{

window.open('http://www.hindu.com/'+document.archives.YEAR1.options[document.archives.YEAR1.selectedIndex].value+'/'+document.archives.MONTH1.options[document.archives.MONTH1.selectedIndex].value+'/'+document.archives.DAY1.options[document.archives.DAY1.selectedIndex].value+'/05hdline.htm','theHinduOpinion.blogspot.com','toolbar=0,location=0, directories=0, status=0, menubar=0,scrollbars=1,resizable=1,width=800,height=600,left=0,top=0,url=0') ;
window.status="Going to archives...";
}
}

function getHinduIssueforDate(){
if( document.archives.YEAR2.options[document.archives.YEAR2.selectedIndex].value == "2000" && document.archives.MONTH2.options[document.archives.MONTH2.selectedIndex].value <= 00)
{
alert("Year 2000 archives are available from January only");
}
else
{

window.open('http://www.hindu.com/thehindu/'+document.archives.YEAR2.options[document.archives.YEAR2.selectedIndex].value+'/'+document.archives.MONTH2.options[document.archives.MONTH2.selectedIndex].value+'/'+document.archives.DAY2.options[document.archives.DAY2.selectedIndex].value+'/','theHinduOpinion.blogspot.com','toolbar=0,location=0, directories=0, status=0, menubar=0,scrollbars=1,resizable=1,width=800,height=600,left=0,top=0,url=0') ;
window.status="Going to archives...";
}
}
//-->
</script>





HTML (Generates the required Drop-Downs, Buttons and OnClick functions for Javascript):




<form name="archives" method="POST">
<center>
Select Date to get Opinions Page
<table>
<tr>
<td><select name="MONTH1">
<option value="01" />Jan
<option value="02" />Feb
<option value="03" />Mar
<option value="04" />Apr
<option value="05" />May
<option value="06" />Jun
<option value="07" />Jul
<option value="08" />Aug
<option value="09" />Sep
<option value="10" />Oct
<option value="11" />Nov
<option value="12" />Dec
</select></td>
<td><select name="DAY1">
<option value="01" />01
<option value="02" />02
<option value="03" />03
<option value="04" />04
<option value="05" />05
<option value="06" />06
<option value="07" />07
<option value="08" />08
<option value="09" />09
<option value="10" />10
<option value="11" />11
<option value="12" />12
<option value="13" />13
<option value="14" />14
<option value="15" />15
<option value="16" />16
<option value="17" />17
<option value="18" />18
<option value="19" />19
<option value="20" />20
<option value="21" />21
<option value="22" />22
<option value="23" />23
<option value="24" />24
<option value="25" />25
<option value="26" />26
<option value="27" />27
<option value="28" />28
<option value="29" />29
<option value="30" />30
<option value="31" />31
</select></td>
<td><select name="YEAR1">

<option value="2010" />2010
<option value="2009" />2009
<option value="2008" />2008
<option value="2007" />2007
<option value="2006" />2006
<option value="2005" />2005
<option value="2004" />2004
<option value="2003" />2003
<option value="2002" />2002
<option value="2001" />2001
<option value="2000" />2000 <!--
<option value = '1999'> 1999
<option value = '1998'> 1998
<option value = '1997'> 1997
<option value = '1996'> 1996
<option value = '1995'> 1995-->
</select></td>
</tr>
<tr>
<td colspan="3" align="center"><input name="submit" type="button"
value="Get Hindu Opinion" onclick="getHinduOpinionsforDate()" /></td>
</tr>
</table>
<br />
Select Date to get Issue Page
<table>
<tr>
<td><select name="MONTH2">
<option value="01" />Jan
<option value="02" />Feb
<option value="03" />Mar
<option value="04" />Apr
<option value="05" />May
<option value="06" />Jun
<option value="07" />Jul
<option value="08" />Aug
<option value="09" />Sep
<option value="10" />Oct
<option value="11" />Nov
<option value="12" />Dec
</select></td>
<td><select name="DAY2">
<option value="01" />01
<option value="02" />02
<option value="03" />03
<option value="04" />04
<option value="05" />05
<option value="06" />06
<option value="07" />07
<option value="08" />08
<option value="09" />09
<option value="10" />10
<option value="11" />11
<option value="12" />12
<option value="13" />13
<option value="14" />14
<option value="15" />15
<option value="16" />16
<option value="17" />17
<option value="18" />18
<option value="19" />19
<option value="20" />20
<option value="21" />21
<option value="22" />22
<option value="23" />23
<option value="24" />24
<option value="25" />25
<option value="26" />26
<option value="27" />27
<option value="28" />28
<option value="29" />29
<option value="30" />30
<option value="31" />31
</select></td>
<td><select name="YEAR2">

<option value="2010" />2010
<option value="2009" />2009
<option value="2008" />2008
<option value="2007" />2007
<option value="2006" />2006
<option value="2005" />2005
<option value="2004" />2004
<option value="2003" />2003
<option value="2002" />2002
<option value="2001" />2001
<option value="2000" />2000 <!--
<option value = '1999'> 1999
<option value = '1998'> 1998
<option value = '1997'> 1997
<option value = '1996'> 1996
<option value = '1995'> 1995-->
</select></td>
</tr>
<tr>
<td colspan="3" align="center"><input name="submit" type="button"
value="Get Hindu Issue" onclick="getHinduIssueforDate()" /></td>
</tr>
</table>
</center>
</form>





P.S.: Just check out the new blog I started - http://thehinduopinion.blogspot.com/, with the aim of creating an organized Opinion section of the Hindu Newspaper. Updated Daily.

GMailer: A Small yet Powerful Java App to send Email using GMail

Here I am after a long break. I was a ‘LITTLE’ busy with my work at Conseco. And thanks to the trainers there, I was able to explore the unending complexities of Java. Mind the word - ‘explore’ not ‘learn’. I’m as ignorant of Java as I was before my training. And folks, I am back with a bang. I’ve been trying to develop an Anonymous Mailing Application for the last few weeks, but ended up with something completely different. GMAIL. 
GMailerThanks to Mr. Aleem Basha for introducing me to the Java mailing api.

Without further delay – let me present to you: GMAILER :
Download Gmailer HERE or HERE or HERE or HERE or HERE or HERE. Its only 513 KB
Double click the downloaded jar file to run it. Below is the screenshot. It runs on all OS’s (having jre installed) be it windows, linux, solaris, mac etc. Tested it on Windows XP, Vista and Windows 7.

GMailer - Felix

Type in your Gmail ID and Password, Enter the mail id of your recipient, Attach a File and then click on ‘Send Mail’ to Send the mail to the specified Email Address.
There is no need to open a browser, login to Gmail, Click on Compose Mail to send a mail.
All you have to do is use this small (only 513 kb), yet powerful little tyke of an app to do your job. Your ID and Password are not stored anywhere – once you exit the application everything is cleared off.

I like sharing things. I like to give as much as I like to take from the Internet. So I am keeping the complete source code of this application here – OPEN SOURCE:

Source Code for Gmailer:

/*
//GMailer - Felix Source Code
//Project Name: GMailer
//Developed by: Ashok
//Developed for: AMO
//Home Page: http://www.ecerocks.com/
//Project Completed: 02 May, 2010
//IDE USED: None
//Executable JAR: Eclipse IDE
//External JAR's: mail.jar, activation.jar
//Status: Completed and Deployed Successfully
*/
package FelixMail;

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.regex.*;
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
import javax.activation.FileDataSource;
import javax.activation.DataHandler;

public class FelixMailAttachment extends JFrame implements ActionListener, WindowListener, FocusListener
{
private static final long serialVersionUID = 1L;
String d_email;
String d_password;
String filename=null;

JLabel label_to,label_subject,label_body,label_username,label_password,label_gmailcom,label_smtp,label_port,label_felix,label_info, label_head, label_attachment, label_attachmentName;
JTextField t_to,t_subject,t_username,t_smtp,t_port;
JPasswordField t_password;
JTextArea t_body;
JButton btn_send,btn_quit,btn_reset,btn_defaults, btn_attach;
JScrollPane scrollPane;

public FelixMailAttachment()
{
label_head=new JLabel("GMAILER - FELIX");
label_head.setForeground(Color.blue);
label_head.setFont(new Font("Serif", Font.BOLD, 15));
label_to=new JLabel(" TO : ");
label_subject=new JLabel(" SUBJECT : ");
label_attachment=new JLabel(" ATTACH FILES : ");
label_attachmentName=new JLabel("");
label_body=new JLabel(" E-Mail BODY : ");
label_username=new JLabel(" GMAIL USERNAME : ");
label_password=new JLabel(" PASSWORD : ");
label_gmailcom=new JLabel("@gmail.com");
label_smtp=new JLabel("SMTP Address : ");
label_port=new JLabel(" PORT NUMBER : ");
label_felix=new JLabel("© Ashok Felix (www.ecerocks.com): AMO");
label_info=new JLabel(" Enter Gmail Username,Password,To,Subject and Body - Click Send ");
btn_send=new JButton(" SEND MAIL");
btn_quit=new JButton(" QUIT ");
btn_reset=new JButton(" RESET ");
btn_defaults=new JButton(" DEFAULTS ");
btn_attach=new JButton("ATTACH FILE");

t_to=new JTextField(40);
t_to.setText("DestinationMail@dummmyMail.com");
t_subject=new JTextField(50);
t_subject.setText("Hi, there...");
t_username=new JTextField(20);
t_username.setText("www.ecerocks.com");
t_body=new JTextArea(5,20);
t_body.setText("Write the content of your mail here....");
t_password=new JPasswordField(20);
t_password.setEchoChar('$');
t_password.setText("011235813");
t_port=new JTextField(5);
t_port.setText("465");
t_smtp=new JTextField(20);
t_smtp.setText("smtp.gmail.com");
scrollPane = new JScrollPane(t_body);


setLayout(null);

label_head.setBounds(180,5,300,20);
label_username.setBounds(70,30,120,20);
label_password.setBounds(70,60,120,20);
t_username.setBounds(200,30,120,20);
label_gmailcom.setBounds(325,30,120,20);
t_password.setBounds(200,60,120,20);

label_to.setBounds(87,100,40,20);
t_to.setBounds(130,100,300,20);

label_subject.setBounds(50,130,100,20);
t_subject.setBounds(130,130,300,20);

label_attachment.setBounds(50,160,100,20);
label_attachmentName.setBounds(150,160,300,20);
btn_attach.setBounds(330,160,110,20);

label_body.setBounds(38,185,100,50);
scrollPane.setBounds(130,205,340,300);

btn_send.setBounds(40,515,100,30);
btn_reset.setBounds(150,515,100,30);
btn_defaults.setBounds(260,515,100,30);
btn_quit.setBounds(370,515,100,30);

label_smtp.setBounds(40,560,100,20);
t_smtp.setBounds(137,560,150,20);
label_port.setBounds(300,560,100,20);
t_port.setBounds(400,560,50,20);

label_felix.setBounds(150,600,300,20);
label_info.setBounds(10,620,500,20);

add(label_username);
add(label_password);
add(t_username);
add(t_password);
add(label_gmailcom);
add(label_to);
add(t_to);
add(label_subject);
add(t_subject);
add(label_attachment);
add(label_attachmentName);
add(btn_attach);
add(label_body);
add(scrollPane);
add(btn_send);
add(btn_quit);
add(btn_reset);
add(btn_defaults);
add(label_smtp);
add(t_smtp);
add(label_port);
add(t_port);
add(label_felix);
add(label_info);
add(label_head);


btn_send.addActionListener(this);
btn_quit.addActionListener(this);
btn_reset.addActionListener(this);
btn_defaults.addActionListener(this);
btn_attach.addActionListener(this);
this.addWindowListener(this);
t_to.addFocusListener(this);
t_subject.addFocusListener(this);
t_username.addFocusListener(this);
t_smtp.addFocusListener(this);
t_port.addFocusListener(this);
t_password.addFocusListener(this);
t_body.addFocusListener(this);


setSize(500,670);
setVisible(true);
setResizable(false);
setTitle("Gmailer - Felix");
this.setDefaultCloseOperation ( JFrame.DO_NOTHING_ON_CLOSE );

}

public void actionPerformed(ActionEvent ae){
if(ae.getSource()==btn_send){
Cursor hourglasscursor = new Cursor(Cursor.WAIT_CURSOR);
setCursor(hourglasscursor);
label_info.setText("Sending Mail. Please wait for a FEW Moments");
//System.out.println("Send Button Clicked");
d_email=t_username.getText()+label_gmailcom.getText();
char[] pwd=t_password.getPassword();
d_password=new String(pwd);
String m_to=t_to.getText();
String m_subject=t_subject.getText();
String m_text=t_body.getText();
String d_host=t_smtp.getText();
String d_port=t_port.getText();
//Email Validation Start
Pattern ptrn = Pattern.compile(".+@.+\\.[a-z]+");
Matcher m = ptrn.matcher(m_to);
boolean validEmail = m.matches();
System.out.println(validEmail);
//Email Validation End

if(m_to.equals("") || m_to.equals("DestinationMail@dummmyMail.com")){
JOptionPane.showMessageDialog(this,"Enter Valid Recipient E-Mail Address");
t_to.requestFocus();
}
else if(!validEmail){
JOptionPane.showMessageDialog(this,"Invalid Email. Enter Correct E-Mail Format");
t_to.requestFocus();
}
else if(m_subject.equals("")){
JOptionPane.showMessageDialog(this,"Enter Subject for E-Mail");
t_subject.requestFocus();
}
else if(d_host.equals("")){
JOptionPane.showMessageDialog(this,"Enter Valid SMTP Address (smtp.gmail.com)");
t_smtp.requestFocus();
}
else if(d_port.equals("")){
JOptionPane.showMessageDialog(this,"Enter Valid Port Number (465)");
t_port.requestFocus();
}
else if(m_text.equals("")){
JOptionPane.showMessageDialog(this,"Enter Body Content For Email");
t_body.requestFocus();
}
else{
//System.out.println(d_email+" "+d_password+" "+m_to+" "+m_subject+" "+m_text+" "+d_host+" "+d_port);
//Mail Sending Code Start
Properties props = new Properties();
props.put("mail.smtp.user", d_email);
props.put("mail.smtp.host", d_host);
props.put("mail.smtp.port", d_port);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.auth", "true");
//props.put("mail.smtp.debug", "true");
props.put("mail.smtp.socketFactory.port", d_port);
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");

try
{
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getInstance(props, auth);
//session.setDebug(true);

MimeMessage msg = new MimeMessage(session);
//msg.setText(m_text);

// create and fill the first message part
MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setText(m_text);

// create the Multipart and add its parts to it
Multipart mp = new MimeMultipart();
mp.addBodyPart(mbp1);


//File Attach Conditional Code
if(filename!=null){
// create the second message part
MimeBodyPart mbp2 = new MimeBodyPart();

// attach the file to the message
FileDataSource fds = new FileDataSource(filename);
mbp2.setDataHandler(new DataHandler(fds));
mbp2.setFileName(fds.getName());

mp.addBodyPart(mbp2);
}
///

// add the Multipart to the message
msg.setContent(mp);

// set the Date: header
msg.setSentDate(new Date());


msg.setSubject(m_subject);
//msg.setFrom(new InternetAddress("abc@gmail.com"));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
Transport.send(msg);
System.out.println("success");
label_info.setText("E-Mail Sent Successfully");
Cursor normalcursor = new Cursor(Cursor.DEFAULT_CURSOR);
setCursor(normalcursor);
JOptionPane.showMessageDialog(this,"Message Sent Successfully to "+m_to);
}
catch (Exception mex)
{
JOptionPane.showMessageDialog(this,"Error Sending E-Mail: \n"+mex);
mex.printStackTrace();
}
//Mail Sending Code End
}//Validation Conditions
}//Send Button End
else if(ae.getSource()==btn_quit){
System.out.println("Quit Button Clicked");
label_info.setText("Wanna Quit? Confirm...");
int confirm=JOptionPane.showConfirmDialog(this,"Do you want to Quit?");
if(confirm==0){
System.exit( 0 );
}
if(confirm==1){
label_info.setText(" Wow, you decided to stick around then. Enjoy :) ");
}
}
else if(ae.getSource()==btn_reset){
label_info.setText("Reset");
//System.out.println("Reset Button Clicked");
t_to.setText("");
t_subject.setText("");
t_body.setText("");
t_smtp.setText("smtp.gmail.com");
t_port.setText("465");
label_info.setText("All Fields Reset");
JOptionPane.showMessageDialog(this,"All Fields Reset");
}
else if(ae.getSource()==btn_defaults){
//System.out.println("Default Button Clicked");
t_username.setText("www.ecerocks.com");
t_password.setText("011235813");
t_smtp.setText("smtp.gmail.com");
t_port.setText("465");
label_info.setText("Default Values Loaded");
JOptionPane.showMessageDialog(this,"Default Values Loaded");

}
else if(ae.getSource()==btn_attach){
//System.out.println("Default Button Clicked");
JFileChooser chooser=new JFileChooser();
int returnVal=chooser.showOpenDialog(this);
if(returnVal == JFileChooser.APPROVE_OPTION) {
label_attachmentName.setText(chooser.getSelectedFile().getName());
File selectedFile = chooser.getSelectedFile();
this.filename=selectedFile.getPath();
//System.out.println("You chose to open this file: " + chooser.getSelectedFile().getName());
JOptionPane.showMessageDialog(this,"File " +this.filename+" Attached Successfully");
}
}
}

private class SMTPAuthenticator extends javax.mail.Authenticator{
public javax.mail.PasswordAuthentication getPasswordAuthentication(){
return new javax.mail.PasswordAuthentication(d_email, d_password);
}
}

//WindowListener Interface Methods Start
public void windowActivated(WindowEvent e){ }
public void windowClosed(WindowEvent e){}
public void windowClosing(WindowEvent e){
//System.out.println("Window Closing");
int confirm=JOptionPane.showConfirmDialog(this,"Do you want to Quit?");
if(confirm==0){
System.exit( 0 );
}
if(confirm==1){
label_info.setText(" Wow, you decided to stick around then. Enjoy :) ");
}
}
public void windowDeactivated(WindowEvent e){
//label_info.setText(" Got Some Other Work? Or got to copy paste something else here?");
}
public void windowDeiconified(WindowEvent e){
label_info.setText(" Window is Deiconified. I'm not sure what that means.. :) ");
}
public void windowIconified(WindowEvent e){
label_info.setText(" Window Iconified. Don't worry, I don't know what that means :) ");
}
public void windowOpened(WindowEvent e){}
//WindowListener Interface Methods End


//FocusListener Interface Methods Start
public void focusGained(FocusEvent e){
if((Component)t_username==e.getComponent()){
label_info.setText(" Enter Your Gmail Username ");
}
else if((Component)t_password==e.getComponent()){
label_info.setText(" Enter Password - Don't worry, its not stored anywhere ");
}
else if((Component)t_to==e.getComponent()){
label_info.setText(" Enter the E-mail address of the person to whom you want to send this mail ");
}
else if((Component)t_subject==e.getComponent()){
label_info.setText(" Enter a brief Subject about the purpose of this E-Mail ");
}
else if((Component)t_body==e.getComponent()){
label_info.setText(" Enter Content for this E-Mail. And don't be a skinflint");
}
else if((Component)t_smtp==e.getComponent()){
label_info.setText(" Enter a Valid SMTP address - Most problems arise from a wrong SMTP ");
}
else if((Component)t_port==e.getComponent()){
label_info.setText(" Enter a Port Number for the respective SMTP (default: 25) ");
}
if((Component)t_body!=e.getComponent()){
JTextField textField = (JTextField)e.getComponent();
textField.selectAll();
}
else if((Component)t_body==e.getComponent()){
JTextArea textArea = (JTextArea)e.getComponent();
textArea.selectAll();
}
}
public void focusLost(FocusEvent e){}

//FocusListener Interface Methods End

public static void main(String a[]){
new FelixMailAttachment();
}
}






Took me some time to develop it, but I think it turned out just fine.



This application is useful for three kinds of people:
1. People who don’t know how to use Gmail
2. People who are too lazy to open the browser, login, compose, etc. from Gmail.
3. Students who are interested to learn Java (If anybody needs clarifications regarding the code, then please leave comments)



Here is the Google Project Page for GMailer



I would like to say much much more about this little app, but I know you’d be bored. So try it and let me know how you feel about it…

Google Romance – A New & Highly Effective Online Dating Service

Don’t believe me? Look for yourself.

Google Romance

http://www.google.com/romance/

Google Romance

Here’z what Google Says about its Google Romance:

Pin All Your Romantic Hopes on Google

When you think about it, love is just another search problem. And we’ve thought about it. A lot. Google Romance™ is our solution.
Google Romance is a place where you can post all types of romantic information and, using our Soulmate Search™, get back search results that could, in theory, include the love of your life. Then we'll send you both on a Contextual DateTM, which we'll pay for while delivering to you relevant ads that we and our advertising partners think will help produce the dating results you're looking for.

With Google Romance, you can:

  • Upload your profile – tell the world who you are, or, more to the point, who you’d like to think you are, or, even more to the point, who you want others to think you are.
  • Search for love in all (or at least a statistically significant majority of) the right places with Soulmate Search, our eerily effective psychographic matchmaking software.
  • Endure, via our Contextual Dating option, thematically appropriate multimedia advertising throughout the entirety of your free date.

Learn more: Take the Tour, Press Release, FAQ

‘I’m Sorry’ Greeting Card: Innovative & Techy


Found this while browsing the net a week ago. Imagine the geekiness of the guy (or girl – not likely though) who prepared it. Ctrl+Z – which means ‘Undo’ in any windows application.

One heck of a design, that’s what I’d call this.

I'm Sorry

IPL 2010: Schedule, Teams & Players

Pretty Straight Forward.
Here is the Schedule for the third season of the Much Awaited Indian Premier League.
 

Game

Date

Teams

Venue

1

Fri, 12th March 2010

Deccan Chargers vs Kolkata Knight Riders

Navi Mumbai

2

Sat, 13th March 2010

Mumbai Indians vs Rajasthan Royals

Mumbai

3

 

Kings XI Punjab vs Delhi Daredevils

Mohali

4

Sun, 14th March 2010

Kolkata Knight Riders vs Royal Challengers

Kolkata

5

 

Chennai Super Kings vs Deccan Chargers

Chennai

6

Mon, 15th March 2010

Rajasthan Royals vs Delhi Daredevils

Ahmedabad

7

Tues, 16th March 2010

Royal Challengers Bangalore vs Kings XI Punjab

Bengaluru

8

 

Kolkata Knight Riders vs Chennai Super Kings

Kolkata

9

Wed, 17th March 2010

Delhi Daredevils vs Mumbai Indians

Delhi

10

Thurs, 18th March 2010

Royal Challengers Bangalore vs Rajasthan Royals

Bengaluru

11

Fri, 19th March 2010

Delhi Daredevils vs Chennai Super Kings

Delhi

12

 

Deccan Chargers vs Kings XI Punjab

Vizag

13

Sat, 20th March 2010

Rajasthan Royals vs Kolkata Knight Riders

Ahmedabad

14

 

Mumbai Indians vs Royal Challengers Bangalore

Mumbai

15

Sun, 21st March 2010

Deccan Chargers vs Delhi Daredevils

Vizag

16

 

Chennai Super Kings vs Kings XI Punjab

Chennai

17

Mon, 22nd March 2010

Mumbai Indians vs Kolkata Knight Riders

Mumbai

18

Tues, 23rd March 2010

Royal Challengers vs Chennai Super Kings

Bengaluru

19

Wed, 24th March 2010

Kings XI Punjab vs Rajasthan Royals

Mohali

20

Thurs, 25th March 2010

Mumbai Indians vs Chennai Super Kings

Mumbai

21

Fri, 26th March 2010

Rajasthan Royals vs Deccan Chargers

Ahmedabad

22

Sat, 27th March 2010

Kings XI Punjab vs Kolkata Knight Riders

Mohali

23

 

Royal Challengers vs Delhi Daredevils

Bengaluru

24

Sun, 28th March 2010

Rajasthan Royals vs Chennai Super Kings

Ahmedabad

25

 

Deccan Chargers vs Mumbai Indians

Hyderabad

26

Mon, 29th March 2010

Delhi Daredevils vs Kolkata Knight Riders

Delhi

27

Tues, 30th March 2010

Mumbai Indians vs Kings XI Punjab

Mumbai

28

Wed, 31st March 2010

Chennai Super Kings vs Royal Challengers

Chennai

29

 

Delhi Daredevils vs Rajasthan Royals

Delhi

30

Thurs, 1st April 2010

Kolkata Knight Riders vs Deccan Chargers

Kolkata

31

Fri, 2nd April 2010

Kings XI Punjab vs Royal Challengers Bangalore

Mohali

32

Sat, 3rd April 2010

Chennai Super Kings vs Rajasthan Royals

Chennai

33

 

Mumbai Indians vs Deccan Chargers

Mumbai

34

Sun, 4th April 2010

Kolkata Knight Riders vs Kings XI Punjab

Kolkata

35

 

Delhi Daredevils vs Royal Challengers

Delhi

36

Mon, 5th April 2010

Deccan Chargers vs Rajasthan Royals

Hyderabad

37

Tues, 6th April 2010

Chennai Super Kings vs Mumbai Indians

Chennai

38

Wed, 7th April 2010

Rajasthan Royals vs Kings XI Punjab

Jaipur * / Ahmedabad

39

 

Kolkata Knight Riders vs Delhi Daredevils

Kolkata

40

Thurs, 8th April 2010

Royal Challengers vs Deccan Chargers

Bengaluru

41

Fri, 9th April 2010

Kings XI Punjab vs Mumbai Indians

Mohali

42

Sat, 10th April 2010

Deccan Chargers vs Chennai Super Kings

Hyderabad

43

 

Royal Challengers vs Kolkata Knight Riders

Bengaluru

44

Sun, 11th April 2010

Delhi Daredevils vs Kings XI Punjab

Delhi

45

 

Rajasthan Royals vs Mumbai Indians

Jaipur * / Ahmedabad

46

Mon, 12th April 2010

Deccan Chargers vs Royal Challengers Bangalore

Hyderabad

47

Tues, 13th April 2010

Mumbai Indians vs Delhi Daredevils

Mumbai

48

 

Chennai Super Kings vs Kolkata Knight Riders

Chennai

49

Wed, 14th April 2010

Rajasthan Royals vs Royal Challengers

Jaipur * / Ahmedabad

50

Thurs, 15th April 2010

Chennai Super Kings vs Delhi Daredevils

Chennai

51

Fri, 16th April 2010

Kings XI Punjab vs Deccan Chargers

Dharamsala

52

Sat, 17th April 2010

Royal Challengers Bangalore vs Mumbai Indians

Bengaluru

53

 

Kolkata Knight Riders vs Rajasthan Royals

Kolkata

54

Sun, 18th April 2010

Kings XI Punjab vs Chennai Super Kings

Dharamsala

55

 

Delhi Daredevils vs Deccan Chargers

Delhi

56

Mon, 19th April 2010

Kolkata Knight Riders vs Mumbai Indians

Kolkata

57

Wed, 21st April 2010

Semi Final 1

Bengaluru

58

Thurs, 22nd April 2010

Semi Final 2

Bengaluru

59

Sat, 24th April 2010

3rd Place

Navi Mumbai

60

Sun, 25th April 2010

FINAL

Navi Mumbai

 

IPL Teams and Players

(The final teams will be chosen from the players in the squads)

Bangalore Royal Challengers Squad

clip_image001

Rahul Dravid*, Ashok Menaria, Sunil Joshi, K P Appanna, J Arun Kumar, Devraj Patil, B Akhil, Bharat Chipli, Tinu Yohanan, Saurav Bendekar, Gaurav Dhiman, Jitendra Patil, Udit Patel, Eoin Morgan, Rohit Sabharwal, Ishank Jaggi, Rajesh Bishnoi, Raju Bhatkal, Gautam.C.M, Kedar Jadhav, Mithun.A, KaranSharma, Aravind S, Bhuvanesh Kumar, Roelof van der Merwe, Jesse Ryder, Kevin Pietersen, Ross Taylor, Cameron White, Dillon Du Preez, Dale Steyn, Mark Boucher, Anil Kumble, Robin Uthappa, Vinay Kumar, Pankaj Singh, Suteesh R, Srivats Goswami, Manish Pandey, Wasim Jaffer, Virat Kohli, Praveen Kumar, Jacques Kallis

Chennai Super Kings Squad

clip_image002

MS Dhoni*, M Muralidaran, Sudeep Tyagi, Viraj Kadbe, Shadab Jakati, R Ashwin, Abhinav Mukund, Anirudha Srikanth, Vidyut Sivaramakrishnan, Palani Amarnath, K B Arun Karthik, N Einstein, Suresh Kumar, Justin Kemp, Manpreet Gony, Joginder Sharma, M Vijay, Matthew Hayden, Michael Hussey, Albie Morkel, Makhaya Ntini, Jacob Oram, Thilan Thushara, George Bailey, Parthiv Patel, Suresh Raina, S Badrinath, L Balaji, Thisara Perera

Deccan Chargers Squad

clip_image003

VVS Laxman*, Adam Gilchirst, T Suman, Arjun Yadav, Kalyankrishna, Paidikalva Vijay Kumar, Abhinav, Kumar, Manvinder Bisla, Jaskaran Deep Singh, Harmeet Singh, Azhar Bilakhia, Kemar Roach , Dwaraka Ravi Teja, Venugopal Rao, Pragyan Ojha, Herschelle Gibbs, Scott Styris, Andrew Symonds, Ryan Harris, Fidel Edwards, Dwyane Smith, Chaminda Vaas, Rohit Sharma, RP Singh, Harmeet Singh

Delhi Daredevils Squad

clip_image004

Virender Sehwag*, AB de Villiers, Aavishkar Salvi, Ashish Nehra, Yo Mahesh, Pradeep Sangwan, Umesh Yadav, Yogesh Nagar, Tejaswi Yadav, Amit Mishra, Moises Henriques, Wayne Parnell, Mithun Manhas, Rajat Bhatia, Daniel Vettori, Paul Collingwood, David Warner, Andrew McDonald, Dirk Nannes, Farveez Maharoof, Tillakaratne Dilshan, Gautam Gambhir, Dinesh Karthik, Manan Sharma

Kings XI Punjab Squad

clip_image005

Yuvraj Singh*, Brett Lee, Piyush Chawla, Karan Goel, Uday Kaul, Wilkin Mota, Ajitesh Argal, Tanmay Srivastava, Sunny Sohal, Ryan Ninan, Yash Gandhi, Yusuf Abdulla, V R V Singh, Ramesh Powar, James Hopes, Shaun Marsh, Simon Katich, Kumar Sangakkara, M Jayawardene, Ravi Bopara, Jerome Taylor, Irfan Pathan, S Sreesanth, Mohd. Kaif

Kolkata Knight Riders Squad

clip_image006

Sourav Ganguly*, Harpreet Singh, Sanjay Bangar, Shoaib Sheikh, Shatrunjay Gaekwad, Gaurav Chabbra, Sunny Singh, Sachin Rana, Avik Chowdhury, Sanjib Sanyal, Amit Das, Bhavik Thakkar, Kshemal Waingankar, Shane Bond, Charl Langeveldt, Manoj Tiwary, Vinit Indulkar, Ameya Shrikhande, Arindam Ghosh, Sourav Sarkar, Murtuza Hussain, Gnaneshwar Rao, Sheldon Jackson, Mohnish Parmar, Ishwar Choudhary, Laxmi Ratan Shukla, Debabrata Das, Ajantha Mendis, Mashrafe Mortaza, Angelo Mathews, David Hussey, Brad Hodge, Brendon McCullum, Wriddhiman Saha, Ashoke Dinda, Aditya Dole, Rajesh Verma, Anureet Singh, Chris Gayle, Owais Shah, Iqbal Abdulla, Murali Kartik, Ishant Sharma, Ajit Agarkar, Cheteshwar Pujara

Mumbai Indians Squad

clip_image007

Sachin Tendulkar*, Lasith Malinga, Jude Singh, Jaydev Shah, Rahil Shaikh, Yogesh Takawale, Pinal Shah, Ajinkya Rahane, Chetanya Nanda, Rohan Raje, Saurabh Tiwary, Kieron Pollard, Dhawal Kulkarni, Abhishek Nayar, Shikhar Dhawan, Jean Paul Duminy, Graham Napier, Ryan McLaren, Dilhara Fernando, Sanath Jayasuriya, Dwayne Bravo, Luke Ronchi, Zaheer Khan, Harbhajan Singh, Harshal Patel

Rajastan Royals Squad

clip_image008

Shane Warne*, Shane Watson, Paras Dogra, Amit Singh, Raphi Vincent Gomez, Kamran Khan, Ashraf Makda, Paul Valthaty, Srideep Mangela, Mohd Arif, Gajendra Singh, Atul Sharma, Pratmesh Salunkhe, Pushkarraj Chavan, Johan Botha, Damien Martyn, Sidharth Chitnis, Naman Ojha, Shane Warne, Graeme Smith, Dimitri Mascarenhas, Morne Morkel, Shaun Tait, Munaf Patel, Yusuf Pathan, Sidharth Trivedi, Swapnil Asnodkar, Niraj Patel, Mahesh Rawat, Anup Revandkar, Ravindra Jadeja, Dinesh Salunkhe, Adam Voges