<%@ Import Namespace="System.Data.Odbc" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Web.Mail" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Page Language="C#" EnableViewState="true" ClientTarget="uplevel" ValidateRequest="false" %>

<script runat="server">
	DataTable dt;
	 void Page_Load(object sender, System.EventArgs e)
    {
        if (!IsPostBack)
		{
			hdMsgID.Value = Request.QueryString["ReplyTo"];
			//Response.Write("hd val" + hdMsgID.Value + "after");
			lblMsg.Text="";
			if (hdMsgID.Value.Length > 0)
			{
			    anchCancel.Visible = true;
			}
			else
			{
				 anchCancel.Visible = false;
			}
		}
		else
		{

			anchCancel.Visible = false;
			//InsertMsg();
		}

    }

	private String DisplayMsg()
	 {
		 try
		 {
		 System.Data.Odbc.OdbcConnection con = null;
			string sPort = "3306";
                    con = new System.Data.Odbc.OdbcConnection();
                    con.ConnectionString = string.Format("DRIVER={{MySQL ODBC 3.51 Driver}};Port=3306;Server=localhost;Database=techmano_db;UID=techmanodbuser;Password=uvH38k?3");
			//Response.Write("Hello world");
			con.Open();
			//Response.Write("Opened<br>");
			//create the command
                using (OdbcCommand command = new OdbcCommand("SELECT * FROM feedback", con))
                {
                    //add the parameters
                   // command.AddParameter("@textBox1", TextBox1.Text, SqlDbType.VarChar);

                    // initialize the reader and execute the command
                    using (OdbcDataReader reader = command.ExecuteReader())
                    {
                        //Label1.Text = Convert.ToString(reader["textBox2"]);
						int count = reader.FieldCount;
						//var dt=new DataTable();
						dt=new DataTable();
						dt.Load(reader);

						if (dt.Rows.Count >0)
						{
							Response.Write("<b>Comments</b><hr>");
						//var dataRow = dt.AsEnumerable().Select(x => new {Name=x.Field<int>("msgID")});
						var parentIds = dt.AsEnumerable().Select(x => new {msgID = x.Field<int>("msgID"),
																		   parentID =x.Field<int>("parentID"),
																		   name =x.Field<string>("name"),
																		   msg =x.Field<string>("message"),
																		   dt =x.Field<DateTime>("date")
																		  });
						//var parentIds = dt.AsEnumerable().Select(x => x.Field<int>("msgID"));
						 foreach (var id in parentIds)
						 {
							 if (id.parentID == 0)
							 {
						   			//Response.Write(id.msgID + "<br>");
								   Response.Write(id.msg + " --" + id.name + " " + id.dt + " <a href=?ReplyTo="+ id.msgID + "#comment>Reply</a><br/><br/>");
								     GetChild(id.msgID,1);
								 Response.Write("<hr>");
							 }
							 else
							 {

							 }
						 }
						}
						else
						{
							Response.Write("No comments");
						}

                    }
                }
			con.Close();
			Response.Write("<br>");

		return "<br>";
	 }
		 catch (Exception ex)
        {
           // mes += " " + ex.Message ;
            //mes += " TESTS FAILED!";
			MailTest("Err occured",ex.Message);
			return "<br>";
           // Response.Write(mes);
        }

	 }
	private void GetChild(int msgId, int level)
	{
		//List<DataRow> dr=dt.AsEnumerable().Where(row => row.Field<int>("msgId") == msgId);
		List<DataRow> dr=dt.AsEnumerable().Where(row => row.Field<int>("parentId") == msgId).ToList();
		//Response.Write("<BR> size : " + dr.Count);
		//int width = 10 * level;
		 foreach (var rw in dr)
		 {
			spacing(level);
		 //Response.Write("&nbsp;&nbsp;");
		// Response.Write("<img src='spacer.gif' width='" + width + "' height='1'");
		//  Response.Write("<img src='spacer.gif' width='10' height='1'>");
		 //Response.Write(rw.Field<string>("email"));
		 Response.Write(rw.Field<string>("message") + " --" + rw.Field<string>("name") + " " + rw.Field<DateTime>("date") +  " <a href=?ReplyTo="+ rw.Field<int>("msgId") + "#comment>Reply</a><br/><br/>");
		GetChild(rw.Field<int>("msgId"), level +1);
		 }
	}

	private void spacing(int level)
	{
		int width = 25 * level;
		Response.Write("<img src='img/spacer.gif' width='" + width + "' height='1'>");
	}

	// Insert Operation
		private void InsertMsg()
		{
			try
			{
			System.Data.Odbc.OdbcConnection con = null;
			        con = new System.Data.Odbc.OdbcConnection();
                    con.ConnectionString = string.Format("DRIVER={{MySQL ODBC 3.51 Driver}};Port=3306;Server=localhost;Database=techmano_db;UID=techmanodbuser;Password=uvH38k?3");

								using(OdbcCommand cmd = new OdbcCommand("INSERT INTO feedback" +
										"(name, email, message, date, parentID) VALUES (?,?,?,?,?)", con))
				{
					cmd.Parameters.Add("@name", OdbcType.VarChar,
									   255).Value = txtName.Text.Trim();
					cmd. Parameters.Add("@email", OdbcType.VarChar,
										255).Value = txtEmail.Text.Trim();
					cmd. Parameters.Add("@message", OdbcType.VarChar,
										1000).Value = txtMsg.Text.Trim();
					cmd. Parameters.Add("@date", OdbcType.VarChar,
										50).Value = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
					if (hdMsgID.Value.Length > 0) //Reply
					{
					cmd. Parameters.Add("@parentID", OdbcType.Int,
										4).Value = hdMsgID.Value.Trim();
						hdMsgID.Value = "";
					}
					else
					{
						cmd. Parameters.Add("@parentID", OdbcType.Int,
										4).Value = 0;
					}
					con.Open();
					cmd.ExecuteNonQuery();
					//Response.Write("Record Inserted");
					MailTest("New comment Posted",txtName.Text.Trim() + " " +
											txtEmail.Text.Trim() + " " +
											txtMsg.Text.Trim());
					lblMsg.Text="Your comment posted successfully, will appear after the moderator approval.";
					//Page.SetFocus(txtName);
					txtName.Text="";
					txtEmail.Text="";
					txtMsg.Text="";
					Page.SetFocus(txtFocus);
					//Server.Transfer("blog.aspx?#comment",true);
				}
			}
			catch (Exception ex)
        {
           // mes += " " + ex.Message ;
            //mes += " TESTS FAILED!";
			MailTest("Err occured",ex.Message);
           // Response.Write(mes);
        }

		}
	//send mail

	 void MailTest(string subject, string body)
    {
        string mes = string.Empty;
        //string sTo = "info@techmano.in";
        //string sFrom = txtFrom.Text.Trim();
        //string sSubject = txtSubject.Text.Trim();
        //string sBody = txtBody.Text.Trim();
        string sMailServer = "127.0.0.1";

        MailMessage MyMail = new MailMessage();
       // MyMail.From = sFrom;
        ///MyMail.To = sTo;
       // MyMail.Subject = sSubject;
       // MyMail.Body = sBody;

		MyMail.From = "info@techmano.in";
        MyMail.To = "info@techmano.in";
        MyMail.Subject = subject;
        MyMail.Body = body;

        MyMail.BodyEncoding = Encoding.UTF8;
        MyMail.BodyFormat = MailFormat.Text;

        SmtpMail.SmtpServer = sMailServer;
        try
        {
            //mes += " Attempting send mail.";
            SmtpMail.Send(MyMail);
            mes += " Message sent to " + MyMail.To;
            mes += " TESTS COMPLETED SUCCESSFULLY!";
            //Response.Write(mes);
        }
        catch (Exception ex)
        {
            mes += " " + ex.Message ;
            mes += " TESTS FAILED!";
           // Response.Write(mes);
        }
    }

	protected void btnclick_Click(object sender, EventArgs e) {
		InsertMsg();
		anchCancel.Visible = false;
         lblMsg.Text += "Button click event handled. <br/>";
      }

</script>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>
        Tutorials point Bootstrap Examples
    </title>
    <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-85989347-1', 'auto');
  ga('send', 'pageview');

    </script>
    <!-- Bootstrap Core CSS -->
    <link href="http://www.tutorialspoint.com/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="one-page-wonder.css" rel="stylesheet">

    <style>
        /* Remove the navbar's default margin-bottom and rounded borders
        .navbar {
          margin-bottom: 0;
          border-radius: 0;
            padding-top:-10px;
        }*/
        /* On small screens, set height to 'auto' for sidenav and grid 
        @media screen and (max-width: 767px) {
            .well {
                width: 100%;
            }

            .row.content {
                height: auto;
            }
        }*/
    </style>

</head>

<body style="background-color:#f5f5f5;font-family:Verdana">

    <!-- Navigation -->
    <nav class="navbar navbar-inverse">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <!--<a class="navbar-brand" href="#">Logo</a>-->
            </div>
            <div class="collapse navbar-collapse" id="myNavbar">
                <ul class="nav navbar-nav">
                    <li><a href="home.html">Home</a></li>
                    <li class="active"><a href="blog.aspx">Blog</a></li>
                    <li><a href="contact.html">Contact</a></li>
                </ul>
                <!--
                  <ul class="nav navbar-nav navbar-right">
                    <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
                  </ul>
                -->
            </div>
        </div>
    </nav>
    <!-- Full Width Image Header -->
    <!-- Page Content -->
    <div class="container">
        <h1>From HTML to Machine learning</h1>
        <!--<h1 class="thick-heading">
            ||Blog Example||
        </h1>-->


        <!------------------------code---------------start--------------
        <div class="container"> -->
        <div class="container-fluid" style="text-align:left;">

            <div class="well" style="background-color:#fff;padding-left:20px;padding-right:15px">
                <div class="row content" >
                    Having started my career as a web developer, the first programming language learnt was HTML and having worked over these years on various technologies both on Microsoft and open source , this blog is about  overview of creating and consuming a model based on linear regression using machine learning. This is my first blog.
                    <br /><br /><a href="#comment">Comment</a>
                    Let us understand a little bit of basics before delving in to Machine learning.
                    <br /><br />
                    <b>What is linear regression?</b><br />
                    Linear means straight line, regression means estimating the relationship between variables. If the relationship between variables is a straight line then it is called linear regression.
                    <br /><br />
                    <b>What is simple linear regression?</b><br />
                    If there is one independent variable for a dependant variable and the relationship is straight line then it is called simple linear regression like the relationship between voltage and current, time taken and distance travelled which is normally of the form y=mx + c
                    <br /><br />
                    If there are more than one independent variables then it is called multiple linear regression, for example temperature at a give lattitude and longitude, mileage of an engine based on road condition and engine capacity, etc.we are going to focus only on simple linear regression in this blog post.
                    <br /><br />
                    Let's try to use linear regression in machine learning
                    <br /><br />
                    Equation of the line joining two points( x1,y1) and (x2,y2)  is y - y1 = m(x -x1)
                    where m= (y2 - y1) /( x2 - x1).
                    Once we have the value for m, we can find the value of y for any given x, which falls on the line, using the above formula.
                    <br /><br />
                    Similarly for a line joining "n" points (x1,y1),(x2,y2),....(xn,yn) the slope "m" can be computed using Least Squares method <br />
                    <img src="img/image_m.png">
                    <br />
                    and Y - intercept C
                    <br /> <br />
                    <img src="img/image_c.png">
                    <br /> <br />

                    Where X&#772; is the average of x values and Y&#772; is the average of y values.
                    <br /> <br />
                    So, once we get the values for "m" and "c" we can predict the values of "y" for given values of "x" using the formula
                    y = mx + c
                    <br /> <br />

                    Assuming that data points fall closely to straight line (not exactly a straight line) computer can find the values for "m" and "c" and hence the equation of best fit of a line  using least squares method algorithm as mentioned above. The equation thus generated depends on the input data(points). With this equation we can predict the values of "y" based on the values of "x"
                    <br /> <br />
                    This process of machine, learning from the data is known as machine learning.
                    <br /> <br />

                    <b>How to predict ?</b>  <br />
                    The idea behind prediction is, find the parameters of the equation (values of m and c) with the given data and using those parameters in the equation to get the y values for the x data point that we want(to predict).If our computer can build this equation based on our input data, then we can use that equation to predict the values for unknown/future data.
                    <br /> <br />

                    Finding the equation with known data is known as "training" (the model) and verifying the equation with existing data is known as "testing" (the model). In programming parlance a model is an object built from an algorithm.

                    <br /> <br />
                    Let's take case of simple linear regression, where the dependant variable (y) has one independent variable (x).  Let's try to find the relationship between no. Of square feet(X) and price of the house(Y) and using this relationship we can predict the price for any given sq.feet for which we don't know the price. Let's take the sample data....
                    <br /> <br />
                    <div style="overflow-y: auto;background-color:#F2F6F7;max-height:200px;max-width:120px">
                        Price,Sq.ft
                        145000,1240
                        68000,370
                        115000,1130
                        69000,1120
                        163000,1710
                        69900,1010
                        50000,860
                        137000,1420
                        121300,1270
                        70000,1160
                        64500,1220
                        167000,1690
                        114600,1380
                        103000,1590
                        101000,1050
                        50000,770
                        85000,1410
                        22500,1060
                        90000,1300
                        133000,1500
                        90500,820
                        260000,2130
                        142500,1170
                        160000,1500
                        240000,2790
                        87000,1030
                        118600,1250
                        140000,1760
                        148000,1550
                        65000,1450
                        176000,2000
                        86500,1350
                        180000,1840
                        179000,2510
                        338000,3110
                        130000,1760
                        77300,1120
                        125000,1110
                        100000,1360
                        100000,1250
                        100000,1250
                        146500,1480
                        144900,1520
                        183000,2020
                        77000,1220
                        60000,1640
                        127000,940
                        86000,1580
                        95000,1270
                        270500,2440
                        75000,1520
                        81000,980
                        188000,2300
                        85000,1430
                        137000,1380
                        92900,1010
                        93000,1780
                        109300,1120
                        131500,1900
                        200000,2430
                        81900,1080
                        91200,1350
                        124500,1720
                        225000,4050
                        136500,1500
                        268000,2530
                        70700,1020
                        70000,2070
                        140000,1520
                        89900,1280
                        137000,1620
                        103000,1520
                        183000,2030
                        140000,1390
                        160000,1880
                        192000,2780
                        130000,1340
                        123000,940
                        21000,580
                        85000,1410
                        69900,1150
                        125000,1380
                        162600,1470
                        156900,1590
                        105900,1200
                        167500,1920
                        151800,2150
                        118300,2200
                        94300,860
                        93900,1230
                        165000,1140
                        285000,2650
                        45000,1060
                        124900,1770
                        147000,1860
                        176000,1060
                        196500,1730
                        132200,1370
                        88400,1560
                        127200,1340

                    </div>


                    <br /><br />
                    Before finding the relationship let's visualize the data using excel scatter plot or with visualization provided by zeppelin / Jupyter notebook on Apache Spark
                    <br /><br />
                    <img src="img/scatter.png">
                    <br />
                    Prime facia there appears to be a positive correlation.
                    <br /><br />

                    Our intention is to find the line of best fit. Let's use our code to find this.
                    <br /><br />
                    <img src="img/scatter_line.png">
                    <br /><br />

                    I am going to use Apache Spark ML with Scala.
                    <br /><br />
                    Using Apache spark for  this amount of data is an over kill, but the point is this solution would work on huge amount of data.
                    <br /><br />
                    One way to create a spark cluster is to use the free databricks cloud community edition.
                    <br /><br />
                    The input for linear regression algorithm is label and feature.Label is predictor variable i.e item we are going to predict, in this case it is price, feature is the independent variable that label depend on, in this case it is Sq.ft.
                    <br /><br />
                    Upload the sample data as csv without headers to a folder say /tmp.
                    <br /><br />
                    Load the data in to Dataframe
                    <div style="background-color:#F2F6F7;">
                        <br /><br />
                        val dataPath = "/tmp/housePrice.txt" <br />
                        val price = sqlContext.read.format("com.databricks.spark.csv").option("header","false").load(dataPath)
                        <br /><br />
                    </div>

                    Transform the Dataframe in to another Dataframe with required schema as defined in the "case class", ensure that label field should be double.
                    <br /><br />
                    <div style="background-color:#F2F6F7;">
                        import sqlContext.implicits._ <br />
                        case class House(price: Double, sqft: Long) <br />
                        val pricedf = price.map{row => House(row(0).toString.toDouble, row(1).toString.toLong)}.toDF()
                        <br />
                    </div>
                    <br /><br />
                    Create  vector from the input features (in this case "Sq.ft " is the only feature) using vectorAssembler class

                    <br /><br />
                    <div style="background-color:#F2F6F7;">
                        import org.apache.spark.ml.regression.LinearRegression <br />
                        import org.apache.spark.ml.feature.{StringIndexer, VectorAssembler, OneHotEncoder} <br />
                        val vectorAssembler = new VectorAssembler().setInputCols(Array("sqft")).setOutputCol("featuresVector") //Create a vector Assembler
                    </div>
                    <br /><br />
                    Transform the input data in to vectors
                    <br /><br />
                    val sample_df1 = vectorAssembler.transform(pricedf)

                    <br /><br />
                    Create the linear regression model,  set the label column and features column of the input data, and other parameters as below.
                    <div style="background-color:#F2F6F7;">
                        val lr = new LinearRegression() //Create a linear regression model  <br />
                        .setFeaturesCol("featuresVector")  <br />
                        .setLabelCol("price")  <br />
                        .setPredictionCol("predictedValues")  <br />
                        .setMaxIter(5)  <br />
                        .setElasticNetParam(0.5)
                    </div>
                    <br /><br />
                    Train the model using input data
                    <br /><br />
                    <div style="background-color:#F2F6F7;">
                        val sample_lr = lr.fit(sample_df1)
                    </div>

                    <br /><br />
                    Now we got the model, let us test the model using unknown data.
                    <br /><br />
                    create test data with label(price) as "0"  and the Sq.ft for which we want to predict the price say for 550 and 1000
                    <div style="background-color:#F2F6F7;">
                        <br /><br />
                        val aList = List("0,550","0,1000") <br />
                        import sqlContext.implicits._ <br />
                        val rows = aList.map{_.split("\\,")} <br />
                        val testD = rows.map{row => House(row(0).toDouble,row(1).toLong)}.toDF() <br />
                        val test_df1 = vectorAssembler.transform(testD)  <br />
                    </div>
                    <br /><br />
                    Now we got the test data in the required form.
                    <br /><br />
                    So far what we did is, we trained our  model, let's test this with unknown values...
                    Apply the test data on the above created model to find the price for the input
                    <div style="background-color:#F2F6F7;">
                        <br /><br />
                        val prediction = sample_lr.transform(test_df1)
                        <br /><br />
                    </div>
                    See the output using
                    <br /><br />
                    <div style="background-color:#F2F6F7;">
                        <br /><br />
                        prediction.show
                        <br /><br />
                    </div>
                    output
                    <div style="background-color:#F2F6F7;">
                        <br /><br />
                        |price|sqft|featuresVector|  predictedValues| <br />
                        +-----+----+--------------+-----------------+ <br />
                        |  0.0| 550|       [550.0]|530555.4361657018| <br />
                        |  0.0|1000|      [1000.0]|877090.0526306548| <br />
                        +-----+----+--------------+-----------------+ <br />
                        <br /><br />
                    </div>
                    Of course the model can be evaluated and tuned, which is beyond the scope of this blog.
                    <br /><br />
                    We got the model now, how it can be consumed by end user / business? We can load this model in a Java program and can be exposed as REST webservice. One easy way, is to build the model in Scala and consume it in Java  (using Spark ML persistence train / test the model in scala and save it. Load the saved model using Java and expose it as webservice)
                    <br /><br />
                    Once we have this webservice, it can be consumed in lot of ways, one of them is  through JavaScript embeded in HTML.

                    <br /><br />
                    So with the input data we built the model and predicted output using this model. The system calculated the formula based on the input data and predicted using this formula for the given data. From the end users perspective the machine learned from the input data and predicted values for unknown data based on its understanding of the input data.......isn't it interesting?
                    <br /><br />
                    <!-- <a href=/blog.aspx#comment> comment</a> -->
                    <div>
                        <%=DisplayMsg() %>
                    </div>
                    <br />

                    <div id="comment">
                        <br />
                        <b>Post your comments </b>
                        <a rel="nofollow" id="anchCancel" href="#comment" runat="server">Cancel reply</a>
                        <br /><br />

                        <form method="post" runat="server">

                            <div style="text-align:center">
                                Email(will not be published)*
                                <asp:TextBox ID="txtEmail"
                                             runat="server"
                                             maxlength="100" />
                                <asp:RequiredFieldValidator ID="rfvemail" runat="server" style="color:red"
                                                            ControlToValidate="txtEmail" ErrorMessage="Enter a valid email ID">
                                </asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="remail" runat="server" style="color:red"
                                                                ControlToValidate="txtEmail" ErrorMessage="Enter a valid email ID"
                                                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
                                </asp:RegularExpressionValidator>
                            </div>
                            <br>

                            <div style="text-align:center">
                                Name*
                                <asp:TextBox ID="txtName"
                                             runat="server"
                                             maxlength="240" />
                                <asp:RequiredFieldValidator ID="rfvname" runat="server" style="color:red"
                                                            ControlToValidate="txtName" ErrorMessage="Enter your name">
                                </asp:RequiredFieldValidator>
                            </div>
                            <br />

                            <div style="text-align:center">
                                Message*
                                <asp:TextBox ID="txtMsg"
                                             runat="server"
                                             TextMode="MultiLine"
                                             Columns="45"
                                             Rows="4"
                                             MaxLength="12" />
                                <asp:RequiredFieldValidator ID="rfvemsg" runat="server" style="color:red"
                                                            ControlToValidate="txtMsg" ErrorMessage="Enter some message">
                                </asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="revmsg" runat="server" style="color:red"
                                                                ControlToValidate="txtMsg" ErrorMessage="Exceeding 1500 characters" ValidationExpression="^[\s\S]{0,1500}$" />
                            </div>
                            <br />
                            <div style="text-align:center">
                                <!--	<asp:Button ID="btnclick" runat="server" Text="Click" onclick="btnclick_Click" /> -->
                                <input type="submit" name="btnSubmit" value="Post" s runat="server"><br />
                            </div>
                            <input type="hidden" name="hdMsgID" ID="hdMsgID" value="" runat="server">
                            <asp:label id="lblMsg" style="color:red" runat="server" />
                            <br /><br />
                            <asp:TextBox ID="txtFocus" style="width:1px;height:1px;border:none" runat="server" />
                            <br />
                        </form>

                        <!-- <input type="text" ID="txtFocus" value="" style="width:1px;height:1px"> -->

                    </div>
                    <hr>
                    <br />
                    <b>About the Author:</b> Manoharan D, Having 1.8 decades of IT industry experience, working for a private IT company, living in a town near Chennai, India.
                </div>

                <h3></h3>
                <p></p>
            </div>

        </div>

        <!----Code------end----------------------------------->
    </div>
    <!-- /.container -->
    <div class="footer-copyright">
        <div class="container">
            <div class="row">
                <div class="col-md-1">
                    <a href="index.html" class="logo">

                        <img alt="Tutorials Point" class="img-responsive" src="http://www.tutorialspoint.com//scripts/img/logo-footer.png">

                    </a>
                </div>
                <div class="col-md-3 col-sm-12 col-xs-12">
                    <p>
                        © Copyright 2015. All Rights Reserved.
                    </p>
                </div>
            </div>
        </div>
    </div>
    <!-- jQuery -->
    <script src="http://www.tutorialspoint.com/bootstrap/scripts/jquery.min.js">
    </script>

    <!-- Bootstrap Core JavaScript -->
    <script src="http://www.tutorialspoint.com/bootstrap/js/bootstrap.min.js">
    </script>

</body>

</html>