Tuesday, November 11, 2008

Key mapping for VMware under Ubuntu 8.10

Recently I have been playing Ubuntu 8.10 and found out a problem.
When I installed a windows under VMware in Ubuntu, the key mapping was wrong.
It will not let me use arrow, insert, delete, backspaces, etc.

I have found out a solution.

1. Go to Terminal
2. Type gedit ~/.vmware/config
3. In the config file, type "xkeymap.nokeycodeMap = true" without the quotes.

Restard VMware and it would be fixed.

Wednesday, October 01, 2008

Biomedical Informatics Introduction Presentation @ Taipei Medical University

This Friday, I will be the main presentor for the biomedical informatics class in Taipei Medical University. I hope everything will go smoothly.

Tuesday, September 16, 2008

Screen Scraping made simple

If you are using .NET, simply use the following function to get HTML string from an URL. 
public static string getHTML(string url)
{
return new System.Net.WebClient().DownloadString(url);
}

Friday, September 12, 2008

Display ASP.NET's menu in Safari or Google's Chrome

To fix the incorrect and ugly rendering of ASP.NET's menu component in Apple's Safari or Google's Chrome browsers. You need to do the following.

1. Make sure you have admin privilages
2. Go to
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers
3. Open up mozilla.browser with notepad or any other text editor
4. Find this section 
5. Delete enitre  section within  section 
6. Under command prompt, run
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regbrowsers.exe -i

After the above steps, the rendering of an ASP.NET menu will be the same as it is rendered on IE.

Monday, July 14, 2008

KIS registry entries

Free Access to KAV/KIS 6.0/7.0:

1.Shut down Kaspersky.

2.Run regedit, and remove the following registries. (Key Removal)

HKEY_LOCAL_MACHINE\SOFTWARE\KasperskyLab\LicStorage

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\RNG

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\SPC\Certificates

3.Run Kaspersky, choose 30-day trial key and activate.

4.When the 30-day trial key expired, run these steps again.

Wednesday, April 30, 2008

When good people leave

Why are star employees so hard to keep?

A SENIOR manager was complaining that no matter what they did, good people tended to leave the company after a few years. He was at his wits’ end.

To be fair, he is worth his salt as a leader of the team. He believes in keeping good people. But why are his “stars” leaving?

Ask any clever executive and he will give you a list of reasons why he will stay with a company and why he will walk away despite the remuneration package. The main problem lies with their immediate supervisors, who really have no clue about nurturing them and getting the best out of them.

Hiring talented people is hard enough but trying to keep them can be harder because job opportunities abound and talented people will find little “niches” where they fit perfectly. Again these “stars” are visible and marketable and a clever employer would try to lure them over.

Ask a talented executive the real reason why he/she is leaving and you might get the following reasons:

  • Bosses who have gone up the corporate ladder with no leadership skills training. They have big egos and few or non-existent leadership skills. They bully their staff, blame others and find convenient scapegoats for their mistakes and feel threatened by staff who appear clever or more skilled than them. Such bosses are commonly found in the corporate world; most of them stay where they are, torturing their staff, because they have a “godfather” in senior management position. In turn, senior management finds it increasingly difficult to acknowledge the fact that its choice of “manager” is suspect.

  • The “nature of the job”. Clever executives want challenges that drive them towards excellence. One little flaw in their character is that they get bored easily. That is why bosses need to consider how they can get the best from their staff. When you expect your staff to do the same job year in and year out, with no “escape clause”, they will leave – no matter what you pay. Remember, the market will bear the cost of excellence.

  • Lack of “succession planning”. If an organisation does not have one in place, the message you give your staff is: “we do not have a career path for you.” This is tough on young, energetic people who have personal goals, including going up the corporate ladder. So if the boss has no plans for the employees, they will find a company that has one.

  • The work environment. If bosses do not generate a good corporate culture, the staff will lose their motivation. A career will become “just a job”. What drives people away? A department in which the staff is not nurtured, a company where bosses are indifferent to the needs of the staff, or a place where no one practises basic courtesies.

  • Standards and procedures in an office. If there is favouritism and the boss’ decisions smack of discrimination, if people abuse the system and no one cares, then good people leave.

  • Lack of learning opportunities. Many companies feel that training is a waste of money, not realising that it is one way to show your staff that you care about their development, both personal and professional. I knew of one boss who refused to do soft-skills training because it would not “benefit” the company and only develop the person.

    Every time a company loses its staff, the losses are greater than what you see on the surface. Look at the visible and the hidden costs. To recruit people, a company spends money on advertisements and interviews (which also take time). Next, new recruits need training. Then there are the remuneration and other benefits that need to be considered. The list goes on. Imagine if you work in a company where there is high turnover and no one cares. It is hard-earned money which could be put to better use.

    Many young people do not want to work for someone else. They do not suffer fools gladly and you cannot blame them. It is pathetic to see highly-placed leaders who are unable to handle issues or crises – and they make no apologies for that. The sad fact remains that we are willing to put up with mediocrity and suffer in silence.

    Human resource experts feel that greater synergy of human resource involves “job designing”. Bosses need to find out more about the “passion, interests and desires” of executives. What will challenge them and bring out the best in them? Succession planning could also be based on these principles.

    We do not have to look far. Great industrialists are people who take challenges despite overwhelming odds. They have the ability to attract the best talent in the world because they are able to challenge young people to take risks, look beyond their scope of work, be creative and do the unthinkable.

    There was once an IT expert who was trying to improve a mechanical device. He finally succeeded and, with great enthusiasm, ran to his boss’ room to show him what he’d done.

    The boss, excited, jumped up, shook his hand vigorously and said: “Wait, I must give you a reward.”

    Looking around the office and pulling out his drawers, all he found was his lunch – a banana. He handed the banana to the staff and said: “Have this.”

    The subordinate walked away, quite puzzled with his “prize”. But he was greatly thrilled when he was later awarded the “Best Innovation Prize”, which was a “golden banana”.

    He still works for the company.

  • Thursday, January 03, 2008

    Find the CultureInfo by ISO Currency Code


    Below is the code that find the CultureInfo by ISO Currency Code

    protected CultureInfo CultureInfoFromCurrencyISO( string isoCode )
    {
    CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures);

    foreach (CultureInfo ci in cultures)
    {
    RegionInfo ri = new RegionInfo(ci.LCID);
    if (ri.ISOCurrencySymbol == isoCode)
    {
    return ci;
    }
    }
    return null;
    }

    // Since one ISO Currency Code may be associated with more than one LCIDs
    // We could rewrite the code to the following

    public static IList CultureInfoFromCurrencyISO(string isoCode)

    {

        CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures);

        IList Result = new ArrayList();

        foreach (CultureInfo ci in cultures)

        {

            RegionInfo ri = new RegionInfo(ci.LCID);

            if (ri.ISOCurrencySymbol == isoCode)

            {

                if(!Result.Contains(ci))

                    Result.Add(ci);

            }

        }

        return Result;

    }