Dec
19
2007
0

Focusing attention on presentation

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.

Doodim in action

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.

Mousepose in action

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.

Written by Nanda Firdausi in: business | Tags: ,
Dec
19
2007
13

Java Tips: Initializing Collection

Especially in unit test, we have to initialize an array or a collection. Well, for array, it’s OK… A simple code that we know can solve the problem:

String[] s = new String [] {"1", "2"};

But how about Collection? Normal way to initialize collection is something like this (which pretty ugly):

List<String> s = new ArrayList<String>();
s.add("1");
s.add("2");

I hardly find an elegant solution until I see this post. There are at least three better solution for the case.

First solution:

List<String> s = new ArrayList<String>() {{ add("1"); add("2"); }};

Which unfortunately, doesn’t pass Java Code Convention (that is, if you format the code, it will become uglier than the original).

List<String> s = new ArrayList<String>() {
   {
      add("1");
      add("2");
   }
};

Second solution:

List<String> s = Arrays.asList(new String[]{"1", "2"});

This solution is the best if you use Java 1.4 or before. But if you use Java 5, the third is more elegant:

List<String> s = Arrays.asList("1", "2");

Great!

EDIT: Rob Juurlink commented that this solution will create a fixed read only collection, so you may want to wrap it with ArrayList (or other Collection class) to make it writable

Written by Nanda Firdausi in: java, programming | Tags: ,
Dec
19
2007
0

AppUpdater: Updating applications in Windows

Ubuntu’s users who use apt must like this when they work with a Windows machine. This application is very similar to apt but works under Windows machine.

Sure, the supported applications list is not as big as what apt has, but for starting, this can be a good start.

Via: LifeHacker

Written by Nanda Firdausi in: windows | Tags: ,
Dec
19
2007
3

Google Talk Translator

This is so cool! You can add a translator to your Google Talk friend. It will automatically translate all your sentence to the language that you want. This is so useful to chat with other friend with different language or even just to translate some sentences that you don’t understand.

Google Talk translator

To do this you just have to add this email to your friends list: “[from language]2[to language]@bot.talk.google.com”, and the supported language pairs are: ar2en, bg2en, de2en, de2fr, el2en, en2ar, en2de, en2el, en2es, en2fr, en2it, en2ja, en2ko, en2nl, en2ru, en2zh, es2en, fi2en, fr2de, fr2en, hi2en, hr2en, it2en, ja2en, ko2en, nl2en, ru2en, uk2en, ur2en, zh2en. So for translating English to Arabic, just add en2ar@bot.talk.google.com and start chatting.

Great work Google Talk team!

EDIT: fixed the screen capture

Written by Nanda Firdausi in: google, technology | Tags: , ,

Powered by WordPress. Theme: TheBuckmaker. PHP Scripts, OpenID