Well… the Galaxy S5 was announced a few weeks ago. Most people think this phone is a bit disappointing and even Samsung knew it, because they didn’t announced this phone in a high profile announcement like the S4 and Note 3. Continue reading
Today I want to share this useful image I found, Why do we Procrastinate? Think a lot but still achieve nothing. Hope this helps you. (I forgot where I found this, so if you owns this please contact me) Continue reading
Changing the filename with case change only using the unix command “mv” will not be detected in Git.
$ mv classes/hello.php classes/Hello.php
$ git add .
$ git commit -a
# On branch master
nothing to commit, working directory clean
The general advice is using the git sub-command “git mv” to rename files, when I type this I saw the below error
$ git mv classes/hello.php classes/Hello.php
fatal: destination exists, source=classes/hello.php, destination=classes/Hello.php
It looks like the Mac file system is not case-sensitive, hence the error. The workaround is that, rename the file twice
$ git mv classes/hello.php classes/Hello
$ git mv classes/Hello classes/Hello.php
$ git commit -a
No complain from Git! Enjoy!
Recently got my Gunnar Optiks Intercept Advanced Gaming Glasses, this is an entry level Gunnar glasses for gammers. The reason of this purchase is that my eyes are constantly very dry and tired due to long hours using the computer (coding and gaming :p ). I’ve heard that these two yellow-tinted pieces of glass can help relieve the eye strain for gammers and professional computer users, so I gave it a shot Continue reading
It’s *nix and THE most advanced one
Programmers need to use a lot of command line tools on daily basis like ssh, curl, build tools etc. There’s nothing like a bash shell in *nix systems(Unix, Linux. OSX is Unix-based), basically you’re left to choose between OSX and thousands of distros of Linux. (You may use CYGWin in Windows but i think it’s terrible) In my opinion, most Linux distros are still not very user-friendly (Ubuntu is probably the best you can find), OSX provides a pleasant-to-use GUI while preserving the greatness of the command-line environment. Out of the box it has everything a modern OS should have, this saves you the time needed to configure the development environment and focus on the job you need to do.
OSX is beautifully designed, slick and always Continue reading
While I was compiling PHP from source to install the latest PHP version 5.5.4 on the OSX (10.7.5 Lion). (BTW, try not to do this at home because this can be a tedious process! )
I got the following error:
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) ‘mcrypt.so’ in Unknown on line 0
My php.ini is from previous version, and it is located at /etc/php.ini Continue reading
You need the Perl libraries in order to compile git, you also need the “gettext” package if you encounter the “msgfmt” error
sudo yum install perl-devel gettext curl-devel
Go to this page to select the latest git, and download it
tar -xvf git-1.8.4.tar.gz
There will be an error Continue reading
While I was trying install the latest git by compiling the source, I got the following error
12345 /usr/bin/perl Makefile.PL PREFIX='/usr/local' INSTALL_BASE='' --localedir='/usr/local/share/locale'Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 3.BEGIN failed--compilation aborted at Makefile.PL line 3.make: *** [perl.mak] Error 2make: *** [perl/perl.mak] Error 2
Turns out the Perl headers are missing, using yum to install it solve the problem
yum install perl-devel
Some said it’s related to the CPAN module, I have no idea what it is, if the above not work, try also install the CPAN by:
yum install perl-CPAN
This is a very common effect, however the Android framework only provides the slide in animation. This is how I implement all the sliding transition animation. There’s in total 4 XMLs to define the animation, and with the use of overridePendingTransition() in appropriate location you can implement this easily.
pull_in_left.xml Continue reading
Memcached is a distributed Memory caching system, it is probably the de facto standard of caching facility for high performance web applications. In short, it is a key-value store which runs entirely in the memory, so it’s extremely fast and also proven to be reliable to handle high traffic.
Steps to install on CentOS (just works!)
Run the following commands one by one in the terminal, this will install the memcached server, and the PHP “Memcahe” classes needed to be used by Continue reading