2010年1月30日 星期六

Hard Drive Info

HDT722516DLA380
160 7200 8 MB Serial-ATA

MAXTOR S TM3320620AS S : 320GB SATA


WD企業級硬碟->WD3202ABYS

2010年1月27日 星期三

Bad Memory Allocation in C++: size is too large

#include
#include
using namespace std;

void test(int *a) {

for(int i =0; i < 10; i++)
std::cout << "i = " << i
<< "\t a[i] = " << a[i]
<< std::endl;

}

int main(int argc, char ** argv) {

//int *a = new int[10];
int *a;

try {
a = new int[3000000000];
}
catch(bad_alloc&)
{
cout << "Error allocating memory." << endl;
}
catch (...) {
cout << "Error ." << endl;
}

for(int i =0; i < 10; i++)
a[i] = i;

(void)test(a);

delete [] a;

return 0;

}

2010年1月26日 星期二

企業級硬碟

WD5002ABYS: 500 GB 3.5吋,SATA,16M,7200轉

WD3202ABYS: 320 GB, 1.2 million hours MTBF, 16 MB Cache, 7200 RPM

省電環保硬碟

WD10EACS: 1.0 TB SATA介面,16MB 的快取記憶體。

WD10EADS: 1 TB, 32 MB Cache, SATA 3 Gb/s

2010年1月12日 星期二

Medibuntu Install

wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list
apt-get --quiet update
apt-get --quiet update
apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring
apt-get --quiet update
apt-get --yes install app-install-data-medibuntu apport-hooks-medibuntu

2010年1月9日 星期六

turetype fonts list

ubuntu fonts

/usr/share/fonts/truetype

update fonts
fc-cache -v -f

list fonts

fc-list |cat
fc-list : family file |grep cw

Fix xelatex error of math symbol

** WARNING ** This .map file looks like a dvips format fontmap file.
** WARNING ** -- Current input buffer is: aealbattar ae_AlBattar "ArabeyesArabicEncoding ReEncodeFont" < ararabeyes.enc < ae_albattar.pfb
** WARNING ** -- Reading fontmap file stopped at: file="pdftex.map", line=6.
[3] [4]
[5] [6] [7] [8] [9]
[10] ) (./rebinning_fore.tex [11]
Chapter 3.


from the link https://bugs.launchpad.net/ubuntu/+source/texlive-bin/+bug/364627


In brief, edit the configuration file: /etc/texmf/dvipdfm/dvipdfmx.cfg
Comment the line "f pdftex.map" by adding a percent symbol at the beginning of the line.
Uncomment the line "f dvipdfm.map" by removing the percent symbol.
Save and run xelatex again.

2010年1月5日 星期二

libpng

http://www.libpng.org/pub/png/libpng.html

LibTIFF

LibTIFF - TIFF Library and Utilities

http://www.remotesensing.org/libtiff/