poster-ps-08-vending-machine

Interview Practice Extra 06 – Vending Machine

Question This is an actual question I encountered in an Amazon phone interview in November 2013. You are going to design the money changing algorithm for a vending machine. That is, after any purchase, the machine makes change to users with a combination of coins. And the machine only have 3 types of coins: nickel…

Terminal-1

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…

caffeine

Caffeine on Mac and Ubuntu

Caffeine has been a very useful app to instantly disable or enable the screensaver on mac. At least for me, I am using multiple computers in office and all of them except the one I am using will usually get idle. Getting into screensaver, however, is bad sometimes especially I was reading from that screen…

Detecting browsers of iPhone, iPod, iPad, Android and BlackBerry with JavaScript and PHP

To begin with, we need to understand that in the HTTP protocol, browser send its identity called user agent to the server to request the wanted webpage. Every browser has its only unique user agent value, and therefore we can check that value to identify the user browser. So, first we have to take a…

Show completions and quick help tips in Xcode

I know it is troublesome, tedious, or just like hell. Apple has his own way to do a common task. Very often, we need to use the autocompletion in IDE to assist coding so we do not need to memorize the billions of function names. In Eclipse, everything is automatic. A list of function names linked together…

Merge 2 unrelated branches in Bazaar

To merge 2 entirely unrelated branches or projects, we need to specify 0 as first revision in revision range. Turn on terminal (in Mac) or cmd (in Windows) and get to your project folder. Merge with the following shell script. merge -r0..-1 means to merge from revision 0 to the latest revision. [sourcecode language=”shell”] bzr…

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…

Thanks for the referral from WinAndMac.com

Recently my blog has been referred by winandmac.com to show how to install the Samsung Kies on Lion. I have been subscribing winandmac.com for a long time and I am so grad to be linked by this international and informative blog. And the followings are the posts. =] English version: How to: connect Samsung Galaxy…

Samsung Kies for Mac OS X Lion

Recently I bought Samsung Galaxy S2. Samsung offer an application to synchronize files in Mac. However, the latest version cannot be installed in Lion. To tackle this, you can install an older version and then update it to the latest version. I have tested it works for this version: KiesMac_1.0.0.11055_7. Install it and then go to…

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