Friday, March 30, 2018

What Is Index In SQL Server.

This Is A ppt About What is Index All the description about index are given into the ppt.

In this ppt there are introduction to index,types of index, how to create index all are given in brief.

Download INDEX PPT Here 

How To Print Fibonacci Series In C++

This is a example of how to print Fibonacci series in c++.


#include<stdio.h>
#include<conio.h>
#include<iostream.h>
class fibbonacci
{
int a,b,s;
public :
fibbonacci() //constructor
{
a=0;b=1;
}
void nextstep()
{
s=a+b;
b=a;
a=s;
}
void display()
{
cout<<"\t"<<s;
}
};
void main()
{
fibbonacci f1;
int n,i;
clrscr();
cout<<"\n\nEnter NO :";
cin>>n;
for(i=0;i<n;i++)
{
f1.nextstep();
f1.display();
}
getch();
}  

How To Find Area Of Circle In C++

This program is about how to find area of circle in c++.

#include<conio.h>
#include<iostream.h>
class  circle
{
float redius;
public :
void input()
{
cout<<"\nRedius : "; cin>>redius;
}
float area()
{
return 3.14*redius*redius;
}
};
class cylinder : public circle
{
float height;
public :
void input()
{
circle::input();
cout<<"\nHeight  : ";
cin>>height;
}
float volume()
{
return area()*height;
}
};
void main()
{
cylinder c;
clrscr();
c.input();
cout<<"\n\n\t Area of Circle ..." << c.area();
cout<<"\n\n\t Volume of Cylinder... " <<c.volume();
getch();
}

How To find ASCII Value Of Character In C++.

This program is about how to find ascii value of character in c++.


#include<conio.h>
#include<stdio.h>
#include<iostream.h>
int main()
{
char ascii;
clrscr();
cout<<"enter your character:";
cin>>ascii;
cout<<"ascii valu is:"<<(int)ascii<<endl;
getch();
return 0;
}

How To Find Simple Intrest In C++.

This Program is about how to find simple interest of given value in input in c++.


#include<conio.h>
#include<stdio.h>
#include<iostream.h>
int main()
{
long p;
int n;
float si,r;
clrscr();
cout<<"\n enter a value for principal:";
cin>>p;
cout<<"\n enter a value for a year:";
cin>>n;
cout<<" \n enter a value for a rate:";
cin>>r;
si=p*n*r/100;
cout<<"\n simple intrest is:"<<si;
getch();
return 0;

How To Implement Forms-Based Authentication in ASP.NET

This Is A Simple Example Of How To Create Form Authentication In Asp.net.
x




1.Default.aspx.cs file

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public bool check()
    {
        SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Users\Bhavesh\Documents\Visual Studio 2010\WebSites\authentication\App_Data\Database.mdf';Integrated Security=True;User Instance=True");
        string select = "select * from login where username=@username and password=@password";
        con.Open();
        SqlCommand cmd = new SqlCommand(select, con);
       
        cmd.Parameters.Add("@username", TextBox1.Text);
        cmd.Parameters.Add("@password", TextBox2.Text);
        Object obj = cmd.ExecuteScalar();
        con.Close();
        if (obj != null)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (check())
        {

            Response.Write("<script>alert('you are authorize user')</script>");
        }
        else
        {
            Response.Write("hello");
        }
    }
}

2 Default.aspx File


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    username:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
    password:<asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox><br />
    <asp:Button ID="Button1" runat="server" Text="Login" onclick="Button1_Click"></asp:Button>
    </div>
    </form>
</body>
</html>


3 Web.config File

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
<appSettings/>
<connectionStrings>
<add name="constring" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Users\Bhavesh\Documents\Visual Studio 2010\WebSites\authentication\App_Data\Database.mdf';Integrated Security=True;User Instance=True"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<authentication mode="Forms">
<forms name="login" loginUrl="Default.aspx" timeout="30">
</forms>
</authentication>
</system.web>
</configuration>

How To Print Mark OF Subject In C++.

#include<conio.h>
#include<stdio.h>
#include<iostream.h>
int main()
{
clrscr();
cout<<" mark of mathematics is :90\n";
cout<<" mark of computer is:77\n";
cout<<" mark of chemistry is :60\n";
getch();
return 0;
}

Generate Even Numbers in a Range In PHP.

$start = 1; $end = 20; for ($i = $start; $i <= $end; $i++) {     if ($i % 2 == 0) {         echo $i . " is even.<br>";   ...