online casino

reset root password.

using lilo:
linux single init=/bin/bash rw
passwd

other method:
vim /etc/shadow
root::ID:0:::::

, , , ,

No Comments

Qt 5: how to center a QDialog in a QMainWindow.

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 =).

, , , , ,

No Comments

Qt 5.0.0 Configure Options for Windows

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

Read the rest of this entry »

, , , , ,

No Comments

Reverse engineering HP Officejet Pro 8500

connection

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)

, , , ,

No Comments

Get to an joomla article by URL.

http://wesiteurl.com/index.php?option=com_content&view=article&id=58

,

No Comments

Clear Master Boot Record(MBR).

dd if=/dev/zero of=/dev/sda count=1 bs=512

, , , ,

No Comments

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

, , , , , , ,

No Comments

Qt 4.8.2 Configure Options for Linux

Read the rest of this entry »

, , , , ,

No Comments

Implement XOR Checksum in Qt.

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

, , , ,

2 Comments

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.

, , , ,

No Comments