As a Mac beginner, I often forget which key is related to a symbol. So this is the cheat sheet of mac keyboard.

My great explanation of my life
As a Mac beginner, I often forget which key is related to a symbol. So this is the cheat sheet of mac keyboard.

Java 5 introduces a new class named Scanner. This class provides the best way to work with stream of character.
Using the class, you can reduce the code to read and process any character stream, that’s include file or any other input stream. That’s mean you can also use System.in for getting input interactively from user in a console application (something that is very hard to do with previous Java version).
For more information about Scanner, see the tutorial in Sun.
when you have 100Mb internet for yourself?
Ask this guy who downloaded Ubuntu (ca. 700MB) in less than 1 minute.
From: Wired
Are you a GTD practitioner or maybe a wannabe? This collection of free articles from the writer of GTD might help you somehow. Even if you don’t really do all the suggestions, there is probably one or two tricks you want to try.
Who don’t like comic strip? My favorite is Foxtrot, so it’s pretty disappointing when Bill Amend announced that he will only release a new comic once a week, not every day like before.
Anyway, if you have a certain comic strip’s favorite, you can collect them in your local machine as long as you don’t publish it anywhere else. The most primitive way is of course just ‘copy and paste’ the image everyday (or every new comic is released).
If you use linux, there is a better way to do it. Just install dailystrips package and configure it to run everyday with all comic titles you want to download and it will do the jobs for you. You can anytime go o your archive and read all the comics you haven’t read.
For Mac, the most convenient way is to use ACMEreader. This is also a free application and it has nicer interface than dailystrips. The drawback is that you have to open the application once in a while to make sure that you don’t miss any release.
So don’t wait any longer, start your comic strip collection now!
Rubik is pretty classic game and it even has a World Championship.
I have my first (which has already gone for a long time) when I was in the Junior High School and it was accompanied with a paper about how to solve the rubik. So earlier, I always look at that paper anytime I want to solve it. When the paper gone, I found a nice way to solve the rubik: take out the stickers and put them back together in the proper position :D.
So, when two months I get a new rubik’s cube without accompanying paper instruction, I just look into Youtube and found many links about rubik (which is not a topic of this post, but many are also interesting) and a tutorial by Dan Brown (does the name seems familiar to you?). Here are the links part 1, part 2.
After several days struggling, now I can say I’m able to solve rubik 3×3 without any help in under 10 minutes. Try me!

If you use Eclipse a lot you must have your favorite keyboard shortcut. Here are mine:
So if you are also using Eclipse, what’s your favorite keyboard shortcut?
This tips is not that advance. I expect that many have already known this and I even have already write a tips of one nice application of this technique. For those who don’t, Java 5 provides a nicer way to define an array argument.
Say there is a method like this:
public void processArray(int[] is) { // ... }
With the old technique, you have to create the array explicitly before passing it as argument, such as:
processArray(new int[] {1,2,3,4,5});
With the new technique, you can simplify it to:
processArray(1,2,3,4,5);
But the method defined before have to be changed to:
public void processArray(int... is) { // ... }
Of course, there are several requirements for this to happen.
Unit test is a very good practice for creating robust application. Using Spring, we can avoid using ApplicationContext and instead arrange all dependencies programmatically. However, once in a while, we still need to test using the actual ApplicationContext. This can be problematic if our test using mock from EasyMock.
So here is the example on how to create a mock using EasyMock programmatically:
AccountDAO accountDAOMock = EasyMock.createMock(AccountDAO.class);
Move it to Spring ApplicationContext like this:
<bean id="accountDAOMock" class="org.easymock.EasyMock" factory-method="createMock"> <constructor-arg index="0" value="com.argus.camc.datamanagement.interfaces.AccountDAO" /> </bean>
Happy unit testing!
Often in a presentation, we need to show a demo to the audience. A live demo is often much more appreciated than recorded cast. But the problem with live demo is you will be forced to show the entire screen of your computer. If you want to focus the attention to a window or a point, you need to dim the rest of your screen.

Clutter Cloak is the tools for your Windows machine, whereas Doodim does the exact job for the Mac. Both are free.
If what you need is somewhat different, you may want to see Mousepose. Instead of a static rectangular area, Mousepose simulates a dark room with strong light to a certain place pointed by your mouse.

BTW, Mousepose is available as bonus if you finish the MacHeist II stage 2. It’s still running now, so you must hurry if you want one.