I will definitely forget the syntax of jQuery selectors if I do not write jQuery code for some days. So it is better to list them here as a memo. […]

To get the text value of element, you can: use .text() <!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <script src=”jquery.min.js”></script> </head> <body> <div>aa<b>bb</b></div> <div>cc</div> <script> alert($(“div”).text()); </script> </body> </html> This […]

prototype and __proto__

Every object in javascript has a __proto__ property. The value of __proto__ is the prototype property of its construction function, or null if the object is not constructed by a […]

qt gui programming

I seldom play with the bells and whistles of Qt gui elements. All I used to do is adding some buttons on a QDialog derived object and connecting them to […]

You can pass a file system path to the construction function of QFileInfo like: QFileInfo(“C:\\a\\b/c/d/e”); The string passed as the parameter of the constructor is not necessarily a real file […]

QUrl seems a powerful tool that you can use to get every part of a url. But since a url can have complex syntax, I wonder if QUrl can handle […]

In Qt, connecting a signal to a slot is done as follows: connect(sender,signal,receiver,slot); This is a static function of QObject. QObject has also non-static versions of connect so you can […]

I made a mistake to search backwards with the indexOf function of QString: QString str=”hi, myprogrammingnotes.com is a good place to learn programming knowledge.”; int pos=str.indexOf(“good”,-1); I thought the second […]