Wonder whether to add "WINAPI" keyword in a function prototype or not? Here is the main differences:
Specifying WINAPI indicates the __stdcall calling convention; not specifying WINAPI indicates the __cdecl calling convention by default (unless you have set the default calling convention to __stdcall via project settings).
Low-level wise, these calling conventions indicate how parameters are pushed onto the stack when the function is called and indicate whether the calling function or the called function performs stack cleanup.
A unique feature of the __cdecl calling convention is that for such functions, variable argument lists can be used, e.g. :
int __cdecl MyFuntion(int i, ...);
and client code can be written as follows :
int i = MyFuntion(4, 1, 2, 3, 4);
int j = MyFunction(2, 5, 100);
This is not possible for __stdcall functions.
Now because a variable number of arguments can be passed into such a function, only the caller code (i.e. client code) will know how many parameters were actually passed to the function. Hence it is the caller that is responsible to perform stack cleanup. This can result in a larger overall code size because each call to a __cdecl function requires stack cleanup code.
For a __stdcall function, the number of parameters are fixed always and so the called function can perform the stack cleanup operation. This saves code space because cleanup code need be emitted only once for each __sdcall function.
For more information on calling conventions, pls refer to :
Argument Passing and Naming Conventions
http://msdn.microsoft.com/en-us/library/984x0h58(VS.71).aspx
Note that for a function to be exported, it does not have to be specified as WINAPI (i.e. __stdcall). It can also be specified as __cdecl.
Friday, August 29, 2014
Thursday, May 19, 2011
How to add, modify, or delete registry subkeys and values by using a registration entries (.reg) file
View products that this article applies to.
System TipThis article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you.Visit the Windows 7 Solution Center
This article was previously published under Q310516
To continue receiving security updates for Windows, make sure you're running Windows XP with Service Pack 3 (SP3). For more information, refer to this Microsoft web page: Support is ending for some versions of Windows
On This Page
Expand all | Collapse all
SUMMARY
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
This step-by-step article describes how to add, modify, or delete registry subkeys and values by using a Registration Entries (.reg) file. Regedit.exe uses .reg files to import and export registry subkeys and values. You can use these .reg files to remotely distribute registry changes to several Windows-based computers. When you run a .reg file, the file contents merge into the local registry. Therefore, you must distribute .reg files with caution.
Back to the top
Syntax of .Reg Files
A .reg file has the following syntax:
RegistryEditorVersion
Blank line
[RegistryPath1]
"DataItemName1"="DataType1:DataValue1"
DataItemName2"="DataType2:DataValue2"
Blank line
[RegistryPath2]
"DataItemName3"="DataType3:DataValue3"
where:
RegistryEditorVersion is either "Windows Registry Editor Version 5.00" for Windows 2000, Windows XP, and Windows Server 2003, or "REGEDIT4" for Windows 98 and Windows NT 4.0. The "REGEDIT4" header also works on Windows 2000-based, Windows XP-based, and Windows Server 2003-based computers.
Blank line is a blank line. This identifies the start of a new registry path. Each key or subkey is a new registry path. If you have several keys in your .reg file, blank lines can help you to examine and to troubleshoot the contents.
RegistryPathx is the path of the subkey that holds the first value you are importing. Enclose the path in square brackets, and separate each level of the hierarchy by a backslash. For example:
[HKEY_LOCAL_ MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
A .reg file can contain several registry paths. If the bottom of the hierarchy in the path statement does not exist in the registry, a new subkey is created. The contents of the registry files are sent to the registry in the order you enter them. Therefore, if you want to create a new subkey with another subkey below it, you must enter the lines in the correct order.
DataItemNamex is the name of the data item that you want to import. If a data item in your file does not exist in the registry, the .reg file adds it (with the value of the data item). If a data item does exist, the value in your .reg file overwrites the existing value. Quotation marks enclose the name of the data item. An equal sign (=) immediately follows the name of the data item.
DataTypex is the data type for the registry value and immediately follows the equal sign. For all the data types other than REG_SZ (a string value), a colon immediately follows the data type. If the data type is REG_SZ , do not include the data type value or colon. In this case, Regedit.exe assumes REG_SZ for the data type. The following table lists the typical registry data types:
Data Type DataType in .reg
REG_BINARY hexadecimal
REG_DWORD dword
REG_EXPAND_SZ hexadecimal(2)
REG_MULTI_SZ hexadecimal(7)
For more information about registry data types, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows registry
DataValuex immediately follows the colon (or the equal sign with REG_SZ) and must be in the appropriate format (for example, string or hexadecimal). Use hexadecimal format for binary data items.
Note You can enter several data item lines for the same registry path.
Note the registry file should contain a blank line at the bottom of the file.
Back to the top
Adding Registry Subkeys or Adding and Changing Registry Values
To add a registry subkey or add or change a registry value, make the appropriate changes in the registry, and then export the appropriate subkey or subkeys. Exported registry subkeys are automatically saved as .reg files. To make changes to the registry and export your changes to a .reg file, follow these steps:
Click Start, click Run, type regedit in the Open box, and then click OK.
Locate and then click the subkey that holds the registry item or items that you want to change.
Click File, and then click Export.
This step backs up the subkey before you make any changes. You can import this file back into the registry later if your changes cause a problem.
In the File name box, type a file name to use to save the .reg file with the original registry items, and then click Save.
Note Use a file name that reminds you of the contents, such as a reference to the name of the subkey.
In the right pane, add or modify the registry items you want.
Repeat steps 3 and 4 to export the subkey again, but use a different file name for the .reg file. You can use this .reg file to make your registry changes on another computer.
Test your changes on the local computer. If they cause a problem, double-click the file that holds the backup of the original registry data to return the registry to its original state. If the changes work as expected, you can distribute the .reg you created in step 6 to other computers by using the methods in the "Distributing Registry Changes" section of this article.
Back to the top
Deleting Registry Keys and Values
To delete a registry key with a .reg file, put a hyphen (-) in front of the RegistryPath in the .reg file. For example, to delete the Test subkey from the following registry key:
HKEY_LOCAL_MACHINE\Software
put a hyphen in front of the following registry key in the .reg file:
HKEY_LOCAL_MACHINE\Software\Test
The following example has a .reg file that can perform this task.
[-HKEY_LOCAL_MACHINE\Software\Test]
To delete a registry value with a .reg file, put a hyphen (-) after the equals sign following the DataItemName in the .reg file. For example, to delete the TestValue registry value from the following registry key:
HKEY_LOCAL_MACHINE\Software\Test
put a hyphen after the "TestValue"= in the .reg file. The following example has a .reg file that can perform this task.
HKEY_LOCAL_MACHINE\Software\Test
"TestValue"=-
To create the .reg file, use Regedit.exe to export the registry key that you want to delete, and then use Notepad to edit the .reg file and insert the hyphen.
Back to the top
Renaming Registry Keys and Values
To rename a key or value, delete the key or value, and then create a new key or value with the new name.
Back to the top
Distributing Registry Changes
You can send a .reg file to users in an e-mail message, put a .reg file on a network share and direct users to the network share to run it, or you can add a command to the users' logon scripts to automatically import the .reg file when they log on. When users run the .reg file, they receive the following messages:
Registry Editor
Are you sure you want to add the information in path of .reg file to the registry?
If the user clicks Yes, the user receives the following message:
Registry Editor
Information in path of .reg file has been successfully entered into the registry.
Regedit.exe supports a /s command-line switch to not display these messages. For example, to silently run the .reg file (with the /s switch) from a login script batch file, use the following syntax:
regedit.exe /s path of .reg file
You can also use Group Policy or System Policy to distribute registry changes across your network. For additional information, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/ms954395.aspx
Note If the changes work, you can send the registration file to the appropriate users on the network.
System TipThis article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you.Visit the Windows 7 Solution Center
This article was previously published under Q310516
To continue receiving security updates for Windows, make sure you're running Windows XP with Service Pack 3 (SP3). For more information, refer to this Microsoft web page: Support is ending for some versions of Windows
On This Page
Expand all | Collapse all
SUMMARY
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
This step-by-step article describes how to add, modify, or delete registry subkeys and values by using a Registration Entries (.reg) file. Regedit.exe uses .reg files to import and export registry subkeys and values. You can use these .reg files to remotely distribute registry changes to several Windows-based computers. When you run a .reg file, the file contents merge into the local registry. Therefore, you must distribute .reg files with caution.
Back to the top
Syntax of .Reg Files
A .reg file has the following syntax:
RegistryEditorVersion
Blank line
[RegistryPath1]
"DataItemName1"="DataType1:DataValue1"
DataItemName2"="DataType2:DataValue2"
Blank line
[RegistryPath2]
"DataItemName3"="DataType3:DataValue3"
where:
RegistryEditorVersion is either "Windows Registry Editor Version 5.00" for Windows 2000, Windows XP, and Windows Server 2003, or "REGEDIT4" for Windows 98 and Windows NT 4.0. The "REGEDIT4" header also works on Windows 2000-based, Windows XP-based, and Windows Server 2003-based computers.
Blank line is a blank line. This identifies the start of a new registry path. Each key or subkey is a new registry path. If you have several keys in your .reg file, blank lines can help you to examine and to troubleshoot the contents.
RegistryPathx is the path of the subkey that holds the first value you are importing. Enclose the path in square brackets, and separate each level of the hierarchy by a backslash. For example:
[HKEY_LOCAL_ MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
A .reg file can contain several registry paths. If the bottom of the hierarchy in the path statement does not exist in the registry, a new subkey is created. The contents of the registry files are sent to the registry in the order you enter them. Therefore, if you want to create a new subkey with another subkey below it, you must enter the lines in the correct order.
DataItemNamex is the name of the data item that you want to import. If a data item in your file does not exist in the registry, the .reg file adds it (with the value of the data item). If a data item does exist, the value in your .reg file overwrites the existing value. Quotation marks enclose the name of the data item. An equal sign (=) immediately follows the name of the data item.
DataTypex is the data type for the registry value and immediately follows the equal sign. For all the data types other than REG_SZ (a string value), a colon immediately follows the data type. If the data type is REG_SZ , do not include the data type value or colon. In this case, Regedit.exe assumes REG_SZ for the data type. The following table lists the typical registry data types:
Data Type DataType in .reg
REG_BINARY hexadecimal
REG_DWORD dword
REG_EXPAND_SZ hexadecimal(2)
REG_MULTI_SZ hexadecimal(7)
For more information about registry data types, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows registry
DataValuex immediately follows the colon (or the equal sign with REG_SZ) and must be in the appropriate format (for example, string or hexadecimal). Use hexadecimal format for binary data items.
Note You can enter several data item lines for the same registry path.
Note the registry file should contain a blank line at the bottom of the file.
Back to the top
Adding Registry Subkeys or Adding and Changing Registry Values
To add a registry subkey or add or change a registry value, make the appropriate changes in the registry, and then export the appropriate subkey or subkeys. Exported registry subkeys are automatically saved as .reg files. To make changes to the registry and export your changes to a .reg file, follow these steps:
Click Start, click Run, type regedit in the Open box, and then click OK.
Locate and then click the subkey that holds the registry item or items that you want to change.
Click File, and then click Export.
This step backs up the subkey before you make any changes. You can import this file back into the registry later if your changes cause a problem.
In the File name box, type a file name to use to save the .reg file with the original registry items, and then click Save.
Note Use a file name that reminds you of the contents, such as a reference to the name of the subkey.
In the right pane, add or modify the registry items you want.
Repeat steps 3 and 4 to export the subkey again, but use a different file name for the .reg file. You can use this .reg file to make your registry changes on another computer.
Test your changes on the local computer. If they cause a problem, double-click the file that holds the backup of the original registry data to return the registry to its original state. If the changes work as expected, you can distribute the .reg you created in step 6 to other computers by using the methods in the "Distributing Registry Changes" section of this article.
Back to the top
Deleting Registry Keys and Values
To delete a registry key with a .reg file, put a hyphen (-) in front of the RegistryPath in the .reg file. For example, to delete the Test subkey from the following registry key:
HKEY_LOCAL_MACHINE\Software
put a hyphen in front of the following registry key in the .reg file:
HKEY_LOCAL_MACHINE\Software\Test
The following example has a .reg file that can perform this task.
[-HKEY_LOCAL_MACHINE\Software\Test]
To delete a registry value with a .reg file, put a hyphen (-) after the equals sign following the DataItemName in the .reg file. For example, to delete the TestValue registry value from the following registry key:
HKEY_LOCAL_MACHINE\Software\Test
put a hyphen after the "TestValue"= in the .reg file. The following example has a .reg file that can perform this task.
HKEY_LOCAL_MACHINE\Software\Test
"TestValue"=-
To create the .reg file, use Regedit.exe to export the registry key that you want to delete, and then use Notepad to edit the .reg file and insert the hyphen.
Back to the top
Renaming Registry Keys and Values
To rename a key or value, delete the key or value, and then create a new key or value with the new name.
Back to the top
Distributing Registry Changes
You can send a .reg file to users in an e-mail message, put a .reg file on a network share and direct users to the network share to run it, or you can add a command to the users' logon scripts to automatically import the .reg file when they log on. When users run the .reg file, they receive the following messages:
Registry Editor
Are you sure you want to add the information in path of .reg file to the registry?
If the user clicks Yes, the user receives the following message:
Registry Editor
Information in path of .reg file has been successfully entered into the registry.
Regedit.exe supports a /s command-line switch to not display these messages. For example, to silently run the .reg file (with the /s switch) from a login script batch file, use the following syntax:
regedit.exe /s path of .reg file
You can also use Group Policy or System Policy to distribute registry changes across your network. For additional information, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/ms954395.aspx
Note If the changes work, you can send the registration file to the appropriate users on the network.
Monday, July 12, 2010
When A Network Doesn't Connect
Make sure to check the following:
Release and renew the IP address, using the following commend line command:
ipconfig /release
ipconfig /renew
If that doesn't work, make sure to reboot all the routers, and reboot the PC
Release and renew the IP address, using the following commend line command:
ipconfig /release
ipconfig /renew
If that doesn't work, make sure to reboot all the routers, and reboot the PC
Remote Performance Monitor for .NET CF Application
First, the .NET Compact Framework SDK is needed on the desktop PC
Second, copy the following files to the \windows directory on the remote device:
From C:\Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\
* edbgtl.dll
* tcpconnectiona.dll
From the service pack 1 installation folder (typically C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\ )
* netcfrtl.dll
* netcflaunch.exe
Third, run the RPM executable (netcfrpm.exe) that is placed in the bin directory of Compact Framework SDK. On my machine, this directory is C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\bin
After that, run the netcflaunch.exe that is on the remote device under the \windows directory.
Come back to the PC. Since the netcfrpm.exe program is already running, to view dynamic performance statistics for your application, select the "Live Counters...." option under the File menu, it will bring up another window.
Before you can view live statistics, you must connect the RPM to your device and specify the application you'd like to run. The instructions for connecting the RPM to your device vary based on whether the connection between your desktop machine and your device is via Active Sync or an Ethernet connection. If your connection is over ActiveSync, your device will automatically appear in the Device drop down in the RPM user interface. If your desktop machine is connected to the device through a direct network connection, you must know the IP address and port number through which the RPM can connect to your device. This information can be obtained by the already running netcflauch.exe from the \windows directory of your device.
It may appear like this:
version 1.0
Connection Parameters:
127.0.0.1 6510
Before connecting to the device, you must specify the application you'd like to monitor using the Application text box. Be sure to type the fully qualified path name to the executable you wish to run on the device. For example, \Program Files\poomcominterop\poomcominterop.exe. If your applications takes command line parameters, you can specify them in the Parameters text box. If you need to specify more than one parameter, be sure to separate them with a space.
After you've selected the device to connect to, and specified the application to launch, click the Connect button in the lower right corner of RPM's user interface. The RPM will send a command to the device to remotely launch the application and start pulling back performance statistics.
Reference:
http://blogs.msdn.com/b/stevenpr/archive/2006/04/17/577636.aspx
Second, copy the following files to the \windows directory on the remote device:
From C:\Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\
* edbgtl.dll
* tcpconnectiona.dll
From the service pack 1 installation folder (typically C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\
* netcfrtl.dll
* netcflaunch.exe
Third, run the RPM executable (netcfrpm.exe) that is placed in the bin directory of Compact Framework SDK. On my machine, this directory is C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\bin
After that, run the netcflaunch.exe that is on the remote device under the \windows directory.
Come back to the PC. Since the netcfrpm.exe program is already running, to view dynamic performance statistics for your application, select the "Live Counters...." option under the File menu, it will bring up another window.
Before you can view live statistics, you must connect the RPM to your device and specify the application you'd like to run. The instructions for connecting the RPM to your device vary based on whether the connection between your desktop machine and your device is via Active Sync or an Ethernet connection. If your connection is over ActiveSync, your device will automatically appear in the Device drop down in the RPM user interface. If your desktop machine is connected to the device through a direct network connection, you must know the IP address and port number through which the RPM can connect to your device. This information can be obtained by the already running netcflauch.exe from the \windows directory of your device.
It may appear like this:
version 1.0
Connection Parameters:
127.0.0.1 6510
Before connecting to the device, you must specify the application you'd like to monitor using the Application text box. Be sure to type the fully qualified path name to the executable you wish to run on the device. For example, \Program Files\poomcominterop\poomcominterop.exe. If your applications takes command line parameters, you can specify them in the Parameters text box. If you need to specify more than one parameter, be sure to separate them with a space.
After you've selected the device to connect to, and specified the application to launch, click the Connect button in the lower right corner of RPM's user interface. The RPM will send a command to the device to remotely launch the application and start pulling back performance statistics.
Reference:
http://blogs.msdn.com/b/stevenpr/archive/2006/04/17/577636.aspx
Tuesday, September 29, 2009
How to create custom widgets
First, create your custom widget use Qt creator. To wrap up, do the following:
In Interface.h file:
#include QtDesigner
#include "PushButtonPlugin.h"
#include "AnimatedLabelPlugin.h"
#include "LabelPlugin.h"
#include "TextEntryPlugin.h"
//Interface for all Widgets
class MyCustomWidgets: public QObject, public QDesignerCustomWidgetCollectionInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
public:
MyCustomWidgets(QObject *parent = 0) : QObject(parent)
{
widgets.append(new PushButtonPlugin(this));
widgets.append(new AnimatedLabelPlugin(this));
widgets.append(new LabelPlugin(this));
widgets.append(new TextEntryPlugin(this));
}
virtual QList customWidgets() const
{
return widgets;
}
private:
QList widgets;
};
In Interface.cpp file:
#include "Interface.h"
Q_EXPORT_PLUGIN2(customwidgetsplugin,MyCustomWidgets);
In Interface.h file:
#include QtDesigner
#include "PushButtonPlugin.h"
#include "AnimatedLabelPlugin.h"
#include "LabelPlugin.h"
#include "TextEntryPlugin.h"
//Interface for all Widgets
class MyCustomWidgets: public QObject, public QDesignerCustomWidgetCollectionInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
public:
MyCustomWidgets(QObject *parent = 0) : QObject(parent)
{
widgets.append(new PushButtonPlugin(this));
widgets.append(new AnimatedLabelPlugin(this));
widgets.append(new LabelPlugin(this));
widgets.append(new TextEntryPlugin(this));
}
virtual QList
{
return widgets;
}
private:
QList
};
In Interface.cpp file:
#include "Interface.h"
Q_EXPORT_PLUGIN2(customwidgetsplugin,MyCustomWidgets);
Monday, August 10, 2009
How to build Qt
Steps on how to build Qt:
1. Download Qt version 4.5 from the web server (google it):
search for "qt-win-opensource-src-4.5.0-rc1.zip"
2. If you happened to find Qt4.5 on the website, make sure to download the “zip” version instead of the “exe” version. This will ensure “nmake” to compile under windows operating system.
3. Extract the zip file into a folder, for instance, C:\Qt\qt4.5\
4. Install DirectX 9.0 on your computer under, let’s say C:\DXSDK directory. The installation file for DirectX 9.0 can be found in the following server directory:
\\lab-542\GM\Software Releases\TOOLS\DirectX\dx90bsdk.exe
5. Install the most updated version of Microsoft DirectX SDK on your computer.
6. Bring up a Dos command prompt from Visual Studio 2005
7. Add the following to the environment variables: ( attention!! follow the order, the include and lib directory of Direct X 9 should be in front of any other include and lib directories )
DXSDK_DIR = C:\Program Files\Microsoft DirectX SDK (February 2007)\
(February 2007)
Path = C:\Qt\qt4.5\bin
Include = C:\DXSDK\Include; DXSDK_DIR\Include
LIB = C:\DXSDK|Lib; DXSDK_DIR\Lib
8. At the dos command prompt, goto C:\Qt\qt4.5\
9. type “configure –platform win32-msvc2005 -phonon” to include phonon module in the build process. choose “y”. This will create makefiles for each related module.
10. Type “nmake” under C:\Qt\qt4.5, this will build all the modules, such as “Demo Examples”, “Network”, “Sql”, “Phonon”, etc. one by one.
11. Make sure the phonon module is built successfully, and then go to
C:\Qt\qt4.5\src\plugins\phonon, and type “nmake”. This will build phonon backend plugins.
The following audio and video format will be supported under Qt4.5
For Audio:
AIFF
BASIC
MID
MIDI
MP3
MPEG
MPGURL
MPG
WAV
X-AIFF
X-MID
X-MIDI
X-MP3
X-MPEG
X-MPEGURL
X-MPG
X-MS-WAX
X-MS-VMA
X-WAV
For Video
AIV
MPEG
MPG
MSVIDEO
X-MPEG
X-MPEG2A
X-MS-ASF
X-MS-ASF-PLUGIN
X-MS-WM
X-MS-WMV
X-MS-WMX
X-MS-WVX
X-MSVIDEO
1. Download Qt version 4.5 from the web server (google it):
search for "qt-win-opensource-src-4.5.0-rc1.zip"
2. If you happened to find Qt4.5 on the website, make sure to download the “zip” version instead of the “exe” version. This will ensure “nmake” to compile under windows operating system.
3. Extract the zip file into a folder, for instance, C:\Qt\qt4.5\
4. Install DirectX 9.0 on your computer under, let’s say C:\DXSDK directory. The installation file for DirectX 9.0 can be found in the following server directory:
\\lab-542\GM\Software Releases\TOOLS\DirectX\dx90bsdk.exe
5. Install the most updated version of Microsoft DirectX SDK on your computer.
6. Bring up a Dos command prompt from Visual Studio 2005
7. Add the following to the environment variables: ( attention!! follow the order, the include and lib directory of Direct X 9 should be in front of any other include and lib directories )
DXSDK_DIR = C:\Program Files\Microsoft DirectX SDK (February 2007)\
(February 2007)
Path = C:\Qt\qt4.5\bin
Include = C:\DXSDK\Include; DXSDK_DIR\Include
LIB = C:\DXSDK|Lib; DXSDK_DIR\Lib
8. At the dos command prompt, goto C:\Qt\qt4.5\
9. type “configure –platform win32-msvc2005 -phonon” to include phonon module in the build process. choose “y”. This will create makefiles for each related module.
10. Type “nmake” under C:\Qt\qt4.5, this will build all the modules, such as “Demo Examples”, “Network”, “Sql”, “Phonon”, etc. one by one.
11. Make sure the phonon module is built successfully, and then go to
C:\Qt\qt4.5\src\plugins\phonon, and type “nmake”. This will build phonon backend plugins.
The following audio and video format will be supported under Qt4.5
For Audio:
AIFF
BASIC
MID
MIDI
MP3
MPEG
MPGURL
MPG
WAV
X-AIFF
X-MID
X-MIDI
X-MP3
X-MPEG
X-MPEGURL
X-MPG
X-MS-WAX
X-MS-VMA
X-WAV
For Video
AIV
MPEG
MPG
MSVIDEO
X-MPEG
X-MPEG2A
X-MS-ASF
X-MS-ASF-PLUGIN
X-MS-WM
X-MS-WMV
X-MS-WMX
X-MS-WVX
X-MSVIDEO
Friday, July 31, 2009
The Qt Resource System
Go to http://doc.trolltech.com/4.5/resources.html
to produce a binary rcc file, use the following command:
rcc -binary myresrouce.qrc -o myresrouce.rcc
to produce a binary rcc file, use the following command:
rcc -binary myresrouce.qrc -o myresrouce.rcc
Tuesday, July 28, 2009
how to compile resource file in Qt
A resource file tells the location of the images defined in the ui file. It needs to be compiled in order for the code to use. Hopefully, in the resource file, the alias are defined, so that the relative path is used for each image, and therefore good for the portability.
To compile the resource file (resource.qrc) under the visual c++ environment, make sure the compiler knows the path of Qt.
Go to the bin path under Qt, for instance, cd C:\Qt\bin
type "rcc path\resource.qrc -o path\resource.rcc"
This will create rcc file which is recognized by the compiler.
To compile the resource file (resource.qrc) under the visual c++ environment, make sure the compiler knows the path of Qt.
Go to the bin path under Qt, for instance, cd C:\Qt\bin
type "rcc path\resource.qrc -o path\resource.rcc"
This will create rcc file which is recognized by the compiler.
Monday, July 6, 2009
魔法城堡
这是一首喜欢了十几年的歌.一开始是听一个童声唱的.前几天听到东方神超将这首歌唱到近乎完美.分享一下:
http://www.youtube.com/watch?v=1gGFfq63w6w
中文翻译如下:
是否你会相信
有个美丽传说
那遥远地方是神秘王国
你就是王子
快乐地生活
而我却中了魔
在沉睡着
是注定的爱情
就算前方很艰辛
不能抹去在你心中的决心
相信你可以把我唤醒
祈祷上天给你智慧和勇气
穿过充满神秘魔法的城堡
越过那些让人难以发觉的泥沼
在那黑暗的洞穴一直寻找
一定能遇到睡梦中我熟悉的微笑
牵起双手
一起飞翔
飞到天空任意地去遨游
不要害怕
就让我们一起
眼前这个世界会更美丽
http://www.youtube.com/watch?v=1gGFfq63w6w
中文翻译如下:
是否你会相信
有个美丽传说
那遥远地方是神秘王国
你就是王子
快乐地生活
而我却中了魔
在沉睡着
是注定的爱情
就算前方很艰辛
不能抹去在你心中的决心
相信你可以把我唤醒
祈祷上天给你智慧和勇气
穿过充满神秘魔法的城堡
越过那些让人难以发觉的泥沼
在那黑暗的洞穴一直寻找
一定能遇到睡梦中我熟悉的微笑
牵起双手
一起飞翔
飞到天空任意地去遨游
不要害怕
就让我们一起
眼前这个世界会更美丽
Friday, January 30, 2009
The road not taken (一条未走的路) by Frost R.
TWO roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;
Then took the other, as just as fair,
And having perhaps the better claim,
Because it was grassy and wanted wear;
Though as for that the passing there
Had worn them really about the same,
And both that morning equally lay
In leaves no step had trodden black.
Oh, I kept the first for another day!
Yet knowing how way leads on to way,
I doubted if I should ever come back.
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I—
I took the one less traveled by,
And that has made all the difference.
金色的树林里分出两条岔路,
可惜我不能同时去涉足,
我站在那路口久久伫立,
我向着一条路极目望去,
直到它消失在丛林深处.
但是我却选择了另外一条路,
它荒草萋萋,十分幽寂,
显得更诱人,更美丽.
虽然那天清晨落叶满地
两条路都未经脚印污染
呵,留下一条路等改日再见
但我知道路径延绵无尽头
恐怕我难以再回头,
也许多少年后在某个地方,
我将轻声叹息把往事回首,
一片树林里分出两条岔路,
而我选择了人迹更稀少的那条,
从此决定了我一生的道路。
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;
Then took the other, as just as fair,
And having perhaps the better claim,
Because it was grassy and wanted wear;
Though as for that the passing there
Had worn them really about the same,
And both that morning equally lay
In leaves no step had trodden black.
Oh, I kept the first for another day!
Yet knowing how way leads on to way,
I doubted if I should ever come back.
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I—
I took the one less traveled by,
And that has made all the difference.
金色的树林里分出两条岔路,
可惜我不能同时去涉足,
我站在那路口久久伫立,
我向着一条路极目望去,
直到它消失在丛林深处.
但是我却选择了另外一条路,
它荒草萋萋,十分幽寂,
显得更诱人,更美丽.
虽然那天清晨落叶满地
两条路都未经脚印污染
呵,留下一条路等改日再见
但我知道路径延绵无尽头
恐怕我难以再回头,
也许多少年后在某个地方,
我将轻声叹息把往事回首,
一片树林里分出两条岔路,
而我选择了人迹更稀少的那条,
从此决定了我一生的道路。
Wednesday, January 14, 2009
肖邦的音乐在电影《钢琴家》中 (zz)
罗曼·波兰斯基的经典电影《钢琴家》,作为一部波兰大导演摄制的反映波兰犹太人在二战期间遭受德国人残酷迫害的电影,不可避免地选择肖邦的音乐为电影的主导音乐。波兰斯基在选择音乐上匠心独具。
波兰斯基从众多肖邦的作品中选用了三首夜曲,两首叙事曲,一首圆舞曲,一首前奏曲,两首马祖卡和电影结尾时的钢琴与乐队的Grande Polonaise,每一首都选用得恰到好处,和电影的结构、情节和场景的转换、主人公的心境环环相扣。
电影伊始,钢琴家在录音棚里录制肖邦的《升c小调夜曲》。平静舒缓的开始,忧伤宽广的基调,预示着千百万犹太人的生命即将终止的厄运。波兰斯基在这里采用的完全是史实:一九三九年九月二十三日,正当钢琴家Szpilman在华沙的录音棚里录制肖邦的《升c小调夜曲》,纳粹的炸弹无情地飘落下来。
电影中最震撼人心的一个片段,是在钢琴家的磨难即将结束时,为了打开一厅罐头,在火炉旁被德国军官发现。
波兰斯基在这个场景之前,已经通过音乐为这位德国军官是个什么样的人作了巧妙铺垫。当时钢琴家发现有德国人回来,便抱着罐头躲进阁楼里。这时,楼下隐约飘来贝多芬《月光奏鸣曲》第一乐章的琴声,德国军官将这段音乐弹奏得清冷悠怨,充满了人情,弥漫着惆怅和无奈,即暗示了他心有音乐灵犀、是一个艺术的欣赏者和同情者,又暗示了他骨子里没用其他德国刽子手那种凶残本性。有了这个铺垫,他作为一个德国军官,冒险拯救一个苟延残喘的犹太艺术家的薄命,才不显得唐突。。。。
当军官得知自己面前这个瘦弱无助的犹太人是钢琴家时,便请他弹点什么。钢琴家略微迟疑了一阵,似乎是惊魂未定,因为这个时刻也许就是他弱小生命的最后一刻。沉着下来后,他选择了弹奏肖邦的《g小调第一叙事曲》。这是一个大义凛然的选择,他要用生命的最后一刻,表达自己对迫害者的反抗。
肖邦叙事曲深受波兰大诗人密茨凯维支叙事诗的影响,《g小调第一叙事曲》更是根据密茨凯维支的叙事史诗《康拉德·华伦洛德》而写。1828年,《康拉德·华伦洛德》问世,叙述十三世纪立陶宛爱国者华伦洛德领导民众抗击入侵的日耳曼十字军骑士的故事。钢琴家选择这首曲子,不是同样不屈地抗击日耳曼恶魔、准备从容赴死吗?
影片的女配角,那个同情和帮助钢琴家的非犹太裔大提琴艺人,也被波兰斯基巧妙地用音乐加以升华。清晨,阳光温柔地照在窗帘上,让你觉得这更象是在美好的梦里,只有温情,没有铁蹄和枪炮。她从容专注、外忍内强、以宗教沉思的方式演奏巴赫的《第一大提琴组曲》中的《G大调前奏曲》,给她腹中的小生命。波兰斯基让一个被占领国的艺人,演奏占领者的音乐,他要表现的不仅仅是音乐可以超越种族、宗教和国界,更是人性可以超越种族、宗教和国界!
这种人性超越,何不是人类最伟大的精神之一!梅纽因就贡献过这样的超越。他是第一个在二战后去德国演奏的犹太艺术家,并因此在犹太人中声名狼籍。相当多的犹太人终生不肯原谅这为曾经带给他们自豪的桂冠艺术家。同样的情怀和超越,也体现在2003年奥斯卡最佳外语片、德国电影《Nowhere in Africa》里面。这同样是一个真实的故事。三十年代初,纳粹对犹太人的迫害刚刚开始的时候,一个居住法兰克弗的犹太人法官被迫抛弃所有的财产,带着妻女流亡到非洲的肯尼亚。但他和妻子的其他留在德国的家人全部为纳粹屠杀。战后,这个犹太人却决然选择回到德国,为重建德国尽一份薄力。
有人说,作为一部描写音乐家的电影,里面的音乐并不多,有违《钢琴师》这个名字。
大音希声,大象无形。一部写音乐家的电影,未必一定要用过多的音乐。类似的情况同样出现在最近的一部颇受好评的法国电影《钢琴教师》里(La Pianiste,获2001年嘎纳电影节最佳影片提名)。里面同样恰到好处地选择了贝多芬、舒伯特等人的音乐。这部电影未必能使大部分中国人共鸣和接受,因为里面的性爱过于真实,但离谱、恶心。
波兰斯基的《钢琴家》,除了配乐上巨匠手笔,摄影也美伦美奂。精美的构图,含蓄的用光,凝重的色调,镜头变换的节奏,每每令人回想起波兰斯基早年另一部经典浪漫影片----《苔丝》。
波兰斯基从众多肖邦的作品中选用了三首夜曲,两首叙事曲,一首圆舞曲,一首前奏曲,两首马祖卡和电影结尾时的钢琴与乐队的Grande Polonaise,每一首都选用得恰到好处,和电影的结构、情节和场景的转换、主人公的心境环环相扣。
电影伊始,钢琴家在录音棚里录制肖邦的《升c小调夜曲》。平静舒缓的开始,忧伤宽广的基调,预示着千百万犹太人的生命即将终止的厄运。波兰斯基在这里采用的完全是史实:一九三九年九月二十三日,正当钢琴家Szpilman在华沙的录音棚里录制肖邦的《升c小调夜曲》,纳粹的炸弹无情地飘落下来。
电影中最震撼人心的一个片段,是在钢琴家的磨难即将结束时,为了打开一厅罐头,在火炉旁被德国军官发现。
波兰斯基在这个场景之前,已经通过音乐为这位德国军官是个什么样的人作了巧妙铺垫。当时钢琴家发现有德国人回来,便抱着罐头躲进阁楼里。这时,楼下隐约飘来贝多芬《月光奏鸣曲》第一乐章的琴声,德国军官将这段音乐弹奏得清冷悠怨,充满了人情,弥漫着惆怅和无奈,即暗示了他心有音乐灵犀、是一个艺术的欣赏者和同情者,又暗示了他骨子里没用其他德国刽子手那种凶残本性。有了这个铺垫,他作为一个德国军官,冒险拯救一个苟延残喘的犹太艺术家的薄命,才不显得唐突。。。。
当军官得知自己面前这个瘦弱无助的犹太人是钢琴家时,便请他弹点什么。钢琴家略微迟疑了一阵,似乎是惊魂未定,因为这个时刻也许就是他弱小生命的最后一刻。沉着下来后,他选择了弹奏肖邦的《g小调第一叙事曲》。这是一个大义凛然的选择,他要用生命的最后一刻,表达自己对迫害者的反抗。
肖邦叙事曲深受波兰大诗人密茨凯维支叙事诗的影响,《g小调第一叙事曲》更是根据密茨凯维支的叙事史诗《康拉德·华伦洛德》而写。1828年,《康拉德·华伦洛德》问世,叙述十三世纪立陶宛爱国者华伦洛德领导民众抗击入侵的日耳曼十字军骑士的故事。钢琴家选择这首曲子,不是同样不屈地抗击日耳曼恶魔、准备从容赴死吗?
影片的女配角,那个同情和帮助钢琴家的非犹太裔大提琴艺人,也被波兰斯基巧妙地用音乐加以升华。清晨,阳光温柔地照在窗帘上,让你觉得这更象是在美好的梦里,只有温情,没有铁蹄和枪炮。她从容专注、外忍内强、以宗教沉思的方式演奏巴赫的《第一大提琴组曲》中的《G大调前奏曲》,给她腹中的小生命。波兰斯基让一个被占领国的艺人,演奏占领者的音乐,他要表现的不仅仅是音乐可以超越种族、宗教和国界,更是人性可以超越种族、宗教和国界!
这种人性超越,何不是人类最伟大的精神之一!梅纽因就贡献过这样的超越。他是第一个在二战后去德国演奏的犹太艺术家,并因此在犹太人中声名狼籍。相当多的犹太人终生不肯原谅这为曾经带给他们自豪的桂冠艺术家。同样的情怀和超越,也体现在2003年奥斯卡最佳外语片、德国电影《Nowhere in Africa》里面。这同样是一个真实的故事。三十年代初,纳粹对犹太人的迫害刚刚开始的时候,一个居住法兰克弗的犹太人法官被迫抛弃所有的财产,带着妻女流亡到非洲的肯尼亚。但他和妻子的其他留在德国的家人全部为纳粹屠杀。战后,这个犹太人却决然选择回到德国,为重建德国尽一份薄力。
有人说,作为一部描写音乐家的电影,里面的音乐并不多,有违《钢琴师》这个名字。
大音希声,大象无形。一部写音乐家的电影,未必一定要用过多的音乐。类似的情况同样出现在最近的一部颇受好评的法国电影《钢琴教师》里(La Pianiste,获2001年嘎纳电影节最佳影片提名)。里面同样恰到好处地选择了贝多芬、舒伯特等人的音乐。这部电影未必能使大部分中国人共鸣和接受,因为里面的性爱过于真实,但离谱、恶心。
波兰斯基的《钢琴家》,除了配乐上巨匠手笔,摄影也美伦美奂。精美的构图,含蓄的用光,凝重的色调,镜头变换的节奏,每每令人回想起波兰斯基早年另一部经典浪漫影片----《苔丝》。
Tuesday, January 6, 2009
The New Cachet of Being Formerly Rich (zz)
In a Q&A in the New York Times Magazine Sunday, comedian Joan Rivers talked about the importance of keeping up appearances in today’s image-obsessed world (in her case with so much plastic surgery that when she dies “they will donate my body to Tupperware.”)
But when it comes to wealth, keeping up appearances has become hopeless. She says losing money a la Madoff has even become something of a status symbol.
JOAN RIVERS: I love my life, except for losing all that money with Ruth and Bernie. I’m pleading with you, please say, “She lost a bundle with Bernie Madoff.”
DEBORAH SOLOMON: Did you?
JOAN RIVERS: No, but everybody is walking around now saying that, and that shows that you used to be very rich.
Joan is being Joan, of course. But in a post-bubble, government-bailout, tax-the-rich, post-Ponzi scheme economy, losing money may become socially acceptable. Maybe even respected.
Being a FRIP–a Formerly Rich Person–may become more socially and politically acceptable today than being a newly minted millionaire or billionaire. No one wants to be the guy driving the new Hummer or the woman showing off the new 72-carat necklace or the family building the biggest mansion on the block right. But losing $20 million or $1 billion, now that is an achievement. Plus, being a financial victim like everyone else gives the anxious wealthy instant everyman credibility.
If 2008 was about getting rich, 2009 will be about having been rich.
And the number of Frips is likely to keep increasing. There will surely be other Madoff-like hedge-funds and investment firms that implode, not nearly on the same scale, but certainly large enough to wreck some personal fortunes. Financial markets will continue to wobble, housing prices will continue to be soft and everything will be worth less than it was last year.
In short, the greatest engine of wealth creation over the past decade–leverage and liquidity–has stalled.
So perhaps the new competition among the wealthy at the country clubs won’t be about how much they just reaped from their leveraged buy-out or from their macro hedge fund. It will be how much they could afford to lose. Forget keeping up with the Joneses: 2009 will be about keeping up with the Adelsons.
But when it comes to wealth, keeping up appearances has become hopeless. She says losing money a la Madoff has even become something of a status symbol.
JOAN RIVERS: I love my life, except for losing all that money with Ruth and Bernie. I’m pleading with you, please say, “She lost a bundle with Bernie Madoff.”
DEBORAH SOLOMON: Did you?
JOAN RIVERS: No, but everybody is walking around now saying that, and that shows that you used to be very rich.
Joan is being Joan, of course. But in a post-bubble, government-bailout, tax-the-rich, post-Ponzi scheme economy, losing money may become socially acceptable. Maybe even respected.
Being a FRIP–a Formerly Rich Person–may become more socially and politically acceptable today than being a newly minted millionaire or billionaire. No one wants to be the guy driving the new Hummer or the woman showing off the new 72-carat necklace or the family building the biggest mansion on the block right. But losing $20 million or $1 billion, now that is an achievement. Plus, being a financial victim like everyone else gives the anxious wealthy instant everyman credibility.
If 2008 was about getting rich, 2009 will be about having been rich.
And the number of Frips is likely to keep increasing. There will surely be other Madoff-like hedge-funds and investment firms that implode, not nearly on the same scale, but certainly large enough to wreck some personal fortunes. Financial markets will continue to wobble, housing prices will continue to be soft and everything will be worth less than it was last year.
In short, the greatest engine of wealth creation over the past decade–leverage and liquidity–has stalled.
So perhaps the new competition among the wealthy at the country clubs won’t be about how much they just reaped from their leveraged buy-out or from their macro hedge fund. It will be how much they could afford to lose. Forget keeping up with the Joneses: 2009 will be about keeping up with the Adelsons.
Wednesday, November 19, 2008
泛着水波的回忆 (葛水平)
十几年前的一个秋天,我十六岁,在街角的一个不显眼处,守望一个人。
街上行人匆匆,逆着下午的阳光,我突然就有了一种孤独的感觉。阳光照射的目及之处——县人民礼堂,我看到了他。他用手撕扯着所有进去听下午戏的门票。我肯定这不是在制造一种戏剧效果,因为,这是我的初恋。
事实上,是我自己在单恋。
1986年冬日,我坐火车去长春拍一部戏剧电影。在卧铺车的上铺,夜里兴奋得睡不着,看火车在静谧的华北平原中穿行,想《日瓦戈医生》中的日瓦戈,也曾这样躺在去莫斯科的火车上,从格子里看雪花飘浸的苦难的俄罗斯祖国。在火车上,一切仿佛是从一条道路到一条河流,当我清醒地意识到自己存在并加以关注时,我想到我曾经的初恋。“执子之手,与子偕老”,早已经远我而去,想想看,我竟不曾与他说过一句话,永远看到的是拧着的眉,看人时从不多一点洞透,略微一扫,只记得大声吼过:“你们这一群唱戏的!”
我们这一群唱戏的,与现代生活截然相反的单调枯燥,却给我回味,那就是,历史以三五人的形象表演而延续着朝代更迭。历史很像是一幅图画里可以走来走去的部分,唱戏的虽不足解释整个生活的道理,却能让你读出近乎绝情的哀恸。
现在我不唱戏了,十几年唱来唱去,只演了一个被陈士美抛弃的秦香莲的女儿,怜兮兮一声声呼唤,如秦女士的两只水袖,拂来拂去,以不演唱故事的形式,延续着生活的继续。
我记得在长春时,我写过一封信给他。那是去伪皇宫回来,我为皇族社会最后一位皇后婉容心痛。郭布罗家族和爱新觉罗家族攀上了亲,做了一个退了位的皇帝的皇后,她的初恋诞生在辛亥革命之后,所有的子民已一律剪发喜庆共和,宣统只是一个空洞的尊号,给这样一个皇帝做皇后有多么尴尬苟且。她的初恋含合着常人无法企及的意味,她最后疯死在延吉。信上我说,短的是初恋,长的是婚姻。婚姻是无法跨越的,因为我不能跨越初恋。
长春之后,我写过第二封信。那是在五台山。那里的女孩十五六岁,因恋爱不如意或别的什么而出家。有一女尼曾对我说,没有家,这里是我修行的地方。一句让我没有得到一点安慰的话。在信中我表达了我一个绵长未了的心意。
可惜两封信都没有寄出。
1997年夏,我在北京和一位蒙族女人秀琴,在电影院看弗郎西丝卡和罗伯特·金凯的爱情故事。当时,有一些南方的同学很不屑于《廊》剧的演义,他们甚至无法相信一个人,怎么能用四十年的时间,去守候、去思恋、去执着一种仅存活了四天的爱情?秀琴说,恋爱是人永生的困扰,世界上如果真有爱情,譬如说被我们弄得没了心情,那就是失恋。秀琴说,人生目的太多,真爱定有。我和秀琴说起我的初恋。秀琴说,初恋是没有实现的心愿,也是平庸中企图的奇迹,因此美丽。
想想人的一生,将会有多少东西遗失在路上?这是绝对的必然。我们无意抛弃人美好的一切,我们行走在生命途中,有一天会因心灵负载很重时,拾起被遗忘了的美好,感受着已往远去了的情调。我现在已经是一个孩子的母亲,自然也就是一个男人的妻子了。我们常坐在沙发上说起往事。他说他曾经有过初恋,只是不记起对哪个女子有爱产生。那么说,初恋只能是一个过程,没有结果了,但决不可能没有记忆。他一定对我说了谎。这时,电视上正播放着香港的武打片《东邪西毒》。他说,当初为什么不直接求爱?我说,哪有女孩子先行做事的。他说,理论上的绝对正确且难逃矫情的套路。这时,电视上的东邪正带着一坛新酒,从绿色遍染的东边到风沙燥烈的西域,送给那里的西毒。一坛酒,一世人,就只为了一个女人桃花。寂寞而又仇恨的旅行。桃花是以此试探西毒的真心,东邪是为借此一睹桃花的芳容,西毒是为了从此得到桃花的消息。一年一次,坛底见空。当手擎桃花的张曼玉,倚在夕照脉脉水晶晶的小轩窗前,肠断白苹洲时,结局自然明白。那种古典的浪漫情怀像破裂的一管箫音,自远而近。
初恋给我无尽的联想,我真切地感到了它的存在。从恋爱的第一页到婚姻的最后,一切都是完全真实的。它牵动着我的想象,让我相信世界上不仅存在着精神与念想,同时还有守候。我能够守候这些美好的事物,在生存的距离里与自然更为亲近,这样的日子我还需求什么呢?!
秋天是那样透明,高粱、玉米、毛豆,提着长裙走过田间时,思想在行进中就如水一样四处漫溢,我突然感到了某种温柔的触及。哦,这些泛着层层水波的回忆!
街上行人匆匆,逆着下午的阳光,我突然就有了一种孤独的感觉。阳光照射的目及之处——县人民礼堂,我看到了他。他用手撕扯着所有进去听下午戏的门票。我肯定这不是在制造一种戏剧效果,因为,这是我的初恋。
事实上,是我自己在单恋。
1986年冬日,我坐火车去长春拍一部戏剧电影。在卧铺车的上铺,夜里兴奋得睡不着,看火车在静谧的华北平原中穿行,想《日瓦戈医生》中的日瓦戈,也曾这样躺在去莫斯科的火车上,从格子里看雪花飘浸的苦难的俄罗斯祖国。在火车上,一切仿佛是从一条道路到一条河流,当我清醒地意识到自己存在并加以关注时,我想到我曾经的初恋。“执子之手,与子偕老”,早已经远我而去,想想看,我竟不曾与他说过一句话,永远看到的是拧着的眉,看人时从不多一点洞透,略微一扫,只记得大声吼过:“你们这一群唱戏的!”
我们这一群唱戏的,与现代生活截然相反的单调枯燥,却给我回味,那就是,历史以三五人的形象表演而延续着朝代更迭。历史很像是一幅图画里可以走来走去的部分,唱戏的虽不足解释整个生活的道理,却能让你读出近乎绝情的哀恸。
现在我不唱戏了,十几年唱来唱去,只演了一个被陈士美抛弃的秦香莲的女儿,怜兮兮一声声呼唤,如秦女士的两只水袖,拂来拂去,以不演唱故事的形式,延续着生活的继续。
我记得在长春时,我写过一封信给他。那是去伪皇宫回来,我为皇族社会最后一位皇后婉容心痛。郭布罗家族和爱新觉罗家族攀上了亲,做了一个退了位的皇帝的皇后,她的初恋诞生在辛亥革命之后,所有的子民已一律剪发喜庆共和,宣统只是一个空洞的尊号,给这样一个皇帝做皇后有多么尴尬苟且。她的初恋含合着常人无法企及的意味,她最后疯死在延吉。信上我说,短的是初恋,长的是婚姻。婚姻是无法跨越的,因为我不能跨越初恋。
长春之后,我写过第二封信。那是在五台山。那里的女孩十五六岁,因恋爱不如意或别的什么而出家。有一女尼曾对我说,没有家,这里是我修行的地方。一句让我没有得到一点安慰的话。在信中我表达了我一个绵长未了的心意。
可惜两封信都没有寄出。
1997年夏,我在北京和一位蒙族女人秀琴,在电影院看弗郎西丝卡和罗伯特·金凯的爱情故事。当时,有一些南方的同学很不屑于《廊》剧的演义,他们甚至无法相信一个人,怎么能用四十年的时间,去守候、去思恋、去执着一种仅存活了四天的爱情?秀琴说,恋爱是人永生的困扰,世界上如果真有爱情,譬如说被我们弄得没了心情,那就是失恋。秀琴说,人生目的太多,真爱定有。我和秀琴说起我的初恋。秀琴说,初恋是没有实现的心愿,也是平庸中企图的奇迹,因此美丽。
想想人的一生,将会有多少东西遗失在路上?这是绝对的必然。我们无意抛弃人美好的一切,我们行走在生命途中,有一天会因心灵负载很重时,拾起被遗忘了的美好,感受着已往远去了的情调。我现在已经是一个孩子的母亲,自然也就是一个男人的妻子了。我们常坐在沙发上说起往事。他说他曾经有过初恋,只是不记起对哪个女子有爱产生。那么说,初恋只能是一个过程,没有结果了,但决不可能没有记忆。他一定对我说了谎。这时,电视上正播放着香港的武打片《东邪西毒》。他说,当初为什么不直接求爱?我说,哪有女孩子先行做事的。他说,理论上的绝对正确且难逃矫情的套路。这时,电视上的东邪正带着一坛新酒,从绿色遍染的东边到风沙燥烈的西域,送给那里的西毒。一坛酒,一世人,就只为了一个女人桃花。寂寞而又仇恨的旅行。桃花是以此试探西毒的真心,东邪是为借此一睹桃花的芳容,西毒是为了从此得到桃花的消息。一年一次,坛底见空。当手擎桃花的张曼玉,倚在夕照脉脉水晶晶的小轩窗前,肠断白苹洲时,结局自然明白。那种古典的浪漫情怀像破裂的一管箫音,自远而近。
初恋给我无尽的联想,我真切地感到了它的存在。从恋爱的第一页到婚姻的最后,一切都是完全真实的。它牵动着我的想象,让我相信世界上不仅存在着精神与念想,同时还有守候。我能够守候这些美好的事物,在生存的距离里与自然更为亲近,这样的日子我还需求什么呢?!
秋天是那样透明,高粱、玉米、毛豆,提着长裙走过田间时,思想在行进中就如水一样四处漫溢,我突然感到了某种温柔的触及。哦,这些泛着层层水波的回忆!
Friday, October 24, 2008
The Orange ( zz )
The Orange ( By Wendy Cope )
At lunchtime I bought a huge orange
The size of it made us all laugh
I peeled it and shared it with Robert and Dave --
They got quarters and I had a half.
And that orange it made me so happy,
As ordinary things often do
Just lately. The shopping. A walk in the park
This is peace and contentment. It's new.
The rest of the day was quite easy.
I did all the jobs on my list
And enjoyed them and had some time over.
I love you. I'm glad I exist.
At lunchtime I bought a huge orange
The size of it made us all laugh
I peeled it and shared it with Robert and Dave --
They got quarters and I had a half.
And that orange it made me so happy,
As ordinary things often do
Just lately. The shopping. A walk in the park
This is peace and contentment. It's new.
The rest of the day was quite easy.
I did all the jobs on my list
And enjoyed them and had some time over.
I love you. I'm glad I exist.
Monday, September 8, 2008
Tax payers - GIVE me the MONEY
http://www.youtube.com/watch?v=BFDlOzJGriI
http://www.youtube.com/watch?v=rRy_mP627z8
http://www.youtube.com/watch?v=rRy_mP627z8
Friday, August 29, 2008
When Did Being Rich Get So Complicated? (zz)
Ah, the good life. You made your millions or billions. Now it is time to kick back, relax by the pool…and manage your costly and complicated family office.
Family offices are must-haves for Upper Richistanis. If you have $100 million or more, chances are you’ll need a family office to manage your investments, travel plans, philanthropy, political activities, bill-paying and estate plans. That’s not to mention the multiple homes and wives. If the lives of today’s Upper Richistanis are businesses, the family office is corporate headquarters.
“I have four people (in the office) and five people at the house and I don’t even have a job,” says AOL founder James V. Kimsey (left), in an article in the Washington Post. “Why it takes that many people to sustain me is hard to explain.”
To help answer that question, The Post article by Thomas Heath plumbs the inner workings of Mr. Kimsey’s family office. (Richistan Note: When I met Mr. Kimsey at a Richistan reading in D.C. last summer, he had a great line about rich people having three basic choices when it comes to deciding what to do with their money. “You give it to your kids and ruin their lives, you can waste it on buying lots of stuff, or you can give it to charity.” He was leaning toward the last one).
Mr. Kimsey’s staff includes:
The Chief of Staff–Peter Kirsch, a Marquette grad, is Chief of Staff in the Office of James V. Kimsey. He coordinates investments, requests for money, philanthropic giving, home renovations and meetings with politicians and CEOs.
Part gatekeeper, part investment manager, he is known as “Dr. No,” since he says “no” so often. He also checks in with Mr. Kimsey’s house staff–a separate army of chauffeurs, housekeepers, cooks and engineers.
The Accounting Manager–Hired from the wealth-management division of Legg Mason, Mr. Weir’s job is to “follow the money.”
The Scheduler–Nancy Merritt, a former staffer on Capitol Hill, has the mission of getting Mr. Kimsey’s daily schedule “under control.” Mr. Kimsey calls her “my nanny.”
“She organizes my romantic life,” says Mr. Kimsey, a 68-year-old divorcee. “My girlfriends think I’m a much more sensitive, caring guy since Nancy has been with me.”
Comments
To me, wealth should primarily be about having less stress. The wealthy should keep more of their assets liquid, in market neutral funds. Instead they bizarrely insist on making their own lives more cumbersome.
Comment by Jay - August 27, 2008 at 6:46 pm
Jay, please don’t tell us you are this naive about wealth managment. The Chief of Staff is definitely a necessity, if only for the gatekeeper in him. The wealthy are *CONSTANTLY* getting requests for donations (and heaven forbid they get the tiniest bit fatigued from it). All those extra people are designed to make sure Mr. Kimsey’s life is less stressful. In a sense they are all gatekeepers, (except for maybe the home maintenence staff). Look at what can happen to a fortune if you don’t take care of it? Look at all those people invested in Bear Stearns? And when you are rich, you are surrounded by a whole bunch of people who want to know you, be with you, learn from you, dine with you, and, yes, take from you everything they can get. And women, will “line up like ducks” for a man with money. I’m sure he also has attorneys on retainer too because the more wealthy you are, the more you are probably sued (for stupid reasons). I can definitely see how a staff like that is a must if you’re going to reduce your stress.
Comment by Anonymiss - August 27, 2008 at 8:10 pm
( From WSJ "The Wealth Report" Blog )
Family offices are must-haves for Upper Richistanis. If you have $100 million or more, chances are you’ll need a family office to manage your investments, travel plans, philanthropy, political activities, bill-paying and estate plans. That’s not to mention the multiple homes and wives. If the lives of today’s Upper Richistanis are businesses, the family office is corporate headquarters.
“I have four people (in the office) and five people at the house and I don’t even have a job,” says AOL founder James V. Kimsey (left), in an article in the Washington Post. “Why it takes that many people to sustain me is hard to explain.”
To help answer that question, The Post article by Thomas Heath plumbs the inner workings of Mr. Kimsey’s family office. (Richistan Note: When I met Mr. Kimsey at a Richistan reading in D.C. last summer, he had a great line about rich people having three basic choices when it comes to deciding what to do with their money. “You give it to your kids and ruin their lives, you can waste it on buying lots of stuff, or you can give it to charity.” He was leaning toward the last one).
Mr. Kimsey’s staff includes:
The Chief of Staff–Peter Kirsch, a Marquette grad, is Chief of Staff in the Office of James V. Kimsey. He coordinates investments, requests for money, philanthropic giving, home renovations and meetings with politicians and CEOs.
Part gatekeeper, part investment manager, he is known as “Dr. No,” since he says “no” so often. He also checks in with Mr. Kimsey’s house staff–a separate army of chauffeurs, housekeepers, cooks and engineers.
The Accounting Manager–Hired from the wealth-management division of Legg Mason, Mr. Weir’s job is to “follow the money.”
The Scheduler–Nancy Merritt, a former staffer on Capitol Hill, has the mission of getting Mr. Kimsey’s daily schedule “under control.” Mr. Kimsey calls her “my nanny.”
“She organizes my romantic life,” says Mr. Kimsey, a 68-year-old divorcee. “My girlfriends think I’m a much more sensitive, caring guy since Nancy has been with me.”
Comments
To me, wealth should primarily be about having less stress. The wealthy should keep more of their assets liquid, in market neutral funds. Instead they bizarrely insist on making their own lives more cumbersome.
Comment by Jay - August 27, 2008 at 6:46 pm
Jay, please don’t tell us you are this naive about wealth managment. The Chief of Staff is definitely a necessity, if only for the gatekeeper in him. The wealthy are *CONSTANTLY* getting requests for donations (and heaven forbid they get the tiniest bit fatigued from it). All those extra people are designed to make sure Mr. Kimsey’s life is less stressful. In a sense they are all gatekeepers, (except for maybe the home maintenence staff). Look at what can happen to a fortune if you don’t take care of it? Look at all those people invested in Bear Stearns? And when you are rich, you are surrounded by a whole bunch of people who want to know you, be with you, learn from you, dine with you, and, yes, take from you everything they can get. And women, will “line up like ducks” for a man with money. I’m sure he also has attorneys on retainer too because the more wealthy you are, the more you are probably sued (for stupid reasons). I can definitely see how a staff like that is a must if you’re going to reduce your stress.
Comment by Anonymiss - August 27, 2008 at 8:10 pm
( From WSJ "The Wealth Report" Blog )
Wednesday, August 27, 2008
Love 2008
The true artist has a grand theme in her mind.
Moreover, she knows how to express it freely, with
creativity, through the operation of her fingers. Each
start movement of her finger gives me expectation, as
I am eager to know what is next, what it could be, and
what it will be. Each completion of a picture brings
me amazement, as I wonder how many years of practice
is needed to reach such a stage that the sands are played
waywardly in her hands, and the outcome is fully under
her control. When she calmly erases her
previous masterpiece, I wanted to shout "wait a
minute....", yet I barely have time to feel sorry for
what was disappearing, a brand new surprise starts. A
new wondrous creation of art encourages me to keep on
looking forward instead of thinking backward. When she
finally ceases drawing, I then have a moment to ponder
over the lost sand works - they are still there, in my
memory, along with the spectacular feelings.
Maybe life is also like that. No matter how much we
want to lean on, and hold on to our previous
prosperity, time will calmly, mercilessly bleach our
past. Every second, or even millisecond arrives promptly,
never delays its pace. At the mean time, it
allows opportunity for the current........Even though gone
are the times, the things and the people, they are still
staying in the back of our mind, walk with us in our life journey.
When we have some time to pause and to meditate, they bring us
the warm feelings of encouragement.
The old shall end before the new can begin. When we dance with
the music of time, the old things are transformed into the memory
of love which will stay with us, see us through, and keep us
going on and on...
A rather profound message for the new year.
Moreover, she knows how to express it freely, with
creativity, through the operation of her fingers. Each
start movement of her finger gives me expectation, as
I am eager to know what is next, what it could be, and
what it will be. Each completion of a picture brings
me amazement, as I wonder how many years of practice
is needed to reach such a stage that the sands are played
waywardly in her hands, and the outcome is fully under
her control. When she calmly erases her
previous masterpiece, I wanted to shout "wait a
minute....", yet I barely have time to feel sorry for
what was disappearing, a brand new surprise starts. A
new wondrous creation of art encourages me to keep on
looking forward instead of thinking backward. When she
finally ceases drawing, I then have a moment to ponder
over the lost sand works - they are still there, in my
memory, along with the spectacular feelings.
Maybe life is also like that. No matter how much we
want to lean on, and hold on to our previous
prosperity, time will calmly, mercilessly bleach our
past. Every second, or even millisecond arrives promptly,
never delays its pace. At the mean time, it
allows opportunity for the current........Even though gone
are the times, the things and the people, they are still
staying in the back of our mind, walk with us in our life journey.
When we have some time to pause and to meditate, they bring us
the warm feelings of encouragement.
The old shall end before the new can begin. When we dance with
the music of time, the old things are transformed into the memory
of love which will stay with us, see us through, and keep us
going on and on...
A rather profound message for the new year.
Tuesday, June 3, 2008
Subscribe to:
Posts (Atom)