Monday, December 15, 2008

rdesktop on ubuntu (customize window size)

#man rdesktop

And for example,

#rdesktop -g 1152x1024 host

Monday, October 6, 2008

Workaround for adjusing brightness in Ubuntu on my Dell

Here is a workaround for the problem with Ubuntu installed on some Dell laptop.

Disable beeps in Ubuntu


1. remove the drivers

#modprobe -r pcspkr


2. Blacklist the module in '/etc/modprobe.d/backlist' by appending above line

blacklist pcspkr

wicd - wireless mgt for linux

It is hard to make the wireless work under ubuntu/xubuntu, at least to me.
But wicd is a tool worthing try.


Friday, October 3, 2008

vim tips ctrp+p/n

Insert mode completion: Ctrl + N
Ctrl + P to the original.

create a bootable usb disk

1) Run diskpart from command prompt running as administrator (right click the command prompt icon and choose "Run As Administrator")
2) Type the command: list disk to see the available disks and note the one that represents your USB thumb drive
3) Select the disk: select disk # where # is the disk you determined in the above step
4) Now that the proper disk is selected, prepare it with the clean command by typing clean
5) Now create a partition on the clean drive by typing: create partition primary
6) Select the new partition by typing: select partition 1
7) Set the partition as active by typing: active
8) Format the partition as FAT32 by typing: format fs=fat32
9) Assign the new partition by typing: assign
10) Type exit to quit diskpart

And some files which are needed for boot the computer can be copied to the disk.

Monday, September 29, 2008

Re: Tools to be considered

Tools to be considered

1. 7-zip
2. WinGrep
6. Firebug
Essential FireFox add-on for debugging JavaScript, and more. The ultimate developer toolbar!

Wednesday, September 24, 2008

handy tools and websites

1. convert pdf to ... online

2. Another pdf reader
Sumatrapdf reader.

3. HTML tidy
To make html file tidy, just what the name imply.

Tuesday, September 16, 2008

LaTeX -- pdfcrop

TeX/LateX and related tips
1. Using pdfcrop to crop pdf so that some figures of pdf format can be
included with appropriate margins

pdfcrop --margins 10 input.pdf output.pdf
pdfcrop --margins '5 10 5 20' --clip input.pdf output.pd

--TeX file--

Some vim tips

1, MAP, eg.

map <F9> :w <ENTER> :!latex % <ENTER>

2. ^ and $

^ the beginning of line
for example:
replace the begin of line to something: % s/./something/
or % s/^/something/
$ the end of line

Saturday, August 30, 2008

SVN: just look an old version

svn cat --revision 2 rules.txt > rules.txt.v2

Rread a file in SAS and write it to another file

data _NULL_;
file texfile mod;
infile 'tmp.tex';
input a;
put _INFILE_;

Monday, July 7, 2008

Fwd: another vi tips
tolds me how to set current working path to where the file exists.

Wednesday, July 2, 2008

vim tips

#               search for the word under the cursor (back)
*               search for the word under the cursor (fwd)

Friday, June 20, 2008

Use SAS ods data set output

Example is below:

ods trace on;
ods output summary=summary;
proc means data=hpd print N mean std min max median range sum;

ods trace off;
ods output close;

Tuesday, June 17, 2008

Delete external file

%macro macdelfile(filename=);
data _NULL_;
fname = "tobedel";
rc = filename(fname, "&filename");
if (rc eq 0) and (fexist(fname)) then rc=fdelete(fname);
rc = filename(fname, '');

Monday, June 2, 2008

Saturday, April 19, 2008

On website, the citation to a book can be easily gotten by a ISBN.

Thursday, April 17, 2008

Using SAS Statements to Change the Current Folder

[Copied from SAS document]

Using SAS Statements to Change the Current Folder

You can change the current drive and folder by submitting the change directory (CD or CHDIR) command with the X statement in SAS. SAS intercepts the change directory command and then changes drive commands and changes its current folder.

For example, the following statements change the current folder for your SAS session to the MYDATA folder and G:\SALES\JUNE folder, respectively:

x 'cd \mydata';
x 'cd g:\sales\june';

To change the current drive, you can submit a change drive command (the drive letter followed by a colon) such as the following:

x 'a:';

Tuesday, April 15, 2008


"RWinEdt is a package that implements a quite ugly interface from WinEdt to R. Note that the License GPL is specific to the R package RWinEdt, not to the editor WinEdt itself (which is not shipped with the package)."

Monday, April 14, 2008

SAS dataset options

It has been told that some SAS PROC PRINT options--for example, (obs=10 firstobs=5)--can be used, say, in this article. However, I checked for a while in the document of proc print, I did not find any stuff about this kind of options. But it is sas datasets options, just like below example:

data a (keep=b); a=4; b=3; run;