大约有 16,000 项符合查询结果(耗时:0.0198秒) [XML]
C#定点任务代码 类似Windows计划任务(健壮性高) - 更多技术 - 清泛网 - ...
...od();
// 更新下次执行间隔
SetNextOnceDoInterval();
if (DateTime.Now.ToString("HH:mm").CompareTo(onceDoStr.Trim()) >= 0)
{
// 可能由于系统原因导致触发过早的,不执行
onceDoMain();
...
调用空智能指针对象的函数,Windows及Linux行为解析 - C/C++ - 清泛网 - 专...
...c std::enable_shared_from_this<RawValue> {
public:
bool IsNull() {
printf("this:%x\n", this);
return this == nullptr;
}
int val_{0};
};
using NValue = std::shared_ptr<RawValue>;
int main() {
NValue null;
assert(null == nullptr);
assert(!null);
assert(null.get() == nullptr);...
vc/mfc *通配符 批量删除文件 - c++1y / stl - 清泛IT社区,为创新赋能!
...eration函数:
#include "stdafx.h"
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
LPTSTR delFileName = L"c:/test/test*.txt";
SHFILEOPSTRUCT FileOp;
...
mfc 如何隐藏滚动条 - C++ UI - 清泛IT社区,为创新赋能!
void Cxxx::OnSize(UINT nType, int cx, int cy)
{
...
ShowScrollBar(SB_BOTH, FALSE);
...
}
简单粗暴,最实用,亲测有效。
VC/Linux C++ 递归访问目录下所有文件 - c++1y / stl - 清泛IT社区,为创新赋能!
...ile->d_name);
}
}
}
int main(int argc, char* argv[])
{
if (argc < 2)
{
cerr << "Need Directory" << endl;
exit(1);
&n...
关于C/C++的强类型、弱类型的总结 - C/C++ - 清泛IT论坛,有思想、有深度
int a = 1; (强类型)
int a; (弱类型)
两个强类型是否能编译通过?
待研究。。。
浮点数在内存中的表示 - C/C++ - 清泛网 - 专注IT技能提升
...子:
#include "stdafx.h"
#include <string.h>
#include <limits>
int _tmain(int argc, _TCHAR* argv[])
{
float f1 = FLT_MIN;
printf("%f\n", f1);
f1 = FLT_MAX;
printf("%f\n", f1);
// 0 10000101 11110110000000000000000
void * p = (void *)0x42fb0000;
memcpy(&f1, &p, 4);
printf...
ATL CComPtr和CComQIPtr详解 - C/C++ - 清泛网 - 专注IT技能提升
...值给CComQIPtr的时候,CComQIPtr会自动的调用接口指针的QueryInterface接口,来获得对应的正确的接口指针。CComPtr和CComQIPtr是智能接口指针类,它们在销毁的时候,不需要手动去释放接口指针,在赋值的时候,也不需要手动的AddRef,在...
char类型移动跨平台踩过的坑 - C/C++ - 清泛网 - 专注IT技能提升
char类型移动跨平台踩过的坑CFLAG-fsigned-charchar强转int时,发现在x86平台下是按照有符号处理的,但是在ARM32下被当成了无符号导致问题,ARM64正常有符号。经调查,在PC上,char类型默认为signed-char,但是在一些嵌入式设备
char强转...
C++简练易用的线程池(threadpool)及上下文隔离的无锁线程池(isolated_threa...
...,可以指定线程执行,否则自动分配
void commit(Task task, int thread_id = -1) {
if (thread_id > (int)threads_.size() - 1) {
cout << "Invalid thread id:" << thread_id << endl;
return;
}
if (thread_id == -1)
thread_id = AllocateThread();
threads_[thread_id]->Sch...