Saturday, March 12, 2011

"Fatal error: Call to undefined function" after automatic upgrade in Wordpress

"Fatal error: Call to undefined function" is always a sign of an incomplete upgrade, where not all the files got upgraded.

Thursday, March 10, 2011

Live USB of different Linux distributions in Windows, HOWTO

Universal USB Installer, is a very easy tool to do this. Manual :

  1. Insert a USB stick with at least 2GB of free space
  2. (Optional) You can download the iso file of the Linux distro that you want to have it on your USB / The download can be done through the Universal USB Installer later as well.
  3. Download the Universal USB Installer (Both Download link & user manual)
  4. Select the desired Linux distro from the dropdown list
  5. Click 'Browse' and open the downloaded ISO file/ OR simly download it by clicking on the "Download iso(optional)"
  6. Choose the USB drive and click 'Create'

    Thursday, March 03, 2011

    Android & WiFi information, Wifimanager + Wifiinfo

    For having access to the WiFi connection, you can use the WifiManager and WifiInfo classes in Android SDK. The following code can show you how you can do get access to things like your IP address, the connected network name or the available networks around you :

            WifiManager myWifiMananger = (WifiManager) getSystemService(WIFI_SERVICE);
    
            WifiInfo myNetInfo = myWifiMananger.getConnectionInfo();
    
            showIp.append(changeIp(myNetInfo.getIpAddress()) + " \n");
    
            showIp.append(myNetInfo.getSSID() + " ");
    
            List<ScanResult> scanList = myWifiMananger.getScanResults();
    
            for(ScanResult element : scanList){
    
             showIp.append(element.SSID + " Level: " + element.level + " freq : " + element.frequency + " Cap: " + element.capabilities + "\n");
    
            }
    //DONT forget that the getIpAddress returns an int value. Convert it to string :
    public String changeIp(int ipAddress){
    
         return String.format("%d.%d.%d.%d",
    
           (ipAddress & 0xff),
    
           (ipAddress >> 8 & 0xff),
    
           (ipAddress >> 16 & 0xff),
    
           (ipAddress >> 24 & 0xff));
    
        }
    
    
    

    *** VERY IMPORTANT : To use this you need to add couple of lines to android manifest(XML file -> AndroidManifest.xml).

    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    
      <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />