HDT722516DLA380
160 7200 8 MB Serial-ATA
MAXTOR S TM3320620AS S : 320GB SATA
WD企業級硬碟->WD3202ABYS
2010年1月30日 星期六
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;
}
#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日 星期二
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
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
/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.
** 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.
[10]
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.
訂閱:
文章 (Atom)