Here is a code snippet writing data to a file: QFile outfile(“file.txt”); if (! { exit(); } QTextStream out(&outfile); out.setCodec(“UTF-8″); for(int i=0;i<100000;i++) { out<<“somedata”; } outfile.close(); If you press the […]

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 […]