Reset password of Windows 7 in Parallels Desktop

Please do as following steps: 1. Start your virtual machine. Then open terminal application(Finder > Applications > Utilities > Terminal) 2. Copy the following command, past it into the Terminal window, and press Return:     The output should look like the following: 3. Copy the following, past it into the Terminal window and add space, and copy the UUID from the output of the previous command (e21f02b-9d52-4ebe-a079-675dc822d723 in the example) and past it at the end of the "prlctl set" command (do not forget that there should be a space between "set" and UUID number), then add space, type the following and add one more space:     Right now you will have something like: 4.  Add username (your Windows user account name), colon,…

Continue Reading

How To Convert Byte[] Array To String in Java

In some cases, we have to convert the String variable into a Byte array format, for example, JCE encryption. However, how do we convert a Byte[] array to a String afterward?Simple toString() function like the following code is not a working property. It will not display the original text but the byte value. In order to convert the Byte array into String format correctly, we have to explicitly create a String object and assign the Byte array to it. And here's a sample code: Output

Continue Reading

How to Whitelist a Sender or Domain in Gmail

Sure, Gmail's spam filter is mighty and good. When you visit the Spam view, all you see is junk. All the mail you want to receive arrives in time. What, though, if you want to be sure — sure that messages from your peers, your friends or your family never end marked as spam by Gmail? That security is in a filter that's simple, effective and set up easily. Whitelist a Sender or Domain in Gmail To make sure Gmail never filters as spam mail from a certain contact or domain: Click the Show search options downward-pointing triangle in your Gmail's main search field. Type the desired email address under From. To whitelist an entire domain (all mail from an address ending in "infinitescript.com", for example),…

Continue Reading

Building Vim from Source

Compiling Vim from the source is actually not that difficult. Here's what you should do: Install all the prerequisite libraries Remove vim if you have it already Compile source code Download source code You can get the source code here: http://www.vim.org/sources.php Set Configuration Install Vim If you don't get gvim working (on ubuntu 12.04 LTS), try changing --enable-gui=gtk2 to --enable-gui=gnome2 These configure and make calls assume a Debian-like distro where Vim's runtime files directory is placed in /usr/share/vim/vim74/, which is not Vim's default. The same thing goes for --prefix=/usr in the configure call. Those values may need to be different with a Linux distro that is not based on Debian. In such a case, try to remove the --prefix variable in the configure call and the VIMRUNTIMEDIR in the make call (in other words, go with the defaults). Besides, if you…

Continue Reading

Install PHP and PHPUnit on Windows/Ubuntu

Download PHP Windows downloads of PHP are available here. If you are not sure of which version to get, check out this Stack Overflow page. I used the VC11 thread-safe PHP 5.5.0 download. Install PHP Once you’ve downloaded the installer, run it and install PHP in C:php (or wherever you like, but remember that the path should not contain spaces). Choose your webserver (or none if you don’t have a webserver installed) and select any additional components as needed, including PEAR. Once PHP is installed open a command prompt. Check that PHP is set up correctly by running It should give you output something like If you don’t get this output something has gone wrong with the PHP install or in the modification of…

Continue Reading

Use SQLite in Qt

Project file (.pro) Add the following line to your .pro file Header Source Execute a query

Continue Reading
Contact Us
  • Tencent Binhai Building, Shenzhen, China
  • root [at] haozhexie [dot] com