Wednesday, 5 April 2017

What is load balancing??

Load Balancing Structure


Load Balancing


Load balancing refers to efficiently distributing incoming network traffic across a group of back-end servers, also known as a server farm or server pool.

Saturday, 1 April 2017

Cookie Helper Class in C#


In this article I will show you Cookie Helper Class in C#.


public static class CookieHelper
    {
        //Set new cookie...
        public static bool Set(string CkName, string CkValue, int CkExpirationMins, 
            string ckDomain, bool ckIsSecure)
        {
            bool flag = false;
            try
            {
                HttpCookie newCookie = new HttpCookie(CkName);
                newCookie.HttpOnly = true;
                newCookie.Value = CkValue;
                newCookie.Expires = DateTime.Now.AddMinutes(CkExpirationMins);
                if (!string.IsNullOrEmpty(ckDomain)) newCookie.Domain = ckDomain;
                if (ckIsSecure) newCookie.Secure = ckIsSecure;
 
                HttpContext.Current.Response.Cookies.Add(newCookie);
                flag = true;
            }
            catch (Exception)
            {
                flag = false;
            }
            return flag;
        }
 
        //Read cookie value...
        public static string Get(string CkName)
        {
            string strReturn = "";
            if (!string.IsNullOrEmpty(CkName))
            {
                try
                {
                    HttpCookie currentCookie = (HttpCookie)HttpContext.Current.Request.Cookies[CkName];
                    if (currentCookie != null) strReturn = currentCookie.Value;
                }
                catch (Exception) { }
            }
            return strReturn;
        }
 
    }

Sunday, 26 March 2017

How Search Engines Work Using a 3 Step Process


All Search engines work using a 3 phase approach to managing , ranking and returning search results.

Crawling

Imagine the World Wide Web as a network of stops in a big city subway system.
Each stop is a unique document (usually a web page, but sometimes a PDF, JPG, or other file). The search engines need a way to “crawl” the entire city and find all the stops along the way, so they use the best path available—links.

Friday, 24 March 2017

How to Validate Email Id Using Javascript

In this article we see how to validate email id using regex in javascript.

HTML Code:-

form name="frmSample" method="post" action="#" onSubmit="return ValidateForm()">
<p>Enter an Email Address :
 <input type="text" name="txtEmail">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>