To check the type of a variable in C++, you can use typeid(variable).name(), for example #include <typeinfo> … … int b=9; char c=’a’; char * p=&c; int *d; printf(“%s\n”,typeid(b).name()); printf(“%s\n”,typeid(c).name()); […]

As an old programmer, when I debug a program, the first option is neither using qDebug()<<“helloworld”, nor using cout<<“helloworld”, not mention QMessageBox::information(this,”hello”,”world”). I’d like to use the old printf function. […]

Look at this simple code: QString s=”abcd”; char * ts=s.toLocal8Bit().data(); QMessageBox::information(NULL,”length”,QString(“s length:%1, ts length:%2”).arg(s.length()).arg(strlen(ts))); What do you think about the length of s and ts? Are they both 4? No, […]

You must know they are all related to unicode but how to use them? UNICODE definition is used in Windows SDK source code. If it is defined, functions like RegSetValueEx […]

How to define a Javascript object? The key of an object can be an identifier/symbol(an identifier is a continuous alphabeta/number/_ that does not begin with a number), a number, or […]

Network request initiators

When you type a url such as myprogrammingnotes.com in Firefox’s address bar and type the enter key, the browser will send many http requests to the network. These requests are […]