Monday, October 26, 2009

VIM: block editing

Use CTRL+V to enter the block editing mode.
For editing something like tables, that is sweet.

Thursday, June 25, 2009

switch to debian

switched from ubuntu to Debian. Have to say that ubuntu is more end user friendly.
On debian,
I need to mount ntfs partition use
#mount -t ntfs-39 /dev/sda /mnt

And I need to use iceweasel, which is not support chinese by default,
I need to install a package.
# apt-get install iceweasel-l10n-zh-cn

Monday, June 22, 2009

modify debian console resolution

debian console resolution change


title        Debian GNU/Linux, kernel 2.6.26-2-amd64
root        (hd0,5)
kernel        /boot/vmlinuz-2.6.26-2-amd64 root=/dev/sda6 ro vga=0x303
initrd        /boot/initrd.img-2.6.26-2-amd64

http://en.wikipedia.org/wiki/VESA_BIOS_Extensions

mount ntfs partition in debian

mount ntfs in debian

#mount -t ntfs /dev/sda2  /mnt -o rw -o umask=000

Sunday, April 26, 2009

Thursday, March 12, 2009

R operators

x + y
x - y
x * y
x / y
x ^ y
x %% y
x %/% y

> 4 %% 2
[1] 0
> 4 %% 2
[1] 0
> 4 %/% 2
[1] 2
> 5 %/% 2
[1] 2

Saturday, March 7, 2009

r: clear screen

# An R function to clear the screen on RGui:
cls <- function() {
if (.Platform$GUI[1] != "Rgui")
return(invisible(FALSE))
if (!require(rcom, quietly = TRUE)) # Not shown any way!
stop("Package rcom is required for 'cls()'")
wsh <- comCreateObject("Wscript.Shell")
if (is.null(wsh)) {
return(invisible(FALSE))
} else {
comInvoke(wsh, "SendKeys", "\014")
return(invisible(TRUE))
}
}
cls() # test

from http://onertipaday.blogspot.com/2007/05/how-to-clear-screen-in-r.html,
cool!