Thursday, May 11, 2017

What stands for SEO, SMO, SEM

SEO-Search Engine Optimization
SMO-Social Media Optimization
SEM-Search Engine Marketing

One of the ternary operators provided in C# is:

        ?:

What will be the output of the following Main program in a C# console application (Assume required namespaces are included):
static void Main(string[] args)
{
          int @int = 15;
          Console.WriteLine(@int);
          Console.ReadLine();
}
Output: 15 

Validate Email in JavaScript

<!DOCTYPE html>
<html>
 <head>
  <title>Demo</title>
 </head>
<body>
 <h1>Validate Email in JavaScript</h1>
 <input type="text" id="email" />
 <button onclick="Validate()">Validate Email</button>
 <script>
  function Validate(){
   var mail = document.getElementById("email").value;
   alert(ValidateEmail(mail));
  }
function ValidateEmail(mail) {
    var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
    return re.test(mail);
} 
 </script>
</body>
</html>