2014/04/15

What is sp_lock & sp_who (SQL)

sp_lock (Reports information about processes that currently hold locks.)
sp_who (Run sp_who to get the spid of the locking process.)

2014/04/12

How to set thousands separator in Java?

The following will work:

int no = 124750;
String str = String.format("%,d", no);
ENJOY!

How to convert from int to String? (Java)

Integer.toString(i) or String.valueOf(i) will work.

Enjoy!

How to convert string to int in Java?

int foo = Integer.parseInt("1234");

How do you pause in android (Java)?

First you have to create a Handler();, then you have to use the postDelayed function to pause the code.

public class MyActivity extends Activity {
    private Handler mHandler = new Handler();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mHandler.postDelayed(new Runnable() {
            public void run() {
                doStuff();
            }
        }, 5000);
    }

    private void doStuff() {
        System.out.println("Hellow World After 5 seconds!");
    }
}

2010/06/10

Enabling xp_cmdshell in SQL Server

EXEC master.dbo.sp_configure 'show advanced options', 1

RECONFIGURE

EXEC master.dbo.sp_configure 'xp_cmdshell', 1

RECONFIGURE

2010/05/04

SSIS Deployment to SQL Server

SSIS Deployment to SQL Server


1) Go to SSIS project folder\bin\, double click the DeploymentManifest file
2) Choose “SQL Server deployment”.
3) Fill in the information then you are done.