Posts

Showing posts from September, 2014

compress and decompress folder

private   void  CompressFile( string  sDir,  string  sRelativePath,  GZipStream  zipStream)         {              //Compress file name              char [] chars  =  sRelativePath . ToCharArray();             zipStream . Write( BitConverter . GetBytes(chars . Length),  0 ,  sizeof ( int ));              foreach  ( char  c  in  chars)                 zipStream . Write( BitConverter . GetBytes(c),  0 ,  sizeof ( char ));              //Compress file content  ...

execute mySQL script by cmd

We can run the sql script by MySQL console in WAMP server. Please run it and use command:  1. use database 2. \. E:\acc_20131021.sql