Code Library

Free Source Code and Program Tips

Microsoft Visual C++ Tips

Here are some tips of Microsoft Visual Studio 6.0. Display the LastError’s value When we want to get the LastError message, we often using the following code. LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPTSTR) &lpMsgBuf, 0, NULL ); // Process any inserts in lpMsgBuf. // … [...]

Change the default editor to EditorMonkey

The default rich editor was so poor, so I decided to choose a better one.  And last few days, I find EditorMonkey from http://zhiqiang.org/blog/about/ , so I install it in my blog. On the other hand, this is the default editor in my another blog (Chinese version). Thanks.

Speed up loading of pages

It’s a truth that loading a html page is much faster than loading php page. So there is a simple method to speed up the WordPress page loading. It’s converting dymantic pages to static html ones. First, save the following to a new file cron.sh in the home directory: wget -O /home/ucosfot/index.html http://www.ucosoft.com/index.php Then, edit [...]

A great script language -Lua

Lua (http://www.lua.org), is a greate script language, which is simple and powerful. Compared with JavaScript or VBScript provided by Microsoft ScriptEngine, Lua is more simple. Ther is no need of COM or Automation knowledge to support Lua. It fits me well. Below is the description of Lua from lua.org. Lua is a powerful light-weight programming [...]

This paper is focused on the complex shape modeling and rendering problems in CAGD and CAM field. Based on the viewpoints of from discrete to discrete and intuited geometric operation, we roundly summarize our theoretical research works and experimental system development in this paper. The main contents include geometric continuity preserving problem in parametric curve/surface [...]

[Abstract] Based on the view point of strain energy, some problems in structural earthquake analysis have been researched in this paper. Firstly, a general method of judging the adequacy of the number of participation modes is proposed. Secondly, the author advance the concept of “the most disadvantageous earthquake direction” , on which a detailed algorithm [...]

Abstract: Based on the concept of generalized compatibility, a super element of shear-wall is constructed, in which one rectangular hole are permitted. The compatibility of wall-to-wall is realized by adopting the condition of generalized compatibility in this element and such type of constructing method directly leads to the localization of meshing in FEM analysis of [...]

Brief History of the University

The roots of the University of California go back to the gold rush days of 1849, when the drafters of the State Constitution, a group of vigorous and farsighted people, required the legislature to "encourage by all suitable means the promotion of intellectual, scientific, moral and agricultural improvement" of the people of California. These early [...]