Friday, June 14, 2013

SpudSoft Excel Emitter - Single Sheet with No Repeating Header and Page Break Interval Zero/ 0 (Java)

I came across using BIRT (Business Intelligence and Reporting Tools), which is an open source Eclipse-based reporting system that integrates with your Java/Java EE application to produce compelling reports.

It has emitters that are used to export the reports to differnet formats such as HTML, PDF, and Office and OpenOffice formats including Excel (xls : 2003 and xlsx: 2007).

When using BIRT's Excel Emitter, it is good to export to a single sheet but it cannot export charts and diagrams. So, I had to use a different emitter.

There are various extended emitters of BIRT. Among which SpudSoft is the one which is recommend by senior programmers.

Tuesday, June 4, 2013

Android Code Zone: Setting a button to disabled and changing the color

Setting a button to disabled and changing the color

In drawable folder, create an xml file called button_disabled.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android=""
android:shape="rectangle" android:padding="10dp">   
 <solid android:color="@color/silver"/>

Andorid Code Zone: findViewById returns null

If  findViewById returns null,

you are probably callingfindViewById before calling setContentView.
If that's the case, try callingfindViewById AFTER calling setContentView like:


try {

runOnUiThread(new Runnable() {

public void run() {

((Button) findViewById(;
} catch (Exception e) {

Toast.makeText(Home.this, e.getMessage(), Toast.LENGTH_SHORT).show();

Monday, June 3, 2013

Best and Safe Way to Rename MySQL Database Name

The best and safe way to rename MySQL database is presented as follows.
You can create a new database exactly as the previous database existed and then drop the old database when you're done. 
Use the mysqldump tool to create a .sql backup of the database via
     mysqldump orig_db > orig_db.sql
or if you need to use a username and password then run
     mysqldump -u root -p orig_db > orig_db.sql
orig_db is the name of the database you want to "rename", root would be the user you're logging in as and orig_db.sql would be the file created containing the backup. Now create a new, empty database with the name you want for the database.