每天看一下的白领健康讲座
摘要: 白领健康讲座从外服05年度雇员体检资料谈起外服雇员2005年度体检数据体检总数:38381人男性: 18756人女性: 19625人体检结果: 本次体检未见明显异常者: 8907人 也就是说,各类患病人数达到 29474人体检患病人数占前三位的病种外服近4万白领体检结果的反映目前中青年白领的健康状况令人堪忧.高血脂、脂肪肝等以往老年人容易得的心脑血管疾病都在中青年白领中提前报到,应该引起方方面面的重视。然而有调查结果显示目前白领中有近20%的人认为"没有时间健身或照顾自己的健康"。有22%的人只能"偶尔健身",但"没有毅...
阅读全文
posted @
2011-10-27 16:30 SunWentao 阅读(17) |
评论 (0) 编辑
how to compile unsafe code in c#
摘要: how to compile unsafe code in c#turn on unsafe build option in visual studio:1. Open the project's Properties page.2. Click the Build property page.3.Select the Allow Unsafe Code check box.
阅读全文
posted @
2011-10-16 23:25 SunWentao 阅读(16) |
评论 (0) 编辑
usb 编程知识 总结
摘要: USB编程知识 总结最近在做usb camera的工作,在网上找到这篇文章,整理了下。慢慢加入我自己的理解。USB编程知识 一 查找USB设备USB编程的第一个步骤就是寻找你插入的USB设备.为了找到你的USB设备,首先要知道你的USB设备的GUID.一种类型的USB设备的GUID是这个类型唯一的。使用下列的几个函数变可以找到你的USB的设备名字: SetupDiGetClassDevs() SetupDiEnumDeviceInfo() SetupDiGetDeviceRegistryProperty() SetupDiEnumDeviceInterfaces() SetupDiGetDev
阅读全文
posted @
2011-10-10 16:34 SunWentao 阅读(436) |
评论 (1) 编辑
usb 视频设备 按钮消息处理 和普通usb连接的事件处理
摘要: usb 视频设备 按钮消息处理 和普通usb连接的事件处理(c#版,c++/c可仿照修改)最近要做个usb camera的例子,试过了很多方法,一般的usb连接的处理方法:(1) define message variables in form class: publicconstintWM_DEVICECHANGE = 0x219;publicconstintDBT_DEVICEARRIVAL = 0x8000;publicconstintDBT_CONFIGCHANGECANCELED = 0x0019;publicconstintDBT_CONFIGCHANGED = 0x0018;..
阅读全文
posted @
2011-10-08 16:50 SunWentao 阅读(66) |
评论 (0) 编辑
stl中的仿函数functor的应用
摘要: stl中的仿函数functor的应用在stl的泛型算法中,functor应用甚多。template <typename T>struct plus{ T operator ()(const T& x, const T& y) { return x + y; }};template <typename T>struct minus{ T operator ()(const T& x, const T& y) { return x - y; }};void test(){ plus<int> plusObj; minus<i
阅读全文
posted @
2011-10-03 21:36 SunWentao 阅读(26) |
评论 (0) 编辑
atl/wtl中运用的非虚函数多态
摘要: atl/wtl中运用的非虚函数多态template <typename T>class B1{public: void SayHi() { T *pT = static_cast<T*>(this); pT->PrintClassName(); }protected: void PrintClassName() { cout << "B1" << endl; }};class D1 : public B1<D1>{ // no overridden function at all};class D2 : pu
阅读全文
posted @
2011-10-03 14:25 SunWentao 阅读(17) |
评论 (0) 编辑
正确区分++operator 与 operator ++
摘要: 正确区分++operator 与 operator ++一直以来对++operator 和 operator++在函数重载时的用法不理解。在看了c++ primer & effective c++之后,终于明白:T& operator ++(){ cout << "override ++operator" << endl;}T& operator++(int){ T tmp = *this; cout << "override operator++" << endl; (*this)
阅读全文
posted @
2011-10-02 23:39 SunWentao 阅读(23) |
评论 (0) 编辑