Donghui Zhang's Howto Page


I. Sysadmin Howto

How to mount CD image on Solaris?

1. lofiadm -a /home/dbdata/donghui/movie/cd.iso to associate it with a block device, whose name will be given on the screen. Say /dev/lofi/1
2. mount -F hsfs -o ro /dev/lofi/1 /mnt to mount it
3. umount /mnt
4. lofiadm -d /dev/lofi/1 to unassociate it.

How to hack Linux?

1. ftp://ftp.ntua.gr/pub/linux/slackware
2. rawrite bare.i a: # this is boot disk used to boot and load a root disk
3. rawrite color.gz a: # this is the root disk
4. boot the machine, at boot prompt, type ENTER
5. change root password (important: edit shadow file, not passwd file!!!)
6. sync

Howto debug C++ under Cygwin

Use "insight". To set command-line parameter: File -> Target Settings -> in "Target", select "Exec" -> in "Arguments", set parameters.

Howto start xwin in cygwin under Windows Vista

Go to http://cygwin.com/snapshots/ and grab a recent cygwin1.dll to replace the one in C:\cygwin\bin. If still no working, run /bin/rebaseall in ash shell. Documents: /usr/share/doc/Cygwin rebase-xxxxx.README. start ash in a command shell: /cygwin/bin/ash. Note: ash is in "shell" library, rebase is in "Base" library.

Other Sysadmin howto

- see processes on Solaris: prstat
- grab screen: snapshot
- mount cdrom: mount -F hsfs -o ro /dev/dsk/c0t6d0s0 /cdrom/cdrom0
- search a certain cite: in google: "technical report site:cs.duke.edu"

Back to top


II. CCIS Howto

How to check the status of a room?

See here. Note that the room number in the URL can be changed to other rooms like 164, 366.

Back to top


III. Research Howto

How to perform database research?

Get db_research.pdf and reference.tgz.

How to download research papers that need password? (NEU only)

- Login to http://myneu.neu.edu
- Click the "Library" tab.
- In the "Research" panel, click "Research Databases".

How to export figure from XFig to Powerpoint?

Export to CGM file, then insert into PowerPoint

How to strikethrough or underline text in Latex?

Use package ulem. Then use \sout{yourtext} to strikethrough text, and use \uline{yourtext} to underline text. However, by default this means that {\em ...} does not work anymore. To make it work, immediately after \begin{document}, add \normalem.
An alternative way of striking through is: use package "soul". The command for the strikethrough line is "\st".
Bad alternative:

How to override certain rules in Latex?

- To break a line after or before a word, without inserting a hyphen, use the \linebreak[4] command.
- To keep a part of text together (such as a phone number), use the \mbox{...} command.

How to let WinEdt dvi2pdf use letter paper?

In WinEdt\Bin\TeX\Dvipdfm.bat, add an option "-p letter".

How to create multiple Excel charts with similar properties?

Create one. Right click on it, select "Chart Type". Select "Custom Types", then "User Defined". Now there is an "Add" button to add the chart type to the template library.

Back to top


IV. Java Howto

How to specify CLASSPATH in Cygwin?

In Cygwin, Java is a Windows program, and doesn't recognize Unix-style CLASSPATH. To make Java in Cygwin understand your CLASSPATH environment variable, you have two choices: (a) Specify CLASSPATH in Windows style such as "C:\cygwin\home\yourname\packages;." or (b) Specify CLASSPATH in the usual Unix style such as "/cygdrive/c/home/yourname/packages:.", but in execution, use cygpath to dynamically convert to Windows style: javac -classpath `cygpath -wp $CLASSPATH` foo.java

Back to top


V. Other Howto

Back to top