博文

目前显示的是 十月, 2014的博文

SQL Server restore from backup file.

1.Check backup file  restore filelistonly from disk=' C:\Microsoft SQL Server\Backup\xxx.bak ' Result: LogicalName            PhysicalName ---------------  ------------------------------------------------------------------ OldDatabase_Data             d:\Program Files\Microsoft SQL Server\MSSQL$SQLA\data\xxx.mdf OldDatabase_log     d:\Program Files\Microsoft SQL Server\MSSQL$SQLA\data\ xxx_log.ldf 2. Restore to new database RESTORE DATABASE xxxNewName   FROM DISK = ' C:\Microsoft SQL Server\Backup\xxx.bak ' WITH MOVE ' OldDatabase_Data '  TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\ xxxNewName .mdf' , MOVE ' OldDatabase_log ' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\ xxxNewName_log .ldf', replace;

Tips for Android

1.Window.FEATURE_NO_TITLE @Override public void onCreate(Bundle savedInstanceState) {     requestWindowFeature(Window.FEATURE_NO_TITLE);     super.onCreate(savedInstanceState);     setContentView(R.layout.main); } you must declar requestWindowFeature(Window.FEATURE_NO_TITLE); before super.onCreate(savedInstanceState); and this extends Activity. 2.Using Layout Resources Programmatically You inflate the layout file into a View object using the LayoutInflater class. LayoutInflater inflater = LayoutInflater .from(context); View exampleView = inflater. inflate (R.layout.example, container,false); Button myExampleButton = (Button) exampleView.findViewById(R.id.button); <include layout="@layout/basicHeader"/> 3.TextView,EditTest, Button, Spinner, AutoCompleteTextView, ProgressBars, SeekBars, AsyncTask, ImageViews. Button extended a TextView and ImageButton extended ImageView. ProgressBar(indeterminate, determinate); ShowP...

url encoding

Encode and Decode Encode Decode unEncode Unencode total encodeURIComponent :- >UTF-8 decodeURIComponent !, ‘,(,),*,-,.,_,~,0-9,a-z,A-Z 71 encodeURI :- > UTF-8 decodeURI !,#,$,&,’,(,),*,+,,,-,.,/,:,;,=,?,@,_,~,0-9,a-z,A-Z 82 escape :- > Unicode unescape  *,+,-,.,/,@,_,0-9,a-z,A-Z 69 javascript example :   encodeURIComponent in Javascript 1.5   alert(encodeURIComponent(" ö / ! * ( ) ' ")); Java example :        System.out.println("java.net.UrlEncoder(\"ö\",\"UTF8\"): =" +java.net.URLEncoder.encode("ö","UTF8"));       java.net.URLDecoder urlDecoder = new java.net.URLDecoder();        String s =  urlDecoder.decode("%D0%C5%CF%A2%CD%F8","gb2312");        System.out.println(s);        s =  urlDecoder.decode("D0%C5%CF%A2%CD%F8","utf8");        System.o...