It takes me quite a while for me to figure out how to clone my screen to the projector. The default setting (two separate screens) may be reasonable for power point presentation. But I would like to take advantage of the stylus during my presentation. Cloning the display is of course a better choice for…
Author: phsamuel
Calibrate X61 stylus on 12.04
Got my cheap used X61 but the touchscreen is way off. I tried to calibrate it with this and this post but it just doesn’t work in my case. To be fair, xinput-calibrator suggested by the posts is very useful. Just the calibrated data is not registered. After some more search, find the command xsetwacom….
Gnome Shell ignoring gconf-editor and button placement
Just installed another 12.04 to a X61 tablet from ebay. It is one of my favorite machine as I can write notes on that and it is cheap ($150 from ebay). And with xournal, I don’t even need to print out stuff and rescan if I need to sign some document (just use the annotate…
Setup wireless with command lines
My ubuntu box does not always configure wireless connection correctly. Luckily, setting connection on command line is rather easy. I followed the comment by Savage for this guide (or I guess this one is kind of the same). It didn’t work the first shot for me. But it worked after some slight modifications. You may have a different device,…
Data Processing Inequality
A very intuitive yet powerful inequality in information theory is the data processing inequality. Lemma: If random variable $latex X$, $latex Y$ and $latex Z$ form a Markov chain $latex X \rightarrow Y \rightarrow Z$, then $latex I(X;Y) \ge I(X;Z)$. The great thing about the inequality is that unlike some results in information theory, it…
Some Results for Hermitian Matrix
Lemma 1: All eigenvalues of a Hermitian matrix are real. Proof: Let $latex A$ be Hermitian and $latex \lambda$ and $latex x$ be an eigenvalue and the corresponding eigenvector of $latex A$. We have $latex \lambda^* x^H x = (x^H A^H) x = x^H (A x)=\lambda x^Hx$. Thus we have $latex \lambda^*=\lambda$ as $latex x^H…
Schur Complement and Positive Definite Matrix
For a matrix $latex M = \begin{pmatrix} A &B\\C&D\end{pmatrix}$, we call $latex S\triangleq D -CA^{-1}B$ the Schur complement of $latex A$ in $latex M$. Note that $latex S$ naturally appear in block matrix inversion. Note that when $latex M$ is symmetric and $latex A$ is positive definite, $latex M$ is positive definite if and only…
Block Matrix Inversion
Here are some formula for matrix inversion. Lemma 1: For a block matrix $latex M=\begin{pmatrix}A & B \\C &D\end{pmatrix}$, $latex M^{-1}=\begin{pmatrix}(A-B D^{-1} C)^{-1}& -A^{-1}B(D-CA^{-1}B)^{-1}\\-(D-CA^{-1}B)^{-1}CA^{-1}&(D-CA^{-1}B)^{-1}\end{pmatrix}$ $latex =\begin{pmatrix}A^{-1}+A^{-1}BS^{-1}CA^{-1}& -A^{-1}BS^{-1}\\-S^{-1}CA^{-1}&S^{-1}\end{pmatrix}$, where $latex S=D-CA^{-1}B$ is basically the Schur’s complement of block $latex A$. Proof: Let $latex M^{-1}=\begin{pmatrix}E&F\\G&H\end{pmatrix}$, $latex M M^{-1}=1$ gives us $latex AE+BG=I$ $latex AF+BH=0$ $latex CE+DG=0$ $latex…
Screen capture of a selected window with ffmpeg in Ubuntu
After some trial and error and reading some other posts, I finally manage to capture screencast of a selected window with ffmpeg under 10.04. I am using the native ffmpeg from ubuntu and so recompiling is not needed. The command I’m using is as below. ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r…
Code Geass Season 1
What can I say? I just can’t stop watching and and basically used up my whole day to finish the first season. Thinking back, it didn’t incorporate exactly lots of new elements. After all, the studio is Sunrise. It has been making war animes for more than 30 years. It just did everything they used…