Monday, May 4, 2015


Number pages differently in different sections on MS Word

This one is a common request, the best I can found is the following:


Here is the official answer from Microsoft
Number pages differently in different sections


However, the steps are rather complex, the one really helped me is this video
Insert Sections with Different Page Numbers (Word)

For me, it needs extra steps:

  1. Following above steps 
  2. Right click the page number (the "Page Number Format" dialog should show)
  3. Make sure the radio button 'Start at" is selected instead of "Continue from previous section"



Friday, November 16, 2012

“Developers Options” menu is missing in Jelly Bean 4.2

After updated to Jelly Bean 4.2, you will find “Developers Options”   missing.

It is there, just 4 taps away


  1. Goto  “About phone” (or tablet) 
  2. Tap the "Build number" (the last item) 4 times slowly
  3. On each tap, it will remind you how many "click" away from being a "developer"
  4. At the end, it will told you "You are a developer now"
The "Developer options" will show up again in the "Settings" just above  “About phone” (or tablet) 

Monday, January 9, 2012

Linux freeze at reboot

Problem:  My Linux environment (Oracle Linux 5 update 7 on Dell T1600) goes through the entire shutdown sequence normally, then hangs on a blank screen at the point when it would normally reboot the computer. It has to be manually power down and restart

Solution: Add "reboot=b" to kernel parameter (for Grub, it is inside /boot/grub/grub.conf)

For 64-bit OS, you may need "reboot=p,e,f"

Here is a excellent link about this topic

http://linux.koolsolutions.com/2009/08/04/howto-fix-linux-hangfreeze-during-reboots-and-restarts/

Update (July 3, 2012) : The following also fix the problem:

"VT for Direct I/O" from the bios



Sunday, January 8, 2012

Install VMware Tools or Virtual Guest Addition for Oracle Linux

Problem: Get your Oracle Linux ready to install  VMware Tools or Virtual Guest Addition.

Solution: Oracle Linux by default uses Oracle's own unbreakable kernel, so if you install VMware Tools or Virtual Guest Addition, you need to get the correct header files to do the compilation. Here is the "yum" command to get all you need:


yum -y install kernel-uek-headers-`uname -r` gcc kernel-uek-devel


Monday, March 21, 2011

IE9 keep prompting "Internet Explorer has stopped working"

Problem:
   Your newly installed IE9 keep prompting "Internet Explorer has stopped working" and IE is unusable!

Solution worked for me ( I am using Vista):
  • Kill the IE with Task Manager
  • Open Control panel. Click on Internet Options. Then select the Advanced tab. Right on the top you will see an Item Accelerated Graphics, check "Use Software Rendering Instead"
If this does not work for you, try something else here.

In the worst case, you can uninstall IE 9 and fallback to your pervious version by following the procedure described here 

Sunday, December 27, 2009

ATI Radeon Xpress 1250 Windows 7 driver

Looking for ATI Radeon Xpress 1250 Windows 7 driver, try Catalyst Software Suite 9.11. It is not officially support Windows 7 (see below) but it should be the best you can get. It worked for me.

...AMD’s DirectX 9 ATI Radeon graphics accelerators are not officially supported under Windows 7. If the user chooses to, they can install the ATI Catalyst Windows Vista graphics driver under Windows 7. Please be aware that none of the new Windows 7 graphics driver (WDDM 1.1) features are supported (as the Windows Vista level graphics driver is limited to WDDM 1.0 level support). Using the ATI Catalyst Windows Vista driver under Windows 7 is not officially supported by AMD, and as such AMD will not provide any form of customer support for users running in this configuration....


I just upgraded a Samsung R20 to Windows 7, it has a ATI Radeon Xpress 1250. The display was fuzzy with Windows 7's default display driver. I went to AMD's site (ATI ,merged with ATi)

...The laptop manufacturer is the exclusive provider of driver updates. If the required driver update is not available at the laptop manufacturers’ website, it is recommended to contact the manufacturer directly, to see if an updated driver will be made available in the future... AMD cannot provide driver updates directly from AMD.com...
http://support.amd.com/us/kbarticles/Pages/737-28041SupportforATIMobility.aspx

So I want to Samsung, but no luck, it only got XP and Vista.

I remember when I run Win 7 upgrade adviser, it suggested me to got something like 1300 (I should pay better attention the first time)

So I go back to AMD, and search for x1300, no plan for Windows 7 driver but y Catalyst Software Suite 9.11(older version such 9.3 crashed in Windows 7) seem OK to me.

Wednesday, September 9, 2009

Pass NTLM proxy to get Eclipse 3.5 update

How difficult could it be to get update from Eclipse? Wait until you sit behind corporate proxy!

If it is a NTLM proxy and Eclipse 3.5, stop trying! it WILL NOT work. You not only find solutions here, but also find testimonials of how many time has been wasted on this topic

http://demeringo.ovh.org/blog/?p=103

For me, add a CNTLM is the best

Wednesday, June 17, 2009

Access the Service Console in VMware EXSi

Apart from being free, VMware EXSi 4.0 also cannot access the service console like EXS. It is not easy but it is possible.

1. From the ESXi console summary screen hit ALT-F1.
2. Enter the word "unsupported" (without quotes and there will be no echo).
3. Enter in the root password for your system.

Tuesday, March 24, 2009

Having problem installing the Flash player again

Somehow you have to go over this again on each new release

This time Flash 10, I cannot locate the msi as I did with Flash 9. I finally get it worked with the Adobe's Knowledge Base:

http://kb.adobe.com/selfservice/viewContent.do?externalId=fb1634cb&sliceId=1

It said the problem related to "incorrect permissions in the registry"

The procedure require SubInACL from Windows Resource Kit, onec it is installed make sure you add "C:\Program Files\Windows Resource Kits\Tools\" to PATH; otherwise, the script will not run effectively

I hope this fix the problem once for all

Monday, March 23, 2009

Fix: Active desktop recovery with IE7

Having a Active desktop recovery popup suddenly is very annoying, in particular it forces your desktop background turn completely white that hurt my eyes. Different fixes were found but only the following worked for me(as System Admin. disable me from disable the active desktop)

Update the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\SafeMode\Components
Change the value of DeskHtmlVersion to zero instead of decimal 272.

Than logoff and login again

Get it here:
http://www.daniweb.com/forums/thread63865.html

Monday, November 3, 2008

Skip "Compress Old Files" when doing Disk Cleanup

When running Disk Cleanup on Windows 2000 or XP workstations, there is always a long pause for checking how much space will be saved when compression is enabled. As hard disk become so cheap, there is hardy a reason to use Windows XP’s compress and the bigger the disk you have the longer it takes to scan. Here is a windows registry trick that skips the compress check:

http://kb.ucla.edu/articles/automatically-skip-compress-old-files-when-doing-disk-cleanup-in-2000-or-xp

Wednesday, May 7, 2008

eth0: unknown interface: No such device

0) Check if you see any eth* entry in one of the following files:

/etc/modprobe.conf (kernel 2.6)

/etc/modules.conf (kernel 2.4)

(or for older systems: /etc/conf.modules)


In my working case, there is

alias eth0 tg3

However, none was found in my problem Linux, if this is your case, the following steps might work for you. The network module for your network card is not loaded and the following are steps are how to add it back:

1) Find out which module does you NIC need

For me, it is a Broadcom NetXtreme and it works with tg3 module and it already exists in my system under:

/lib/modules//kernel/drivers/net/

2) Add the module

/sbin/modprobe tg3

3) Check the tg3 actually get loaded

/sbin/lsmod |grep tg3

4) ifconfig to see if it is working

5) The module will not be loaded in next reboot. To permanently add this module update the /etc/modprobe.conf with line like for each NIC:

alias eth0 tg3
alias eth1 tg3

Sunday, April 6, 2008

Where is the CA.pl?

I am learning how to setup SSL for Apache. The first step is always setup SSL certs. Most information you found in the Google and the even the latest Apache Cookbook all pointed to the CA.pl which had been come with openssl. I am using Fedora 8 with the openssl-devel installed but like many other people - it just cannot be found.

Finally, I found out that you need to install openssl-perl. If you are using YUM, it would be

yum install openssl-perl

Friday, March 14, 2008

Installing war version of Archiva

Installing war version of Archiva is neither straight forward if $CATACLINA_HOME is NOT owned by you. You only own $CATACLINA_BASE, and there is $CATACLINA_HOME/bin and but no $CATACLINA_BASE/bin

Original

* Create a directory in tomcat called archiva, at the same level as bin, conf, logs and the others.

* Copy the war file into the new directory

* Create a conf/Catalina/localhost/archiva.xml file with the following data (replace the database paths with a suitable location):

It would be more clear to put it

* Create a directory in tomcat called $CATALINA_BASE/archiva

* Copy the war file into $CATALINA_BASE/archiva

* Create a $CATALINA_BASE/conf/Catalina/localhost/archiva.xml …..
Original

Install derby-10.1.3.1.jar and mail-1.4.jar into the Tomcat common/lib.

For Tomcat 6.0.*, there is no more “common/lib”, put them in “$CATALINA_HOME/lib” instead Details of change see here

Apart from mail.jar you also need to be put under $CATALINA_HOME/lib to get mail work
Java Activation Framework 1.1 - activation-1.1.jar

Original

export CATALINA_OPTS="-Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME"

Again, if $CATACLINA_HOME is not owned by you.
export CATALINA_OPTS="-Dappserver.home=$CATALINA_BASE -Dappserver.base=$CATALINA_BASE" is better

If you use the default Derby DB, the default error log file is put under $HOME, to change it set the following properties in CATALINA_OPTS as well:
-Dderby.stream.error.file=xxxx/logs/derby.log"

Thursday, March 6, 2008

Create DB user in Oracle

-- Check which tablespace can be used
select usermame, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE from DBA_USERS;

-- Create user
create user xxxx
identified by yyyyy
default tablespace dddddd
temporary tablespace tttttt;

-- Grant resource to user
grant connect to xxxx;
grant resourc to xxxx;

Installing Archiva

My first impression with Apache Archiva(1.0.1) is not very good.


First, I tried to install Archiva 1.0.1 on Linux as a standalone application. Here is what document say

…The standalone instance of Archiva uses the Plexus application server, which is capable of separating it's configuration from installation, in much the same way Tomcat does, for example, with it's CATALINA_BASE and CATALINA_HOME environment variables…

I can separate configuration from installation but definitely not as nice as Tomcat. When the server starts, it will write files to the installation. So sharing a single installation with multiple configurations is not possible. It would be easier if you just keep the installation and the configuration to the same user. Also, the installation document is just not right.

In step 2 “…Move the conf and data directories from the Archiva installation…”; it should be “ …Copy the conf and data directories from the Archiva installation…”, as the server expect file such as “classworlds.conf” existing in the “conf”. Details can be found here


Login problem

Due to Redback problem, newly added user just cannot login, you need to resend the validation email again (yes! email server is a requirement by default if you want to use Archiva!) Details can be found here

If you want to disable the email verification, add a security.properties file in the conf directory of the installation with the following line:

email.validation.required=false

Detail about the security.properties(Redback configuration file) can be found here

Also, I need to explicitly set the smtp server to localhost, if you get the following error when the server try to send out mail

501 5.0.0 HELO requires domain address

Try adding this line to security.properties as well(assume your localhost can handle smtp)

email.smtp.host=localhost

Wednesday, March 5, 2008

Get rid of gcj

I always prefer Sun's Java over gcj, but with Linux you always default get the gcj. I found the following tip very useful here

Tuesday, February 19, 2008

CentOS - yum update failed - Retrieving GPG key ...

While using yum to update CentOS

Get the "Retrieving GPG key .." error, files get downloaded but fail to update

I solved the problem by get the RPM-GPG-KEY from the first CD of the installation media. In my case, it is "RPM-GPG-KEY-CentOS-5"

Need to import this key to RPM's DB, run the following command as root
rpm --import RPM-GPG-KEY-CentOS-5

Wednesday, February 13, 2008

VM everywhere

Saw the following headline a few days ago "VMware stock loses 33% on revenue"
http://www.boston.com/business/markets/articles/2008/01/30/vmware_stock_loses_33_on_revenue_miss/
Apart from Microsoft and VMWare, even Oracle is offering VM software for free(I wonder when Oracle will start selling burger !)

IBM ServRaid-7k "Wrong SCSI controller found - 3E22"

Found this error when install the IBM ServRaid-7k

Wrong SCSI controller found - 3E22


The problem is related to the on-board HostRAID. We have to disable the the on-board HostRAID first. Press "Ctrl-A" during bootup and use the SCSI utility to diable HostRAID

If you want to switch back to the HostRAID from ServRaid-7k. You have to enable the SCSI device manually in the BIOS since it will be disabled automatically after the ServRaid-7k is removed; otherwise, not even the SCSI will work.

Tuesday, January 29, 2008

Flash "Unable to authenticate installer"

Having problem installing the Flash?

A lot of people do see Adobe's support forum
Adobe said try this http://www.adobe.com/support/flashplayer
For some people, it may due to incorrect permissions in the registry, as here

It does not work for me! if you did try everything else, here is the one that worked for me - Download the IE plugin directly from here instead of install it over the internet:

fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_active_x.msi

Friday, December 28, 2007

Tuning Garbage Collection - Sun's JVM

If you are a Java developer, you have to face the memory leak problem sooner or later. The first step is under the Java’s Garbage Collection. Each version of JVM behave differently, here is a list of Sun documents about how to tune Garbage Collection:

1.4.2

5

6

Thursday, December 27, 2007

java classpath separator

In Unix/Linux/Solaris
CLASSPATH are separated by colons(:)


In Windows
CLASSPATH are separated by semicolons(;)

Sunday, December 9, 2007

Apache HTTPD 2.2 with LDAP authentication

Recently I need to setup LDAP authentication on Apache Httpd. I tried the usual wayto find out how – googleing. I found that a lot of good posts do not work any more as 2.2 had gone through a major refactoring on the Authn and Authz module.

Here are some highlights ( for full version changes made in 2.2 see new features):

  • mod_access has been renamed mod_authz_host.
  • mod_auth is now split into mod_auth_basic and mod_authn_file
  • mod_auth_dbm is now called mod_authn_dbm

For LDAP related, I found Christophe Gravier’s post in users@httpd very useful. I put it here:

If you're using apache >= 2.2 and you want to:

1/ allow "any" authenticated user to enter (whatever his group membership is (i.e. no authorization control), you must "bypass" the authz_ldap authorization module by setting "AuthzLDAPAuthoritative" to off (else apache searches for require ldap-user or ldap-group directives)

AuthType basic
AuthName "Authentication domain"
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL "ldap:///ou=Development,ou=Corporate
Users,dc=financialcad,dc=com?sAMAccountName?sub?(objectclass=*)"
AuthLDAPBindDN "cn=,ou=Development,ou=Corporate
Users,dc=financialcad,dc=com"
AuthLDAPBindPassword ""
SSLRequireSSL
require valid-user


2/ allow a limited list of known users of the directory (need require ldap-user directive and not require ldap-user)

AuthType basic
AuthName "Authentication domain"
AuthBasicProvider ldap
AuthzLDAPAuthoritative *on*
AuthLDAPURL "ldap:///ou=Development,ou=Corporate
Users,dc=financialcad,dc=com?sAMAccountName?sub?(objectclass=*)"
AuthLDAPBindDN "cn=,ou=Development,ou=Corporate
Users,dc=financialcad,dc=com"
AuthLDAPBindPassword ""
SSLRequireSSL
require *ldap-user* myuser_uid


3/ allow a group of user (authorization based on group membership).


AuthType basic
AuthName "Authentication domain"
AuthBasicProvider ldap
AuthzLDAPAuthoritative *on*
AuthLDAPURL "ldap:///ou=Development,ou=Corporate
Users,dc=financialcad,dc=com?sAMAccountName?sub?(objectclass=*)"
AuthLDAPBindDN "cn=,ou=Development,ou=Corporate
Users,dc=financialcad,dc=com"
AuthLDAPBindPassword ""
SSLRequireSSL
require *ldap-group* my_group_full_dn

Friday, December 7, 2007

Linux - Better "ls" coloring scheme against dark background

After fixing the the vi(vim) problem, now we are going to fix a similar problem for "ls". Again, if your terminal has dark background, the result of ls is hard to read. I used to disable the ls coloring altogether by

>unalias ls

Since most Linux, alias the ls command as 'ls --color=tty'

It is some over kill, I found a better solution here

You can just simply unset the LS_COLORS as:
>export LS_COLORS=""

ls now use a better color scheme to display the result

Thursday, December 6, 2007

dsadm exited with unexpected error code 11

Install Sun Directory Server Enterprise Edition 6.2

While creating the DSCC registry
Get "dsadm exited with unexpected error code 11"

Found out from here that my password is too short, it has to be at least 8 characters long!!

Wednesday, December 5, 2007

yum through proxy

1) You can set the environment variable, http_proxy and ftp_proxy, each time before you start yum as

export http_proxy="http://ip:port"
export ftp_proxy="http://ip:port"

For corporate environment, you likely need the uesrname and password as well as:
export http_proxy="http://username:password@ip:port"
export ftp_proxy="http://username:password@ip:port"

or

2) Update the /etc/yum.conf add the following line under
proxy=http://ip:port/

Make sure you include the last slat(/)

It saves you from setting the environment variable every time, but having you plain password store in a file may not be a good idea


To get a GUI front end for yum get the yumex
>yum install yumex

vim with dark backgound

If your terminal has dark background, such as black, it is hard to read highlighted search result (white text with yellow background). Here is the fix

Under ~/.vimrc (create it if it does not exist) add the following line
set background=dark