Monday, December 5, 2011
Monday, November 21, 2011
Squares shown in places of Chinese characters
In Windows Enterprise Chinese characters in folders and other places (like the title bar in chrome) are not shown correctly. This problem does not exist in the home premier edition. A simple solution is to change the system locale to Chinese and then change back to English. Still, I wonder how MS let this slip though their quality control. I now see more evidences of the failing of MS and the rising of Apple.
Friday, October 21, 2011
Uninstallation a program in windows after registry clearner failed
Recently I swapped the hard drives between two laptops. HP's programs on one of them refused to be uninstalled in the new laptop. Manual registry removal the entries in
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
helped, but it also brought some other HP programs back which I thought had been uninstalled. Next phase of using all sorts of registry cleaners did not work. So there we go - manually search for all entries with "hewlett" in the registry. Bingo! They were located in
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products.
After deleting them the entries in the program list were finally gone.
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
helped, but it also brought some other HP programs back which I thought had been uninstalled. Next phase of using all sorts of registry cleaners did not work. So there we go - manually search for all entries with "hewlett" in the registry. Bingo! They were located in
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products.
After deleting them the entries in the program list were finally gone.
Thursday, December 9, 2010
Lorentzian and related concepts
Lorentzian, or Lorentz distribution, is also known as Cauchy distribution. It also has a relativistic version, the Breit-Wigner distribution f(E) ~ [(E^2-M^2)^2 + M^2\Gamma^2]^-1.
The Fano resonance, characterized by f(E) ~ [(E-M + q*\Gamma)][(E-M)^2 + \Gamma^2]^{-1}, is [E-M+q*\Gamma] times the Lorentzian. Thus the Fano resonance is asymmetric even when \Gamma is E-independent. The parameter q is called the Fano parameter, which represents the ratio between the resonant and direct scattering. In the absence of direct scattering, q-> infinity and the Fano resonance reduces to the Lorentzian.
The Feshbach-Fano partitioning separates the scattering into two parts, the resonance part P, and the direct (background) part Q, with P+Q=1. The operators related to P and Q are defined somewhat arbitrarily, but once they are defined, the total scattering process (defined by a Hamiltonian H), can be unique separated into two parts, PHP, and [QHQ + \Delta(E) - i\Gamma].
The Fano resonance, characterized by f(E) ~ [(E-M + q*\Gamma)][(E-M)^2 + \Gamma^2]^{-1}, is [E-M+q*\Gamma] times the Lorentzian. Thus the Fano resonance is asymmetric even when \Gamma is E-independent. The parameter q is called the Fano parameter, which represents the ratio between the resonant and direct scattering. In the absence of direct scattering, q-> infinity and the Fano resonance reduces to the Lorentzian.
The Feshbach-Fano partitioning separates the scattering into two parts, the resonance part P, and the direct (background) part Q, with P+Q=1. The operators related to P and Q are defined somewhat arbitrarily, but once they are defined, the total scattering process (defined by a Hamiltonian H), can be unique separated into two parts, PHP, and [QHQ + \Delta(E) - i\Gamma].
Monday, October 11, 2010
x11vnc
I finally gave up trying to start vino on my remote linux box after numerous failures. The new VNC server I use now is x11vnc. The command is simply:
x11vnc -rfbauth ~/.vnc/passwd -bg -forever -display :0
"-rfbauth ~/.vnc/passwd" specifies the passwd file, "-bg" lets the server run in the background, and "-forever" keeps the server running forever (versus "-once" which stops the server after the viewer exits).
To store the password file, use
x11vnc -storepasswd PATH
and the prompt will ask you to input the password and confirm it. The default path for the file is ~/.vnc/passwd.
Two independent problems:
x11vnc -rfbauth ~/.vnc/passwd -bg -forever -display :0
"-rfbauth ~/.vnc/passwd" specifies the passwd file, "-bg" lets the server run in the background, and "-forever" keeps the server running forever (versus "-once" which stops the server after the viewer exits).
To store the password file, use
x11vnc -storepasswd PATH
and the prompt will ask you to input the password and confirm it. The default path for the file is ~/.vnc/passwd.
Two independent problems:
- On one of my linux box the shift key is disabled somehow. I found the following post which is very helpful (http://www.openg.info/tag/x11vnc-enable-shift-key). It suggested adding "-nomodtweak" which worked!
- On the other one I had the problem via ssh that x11vnc failed to start ":0" and it suggested me using "XAUTHLOCALHOSTNAME=localhost" which didn't help. But it worked fine if I started x11vnc directly on the box. It turned out that x11vnc couldn't find the .Xauthority file which was put in a weird place. All I needed to do was to type "x11vnc -findauth" on the box and use the output location when connecting via ssh. "x11vnc -auth XAUTHORITYPATH ...". Bravo!
- x11vnc has a GUI that makes changing the setting easier. To open the GUI, type
x11vnc -gui connect
It takes effect immediately for the running sessions. Common options include "-share" (whether multiple viewers are allowed for the same session), "-norepeat" (no repeating of a key when pressed for an extended time) and etc.
Tuesday, April 6, 2010
Change names of multiple files in a shell
Example: change all files whose name starts with "kIM" to "kIM_partial" with the same file type (.doc->.doc, .mat->.mat)
1. ls kIM* > namelist
2. cat namelist | awk '{c=split($0, s, "."); print "mv "$0" "s[1]"_partial."s[2]""}' | sh
1. ls kIM* > namelist
2. cat namelist | awk '{c=split($0, s, "."); print "mv "$0" "s[1]"_partial."s[2]""}' | sh
Monday, February 8, 2010
Subscribe to:
Posts (Atom)