This page mainly comes up from my research. If you happen to find some information useful for you, I'll be very happy about it.
     
  •  How to link C codes and C++ codes together in Unix?


    In the old version C/C++ compile, CC, you can find the corresponding switch option to link them together. If the compiler is gcc/g++, the way I did was:
    1. Include all your C++ codes in
            #ifndef _cplusplus
            #    extern "C"
            #    {
            #endif
            // your C++ codes here
            #ifndef _cplusplus
            #    }
            #endif
    2.  Use "gcc ... -lstdc++" to link the objective files together into an executable file.
     

  • How can I log to another machine and lauch Netscape? (The error msg is "Can't open display"


    On the machine that you are logging into you must type in :
    xhost machinename  /rlogin machinemane
      "machinename" being the machine that you are going to remotely logging into. This case it would be one of the machines in the Wilkinson Lab machines.

    Then on the machine that you are remotely logged into type in:
    "setenv DISPLAY machinename:0"
    This time the "machinename" is the machine that you are physically at.
     

  • Frequenctly used compression/decompression command in Unix.


    .tar:                                                tar xvf file.tar
    .tar.Z, .tar-z, .tarz :                     zcat file.tar.Z | tar xvf -
    .tar.gz, .tgz, .tar-gz, .tar.z:         gzip -d file.tar.gz | tar xvf -

    Note tar dvfz file.tar.gz (in Linux)

    Creating a compressed archive

    .tar.gz :         tar -cvf file.tar directory | gzip file.tar (to generate .tar.gz file)


    Note: tar cvfz file.tar.gz directory (in Linux)

    To archive and compress a directory and all its contents (including any subdirectories), type the following command at your Unix system prompt:

    tar -cf - DIRNAME | compress DIRNAME.tar.Z

    where "DIRNAME" is the name of the directory you wish to compress. This will create a compressed archive file called "DIRNAME.tar.Z". This archive file contains all of the files in the original directory, but will be up to 50% smaller. You can now remove the original directory and all its contents with

    /bin/rm -fr DIRNAME

    To restore a compressed archive

    To uncompress and unarchive a file "DIRNAME.tar.Z", type the following command at your Unix system prompt:

    uncompress -c DIRNAME.tar.Z | tar -xf -

    (Note the trailing "-" at the end of the command.)  The directory DIRNAME will be created and restored to its original state.  You can now remove the compressed archive file with

    /bin/rm -f DIRNAME.tar.Z

    .gz
    gzip -d filename
     

  • How to read Chinese in Unix


    1) download chinese fonts, and fonts.alias file from
    http://sgi62.wwb.noaa.gov:8080/reanl2/wd20yz/xfonts/gb16st.pcf
    http://sgi62.wwb.noaa.gov:8080/reanl2/wd20yz/xfonts/hku16et.pcf.Z
    http://sgi62.wwb.noaa.gov:8080/reanl2/wd20yz/xfonts/fonts.alias

    2) copy above file to ./xfonts

    3) "chmod o+rx" to xfonts, gb16st.pcf, hku16etpcf.Z, fonts.alias

    4) "xset fp+ ~/xfonts" or copy this to your cshrc.solaris or cshrc.sun4 (depending on your system) file

    5) In Netscape, set fonts to "chinese gb" or "chinese big5"

    • Some Useful programs' paths in Winkson Lab
    ginp: /means/beta/ginp/bin/ginp
     
  • How to convert PS file to PDF file with compatible fonts and symbols?

    1) In Word, when printing word file as file (ps), a) under "Graphic", select "TrueType font" as "download as softfont"; b) and under "PostScript Options", select "TrueType Font Download Option" as "Native TrueType".
    2) Use Adboe Distrillier or its equilvalent script in Linux/Unix, "ps2pdf".
         You may want to specify options such as embedding fonts, so all users can view your file:
          ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true file.ps file.pdf
    For more details, check here and here.

  • How to comment a paragraph in Latex without using % for each line?

  • \usepackage{verbatim}
    \begin{comment}
    ...
    \end{comment}

    Last Updated: March 05, 2004