reset root password.
using lilo:
linux single init=/bin/bash rw
passwd
other method:
vim /etc/shadow
root:
Qt 5: how to center a QDialog in a QMainWindow.
Posted by admin in Nokia's Qt, Programming on January 30, 2013
I had a hard time centering a QDialog in a QMainWindow. After many hours of research I came with this:
void frmviewdoc::showEvent(QShowEvent *event)
{
scrLoading = new frmLoading(this);
QDesktopWidget *desktopWidget = QApplication::desktop();
QRect screenRect = desktopWidget->availableGeometry(this);
scrLoading->setGeometry(screenRect.center().x() - scrLoading->geometry().center().x() , screenRect.center().y() - scrLoading->geometry().center().y(), scrLoading->width(), scrLoading->height());
scrLoading->show();
}
I still would like to know how to get the coordinates for my topLeft in my QMainWindow from within the showEvent, I think it will make things easier. If you know how, please let me know in the comments =).
Qt 5.0.0 Configure Options for Windows
Posted by admin in Nokia's Qt, Programming on January 21, 2013
configure -debug-and-release -opensource -opengl desktop -no-angle -no-vcproj -no-incredibuild-xge -no-cetest
Important Documentation:
Change Log
Main Document Page
Using qt.conf
QMake Variable Reference
Reverse engineering HP Officejet Pro 8500
Posted by admin in Electronics on September 11, 2012
Printer power on. (no ink cartridges):
FIRST DATA BURST: 0×60 0×60 0×60 0×66 0×66 0×66 0×62 0×62 0×62 0×64 0×64 0×64 0×60 0×60 0×60 0×66 0×66 0×66 0×62 0×62 0×62 0×64 0×64 0×64
(24 Hex values)
SECOND DATA BURST: 0×60 0×60 0×60 0×66 0×66 0×66 0×62 0×62 0×62 0×64 0×64 0×64
(12 Hex values)
Get to an joomla article by URL.
Posted by ferdna in Uncategorized on August 18, 2012
http://wesiteurl.com/index.php?option=com_content&view=article&id=58
Clear Master Boot Record(MBR).
dd if=/dev/zero of=/dev/sda count=1 bs=512
Slackware Emergency Repair.
cd /mnt mkdir /mnt/tmpslack mount /dev/sda2 /mnt/tmpslack mkdir -p dev proc sys mount --bind /dev dev mount --bind /proc proc mount --bind /sys sys chroot . vi /etc/lilo.conf /sbin/lilo -C /etc/lilo.conf
Related Error Messages:
Kernel panic – not syncing: VFS: Unable to mount fs on uknown-block(8,2)
No boot signature on partition
Qt 4.8.2 Configure Options for Linux
Posted by admin in Uncategorized on July 1, 2012
Implement XOR Checksum in Qt.
Posted by admin in Nokia's Qt, Programming on June 7, 2012
I got the code from this php forum (phpfreaks,digitalpoint). I just re-implemented in Qt. Thank you rajoo.sharma for sharing with us.
void MainWindow::xorchecksum(QString HEXStr)
{
QByteArray HEXData = QByteArray::fromHex(HEXStr.toAscii());
qDebug() << "";
qDebug() << "HEX String: " << HEXData.toHex().toUpper() << " Byte Count: " << HEXData.length();
unsigned char charA = NULL;
unsigned char charB = NULL;
unsigned char charC = NULL;
charA = HEXData[0];
for (int i = 1; i < HEXData.length()-1; i++)
{
charC = charA ^ HEXData[i+1];
charA = charC;
}
qDebug() << "CheckSum: " << charC;
}
call it as:
xorchecksum(“A00000042000AF”);
Result: DEC: 43 HEX: 2B
xorchecksum(“0191050902040843d1″);
Result: DEC: 145 HEX: 91
How to download a directory recursively using wget.
wget -r –no-parent http://urltodownload.com/folder
i use this command to get my multilib stuff from alienbobs web site.
