Thursday, 31 July 2014

How to solve Ping Request Time Out Problem?



·  Reasons: By default ICMP echo requests, used for ping command is blocked in Windows 7 firewall default settings.

Solutions:
1) Disable the firewall completely in windows 7, which is not recommended.
2) Create an exceptional rule for ICMP echo request to reply ping commands in existing firewall, without disabling it completely.

ICMP Rule in Windows 7 Firewall
Follow the steps steps to create a rule.
  1. Go to Windows Firewall in Control panel. You can see, Windows Firewall status is On. Click on Advanced settings in left side as mentioned above.
  2. Select Inbound Rule, Right clink on it and select New Rule…
  3. Select Custom (Custom Rule) at last and press Next.
  4. Leave All programs and go to Next.
  5. Click on Protocol type and select ICMP4 as shown below. ICMP4 is the protocol used in ping command when your network is communicating with IPv4.
  6. Since yr going to apply this rule for any IP, means responds to any IP addresses coming with echo request, select ‘Any IP addresses’ in next screen. You can add specific IP addresses also, if you want your windows 7 computer to respond to them only for ICMP echo request (ping)
  7. Allow the connection in next screen, press Next.
  8. Keep the all three check boxes checked in the next screen, to apply this rule any type of network you connected.
  9. Give a name to this rule. This name will be showing under Inbound Rules in Windows Firewall. In future you can delete the rule by this name. 
  10. Click Finish.That’s it.

Thursday, 3 April 2014

Image Slider using Javascript without using jQuery.

abcd.html

<html>
<head>
<title> Auto Change Background Color </title>
<style type="text/css">
div
{
height:320px;
width:100%;
}
</style>
<script type = "text/javascript">
var image = new Array ('pic-1.jpg', 'pic-2.jpg', 'pic-3.jpg', 'pic-10.jpg','pic-11.jpg');

var image_index = 0;
function ChangeBgImage ()
 {

   document.getElementById("ddiv").style.backgroundImage="url("+image[image_index]+")";
    image_index++;
    if (image.length == image_index)
     {
           image_index = 0;   
      }   
}
setInterval( "ChangeBgImage()", 1000);
</script>
</head>
<body>
<div id="ddiv">
</div>
</body>
</html>

Image Slider using Only CSS without using Javascript or JQuery.

Slidercss.css
@keyframes slidy
{
20% { left: 0%; }
25% { left: -100%; }
45% { left: -100%; }
50% { left: -200%; }
70% { left: -200%; }
75% { left: -300%; }
95% { left: -300%; }
100% { left: -400%; }
}

body { margin: 0; }
div#slider { overflow: hidden; }
div#slider div img { width: 20%; }
div#slider div {
  position: relative;
  width: 500%;
  margin: 0;
  left: 0;
  font-size: 0;
  animation: 30s slidy infinite;
}


Slider.html:

<html>
<head>
<link rel="stylesheet" type="text/css" href="Slidercss.css"/>
</head>
<body>
<div id="slider">
<div>
<img src="pic-1.jpg" alt="">
<img src="pic-2.jpg" alt="">
<img src="pic-3.jpg" alt="">
<img src="pic-10.jpg" alt="">
<img src="pic-11.jpg" alt="">
</div>
</div>
</body>
</html>

How to disable and enable a button with checked condition?

<html>
<head>
<title>Untitled Document</title>
<script type="text/javascript">
function check()
{
if(TC.checked==true)
{

document.getElementById("ABCD").disabled=false;

}
else
{
document.getElementById("ABCD").disabled=true;
}
}
</script>
</head>

<body>
<input type="checkbox" name="TC" onclick="check()" />I have accept your Terms & Conditions<Br/>

<input type="button" id="ABCD"  disabled="disabled" value="Submit"/>
</body>
</html>

Sunday, 2 March 2014

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed



Process 1:
1)    Open IIS (Internet Information Services) Manager
2)    View the “Application Pools” node
3)    Either create a new Application Pool (call it anything you like) OR Select the Application Pool for the application you are trying to run.
4)    Select the “Advanced Settings” option
5)    Select the Identity under the “Process Model” group and change the Identity settings to NetworkService.
6)    Then Click OK.
Then run this application Right click on this website >> Manage Application >> Browse.
OR
Process 2:
Repeat the steps 1 to 4
5.  Select the Identity under the “Process Model” group and set the "Load User Profile" option to "True".
6. Then Click OK.
Then run this application Right click on this website >> Manage Application >> Browse.