Make changes to your desktop background slide show in Windows 7

Make sure that all the pictures you want to add are located in the same folder as the current slide show pictures.

  1. Open Desktop Background by clicking the Start button
  2. In the search box, type desktop background, and then click Change desktop background.change-desktop-background
  3. If you don’t see your slide show pictures, click the Picture location list to view other categories, or click Browse to search your computer for the folder where the slide show pictures are located
    change-desktop-background1
  4. Point to each picture that you want to add to the slide show, select its check box, and then click Save changes.

How to make your WordPress Website Secure

You have find many discussion about WordPress is not secure or easy to hack. I will share some of plugin which can make your website more secure.

Google Authenticator

The Google Authenticator plugin for WordPress gives you two-factor authentication using the Google Authenticator app for Android/iPhone/Blackberry.

Download here

Limit Login Attempts

Limit the number of login attempts possible both through normal login as well as using auth cookies.

Download here

BackWPup Free – WordPress Backup Plugin

Schedule complete automatic backups of your WordPress installation. Decide which content will be stored (Dropbox, S3…). This is the free version

Download here

Disclaimer: You have to check plugin details before your installing that its has to be compatible with your website version

How to increase font size based on window width by using jQuery and CSS

HI

Add below CSS

<style type=”text/css”>

body {font-size:62.5%;} /* Set the size of 1em to 10px in all browsers */

body.extraWide {font-size:85%;}
body.wide {font-size:75%;}

body.narrow {font-size:50%;}
body.extraNarrow {font-size:40%;}

</style>

and add jQuery with the support of  a set timeout so it would scale in real time. It doesn’t reverse scale though.

$(document).ready(function() {scaleFont();});

function scaleFont() {

var viewPortWidth = $(window).width();

if (viewPortWidth >= 1900) {$(‘body’).addClass(‘extraWide’).removeClass(‘wide, standard, narrow, extraNarrow’)}
else if (viewPortWidth >= 1400) {$(‘body’).addClass(‘wide’).removeClass(‘extraWide, standard, narrow, extraNarrow’)}
else if (viewPortWidth >= 1000) {$(‘body’).addClass(‘standard’).removeClass(‘extraWide, wide, narrow, extraNarrow’)}
else if (viewPortWidth >= 700) {$(‘body’).addClass(‘narrow’).removeClass(‘extraWide, standard, wide, extraNarrow’)}
else {$(‘body’).addClass(‘extraNarrow’).removeClass(‘extraWide, standard, wide, narrow’)}

setTimeout(scaleFont, 100);

}

or you can use it re sizes only if window is resized (avoiding setTimout), and you give body only the exact class it needs

$(document).ready(function() {

scaleFont();

});
$(window).resize(function() {

scaleFont();

});


function scaleFont() {

var viewPortWidth = $(window).width();

if (viewPortWidth >= 1900) {$(‘body’).attr(‘class’,’extraWide’);}
else if (viewPortWidth >= 1400) {$(‘body’).attr(‘class’,’wide’);}
else if (viewPortWidth >= 1000) {$(‘body’).attr(‘class’,”);}
else if (viewPortWidth >= 700) {$(‘body’).attr(‘class’,’narrow’);}
else {$(‘body’).attr(‘class’,’extraNarrow’);}

}

 

Sources: http://stackoverflow.com/questions/3146395/how-to-increase-font-size-based-on-window-width

How To Change Default Text Selection Colour

Whilst this CSS3 declaration might not be crucial to your project or design and yes it is not supported by all browsers, but it is a fantastic effect that really takes your design one step further.

Currently FireFox, Safari, Chrome and Opera support the text section attribute, and the browsers that don’t support it simply ignore the code so nothing will break, so it doesn’t really matter. Continue reading How To Change Default Text Selection Colour

Android Browser Scaling with target-densityDpi via Viewport TAG

Here is a list of options for “target-densityDpi”.

device-dpi: Use the device’s native dpi as target dpi.
low-dpi: 120dpi
medium-dpi: 160dpi, which is also the default as of today
high-dpi: 240dpi : We take any number between 70 and 400 as a valid target dpi Continue reading Android Browser Scaling with target-densityDpi via Viewport TAG

How do you fix this The AVD manager normally uses the user’s profile directory to store AVD files However it failed to find the default profile directory?

The AVD manager normally uses the user’s profile directory to store AVD files. However it failed to find the default profile directory. To fix this, please set the environment variable ANDROID_SDK_HOME to a valid path such as “”.

(Windows 7 and 8 Only… 64-bit version Tested) Continue reading How do you fix this The AVD manager normally uses the user’s profile directory to store AVD files However it failed to find the default profile directory?

Apache web server: Mapping a URL to a local directory in Ubuntu

We would like to serve the content of a local directory to the Web through the Apache web server. The problem is that the directory isn’t into the Apache document root and we do not want to move it there. :-/

To solve this we will map a URL starting with /desired_URL to files in the /path/to/directory/ directory.

Edit the /etc/apache/sites-enabled/site-configuration-file (this file should be a symbolic link to the corresponding file in /etc/apache/sites-available/).

Add an alias of the local directory to the desired URL, e.g. map the http://www.example.com/desired_URL to the /path/to/directory/ directory.

Alias "/desired_URL/" "/path/to/directory/"

Afterwards add the following instructions for the directory:

        <Directory "/path/to/directory/">
                Options +Indexes +FollowSymLinks
                Order allow,deny
                Allow from all
        </Directory>

This will enable access to the specified directory and its symbolic links, and produce an html page with the file list of the directory. Please ensure that all directories of the /path/to/directory/ has the required execute permissions.

Sources: http://cilab.math.upatras.gr/mikeagn/content/apache-web-server-mapping-url-local-directory

How to set viewport only for iphone or ipad?

One solution…

<!-- in head -->
<meta id="viewport" name='viewport'>
<script>
    (function(doc) {
        var viewport = document.getElementById('viewport');
        if ( navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) {
            doc.getElementById("viewport").setAttribute("content", "initial-scale=0.3");
        } else if ( navigator.userAgent.match(/iPad/i) ) {
            doc.getElementById("viewport").setAttribute("content", "initial-scale=0.7");
        }
    }(document));
</script>

Another way

I found a simple way with jQuery!

Add this to the head tag:

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

<script>if ($(window).width() < 600) { $('meta[name=viewport]').attr('content','initial-scale=0.54, maximum-scale=0.54, user-scalable=no'); }</script>

Thetag sets the default scale and the tag re-writes the viewport if the device screen width is less than 600 pixels (I think all phone devices are under 600px).

Using Meta Tags for iPhone and iPad Orientation

The best way to detect the orientation of the device is by using meta tags. The viewport meta tag is used by Safari on the iPhone and iPad to determine how to display a web page. Properties of the viewport meta tag include width, height, initial-scale, user-scalable, minimum-scale and maximum-scale. Here is a table which shows the minimum and maximum values for those properties:

Property Default Value Minimum Value Maximum Value
width 980 200 10000
height based on aspect ratio 223 10000
inital-scale fit to screen minimum-scale maximum-scale
user-scalable yes no yes
minimum-scale 0.25 > 0 10
maximum-scale 1.6 >0 10

The initial-scale is the one that renders when the page initially loads. The scale is changed by pinching and double tapping on the device. Instead of using a fixed width, you should use the width=device-width which automatically makes the width equal to the width of the device’s screen:

<meta name="viewport" content="width=device-width/" >

To keep users from expanding the window size beyond the size it needs to display properly, you can set the maximum-scale to 1.0. I would use this technique carefully, as it takes away the user’s ability to enlarge the page for viewing on smaller screens such as that of the iPhone. That said, here is how it’s done:

<meta name="viewport" content="width=device-width, maximum-scale=1.0" />

Another way

Using JavaScript for iPhone and iPad Orientation

The meta tags shown above work very well, however, you can also use JavaScript to do the same thing, since both the iPad and iPhone support the scripting language. The following JavaScript function detects and sets the device's viewport orientation by using the innerWidth property of the window object and setting the orient attribute of the body element regularly (in this case every 4 seconds):
<script type="text/javascript">
var updateLayout = function() {
  if (window.innerWidth != currentWidth) {
    currentWidth = window.innerWidth;
    var orient = (currentWidth == 320) ? "profile" : "landscape";
    document.body.setAttribute("orient", orient);
    window.scrollTo(0, 1);
  }
};

iPhone.DomLoad(updateLayout);
setInterval(updateLayout, 400);
</script>
You can place the above snippet in the HEAD of your iPhone/iPad-ready web page, and it will set the display to the appropriate orientation setting.

Using CSS for iPhone and iPad Orientation

Another method that you can use to your advantage is using Cascading Style Sheets (CSS). Obviously, you will need a style sheet that is devoted to portrait use, and another for landscape use. We will cover the creation of such style sheets in a future article, but for now you need to know how you will use them. It's as simple as adding a link to your style sheets within your HEAD tag:
<link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css">
<link rel="stylesheet" media="all and (orientation:landscape)" href="landscape.css">

 

Cell Counting Techniques – Excel

Excel provides many ways to count cells in a range that meet various criteria:

  • The DCOUNT function. The data must be set up in a table, and a separate criterion range is required.
  • The COUNT function. Simply counts the number of cells in a range that contain a number.
  • The COUNTA function. Counts the number of non-empty cells in a range.
  • The COUNTBLANK function. Counts the number of empty cells in a range.
  • The COUNTIF function. Very flexible, but often not quite flexible enough.
  • An array formula. Useful when the other techniques won’t work.

Continue reading Cell Counting Techniques – Excel