- 博客(57)
- 资源 (2)
- 收藏
- 关注
原创 个人wiki网站的搭建
介绍当你的资料多到觉得很难管理的时候,那么就需要一个资料管理库了,Wiki库就是一个很好的选择。在个人电脑上需要安装MediaWiki。怎么安装和配置看 http://wasabi.javaeye.com/blog/309176 , 但网上关于wiki的资料要么只介绍安装和配置,要么就是整个wiki的使用说明,前者太简单,后者太庞大,这儿介绍一个真正有用的使用mediawiki的方法
2011-02-12 10:34:00
13712
原创 Explicit和Implicit迭代的一个例子
介绍CAE求解方法一般有两种1. 显式(Explicit) 第n步结果可以从n-1,n-2,...1步的结果直接推导出来,迭代时每步计算量小,但迭代增量也有个限制,不能太大,否则会出现发散2. 隐式(Implicit) 第n步结果不能直接从前面结果推导出来,必须做进一步的求解,这样,迭代时每步计算量大,但迭代增量可以很大用Abaqus一段时间了,但一直对这两种方法没有一个直观的感念。正好前段时间碰到一个前向欧拉和后向欧拉的问题,顺便研究了一下。前向欧拉和后向欧拉前向欧拉和后向欧拉分别是显式和隐式
2010-12-13 16:57:00
5471
原创 const指针和指向const对象的指针
<br />对这两个概念老是混淆,最近又遇到一个类似题目:<br />//Code A typedef map<int, int> MapInt; MapInt aMapInt; const int A = 1; A = 3; aMapInt.find(A);//Code B typedef map<int*, int> MapPoint; MapPoint aMapPoint; const int* B = new int; aMapPoint.find(B);
2010-09-26 09:34:00
648
原创 CAD中的实数精度问题
前言: 在CAD建模中,实数精度是个非常普遍的问题,计算机只能存储有限位数的实数,也就是一个无限精确的实数有可能被截断成了另一个数,而随着实数之间的运算这个误差就会累加,这时就有可能发生意想不到的致命错误。
2010-09-19 19:33:00
1035
原创 匿名命名空间或者static的使用
Q:普通的两个c++函数,fun1(), fun2()我希望fun1()只能被fun2()调用,其它函数都没法调用,请问怎么做?一种方式是取消fun1(),直接在fun2()中实现fun1()。不过我还是想知道还有没有其它实现方式?A:1. fun1设置为static2. 用匿名命名空间http://hi.baidu.com/%CF%F4%CA%AE%C8%FD%C0%C9/blog/item/97f1af3806d66ccad462250a.html
2010-09-13 15:04:00
658
原创 模板中用iterator
<br /> template <class _T><br /> void AdvanceOneIterator(typename std::list<_T*>::iterator it, const list<_T*>& L)
2010-09-09 09:29:00
498
转载 利用多核多线程进行程序优化
http://www.ibm.com/developerworks/cn/linux/l-cn-optimization/index.html
2009-12-19 08:06:00
575
原创 How to handle a double in CAD modeling
1. The way of Kbool. http://boolean.klaasholwerda.nl/algdoc/basicstepsframe.html Assuming the input data is supplied in doubles, the coordinates will be converted to 64bit in
2009-12-09 10:59:00
358
原创 Select item in CListCtrl
1. Set Property of "Always Show Selection" = TRUE. 2. m_levellist.SetItemState(iItem, LVIS_SELECTED, LVIS_SELECTED);
2009-11-17 11:24:00
514
原创 Get Document class anywhere in MFC program.
inline C3DBuilderDoc* Layer::GetDocument(){ C3DBuilderDoc* builderdoc = NULL; CWinApp* pApp = AfxGetApp(); C3DBuilderApp* pA = (C3DBuilderApp*) pApp; POSITION pos; po
2009-11-16 09:57:00
387
原创 vector在erase后end()指向有值了
vector test; test.clear(); test.push_back(1); test.push_back(2); test.push_back(3); vector::iterato
2009-10-09 16:50:00
799
原创 link库冲突的问题
编译出错如下:1>Linking...1>mfcs80u.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRT.lib(dllmain.obj)1>LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined
2009-09-23 10:27:00
3095
原创 msvcprt.lib 冲突的问题
.exe调用lib编译出错:3>HM2p5DataStructure.lib(DataStructureIn.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker pe
2009-09-21 17:13:00
6890
1
转载 非常不错的一些关于管理方面的小故事
http://topic.youkuaiyun.com/u/20090901/09/09F2A06F-F255-422D-8C9C-632EF46CECDA.html
2009-09-03 13:23:00
739
转载 惠普前总裁孙振耀指点职业规划
我有个有趣的观察,外企公司多的是25-35岁的白领,40岁以上的员工很少,二三十岁的外企员工是意气风发的,但外企公司40岁附近的经理人是很尴尬的。我见过的40岁附近的外企经理人大多在一直跳槽,最后大多跳到民企,比方说,唐骏。外企员工的成功很大程度上是公司的成功,并非个人的成功,西门子的确比国美大,但并不代表西门子中国经理比国美的老板强,甚至可以说差得很远。而进外企的人往往并不能很早理解这一
2009-08-31 13:17:00
503
原创 debug调试时没法退出的问题
Discription:一个GUI的.exe调用我的dll,release下一切正常,但debug下即使在界面上关闭了.exe,进程中这个.exe还是存在。Solution:不用afxwin.h。总结,MFC的东西还是尽量不要用的好。
2009-08-14 10:06:00
1050
原创 nvoglnt.dll崩溃的错误
应该是opengl和nvidia显卡不兼容的问题。在call stack中发现地址为69621FAD出错。尝试把exe程序属性中选兼容win2000后可能解决这个问题。http://forums.nvidia.com/lofiversion/index.php?t85575.html
2009-08-03 10:54:00
1025
原创 const_iterator
http://msdn.microsoft.com/en-us/library/0ecs6a5h(VS.80).aspx
2009-07-09 14:29:00
389
转载 如何点击OK后ProperSheet不自动关闭
http://dev.youkuaiyun.com/develop/article/35/35982.shtm
2009-07-01 10:52:00
398
原创 如何在vs2005中加入32bit真彩色的icon
1.可以用vs2008的rc.exe/dll加入,但可能导致不稳定。2.依然用vs2005的rc.exe/dll.譬如加LayerManage.ico(1).import icon,导入LayerManage.ico,此时vs会报告32bit无法载入,没事,点确定, 此时发现LayerManage.ico已经被vs改成一个默认的icon.(2)关闭vs,把LayerManage.i
2009-06-12 15:32:00
3159
1
原创 list的splice注意事项
void splice(iterator position, list&, iterator first, iterator last); 目的是将[first, last)内所有元素接到position之前,但注意position不能位于[first, last)之内!所以:lister.splice(lister.begin(), lister, list
2009-06-11 16:04:00
498
原创 How to use Clapack
In project:(1) add the .h include.(2) add the lib: blas.libclapack.liblibF77.liblibI77.lib In file://!CLapack.#ifdef small#undef small //must be done, otherwise small would be
2009-06-10 09:09:00
532
原创 如何用dll的资源
在使用前加 AFX_MANAGE_STATE(AfxGetStaticModuleState());参考:http://blog.youkuaiyun.com/optman/archive/2005/03/28/332277.aspx
2009-06-09 15:31:00
258
原创 modify the font of pages in PropertySheet
BOOL MyPropertySheet::OnInitDialog(){ BOOL bResult = CXTPPropertySheet::OnInitDialog(); // TODO: Add your specialized code here CFont* CFonter = new CFont(); CFonter->CreateFont
2009-05-20 09:02:00
346
原创 如何动态的让可编辑的CListCtrl排序
如果只是普通的CListCtrl,那么排序时可参考:http://support.microsoft.com/kb/250614/en-us大体上:加入点击列的相应函数: void CEditListCtrl::OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);里面加入排序系统函数 SortItems(
2009-04-15 14:06:00
665
原创 How to judge if an iterator is used before.
list ListInt;list::iterator it = ListInt.end(); if ( it == ListInt.end() ){//unvalid.}else{//valid} http://www.itzhe.cn/news/20080101/40229_3.html
2009-04-09 09:42:00
403
原创 程序运行msvcr80.dll不匹配问题
问题如下:vs2005编译出来的程序,发布时强制让用户安装了C++ Run Time 2005 Restribution,但在个别用户处运行时都出现如下错误: Error Signature:AppVer 2.0.1.11 ModName: msvcr80.dll ModVer 8.0.50727.1433 Offset 0004f029 我在google上搜了一下,发现很多软件譬如Out
2009-03-27 11:19:00
1425
原创 如何修正多个库之间互相调用的link错误
多个库调用时可能出现:1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: __invalid_parameter already defined in LIBCMT.lib(invarg.obj)这类错误。1. 一种方法是所有的库都用同样的MFC, 譬如都用Use MFC in a Shared dll.但即使做了这步也不一定能保证没有上面的编译错
2009-03-19 11:08:00
526
原创 the head to use CString
<br /> if you use MFC dll: #include <atlstr.h><br /> if you use standard windows library: #include <cstringt.h>
2009-03-18 08:48:00
238
原创 afxwin.h maybe cause error in compile.
<br />C:/Program Files/Microsoft Visual Studio 8/VC/atlmfc/include/afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
2009-03-18 08:45:00
327
原创 afxwin.h这个头文件可能会导致编译错误
<br />错误如下:<br />C:/Program Files/Microsoft Visual Studio 8/VC/atlmfc/include/afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]<br />
2009-03-18 08:44:00
1693
原创 dll 互相调用的变态问题
solution 下有三个工程A: 为一个静态库 不一定需要MFC.B: 为一个动态库,需要调用B, 但不一定需要MFCC: 为一个动态库,需要调用B和A. 而且需要MFC和XTP.1。如果C都选择Shared MFC dll:则只能在A,B都为shared MFC dll 编译通过, 但运行时:debug到C时只要调用XTP的地方就出错。release有内存泄露问题。此问
2009-03-11 17:56:00
690
原创 .rc file
// Microsoft Visual C++ generated resource script.//#include "resource.h"#define APSTUDIO_READONLY_SYMBOLS///////////////////////////////////////////////////////////////////////////////// Generated fr
2009-03-04 15:40:00
634
原创 cstring to wchar_t
CString str; wchar_t * InInfo = str.GetBuffer(0);// 如果是Unicode 字符集 char * InInfo = str.GetBuffer(0);// 如果是多字节字符集
2009-03-04 15:05:00
495
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人