How To Quickly Earth Your Desktop PC And Avoid Electric Shocks

Everyone has gone through the moment when they touched their (or someone else’s) desktop computer and got shocked, literally. We’ll welcome to homes-with-poor-earthing. As you may already know the current that you get from touching computer’s body is due to lack of proper earthing. Every component uses it’s outer body as an internal earthing. When you don’t have your home properly earthed all the charge flows through you instead of the earth pin. The solution to this problem is rather simple and quick. Let’s see how.

Step 1. Hammer a nail into the wall near your PC. Nail it somewhere so it does not easily come into contact to you or other people in the house as touching the nail will cause you electric shock. Right behind the table or on a corner are good positions.

Step 2. Take a one meter long insulated copper wire. You can scavenge this from old electric equipments or get a new one for a few bucks. Strip and tie one end of the wire on the nail that you hammered. Use electric tape to secure the wire over the nail.

nail

Step 3. Loosen one of the screw behind the PC cabinet and tie the other end of the copper wire onto the screw. Fasten the screw again to secure the wire in place.

screw

That’s it, try touching our PC now, you won’t get any shock.

wire

This technique earths he desktop by discharging all voltage developed on the body to ground. This won’t work on wooden walls as they are insulators.

Advertisements

Android : Sync Facebook Contact Profile Pictures with Phone Contacts

If you are like me, you’re probably already bored with the dull placeholder image in you Android contacts. You have to face it every time you either call someone or receive a call from someone. Well, like everything this has a solution too. Many apps are available for the purpose but the one that does the job finest is the wonderful app called Sync.ME.

Sync.ME connects to your Facebook profile and syncs profile pictures of all your Facebook contacts with the contacts on your phone. Let’s see how we can do that.

Step 1. Install Sync.ME from Play store. You can get it from here –

https://play.google.com/store/apps/details?id=com.syncme.syncmeapp

Screenshot_2015-01-24-03-58-44

 

Step 2. Tap on “Facebook” and log into it. It will then ask you to grant access to Sync.ME. Tap “Allow” and continue.

                       Screenshot_2015-01-24-03-58-54           Screenshot_2015-01-24-03-59-59

 

Step 3. After successfully logging in it will search for all matches. This may take about a minute or two depending on your Internet speed.

Screenshot_2015-01-24-04-00-28

 

Step 4. After matching it will ask you to review the matches. You can quickly scroll through the list and remove any mismatched image, although it rarely happens). Click ‘Next’ to continue.

                       Screenshot_2015-01-24-04-00-57           Screenshot_2015-01-24-04-02-16

 

Step 5. Now it will ask you to conform some matches that it isn’t sure about. This is a nice feature as it’s confirming from you instead of simply applying what it thinks is good. Click on the question mark next the contact name and choose the matching profile for that name or none if no match is correct.

Screenshot_2015-01-24-04-07-46

 

Step 6. It will now sync all matched profile pictures and apply them to phone contacts.

Screenshot_2015-01-24-04-37-27

 

The best part about this app (apart from it’s simplicity and elegant UI) is it will regularly check for updated pictures and sync them automatically. It will even remind your friend’s birthdays with a notification on your phone.

Android Lollipop New Features Tour

So everyone knows about the Android’s latest flavor – Lollipop, being launched. While only a handful of devices have actually received the update, it’s already being prepared with fast pace for other devices too. The update is considered as the most significant update to the Android operating system ever. So let’s check out the new features in Android Lollipop.

1. Material Design – this is by far the most noticeable change to the  operating system. Material design incorporates simple, colorful yet elegant looking UI elements that take your phone’s looks one level up. Most of the existing apps have already been updated to use this new design and the rest are on their way.

                                      Screenshot_2015-01-23-03-09-05               Screenshot_2015-01-23-03-08-58

2. New Quick Settings – The quick settings panel is completely changed. It not includes all commonly accessed settings. A single touch enables or disables features. It now also includes quick buttons for torch and casting screen. A new accessibility shortcut for ‘invert colors‘ is also available.

Screenshot_2015-01-21-10-26-15

3. Notifications – Android Lollipop has completely revamped the notification system bringing cool looks with better usability. You can also view and interact with notifications straight from the lock screen. Want even more control? You can control each app’s notification individually and decide to block it or make it  a  priority and display on top. You can also set only priority notifications to bother you.

                                      Screenshot_2015-01-23-04-26-48              Screenshot_2015-01-23-04-28-10

4. New Runtime – Android Lollipop introduces Android Runtime or ART as the default runtime. It’s a completely new runtime allowing apps to run 2-4 times faster than they did on Kitkat under Dalvik. It also brings support for 64 bit processors such as those found on the Nexus 9. ART also promises lesser memory consumption from background apps by compressing them.

5. Better Battery Life – with more efficient runtime the battery life definitely does extend. You can also view the time to full charge while charging in lock screen. The improved battery saver feature promises up to 90 min. of saved battery time when enabled.

Screenshot_2015-01-23-04-28-57

6. New Camera API – One of the very important feature of Lollipop is the new camera API. The new API allows apps to directly access the camera sensor. It also brings support for RAM images in DNG format. This will definitely lead to some great 3rd party camera apps with full manual controls.

7. Always On ‘OK Google’ – you can now say ‘OK Google‘ from anywhere without even touching the phone. You can even call this while your device is locked, but this feature is limited to devices with digital signal processing support as the new Nexus 6 and Nexus 9.

Screenshot_2015-01-23-04-30-07

8. User Accounts – Just like on PCs you can now also create multiple user accounts on your Android phone with Android Lollipop. You can also create guest account for temporarily lending your device to someone without the risk of them gaining access to your data.

Screenshot_2015-01-23-04-31-39

9. Screen Pining – With screen pinning you can lock the display to a single app. The home, back and overview buttons won’t let you out of the app. This is really useful when letting children or someone you don;t trust use your phone.

10. Security – Lollipop has many new features to enforce stronger security. Beginning with phone encryption, you can now encrypt your whole phone. This includes each and every data present on it. This feature will be useful for businessmen and other people who carry sensitive data on their phones. Then comes the feature that allows your wearable device to unlock he phone. If your phone get’s stolen the thieves won’t be able to unlock the device (unless he also stole the paired wearable device).

11. New Adaptive Brightness – Unlike Kitkat, Lollipop has a better way to manage adaptive brightness. You first set a base brightness level before turning adaptive brightness on. It then adjusts the screen brightness relative to that base brightness. This is useful for people for whole low brightness was just too low.

12. New Lock Screen – the new lock screen allows direct access to camera and dialer along with showing all (or enabled) notifications.

                                      Screenshot_2015-01-23-04-35-03              Screenshot_2015-01-23-04-28-10

13. New Overview – Unlike Kitkat’s simple 2D list, Lollipop has a completely new super cool looking card flow layout for recent apps. You can elegantly swipe the cards up and down for scrolling or left and right for closing them.

Screenshot_2015-01-23-04-34-24

14. New Contacts App – While Kitkat had separate phone and contacts app, both have been merged into a single, much better app in Lollipop. The new dialer looks cool and colorful. You can access speed dials, recent calls and all contacts by swiping left and right. The call screen has also been completely changed and looks much better now.

                                      Untitled              Untitled

15. New Easter Egg – Lollipop contains a whole Flappy Birds clone game as an easter egg. To access sit go to Settings > About Phone and tap quickly on Android Version. Then hold on the lollipop image that appears.

Screenshot_2015-01-23-04-22-49

How to Upgrade Indian Moto G 2014 to Android Lollipop

slide02-2200

Android’s latest flavor of the highly popular mobile operating system Android is out and it’s called ‘Lollipop’, following the alphabetic sequence of names. Second Generation Moto X and Moto G were among the first phones to receive this latest version of Android. Unfortunately, the update is not launched for all users. It’s under what is known as SOAK test (much like closes beta testing). from the day when Lollipop was launched several bugs have been removed and the update is not almost fit for general public release. If you have an Indian Moto G 2014 (XT1068) and don’t want to wait for the OTA update to arrive you can grab the update and install it yourself. Let’s take a look how.

The method is different for different system versions so check yours. You can check your phone’s system version by going into Settings > About Phone. you’ll find the system version mentioned at the end.

For system version 21.11.23:

 

IMG_20150121_095415892

 

Step 1. Download the Android Lollipop 5.0.2 OTA update form wither of these links –
https://mega.co.nz/#!31MxzbgB!qRfXchh9FfOOliKnenY2uRyDGyCW5URCpKG78jxsbIw
https://mega.co.nz/#!DNsiCahK!gIIsAX4HA8K8NKdEl_0N6xINzyRSvmm8OHCwmquTpgg

Check this page for updated links if neither link works –

http://forum.xda-developers.com/moto-g-2014/general/official-lollipop-indian-ota-captured-t3002674

Step 2. After downloading the file place it in your memory card (or internal memory if you don’t have one).

Step 3. Go to Settings > About Phone > System Updates. An update should pop up. Choose “I’m in.” to begin with the process of updating.

 

IMG_20150121_095955996                                      

 

Step 4. You’ll get a message saying “Install system update” in a few seconds. Choose “Install now“. Now the phone will power off and the update will be installed. You’ll see a screen saying “Installing system update”. It will take about 5 minutes to install this update.

                 IMG_20150121_100121684     IMG_20150121_100016612

IMG_20150121_100346962_HDR

 

Step 5. Your phone will now restart. You’ll see a message saying “Android is upgrading… Optimizing apps“. In this step Android is optimizing all apps for the new Android Run-time (ART) environment. You’ll also notice the new color and animation. This process may take 5-10 min. depending in the number of you had installed on your phone.

 

IMG_20150121_101513364_HDR

 

Step 6. That’s it, now your phone is ready for use with the latest Lollipop 5.0.2 OS installed. You’ll now see the new system version as 22.11.28.

Screenshot_2015-01-19-03-56-14

Once you have updated your phone, visit this post for all the new features in Lollipop – Android Lollipop New Features Tour

 

For system version 22.11.14 –

Users of this version first need to upgrade to system version 22.11.23 and then follow the steps mentioned above to install Lollipop 5.0.2.

Step 1. Download the 21.11.23 OTA update zip file from here –

https://drive.google.com/file/d/0B3rTyJJIiCCZZTJIZkNwZ0dGX0U/edit?pli=1

Place the downloaded file in internal memory.

Step 2. Turn off the phone. Now hold the volume down and power keys together. Keep the volume down key pressed and release the power key followed by volume key. Use volume down key for navigation and volume up key for selecting an option. Select Recovery > Update from sdcard and select the zip file placed in the internal memory. Press power button with the zip file selected to begin with the updating process.

Step 3. Once the update 22.11.23 is installed follow the steps mentioned above to install Lollipop 5.0.2.

 

Source – XDA

PHP – How To Download Multiple Files Together As A ZIP File

Consider a situation where you have a bunch of files on your server and you want to send all of them to a user. Of course you could have the user download one file at a time but this is not a very good solution for obvious reasons (large number of files, for starters). This is a very common situation faced by many PHP programmers. A very convenient solution is to create a zip file including all the files to be sent and transfer the zip file. This provides a great convenience to the user who now doesn’t have to download each file separately.

But how do you do it in PHP? It’s actually very simple. Let’s see how.

Here is the complete code for doing it –


<?php
       $files;
   
       if ($handle = opendir('./uploads')) {
           while (false !== ($entry = readdir($handle))) {
               if ($entry != &quot;.&quot; &amp;&amp; $entry != &quot;..&quot;) {
                   $files[] = './uploads/' . $entry;
               }
           }
           closedir($handle);
       }

       # create new zip object
       $zip = new ZipArchive();
   
       # create a temp file &amp; open it
       $tmp_file = tempnam('.','');
       $zip->open($tmp_file, ZipArchive::CREATE);

       # loop through each file
       foreach($files as $file){
           # download file
           $download_file = file_get_contents($file);

           #add it to the zip
           $zip->addFromString(basename($file),$download_file);
       }

       # close zip
       $zip->close();

       # send the file to the browser as a download
       header('Content-disposition: attachment; filename=Papers.zip');
      header('Content-type: application/zip');
      readfile($tmp_file);
?>

Now let’s see how it works. Please note that this code works only in PHP version 5.2.0 and above.

This code traverses the directory “./uploads” and adds all files to the $files array. If you want to apply more filtering on the files that should be selected then you can do that in the while loop. The check for “.” and “..” are needed to prevent infinite recursion in directory traversal.

if ($handle = opendir('./uploads')) {
        while (false !== ($entry = readdir($handle))) {
            if ($entry != &quot;.&quot; &amp;amp;&amp;amp; $entry != &quot;..&quot;) {
                $files[] = './uploads/' . $entry;
            }
        }
        closedir($handle);
    }

This creates a new ZipArchive object, crates a temporary file and opens that file through the ZipArchive class. You can read more about this class here at the official PHP manual.

# create new zip object
    $zip = new ZipArchive();
# create a temp file &amp;amp; open it
    $tmp_file = tempnam('.','');
    $zip->open($tmp_file, ZipArchive::CREATE);

Next we each file we filtered previously and add them to the zip archive file. The file_get_contents($file) function reads the complete specified file into a string. addFromString adds the content of file provided into a string to the zip file.

# loop through each file
    foreach($files as $file){
        # download file
        $download_file = file_get_contents($file);
        #add it to the zip
        $zip->addFromString(basename($file),$download_file);
    }

Now that the zip file is prepared, we close it and present it to the browser. header is used to send raw HTTP headers as per the HTTP standard. the Content-disposition tells the browser that the sent data is a file and that the browser must use a download dialog for saving the file. you can control the file name of zip file through the filename header as used below.

# close zip
$zip->close();
# send the file to the browser as a download
header('Content-disposition: attachment; filename=Papers.zip');
header('Content-type: application/zip');
readfile($tmp_file);

That’s it on the PHP side. You can use an AJAX request to make the download happen without reloading the current page. A simple way is to use jQuery to send the AJAX request similar to this –

<script>
    function downloadPapers(){
        $.ajax({
            type: &quot;POST&quot;,
            url: &quot;download_papers.php&quot;,
            data: &quot;&quot;,
            success: function(msg) {   }
        });
    }
</script>

You can read more about AJAX in jQuery here at the official documentation. This PHP code combined with an AJAX request is a very elegant way of downloading multiples together as a single zip file.

How To Make Windows Darker To Avoid Eye Strain

I’m at a stage in life where I have to spend more than 8 hours working on my PC every day. As a result, my eyes get dry, inflamed and temporarily weak. To biggest thing that causes this is; obviously; the monitor, or more preciously the bright objects on the monitors. Most UI elements like web pages, Windows Explorer, the wallpaper, taskbar etc are all very bright by default. This causes a lot of stress for the eyes that have to stare at the them endlessly.

To relieve from this pain we can make these bright objects darker. Here are some ways of doing so.

1. Use a custom, dark theme for Windows – There are various 3rd party themes available for Windows that aim at making the default interface darker. You can find such themes on sites such as deviantart.com and winaero.com along with several other themes. However, to use 3rd party themes on Windows 7, 8 or 8.1 you need to first install a software named UltraUXThemePatcher that enables 3rd party themes (they are disabled by default). Do read the FAQ carefully and remember to switch to the default Windows theme before restarting the system for installing Windows updates or uninstalling the software.

After installing it, download the theme you like and install it while following it’s instructions (each theme has slightly different instructions). Some excellent dark themes for Windows 8.1 are Abisso2014, Dark8, Steam VS and my favorite Gnomnit Dark.

1

2. Use a dark theme for browser – Firefox, Chrome, Opera and Internet Explorer are the major browsers used today with all but IE natively supporting for 3rd party themes. Many dark themes are available for the these browsers. These affect the new tab page, toolbars, menus, tab headers and other UI components of the browser. You can browse Chrome Web Store, Firefox Add-Ons and Opera Themes to find such themes for your browser. I use Mozilla Firefox and my favorite dark theme is FT DeepDark by steva.

3

2

3. Making web pages darker – If you favorite website has a really bright or an all-white interface then you can make it dark too. There are thousands of custom styles available at userstyles.org for all popular websites. To use these custom styles you will need to install a browser plugin. Firefox users can use the popular Greasmonkey plugin while Chrome users can use Tampermonkey; a derivative of Greasmonkey for Chrome. Opera users can follow this guide on installing userscripts. These styles are basically JavaScript codes that alter the appearance of specific web pages. Simply search your favorite website on userstyles.org, choose a style you like and install it. Next time you load that website the installed theme will be applied.

4

4. Use dark wallpaper – okay, this isn’t really a trick but many users avoid it. Use a dark wallpaper to complement your dark theme. thepaperwall.com has a huge collection of high quality wallpaper to suite your style.