Friday, February 25, 2011

i686 architecture

i386 was the first x86 32 bit processor. What this means is that it'll run on practically any x86 CPU made within the last 22 years, but seeing that the architecture was designed so long ago, it's reasonable to expect that any operating system compiled for it isn't going to be running at optimal speed on today's latest and greatest processors.

i686
on the other hand is a much more modern architecture. It includes practically every processor that's Pentium II or better. x86_64 is a 64 bit extension to the x86 architecture. x86_64 processors can still run 32 bit operating systems (e.g. i386) if you so choose, but they're also capable of running 64 bit operating systems.

PowerPC (PPC) is the processor type that Macs used to use, but within the last few years Macs have also transitioned over to x86. Nowadays, PowerPC's main use is seen in modern game consoles.


So, to answer your question... if you have a 64 bit processor, you should get either an x86_64 or
i686 optimized distro. If not, you should just get i686 (assuming of course that your computer isn't older than 10 years)

Source: http://www.daniweb.com/forums/thread139589.html

linux extract tar bz2

$ tar -jxvf my_archive.tar.bz2

Source: http://www.linuxforums.org/forum/newbie/20336-extract-tar-bz2-command.html

Saturday, January 1, 2011

Vertical text in the table in Latex

\usepackage{multirow} \usepackage{rotating}
...
\multirow{4}{15mm}{\begin{sideways}\parbox{15mm}{text}\end{sideways}}

OR

\multirow{14}{*}{\rotatebox{90}{\mbox{text}}}
...

source: http://tadek.pietraszek.org/blog/2004/12/01/vertical-text-in-the-table-in-latex/

Friday, October 29, 2010

CUDA Thrust include path

Never put /thrust folder in a typical include location, nvcc doesn't like it, but a good place for it is "anywhere", like /usr/local/cuda/include.

Source: http://code.google.com/p/thrust/wiki/QuickStartGuide

Thursday, August 5, 2010

Latex captions: advanced

A)
You can put different captions in the List of Figures by including an optional argument of the \caption command:
\begin{figure}
...
... |<----- optional argument of \caption ----->|
\caption[This is what shows up in the List of Figures.]{Here is the text
that appears under the Figure itself. This text is often very long and
complicated, and is only useful when you've got the Figure sitting right
there in front of you. It won't mean much to anyone just reading the
List of Figures.}
\label{example-fig}
\end{figure}

B)
So to get fragile stuff like equation references in the caption, try this:
\begin{figure}
...
\caption{The graph of the function given in (\protect \ref{some-eqn}).}
\end{figure}

Notice that to get parentheses around the number, like "(7)", the
\protect statement has to go inside the
().

Source: http://www.iam.ubc.ca/old_pages/newbury/tex/captions.html#different

Linux: change encoding simply

QUICK: 
 
$ recode UTF-8..latin1 foo
NOTE: The file foo will be overwritten by the command
 
Option 2:
 
iconv --from-code=ISO-8859-1 --to-code=UTF-8 ./oldfile.htm > ./newfile.html

MULTI-FILE:

find . -name "*.txt" -exec iconv -f ISO-8859-1 -t UTF-8 {} -o {}.utf8 \;
 

Linux Locale, Language, Encoding

Check to see what locales are currently installed on your system
$ locale -a
More interesting info, although containing some useless proprietary specifics: http://docs.hp.com/en/5185-4400/