Enable or Disable Windows 7 Hibernate

Standard

To make hibernation unavailable, follow these steps:

  1. Click Start, and then type cmd in the Start Search box.
  2. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. When you are prompted by User Account Control, click Continue.
  4. At the command prompt, type powercfg.exe /hibernate off, and then press Enter.
  5. Type exit, and then press Enter to close the Command Prompt window.

To make hibernation available, follow these steps:

  1. Click Start, and then type cmd in the Start Search box.
  2. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. When you are prompted by User Account Control, click Continue.
  4. At the command prompt, type powercfg.exe /hibernate on, and then press Enter.
  5. Type exit, and then press Enter to close the Command Prompt window.

Install PHPUnit in Xampp

Standard

First off I’m assuming xampp is installed to C:\xampp
1. Open a command prompt and go to C:\xampp\php
2. Type “pear update-channels” (updates channel definitions)
3. Type “pear upgrade” (upgrades all existing packages and pear)
4. Type “pear channel-discover components.ez.no” (this is needed for PHPUnit)
5. Type “pear channel-discover pear.symfony-project.com” (also needed by PHPUnit)
6. Type “pear channel-discover pear.phpunit.de” (This IS phpunit)
7. Type “pear install –alldeps phpunit/PHPUnit” (installs PHPUnit and all dependencies)

Special Query 1

Standard
SELECT t1.shade_sku SKU, t3.catalogue_title Product, t1.shade_name Shade, SUM( t1.order_quantity ) Quantity, SUM( t1.order_quantity * ( `item_promo_id` 
OR trans_promo_id ) <>0 ) Promo
FROM p_shop_order t1, p_shop_transaction t2, p_shop_catalogue_data t3
WHERE `order_product_id` = t3.catalogue_id AND t3.catalogue_lang = 'eng'
AND t1.`order_transaction` = t2.trans_id
AND t2.trans_status
IN (
'3', '4', '5', '6'
)
AND t2.trans_date_buy
BETWEEN '2013-03-01 00:00:00'
AND '2013-04-01 00:00:00'
GROUP BY t1.shade_sku
ORDER BY Quantity DESC 
LIMIT 20