Thursday, March 15, 2012

Disable Automatic Driver Installation In Windows 7 / Vista

  • Go to Start–>Search type in gpedit.msc
  • Computer Configuration->Administrative Templates->System->Device Installation. Click on the subfolder Device Installation on the left and on the right side you will see the possible restrictions.
  • Right Click on Prevent Installation of Devices not described by other policy settings and edit this option, set it on ENABLED.
    Reboot Windows.

  • open gpedit.msc again and revert the change so you will be able to install your driver.

Monday, October 31, 2011

Fix IE 5.5 and IE 6 PNG transparency problem

 This code not written by me. Thanks for unknown author.

<!--[if lt IE 7]>
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters))
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }   
}
window.attachEvent("onload", correctPNG);
</script>
<![endif]-->

Upgrading Ubuntu Using the Alternate CD/DVD (Offline Upgrade)

Download the alternate installation CD from http://releases.ubuntu.com/oneiric/
Burn the ISO to a CD and insert it into the CD-ROM drive.
If the ISO file is on the computer to be upgraded, you could avoid wasting a CD by mounting the ISO as a drive with a command like:

sudo mkdir -p /media/cdrom
sudo mount -o loop ~/Desktop/ubuntu-11.10-alternate-i386.iso /media/cdrom

A dialog will be displayed offering upgrade using that CD then follow the on-screen instructions.

If the upgrade dialog is not displayed, run the following command using Alt+F2:

gksu "sh /media/cdrom/cdromupgrade"

Or in Kubuntu

kdesudo "sh /media/cdrom/cdromupgrade"

Saturday, October 22, 2011

Jar file is over max size - Solved

The reason for this error is because the default value for a jar file in some phones are 400 or 500 KB. So when installation file is more than above size limit, you cann't install it.

To solve this:

  1. In your keypad, type this code: *#52828378#
  2. You will get the JAVA Test Menu after typing the above code, select the OTA Test menu and open it.
  3. Then you will see the value 400/500 in Maximum JAR size field, change the value to a number higher than 400/500, i.e. 2048.
  4. Save  and try to install jar files.

Monday, October 17, 2011

Install and Uninstall IPv6 in Windows

To install and uninstall IPv6:

Click Start > Run > cmd

At the command prompt, type "netsh int ipv6 install" and press the Enter.

Close the Command Prompt window.

To uninstall IPv6:

Click Start > Run > cmd

At the command prompt, type  "netsh int ipv6 uninstall" and press the Enter key on your keyboard.

Close the Command Prompt window and restart the computer.

or
  
Open Network Connections

Right-click local area connection, and then click Properties.

Click Microsoft TCP/IP version 6 , and then click Uninstall, click Yes.

Click Close to save changes to your network connection.

Sunday, October 16, 2011

Table row hover effect - CSS

CSS

table tbody tr:hover {
    background-color: #ffccbb;
    color: white;
}


Saturday, October 15, 2011

Get current file name - PHP

$currentPath = $_SERVER['PHP_SELF'];
$parts = explode('/', $currentPath);
$pagename = $parts[count($parts) - 1];