today , i was spent half hour to find a bug, it said , Parse error: syntax error, unexpected ‘]’, expecting T_STRING or T_VARIABLE or T_NUM_STRING in xx line, i check that lline all words , on by one , cannot find the problem where it is , even i remove them , still has some error , check all file line by line , i found it !
because i run a function of emacs to indent line, so EOQ not in the very begin of line ! stupid me !
Becareful the heredoc!
Hello OBJ-C
Hello obj-c, I just did my first obj-c app from Ubuntu with GNUStep ,see!
Things you need to know to compile the hello world app with GNUStep:
- sudo aptitude install gnustep gnustep-devel
- chmod +x /usr/share/GNUStep/MakeFiles/GNUStep.sh
- /usr/share/GNUStep/MakeFiles/GNUStep.sh
source code here, very simple !
#importint main (void) { NSLog (@"Hello obj-c !"); return 0; }
GNUMakeFile:
include $(GNUSTEP_MAKEFILES)/common.make APP_NAME = HelloWorld HelloWorld_HEADERS = HelloWorld_OBJC_FILES = main.m HelloWorld_RESOURCE_FILES = include $(GNUSTEP_MAKEFILES)/application.make
that’s it !
Test Blog post from Textmate to Wordpress
Text mate rock! as you can see, it was posted from Textmate. the awesome editor for mac user
Isn’t UTF-8 twitter by default ??
I just added a plugin for twitter on my blog, however most of people in china can’t see them without a VPN, the problems when i enabled the UTF8 option show below
I need unchecked the Utf8 for Chinese to work well!
modified by caker from textmate for test
Simple is hard
这两天看了看Rasmus(PHP作者)的一个讲座,关于Scalability、Performance 、 Security ,比较了一些PHP Framework的性能,对于Python, RoR 等语言也有一些评论,还有一些Profiling 和 Benchmarking 工具,自己需要在这一方面加强了,以前都根本没有概念,简单的一个时区的设置在php.ini里都会有影响,include_path的设置等。
Tools for PHP debug and profiling
1. apd ( Zend extension)
sudo pear install pear/apd
2. xdebug
3. apc
sudo pear install apc
extension=apc.so (added it to php.ini)
4. xdebugtoolkit
A toolkit for analyzing and visualizing xdebug cachegrind files
http://code.google.com/p/xdebugtoolkit/
5.cg2dot – converter from Xdebug cachegrind files to the dot format.
http://code.google.com/p/xdebugtoolkit/wiki/cg2dot
http://www.xdebug.org/docs/profiler
http://www.graphviz.org/
6. cgsplit – splitter for appended cachegrind files.
http://code.google.com/p/xdebugtoolkit/wiki/cgsplit
相关连接:

