Unable to install Homebrew

Unable to install Homebrew with this? ruby -e “$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)” What’s happened -e:70: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 ==> This script will install: /usr/local/bin/brew /usr/local/Library/… /usr/local/share/man/man1/brew.1 Press RETURN to continue or any other key to abort ==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew Password: ==> Downloading and installing Homebrew… remote: Counting objects:…

Read more...

Interview Practice 05 – K Smallest Elements in List

Question 输入n个整数,输出其中最小的k个。 例如输入1,2,3,4,5,6,7和8这8个数字, 则最小的4个数字为1,2,3和4。 Sample Code [expand title=”Sample Code in C++” tag=”h4″] #include <iostream> using namespace std; class MinK { private: int *array; int size; void shiftDown(int *ret,int pos,int length) { int t=ret[pos]; for(int s=2*pos+1;s<=length;s=2*s+1) { if(s<length&&ret[s]<ret[s+1]) ++s; if(t<ret[s]) { ret[pos]=ret[s]; pos=s; } else break; } ret[pos]=t; } public: MinK(int *arr,int si): array(arr), size(si) {}…

Read more...

Save Terminal from Process Completed in Mac OSX

What’s happening One day, when I opened up terminal as usual, it showed [Process completed] and just terminated. I could not type any thing, run any scripts and work on my project. Even worse, this made me unable to install programs into my computer because many installations need to run shell scripts. Okay, I searched…

Read more...

How to Take a Screenshot on BlackBerry PlayBook

To capture screen in BlackBerry PlayBook, just hold the volume Up and Down buttons together. After a camera shutter sound, a screen image in the format JPG will be saved in Pictures > Camera folder.

Read more...

InstaMusic Beta is Coming!

Hi there, its been a long time that InstaMusic haven’t been updated. Sorry for that because I had been so busy in working on a game project in my company. Anyway, I am quitting for the sake of pursuing a master degree. And finally I have time to implement what I thought up and designed! An new…

Read more...

Take a Screenshot on Samsung Galaxy S2 after the Upgrade to Ice Cream Sandwich

Thank you for checking out this tutorial. Reading the discussions in this post, seems like there is quite a number of people having troubles to take screenshots with Galaxy S2. To clear any confusions, I summarized some information and added as followings. Hope you could make it too. Fingers crossed. First, make sure your Galaxy…

Read more...

InstaMusic Got 10,000 Downloads over Lunar New Year!

Happy lunar new year to all. I am flattered. In less than a month since I put the InstaMusic to the Android Market on 27 Dec 2011, today it has already more than 10,000 downloads. To be honest, I never expected this. If you are uninitialized, InstaMusic is a music player android application with simple and stylish…

Read more...

Making LoL for Mac works again after the beta closed

It is very disappointing that the League of Legends for Mac is closed after 6 Sep. It is really sad to see the compulsory close button after opening the LoL as shown in the below screenshot. Luckily, there is a way to make the game working again temporary. Technically, as the game is a transplant…

Read more...

Google Plus for Android

As a new social service provided by Google, making it works on android is a must. However, this app is only available in US market. For those who loves social, try it and you will love it! Download Apk (1.0.5) Desctiption: Google+ (Google Plus) is a recent released Google Inc Social Application that allows you…

Read more...

Mbox Mail for Mac on Lion Fix, works with Apple Mail 5

Step 1: Download my fix file here: Download Link (Link Updated) Step 2: Turn OFF Mbox Mail for Mac. (If you don’t have the menu bar icon, go to “System Preference”) Step 3: Open the downloaded file and drag “mBoxMail” to “mBoxMail Folder” Step 4: Turn ON Mbox Mail for Mac

Read more...