编程笔记

lifelong learning & practice makes perfect

  • Errror description

MFC dll中的界面在Debug时调用UpdateData()函数,会判断窗口的运行环境是否跨线程,如果创建窗口的线程与调用该函数的线程不是同一个,就会触发CWnd的AssertVaild()函数中断.提示:

it is likely that you have passed a C++ object from one thread to another and have used that object in a way that was not intended.把一个C++对象从一个线程传到另一个线程,使用对象的方式不正确(与代码的原本设计相悖)

阅读全文 »

What is it

图像风格迁移,可以生成特定风格的图像,例如由下面的图像Content生成图像Genrated Image G。

StyleTransfer

阅读全文 »

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//修不完的bug
class CBase
{
public:
virtual bool Func(unsigned int num,double dNum,vector<bool>& status){return false;};
protected:

private:

}
class CDerive
{
public:
bool Func(unsigned int num,double dNum){return true;};
protected:

private:

}
int main(){
CBase *pBase=new CDerive();
std::cout<<pBase->Func()<<std::endl;
}
阅读全文 »

一、用户对象、句柄

User interface objects support only one handle per object. Processes cannot inherit or duplicate handles to user objects. Processes in one session cannot reference a user handle in another session.

There is a theoretical limit of 65,536 user handles per session. However, the maximum number of user handles that can be opened per session is usually lower, since it is affected by available memory. There is also a default per-process limit of user handles. To change this limit, set the following registry value:

1
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\USERProcessHandleQuota
阅读全文 »

references

wsl 2 ,ulimit -n 65535 设置报错=>

ulimit: Permission denied when changing resource of type ‘Maximum number of open file descriptors’

修改 /etc/security/limits.conf 的配置,再su username切换到当前用户就会生效

1
2
3
4
5
#soft for enforcing the soft limits
#hard for enforcing hard limits
#<domain> <type> <item> <value>
* soft nofile 50000
* hard nofile 55555

  • Momentum:

    Momentum takes past gradients into account to smooth out the steps of gradient descent. It can be applied with batch gradient descent, mini-batch gradient descent or stochastic gradient descent.

    You have to tune a momentum hyperparameter β and a learning rate α.

    阅读全文 »

  • non-stationary:非平稳过程

  • univariate time series

  • multivariate time series

    阅读全文 »