Firefox on Fedora - No sound on Flash Videos

I recently shifted to Fedora from Windows XP. In Fedora it did not give sounds when I was watching flash videos such as from YouTube in Firefox. It was a big problem for me. But after some research I found out that it is due to not installing a dependency library 'libflashsupport' with Adobe Flash plugin. Fixing this problem is very simple, just insall that library using yum.

yum install libflashsupport

After intalling it I got the sounds. :)
 

Reading Excel Date fields from Java

Previously I posted on how to read data from Microsoft Excel file using Apache POI HSSF. This is a small addition to that.

If the Excel file you are to read is using 'Date' fields, then you have to be little careful about it. In HSSF these Date fields are taken as numeric fields. Anyway that is how Dates are handled in Excel; it uses an Integer to keep number of days since 1900-Jan-0. Luckily the there is a small utility provided by HSSF to covert these Execl Dates to Java Date format. Just use HSSFDateUtil.getJavaDate(double) method.


//Date of Birth
HSSFRow row = sheet.getRow(ROW_C_DOB);
//Handle Excel Date type cells
HSSFCell cell = row.getCell(COLUMN_DATA);
if(cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC)
{
  Date d = HSSFDateUtil.getJavaDate(cell.getNumericCellValue());
  client.setBirthDay(d);
}
else
{
  String tmp =    row.getCell(COLUMN_DATA).getRichStringCellValue().toString();
  client.setBirthDay(Util.getDate(tmp)); 
}