2008-01-18

Sick

Tired
Exhausted

Whom can I talk to?

What's wrong with my life?

It's already several days that I can't have good sleep. Feel tired even I when wake up in the morning.

Is what I'm chasing really what I need???

2008-01-15

Switching from ubuntu to Arch linux

Because compared to ubuntu, arch linux is :

- lightweight.
- optimized for i686
- more faster to connect to its mirrors.

2008-01-09

Some misused terminologies

// This post will be kept up to day
Resolution
is now misused to count the number of pixels of the vertical and the horizontal sizes of a screen. But in fact, this just word, "resolution", means the ratio between the actual number of dots in one dimension and the physical size(measured in inches) of of the screen. Dot comes from the typesetting area.

When talking about DPI of screens, we can take one dot = one pixel. When the screen dimensions are 1280x1024(that is, 1280 pixels wide and 1024 pixels height) and the physical diagonal size of the screen is 17", the size of one pixel is about 0.26mm. Thus the pixel size is fixed. So when the DPI is increased, more pixels are used to represent one (in fact virtual) inch, so the font(measured in points, 1 point = 1/72 inch) will become larger...

2008-01-08

Finally the annoying "elseif" indentation bug is solve in php-mode

I browsed emacswiki this morning and found that there is another new version of php-mode. With the hope that this version will solve the annoying and ugly "elseif" indentation bug in my emacs, which is like("_" stands for One SPACE here)


if($true)
__{
__}
elseif($false)
{
}
else
___{
___}


I immediately downloaded that new mode file and installed it, later added several tunings:


(add-hook 'php-mode-hook
'(lambda () (define-abbrev php-mode-abbrev-table "ex" "extends")))


Now, time to try it!! Very lucky, that bug has now disappeared! See this screnshot:




// also, I add "print_r"to the constant php-keywords in php-mode.el to make it appears just the same as "echo":


(defconst php-keywords
(eval-when-compile
(regexp-opt
;; "class", "new" and "extends" get special treatment
;; "case" and "default" get special treatment elsewhere
'("and" "as" "break" "continue" "declare" "do" "echo" "else" "elseif"
"endfor" "endforeach" "endif" "endswitch" "endwhile" "exit"
"extends" "for" "foreach" "global" "if" "include" "include_once"
"next" "or" "print_r" "require" "require_once" "return" "static" "switch"
"then" "var" "while" "xor" "private" "throw" "catch" "try"
"instanceof" "catch all" "finally")))
"PHP keywords.")