Archive for November, 2008

Use Novell GroupWise IM on Ubuntu

To use cross-platform collaborative software product Novell GroupWise’s instant messaging service on Ubuntu is easy. With Ubuntu’s build-in Internet IM appliaction Pidgin, it’s easy to connect to other GroupWise users.

Groupwise Screenshot

Groupwise Screenshot

To launch the application, from the top of your menu bar of your desktop, go to: go to Applications -> Internet -> Pidgin Internet Messenger

Pidgin Screenshot

Pidgin Screenshot

An icon like the one in the picture below will appear near the top right corner of your desktop, click on the icon (similar to the one in the image below) to launch the application:

Pidgin Screenshot 2

Pidgin Screenshot 2

Click on Accounts->Manage Accounts to add your GroupWise account:

Pidgin Screenshot 3

Pidgin Screenshot 3

Click on Add button, you will see the following screen, from the drop-down menu, choose GroupWise:

Pidgin Groupwise Screenshot

Pidgin Groupwise Screenshot

There you go! Just enter your account details and you can connect to your friends instantly. :)

1 Comment

Use Adsense for Search on WordPress

I have searched a few blogs in the hope to find a good way to use Adsense for Search to replace default WordPress search. All the solutions suck, they either ask users to add redundant plugins that doesn’t do the job at all or ways to create a static page to display search results. I got really fed up with these ’solutions’ and finally decide to make my own easy to implement method.

1. Create the Adsense for Search unit from adsense website (I don’t wanna write the steps here because Google has been doing a great job providing step by step guide to create the search unit).

2. When you complete the steps to create the unit on Adsense, you shall get two parts of the generated code, Search Box Code and Search Results Code, copy the Search Results Code.

3. Go to your blog admin, Create a Page called Search Results,

4. Paste the Search Results Code you just copied into the textarea.

5. Get the page id, the page id is the digits at the end of your edit page url, for instance, if the page editing url you are creating your Search Result page is http://www.yourblog.com/wp-admin/page.php?action=edit&post=739, then your post id is 739.

6. Publish the page.

7. Go to Design->Theme Editor, from the template pages, select Header.php, and search for the line similar to the one below:

wp_list_pages(’title_li=&depth=1′);

8. Change the line above to the one below and save the file:

wp_list_pages(’title_li=&depth=1&exclude=739′);

739 is a generic number, it’s the Search Page Result id.

9. Open your template file Sidebar.php, at the place you want the Search Box to appear, paste the Search Results Code at the area. And save the post.

10. Now you are done! It requires neither a static page (in the dynamic world, why need a stupid static page?) nor plugins. Just the simple implementation above! Hope this helps :)

No Comments

Use Gadu-Gadu to Chat on Ubuntu

It’s very easy to use Gadu-Gadu as your instant messenger on Ubuntu, Ubuntu comes with a build-in Internet application Pidgin, use Pidgin, you can easily sign in your Gadu-Gadu account and chat with your friends.

Gadu-Gadu

Gadu-Gadu

To launch the application, from the top of your menu bar of your desktop, go to: go to Applications -> Internet -> Pidgin Internet Messenger

Pidgin Screenshot

Pidgin Screenshot

An icon like the one in the picture below will appear near the top right corner of your desktop, click on the icon (similar to the one in the image below) to launch the application:

Pidgin Screenshot 2

Pidgin Screenshot 2

Click on Accounts->Manage Accounts to add your Gadu-Gadu account:

Pidgin Screenshot 3

Pidgin Screenshot 3

Click on Add button, you will see the following screen, from the drop-down menu, choose Gadu-Gadu:

Gadu Gadu Screenshot

Gadu Gadu Screenshot

There you go! Just enter your account details and you can connect to your friends instantly. :)

7 Comments

Prototype Function Variable inside Observe

If you are a user of JavaScript Framework Prototype, and use observe to handle event, you may face problem when you try to call function with variable inside the observe.

Let’s assume you have an HTML element with the id btn, you want to alert a custom message when it’s clicked, you might code it the following way:

function alertMessage(message) {
    alert(message);
}
$('btn').observe('click', alertMessage('hullo world'));

this won’t work because it involves <strong>currying</strong>. Currying? What the heck is that? You may ask, ok, let me try to explain this:

Because <strong>alertMessage</strong> is a function and <strong>message</strong> is an argument, to write it in the observe event handler, we must produce a new function by combining function <strong>alertMessage</strong> and its argument <strong>message</strong>, this is called <strong>currying</strong>.

The bad news is that JavaScript doesn’t have a build-in curry method, but the good news is that Prototype has one! So to make the above script work, all you need to do is to add in the curry!

function alertMessage(message) {
    alert(message);
}
$('btn').observe('click', alertMessage.curry('hullo world'));

For more about currying, check out the following two great Google book excerpts, one by Yahoo! Architect Douglas Crockford and another by Core Prototype developer Andrew Dupont.

http://books.google.com/books?id=PXa2bby0oQ0C&pg=PA43&lpg=PA43
http://books.google.com/books?id=GtLXnZWH3-4C&pg=PP10

Hope this helps!

No Comments

Use Bonjour to Chat on Ubuntu

To use Apple’s Bonjour to chat on Ubuntu is easy. Ubuntu’s build-in Internet application Pidgin can connect you to other Bonjour user.

Bonjour

Bonjour

To launch the application, from the top of your menu bar of your desktop, go to: go to Applications -> Internet -> Pidgin Internet Messenger

Pidgin Screenshot

Pidgin Screenshot

An icon like the one in the picture below will appear near the top right corner of your desktop, click on the icon (similar to the one in the image below) to launch the application:

Pidgin Screenshot 2

Pidgin Screenshot 2

Click on Accounts->Manage Accounts to add your Bonjour account:

Pidgin Screenshot 3

Pidgin Screenshot 3

Click on Add button, you will see the following screen, from the drop-down menu, choose Bonjour:

Bonjour Screenshot

Bonjour Screenshot

2 Comments

Random Quote Nov 28 2008


**************************************
So so is good, very good, very excellent good:
and yet it is not; it is but so so.
– William Shakespeare, “As You Like It”
**************************************
There is just no words can be used to describe Shakespeare, he had taken all the words!

No Comments

CakePHP Solution for Could not open input file: acl.php

If you are a reader of the IBM tutorial Cook up Web sites fast with CakePHP, Part 2, and execute the following line of code to create aro named Users:

php acl.php create aro 0 null Users

you may end up get the error message like the one below:

Could not open input file: acl.php

The correct syntax should be, from your cakephp_site/app directory, execute the following line

../cake/console/cake acl create aro root Users

for Dealers, it should be

../cake/console/cake acl create aro root Dealers

Hope this helps :)

2 Comments

Use AIM to Chat on Ubuntu

To use AIM (AOL Instant Messenger) to chat on Ubuntu is easy. By using Ubuntu build-in application Pidgin, you can connect to AOL account in just a second and start chatting.

AIM

AIM

To launch the application, from the top of your menu bar of your desktop, go to: go to Applications -> Internet -> Pidgin Internet Messenger

Pidgin Screenshot

Pidgin Screenshot

An icon like the one it the picture below will appear on top right corner of your desktop, click on the icon (similar to the one in the image below) to see the application:

Pidgin Screenshot 2

Pidgin Screenshot 2

Click on Accounts->Manage Accounts to add your AIM! account:

Pidgin Screenshot 3

Pidgin Screenshot 3

Click on Add button, you will see the following screen, from the drop-down menu, choose AIM:

AIM Pidgin

AIM Pidgin

2 Comments

CakePHP Solution for Warning: Cannot modify header information – headers already sent

If you are using CakePHP to develop your website, you may get the error message:
Warning: Cannot modify header information - headers already sent

This error is not uncommon, many people bump into this problem, especially for beginners. This error message makes the problem sound very serious, but the problem itself is not that complicated at how. By interpreting the message ‘literally’, you will find that the default error message instruct you to do something you have already done, for instance: create method in controller.

The actual problem is whitespace, yes, it must be somewhere, a whitespace is hiding somewhere, it can be at view, model or controller, it may not be in the file you are opening, because of the way CakePHP works, you might be editing several files before run the test, so the whitespace at the end of the file could be anywhere in the MVC, if you searched and removed all the whitepace, extra empty line, the error should go away.

What if it still doesn’t work?
The solution is simple, search again! People always miss to search Model, because they focus on controller and view and may assume Model just works. Go and do a thorough search again – Seek, you shall find!

Hope this helps! :)

10 Comments

Make Flash Screensaver for Mac

After trying a few softwares that make Flash Screensavers for Mac, I have come to the conclusion that SCREENTIME V3 is the best. It’s a paid software but with a trial version for tryout. It’s easy to use and provides the flexibility that people can customize the look and feel, installation process and the functionality of the screensaver.

Below are just some of the main features:

1. STF Desktop API ActionScript Class.
2. Builds User Friendly Screensaver Installer.
3. Enables Flash Customization of Installer, Control Panel, and Settings Window.
4. Includes Robust Support of Hibernation, Firewall, Password Protection, Browser Launch, Multiple Monitors and many more small but important details.
5. Flash AS and Help Integration makes your Flash IDE “Screensaver Development Ready”
6. Free Support and Upgrades for 1 year.

No Comments