2014年10月9日 星期四

How to remove .git files ?


find . | grep "\.git" | xargs rm -rf

2014年10月2日 星期四

Linux - warning: override XXX

Because your kconfig have "choice" !

This mean that only have "1" module can be enable.
But, you enabled 2 or more module on your config file belong this item.

After "make xxxx_config", it found 2 enable module on this item.

it will show ... warning: override.

You must to disable unnecessary module on this item.

2014年4月15日 星期二

How to install line on ubuntu ?

1. sudo add-apt-repository ppa:ubuntu-wine/ppa
2. sudo apt-get update
3. sudo apt-get install wine
4. winetricks vcrun2008
5. Download Line and install from http://cdn.line-apps.com/client/win/LineInst.exe

Reference : http://longbao738.blogspot.tw/2013/10/ubuntu-line.html

2014年2月22日 星期六

Python - How to install mysql-python on ubuntu?

$> sudo apt-get install python-dev

$> sudo apt-get install libmysqlclient-dev

$> pip install mysql-python

Reference :

1. http://lucaswei.blogspot.tw/2012/02/pythonh-no-such-file-or-directory.html
2. http://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found

Python - How to install MySQL-python on MAC ?

1. Open console on mac.

2. Input cmd ...

$> pip install MySQL-python

$> sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /Library/Python/2.7/site-packages/_mysql.so

$> sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /Directories/To/File/filereferencedinpython

3. Add setting ..

export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/

Reference :

1. http://moravec.net/2013/04/installing-mysql-python-on-mac-os-x/
2. http://coddswallop.wordpress.com/2012/08/23/solving-library-not-loaded-libmysqlclient-18-dylib-when-importing-mysqldb-on-lion/

Python - How to install pip on MAC ?

1. Open console on mac

2. input the cmd on console:


$> sudo easy_install

Reference : http://stackoverflow.com/questions/17271319/installing-pip-on-mac-os-x

MySQL - How to install MySQL on MAC ?

1. Download the install dmg file from MySQL web side :

http://dev.mysql.com/downloads/mysql/

PS. please download the "MySQL Community Server"  mac version.

2. After double click the dmg file, you must to install the 2 pkg and 1 prefPane.

3. Modify the default password of MySQL :

(1) Open mac console mode.

(2) cd /usr/local/mysql/bin

(3) ./mysqladmin -h localhost -u root password

4. Add path of bin into your environment parameter.

(1) sudo vim /etc/bashrc

(2) Add "export PATH=$PATH:/usr/local/mysql/bin"
Reference : 
1. http://f.pil.tw/thread-108370-1-1.html
2. http://dev.mysql.com/downloads/mysql/

2014年2月19日 星期三

MySQL - How to move the data base to other path ?

1. Modify the database path on "/etc/mysql/my.cnf ".

#datadir = /var/lib/mysql
datadir = /home/alleen/mysql

2. Copy the database folder to new path.

cp -Rp /var/lib/mysql /home/alleen/mysql

3. Modify the database path on "/etc/apparmor.d/usr.sbin.mysqld"

#  /var/lib/mysql/ r,
#  /var/lib/mysql/** rwk,
/home/alleen/mysql/ r,
/home/alleen/mysql/** rwk,

4. Restart the mysql.

/etc/init.d/mysql restart


C# - How to Add the Administrator permission in vs2008 project


1. Right click project -> Add .. -> Add new item -> Application Manifest File.

2. Open "app.manifest" and replace this ...



to 


3. Save ...

Reference : 

1. http://stackoverflow.com/questions/7666408/how-to-request-administrator-permissions-when-the-program-starts

2. http://social.msdn.microsoft.com/Forums/vstudio/en-US/f6cd003f-ba3b-44f3-817f-2d8b4e11a0eb/getting-the-admin-rights-in-c?forum=netfxbcl

2014年1月15日 星期三

VBA : Variable Type List

Data Type
Memory
Data Range
Byte
1 Byte
0~255
Integer
2 Bytes
-32768~32767
Long
4 Bytes
-2147483648~2147483647
Single
4 Bytes
-3.4E38~-1.4E-45
1.4E-45~3.4E38 
Double
8 Bytes 
-1.7E308~-4.9E-324
4.9E-324~1.7E308
String
10 Bytes + String length
2^31 string
String*length
String length
2^16 = 32768 string
Boolean
2 Bytes
True or False
Variant
Value : 16 Bytes
String : 22 Bytes+ String length
Value : Equal to Double
String : Equal to String
Currency
8 Bytes 
922,337,203,685,477.5807~
-922,337,203,685,477.5808
Date
8 Bytes
Date : January 1,100~
 December 31,9999
Time : 00:00:00~23:59:59

VBA : Loop on VBA

VBA : How to get/set the cells value ?

VBA : How to create the VBA editor on mac excel ?