摘要:
mke2fs /dev/hdb1mkfs.ext2 /dev/hdb1both of which make an ext2 file system on the first partition of the second drive, andmke2fs -j /dev/hdb1mkfs.ext3 /dev/hdb1make an ext3 file system.mkfs.ext3 -m 1/dev/hdb1creates a file system with only 1% of its space reserved for the root user. 阅读全文
摘要:
下载glibc wget http://ftp.gnu.org/gnu/glibc/glibc-2.7.tar.gz解压 #tar -zxvf glibc-2.7.tar.gz#./glibc-2.7/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks#make#make install 阅读全文
摘要:
Using Visual Studio 2005, you edit the default.js file in VC\VCWizards\AppWiz\Generic\Application\scripts\1033 under the dir where Visual Studio is installed on your system. Look for the two places where this assignment occurs: config.CharacterSet = charSetUNICODE and change them to config.Charact.. 阅读全文
摘要:
CreatEvent():创建一个事件对象SetEvent():把指定事件对象的状态设置为发信号状态ResetEvent():把指定事件对象的状态设置为不发信号状态函数CreateEvent创建一个事件对象,参数1必须为NULL,参数2指定是否手工重新设置事件对象的状态。如果为FALSE,当等待函数接到信号并返回后此事件对象被自动置为无信号状态。这时等待此事件对象的其它线程就不会被唤醒,因为事件对象已经被置为无信号状态。如果参数2设置为TRUE,当等待函数接到信号并返回后事件对象不会被自动置于无信号状态,其它等待此事件对象的线程都能够被唤醒。用ResetEvent函数可以手工将事件对象置为无信 阅读全文
摘要:
Vs2008将注册表中的HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\AddIns\VMDebugger.Connect下的LoadBehavior项改为0即可(原来是3) 阅读全文
摘要:
一、WSAStartup函数 int WSAStartup ( WORD wVersionRequested, LPWSADATA lpWSAData ); 使用Socket的程序在使用Socket之前必须调用WSAStartup函数。该函数的第一个参数指明程序请求使用的Socket版本,其中高位字节指明副版本、低位字节指明主版本;操作系统利用第二个参数返回请求的Socket的版本信息。当一个应用程序调用WSAStartup函数时,操作系统根据请求的Socket版本来搜索相应的Socket库,然后绑定找到的Socket库到该应用程序中。以后应用程序就可以调用所请求的Socket库中的其它Soc 阅读全文
摘要:
The WSADATA structure is used to store Windows Sockets initialization information returned by a call to the AfxSocketInit global function.struct WSAData { WORD wVersion; WORD wHighVersion; char szDescription[WSADESCRIPTION_LEN+1]; char szSystemStatus[WSASYSSTATUS_LEN+1]; unsigned short iMaxSockets; 阅读全文
摘要:
#include <iostream>using namespace std;template<class ElementType,int n>class ArrayTemplate{public:ArrayTemplate();ArrayTemplate(const ElementType &t);ElementType& operator[](int i);void show();private:ElementType a[n];};template<class ElementType,int n>ArrayTemplate<Ele 阅读全文
摘要:
• The main function• The class_factory method (only for C++ device server)• The StepperMotorClass class• The DevReadPositionCmd and DevReadDirectionCmd classes• The PositionAttr, SetPositionAttr and DirectionAttr classes• The StepperMotor class. 阅读全文
摘要:
#include <tango.h>int main(int argc,char *argv[]){Tango::Util *tg;try{ tg = Tango::Util::init(argc,argv);tg->server_init();cout << "Ready to accept request" << endl;tg->server_run(); }catch (bad_alloc){ cout << "Can’t allocate memory!!!" << end 阅读全文