星期一, 十月 31, 2005
Transcript
Reviewing my transcript, I found a interesting phenomenon: all the experiment courses and most of the philosophy courses are A while the paper-based courses are about 75-80......Actually, I prefer doing experiment to listening lectures and taking tests. Therefore, doing research will be a fitable future to persue. :)
星期六, 十月 29, 2005
补昨天的作业ShellExecute
A small exe when the disk is inserted. It is the main menu. EXEs and chm and http may be opened by clicking button. I like this ShellExecute~
在mfc里打开网址和应用程序的东东,不错~
ShellExecute(m_hWnd,NULL, "http://www.qitiandasheng.com", NULL,NULL,SW_SHOWMAXIMIZED);
ShellExecute(m_hWnd,"open","~tmp0.1st.exe","","", SW_SHOW );//~tmp0.1st.exe is an exe in your USB disk. Just copy it to use^^. I guess so, and I succeed!
In addition, I learned to make autorun.inf. It is quite easy to make a fast one.
在mfc里打开网址和应用程序的东东,不错~
ShellExecute(m_hWnd,NULL, "http://www.qitiandasheng.com", NULL,NULL,SW_SHOWMAXIMIZED);
ShellExecute(m_hWnd,"open","~tmp0.1st.exe","","", SW_SHOW );//~tmp0.1st.exe is an exe in your USB disk. Just copy it to use^^. I guess so, and I succeed!
In addition, I learned to make autorun.inf. It is quite easy to make a fast one.
Solved the Redifinition problem !
general c/c++ link Result
Shared DLL DebugMultithread DLL - OK
Not MFC DebugMultithread DLL - error LNK2001
Shared DLL Singlethread* - OK
Shared DLL DebugMultithread - fatal error C1189
Shared DLL Singlethread* - fatal error C1189
Shared DLL Multithread DLL reset
Shared DLL Multithread DLL - warning LNK4098
Shared DLL Multithread DLL reset warning LNK4098 这时候仍然没有默认lib
Shared DLL DebugMultithread DLL reset OK
原先是DiskSerial.h的Redifinition。因为Setting的问题导致了调试一直不成功。以下是成功后设置Setting的过程;从中很难看出到底是哪个设置影响了Redifinition的解决。
There was a "error C2011: '_DISK_SERIAL' : 'struct' type redefinition;". Finally, I found it is because wrong Setting. But look at the table above, I don't know which step really infect the result.
My Post in CSDN
在CSDN上发的原帖
http://community.csdn.net/Expert/TopicView3.asp?id=4359135
在blog和csdn上搜到"DebugMultithread"in C/C++ and "DiskSerial.lib"in link的方案,但是不是每次都起作用。
In someone's blogs, they said "DebugMultithread"in C/C++ and "DiskSerial.lib"in link, but it works in the first time. When I try again with the copy of the original .dsw, it doesn't work as well as the first time. :(
有空看看setting的说明,在google和csdn都没有搜到。谁看到哪里有的请顺便告诉我吧,最近真的好忙,没法去图书馆了:(
I hope to see the instruction about "Setting", I can't find in Google and CSDN. Anyone can tell me? I'm really really too busy these days to look for the books in library:(
P.S. Thank XCM to spend time giving suggestion.感谢长明给的建议。
Shared DLL DebugMultithread DLL - OK
Not MFC DebugMultithread DLL - error LNK2001
Shared DLL Singlethread* - OK
Shared DLL DebugMultithread - fatal error C1189
Shared DLL Singlethread* - fatal error C1189
Shared DLL Multithread DLL reset
Shared DLL Multithread DLL - warning LNK4098
Shared DLL Multithread DLL reset warning LNK4098 这时候仍然没有默认lib
Shared DLL DebugMultithread DLL reset OK
原先是DiskSerial.h的Redifinition。因为Setting的问题导致了调试一直不成功。以下是成功后设置Setting的过程;从中很难看出到底是哪个设置影响了Redifinition的解决。
There was a "error C2011: '_DISK_SERIAL' : 'struct' type redefinition;". Finally, I found it is because wrong Setting. But look at the table above, I don't know which step really infect the result.
My Post in CSDN
在CSDN上发的原帖
http://community.csdn.net/Expert/TopicView3.asp?id=4359135
在blog和csdn上搜到"DebugMultithread"in C/C++ and "DiskSerial.lib"in link的方案,但是不是每次都起作用。
In someone's blogs, they said "DebugMultithread"in C/C++ and "DiskSerial.lib"in link, but it works in the first time. When I try again with the copy of the original .dsw, it doesn't work as well as the first time. :(
有空看看setting的说明,在google和csdn都没有搜到。谁看到哪里有的请顺便告诉我吧,最近真的好忙,没法去图书馆了:(
I hope to see the instruction about "Setting", I can't find in Google and CSDN. Anyone can tell me? I'm really really too busy these days to look for the books in library:(
P.S. Thank XCM to spend time giving suggestion.感谢长明给的建议。
星期二, 十月 25, 2005
On Oct. 25, some tips sharing
If in VC the ERROR:
fatal error C1083: Cannot open precompiled header file: 'Debug/abc.pch': No such file or directory(abc is the name of your project), you can easily just solve it by Project->Setting->C/C++->Category(Choose Precompiled Headers)->Choose Create PreCompiled Headers (the 3nd choice) and fill in "stdafx.h" (no need to file in the quote).
Read file by istream:
What we often do is:
ifstream in;
in.open("dictory");
in>>abc;
However, we will not know when the open operation fails.
Therefore, the Code is changed like this:
ifstream in("dictory/file.dat");
if(!in) return ERROR;
in>>abc;
We can also use :
ifstream in("dictory/file.dat");
if(!in.is_open()) return ERROR;
in>>abc;
However, ifstream will automatically create a file.dat thus the two methods above cannot work well when there is no such a file. We can solve it by add ios::nocreate like this:
ifstream in("dictory/file.dat",ios::nocreate);
if(!in.is_open()) return ERROR;
in>>abc;
You see, that is part of what I learnt yesterday.
fatal error C1083: Cannot open precompiled header file: 'Debug/abc.pch': No such file or directory(abc is the name of your project), you can easily just solve it by Project->Setting->C/C++->Category(Choose Precompiled Headers)->Choose Create PreCompiled Headers (the 3nd choice) and fill in "stdafx.h" (no need to file in the quote).
Read file by istream:
What we often do is:
ifstream in;
in.open("dictory");
in>>abc;
However, we will not know when the open operation fails.
Therefore, the Code is changed like this:
ifstream in("dictory/file.dat");
if(!in) return ERROR;
in>>abc;
We can also use :
ifstream in("dictory/file.dat");
if(!in.is_open()) return ERROR;
in>>abc;
However, ifstream will automatically create a file.dat thus the two methods above cannot work well when there is no such a file. We can solve it by add ios::nocreate like this:
ifstream in("dictory/file.dat",ios::nocreate);
if(!in.is_open()) return ERROR;
in>>abc;
You see, that is part of what I learnt yesterday.
星期一, 十月 24, 2005
The second day
Today I finished _beginthreadex and my cryptoCS. Quite nice~~~
_beginthreadex is changed from CreateThread. But CreateThread has to be specified the pointer to thread ID when in Windows98. It is better to use _beginthreadex or _beginthread. The former is more similar to CreateThread in parameters, in which I only change the type HANDLE into unsigned and change the returned value's type.
cryptoCS actually includes 3 functions. cryptoCS(CString a, CString b) cryptolize a into b, in which the char that larger than 'F' will be translated into hexademics.
In cryptoCS, it only transfer a into char* type, and call cryptoStr(const char* as, char* bs) to cryptolize the strings and then transfer bs into CString type to b.
In cryptoStr, it read the char one by one, judge whether it is larger than 'F' and call int2Hex(int, char*) to transfer the char. In addition, if the char is '-', just skip it.
P.S. I like to pack code in functions, however, the leading Doctor said calling function will consume the system source so that we should reduce functions. Different from Software Engineering, kernal code programming seems effection-oriented instead of object-oriented.
_beginthreadex is changed from CreateThread. But CreateThread has to be specified the pointer to thread ID when in Windows98. It is better to use _beginthreadex or _beginthread. The former is more similar to CreateThread in parameters, in which I only change the type HANDLE into unsigned and change the returned value's type.
cryptoCS actually includes 3 functions. cryptoCS(CString a, CString b) cryptolize a into b, in which the char that larger than 'F' will be translated into hexademics.
In cryptoCS, it only transfer a into char* type, and call cryptoStr(const char* as, char* bs) to cryptolize the strings and then transfer bs into CString type to b.
In cryptoStr, it read the char one by one, judge whether it is larger than 'F' and call int2Hex(int, char*) to transfer the char. In addition, if the char is '-', just skip it.
P.S. I like to pack code in functions, however, the leading Doctor said calling function will consume the system source so that we should reduce functions. Different from Software Engineering, kernal code programming seems effection-oriented instead of object-oriented.
星期五, 十月 21, 2005
"1Kg more" commonweal travel
-----Translated by imtoffee from the "What's 1Kg more" page in 1kg.cn
什么是“多背一公斤”
多背一公斤是民间发起的公益旅游活动,它倡导旅游者在出行前准备少量书籍和文具,带给沿途的贫困学校和孩子,并强调通过旅游者与孩子们面对面的交流,传播知识和能力,开阔孩子们的视野,激发孩子们的信心和想象力,最后,通过1kg.cn网站将活动的信息和经验分享出来,让学校和孩子得到更多的关注和帮助,同时让更多的旅游者受益。
"1Kg more" commonweal travel is a commonweal travel invoked among common people, which sparkplugs people to prepare a few books or stationaries for the poor schools and children one the way, and focuses on the face-to-face communivation between travelers and children to spread knowledge and ability, to broadern the children's view, to inspire confidence and imagination of the children and finally to share the information and experience through 1kg.com to concerntrate more attention and help, and in the mean time, benefit more travelers.
概括来说,多背一公斤活动由三个简单的步骤组成:
出行时多背一公斤,把文具或书籍带给沿途的贫困学校或孩子
旅途中与孩子们交流,传递知识和能力
归来后通过1kg.cn网站进行反馈与分享,让更多的朋友参与
To sum up, "1Kg more" includes three simple steps:
Take 1Kg more when going out, taking books or stationeries to the schools and chilren on the way.
Talk to the children during the travel, spreading knowledge and ability.
Feedback and share information through 1kg.com after coming back to help more friends join in.
多背一公斤自04年4月提出,1kg.cn网站于8月上线,第一个活动于04年9月在成都进行。一年来,多背一公斤共倡议了超过20个有组织的活动,参加人数超过200人,活动区域遍及四川、广西、云南、贵州、湖南、河北、山西等省份,并获得广泛的媒体报道。
"1Kg more" is brought forward in Apr. 2004. The website 1kg.cn is online in August. The first activity was held in Chengdu in September. During one year, "1Kg more" sponsored more than 20 organized activities, the number of people attended was more than 200, and the area they went to speaded all over Sichuang, Guangxi, Yunnan, Guizhou, Hunan, Hebei, Shanxi and was extensively reported.
给旅游者的建议
1、旅游为主,公益其次。不要喧宾夺主。多背一公斤是旅途中的举手之劳,能做固然有收获,不做亦无伤大雅。不必将公益作为旅游的目的,这样反而会产生不切实际的期望。
2、交流为主,物品其次。不要太看重背过去的一公斤。相比于少量的物品,面对面深入平等的交流更能对孩子的成长产生积极的影响。
3、快乐旅行,保持微笑。我们往往会因为孩子们艰苦的生活环境而唏嘘,但唏嘘无法改变现实,相反,微笑会更容易接近和理解孩子们。请记住,不管贫困或富有,每个孩子的童年都是快乐的。公益旅游应该是快乐的,助学不一定非要苦大仇深。
Tips for travelers
1. Give priority to traveling, commonwell is in the second place. Don't make the sauce better than the fish. Taking 1kg more is just to lift a finger in traveling. It is indeed that we can gain a lot if we do it, but it is Okey if we fail. No need to look commonwell as the goal of the travel, or else it is easy to bring unpractical expectation.
2.Give priority to communication, items are in the second place. Do not value the 1Kg too much. Compared to the few things, face-to-face and equal communication will bring more positive influence to the children.
3.Happy traveling, keeping smile. We always sigh to the hard living environment of the children, but sighs cannot change the reality. On the contrary, smile makes us easier and closer to the children. Please remember, being poor or rich, each child has a happy childhood. Commonwell Travel should be happy, and help is no need to be suffering.
更多详情,请详细浏览我们的网站,或通过电子邮件与我们联系。
More details, please browse our website, or contact us via email.
http://www.1kg.cn
-------------------------------------------------------------
Thanks for 3M(MixMaxMin) for changing it to Korean.
<1kg만 더>란
<1kg만 더>란 중국민간에서 발기된 공익여행활동이나 여행자더러 여행전에 약간의 서적과 문구를 배낭에 넣어 여행로정에서 빈곤학교와 학생을 돕는것이다.여행자와 연로 어린이들과의 교류를 강조하는것으로서 지식과 능력의 전파하고 어린이들의 시야를 넓히며 그들의 자신감과 상상력을 격려하느것을 주요로 한다.끝에 1kg.cn이란 웹사이트에서 활동중 얻은 정보와 경험의 내놓음과 더불어 가난지구학교와 학생에게 더욱많은 관심을 기울게 사회를 이끌며 여행자로 하여금 더 많은 재부를 쌓게 한다.
쉽게 말해서,<1kg만 더>란 활동은 아래 3조목으로 구성된다.
출행시 1kg만 더 준비하되 이만큼의 서적과 문구는 연로 가난한 학교와 학생에게 나뉜다
여정에서 얘들과 얘기하며 지식과 능력을 전파한다.
돌아 온뒤 1kg.cn라는 웹사이트에서 정보를 나누고 더 많은 친구들이 참여하게 한다.
<1kg만 더>는 04년 4월 제안하여 그해 8월 1kg.cn를 내놓게 되였고 04년9월 중국 청두
(成都)에서 첫 활동이 펼쳐졌다.1년동안 스무여차례넘는 활동을 조직실시하여 앞뒤 200여명이 참가해 왔고,이 특수한 여행은 四川,廣西,雲南,貴州,湖南,河北,山西등 중국 각지로 광범위 넓혀 졌을 뿐만아니라 신문등 미디어에 여러차례 보도되여 왔다.
여행자에 대한 건의:
1.공익은 둘째치고 여행이 주요목적. 1kg이란 손쉬운 일로서 할수 있는만큼 수확을 거두고 할수 없더라도 별스럽지 않다.공익활동을 주취로 하면 도리여 실정에 맞춰지지 않는것이다.
2.교류가 주요,물품이 차요.1kg이란 무게의 물품보다도 얘들과의 담화로 그들에게 적극적인 영향을 하는것이다.
3.즐거운 여행,보람찬 미소.우리는 늘상 애들의 가난함에 동정심을 붇지만 단 동정심으로 현실정황은 개변되지 않으나 미소가 도리여 쉽게 애들과 친구사귀게 한다.
때문에 가난하건 부족하건 어린이들의 동년은 즐거운 것임을 기억하기 바란다.
더 상세한 내용은 아래 사이트로 로그인 하시거나 E-mail로 연락하여주길 바란다.
什么是“多背一公斤”
多背一公斤是民间发起的公益旅游活动,它倡导旅游者在出行前准备少量书籍和文具,带给沿途的贫困学校和孩子,并强调通过旅游者与孩子们面对面的交流,传播知识和能力,开阔孩子们的视野,激发孩子们的信心和想象力,最后,通过1kg.cn网站将活动的信息和经验分享出来,让学校和孩子得到更多的关注和帮助,同时让更多的旅游者受益。
"1Kg more" commonweal travel is a commonweal travel invoked among common people, which sparkplugs people to prepare a few books or stationaries for the poor schools and children one the way, and focuses on the face-to-face communivation between travelers and children to spread knowledge and ability, to broadern the children's view, to inspire confidence and imagination of the children and finally to share the information and experience through 1kg.com to concerntrate more attention and help, and in the mean time, benefit more travelers.
概括来说,多背一公斤活动由三个简单的步骤组成:
出行时多背一公斤,把文具或书籍带给沿途的贫困学校或孩子
旅途中与孩子们交流,传递知识和能力
归来后通过1kg.cn网站进行反馈与分享,让更多的朋友参与
To sum up, "1Kg more" includes three simple steps:
Take 1Kg more when going out, taking books or stationeries to the schools and chilren on the way.
Talk to the children during the travel, spreading knowledge and ability.
Feedback and share information through 1kg.com after coming back to help more friends join in.
多背一公斤自04年4月提出,1kg.cn网站于8月上线,第一个活动于04年9月在成都进行。一年来,多背一公斤共倡议了超过20个有组织的活动,参加人数超过200人,活动区域遍及四川、广西、云南、贵州、湖南、河北、山西等省份,并获得广泛的媒体报道。
"1Kg more" is brought forward in Apr. 2004. The website 1kg.cn is online in August. The first activity was held in Chengdu in September. During one year, "1Kg more" sponsored more than 20 organized activities, the number of people attended was more than 200, and the area they went to speaded all over Sichuang, Guangxi, Yunnan, Guizhou, Hunan, Hebei, Shanxi and was extensively reported.
给旅游者的建议
1、旅游为主,公益其次。不要喧宾夺主。多背一公斤是旅途中的举手之劳,能做固然有收获,不做亦无伤大雅。不必将公益作为旅游的目的,这样反而会产生不切实际的期望。
2、交流为主,物品其次。不要太看重背过去的一公斤。相比于少量的物品,面对面深入平等的交流更能对孩子的成长产生积极的影响。
3、快乐旅行,保持微笑。我们往往会因为孩子们艰苦的生活环境而唏嘘,但唏嘘无法改变现实,相反,微笑会更容易接近和理解孩子们。请记住,不管贫困或富有,每个孩子的童年都是快乐的。公益旅游应该是快乐的,助学不一定非要苦大仇深。
Tips for travelers
1. Give priority to traveling, commonwell is in the second place. Don't make the sauce better than the fish. Taking 1kg more is just to lift a finger in traveling. It is indeed that we can gain a lot if we do it, but it is Okey if we fail. No need to look commonwell as the goal of the travel, or else it is easy to bring unpractical expectation.
2.Give priority to communication, items are in the second place. Do not value the 1Kg too much. Compared to the few things, face-to-face and equal communication will bring more positive influence to the children.
3.Happy traveling, keeping smile. We always sigh to the hard living environment of the children, but sighs cannot change the reality. On the contrary, smile makes us easier and closer to the children. Please remember, being poor or rich, each child has a happy childhood. Commonwell Travel should be happy, and help is no need to be suffering.
更多详情,请详细浏览我们的网站,或通过电子邮件与我们联系。
More details, please browse our website, or contact us via email.
http://www.1kg.cn
-------------------------------------------------------------
Thanks for 3M(MixMaxMin) for changing it to Korean.
<1kg만 더>란
<1kg만 더>란 중국민간에서 발기된 공익여행활동이나 여행자더러 여행전에 약간의 서적과 문구를 배낭에 넣어 여행로정에서 빈곤학교와 학생을 돕는것이다.여행자와 연로 어린이들과의 교류를 강조하는것으로서 지식과 능력의 전파하고 어린이들의 시야를 넓히며 그들의 자신감과 상상력을 격려하느것을 주요로 한다.끝에 1kg.cn이란 웹사이트에서 활동중 얻은 정보와 경험의 내놓음과 더불어 가난지구학교와 학생에게 더욱많은 관심을 기울게 사회를 이끌며 여행자로 하여금 더 많은 재부를 쌓게 한다.
쉽게 말해서,<1kg만 더>란 활동은 아래 3조목으로 구성된다.
출행시 1kg만 더 준비하되 이만큼의 서적과 문구는 연로 가난한 학교와 학생에게 나뉜다
여정에서 얘들과 얘기하며 지식과 능력을 전파한다.
돌아 온뒤 1kg.cn라는 웹사이트에서 정보를 나누고 더 많은 친구들이 참여하게 한다.
<1kg만 더>는 04년 4월 제안하여 그해 8월 1kg.cn를 내놓게 되였고 04년9월 중국 청두
(成都)에서 첫 활동이 펼쳐졌다.1년동안 스무여차례넘는 활동을 조직실시하여 앞뒤 200여명이 참가해 왔고,이 특수한 여행은 四川,廣西,雲南,貴州,湖南,河北,山西등 중국 각지로 광범위 넓혀 졌을 뿐만아니라 신문등 미디어에 여러차례 보도되여 왔다.
여행자에 대한 건의:
1.공익은 둘째치고 여행이 주요목적. 1kg이란 손쉬운 일로서 할수 있는만큼 수확을 거두고 할수 없더라도 별스럽지 않다.공익활동을 주취로 하면 도리여 실정에 맞춰지지 않는것이다.
2.교류가 주요,물품이 차요.1kg이란 무게의 물품보다도 얘들과의 담화로 그들에게 적극적인 영향을 하는것이다.
3.즐거운 여행,보람찬 미소.우리는 늘상 애들의 가난함에 동정심을 붇지만 단 동정심으로 현실정황은 개변되지 않으나 미소가 도리여 쉽게 애들과 친구사귀게 한다.
때문에 가난하건 부족하건 어린이들의 동년은 즐거운 것임을 기억하기 바란다.
더 상세한 내용은 아래 사이트로 로그인 하시거나 E-mail로 연락하여주길 바란다.
星期六, 十月 01, 2005
First Day in AI group
Finally I come to AI group, the place where NEWNEU was given birth, the place where the Qitiandasheng was given birth...
The students are all with doctor's degree or master's degree, nice and happy, "doctor" is much younger than I thought, but I'm the only one who study software engineering. Long time far from programming, yet it is not so difficult. Searching for codes is easy. But I do not know how it works though I can use them. I hope I can quickly learn the algorithms and research.
I like doing research, staying in the lab and just solve the problems. I think I can do it for several years without transfer to other major.^^
Today I learnt to program in MFC^^, things will get better day by day...
The students are all with doctor's degree or master's degree, nice and happy, "doctor" is much younger than I thought, but I'm the only one who study software engineering. Long time far from programming, yet it is not so difficult. Searching for codes is easy. But I do not know how it works though I can use them. I hope I can quickly learn the algorithms and research.
I like doing research, staying in the lab and just solve the problems. I think I can do it for several years without transfer to other major.^^
Today I learnt to program in MFC^^, things will get better day by day...
订阅:
博文 (Atom)