Shern Shiou

and whatever in between
Oct 13

QString to Char*

Thanks to http://developer.qt.nokia.com/faq/answer/how_can_i_convert_a_qstring_to_char_and_vice_versa

Below help us to get Char* out from QString

QString qString1 = "hello";
QByteArray byteArray = qString1.toUtf8();
const char* cString = byteArray.constData();

QString qString2 = QString::fromUtf8(cString);
Jun 23

Installing Boost

if you wanna install Boost in Ubuntu, just type:
sudo apt-get install libboost-dev libboost-doc
Jun 21

Check duplicate in MySQL

Simple snippet to check duplicate entry:
select `po_number`, count(`po_number`) as cnt
from `purchases`
group by `po_number`
having cnt > 1
order by cnt;

About Shern Shiou Tan

Loves research, strong believers in education and innovation.
TwitterFacebook

Search Blog

Get Updates

Tags

Archive

2012 (21)
2011 (45)