- Turn on exception break point
- Avoid using id type as much as possible
- Can not use @synthesize in category implementation
- Remember to set delegate in viewDidLoad
2012年8月31日星期五
iOS Development Learning Notes
2009年1月6日星期二
64位Linux下QQ无法输入中文
http://www.linuxdiyf.com/viewarticle.php?id=103219
以下三步都需要用管理员权限,或者用 sudo 来执行
第一步:
把 32位版(附件):
/usr/lib/gtk-2.0/2.10.0/immodules/ 的
-rw-r--r-- 1 root root 67648 2008-07-31 15:31 im-scim-bridge.so
-rw-r--r-- 1 root root 143588 2008-07-31 15:31 im-scim.so
复制到64位系统下的lib32:
/usr/lib32/gtk-2.0/2.10.0/immodules/
第二步:
cd /etc/gtk-2.0
mv gtk.immodules.32 gtk.immodules.32.bak
/usr/bin/gtk-query-immodules-2.0 > gtk.immodules.32
第三步:
把 gtk.immodules.32 文件里的 /usr/lib/ 替换成 /usr/lib32/
附:64位下安装办法
sudo dpkg -i --force-all linuxqq_1.0-Preview1_i386.deb
另外,我第一次使用的时候,登陆很正常。后来退出后,又登录,换了几个号,都失败。
最后,把~/.Tencent 目录干掉,就OK了。
以下三步都需要用管理员权限,或者用 sudo 来执行
第一步:
把 32位版(附件):
/usr/lib/gtk-2.0/2.10.0/immodules/ 的
-rw-r--r-- 1 root root 67648 2008-07-31 15:31 im-scim-bridge.so
-rw-r--r-- 1 root root 143588 2008-07-31 15:31 im-scim.so
复制到64位系统下的lib32:
/usr/lib32/gtk-2.0/2.10.0/immodules/
第二步:
cd /etc/gtk-2.0
mv gtk.immodules.32 gtk.immodules.32.bak
/usr/bin/gtk-query-immodules-2.0 > gtk.immodules.32
第三步:
把 gtk.immodules.32 文件里的 /usr/lib/ 替换成 /usr/lib32/
附:64位下安装办法
sudo dpkg -i --force-all linuxqq_1.0-Preview1_i386.deb
另外,我第一次使用的时候,登陆很正常。后来退出后,又登录,换了几个号,都失败。
最后,把~/.Tencent 目录干掉,就OK了。
2008年12月6日星期六
2008年9月26日星期五
2008年9月7日星期日
The ultimate solution to MySQL chinese charset problem using ant sql task
This is the check list of items that need to be set to unicode:
1. The character encoding of SQL file for ant to call
2. The url attribute of ant task needs to be like this:
3. The encoding attribute of ant task needs to be set to utf-8
4. Database and tables need to use utf-8 by adding
5. (Optional)Start mysqld with
Character encoding of mysql can be set in several levels, they are: server>database>table>column. If encoding at lower level is not specified, the one of higher one level is used.
The above 4 steps guarantee that the data would be correctly stored in database. If you want to view data correctly from mysql client, the additional steps are needed:
6. In mysql prompt:
1. The character encoding of SQL file for ant to call
2. The url attribute of ant task needs to be like this:
jdbc:mysql://localhost:3306/cocomoII?useUnicode=true&characterEncoding=UTF-83. The encoding attribute of ant task needs to be set to utf-8
4. Database and tables need to use utf-8 by adding
CHARACTER SET utf8 COLLATE utf8_general_ci to the end of create database/table statement. The default is latin1!5. (Optional)Start mysqld with
--character-set-server=utf8 --collation-server=utf8_general_ciCharacter encoding of mysql can be set in several levels, they are: server>database>table>column. If encoding at lower level is not specified, the one of higher one level is used.
The above 4 steps guarantee that the data would be correctly stored in database. If you want to view data correctly from mysql client, the additional steps are needed:
6. In mysql prompt:
mysql> charset utf8;
2008年8月26日星期二
ADSL on Ubuntu
Input
to configure user name and password.
Type
Type
sudo pppoeconfto configure user name and password.
Type
pon dsl-provider to turn on the connectionType
poff to turn it off
2008年8月8日星期五
Install Grub from Ubuntu Live CD
This will restore grub if you already had grub installed but lost it to a windows install or some other occurence that erased/changed your MBR so that grub no longer appears at start up or it returns an error.
(This how to is written for Ubuntu but should work on other systems. The only thing to take note of, when you see "sudo" that will mean to you that the following command should be entered at a root terminal.)
Boot into the live Ubuntu cd. This can be the live installer cd or the older live session Ubuntu cds.
When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)
Code:
sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands
Code:
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)
Code:
root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)
Next enter the command to install grub to the mbr
Code:
setup (hd0)
Finally exit the grub shell
Code:
quit
That is it. Grub will be installed to the mbr.
When you reboot, you will have the grub menu at startup.
Now the explanation.
Sudo grub gets you the grub shell.
Find /boot/grub/stage1 has grub locate the file stage1. What this does is tell us where grub's files are. Only a small part of grub is located on the mbr, the rest of grub is in your boot folder. Grub needs those files to run the setup. So you find the files and then you tell grub where to locate the files it will need for setup.
So root (hd?,?) tells grub it's files are on that partition.
Finally setup (hd0) tells grub to setup on hd0. When you give grub the parameter hd0 with no following value for a partition, grub will use the mbr. hd0 is the grub label for the first drive's mbr.
Quit will exit you from the grub shell.
Original Post: http://ubuntuforums.org/showthread.php?t=224351
(This how to is written for Ubuntu but should work on other systems. The only thing to take note of, when you see "sudo" that will mean to you that the following command should be entered at a root terminal.)
Boot into the live Ubuntu cd. This can be the live installer cd or the older live session Ubuntu cds.
When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)
Code:
sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands
Code:
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)
Code:
root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)
Next enter the command to install grub to the mbr
Code:
setup (hd0)
Finally exit the grub shell
Code:
quit
That is it. Grub will be installed to the mbr.
When you reboot, you will have the grub menu at startup.
Now the explanation.
Sudo grub gets you the grub shell.
Find /boot/grub/stage1 has grub locate the file stage1. What this does is tell us where grub's files are. Only a small part of grub is located on the mbr, the rest of grub is in your boot folder. Grub needs those files to run the setup. So you find the files and then you tell grub where to locate the files it will need for setup.
So root (hd?,?) tells grub it's files are on that partition.
Finally setup (hd0) tells grub to setup on hd0. When you give grub the parameter hd0 with no following value for a partition, grub will use the mbr. hd0 is the grub label for the first drive's mbr.
Quit will exit you from the grub shell.
Original Post: http://ubuntuforums.org/showthread.php?t=224351
2008年7月16日星期三
2008年7月3日星期四
To work around JVM 64 bug causing Eclipse crash
Add
-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith
to eclipse.ini
The above option did not work.
Try delete it and add
-Xint
So far so good.
Other cue:
Try to use JDK 5 to run eclipse and use JDK 6 to develop
Disable automatic compiling
-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith
to eclipse.ini
The above option did not work.
Try delete it and add
-Xint
So far so good.
Other cue:
Try to use JDK 5 to run eclipse and use JDK 6 to develop
Disable automatic compiling
2008年6月28日星期六
SCIM bridge
安装scim-bridge后,需要配置
设置
/etc/X11/xinit/xinput.d/scim
设置
GTK_IM_MODULE=scim-bridge
QT_IM_MODULE=scim-bridge
2008年6月16日星期一
安装fcitx
5、添加中文支持。
sudo apt-get install language-pack-zh
6、fcitx安装:
sudo apt-get install im-switch fcitx
im-switch -s fcitx -z default # 注意,前面千万不要加sudo
完成设置最好重启一下X,以便进行下一步设置
7、修改部分:
sudo gedit /etc/gtk-2.0/gtk.immodules
找到下面这个部份
"/usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so"
"xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh"
改为下面这样
"/usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so"
"xim" "X Input Method" "gtk20" "/usr/share/locale" "en:ko:ja:th:zh"
注意:就是这里加上了en环境下的输入法支持。"ko:ja:th:zh" -> "en:ko:ja:th:zh" 设置完毕,注销一下电脑。(系统 -> 注销 -> 注销)这时候,输入法(按Ctrl+空格键激活输入法)就应该可以使用了。
8、修改字体:
gedit ~/.fcitx/config #ubuntu
(提示:该文件使用GBK编码,很多人打开它可能显示乱码,在kate下点菜单 工具 -> 编码 -> 简体中文GBK即可正常显示。)设置选项为中文,英文界面下输入栏与输入文字为方块的现像,只需修改config中的字体即可,例如:
[程序]
显示字体(中)=WenQuanYi Bitmap Song
显示字体(英)=WenQuanYi Bitmap Song
显示字体大小=12
主窗口字体大小=12
字体区域=zh_CN.UTF-8
是否使用AA字体=1
是否使用粗体=1
9、去除fcitx多余码表
sudo gedit /usr/share/fcitx/data/tables.conf
里面的内容大致是这样的
#以#打头的为注释
[码表]
名称=五笔字型
码表=wbx.mb
拼音=1
拼音键=z
.........
.........
#[码表]
#名称=二笔
#码表=eb.mb
.........
.........
#[码表]
#名称=仓颉
#码表=cj.mb
.........
.........
2008年6月2日星期一
Steps to get around Evolution "summary and folder mismatch" bug
- Disable all accounts in Evolution and exit
- cd ~/.evolution/mail/local
- rm Inbox.ibex.index Inbox.ibex.index.data
- Restart Evolution
- Press Sent/Receive several times
- Enable accounts
https://launchpad.net/ubuntu/+source/evolution/+bug/27014
2008年5月16日星期五
2008年3月24日星期一
Translation Practice
1. Previous experience shows that our shops are most profitable in the areas where residents there pay high attention to their healthy lives. As a result, our next shop should be opened at Plansvile, where there are many such residents. Shops from Plainsville report that the sales of sports shoes and sweaters are at a historical peak. A local club which was at the edge of bankrupt 5 years ago now has more members than any other time, with ... always full. We can also expect customers from the new generation: students from schools at Plainsville are required to take part in a program called "fitness of life", which emphasize on the benefit of doing exercise from ones' early ages.
2. 7 years ago, house owners of Brookville nearby implemented a series of regulations about how to arrange the courts of the community and which color should be applied to the buildings. From then on, the average price of real estate at Brookville increased three times. In order to increase the real estate at Deerhaven Acres, we should also have our own regulation on the scenery and colorring of buildings.
2. 7 years ago, house owners of Brookville nearby implemented a series of regulations about how to arrange the courts of the community and which color should be applied to the buildings. From then on, the average price of real estate at Brookville increased three times. In order to increase the real estate at Deerhaven Acres, we should also have our own regulation on the scenery and colorring of buildings.
2007年12月27日星期四
Fonts TTF Opensymbol - Failed to write cache
Touch each directory reporting failed to write cache.
1. Save those directory to a file, say cache_fail_folder_list.txt
2.
1. Save those directory to a file, say cache_fail_folder_list.txt
2.
sudo -i
cat cache_fail_folder_list.txt | xargs touch
Install Ubuntu 7.10 from hard disk
1. Copy initrd.gz, vmlinuz, grldr, menu.lst to C:\
2. add
c:\grldr="Install Ubuntu"
to c:\boot.ini
3. Put the iso file to the root directory of a fat32 partition
4. restart the system.
2. add
c:\grldr="Install Ubuntu"
to c:\boot.ini
3. Put the iso file to the root directory of a fat32 partition
4. restart the system.
2007年11月23日星期五
another try to install wireless driver
http://ubuntuguide.org/wiki/Ubuntu:Gutsy#How_to_install_Broadcom_wireless_driver
2007年10月30日星期二
Using Windows wireless driver under Linux
Clear the previous installation of bcmwl5
clive@omniscience:~$ sudo ndiswrapper -r bcmwl5
Specify the path of the driver in Windows and install it:
clive@omniscience:~$ sudo ndiswrapper -i /media/sda1/DELL/drivers/R151519/DRIVER/bcmwl5.inf
installing bcmwl5 ...
sudo ndiswrapper -l
sudo modprobe ndiswrapper
clive@omniscience:~$ sudo ndiswrapper -r bcmwl5
Specify the path of the driver in Windows and install it:
clive@omniscience:~$ sudo ndiswrapper -i /media/sda1/DELL/drivers/R151519/DRIVER/bcmwl5.inf
installing bcmwl5 ...
sudo ndiswrapper -l
sudo modprobe ndiswrapper
2007年10月20日星期六
Sound problem with D630 in Gutsy
1. Get the latest alsa drivers from Georgia Tech's website
2. extract it
3. change directory to the directory with the extracted files
4. configure with
5.
6.
7. reboot
Quote:
| wget http://www.gtlib.gatech.edu/pub/suse/projects/alsa/snapshot/driver/alsa-driver-hg20070804.tar.bz2 |
3. change directory to the directory with the extracted files
4. configure with
Quote:
| ./configure --with-cards-hda-intel |
Quote:
| make |
Quote:
| sudo make install |
2007年9月20日星期四
Information about Going Abroad 1
Looked at Northwestern University's web site, on Industrial Engineering and Management Sciences, there are attrative program: Master of Engineering Management. However, it requires work experience. Dropped out therefore.
Anyway, I knew there is such a program: Master of Engineering Management.
Anyway, I knew there is such a program: Master of Engineering Management.
订阅:
博文 (Atom)
