Showing posts with label web. Show all posts
Showing posts with label web. Show all posts
Monday, 31 March 2014
C Programming graphics | Web browser project in c, c program to open a website/url using C graphics
#include <stdio.h>
Labels:
/,
a,
browser,
c,
c program to open a website/url using C graphics,
C Programming graphics | Web browser project in c,
graphics,
graphics |,
In,
open,
Program,
Programming,
project,
to,
url,
using,
web,
website
Sunday, 30 March 2014
JAVA PROGRAMS-Matrix Program in Java
Matrix Program in Java
Program Name:- matrix.java
import java.io.*;
class matrix
{
public static void main(String args[])throws IOException
{
DataInputStream in=new DataInputStream(System.in);
int i,j,m,n,k;
int a[][]=new int[10][10];
int b[][]=new int[10][10];
int c[][]=new int[10][10];
int d[][]=new int[10][10];
System.out.print("\n Enter the row and column\n\n");
m=Integer.parseInt(in.readLine());
n=Integer.parseInt(in.readLine());
System.out.print("\n Enter the element of matrix A\n\n");
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
a[i][j]=Integer.parseInt(in.readLine());
}
}
System.out.print("\n Enter the element of matrix B\n\n");
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
b[i][j]=Integer.parseInt(in.readLine());
}
}
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
for(k=0;k<m;k++)
{
c[i][j]=c[i][j]+a[i][k]*b[k][j];
}
}
}
System.out.print("\n A matrix\n");
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
System.out.print(a[i][j]+"\t");
}
System.out.println();
}
System.out.print("\n B matrix\n");
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
System.out.print(b[i][j]+"\t");
}
System.out.println();
}
System.out.print("\n Multipul matrix\n");
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
System.out.print(c[i][j]+"\t");
}
System.out.println();
}
}
}
JAVA PROGRAMS-Stack Program In Java
Stack Program In Java
Program Name:- stackdemo.java
import java.io.*;
class stack
{
int s[]=new int[100];
int top;
void stack()
{
top=0;
System.out.println("\n The stack is empty");
}
public void push()throws IOException
{
DataInputStream inp=new DataInputStream(System.in);
int x;
if(top==100)
{
System.out.println("The Stack is full");
}
else
{
System.out.print("\n Enter the value :");
x=Integer.parseInt(inp.readLine());
s[top]=x;
top++;
System.out.println("\n The value is pushed");
}
}
public void pop()throws IOException
{
DataInputStream inp=new DataInputStream(System.in);
int y;
if(top==0)
{
System.out.println("\n The stack is empty");
}
else
{
top--;
y=s[top];
s[top]='\0';
System.out.println("\n The value is poped");
}
}
void display()
{
int i;
if(top==0)
{
System.out.println("\nThe stack is empty");
}
else
{
System.out.println("\nValues are top-->");
}
for(i=top-1;i>=0;i--)
System.out.println(s[i]);
}
}
public class stackdemo
{
public static void main(String args[])throws IOException
{
stack in=new stack();
int item=0;
int opt=1;
String s=new String();
while(opt<4)
{
System.out.println("\n\n\t\t Main menu\n\n1.push\n\n2.Pop\n\n3.Display\n\n4.Exit\n\nSelection the option");
DataInputStream din=new DataInputStream(System.in);
s=din.readLine();
opt=Integer.parseInt(s);
switch(opt)
{
case 1:
System.out.println("\nEnter the elementis add");
in.push();
break;
case 2:
System.out.println("\nEnter the delete item");
in.pop();
break;
case 3:
System.out.println("\nThe stack element is:");
in.display();
break;
default:
opt=4;
}
}
}
}
Monday, 3 March 2014
PHP TUTORIALS-Create Login Page with DataBase-PhpMyAdmin-Mysql
PHP TUTORIALS Create Login Page with DataBase-PhpMyAdmin-Mysql
FULL DETAILS..
PHP TUTORIALS-Create Login Page with Database using PhpMyAdmin-Mysql
PHP TUTORIALS Create Login Page with DataBase PhpMyAdmin Mysql PART2
Program Name :- htmllogin.html
<html>
<head>
<body bgcolor="">
<font>
<center><h1>Login</h1></center>
</font>
<form action="login.php" method="POST">
Username:<input type="text" name="uname">
Password:<input type="password" name="pass"><br>
<input type="submit" value="login" name="submit">
</form>
</body>
</head>
</html>
Program Name:- login.php
<?php
require ('sql_connect.php');
if (isset($_POST['submit'])){
$username=mysql_escape_string($_POST['uname']);
$password=mysql_escape_string($_POST['pass']);
if (!$_POST['uname'] | !$_POST['pass'])
{
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('You did not complete all of the required fields')
window.location.href='htmlogin.html'
</SCRIPT>");
exit();
}
$sql= mysql_query("SELECT * FROM `login_users` WHERE `username` = '$username' AND `password` = '$password'");
if(mysql_num_rows($sql) > 0)
{
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Login Succesfully!.')
window.location.href='htmllogin.html'
</SCRIPT>");
exit();
}
else{
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Wrong username password combination.Please re-enter.')
window.location.href='htmllogin.html'
</SCRIPT>");
exit();
}
}
else{
}
?>
Program Name:- sql_connect.php
<?php
mysql_connect("localhost", "root", "") or die("mysql connection is failure.");
mysql_select_db("login") or die("Database does not exists.");
?>
Labels:
-,
connect,
Create,
DataBase,
db,
FULL DETAILS,
html,
Login,
mydmin,
Mysql,
page,
PHP TUTORIALS,
PhpMyAdmin,
Program,
web,
with
Friday, 28 February 2014
PHP TUTORIALS-GET METHOD
CODING FOR GET METHOD WITH EXAMPLE PROGRAM SESSON-2
Program name:- htmlget1.php
<html>
<head>
<body>
<h1><center>GET METHOD</center></h1>
<form action="get1.php" method="get">
Name:<input type="text" name="name">
Email:<input type="text" name="email">
<input type="submit" value="submit">
</body>
</head>
</html>
get1.php
Welcome<?php echo $_GET["name"];?>
Your Email Address is: <?php echo $_GET["email"];?>
Labels:
connect,
Create,
DataBase,
db,
FULL DETAILS,
get,
give,
html,
HTML Program Name:- htmlgett1.html,
mydmin,
Mysql,
page,
PHP TUTORIALS,
PhpMyAdmin,
sql,
web
Subscribe to:
Posts (Atom)