Sunday, March 1, 2009

An article from Economist about Business in China

http://www.economist.com/business/displaystory.cfm?story_id=13145129

Time to change act

This article is very well written, it reflects the true situation of China, It means that China is still a developing country.

"Much of the remarkable success of Chinese business has been based on low-margin, low-technology activities. Broadly speaking, China is a net exporter of goods with a low technology content and a net importer of more sophisticated wares."

"Granted, China has plenty of important companies which do not need to worry about their business disappearing to other emerging economies. Almost all of these are owned at least in part by the government and benefit from protective barriers in their home market."

"A more durable model for less privileged companies would involve more higher-margin activities, based on innovation and higher quality, with their home-grown brands to the fore. So far, however, Chinese companies have been plagued by an actual or perceived lack of quality. Only a few have built respected brands. "

"With rare exceptions, notably Lenovo, which purchased IBM’s laptop business, and Haier, the maker of cheap, small refrigerators that furnish the rooms of numberless students, Chinese names have failed to make much of a dent. Where they have thrived is either in cost-conscious emerging markets or in cost-sensitive areas of developed markets defined by clear specifications and minimal innovation. The greatest examples of this have been ZTE and Huawei, makers of telecoms equipment."

中国过去几十年的出口导向型经济,生产附加值低,质量不够好的产品维持了30年的成长。外资企业(包括台湾,香港资本)出口占据出口的至少60%以上。中国很大程度上是个加工厂,这样的结构就是环境恶化,人民生活有提高,但是依然不富裕。而且产业很有可能转移。

这样的情况下,唯一的亮点就是华为中兴,这个才是国家发展的希望所在。联想和海尔,前者要好一点。技术创新,提高产品质量才是发展的关键,其实人用不用心,生产的东西相差很大。管理这时候对控制产品质量非常重要,法律规则要坚决实行。

这篇文章基本上反映了中国目前发展中国家的整体形势,自然由于国家大,整体实力还是不错,也有非常大的发展潜力和空间。

Thursday, February 26, 2009

10 Lifestyle Tips for Cancer Prevention (zz)

http://www.webmd.com/cancer/news/20081028/10-lifestyle-tips-for-cancer-prevention
  • Be as lean as possible without becoming underweight.
  • Be physically active for at least 30 minutes every day.
  • Avoid sugary drinks, and limit consumption of high-calorie foods, especially those low in fiber and rich in fat or added sugar.
  • Eat more of a variety of vegetables, fruits, whole grains, and legumes (such as beans).
  • Limit consumption of red meats (including beef, pork, and lamb) and avoid processed meats.
  • If you drink alcohol, limit your daily intake to two drinks for men and one drink for women.
  • Limit consumption of salty foods and food processed with salt (sodium).
  • Don't use supplements to try to protect against cancer.
  • It's best for mothers to exclusively breastfeed their babies for up to six months and then add other liquids and foods.
  • After treatment, cancer survivors should follow the recommendations for cancer prevention.

Thursday, February 19, 2009

latex word counter

In order to count the words you write in your latex file, two steps are needed.

1, install detex by
sudo apt-get install texlive-extra-utils
2, in your latex file directory
detex yourtexfile.tex | wc -w

That is done.

Tuesday, February 3, 2009

乙肝疫苗要普及宣传


首先看看慢性肝炎在世界分布,来自www.gov.org。中国是乙肝多发区,感染的抓紧治疗,没有感染注意赶紧打疫苗。以下引用 http://www.cdc.gov/hepatitis/B/bFAQ.htm#overview

Who should get vaccinated against hepatitis B?Hepatitis B vaccination is recommended for:
  • All infants, starting with the first dose of hepatitis B vaccine at birth
  • All children and adolescents younger than 19 years of age who have not been vaccinated
  • People whose sex partners have hepatitis B
  • Sexually active persons who are not in a long-term, mutually monogamous relationship.
  • Persons seeking evaluation or treatment for a sexually transmitted disease
  • Men who have sexual contact with other men
  • People who share needles, syringes, or other drug-injection equipment
  • People who have close household contact with someone infected with the hepatitis B virus
  • Healthcare and public safety workers at risk for exposure to blood or blood-contaminated body fluids on the job
  • People with end-stage renal disease, including predialysis, hemodialysis, peritoneal dialysis, and home dialysis patients
  • Residents and staff of facilities for developmentally disabled persons
  • Travelers to regions with moderate or high rates of hepatitis B
  • People with chronic liver disease
  • People with HIV infection
  • Anyone who wishes to be protected from hepatitis B virus infection
Is the hepatitis B vaccine recommended before international travel?

The risk for hepatitis B virus infection in international travelers is generally low, although people traveling to certain countries are at risk. Travelers to regions with moderate or high rates of hepatitis B should get the hepatitis B vaccine.

How is the hepatitis B vaccine series given?

The hepatitis B vaccine is usually given as a series of 3 or 4 shots over a 6-month period.

现在各大医院都应该有,价格应该在80-300rmb, 在美国如果有医保,应该都是免费的。通常3次,0,1月后,6月后距离第一次。

Thursday, December 4, 2008

Hook AMPL with NPSOL 5.0

Thank Dave. M. Gray for the help to modify the makefile

1. NPSOL 5.0 needs to be ordered from http://www.sbsi-sol-optimize.com/asp/sol_product_npsol.htm
After you get npUnix.tar.gz, you can extract it.
You got a directory contains GNUmakefile....
In order to compile and install NPSOL, you need install F2C first, and set the environment variable F2C , for example, in my computer, F2C is installed in /usr/
In command line
export F2C=/usr/
gmake
gmake clean
Therefore, NPSOL will be installed, a new directory will be created (npsol/Linux-i686/optimized/lib) the created directory is dependent on your own system.

2. Download npsol (it is an AMPL interface to NPSOL 5.0) from
http://netlib.bell-labs.com/netlib/ampl, it is a file called netlibfiles.tar
extract netlibfiles.tar , you get solvers/
in solvers/ directory, you may have many .gz files
gunzip *.gz
make -f makefile.u (it depends on your system)
Then amplsolver.a is created in this directory

3. Now go to solvers/npsol
copy all NPSOL library files (/npsol/Linux-i686/optimized/lib) to this directory.
make -f makefile.u
Attention, you may read makefile.u carefully, make some necessary changes according to your system.
cp makefile.u makefile
in makefile

"n = npsol.o version.o $S/amplsolver.a libnpsol_f77.a libblas_f77.a libnlssol_f77.a liblssol_f77.a

npsol: $n
$(CC) -o npsol $n -lf2c -lm -ldl" for my system,Linux localhost 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686 GNU/Linux

type make -f makefile
the executable npsol will be created in this directory.

4. Set PATH variables to make the system find this executable
in command line, gedit .bashrc, add npsol path, source .bashrc

5. in AMPL program, just use option solver npsol.

It should work.

Thursday, November 20, 2008

File output and input in Matlab and C

Save matlab workspace variables to a text file
save('filename','variable_name','-ASCII');

Scan this file into a C program
int k1;
FILE *filename;
filename = fopen("filename","r");
for (k1 = 0; k1 < size; k1++)
fscanf(filename, "%f ", &var[k1]);
fclose(filename);

Saturday, November 15, 2008

Weird problems in C debugging

./opt1.sub.h: In function ‘tcf’:
./opt1.sub.h:234: error: stray ‘\357’ in program
./opt1.sub.h:234: error: stray ‘\274’ in program
./opt1.sub.h:234: error: stray ‘\213’ in program
./opt1.sub.h:234: error: expected ‘)’ before ‘zp’

I searched the web, the problem is"
It means you have some goofy characters on that line. They are probably invisible. Try deleting the line entirely and retyping it."----from cprogramming.com