Posted in 2005
Free MSDN Visual Studio 2005 Team Suite with MSDN Premium Subscription for awardee of Microsoft Award for of Customer Excellence/ Microsoft MVP?
- 29 December 2005
Weeks ago I got an email promising free Visual Studio 2005 if I qualify for the Microsoft Award for Customer Excellence from www.microsoft-ace.com, which, according to some Microsoft employees, is a genuine Microsoft program website, but is also registered by a third party, and has a problem with the SSL certificate.
Today, I got a UPS package with 3 Visual Studio Team System with MSDN Premium redemption cards and a Microsoft-watermarked paper stating “thank you for your passionate support for VSTS”… but from www.mvpinvite.com, another website registered by 3rd party and seems has something to do with my MVP membership? So confusing…
jiangsheng的CSDN统计数据
- 24 December 2005
CSDN帐号:jiangsheng
注册时间:2000-4-29 0:09:00
Win32 & .Net Q&A 200512
- 24 December 2005
I would like to keep tracking some interesting CSDN discussions, but sometimes I can not find them due to the limit of the CSDN favorite and the CSDN full text search. So again I list some interesting discussions here. For details about the discussion, go to http://search.csdn.net and search posts by their topics. For previous Q&A discussions
MSXML4的文档对象的async属性默认是真,这时候Load是异步的,要等待对象触发事件再访问文档内容。也可以把文档的async属性设置成false切换到同步模式,这样Load调用之后就可以读DOM了。
整理旧照片……
- 05 December 2005
Source: http://www.flickr.com/photos/jiangsheng/sets/1514328/show/
2004年4月微软MVP峰会前参观上海微软
Nomination of Microsoft Award for Customer Excellence
- 22 November 2005
Dear Sheng Jiang, Thank you for being a great contributor to Microsoft Visual Studio 2005. You have been nominated to receive the Award for Customer Excellence. This award recognizes your extraordinary contribution to the Visual Studio 2005 product and will be shipped to you without charge. Please click the following link to arrange shipment of your award: (link omitted) Should you have any questions about this award, please contact (email omitted). All the best, S. Somasegar Corporate Vice President, Microsoft Developer Division
However, I’v already got VS2005 from my one year free MSDN Premium Subscription (for Visual Studio 2005), as a part of Microsoft Most Valuable Professional Award package. It may be better if they put something else in the ACE award package …
MSN messenger exceeds capacity
- 17 November 2005
This is the first time I get this message when trying to sign in to MSN messenger service
We can’t sign any more people in right now. Please try signing in again later. |
Click below to sign in: |
It seems Microsoft may need more servers now…
从Sony招回含疑似间谍软件的CD说起
- 15 November 2005
面对消费者日益严重的不满,Sony BMG害怕自己的正版音乐产品受到版权保护“后门”的影响,于今天宣布撤回商店货架内所有涉及Rookit软件的CD产品,并为消费者提供免费的非DRM版CD更换。 http://computer.online.sh.cn/computer/gb/content/2005-11/16/content_1380298.htm
关于这个软件包含的安全性和稳定性问题,参考`Sony <http://www.sony.com>`__,`Rootkits <http://en.wikipedia.org/wiki/Rootkit>`__ and Digital Rights Management <http://en.wikipedia.org/wiki/Digital_rights_management>`__Gone Too Far http://www.365key.com/forward.aspx?id=1286254 以及 `More on Sony: Dangerous Decloaking Patch, EULAs and Phoning Home http://www.365key.com/forward.aspx?id=1286280
Find and replace specific formatting in Word 2003
- 10 November 2005
In Microsoft Word 2003, you can replace text as in other programs. However, you can replace line breaks, graphics, and special formats as well. For example, to seperact and to add a serial number before every sentence, you can replace sentence-ending punctuations, such as periods and question marks, to the same punctuations plus a line break, click the numbering toolbar button, and make some minor manual changes for misreplacement.
Steps to numberize sentences:
Add a empty line to the end of the document by pressing Enter
Select the last line.
On the Edit menu, click Copy.
On the Edit menu, click Replace.
If you don’t see the Format button, click More.
In the Find what box, enter a period.
In the Replace With box, type a period.
In the Replace With box, type “^C”, or Click Special, and select Clipboard Contents
Click Replace All
Repeat step 6-9 for every other punctuation.
Repeat step 6-9 for each common misreplacement, such as Dr. or URL. Use ^C instead of a line break in finding and replacing.
click the numbering toolbar button on the Formating toolbar.
Make manually correction for other misreplacements.
Reference: http://office.microsoft.com/en-us/assistance/HP051894331033.aspx
FAQ:如何在……中获得……的指针(MFC)
- 10 November 2005
问:请问如何在一个全局函数中,获得视图类,文档类得指针啊? 问:如何在一个对话框中,获得视图类,文档类得指针啊?
答:虽然你可以使用AfxGetMainWnd或者AfxGetApp之类的函数来访问全局变量,但是不建议这么做。你应该尽量少使用全局函数和变量以增加代码的可移植性。你可以在对象中声明变量来保存和传递需要使用的对象和指针,调用函数或者创建对象时传递指针。
Visual C++ 2005 中的XML注释
- 05 November 2005
C#程序员可以用三个斜杠来开始XML格式的注释,而且编译器可以据此生成可用于自动生成帮助文档的XML文件。Visual C++ 2005中的编译器也支持了这个功能,而且对非托管函数也生效,前提是必须打开/clr和/DOC开关,并且不能使用/clr:oldSyntax开关编译。
有空的话,多去微软的反馈中心提提对产品的建议是很有好处的……
Talking about Where does power come from?
- 03 November 2005
Quote
The teacher said this confidently: Believe me, ten years later, you will still find those words insightful.Planning=PowerI do believe so.
People who are able to plan, and to implement the plans which facilitate innovation and change are invaluable.
According to Clementino Mendonca’s speech “The new MSF - competing with development process “, only 16% chaos (unplanned or almost unplanned) software projects were successful. Although I don’t remember the success rate of methodized software projects, I am sure it is much higher than the chaos model.
In China, as far as I know, most “workshop” style software companies use chaos models. It may be improved by using the new Visual Studio 2005 Team System, but I am not sure about it, since other software management products, such as Visual Source Safe, are not widely used in these companies.
See also
Agile software development (Wikipedia)
Waterfall model (Wikipedia)
How to use Visual C++ with Perl
- 03 November 2005
Microsoft Visual C++ and later do not support perl scripts by default. That is, the Developer Studio does not associate any special significance to perl scripts without being informed otherwise. However, there are several viable options, namely custom build rules, which enable the creation of projects that depend directly upon perl scripts. The remainder of this article discusses the following three methods for adding perl script files to a Visual C++ project:
Using custom build rules
创建和自动化Internet Explorer和资源管理器窗口
- 20 October 2005
下载示例工程 - 34 Kb jiangsheng/Samples
我在很久之前就开始用程序自动化Shell窗口——主要对象是IE窗口。有时浏览器控件或者MFC类CHTMLView可以满足我的需要,但是很多时候我需要从头嵌入浏览器控件并且尽可能模拟IE的行为,例如实现IDocHostUIHandler来启用自动完成功能。一个很自然的替代方案是直接操作IE窗口。
托管C++中函数调用的双重转换(Double Thunking)
- 07 October 2005
在VC.Net中使用默认设置/clr编译时,一个托管函数会产生两个入口点,一个是托管的,供托管代码调用,另外一个是非托管的,供非托管代码调用。但是函数地址,特别是虚函数指针只能有一个值,所以需要有一个默认的入口。
非托管入口点可能是所有调用的默认入口(在 Visual Studio .NET2003 中,编译器总是会选择非托管入口,但是在Visual Studio 2005中,如果参数或者返回值中包含托管类型,那么编译器会选择托管入口),而另外一个只是使用托管C++中的互操作功能对默认入口的调用。在一个托管函数被另一个托管函数调用的时候,这可能会造成不必要的托管/非托管上下文切换和参数/返回值的复制。如果函数不会被非托管代码使用指针调用,那么可以在声明函数时用VC2005新增的__clrcall修饰符阻止编译器生成两个入口。 现在用简单的冒泡排序算法来比较一下使用__clrcall之后的性能改善程度。
西雅图MVP峰会见闻
- 03 October 2005
个人觉得这次MVP峰会最大的进步就是技术相关的Session数量大大增加,按照MVP专长来分类;而不像上次那样按主题分类。我只需要在VC产品组的日程里面选择就可以了,而不是像上回那样不得不去听移动开发。当然这回也有MVP不去参加VC的Session,跑去听IE和移动开发。内容方面也比上次活泼很多,Don Box还是那么幽默,比尔·盖茨也有搞笑的演出,不过他看起来比去年七月份在北京的时候老多了。
一些可能有人会感兴趣的技术信息
Win32 & .Net Q&A 200509
- 22 September 2005
I would like to keep tracking some interesting CSDN discussions, but sometimes I can not find them due to the limit of the CSDN favorite and the CSDN full text search. So again I list some interesting discussions here. For details about the discussion, go to http://search.csdn.net and search posts by their topics. For previous Q&A discussions, see my blogs Win32 & .Net Q&A and VC/MFC Q&A 200407 . A topic may appear in these Q&A blogs more than once, but I will try to cover every interesting discussion if I can.
我们知道在电源选项 属性 里面可以设置
Access your documents from internet.
- 22 September 2005
一个飓风刚走,另一个更大的飓风又来了,这回是直冲本州而来。新奥尔良和休斯敦疏散过来一大堆人,但是这里很可能也得疏散。希望休斯敦不会成为第二个新奥尔良。
原文(英文):http://cn.geocities.com/sheng_jiang/accessdocumentsfrominternet.doc
C++/CLI中的默认属性访问
- 30 August 2005
目前版本的VC2005测试版中,default关键字不仅用于指定类级别的索引器,而且也用于访问默认属性。但是奇怪的是,默认属性的原名不能访问了,也就是说,如果要把下面的代码段从托管C++移植到VC2005附带的C++/CLI,不仅需要更改指针的类型,而且要把属性的名称更改为default:
如果继续使用原来名字来访问属性的话,会报告编译错误:
集成桌面搜索,模拟器
- 24 August 2005
This is a revised version of an earlier blog at http://blog.joycode.com/jiangsheng/archive/2005/07/19/59725.aspx, published July 19, 2005. The source code is available at jiangsheng/Samples
微软的桌面搜索API推出也有一段时间了,但是网上可以找到的相关技术资料还不多。官方的资料在https://web.archive.org/web/20051030062212/http://addins.msn.com/devguide.aspx可以看到,而且网页上有SDK和一个C#的示例供下载。
MFC,欢乐与痛苦
- 20 August 2005
MFC提供了许多十分有用的类和对象,在很多时候在Office插件、BHO、常规DLL这样的工程中加入MFC支持是一个不错的选择。但是,MFC中的很多功能,例如资源查找,消息预处理等等都依赖于在进程或者线程创建时被初始化的MFC内部数据;而对于需要添加MFC支持的工程,这些数据并不会被自动地初始化。
这时候使用一些MFC的功能,例如使用CString从字符串表加载一个字符串,或者使用CDialog::DoModal()创建一个模态对话框,都会有断言错误,用ATL向导创建的支持MFC的程序也没有多少改善,在CWinApp的DLL版本中没有初始化线程数据,所以调用AfxGetThread会返回空指针。解决这个问题的一个办法是使用AfxBeginThread来启动一个MFC线程,这样MFC会初始化线程相关的数据。
PIC 16F88 Microcontroller Servo Controller Project
- 25 July 2005
1) Introduction
The goal of this assignment is to control the position of a servomotor by generate pulses on the output pin for a time specified by various voltage of the input pin of the chip. The voltage should also be displayed by a 7-segment LEDconnected to some output pins of the chip.
2) Overview of the PIC 16F88 Microcontroller
PIC16F88 is a member of the huge Microcontroller Chip Family with 16 I/O pins and 2 power pins. It contains a lot of functions which are abundant to this project. The essential features used by this project are · Programmable Flash
· Data Memory
· Interrupt
· Internal clock and multiple time modules
· A/D Module
Information of other features, such as EPROM access or power management, can be found in the datasheet of this chip, which is available at www.microchip.com.
a) Programmable Flash
PIC16F88 has a 13 bit program counter, which can address 8K*14 addresses, or up to 1FFFh. However, it is paged so that accessing above 4K*14 will cause a wraparound. That is, the actual address is the address masked with 3FFh. The size of the code in this project is far from this limit, however. The starting address after power up, named Reset vector, located at 0000h. The interrupt vector, called by the chip when an interrupt occurs, located at 0004h. Stack memory is hardware implemented, and is indirectly manipulated by some instructions such as CALL and RETURN.
b) Data memory
Similar to IBM-PC, data memory is divided into several parts, called Banks in this chip, and a bank selection must be made before accessing an address outside current bank. Each bank has a 128 bytes extent, and some of them are mapped to the same position for convenience. The lower part of bank is reserved for Special Function Registers, and above them are General Purpose Registers, implemented as static RAM. To reduce bank selection, this project use 70h-7fh, the General Purpose Registers mapped to the same position in every bank. Some Special Function Registers are also accessed to perform tasks such as A/D I/O or timing. Accessing to these registers will be discussed later.
c) Interrupt
An interrupt is generated when predefined condition met, and the chip will make a call to the interrupt vector located at 0004h in the Programmable Flash. Some special flag bit in Some Special Function Registers are set before this call. This project use the A/D, Time0 and Time1 overflow interrupts for asynchronous operation. The general tasks of the interrupt handler are 1. First, disable all interrupt to prevent reentry
2. Save context information, such the value of W register, the Status register and program counter.
3. Check desired flag bits to see if the reveal the desired type of the interrupt occurs, and handle it with the flag bits cleared for future handling.
4. Restore context information to enable the program continues as usual after the interrupt occurs.
At last, enable interrupts to enable future interrupts
d) Internal clock and multiple time modules
The chip comes with 3 timer modules, and 2 are used by this project. TMR0 and TMR1 are prescalable timers with different ranges. The TMR0 register and TMR1H/TMR1L are readable and writeable counter register for these two timers, along with the Status register for synchronous operations. Interrupts are also generated when these counters overflow, and this project use them to invoke asynchronous operations and generate signals with varied time interval.
e) A/D Module
The chip comes with a 10-bit, 7-channel Analog to Digital module to convert input signals to 10 bit digital number. If the module is configured properly, after a flag bit in the ADCON0 register is set, an A/D conversation begins, and when it finishes, the result is placed into A/D result registers, namely ADRESH and ADRESL, and the flag bit is cleared. An peripheral interrupt is also generated to allow asynchronous operations
3) Description of the test circuit
Here is a block diagram in the assignment guideline of this project. Connection specification:
Pin number |
Description |
Connected to |
17 |
A/D input, 0-5V |
Variable voltage |
18 |
Digital output, 33HZ signal |
Servomotor |
6-13 |
Digital output |
7-segment LED |
5 |
Ground reference |
Ground |
14 |
Positive supply |
Power |
4) Development of the control program
This program is divided into following modules:
Initialization module
Port A Configuration
Port B Configuration
Frequency Setting
Interrupt Setting
Interrupt handler modules
A/D Interrupt
TMR1 Interrupt
TMR0 Interrupt
With the reset and interrupt vector fixed, the program placed a jump instruction at the reset vector, and the destination of the jump is the actual beginning of the program. The program then calls the initialization module, and then enters an infinite loop and is ready for interrupts.
a) Initialization module
This module is spitted into 4 modules. These modules are independent, so they can be composed into one, but they are separated for easier debugging and understanding.
i) Port A Configuration
The task of this module is to set analog input and digital out pins. TRISA register is set to 1, indicates the pin RA0 is set to analog input, and the rest pings on PortA are set to digital output. The ANSEL register is also set to 1 to select RA0 for A/D conversation, and the ADCON0 is set to b’11000001’ in accordance. After the configurations are finished, the first A/D conversation is triggered after a short wait.
ii) Port B Configuration
Because PortB is used for 7-segment LED display, both TRISB and PORTB registers are cleared to display nothing at the beginning.
iii) Frequency Setting
The internal clock is set to 4MHZ, which is specified in the assignment guideline. This is implemented by setting the OSCCON register to b’01101110’.
iv) Interrupt Setting
This project uses 3 interrupts, A/D, TMR0 and TMR1. A/D is used for A/D conversations, TMR1 for a 33HZ signal generator, and TMR0 for pulses. INTCON and PIE1 are configured to enable these interrupts, and T1CON and OPTION_REG are used to scale TMR0 to 1:16, and TMR1 to 1:1. TMR1L and TMR1H are initialized so that the first TMR1 overflow interrupt will occur 1/33 second later, and the timers are started when the configurations are done.
b) Interrupt handler modules
After necessary tasks of the interrupt handler are done, the flags bits of interrupts will be checked. If a flag bit of an interrupt is set, a corresponding handle routine will be called. Routinely interrupt handler tasks will be performed at last.
i) TMR1 Interrupt
Both the initialization and the handler routine set TMR1H and TMR1L to 35233 to ensure the overflow interrupt will occur after 30303 cycles, or 1/33 seconds, thus generate a 33HZ clock. For convenience, a high pulse signal output for the Servomotor and an A/D conversation request is also placed here. In other words, the pulse is set to high every 1/33 seconds, and the A/D conversation is also triggered every 1/33 seconds. The TMR0 timer is also enabled to set the pulse to low after a period of time. This period is calculated after the voltage is read.
ii) A/D Interrupt
This interrupt handler does the heaviest job in the program. First, it copy the digitalized voltage into user defined variable named AnalogResultH and AnalogResultL, and AnalogResultL is abandoned since a continuum specified by AnalogResultH is enough. Then the duration of the high stage of the output pulse and the LAD output will be calculated. According to the document of the Servo, a high stage of 0.36ms will cause the Servo turn to left, and 2.3 ms will cause it to turn right. Suppose the A/D result 0 means left, and 255 means right, then the duration of the high stage can be calculated by the following formula: Duration = 0.36+AnalogResultH/256 * 1.94 ms = 360+AnalogResultH*1,940/256 cycles to store the duration in TMR0, we need to prescale it to fit. The upper bound of it is 2.3 ms, or 2,300 cycles. To make the maximum duration fit into a byte, the timer need to be prescaled to 1:16. Duration =360/16+(AnalogResultH/256) *(1,940/16) ticks =22.5+ AnalogResultH/256* 121.25 ticks Of course I can not do it with such precision with the little instruction set of the chip. Round downs are inevitable Duration ≈22 + AnalogResultH/256*121 ≈22 + -AnalogResultH/64 -AnalogResultH/128 -AnalogResultH/256 So, to make the TMR0 overflows Duration ticks after the TMR1 interrupt rise the pulse signal, the TMR0 register must be set to TMR0 =256- Duration. This result is stored in a variable named Time0Interval, and is used by the TMR1 interrupt handler routine. This routine also scales the analog result to one digit value and displays it on a 7-segment LED. It is done by getting the high 4 bits of the high byte of the analog result.
iii) TMR0 Interrupt
This interrupt handler routine merely turn the TMR0 interrupt off, and output a low signal to end a pulse. ** **
5) Overview of testing done before burning the chip
The test is done in the emulator. After loading the program into emulator, and execute it, it reads the value set on RA0, and output a pulse every 1/33HZ.
Microchip PIC16F88A Emulator Project
- 11 July 2005
Resources:
document
PIC16F88 resource center
USB driver in order to communicate with the board http://www.ftdichip.com/Drivers/FT232-FT245Drivers.htm#VCP
driving guide of the servo from a robotics project that used the Motorola 68HC11 microcontroller http://www.austincc.edu/rblack/COSC2425/Lectures/Day27/servo.pdf
Visual Studio 2005中MFC的变化
- 05 July 2005
关于新功能的说明 http://msdn2.microsoft.com/library/y8bt6w34(en-us,vs.80).aspx
一些源代码的变化:
Use windbg as an external tools of Visual C++
- 27 June 2005
在我的前一篇BLOG(使用WinDbg调试VC程序)中我提到了如何使用WinDbg来调试Visual C++程序。但是从IDE到命令行之间的切换比较麻烦,为了偷懒起见,可以把WinDbg加到Visual Studio的工具菜单中,这样就可以直接从IDE启动WinDbg来进行调试了。下面是外部工具配置界面的设置
标题 : WinDbg
Error 3e6 with WriteFile
- 27 June 2005
It looks like you will get error 3E6 when you call write file with an address not aligned to DWORD.
Update: Raymond Chen explained the reason in his blog https://devblogs.microsoft.com/oldnewthing/20250605-00/?p=111250, basically Windows SDK requires aligned pointers, except for those decorated with UNALIGNED. E.g.
Lab5 Step4
- 24 June 2005
END;
all: $(PROJECT).exe
Lab5 Draft3
- 23 June 2005
reference: http://homepages.ius.edu/jfdoyle/c335/Html/ProcInvoke.htm
all: $(PROJECT).exe
Lab5 Draft2
- 21 June 2005
;=====================================================================
; lab5.asm - build a program that displays the Fibonacci numbers for a user defined input upper bound
; Author: Sheng_Jiang
; Course: COSC 2425
; Date: 6/21/05
;=====================================================================
.386
.MODEL flat, stdcall
option casemap:none
include windows.inc ; always first
include macros.asm ; MASM support macros
; —————————————————————–
; include files that have MASM format prototypes for function calls
; —————————————————————–
include masm32.inc
include gdi32.inc
include user32.inc
include kernel32.inc
; ————————————————
; Library files that have definitions for function
; exports and tested reliable prebuilt code.
; ————————————————
includelib masm32.lib
includelib gdi32.lib
includelib user32.lib
includelib kernel32.lib
;costants
CR EQU 0Dh
LF EQU 0Ah
TABLEWIDTH EQU 10
HBAR EQU 196
VBAR EQU 179
ULCORNER EQU 218
URCORNER EQU 191
MLBORDER EQU 195
MRBORDER EQU 180
LLCORNER EQU 192
LRCORNER EQU 217
.Data
menuSelection BYTE 0
menustring BYTE “Menu|I - Display program instructions|N - The user is to enter an integer number from 0 to 20|Display the first N Fibonacci numbers on the console|Quit the program”
menustringLen DWORD $-menustring
menuDelimiter DWORD “|”
IsExitSelected BYTE 0
number BYTE 0
.CODE
;print a string
;usage: push stringBuffer
; push stringlen
;
;call OutputStringN
; pop stringlen
; pop stringBuffer
OutputStringN PROC
push ebp
mov ebp , esp
sub esp , 8 ;//2 local var
push eax
push ecx
push edx
;eax=GetStdHandle(STD_OUTPUT_HANDLE)
invoke GetStdHandle, STD_OUTPUT_HANDLE
mov [ebp-4] , eax ;
;[ebp-8]=ebp-8;
mov eax ,ebp
sub eax ,8
mov [ebp-8] , eax;
;WriteFile outputHandle, stringBuffer,stringlen,&bytesWritten,0
invoke WriteFile, [ebp-4], near ptr [ebp+12], [ebp+8], near ptr [ebp-8],0
;cleanup
pop edx
pop ecx
pop eax
add esp , 8
mov esp,ebp
pop ebp
ret
OutputStringN ENDP
;print a char for count times.
;usage: push char
; push count
; call OutputCharN
; pop count
; pop char
OutputCharN PROC
push ebp
mov ebp , esp
push eax
push ecx
push edi
mov ecx,[ebp+8] ;ecx=count
JCXZ OutputCharNCleanup; do nothing if count=0
;allocate count bytes on the stack
;from esp-count to esp
;and initialize to char
;BYTE buffer[count]
;edi=buffer;
;push ecx;
;while(ecx)
;{
; edi[ecx]=char
;}
;pop ecx
mov al,BYTE PTR [ebp+12]
mov edi,esp
sub esp,ecx
push ecx
OutputCharNLoop:
dec edi
mov [edi], al
loop OutputCharNLoop
pop ecx
;call OutputStringN(buffer,ecx)
push edi
push ecx
call OutputStringN
pop ecx
add esp,4
;free count bytes on the stack
add esp,ecx
OutputCharNCleanup:
pop edi
pop ecx
pop eax
mov esp,ebp
pop ebp
ret
OutputCharN ENDP
;print a char
;by calling OutputStringN with a count of 1
;usage: push char
; call OutputChar
; pop char
OutputChar PROC
push ebp
mov ebp , esp
push eax
;DWORD dwchar;
sub esp,4
mov eax,[ebp+8] ;eax=char
mov dword ptr[ebp-8],0 ;dwchar=0
mov byte ptr[ebp-8],al ;dwchar=char & 0x000000FF
;call OutputStringN(&dwchar,1)
mov eax,ebp
sub eax,8
push eax
push 1
call OutputStringN
add esp,12
pop eax
mov esp,ebp
pop ebp
ret
OutputChar ENDP
;draw a table line with text and delimiters
;usage:
;push TableWidth
;push beginChar
;push textbuffer
;push textlen
;push fillchar
;push endChar
;call DrawTableLine
;pop endChar
;pop fillchar
;pop textlen
;pop textbuffer
;pop beginChar
;pop TableWidth
DrawTableLine PROC
push ebp
mov ebp , esp
push eax
push ebx
push ecx
; do nothing if TableWidth<2
mov ecx,[ebp+28] ;ecx=TableWidth
cmp ecx,2
jb DrawTableLineCleanup
;beginChar, the left border
push [ebp+24]
call OutputChar
add esp,4
;the text
;ebx=min(TableWidth-2,textlen);
mov ebx,[ebp+16] ;ebx=textlen
mov eax,ebx
add eax,2 ;eax=textlen+2
cmp eax,ecx ;textlen+2<=TableWidth?
jbe DrawTableLinePrintText ;yes, print it
mov ebx,ecx ;otherwise cut the string to TableWidth-2 characters
sub ebx,2 ;ebx=TableWidth-2
DrawTableLinePrintText:
;if no text to print,jump to fill the whole line
cmp ebx,0
je DrawTableLineFillLine
; call OutputStringN to print the text part
push [ebp+20]
push ebx
call OutputStringN
pop ebx
add esp,4
DrawTableLineFillLine:
;fill the rest of table line
;call OutputCharN(fillchar,TableWidth-2-ebx)
mov eax, [ebp+28]
sub eax, 2
sub eax, ebx
push [ebp+12]
push eax
call OutputCharN;
add esp,8
;endChar, the right border
push [ebp+8]
call OutputChar
add esp,4
;change line
push CR
call OutputChar
add esp,4
push LF
call OutputChar
add esp,4
DrawTableLineCleanup:
pop ecx
pop ebx
pop eax
mov esp,ebp
pop ebp
ret
DrawTableLine ENDP
;draw a table top line(using ASCII code)
;usage:
;push TableWidth
;call DrawTableTop
;pop TableWidth
DrawTableTop PROC
push ebp
mov ebp , esp
;call DrawTableLine(TableWidth,ULCORNER,NULL,NULL,HBAR,URCORNER)
push [esp+8];TableWidth
push ULCORNER
push 0;
push 0;
push HBAR
push URCORNER
call DrawTableLine
add esp,24
mov esp,ebp
pop ebp
ret
DrawTableTop ENDP
;draw a table buttom line(using ASCII code)
;usage:
;push TableWidth
;call DrawTableButtom
;pop TableWidth
DrawTableButtom PROC
push ebp
mov ebp , esp
;call DrawTableLine(TableWidth,LLCORNER,NULL,NULL,HBAR,LRCORNER)
push [esp+8];TableWidth
push LLCORNER
push 0;
push 0;
push HBAR
push LRCORNER
call DrawTableLine
add esp,24
mov esp,ebp
pop ebp
ret
DrawTableButtom ENDP
;draw a table middle line(using ASCII code)
;usage:
;push TableWidth
;call DrawTableMiddleLine
;pop TableWidth
DrawTableMiddleLine PROC
push ebp
mov ebp , esp
;call DrawTableLine(TableWidth,MLBORDER,NULL,NULL,HBAR,MRBORDER)
push [esp+8];TableWidth
push MLBORDER
push 0;
push 0;
push HBAR
push MRBORDER
call DrawTableLine
add esp,24
mov esp,ebp
pop ebp
ret
DrawTableMiddleLine ENDP
;draw table lines and print text (using ASCII code)
;wrap to seperate lines if the text is too long, or delimiters were found in the text
;usage:
;push TableWidth
;push stringbuffer
;push stringlen
;push delimiter
;call DrawTableLineWithWrap
;pop delimiter
;pop stringlen
;pop stringbuffer
;pop TableWidth
DrawTableLineWithWrap PROC
push ebp
mov ebp , esp
push eax ;
push ebx ;
push ecx ;
push edx ;
push edi ;
push esi ;
mov ebx ,[ebp+8] ;delimiter
mov ecx ,[ebp+12] ;stringlen
mov edx ,[ebp+20] ;TableWidth
mov esi ,[ebp+16] ;stringbuffer
;DWORD curlinebase=esi;
;BOOL bTerminate=FALSE;
;BOOL bDelimiter;
;edi=esi;
;
;while(!bTerminate&&edi<esi+ecx)
;{
; if(edi==esi+ecx-1 /*end of buffer*/){bDelimiter=FALSE;bTerminate=TRUE;}
; else if([edi]==’’){bDelimiter=TRUE;bTerminate=TRUE;}
; else if([edi]==ebx /*delimiter*/{bDelimiter=TRUE;}
; else if(edi=curlinebase+TableWidth-2) /*wrap*/{bDelimiter=FALSE;}
; else {edi++; continue;}
; DrawTableLine(TableWidth,MLBORDER,curlinebase,bDelimiter?edi-curlinebase:edi-curlinebase+1,HBAR,MRBORDER);
; edi++;
; curlinebase=edi;
;}
mov edi ,esi
;allocate local vars
sub esp ,12
;DWORD& curlinebase=*(ebp-36);6 pushed registers
;BOOL& bTerminate=*(ebp-32)
;BOOL& bDelimiter=*(ebp-28)
mov dword ptr [ebp-36],esi
mov dword ptr [ebp-32],0
DrawTableLineWithWrapLoop:
;if(bTerminate==TRUE) goto DrawTableLineWithWrapCleanup
cmp dword ptr [ebp-32],0
jne DrawTableLineWithWrapCleanup
;if(edi>=esi+ecx) goto DrawTableLineWithWrapCleanup
mov eax,esi
add eax,ecx
cmp edi,eax
jae DrawTableLineWithWrapCleanup
dec eax
;if(edi==esi+ecx-1) goto DrawTableLineWithWrapEndOfBuffer
cmp edi,eax
je DrawTableLineWithWrapEndOfBuffer
;if([edi]==0) goto DrawTableLineWithWrapNullTerminator
cmp byte ptr [edi],0
je DrawTableLineWithWrapNullTerminator
;if([edi]==ebx) goto DrawTableLineWithWrapDelimiter
cmp byte ptr [edi],bl
je DrawTableLineWithWrapDelimiter
;if(edi==curlinebase+TableWidth-2) goto DrawTableLineWithWrapLineWrap
mov eax,[ebp-36]
add eax,edx
sub eax,2
cmp edi,eax
je DrawTableLineWithWrapLineWrap
inc edi
jmp DrawTableLineWithWrapLoop
DrawTableLineWithWrapEndOfBuffer:
;bTerminate=TRUE,bDelimiter=FALSE;
mov dword ptr [ebp-32],1
mov dword ptr [ebp-28],0
jmp DrawTableLineWithWrapDrawLine
DrawTableLineWithWrapNullTerminator:
;bTerminate=TRUE,bDelimiter=TRUE;
mov dword ptr [ebp-32],1
mov dword ptr [ebp-28],1
jmp DrawTableLineWithWrapDrawLine
DrawTableLineWithWrapDelimiter:
;bDelimiter=TRUE;
mov dword ptr [ebp-28],1
jmp DrawTableLineWithWrapDrawLine
DrawTableLineWithWrapLineWrap:
;bDelimiter=FALSE;
mov dword ptr [ebp-28],0
;jmp DrawTableLineWithWrapDrawLine
DrawTableLineWithWrapDrawLine:
; DrawTableLine(TableWidth,MLBORDER,curlinebase,bDelimiter?edi-curlinebase:edi-curlinebase+1,HBAR,MRBORDER);
push edx ;TableWidth
push MLBORDER ;beginchar
push [ebp-36] ;stringbuffer
;eax=bDelimiter?edi-curlinebase:edi-curlinebase+1
mov eax,edi
sub eax,[ebp-36]
cmp dword ptr [ebp-28],0
jne DrawTableLineWithWrapDrawLine2
add eax,1
DrawTableLineWithWrapDrawLine2:
push eax ;bufferlen
push HBAR ;fillchar
push MRBORDER ;endchar
call DrawTableLine
add esp,24
; edi++;
; curlinebase=edi;
inc edi
mov [ebp-36],edi
jmp DrawTableLineWithWrapLoop
DrawTableLineWithWrapCleanup:
add esp ,12
pop esi
pop edi
pop edx
pop ecx
pop ebx
pop eax
mov esp,ebp
pop ebp
ret
DrawTableLineWithWrap ENDP
ShowMenu Proc
push ebp
mov ebp , esp
push TABLEWIDTH
call DrawTableTop
;add esp,4
;push TABLEWIDTH
push OFFSET menustring
push menustringLen
push menuDelimiter
call DrawTableLineWithWrap
sub esp,12
;push TABLEWIDTH
call DrawTableButtom
add esp,4
mov esp,ebp
pop ebp
ret
ShowMenu EndP
;invoke WriteFile,hOutPut,lpszText,sl,ADDR bWritten,NULL
main PROC
int 3
; call ShowMenu
;text code of OutputChar
; push VBAR
; call OutputChar
; add esp,4
;test code of DrawTableLineWithWrap
push TABLEWIDTH
push OFFSET menustring
push menustringLen
push menuDelimiter
call DrawTableLineWithWrap
sub esp,12
exit
main ENDP
END main
#=====================================================================
# lab5 - build a program that displays the Fibonacci numbers for a user defined input upper bound
# Author: Sheng_Jiang
# Course: COSC 2425
# Date: 6/21/05
#=====================================================================
PROJECT = Lab5
NAME = Sheng_Jiang
Date = 6/21/05
ROOTDRIVE = C
VERSION = V1
SRCS =
$(PROJECT).asm
makefile
MASM32 = $(ROOTDRIVE):/masm32
ML = $(MASM32)/bin/ml
LINK = $(MASM32)/bin/link
Zip = H:/mydoc/Tools/Bin/zip
DEBUG = c:/masm32/debug/windbg
MLFLAGS = /I. /I $(MASM32)include /I $(MASM32)macros /Zi /Zd /Zf /c /Fl /coff /Cp
LINKFLAGS = /subsystem:console /libpath:$(MASM32)lib /debug
DEBUGFLAGS = -QY -g -G -WF $(PROJECT).WEW
all: $(PROJECT).exe
$(PROJECT).obj: $(PROJECT).asm
$(ML) $(MLFLAGS) $(PROJECT).asm
$(PROJECT).exe: $(PROJECT).obj
$(LINK) $(LINKFLAGS) $(PROJECT).obj
clean:
del $(PROJECT).exe *.obj *.lst *.map *.pdb *.ilk
zip: clean
del $(NAME)_$(PROJECT)_$(VERSION).zip
$(Zip) $(NAME)_$(PROJECT)_$(VERSION).zip $(SRCS)
debug: $(PROJECT).exe
$(DEBUG) $(DEBUGFLAGS) $(PROJECT).exe
Lab5 Draft1
- 20 June 2005
;=====================================================================
; lab5.asm - build a program that displays the Fibonacci numbers for a user defined input upper bound
; Author: Sheng_Jiang
; Course: COSC 2425
; Date: 6/15/05
;=====================================================================
.386
.MODEL flat, stdcall
option casemap:none
include windows.inc ; always first
include macros.asm ; MASM support macros
; —————————————————————–
; include files that have MASM format prototypes for function calls
; —————————————————————–
include masm32.inc
include gdi32.inc
include user32.inc
include kernel32.inc
; ————————————————
; Library files that have definitions for function
; exports and tested reliable prebuilt code.
; ————————————————
includelib masm32.lib
includelib gdi32.lib
includelib user32.lib
includelib kernel32.lib
;costants
CR EQU 0Dh
LF EQU 0Ah
DOCOMMAND_CONTINUE equ 1
DOCOMMAND_END equ 0
.Data
menuSelection DWORD 0
DoCommandResult DWORD 0
.Code
ShowMenu Proc
print chr$(“Menu”,CR,LF,”[I,N,F,X]”)
ret
ShowMenu EndP
;
;usage:
;push someThingToAllocateTheReturnValue
;push command
;call DoCommand
;pop command
;pop someThingToAllocateTheReturnValue
;the return value can be one of the following:
; DOCOMMAND_CONTINUE equ 1
; DOCOMMAND_END equ 0
DoCommand PROC
push ebp
mov ebp, esp
push eax
push ebx
mov bl, BYTE PTR [ebp+8]
cmp bl, ‘x’
je DoCommandEnd
cmp bl, ‘X’
je DoCommandEnd
mov eax, DOCOMMAND_CONTINUE
jmp DoCommandCleanup
DoCommandEnd:
mov eax, DOCOMMAND_END
DoCommandCleanup:
mov [ebp+12],eax
pop ebx
pop eax
mov esp,ebp
pop ebp
ret
DoCommand ENDP
main PROC
int 3
cls
ShowMenuLoop:
call ShowMenu
mov menuSelection, input()
push DoCommandResult
mov eax,menuSelection
push [eax]
call DoCommand
pop menuSelection
pop DoCommandResult
cmp DoCommandResult,DOCOMMAND_CONTINUE
je ShowMenuLoop
exit
main ENDP
END main
#=====================================================================
# lab5 - build a program that displays the Fibonacci numbers for a user defined input upper bound
# Author: Sheng_Jiang
# Course: COSC 2425
# Date: 6/15/05
#=====================================================================
PROJECT = Lab5
NAME = Sheng_Jiang
Date = 6/15/05
ROOTDRIVE = C
VERSION = V1
SRCS =
$(PROJECT).asm
makefile
MASM32 = $(ROOTDRIVE):/masm32
ML = $(MASM32)/bin/ml
LINK = $(MASM32)/bin/link
Zip = H:/mydoc/Tools/Bin/zip
DEBUG = c:/masm32/debug/windbg
MLFLAGS = /I. /I $(MASM32)include /I $(MASM32)macros /Zi /Zd /Zf /c /Fl /coff /Cp
LINKFLAGS = /subsystem:console /libpath:$(MASM32)lib /debug
DEBUGFLAGS = -QY -g -G -WF $(PROJECT).WEW
all: $(PROJECT).exe
$(PROJECT).obj: $(PROJECT).asm
$(ML) $(MLFLAGS) $(PROJECT).asm
$(PROJECT).exe: $(PROJECT).obj
$(LINK) $(LINKFLAGS) $(PROJECT).obj
clean:
del $(PROJECT).exe *.obj *.lst *.map *.pdb *.ilk
zip: clean
del $(NAME)_$(PROJECT)_$(VERSION).zip
$(Zip) $(NAME)_$(PROJECT)_$(VERSION).zip $(SRCS)
debug: $(PROJECT).exe
$(DEBUG) $(DEBUGFLAGS) $(PROJECT).exe
Lab4
- 13 June 2005
;=====================================================================
; lab4.asm - Example function call to get the 20th Fibonacci number
;; Author: Sheng_Jiang
; Course: COSC 2425
; Date: 6/13/05;=====================================================================
.386
.MODEL flat, stdcall
option casemap:none
include windows.inc ; always first
include macros.asm ; MASM support macros
; —————————————————————–
; include files that have MASM format prototypes for function calls
; —————————————————————–
include masm32.inc
include gdi32.inc
include user32.inc
include kernel32.inc
; ————————————————
; Library files that have definitions for function
; exports and tested reliable prebuilt code.
; ————————————————
includelib masm32.lib
includelib gdi32.lib
includelib user32.lib
includelib kernel32.lib
;costants
cr equ 0dh
lf equ 0ah
.Data
.STACK 4096h ;RECURSION need large stacks
.CODE
;Function Fibonacci returns n’th Fibonacci number
;It uses RECURSION
;__stdcall unsigned int f(int x)
;{
; return (x<2) ? 1 : f(x-1) + f(x-2);
;}
;usage:
;push SomethingToAllocateTheReturnValue
;push Parameter;
;call Fibonacci
;stack changes during function call:12
Fibonacci PROC
push ebp
mov ebp , esp
push ecx ; this register is used to calculate the parameters of the function calls
push esi ; sum goes here
FibonacciFunctionBegin:
mov ecx,[ebp+8] ;ecx=param1 = esp/*old*/+4/*new esp*/+4/*pushed ebp*/
cmp ecx,2 ;ecx<2 ?
jge FibonacciRecursion ;return f(x-1) + f(x-2);
mov esi,1 ;otherwise return 1
jmp FibonacciCleanup ;exit function
FibonacciRecursion:
dec ecx ;calculate f(x-1)
push ecx ;allocate the returnValue
push ecx ;ecx=x-1
call Fibonacci
pop esi
dec ecx ;calculate f(x-2)
push ecx ;allocate the returnValue
push ecx ;ecx=x-2
call Fibonacci
pop ecx
add esi,ecx
FibonacciCleanup:
mov dword ptr [ebp+12],esi; //set return values
pop esi
pop ecx
mov esp,ebp
pop ebp
ret 4
Fibonacci ENDP
;int main(int argc, char* argv[])
;{
; printf(“the 20th Fibonacci number is:rn”;
; return 0;
;}
main PROC
int 3
push ecx ;allocate the return value
push 13 ;
call Fibonacci
print chr$(“the 20th Fibonacci number is:”,cr,lf)
pop ecx
print str$(ecx);
print chr$(cr,lf)
exit
main ENDP
END main
# makefile for Lab4
PROJECT = Lab4
NAME = Sheng_Jiang
Date = 6/13/05
ROOTDRIVE = C
VERSION = V1
SRCS =
$(PROJECT).asm
makefile
MASM32 = $(ROOTDRIVE):/masm32
ML = $(MASM32)/bin/ml
LINK = $(MASM32)/bin/link
Zip = H:/mydoc/Tools/Bin/zip
DEBUG = c:/masm32/debug/windbg
MLFLAGS = /I. /I $(MASM32)include /I $(MASM32)macros /Zi /Zd /Zf /c /Fl /coff /Cp
LINKFLAGS = /subsystem:console /libpath:$(MASM32)lib /debug
DEBUGFLAGS = -QY -g -G -WF $(PROJECT).WEW
all: $(PROJECT).exe
$(PROJECT).obj: $(PROJECT).asm
$(ML) $(MLFLAGS) $(PROJECT).asm
$(PROJECT).exe: $(PROJECT).obj
$(LINK) $(LINKFLAGS) $(PROJECT).obj
clean:
del $(PROJECT).exe *.obj *.lst *.map *.pdb *.ilk
zip: clean
del $(NAME)_$(PROJECT)_$(VERSION).zip
$(Zip) $(NAME)_$(PROJECT)_$(VERSION).zip $(SRCS)
debug: $(PROJECT).exe
$(DEBUG) $(DEBUGFLAGS) $(PROJECT).exe
使用WinDbg调试VC程序
- 08 June 2005
虽然在VC6.0中可以通过安装Visual C++ Toolkit(https://archive.org/details/microsoft-visual-c-toolkit-2003)来编写基于最新版本的平台SDK、DirectX SDK的程序以及托管代码,但是VC6附带的调试器并不支持新版本的调试信息,所以实际上是不能用VC6来调试新版本编译器生成的程序的。
一个替代的解决方案是使用新版本的Windows调试工具Windbg(https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/)。Windbg的调试功能基本和Visual C++中的相同,但是需要手动设定源文件和调试符号文件的搜索路径(可以参考VC6.0中的对应设置)。
Lab3
- 01 June 2005
.386
.MODEL flat, stdcall
option casemap:none
include windows.inc
include kernel32.inc
include masm32.inc
includelib kernel32.lib
includelib masm32.lib
.DATA
val1 DWORD 10000h
val2 DWORD 40000h
val3 DWORD 20000h
finalVal DWORD ?
.CODE
main PROC
int 3
mov eax,val1
add eax,val2
sub eax,val3
mov finalVal,eax
invoke ExitProcess, 0
main ENDP
END main
# makefile for Lab3
PROJECT = Lab3
NAME = Sheng_Jiang
Date = 5/25/05
ROOTDRIVE = C
VERSION = V1
SRCS =
$(PROJECT).asm
makefile
MASM32 = $(ROOTDRIVE):/masm32
ML = $(MASM32)/bin/ml
LINK = $(MASM32)/bin/link
Zip = H:/mydoc/Tools/Bin/zip
DEBUG = H:Progra~1Debugg~1windbg
MLFLAGS = /I. /I $(MASM32)include /Zi /Zd /Zf /c /Fl /coff /Cp
LINKFLAGS = /subsystem:console /libpath:$(MASM32)lib /debug
DEBUGFLAGS = -QY -g -G -WF $(PROJECT).WEW
all: $(PROJECT).exe
$(PROJECT).obj: $(PROJECT).asm
$(ML) $(MLFLAGS) $(PROJECT).asm
$(PROJECT).exe: $(PROJECT).obj
$(LINK) $(LINKFLAGS) $(PROJECT).obj
clean:
del $(PROJECT).exe *.obj *.lst *.map *.pdb *.ilk
zip: clean
del $(NAME)_$(PROJECT)_$(VERSION).zip
$(Zip) $(NAME)_$(PROJECT)_$(VERSION).zip $(SRCS)
debug: $(PROJECT).exe
$(DEBUG) $(DEBUGFLAGS) $(PROJECT).exe
Attending Machine Language Class
- 23 May 2005
I am going to take the machine language class at ACC. a lot of posts are going to focus on my experience.
https://web.archive.org/web/20041110185729/https://www.austincc.edu/rblack/COSC2425/index.html
Read Twice to reveal the clues(Orson Scott Card,SPEAKER FOR THE DEAD)
- 21 May 2005
Thanks to Austin Public Library, I have a chance to continue my navigating with Ender the Great Commander, the Xenocide, and the Speaker for the Dead. I’v noticed a significant difference between the style of Ender’s Game and Speaker for the Dead, and I like this change. It make ender a less hero, but a greater philosopher. His unconscious victory now considered crime, and he became his own accuser for 3,000 years. However, he still execl in this work. He removed the barrier between human and peggies, and made the treatment between the 3 species.
I did not notice the importance of the irrelevant quotation at the beginning of each chapter, but I found they are noteworthy for better understanding. They are kind of background information, and some sources appeared in the body part later.
“We question all our beliefs, except for the ones we really believe, and those we never think to question. “
在线地址本服务
- 13 May 2005
我收到的来自在线地址本服务的邀请现在越来越频繁了。今天我又收到了一封这样的邮件:
Add yourself to xxx’s address book! Open your invitation This invitation was sent to my email address on behalf of xxxxxx (xxxxxx@hotmail.com) If you do not wish to receive invitations from this Ringo member, click here. To stop receiving invitations from all Ringo members, click here.
Notes
- 08 May 2005
Notes
- 28 April 2005
2 principles written into the constitution 200 years ago,effect today.
1.1 3 branch (legislative, Executive, Judicial) compose the us gov.
2.1 Each branches have its specific task in relation of the country’s laws, and particular power that is not share by other branches. The writer of constitution to ake sure no single branch have all power, make sure no abuse, no more powerful than other branches. A system of checks and balances is written in the constitution . A specific way to check or control on other branches.
Blog, past and present
- 28 April 2005
At December 5, 2002, on Sen. Strom Thurmond’s 100th birthday celebration, Sen. Trent Lott (R-MS) stunned his audience with his words “I want to say this about my state. When Strom Thurmond ran for president, we voted for him. We’re proud of it. And if the rest of the country had followed our lead, we wouldn’t have had all these problems over the all these years either.”, and probably stunned the mainstream media, made them unable to report this comment widely. But two bloggers,“Atrios” and Joshua Marshall noticed it and wrote it down on their blog. Soon blogs about this comment were so widely spread that on December 10, the mainstream media restored their attention, and on December 20, Lott resigned as Majority Leader.
What is Blog? Why is it so influential?
登鹳雀楼(王之焕)
- 27 April 2005
白日依山尽,黄河入海流
The sun beyond the mountains glows;/The Yellow River seaward flows.
欲穷千里目,更上一层楼
You will enjoy a grander sight/ By climbing to a greater height.
请勿向第三方公开你的个人密码
- 25 April 2005
Please don’t show your password to 3rd party.
一直以来我都持续收到一些加入在线手机社区http://www.sms.ac的邀请,因为我没有手机(要找我的人注意:我醒着的话一般都挂在MSN上),所以总是看过就算。但是今天收到了来自一个不是很熟的朋友的加入这个社区和另外一个社区http://www.bebo.com的邀请,所以上网搜索了一下一些个人BLOG对这两个网站的引用。搜索的结果触目惊心。
Blog
- 25 April 2005
Blog, or weblog, refers to certain kind of online journal that, it is time-stamped articles posted on websites, usually in reverse chronological order. In addition, it usually enables visitors to leave comments on the same web page of article, trace related blogs between different websites, and get notification if the blog is updated. It can also refer to the action of writing blogs.
In a famous blog by Rebecca Blood, she observed that Jorn Barger named his website, which with daily articles consisted of interesting links to websites and comments of these websites; as Weblog, and it is Peter Merholz who once broke Weblog into the phrase “we blog”. (Blood, R., September 7, 2000), which was shortened to “blog” during spreading. The number of bloggers boosted after web based blog tools, such as one provided by Blogger.com since 1999, enabled writing blog or comments online, and publishing it with a few mouse clicks. But blog had not much attention at that time.
http://meta.wikimedia.org/wiki/Chinese_conversion
- 24 April 2005
Automatic conversion between simplified and traditional Chinese
http://meta.wikimedia.org/wiki/Chinese_conversion
方言的翻译一直是一个很麻烦的翻译,由于中文的词之间没有空格,而且一些用语的字数不同(例如电脑和计算机)人工智能处理这些翻译很麻烦,采取人工的手段也是一种解决方案。
Visual C++ 2005的版本区别
- 21 April 2005
经常看见有些人问Visual C++ 2005里面为什么没有了MFC。实际上,MFC只是在目前免费下载测试版的Express版本里面没有,在其它的版本里面都有——但是一般都是要付钱的。具体的各个版本的比较可以参见参考部分的链接。不过对于用VC来学习.Net开发的程序员来说,Express版就足够了。
小道消息:
程序员之懒
- 19 April 2005
程序员在我看来是比较会偷懒的一个群体。为了在开发软件的时候减少人工操作,他们会使用各种各样的软件和语言特性,例如IDE和预处理宏。李建忠在他的BLOG(http://blog.joycode.com/lijianzhong/archive/2005/05/08/50440.aspx)中提到,为了简化声明属性的工作,他的同事自己写了一些小工具来生成需要的代码。在C++托管扩展中,这个工作稍微简单一些,用预处理宏就可以了。
当然,如果使用C++/CLI的话,这个工作更加简单:
Visual C++ 2005 Beta 2中的变动
- 19 April 2005
stdcli::language名称空间被取消,代之以cli名称空间。
MFC对.Net控件的事件支持宏VENT_DELEGATE_ENTRY的参数类型变化:例如
VC的自动化向导的BUG
- 19 April 2005
BUG: ClassWizard Omits Methods with BYTE or BYTE* As Parameters (http://support.microsoft.com/kb/q241862/)
BUG: VTS_UI1 and VTS_PUI1 are Defined Incorrectly in AfxDisp.h (http://support.microsoft.com/kb/242588/)
Litblogs
- 18 April 2005
Uniting the leading literary weblogs for the purpose of drawing attention to the best of contemporary fiction, authors and presses that are struggling to be noticed in a flooded marketplace.
假如抓到一条美人鱼(转自机战世界论坛,水星的爱发)
- 15 April 2005
真的么?
虾,你有伴了
…………
Spread of Blog
- 15 April 2005
Spread of Blog
Blog, or weblog, refers to certain kind of online journal that, it is time-stamped articles posted on websites, usually in reverse chronological order. In addition, it usually enables visitors to leave comments on the same web page of article, trace related blogs between different websites, and get notification if the blog is updated. It can also refer to the action of writing blogs.
In a famous blog by R Blood, she observed that Jorn Barger named his website, which with daily articles consisted of interesting links to websites and comments of these websites; as Weblog, and it is Peter Merholz who once broke Weblog into the phrase “we blog”.( Blood, R., September 7, 2000), which was shortened to “blog” during spreading. The number of bloggers boosted after web based blog tools, such as one provided by Blogger.com since 1999, enabled writing blog or comments online, and publishing it with a few mouse clicks. But blog had not much attention at that time.
The influence of blogs was boosted by political events. After the beginning of War on Terrorism, while interactive blogs focused on the war, namely warblogs, spread and gain readership because their immediacy and interactivity, and anonymity of comments, while the reaction of mainstream media were slowed by censorship. By the spring of 2003, Forbes Magazine used “war blogger” in this larger sense when listing the “best warblogs.” In the U.S. presidential election of 2004, Blogs by celebrity, such as journalists, politicians and president candidates, gained public attention. Recently, Microsoft said that the free blogging service, called MSN Spaces, had attracted 4.5 million users during its preliminary test phase, which began last December and end a few days ago. The use of the word “blog” was so common that, “blog” was included in the Oxford English Dictionary soon (Quarterly updates to OED Online, March 13, 2003).
Many mainstream medias noticed this tendency.
Google bought blogger.com
I started my first blog at September, 2003. I had been looking for a web application for simplify updating my personal homepage for a long time. The recent update page in my website consisted of paragraphs in reverse chronological order, with a timestamp to mark the date of update, so that the visitors will notice the new updates easily. Despite of its usability, to perform an update of my homepage, I had to find the proper insert-point in the page, add new paragraphs, and then use some FTP (file transfer protocol) software applications to upload the whole modified page to the web server. Soon I found guest books, where visitors can leave messages and internet forums, where registered users can start a discussion or join a discussion, are very useful but both of them are not eligible for a recent update part of my website because they are open for visitors,.
they are hard to attract a wild range of visitors. The visitors can not discuss with the author about an online article without using other applications, such as email, and this limited the influence of websites. Soon online guest books appeared, enabled visitors to post comments of all articles in a single page. Soon internet forums were designed for discussion, enabled users to post comments of an individual article and then visitors can read the article and its comments in the same page. However, unlike internet forums and online guest books, blog articles have static address for individual entries, which enables search engines to list them in search results, and the large amount of trans-website links were considered as citation by the page rank systems, which used by search engines to sort results, made them appears in the front of the search result lists, thus increased the influence of blogs. Many blog tools also automatically add TrackBacks, or links between an article and the articles its references to simplify the difficulty when the visitors tracking between related articles. These features of blogs made trans-website discussion much easier, and these conveniences speed up the spreading of blog.
In addition, several tools and services are developed for the proliferated demand and boosted new demands. Trackbacks make the related blogs linked together, and comments made it possible for authors to discuss their articles on the same page of the article. Blog hosting sites launched one another, and a lot of personal homepage providers became blog providers. News aggregators appeared to simplify posting and reading blogs. The page rank system used by search engines, promoted the most cited blogs by revealing their trackbacks International blog service providers made it possible to write blogs on localized websites. Such conveniences made blogging easier and more and more people became bloggers.
Since the number of blogger increased so fast; it has formed many communities.
Influence
As a result of explosion of number of bloggers, several communities were created on certain topics and direct the discussion in existing communities such as warblogs, Blawgs, tech blogs and team blogs, sometimes called blogosphere. Opinions, ideas and discussions around a particular subject or controversy can easily spread in blogospheres through trackbacks and dominate the topic of a blogosphere in a period of time. In order to keep the high discussion quality of the blogospheres, some bloggers dispatch their posts into different blogospheres. For example, I have 5 blogs, one to trace the new technologies, one to discuss common technologies, 2 for archive, and 1 for other posts.
Some blogospheres have great influence. They have quicker responses to breaking news than major media (Conference Examines Blogs’ Impact on News. Nov 14, 2004), and some news stories were knock down by bloggers (Macht J., Sept 27, 2004). They were also responsible for pushing the story of Trent Lott, then the Republican leader of the Senate into the news, after the mainstream media missed it, and caused his resign. MSDN blog, a group of blogs of Microsoft employees and product teams, became the information and feedback center of Microsoft related technologies.
Businessman will never ignore such a large group. For one, Google’s AdSense, which deliver content-relative ads to pages, became ubiquitous on blogs, and some bloggers can earn a lot of money by talking about certain products.(Gard,L. Dec 13, 2004). For another, many people tried a lot to post unwanted blog spam to promote the spammer’s website, and made major search engines changed their page ranking system.
Conclusion
. Despite of some tiny problems, more and more people will start blogging, entering blogosphere, and try to promote themselves. Blog will become as popular as email, or even more. Popular.
Reference
Associated Press. Conference examines blogs’ impact on news.( Nov 14, 2004). eWeek.
Blood, R..(September 7, 2000) Weblogs: A history and perspective, Rebecca’s Pocket... <http://www.rebeccablood.net/essays/weblog_history.html”>.(April 14, 2005)
Gard,L. (Dec 13, 2004). The business of blogging; explosive growth means web logs are suddenly in Madison Avenue’s sights. Business Week. 2004(3912) p117.
Macht J.( Sept 27, 2004). How to knock down a Story: THE BLOGGERS. Time 164(13). p30.
Quarterly updates to OED Online (March 13, 2003) Oxford English Dictionary<http://www.oed.com/help/updates/motswana-mussy.html>.(April 14, 2005)
Champ de Coquelicots, Environs de Giverny
- 14 April 2005
I fell comfort with the first look to Champ de Coquelicots, Environs de Giverny. It is basically green, with red flowers in the center and dirty yellow sky at the top. The usage of implied lines, height of plants and shadows expressed the shape of the field.
Lincoln’s assassination
- 12 April 2005
The assassination of A. Lincoln on April 14, 1865 may be the result of his making enemies by his good qualities and acts. He represented the poor, freed the slaves, which may have led to him being killed.
4-11日全球互联网群发性故障
- 12 April 2005
美国中部夏令时4月11日,本市多个因特网服务商,包括Yahoo DSL和得克萨斯州教育网的服务短时间中断。根据报道,在同一时间部分中国和澳洲因特网服务商的服务也出现中断。
一些论坛有发帖声明此次网络故障是由于中国电信遭受到了日本黑客的攻击,号召向日本发动网络攻击。也有人声明上海的国际出口海底光缆被一艘日本托船故意搞断。还有人声明日本黑客在其网站宣布对这次攻击负责,理由是CNN网的投票中国人投反对票的人越来越多,所以日本黑客攻击中国网络,是为了让中国人无法参加投票。
Summary
- 11 April 2005
Story: http://www.reuters.com/newsArticle.jhtml?type=internetNews&storyID=8109019
SEATTLE (Reuters) - Microsoft Corp. The world’s largest software maker, launched on Wednesday its MSN service allowing Web users to publish and track each other’s blogs, or online journals.
Redmond, Washington-based Microsoft said that the free blogging service, called MSN Spaces, had attracted 4.5 million users during its preliminary test phase, which began last December.
Microsoft’s MSN Internet division also launched the latest version of its MSN Messenger for swapping instant messages and sharing photos.
Blogs, short for “Web logs,” have become a popular way for Web users to publish their opinions, observations and information on the Internet to a wide audience.
“We expect this to have wide appeal outside the United States,” said Blake Irving, vice president of communication services at Microsoft’sMSN Internet division, adding that MSN Spaces would be available in 15 languages in 30 markets.
Yahoo Inc., MSN’S rival, also launched a new Web log and social networking service called “Yahoo 360.” Google Inc., Microsoft’s newest rival in online search and Web-based services, also has a popular blogging service called Blogger that the Web search company bought in 2002.
According to Reuters, Microsoft is expanding its online services to fit new demands, such as blogging and winks in MSN Messenger. This step is likely to invoke a new round of service competitions among major online service providers, such as Yahoo and Google.
Summary:
Microsoft is updating its service to fit new demands, such as blogging, and attracted a lot of users in a short time. This step may boost competitions between Microsoft and its rivals.
Response:
In modern internet age, a successful new service will be followed with a competition in no time. After Google announced its GMail plan a year ago, which provide record high 1GB free email accounts, almost every free major email service provider increased their user storage limit, such as Hotmail (from 2M to 250M) and Yahoo (from 6M to 1G) After Google acquired Blogger.com, Microsoft began the beta test of MSN spaces, which include major function of old MSN groups and introduced the blog function. It is still too early to say who will win this the competition, but the immediately result of it is the improvement of user satisfaction, which is the most effective way to maintain user’s loyalty and attract potential users.
Question:
What is you email service provider? Why did you select it?
Why do you check many email boxes, if you have more than one email service provider?
How will you react if the service provider sends advertisement email to your email box, or adds advertisement to your homepage?
How will you react if you are told that you email service is not longer free?
How you think about personal online publishing, such as blogging?
Do you think internet censorship may affect personal online publishing?
Blogging
- 11 April 2005
Given the graphs from “Population, Poverty and the Local Environment”, I conclude that the decreasing percentage of American women’s share of paid employment is a contribution of increasing unpaid working in home, when the number of children increases. For one, in the second graph, the unpaid house work-load increases gradually until the number of children exceed 7, which showed expressed a sharp increase for 7 or more children. Generally speaking, an American woman who has more children would have more house work. For another, according to the third graph, the percentage of American women’s share of paid employment steadily decreases when the number of children increases. That is to say, the percentage of American women’s share of paid employment steadily decreases when unpaid house working gradually increases. According to graph “Federal Expenditures, 1983 TOTAL: 624.2 Billion”, I found that the money spent on national defense and international relations is too much, and more money should be invested in welfare. While the other major countries, such as China and Russia, spend less on national defense either in amount or in percentage, and more on welfare, maintain such high military expenditure is not efficient, and this outcome has less little benefit to the economy than welfare programs. According to Reuters, Microsoft is expanding its online services to fit new demands, such as blogging and winks in MSN Messenger. This step is likely to invoke a new round of service competitions among major online service providers, such as Yahoo and Google.. In modern internet age, a successful new service will be followed competition in no time. After Google announced its GMail plan a year ago, which provide record high 1GB free email accounts, almost every free email service provider increased their user storage limit, such as Hotmail (from 2M to 250M), Yahoo (from 6M to 1G), Sina (from 50M to 1G) and Netease (from 50M to 2G). After google acquired Blogger.com, Microsoft began the beta test of MSN spaces, which include major function of old MSN groups and introduced the blog function.
It is still too early to say who will win this the competition. But the immediately result is the improvement of user satisfaction. That is the most effective way to maintain user’s loyalty and attract potential users.
Xu Beihong
- 08 April 2005
influential Chinese artist and art educator who, in the first half of the 20th century, argued for the reformation of Chinese art through the incorporation of lessons from the West.
Xu was first taught art in his childhood by his father, Xu Dazhang, a locally known portrait painter. In the period from 1919 to 1927, he studied in France and graduated from Paris Higher Art School He returned to China in 1927 and successively worked as a teacher in Shanghai South China College of Fine Arts He went to Beijing in 1946 and worked as the President of Public Beijing Arts and History School and the Chairman of Beijing Art Workers Association. In 1949, he was elected as the Chairman of National Painters Association by the representative conference of all-China literary and art workers.
This painting exemplifies Xu Beihong’s fusion of East and West. While employing the conventional Chinese medium of brush and ink, Xu’s drawing technique is purely Western. Rather than defining the horse with calligraphically energized outlines, Xu sketches the horse impressionistically with light and dark washes and uninked areas of white paper integrated to suggest the modeling effects of light and shadow. Reflecting studies from life, the horse’s complex pose—foreshortened body, twisting neck, and naturalistically placed legs—is deftly rendered in a few well-practiced brushstrokes, while the layered tones of the animal’s tail give the impression of movement.
Recalling a long tradition of the horse as an emblem of state, Xu Beihong’s spirited animals appeal to national pride. He painted so many of them that they have become synonymous with his name. This early example, still fresh in his mind and in execution, was done for Qi Baishi’s son on the occasion of a visit by Xu to Qi’s house. Qi explains in his inscription that Xu failed to bring his seals, which is why the painting lacks an impression.

在使用浏览器控件的程序中判断HTTP错误
- 07 April 2005
在自动化浏览器控件提交表单之后,浏览器控件可能会在浏览超时时重定向到一个错误页面。有时需要用代码控制页面返回之后重新提交表单。
IE6.0之前的版本浏览器控件没有获得HTTP状态的接口。一个很依赖于网站设置的方法是,捕获TitleChange事件,在页面标题包含”找不到页面”或者”Page Not Found”之类的字符串时,认为浏览失败。另一个方法是处理BeforeNavigate2事件,用winhttp api单独和服务器连接,使用HttpQueryInfo来查询,相应参数是HTTP_QUERY_STATUS_CODE。在这之前,你可能要在打开URL时用INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP | INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS标志来防止服务器的重定向。
Summary Assignment
- 07 April 2005
Given the graphs from “Population, Poverty and the Local Environment”, I conclude that the decreasing percentage of American women’s share of paid employment is a contribution of increasing unpaid working in home, when the number of children increases. For one, in the second graph, the unpaid house work-load increases gradually until the number of children exceed 7, which showed expressed a sharp increase for 7 or more children. Generally speaking, an American woman who has more children would have more house work. For another, according to the third graph, the percentage of American women’s share of paid employment steadily decreases when the number of children increases. That is to say, the percentage of American women’s share of paid employment steadily decreases when unpaid house working gradually increases.
early working vs studying
- 04 April 2005
early exhausted life. I agree her point of view, because I think studying has a higher priority than working in early life, since studying is more easier when the students are young, and the salary will be higher if they succeed in their education.
Notes
- 01 April 2005
Should GM(Genetic Modified) food production be controlled by Government?
Q(Drug) Why fostering drug plants is baned and fertilizing GM food is not?
A:Drugs can benefit only some patients and will not benefit others’s health. Some more effective replacements can also be composed in chemical labs.
GM food can prevent starvation and its side effect is not known clearly. No more effective replacement found.
Q(Clone) Why another genetic technology, Cloning, is baned and producing GM food is not?
A: Cloning human is baned mainly for moral concern, and this concern does not occur for GM food.
??Anyway, global warming appears to be a bigger threaten to global ecosystem, since its effects are already discovered.
?? Why not use the fund to support GM research to ensure its security?
Trade war over genetically modified food
- 30 March 2005
Trade war over genetically modified food From Wikipedia, the free encyclopedia.
The European Union and the United States have strong disagreements over the EU’s regulation of genetically modified food. The US claims these regulations violate free trade agreements, the EU counter-position is that free trade is not truly free without informed consent.
In Europe, a series of unrelated food crises during the 1990s have created consumer apprehension about food safety in general, eroded public trust in government oversight of the food industry, and left some consumers unwilling to consider “science” to be a guarantee of quality.
This has further fueled widespread ([1] (http://terresacree.org/sondage.htm)) public concern about genetically modified organisms (GMO), in terms of potential environmental protection (in particular biodiversity), health and safety of consumers. Critics of GM foods contend that there is strong evidence that the cultivation of a genetically modified plant may lead to environmental changes. However, whether a genetically modified plant can itself harm the environment is a matter of controversy among scientists.
Although some claim genetically modified foods may even be safer than conventional products, many European consumers are nevertheless demanding the right to make an informed choice. Some polls indicate that Americans would also like labelling but it has not yet become a major issue. New EU regulations should require strict labelling and traceability of all food and animal feed containing more than 0.5 percent GM ingredients. Directives, such as directive 2001/18/EC, were designed to require authorisation for the placing on the market of GMO, in accordance with the precautionary principle. (see also Tax, tariff and trade).
Despite the fact that no scientific study has yet shown genetically modified food to be harmful to humans, a 2003 survey by the Pew Research Center found that a majority of people in all countries surveyed felt that GM foods were “bad”. The lowest scores were in the US and Canada, where 55% and 63% (respectively) were against, while the highest were in Germany and France with 81% and 89% disapproving. The survey also showed a strong tendency for women to be more opposed to GM foods than men. [2] (http://people-press.org/commentary/display.php3?AnalysisID=66)
In 2002, Oregon Ballot measure 27 gave voters in that state one of the first opportunities in the United States to directly address the question. The measure, which would have required labeling of genetically engineered foods, failed to pass by a ratio of 7 to 3.
Friedrich-Wilhelm Graefe zu Baringdorf, member of the German Green Party and vice president of the Landwirtschaftsausschuss (committee of agriculture) of the European Commission said on the 1 July 2003: “In America 55% of the consumers are against GM food and 90% in favor of a clear labelling. The Bush government is ignoring the demand of his own people.”
Contents [showhide]
[edit]
European ban on genetically modified crops In 1999, a 4 year ban was pronounced on new genetically modified crops. At the end of 2002, European Union environment ministers agreed new controls on GMOs that could eventually lead the then 15-members bloc to reopen its markets to GM foods. European Union ministers agreed to new labelling controls for genetically modified goods which will have to carry a special harmless DNA sequence (a DNA code bar) identifying the origin of the crops, making it easier for regulators to spot contaminated crops, feed, or food, and enabling products to be withdrawn from the food chain should problems arise. A series of additional sequences of DNA with encrypted information about the company or what was done to the product could also be added to provide more data. (see Mandatory labelling).
[edit]
Agricultural trade market between USA and Europe The European Union and United States are in strong disagreement over the EU’s ban on most genetically modified foods.
The value of agricultural trade between the US and the European is estimated at $57 billion at the beginning of the 21st Century, and some in the U.S., especially farmers and food manufacturers, are concerned that the new proposal by the European Union could be a barrier to much of that trade.
In 1998, the United States exported $63 million worth of corn to the EU, but the exports decreased down to $12.5 million in 2002.
The drop-off might also be due to falling commodities prices, less demand due to the recession, U.S. corn being priced out of foreign markets by a strong dollar, and importing countries reaction to the planned invasion in Iraq. But farm industry advocates blame the EU’s ban.
[edit]
European proposal over genetically modified food The European Parliament’s Committee on the Environment, Public Health and Food Safety[3] (http://www.europarl.eu.int/comparl/envi/default_en.htm) proposal, adopted in the summer of 2002 and expected to be implemented in 2003 has deep cultural roots, which are difficult to understand for the US agricultural community. It requires that all food/feed containing or derived from genetically modified organisms be labelled and any GM ingredients in food be traced. It would also require documentation tracing biotechnological products through each step of the grain handling and food production processes.
The new European tax, tariff and trade proposal would particularly affect US maize gluten and soybean exports, as a high percentage of these crops are genetically modified in the USA (about 25 percent of US maize and 65 percent of soybeans are genetically modified in 2002).
The ultimate resolution of this case is widely thought to rest on labelling rather than food aid. Many European consumers are asking for food regulation (demanding labels that identify which food has been genetically modified), while the American agricultural industry is arguing for free trade (and is strongly opposed to labelling, saying it gives the food a negative connotation).
Lori Wallach, director of Public Citizen’s Global Watch indicates that American agricultural industry is “using trade agreements to determine domestic health, safety and environmental rules” because they fear that “by starting to distinguish which food is genetically modified, then they will have to distinguish energy standards, toxic standards that are different than those the European promotes”.
The American Agricultural Department officials answer that since the United States do not require labelling, Europe should not require labelling either. They claim mandatory labelling could imply there is something wrong with genetically modified food, which would be also a trade barrier. Current U.S. laws do not require GM crops to be labelled or traced because U.S. regulators do not believe that GM crops pose any unique risks over conventional food. Europe answers that the labelling and traceability requirements are not only limited to GM food, but will apply to any agricultural goods.
The American agricultural industry also complain about the costs implied by the labelling.
[edit]
Official US complaint with the WTO The ban over agricultural biotechnology commodities is said by some Americans to breach World Trade Organisation rules. Robert B. Zoellick, the United States trade representative, indicated the European position toward GMO was thought of as “immoral” since it could lead to starvation in the developing world, as seen in some famine-threatened African countries (eg, Zambia, Zimbabwe, and Mozambique) refusing to accept US aid because it contains GM food.
Zoellick’s critics argue that US concern over Third World starvation is merely a cover for other issues. Some money for development aid is used by the American government via the World Food Program (WFP) to help their farmers by buying up overproduction and giving it to the UN organisation. GM-scepticism interferes with this program. American farmers lost marketshare in certain countries after changing to genetically modified food because of sceptical consumers.
Another European response to the claims of immorality is that the EU gives 7 times more in development aid than the US.
In May 2003, after initial delay due to the war against Iraq, the Bush administration officially accused the European Union of violating international trade agreements, in blocking imports of U.S. farm products through its long-standing ban on genetically modified food. Robert Zoellick announced the filing of a formal complaint with the WTO challenging the moratorium after months of negotiations trying to get it lifted voluntarily. The complaint was also filed by Argentina, Canada, Egypt, Australia, New Zealand, Mexico, Chile, Colombia, El Salvador, Honduras, Peru and Uruguay. The formal WTO case challenging the EU’s regulatory system was in particular lobbied by U.S. biotechnology giants like Monsanto and Aventis and big agricultural groups such as the National Corn Growers Association.
EU officials questioned the action, saying it will further damage trade relations already strained by the U.S. decision to launch a war against Iraq despite opposition from members of the U.N. Security Council. The US move was also interpretated as a sanction against EU for requesting the end of illegal tax breaks for exporters or face up to $4 billion in trade sanctions in retaliation for Washington’s failure to change the tax law, which the WTO ruled illegal four years ago.
[edit]
Ratification of the Biosafety Protocol by the EU parliament In June 2003, the European Parliament ratified a three-year-old U.N. biosafety protocol regulating international trade in genetically modified food, expected to come into force in fall 2003 since the necessary number of ratification was reached in May 2003. The protocol lets countries ban imports of a genetically modified product if they feel there is not enough scientific evidence the product is safe and requires exporters to label shipments containing genetically altered commodities such as corn or cotton. It makes clear that products from new technologies must be based on the precautionary principle and allow developing nations to balance public health against economic benefits.
Jonas Sjoestedt, a Swedish Left member of the EU assembly, said that “this legislation should help the EU to counter recent accusations by the U.S administration that the EU is to blame for the African rejection of GM food aid last year”.
The United States did not sign the protocol, saying it was opposed to labeling and fought import bans.
[edit]
Lifting of the ban On July 2, 2003, the European parliament approved two laws that will allow the EU to lift its controversial ban on GM food. The first law will require labelling for GMO-containing food above 0.9%. It will be applied for human food and animal feed as well. However, animals fed with transgenic cereals will not be included in the labelling. The second law will make mandatory labeling of any food contaminated by non-authorized GMO (in the Union) over 0.5%. This amount will be set for 3 years. After 3 years, all non-authorized GMO contaminated food will be banned. Traceability of GMO products will be mandatory, from sowing to final product. At that time, it was expected the ban would be lifted in the fall of 2003.
However, on the 8 December 2003, the European Commission rejected approval of a controversial genetically modified sweet corn.
Six countries were in favour (33 votes - Spain, UK, Netherlands, Finland, Sweden, Ireland) three abstained (25 votes - Germany, Belgium, Italy), while six countries voted against (29 votes - Denmark, Greece, Luxembourg, Austria, Portugal, France).
That new GM sweet corn, BT-11, produced by Syngenta was modified to produce its own insecticide and is also resistant to a herbicide. It was rejected for the following reasons :
The new labelling and traceability regulations are still not in place The proposal did not include post-approval monitoring of health effects. Some safety questions have not been fully addressed.
Geert Ritsema of Friends of the Earth Europe said: “There is clearly no scientific consensus over the safety of this modified sweet corn. The decision not to approve it is a victory for public safety and common sense. The European Commission now has the opportunity to re-think its position. The public doesn’t want to eat GM foods and question marks remain over its safety. The Commission must put the well-being of European citizens and their environment before the business interests of the US Government and the biotech industry.”
The approval of that gmo corn would have been de facto considered as a lift of the moratorium on new GMO foods. Decision to lift the moratorium might occur in spring 2004.
[edit]
Effect of cultural differences between US and Europe The U.S. population has, historically, placed a considerable degree of trust in the regulatory oversight provided by the U.S. Department of Agriculture and its agencies. There is little tradition of people having a close relationship with their food, with the overwhelming majority of people having bought their food in supermarkets for years. But the 2003 survey by the Pew Research Centrer showed that even in the U.S. 55% see GM food as “bad” food.
In Europe, and particularly in the U.K., there is less trust of regulatory oversight of the food chain. In many parts of Europe, a larger measure of food is produced by small, local growers using traditional (non-intensive & organic) methods (see local food).
See also: Trade war
[edit]
External links
Talk:Trade war over genetically modified food
From Wikipedia, the free encyclopedia.
Is Canada not involved in this mess? Rmhermen 22:36 30 Jun 2003 (UTC)
hum ? Which mess ? Rmhermen, since you are involved here…I wrote most of this article. Please, feel free to copy edit it strongly if you think it is necessary for fluidity of expression ; Thanks User:anthere I wonder if the article as written doesn’t underplay the importance of agricultural protectionism. One of the advantages of forcing GM food labeling, I would think, is that it would give an advantage to small “organic” farmers. This seems quite convenient, given that the EU countries consider preserving the “quaintness” of their countrysides a cultural priority, while the death of the family farm seems to be more generally accepted in North America. Europe certainly wouldn’t be alone in feigning concern over the supposed safety of foreign food in order to protect their own industries (look at what Japan is doing right now re: mad cow disease). – stewacide 23:21 30 Jun 2003 (UTC)
Sorry, but you hit with your “feigning” all the people that are worried. I am worried. So you directly hit me. You are right, agricultural protectionism is involved. But please take care when you just insult hundred of millions of people. (I could also use words on the same level of yours: In Europe we have still the culture to disagree on certain points and not to follow our leaders blindly… do you feel better now? ;-) Fantasy 05:39 1 Jul 2003 (UTC) the usage of “feigning” is totally out of line :-) We don’t feign. I would like to state that I wrote most of the initial article, and as such, it is only my perspective, and not enough to cover the topic by far. I tried to be far on both sides, but I am biased :-) In particular, it would be nice to have more on other countries positions on the matter. This is a planetary war, not to be reduced to US EU only. Yes, it would deserve much more on protectionism. Because this also very important. However, do not give too much importance in the topic to the advantage meant for the organic farmers. At least in my country (which is the first producer in the EU, so is of major importance in this trade war, since being the primary benefactor of protectionism), protectionism is meant to protect traditional agriculture, MUCH more than organic farming. We are first using traditional intensive technics, and the goal in requiring labels is to protect consumers, not organic farmers or organic consumers. Labels are envision for all food. There might be a different trend in other european countries, though I think generally not. ant What I meant was that the governments in European countries may be overplaying the risks of GM foods as a cover for protectionism. I have no doubt that many citizens are personally fearful.
well, if you can find relevant references of people supporting this view, that is just fine. Anthere Also, I agree that this shouldn’t be characterized as just a US vs. EU thing. In fact, the US and EU are traditional allies on issues of agricultural trade in that they’re both strong protectionists. The alliance between the US and the pro-free-trade “Cairns Group” countries (Canada, Australia, and the developing world) is quite unusual. There are probably other countries (Japan?) that side with the EU for one reason or another.
Also, I wonder about strains within EU, such as between food exporters like France and food importers (Italy? Spain?).
Well, you can wonder of course :-) But this has nothing to do with this current discussion :-) It should belong to another article. Since there is a moratorium in Europe, exporting countries such as France do not export gmo toward food importers. Anthere p.s. If that “follow our leaders blindly” thing was a jab at the US, no dice, I’m Canadian (Happy Canada Day to ya’ :)
Also, Europeans accusing North Americans of having a mob mentality is pretty ironic IMHO. When was the last time we had a war or genocide in North America? Europeans and your silly ethnic nationalism; when will you learn!?! ;) – stewacide 07:00 1 Jul 2003 (UTC)
Stewacide, you did not get the point. I just tried to explain you (probably with the wrong example, but it seems that you got insulted, so the effect was right) that YOU ARE HURTING PEOPLE. If you want to discuss something, would it not be better to concentrate on the facts istead insulting people with a different opinion than yours with “feigning”. Fantasy 11:57 1 Jul 2003 (UTC) I think, it is better to restart the discussion:
[edit]
agricultural protectionism versus food safety
stewacide thinks, that the EU is using worries about food safety to achieve agricultural protectionism.
Fantasy and Ant agree that this is involved. But the main goal in requiring labels is to protect consumers, not organic farmers or organic consumers. Let the consumer decide, if they want to buy modified food.
Perhaps “Genetic Engineering” should be added to the list of Demons and devils that someone is compiling, it certainly sounds very dangerous. Ping 07:11 1 Jul 2003 (UTC)
Despite the fact that no scientific study has yet shown genetically modified food to be unacceptably harmful to people …
Has any study found GM foods to be acceptably harmful to people? Evercat 17:56 2 Jul 2003 (UTC)
That’s what I thought when I read it. I’m going to remove the “unacceptably” untill someone can show a study that indicated otherwise. – stewacide there were some “unacceptable” problems reported with severe cases of allergy. But the gmo have been removed. I am not aware of current relevant studies precisely on “acceptable” ones :-). However, I know of current environmental pbs which are considered acceptable. Fun :-) Despite the fact that no scientific study has yet shown genetically modified food to be harmful or harmless to humans
How can any study or any number of studies ever prove something to be entirely “harmless”? – stewacide
IT CANT - it is impossible to prove a lone hypothesis, one can only accumulate evidence that is consistent (or not) with a system of hypotheses that constitute a philosophy. There will always be room for your hypothesis to turn out false, because other assumptions may be violated. Add to this that (the departing agriculture minister indicated) British field trials and other government funded research has intentionally neglected any ‘indirect’ routes by which GMOs may cause harm to humans, such as damage to the ecosystem. So I am worried too (it’s not like you can take GM out of the ecosystem if you got it wrong, and it’s not as if Genetic Engineering is equivalent to the current system of genetic design).
I was pointing out why the addition of the word “harmless” was meaningless and lacking in NPOV. It gives the reader the impression that insuffecient research has been carried out, when in fact no ammount of research could ever be suffeceient to make such a claim (I’m sure there’s a fancy latin name for this type of rhetorical falacy). Would anyone object to me changing it back to “Despite the fact that no scientific study has yet shown genetically modified food to be harmful to humans…” ? – stewacide 07:19 4 Jul 2003 (UTC) I don’t think your proposed wording is true - IIRC some researchers added genes for manufacturing toxins to some previously edible food organism, then demonstrated that it did indeed become toxic… So we need to restrict the statement to stuff actually intended for human consumption (and to avoid giving a misleading impression, to indicate the extent to which people have looked - of course they wont have found a mechanism if they haven’t looked at all - the amount of information in the statement is proportional to the amount of research done.). I wonder if Trade in genetically modified food wouldn’t be a better title? Calling it a “trade war” may have NPOV problems. – stewacide 18:56 2 Jul 2003 (UTC)
But If you say “trade war” every one knows what we are talking about. Wikipedia uses many times the “used” words, not necessarely the “correct” word. Bush is going to court against EU, and if he does not win, I don’t want to know what is next. (By the way: was the “cold war” a war?)Fantasy 21:10 2 Jul 2003 (UTC) it might be different another day. But currently, the trade is a war. An economical war. And that is what the article is talking about. Just talking about trade of a specific product would not perhaps justify an article. In all honestly, I think it would be prudery (politically correct) to rename an article without the “war” word, just to talk about “trade war” in it. And yes, it would be misleading on the topic indeed :-) ant (the cold war was a war imho) of course, you are all welcome to move that to the best host article :-) But…if we start saying GMO plants have not been scientifically been proved to be dangerous, it is just fair that information is *really* added on the topic, yes ? User:anthere
I think that most of this information on Roundup should be moved to its page, not here. Rmhermen 19:27 3 Jul 2003 (UTC)
I see no pb with that. But, I mostly wrote this because it was added there were no credible scientific proofs GMO could be bad for the environment :-) I think I even forgot to look for RoundUp article. The only thing important imho is
a high number of currently cultivated gmo are those resistant to glyphosate Round up sales have skyrocketted since GMO surfaces increased, and farmers cultivating gmos tend to use much more than before. Round up herbicide active ingredient is glyphosate Glyphosate (also cancerogenous- should I also add it ?) and other Round up ingredients have been proved (relevant scientific studies) dangerous at high quantities, safety issue for farmers, toxic for fauna, less degradable than claimed by Monsanto (even if it is *far* less toxic than plenty other herbicides) Consequently -> use of GMO -> use of round up -> more glyphosate -> pb for humans, fauna, water quality…
Add cases of allergies, increase resistance, bt issues, studies showing diffusion of genes from one species to another (I have some virus diffusion at hand), I think that ultimately, the sentence “no credible studies have shown that some gmo have proven dangerous for the environment” should…just perhaps…be rephrased a bit ?
When done, we could perhaps explain why Gmos are good for a change ?
Anthere |
141, though I agree we should avoid to repeat unduly similar linkages in articles, I also think your way to hunt any double link is not a very good practice sometimes. When an article is - at two different places - referring to two different aspects of another article, it makes sens to orient the reader to this article again, not to let him search several paragraphs above the reference of this article he has maybe not focused on. This is very common practice in numerous articles.User:anthere
Polls done in 2000, (Libération), 73% of French people worried by presence of GMO in food (77% for women)
polls done end of 2002 show (libération)
French people totally opposed 48%, opposed 24 %
polls in april 2002 (eurobarometre)
Only 31% of europeans would encourage GMO in food.
Spain, favorable 35%
Germany 52% strongly opposed
England, 25% favorable
Basically, 3 persons among 4 opposed and worried, that does not mean “some” but “widespread”. Imho. User:AnthereYknow, I coulda sworn waaay more countries than the US were fighting the EU in the WTO over this. – Penta.
It seems to me that this article has a lot of irrelevant references to the Iraq war. Jtrainor 18:06, 6 Dec 2004 (UTC)
genetic discrimination
- 29 March 2005
Discrimination of gender, race in labor market has been a chronic problem in industrialized periods in United States. The advance of genetic technology produces a new kind of discrimination, genetic discrimination. In the article “Gene mapping may foster discrimination”, Paul Racer pointed out that a survey revealed “7 companies are using genetic testing for job applications or employees”, according to the journal Science. However, I think it may cause public fear for genetic tests and researches and can be exploited to discriminate candidates.
For one, since the public already have a skeptical attitude toward genetic engineering, the risk of future exploitation of personal genome, may cause some people to refuse taking genetic tests, and may drop off from genetic research programs, and then delay the progress of science. For another, although it is a great step to discover the relationship between gene and disease, the relationship itself is still a “possibility” of certain illness, and everybody would has some genes vulnerable to this or that diseases, and the decision of denying a qualified candidate by a kind of disease can be exploited to discriminate candidates.
The Schiavo case
- 24 March 2005
The Schiavo case
On Feb. 11, 2000, Pinellas Circuit Court Judge George Greer claimed that there was ‘’clear and convincing evidence’’ that Terri Schiavo would want to disconnect her feeding tube. Theresa (or Terri) Marie Schindler Schiavo, a woman in persistent vegetative state (PVS) for 15 years who suffered a severer brain damage on Feb. 25, 1990 and is suffering the third removal of live support, thus could pass away at any moment now because nutrition and hydration supplies was cut since March 18, 2005 3:00 p.m. EST. This removal is request by Michael Schiavo, the husband and legal guardian of the 41-years-old woman against the wish of her parents. The parents of Terri keep appealing to restore her feeding tube and, despite of the rejection of the court, should regain the guardianship and the right of choose the future of their daughter because of the revealing of new evidences about her medical status, her willing and, as a result, the legacy of the request.
For one, her medical status is still in debate; hence the current condition should be clarified before any decision about life termination. While Washington Times reported ”Nineteen Florida judges and six court appointed physicians have concluded Schiavo is in a persistent vegetative state, allowing the removal to proceed Friday after seven years of court wrangling.”(Washington Times, March 23, 2005).However, CNN reported that “in the affidavit filed on behalf of the state, Dr. William Cheshire, a board-certified neurologist at the Mayo Clinic, stated that his review of Schiavo raises serious doubt about the current diagnosis. He said she displayed context-specific reactions to stimuli, such as upbeat music, colorful objects or the arrival of people into the room.” (CNN, March 24, 2005).
For another, no documentation will of Terri existed to support her husband’s word, which indicates that she does not want to live artificially. “She didn’t leave any written instructions.” He admitted (AOL Journals, March 15, 2005).In another show named “Larry King Live”, he gave another claim: “We didn’t know what Terri wanted, but this is what we want. ”(CNN, March 18, 2005). Although this statement is not made in front of a court, the contradiction put the “clear and convincing” evidence finding into doubt., which made by Judge Greer to withdraw the feeding tube from Terri.
Furthermore, Although Michael Schiavo rejected offers to when Michael Schiavo, a husband who has been living with another girlfriend for 10 years and has two children by her, might have disqualified himself for a legal guardian by failing to implement the guardianship plans and requesting the death of his wife. In fact, there have been 3 guardians ad litem appointed for Terri in last 15 years, namely John H. Pecarek, Richard Pearse, Esq. and Dr. Jay Wolfson. As a result, decision made by such a doubtable guardian should have less importance than her parents wish to keep their daughter alive.
After these analyses, the feeding tube should be reconnected before the contradictions, namely physical condition and will of Terri Schiavo, are solved. It would be too late if it is not reestablished immediately. Since her husband is not a qualified guardian, her parents should receive her guardianship and then decide her fate.
Reference:
l AOL Journals (March 15, 2005).Transcript: Michael Schiavo on ‘Nightline’ ..http://journals.aol.com/justice1949/JUSTICEFORTERRISCHIAVO/entries/630 (March 24, 2005)
l CNN (March 24, 2005) Florida judge rejects state custody bid in Schiavo case< http://www.cnn.com/2005/ALLPOLITICS/03/23/schiavo.jeb.bush/?section=cnn_allpolitics> (March 24, 2005)
l CNN (March 18, 2005) Transcript: Larry King Live<
http://transcripts.cnn.com/TRANSCRIPTS/0503/18/lkl.01.html >(March 24, 2005)
l Washington Times. (March 23, 2005) House GOP files Supreme Court brief on Schiavo<http://washingtontimes.com/upi-breaking/20050323-051313-8081r.htm> (March 24, 2005)
示例:在MFC程序中集成.Net中的控件
- 19 March 2005
从.Net Framework 1.1开始,.Net控件可以以ActiveX的方式被集成到非托管宿主中——但是官方的支持只对于使用托管C++的MFC程序。Chris Sells在2003年3月份的MSDN杂志中描述了这样一个示例(https://web.archive.org/web/20030304083154/http://msdn.microsoft.com/msdnmag/issues/03/03/WindowsForms/default.aspx)。这个示例使用的代码稍微繁琐,而且没有描述如何处理控件的事件。MFC 8.0增加了一系列这方面的支持来把这个集成过程简单化(参考http://msdn2.microsoft.com/en-us/library/ahdd1h97.aspx)。这使得在MFC程序中使用.Net中的一些比较好用的类,例如System::Windows::Forms::PropertyGrid比以前容易多了。
举例来说,要在MFC的基于对话框的程序中使用System::Windows::Forms::PropertyGrid控件,首先创建一个基于对话框的程序,添加必要的引用:
《转换指南: 将程序从托管扩展C++迁移到C++/CLI》译后
- 17 March 2005
终于把Stan Lippman先生的这篇文章译完了。从去年4月在全球MVP峰会上拿到这篇文章的手稿到现在,差不多一年过去了。虽然当时的Visual Studio 2005还不支持一些语法,但是我和董颖涛对新的C++/CLI语言都很感兴趣,在当时就讨论过翻译的问题。之后我就开始翻译这篇文章,但是进度一直很慢——主要是杂务太多、语言上的困难(尽量避免误解和词不达意的情况,以及斟酌用词的选择)。在1月份完成了全文之后,看到了Sunhui的一篇文章(http://community.csdn.net/expert/Topicview1.asp?id=3834281),觉得附录里面讲到的一些内容或许一些人也有兴趣,所以继续翻译附录的工作,幸好现在是春假,比较有时间,终于在今天完成了。译文目前在http://blog.csdn.net/jiangsheng/archive/2004/10/18/140450.aspx可以访问,希望读者指正。
在翻译过程中得到了曾毅的帮助,得以联系到Stan Lippman先生,在此一并感谢。
Telephone Tips
- 17 March 2005
Immigration Past and Present
- 08 March 2005
Immigration Past and Present
Reasons: Economic/Political/Natural Disasters
Economic
2 Kind of people
Not want to leave,Great press
Adventure , like to move
View themelves and nation
Briton consider self settlers ,not think move,but settling land for mother country
1
2 1860-1890(10M arrived)
Maj from Ger, Irelandand Great Britein, as well as Denmark, Norway and Sweden
why European leave?
Improved ocean transport
Chinese diet
- 08 March 2005
Chinese is famous for its food. In the history, Chinese have tradition to eat a wild range of foods and does not have a good eating habit, but it is changed in recent years. Chinese not only changed some food sources, but they also changed the ways they eat.
First, some foods are not important in Chinese diet as before. For one, Rice used to take a great part of Chinese diet, but rice is less ate now before because people are getting rich and have more choice on food, such as meat or fast food. As a side effect, diet foods consumption is increasing. For another, people stopped eating some wild animals because they are frightened by the spread of SARS. A characteristic of Chinese diet culture is that people eat almost all animals, such as monkey, bear, crow, toad, snake, mouse, spider, roach and scolopendra, but after the burst of SARS, people don’t eat them anymore.
Second, people changed their eating habits a lot. Not only modern lifestyle prevent people from waiting hours for a complex cooking, but also a lesson taught by the spread of SARS rejects some unhealthy traditional habits. In modern life, people prefer fast food because they have only little time for them. Long time cooking, as a contrast, is unlikely happen in modern lifestyle. One off dishware is more often used because of health consideration.
Although China has a long history about food, the Chinese changed a lot in food area. This is caused by globalization and preventing some diseases.
Working Tourism
- 06 March 2005
Sustainable Tourism in Mozambique, Part III
Working Tourism
Not only does Mozambique have many natural and culture tourism resources, but she also has great potential of working tourism opportunities. Working tourism in Mozambique is still in the beginning for historical and economical reasons. World Bank reported that “The resource base is seriously threatened by population growth, extreme poverty, poor management and utilization and lack of financial resources.” (Mozambique - Transfrontier Conservation Areas and Tourism Development Project, 2004). These potential working tourism positions distribute in many areas, such as education, infrastructure development and natural and culture conservation development.
First, education positions are needed since local communities have little recognitions of tourism benefits and opportunities. Mr. Albino Celestino Mahumane, the Ministry of Tourism of Republic of Mozambique, reported that Mozambique had a very low level of schooling and “link between these resources and communities is crucial for development in the medium and long term.” (Mahumane, A. C., 2001). Possible positions could be English and Health, because there are many useful academic resources in these fields.
Second, positions in infrastructure development, such as roads, airports, telecommunications, water and electricity, health services, should open to attract tourists. To develop tourism in inland area, more transportations and accommodations need to be built while most of these are near the coast currently. (Mahumane, A. C., 2001). Health service is another problem that needs assisting. Again, existing technologies and human resources from foreign tourists can be used to help efforts in these improvements.
Last, increasing working positions for tourists in these areas not only help ecotourism projects with financial benefits but also with their skills and experiences. For one, “tourism in Mozambique is based on its natural resources” (Mahumane, A. C., 2001). For another, “Development of ecotourism projects does require cash and a good investment climate and some participants in the seminar felt that there were often considerable difficulties in securing finances for ecotourism projects.”(Seminar on Planning, 2001).
After these analyses, where nature-based and culture-based tourisms are unlikely to have sufficient funds for themselves, working tourism can be a supplement of them. It not only provides assistance for them, but also creates its own attraction in education and infrastructure developing.
Reference:
World Tourism Organization, Seminar on Planning, Development and Management of Ecotourism in Africa (March 5-6, 2001). <http://www.world-tourism.org/sustainable/IYE/Regional_Activites/Mozambique/Mozambique-table-intro-sum.htm > , Maputo, Mozambique (March 6, 2005)
Mahumane A. C. (March 5-6, 2001).ECOTOURISM IN MOZAMBIQUE (March 5-6, 2001). <http://www.world-tourism.org/sustainable/IYE/Regional_Activites/Mozambique/PresAMahumane-Moz.htm> , Maputo, Mozambique (March 6, 2005)
World Bank, Mozambique - Transfrontier Conservation Areas and Tourism Development Project.(Nov 16,2004). http://www-wds.worldbank.org/servlet/WDS_IBank_Servlet?pcont=details&eid=000104615_20041118094642 >
Diet Change
- 06 March 2005
Diet Change
There are many changes in my lifestyle since I moved to USA. My diet is not an exception. The main reasons of this diet change are that some food is hard to find in U.S., or they become too expensive.
It is natural that some food is hard to find in another country, or even can not be found. For instance, the red vegetable bolt, one of my favorite vegetables, is a special local product of Wuhan, and I never find it in U.S. Many other foods, such as Re Gan Mian, or Hot Dry Noodle, and Doupi, or Dried Sheet of Mung Bean, are not cooked in American restaurants because their cooking skills are not well known. Missing food certainly disappeared from my diet.
Even some kinds of food are exported to U.S., many of them they become too expensive for me. An example of this is spinage, which is less then 8 cents per pound in Wuhan, cost me more than 1.5 dollar per pound. I have to replace them with some affordable foods, such as chicken or potato.
Move to another city always change one’s lifestyle, including diet change. Previous local foods fade out, replaced by new local food. As many of my diet change, this one is not made by doctor’s advice, but by objective and financial choices.
Population in US
- 02 March 2005
Race org, Where, Age&Sex
draft
- 01 March 2005
Wuhan, the capital of Hubei Province in central China, is the one of the largest city in China. It is a major inland transition center because it is the joint of Han River and Yangtze River, and a rallying point of Major railway. Its Hanzheng Street market is one of the largest markets in China. Thus, although tourism can be improved, but this is not effective, because the scabrous environment problems and poor infrastructures.
Tourism in Wuhan, as one of the old, large cities, has developed already. According to the official website of Wuhan government, Wuhan was named Excellent Tourism City in China by National Tourism Administration. The city is hard to become more famous, build more conservation zone, have more transportation, or reveal more scenes. Although the number of tourists increased a little after several efforts were made in recent decades, such as that many railways, gas stations, highways, electrical billboard was disseminated, many hotels were built. However, the improvement is mainly for business purpose and their contributions to tourism are not very notable.
Win32 & .Net Q&A
- 28 February 2005
问《VC++技术内幕》第四版p217,关于线程和MFC书上说,不允许在线程之间共享MFC对象(此原则不适用于直接从CObject派生的对象或者是简单的类),那么我想在一个线程中打开一个txt文件并向里面写数据可否这样做:
其中CString g_strSavepath;是一个全局变量。
Primates
- 28 February 2005
A few primates live on the ground, but most primates spend their time in trees because they have good eyes, grasping hands and feet, and their bodies are well suited to life in the trees. First, primates have large eyes to look straight forward; in addition, higher primates can focus both eyes on the same object and some primates also see colors. Second, besides many other mammals have claws, primates have flat nails on the end of their fingers and toes to help support enlarged pads, which is sensitive to touch and have nonskid ridges. Last, according to Gordon M. Shepherd (2004), “Comparisons of the decreasing size of the olfactory system relative to expansion of the visual, auditory, and somatosensory systems usually focus on the olfactory bulb and lateral olfactory tract, which are relatively small. “ That is to say, although primates among the most intelligent of mammals for most of them have large brains, but the part related to the sense of smell of their brain is relatively small, because they do not depend much on their smell(Humans Smell with Bigger and Better Brains) .
Primates have fewer young than most mammals because a mother bears only one or two young at a time, but the young primates stay with their mothers for a longer time, which allows them to learn more from their mothers and the group they live in.
Working Holidays in Mozambique
- 27 February 2005
Doctor (General Practitioner), Angoche Rural Hospital, Angoche, Nampula Province, Mozambique (M7)
Editor’s note
- 27 February 2005
First, I am most delighted that the city government continues supporting Urban Park Project (UPJ). I am also pleased with that the government had assured that the urban park will continue to preserve nature instead of to change it to a tourist site.
However, I am sorry to hear that the UPJ can not support Urban Park in all forms because it has limited resources. Since maintaining this project need more funds than expected, I suggest that limited, sustainable tourism such as ecotourism and working holidays should be arranged to help the UPJ experts continue to do their best.
Primates
- 26 February 2005
Primates nurse their young with milk. The primate family, namely monkeys and apes, is one of the major groups of mammals. The word “Primate” comes from the Latin word “primus”, which means “first”. Most primates live in tropical places; however, men, classified by Scientists as primates, live in almost all regions and climates of the world.
A few primates live on the ground, but most primates spend their time in trees because they have good eyes, grasping hands and feet, and their bodies are well suited to life in the trees. First, primates have large eyes to look straight forward; in addition, higher primates can focus both eyes on the same object and some primates also see colors. Second, besides many other mammals have claws, primates have flat nails on the end of their fingers and toes to help support enlarged pads, which is sensitive to touch and have nonskid ridges. Last, although primates among the most intelligent of mammals for most of them have large brains, but the part related to the sense of smell of their brain is relatively small, because they do not depend much on their smell.
Survey Assignment
- 23 February 2005
Knowledge of Foreign Countries of UT Austin students
Many Americans pay little attention to foreign countries. Particularly, American students in UT Austin are lack of knowledge of international affairs and history. According to the data collected for the survey about China, one of the most important nations in the world, most UT Austin students could not tell the name of the leader of China or anything about Chinese History. It is dangerous for these students if the situation keeps unchanged, but there are some ways can help them.
Generation Gap Prevention
- 21 February 2005
Jason
Generation Gap Prevention
I am only 7 years elder than my niece, and I thought there were no generation gap between she and me. I’m not so sure about this after I moved to the city where she lived. Although I could have a conversation about internet, computer and study with her like a teacher, I could hardly use another topic since culture evolved, fashion refreshed, famous names faded out, common words altered, politicians went in and out of position, and economic is reformed. Therefore, embarrassing silence frequently occurred. This scenario may remain true when I have a child, but now there is something I will do to narrow this gap, such as self-restraint, polite words and respect child.
Summary Assignment
- 15 February 2005
This article is for DeBenedette, V. (1990). Are your patients exercising too much? The Physician and sportsmedicine, 18-8
Are Your Patients Exercising Too Much?
virtual friends
- 10 February 2005
Most teenagers are good on internet. They spend hours in chartrooms. Some people think keep making virtual friends is dangerous that because people are finding in the chat rooms what they can’t find in their real life. However, virtual friends are a good begging of making real friends.
Virtual friends, or cyber friends, are friends that were contacted by internet. Usually, we recognize new virtual friend in chat rooms, newsgroups, online forum, and blogs. Each of them has a topic you interested in, so usually you can friend with a same interest-that is a good beginning of friendship. You can contact a virtual friend online much easier than in real world. You can communicate massively to know one quickly. Therefore, making virtual friends is easier than making real friends.
NoteWorth 011
- 10 February 2005
2 year junior college admission easier, cheaper,live at home,2 year programs ->Ass. degree
Intention:no Degree? Transfer for degree?
Summary Assignment
- 09 February 2005
In the article, “A Global Trade Agreement Must Address Invasive Species”, published in National Wild Life on the volumn Nov/Oct 2004, Larry J. Schweiger reported that hitchhikers are now moving about freely on a global scale as unintended cargo of trade and travel.Aquatic species transported by ship and arethreatening native shellfish and finfish, exotic plants from grain shipments are crowding out native species and overrunning wildlife habitat , exotic bee mites on imported fruit have killed 90 percent of the nation’s honeybees, introduced diseases and insects are devastating native trees, seriously threatening future forest productivity. Trade policy must address the globalization of species. Misplaced species can threaten our children’s future. At the last of the article, the author said:”We must act now in the face of clear and present danger
interview summary report
- 08 February 2005
The survey is based on 3 male upper division students, 2 U.S. students and a International student from Vietnam. Questionnaires were asked several questions to express their view about university life. One student named himself Justin Loured; other two prefer to be not named.
Majority of the interviewed students have a lot of homework-3 to 5 hours per day. A student with double majors (no named #2) has 5-hours homework per day, Justin Loured has 3-4 hours per day, while he is taking 5 classes only. The major difference between how they imagined and how they fell about the university is the difficulty of the courses, and they think the professors are good and fair in grading students.
Stress Control
- 08 February 2005
You can’t get rid of stress, but you can manage it
Stress is not all bad. Stress is not only death of important friend or get fired, but also holidays, new job and awards. Some of stress can energize the body and help our ummune systems. Since stresses are inevitable, control the negitave effect of stress is the only thing you can do with stress.Stress management, is a very common task of U.S. family doctors. two-thirds of visits are about stress problems, says the American Academic of Family Physicans. The gole of the task is to reduce anxiety about stress.This body reaction to stress is useful to physical stress such as a fire, or a fight, but is not good for body for an emotional stress. Doctors use are a lot of skills to prevent illness cause by the anxiety of stress, such as focus and control. Sometimes the situation get out of our control, trying to control it is a huge stressor.
Stress Control Questions
- 07 February 2005
Self-Efficacy
- 07 February 2005
Introduction
“Attitude decides everything”, former Chinese men’ soccer team coach Bora Milutinović kept telling to his squad during the qualification for World Cup 2002 Finals. Although the first experience in WC Finals was not enterprising, the qualification itself was considered as a great achievement. Why they could not occur in WC Finals earlier when they used to have better players and a better team? I think the main reason of it is that they did not realize their ability well. Well self-judgments of personal capabilities to initiate and successfully perform specified tasks at designated levels, expend greater effort, and persevere in the face of adversity, holds significant power for predicting and explaining academic performance in various domains.
First Children and Education (version 2)
- 07 February 2005
Introduction
The first children of families were used to success their families, as a result, they usually have been educated more carefully, and then they are more educated than their younger siblings. But when time passes by, things are changing. Succession is not exclusive, and children have equal right to be educated now. Do the former successors have equally opportunities to get higher degrees now? No, younger children are more successful to get higher education; not only because the parents are more experienced since the birth of the first children, but also because younger children can benefit from their older siblings.
Introduction/Conclusion
- 06 February 2005
Introduction
The first children of families were used to success their families, as a result, they usually have been educated more carefully, and then they are more educated than their younger siblings. But when time passes by, things are changing. Succession is not exclusive, and children have equal right to be educated now. Do the former successors have equally opportunities to get higher degrees now? No, younger children are more successful to get higher education; not only because the parents are more experienced since the birth of the first children, but also because younger children can benefit from their older siblings.
Conclusion:
Again, in general, more skilled parents and sometimes a role model sibling in are two major differences between a first child and her/his younger siblings. They lead to better education quality and usually higher education degree for younger siblings.
Notes
- 03 February 2005
Public Edu phylosephy and funding
Compulsory. 16 / 9 grade
First Children and Education
- 03 February 2005
The first children of families were used to success their families, as a result, they usually have been educated more carefully, and then they are more educated than their younger sisters or brothers. But things are changing. Succession is not exclusive, and children have equal right to be educated. Have they equally opportunities to get higher degrees now? No, younger children are more successful to get higher education; not only because the parents are more experienced after the first children, but also because younger children can benefit from their older brother or sister.
Self-efficacy, one’s self-judgments of personal capabilities to initiate and successfully perform specified tasks at designated levels, expend greater effort, and persevere in the face of adversity (Bandura, 1977; 1986), is a relatively new construct in academic research (Multon, Brown, & Lent, 1991; Schunk, 1991a, 1994). Although self-efficacy is examined with much greater depth in therapeutic contexts, recent studies show that self-efficacy holds significant power for predicting and explaining academic performance in various domains (Lent, Brown & Larkin, 1986; Marsh, Walker, & Debus, 1991; Schunk, 1989a; Schunk, 1994; Zimmerman, Bandura, & Martinez-Pons, 1992).
Scholarship Application
- 02 February 2005
Financial Aid Office,
Brooklyn Law School , 467 Atlantic Ave. Suit 632
Expectation differences between male and female in Chinese culture (Revised)
- 30 January 2005
There are many sexism cultures; and Chinese culture is not an exception. Although legends told that humans are created by a female god, Chinese women are not only considered less important in their family, but also deactivated in the education, business and political areas until modern decades.
First, women are expected to have lower position in a family. For one thing, they are not expected to succeed a family. Only male members have their name registered in genealogies. Girls are considered less important than their brothers because they will move out from the family after marriage. For another, traditional people usually expect a husband should be richer, smarter, older or even taller than a wife, even in the equalitarian communist decades. As a result, either in the family of their parents or in their husband’s, women are not considered as important as their brothers or husbands.
How to fail in a class
- 28 January 2005
It is not good topic to talk with, but do some investigations on it will help you aware of its risk and you can device to do something to prevent you from failing.
The first thing to know is the standard of different grading. Usually you can find some relative information in the syllabus of a course. If you did not find it there, you can ask the teacher about it. Generally, the two most common causes why students fail in a class are: a) too many absences, b) failure to do their class assignments. Few teachers pay less care about attendances or assignments and more attention on exams.
Role Modal Notes
- 27 January 2005
No directive entry for “container” in module “docutils.parsers.rst.languages.zh_cn”. Using English fallback for directive “container”.
Good morning everyone. Today I would like to talk about my role modal, Bill Gates, the founder of Microsoft Cooperation, and the wealthiest people in the world. I will describe two of his personal characteristics, his courage and his kindness, and how these characteristics inspired me.
Expectation differences between male and female in Chinese culture
- 26 January 2005
There are many differences between male and female in Chinese culture.
First, women are expected to have lower position in a family.
Sentence Combining
- 25 January 2005
Exercise 5. Sentence Combining
A coin is a piece of metal that has a certain weight. It has the mark of the people who issued it. The Lydians were a powerful people in Asia who needed a convenient method of receiving payment for products they produced, so they made the first coins in the seventh century B.C. These primitively made coins were composed of “electrum”, a natural composition of gold and silver. Later, the Greeks saw these coins and appreciated their usefulness, and they began to make coins, too. About 100 years later, not only many cities in Greece had coins, but cities all over the mainland of Asia Minor also had them. On one hand, gold coins were the most valuable; on the other hand, silver and copper were also used. The Romans later adopted the idea, carrying it on for 500 years, when the art of coinage declined. In the fifteenth century, the art of coinage was revived not only because there was more metal available, but also because there were many skilled artists to engrave to coins in this period of history. The first coins made in America, in 1752, where not regular in shape. As a result, they were not the same weight. Our society, with its vast numbers of coin-operated machines, could not function without this ancient invention.
虚析构函数
- 24 January 2005
编译器总是根据类型来调用类成员函数。但是一个派生类的指针可以安全地转化为一个基类的指针。这样删除一个基类的指针的时候,C++不管这个指针指向一个基类对象还是一个派生类的对象,调用的都是基类的析构函数而不是派生类的。如果你依赖于派生类的析构函数的代码来释放资源,而没有重载析构函数,那么此时会有资源泄漏。
所以建议的方式是将析构函数声明为虚函数。如果你使用MFC,并且以CObject或其派生类为基类,那么MFC已经为你做了这件事情;CObject的析构函数是虚函数。一个函数一旦声明为虚函数,那么不管你是否加上virtual修饰符,它在所有派生类中都成为虚函数。但是为了理解明确起见,建议的方式还是加上virtual 修饰符。
在Visual C++中编译工程时自动增加版本号
- 24 January 2005
微软知识库中的文章How To Increment Version Information After Each Build in Visual C++(https://web.archive.org/web/20070211114127/http://support.microsoft.com/kb/237870/)提供了在VC6中自动增加版本号的方法。在VS.Net中,需要对这个宏进行少许的更改:https://web.archive.org/web/20040616201737/http://www.thecodeproject.com/macro/IncBuildNrMacro.asp
也可以使用VS.NET插件来实现该功能,一个示例在下面的网址可以找到:
何时一个类的指针可以强制转化为另外一个类的指针,即使它们之间没有派生关系?
- 24 January 2005
问:我看到CListView的成员函数GetListCtrl直接把CListView本身的指针转换为CListCtrl指针。我想知道在什么情况下可以安全地把一个类的指针转化为另一个类的指针?
答:只要你访问的数据的内存表示是完全相同的,那么这种转化就是安全的。
IStream接口和CString之间的转换
- 24 January 2005
问:如何传递CString中包含的字符串到具有IStream类型参数的函数?
问:如何根据获得的IStream接口指针获得字符串?
编程控制Modem/PPPoE拨号连接
- 23 January 2005
在Windows中拨号上网(包括MODEM和PPPoe),一般都是用Windows平台提供的的Remote Access Service(RAS,远程访问服务):https://learn.microsoft.com/en-us/windows/win32/rras/about-remote-access-service 。其中的连接操作函数(https://learn.microsoft.com/en-us/windows/win32/rras/ras-connection-operations)可以用于对拨号连接进行操作。比较常用的几个函数是RasDial、RasHangUp、RasEnumConnection和RasGetConnectStatus,以及自定义的通知处理函数(https://learn.microsoft.com/en-us/windows/win32/rras/notification-handlers)。
Windows XP/2003内建了对PPPoe拨号连接的支持,参考 https://learn.microsoft.com/en-us/windows/win32/rras/point-to-point-protocol-over-ethernet-connections 。
编程实现远程唤醒PC
- 23 January 2005
为了唤醒网络上的计算机,必须发出一种特殊的数据包,该数据包的格式与普通数据包不同,而且还必须使用相应的专用软件才能产生。当前普遍采用的是AMD公司制作的Magic Packedt这套软件以生成网络唤醒所需要的特殊数据包,俗称魔术包(Magic Packet)。该数据包包含有连续6个字节的“FF”和连续重复16次的MAC地址。 Magic Packet格式虽然只是AMD公司开发推广的技术,并非世界公认的标准,但是仍然受到很多网卡制造商的支持,因此 许多具有网络唤醒功能的网卡都能与之兼容。
需要更多关于Magic Packet的信息的话,可以参考 https://web.archive.org/web/20020805085929/http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2481,00.html
限制应用程序的实例数目
- 22 January 2005
某些应用程序处理紧缺资源,例如可擦写光驱、串口或者大量内存,通常不希望这种应用程序的多个实例同时运行。
实际上你没有办法限制用户只能启动一次。你可以做到的是在应用程序启动之后查找是否用户启动了另一个实例。如果没有找到现存的实例,应用程序以正常方式启动。否则,通常的处理是退出。
编程控制活动桌面,用ActiveX控件来增强桌面的功能
- 22 January 2005
活动桌面处理和一个例子 (https://web.archive.org/web/20010503055645/http://www.vckbase.com/vckbase/vckbase10/vc/nonctrls/atlcomocx_02/1002001.htm)讲述了使用IActiveDesktop接口可以做到的事情。
活动桌面允许在桌面上显示HTML网页,这也意味着我们可以在桌面上的项目中以在网页中使用ActiveX控件来对网页进行扩展的方式来提供丰富的内容。但是不建议在桌面上使用不安全的控件,例如Windows Media Player 6.0。
Self Introduction
- 20 January 2005
This is JIANG, Sheng writing. You can call me Jason also. I am a Chinese, normal height and weight. I am staying in Austin, Texas now.
After graduated from Jilin University, I worked in a software company as software developer in Beijing for several years. I developed several education applications during my years in Beijing. After that, I moved to Texas and now studying.
A Successful Moment
- 19 January 2005
I am so proud that I was awarded Microsoft MVP (Most Valuable Professional) last year. I was so excited I was sleepless for days. I got an invitation of Global MVP Summit, where I recognized several MVPs and experts in Microsoft and have myself recognized by them. It was the highest horner I had ever been awarded.
I was so inspired that I contributed more in the last year. I am re-awarded this year.














