•  

    November 2009
    M T W T F S S
    « Jul    
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    30  

Wireless Internet Connection on Sony Laptop VGN-NR160E

With Debian Lenny AMD64 on my Sony VGN-NR160E laptop, the wireless Internet connection is not working from out of the box installation.

Fortunately, I found solutions from the following Debian user forum. I tried a solution on that forum and it worked. So, I’d like to share this experience.

I have a dual boot, Windows Vista and Linux Debian Lenny. I do not have a wired Internet connection, and my wireless connection does not work. So, I have to reboot into my Windows Vista and download the following five Debian packages from Debian repository.

  • wireless-tools
  • wpasupplicant
  • firmware-iwlwifi
  • network-manager
  • network-manager-gnome

I saved these packages in my thumb drive and reboot into Debian Lenny.
Then, I become root and install the packages above with the following command.
>dpkg -i wireless-tools.deb wpasupplicant.deb firmware-iwlwifi.deb network-manager.deb network-manager-gnome.deb

After the installation, I restart the machine again and reboot into Debian Lenny.
Now, I clicked on the network manager on the top right corner of the screen. Here it was, I found a list of available wireless Internet connection.

So, good luck. For more information, see the Debian user forum link above.

Install Opera Web Browser 9.64 on Debian Lenny AMD64 Using Synaptic Package Manager

As far as I know, there are three ways to install Opera 9.64 64-bit on Debian Lenny AMD64.

  1. Using .deb package downloaded from http://www.opera.com
  2. Using .tar.gz package from http://www.opera.com
  3. Using Synaptic Package Manager

I have tried the (2) approach and encountered some dependency problems such as missing libraries. The (1) approach should be installed without any problem with the following command.

> dpkg -i opera*.deb

In this blog, I describe the (3) approach. Since the opera web browser is not included in the default packages, to begin the installation process I need to add an additional repository. According to this link, I, as a root, edit the sources.list file in the /etc/apt directory by adding the following line.

deb http://deb.opera.com/opera lenny non-free

Then, I open the Synaptic Package Manager, click on Reload to load the opera package. Next, I use the search function to search for the opera package. If there is nothing wrong, there is one opera package. So, check the box and click install. That’s it.

Break or wrap a continuous text in Latex

The situation is that I have a long continuous text such as “adfadfadfasldfkasldfadfklasjhdfalkdfasldfahdlfad”, and it won’t break or wrap at the end of the line. To fix the problem, we need to define a new wrapletters command as follows.

\newcommand*\wrapletters[1]{\wr@pletters#1\@nil}
\def\wr@pletters#1#2\@nil{#1\allowbreak\if&#2&\else\wr@pletters#2\@nil\fi}

Then, to wrap a long continuous text, do the following.
\wrapletters{adfadfadfasldfkasldfadfklasjhdfalkdfasldfahdlfad}

This command can be applied to writing DNAs or Protein sequences in Latex.

Credit to the original post at http://www.latex-community.org/forum/viewtopic.php?f=44&t=3798.

Break or wrap a long word containing underscores in Latex

My situation is that I have many long words that containing underscores such as “how\_are\_you\_doing_?”, and they don’t break at the end of a line. Therefore, a line that contains these words sometimes is stretched over the page margin.

To fix this problem, we need to redefine the underscore command. Here is how I do it. I put the following Latex code after the \usepackage{} at the beginning of a Latex document.

%Redefine the underscore command
\let\underscore\_
\newcommand{\myunderscore}{\renewcommand{\_}{\underscore\hspace{0pt}}}

%Issue the changed underscore command to the whole document.
\myunderscore

Credit to the original post at http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2007-03/msg00647.html

IEEEtran class

Just a short note for people who are writing a paper using Latex template from IEEE. If you have a problem formatting your paper, you may be able to find the answers from this great web site: http://www.michaelshell.org/tex/ieeetran/

For example, I have a problem that the caption of a figure is not centered, although the figure itself is centered. I was using exactly the latex code from the IEEE template. If I added \usepackage{caption}, the figure’s caption was then centered but there was an extra word “figure” on the next line after the figure. Besides, the caption of other entities such as a table was changed.

The solution is to put “\centerfigcaptionstrue” before the \caption command as illustrated by an example below. Note that I am using IEEEtran.cls version 1.6. 

\begin{figure}[ht]
\centering
\includegraphics[width=3.5in]{MyFigureFileName}
\centerfigcaptionstrue
\caption{The is the caption of MyFigureFileName.}
\label{fig:MyFigureFileNameLabel}
\end{figure}

Well, just in case if you are looking for a journal other than IEEE, here is a good link : http://www.doaj.org/doaj?func=subject&cpid=114

How to disable RAID-0 on Dell XPS Studio 435MT Desktop Computer with Windows Vista

In this blog, I’d like to share my experience on how to disable/remove RAID-0 on Dell XPS Studio 435MT desktop computer with Windows Vista installed. The computer has dual 300 GB hard drives with RAID-0. For RAID-0, although there are two hard drives, 300 GB each, only one drive will be shown on My Computer. Therefore, in this case, we will see only a C: drive with 600 GB. However, I want to have two independent drives with 300 GB each. To achieve it, I need to disable/remove RAID-0 setting.

*************Be aware that all data will be lost including the operating system after removing RAID-0 setting.****************

There are two main steps.

  • Reset disks to Non-RAID via RAID Bios.
  • Change SATA mode from RAID to ATA through the normal Bios.

Reset disks to Non-RAID via RAID Bios

  1. Restart the system.
  2. After the DELL logo, I pressed <Ctrl><i> to enter the RAID Bios.
  3. In the RAID Bios, there are five options to choose: (i) Create RAID Volume, (ii) Delete RAID Volume, (iii) Reset disks to Non-RAID, (iv) ….don’t remember… and (v) Exit.
  4. Since I wanted to reset disks to Non-RAID, instead of deleting RAID Volume, I selected the 3rd option.
  5. In the “Reset disks to Non-RAID”, I saw two drives. I selected each drive using a space bar,  reset it to Non-RAID, and then press <Enter>.
  6. After resetting both drives to Non-RAID, I pressed <ESC> to exit.

Turn off RAID mode in SATA through the normal Bios.

  1. Restart the system.
  2. I pressed <F2> to enter the Bios setup after the DELL log shew up.
  3. I selected the ”Advanced chipset features” in the Bios setup.
  4. Then, in the SATA option, I changed mode of the SATA from [RAID] to [ATA].
  5. Then, I pressed <F10> to save, and then exited the Bios.

After restarting the system again, I saw two independent drives with 300 GB each. So, the mission accomplished.

Text preprocessing: Wrap around a punctuation with spaces using Java

Input text = “Hello-my $world?”

Output text = “Hello – my $ world ? “


public String wrapAroundPunctuation(String pText){

String replacement="";
//For example, '*' will be replaced by " * "

Pattern p = Pattern.compile("\\p{Punct}");
Matcher m = p.matcher(pText);
StringBuffer sb = new StringBuffer();

while (m.find()) {

//The $ causes Illegal Group Exception.

if(m.group().equals("$")){
replacement="\\$";
}
else{
replacement=m.group();
}

m.appendReplacement(sb, " " + replacement + " ");
}
m.appendTail(sb);

return sb.toString();

}

Resources for Latex

Resources for literature mining research in biomedical domain

The goal of this blog is to collect all useful resources, ranging from software tools, datasets, interesting literature, etc., for literature mining research in biomedical domain. Its content will regularly be updated. Currently, I am focusing on automatic pattern generation, coreference resolution and discouse parsing.

Text corpus

Tools

Others

Conference schedule

Convert Excel Chart to EPS/PS File for Latex

Requirement:

- Gimp-2.4.5

Instructions

  1. Create an Excel chart in MS Office.
  2. Right-click on the Excel chart, and click Copy.
  3. From Gimp-2.4.5, File–>New
  4. Select 640*480 from Template Size, and then click OK
  5. A new blank template pops up.
  6. On the new blank template, Edit–>Paste as –>New Image
  7. Then, a new image containing the Excel chart is opened.
  8. On the new image Gimp window, Image–>Mode–>Grayscale to change color chart to black and white chart.
  9. Still on the new image Gimp window, File–>Save as, and select Postscript Document as file type.

Then, we can embed the postscript file into Latex document.

Note: If you have time and like to learn a new thing, I would suggest using GLE for creating charts. You can download the GLE tool at http://glx.sourceforge.net/.

 

Update: July 14, 2008
To install GLE under linux (Debian Lenny),
- Unzip the downloaded GLE package.
- Install g++ package (C++ compiler) using Synaptic package manager.
- Configure the installation
>./configure –prefix=/opt/gle
- Compile package
>make
- Install package
>make install