Saturday, October 27, 2012

Upgrading to Ubuntu 12.10: Restoring Grace

Caution: Upgrading the operating system is especially dangerous, and Quantal Quetzal is not coming without this risk.

Restoring Launch-bar and Top-bar

The reason of low and limited resolution after upgrading is that proprietary fglrx video driver (for AMD/ATI) is no longer compatible with x-server 1.13 equipped in Ubuntu 12.10. At this moment, one can choose downgrading to x-server 1.12 (see details here).

sudo add-apt-repository ppa:makson96/fglrx
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fglrx-legacy

System font

Personally, I favor the nice 12.04 fonts. One can use gnome-tweak-tool to achieve the following,

  • Default: Ubuntu 11
  • Document font: Sans 11
  • Monospace font: Ubuntu Mono 13
  • Window title font: Ubuntu 11

or simply use gsettings from terminal,

gsettings set org.gnome.nautilus.desktop font "Ubuntu 10"
gsettings set org.gnome.desktop.wm.preferences titlebar-font "Ubuntu Bold 10"
gsettings set org.gnome.desktop.interface document-font-name "Ubuntu 10"
gsettings set org.gnome.desktop.interface font-name "Ubuntu 10"
gsettings set org.gnome.desktop.interface monospace-font-name "Ubuntu Mono 11"

Removing Dash Online Results

Not every search is mattering a http request, let alone the ads-like results. Go to Dash, search Privacy, turn off include online search result, or drastically

sudo apt-get remove unity-lens-shopping

Saturday, October 20, 2012

dictd: Tibetan Chinese Dictionary Released

Today (Oct 20th) I issue a simple Tibetan Chinese Dictionary (containing 3063 headwords) compiled from a web resource. The hereby noticed dictionary (software) is free to use, redistribute, modify. However, the content in this software is subject to the author (not me)'s proper right. Anyone who tries to derive a new work from this software might be found guilty.

DOWNLOAD:

USE:

mv tibetan.idx tibetan.index
sudo mv tibetan.dict tibetan.index /usr/share/dictd/
sudo /usr/sbin/dictdconfig -—write
sudo /etc/init.d/dictd restart

Dictionary source: Web.

Disclaimer: The software presented is provided as "AS-IS", any cause from your use is not protected and the quality is not guaranteed. You are using it on your own risk. The author of the dictionary can claim the copyright of this work.

Friday, October 19, 2012

Calculating Indeterminate Limits Using Special Limits

Without using l'Hôpital's rule, one can utilize known limits. (Test MathJax $\Sigma$) \begin{align} &\lim_{x \rightarrow 0} \frac{\sin^2{2x} - e^{2x} + 1}{\ln (1+3x^2)} (\sqrt{3x+1} - \sqrt{1-x}) \\ =&\lim_{x \rightarrow 0} \frac{4x(\sin^2{2x} - e^{2x} + 1)}{(\sqrt{3x+1} + \sqrt{1-x})\ln (1+3x^2)} \\ =&\lim_{x \rightarrow 0} \frac{1}{(\sqrt{3x+1} + \sqrt{1-x})} \times \lim_{x \rightarrow 0} \frac{4x(\sin^2{2x} - e^{2x} + 1)}{\ln (1+3x^2)} \\ =&\frac{1}{2} \lim_{x \rightarrow 0} \frac{4x(\sin^2{2x} - e^{2x} + 1)}{\ln (1+3x^2)} \\ =&\lim_{x \rightarrow 0} \frac{2x(\sin^2{2x} - e^{2x} + 1)}{\ln (1+3x^2)}\\ =&\lim_{x \rightarrow 0} \frac{x(2\sin^2{2x} - 2e^{2x} + 2)}{\ln (1+3x^2)} \\ =&\lim_{x \rightarrow 0} \frac{x[-(1-2\sin^2{2x}) + 1 - 2e^{2x} + 2]}{\ln (1+3x^2)} \\ =&\lim_{x \rightarrow 0} \frac{x[(1-\cos{4x}) + 2(1 - e^{2x})]}{\ln (1+3x^2)} \\ =&\lim_{x \rightarrow 0} \frac{3x^2}{\ln (1+3x^2)} \cdot \frac{(1-\cos{4x}) + 2(1 - e^{2x})}{3x} \\ =&\lim_{x \rightarrow 0} \frac{3x^2}{\ln (1+3x^2)} \times \lim_{x \rightarrow 0} \frac{(1-\cos{4x}) + 2(1 - e^{2x})}{3x} \\ =&1 \times \lim_{x \rightarrow 0}\frac{(1-\cos{4x}) + 2(1 - e^{2x})}{3x} \\ =&\lim_{x \rightarrow 0} \frac{1-\cos{4x}}{4x}\cdot \frac{4}{3} + \lim_{x \rightarrow 0} \frac{2(1 - e^{2x})}{2x} \cdot \frac{2}{3} \\ =& \frac{4}{3} + \frac{4}{3} \\ =& \frac{8}{3} \end{align}

Thursday, October 11, 2012

olkb: open lightweight knowledge base

I've occupied myself for a couple of weeks on bringing out a light version of lexicon-alike knowledge base. http://olkb.zzl.org

Wednesday, October 10, 2012

WinDLX: File Processing

* Notice: WinDLX can be executed under Ubuntu with wine installed.
The WinDLX (obtained from here) processes *.S text file. The following reads a file a.s (<=500B) and print what it has read. Refer the native WinDLX Help file (UofT Vienna): WinDLX Help.
        .data
fn:     .asciiz "a.s"
buf:    .space 500
fstr:   .asciiz "The read text is:%s"

        .align 2
par:    .word fn
fd:     .space 4
        .word buf
        .word 500
out:    .word fstr
        .word buf

        .text
        lhi r14,par>>16
        addui r14,r14,par&0xffff
        trap 1          ;open file, get the descriptor
        sw fd,r1        ;save the descriptor (in r1) into memory

        lhi r14,fd>>16
        addui r14,r14,fd&0xffff   ;read block from file, block saved at buf
        trap 3

        addui r14,r0,out
        trap 5

        trap 0