Wednesday, December 24, 2014

SIMPLE DATABASE CONNECTIVITY PROGRAM IN PHP

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PHP DATABSAE</title>
</head>

<body>
<?php

$query=mysql_connect("localhost","root","");
mysql_select_db("cloud",$query) ;
$name1=$_POST['firstname'];
$name2=$_POST['lastname'];
//echo "insert into register(firstname,secondname)values('$name','$name2')";
$query1=mysql_query("INSERT into register(firstname,secondname)values('$name1','$name2')");
if($query1)
{
 echo "succesfully submitted";
 }
 else
 {
 echo "please submit again";
 }

?>
</body>
</html>

Wednesday, December 17, 2014

TIMER APPLICATION code for 20 Minutes Alert using c#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Timer
{
    public partial class Form1 : Form
    {

        int i = Convert.ToInt32(0);
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

            label1.Text = DateTime.Now.ToString();
           

        }

        private void timer1_Tick(object sender, EventArgs e)
        {

            i++;
            if (i==20)
            {
                MessageBox.Show("20 minutes is left");
                i = 0;
            }

        }

Monday, July 7, 2014

AGE CALCULATOR

CurrentDate: BirthDate: Age:

Sunday, April 20, 2014

DECRYPTION IN UNIX C

DECRYPTION


[ragava@localhost ~]$ cat dc.c
#include<stdio.h>

main(int argc, char *argv[])
        {
                int i;
                char a[2000],b;
                FILE *fp;
                if(argc!=2)
                        {
                                printf("Usage error");
                                return;
                        }

                fp=fopen(argv[1],"r");
                if(fp==NULL)
                        {
                                printf("ERROR IN OPENING A FILE");
                                return;
                        }
                for(i=0,a[i]=getc(fp);feof(fp)!=0;a[++i]=getc(fp))
                                 ;
                a[i]='\0';
                fclose(fp);
                remove(argv[1]);
                fp=fopen(argv[1],"w");

                for(i=0;a[i]!='\0';i++)

                        {
                                b=a[i]-2;
                                putc(b,fp);
                        }
                fclose(fp);
        }

[ragava@localhost ~]$
 

ENCRYPTION IN UNIX C

ENCRYPTION

[ragava@localhost ~]$ cat ec.c
#include<stdio.h>

main(int argc, char *argv[])
        {
                int i;
                char a[2000],b;
                FILE *fp;
                if(argc!=2)
                        {
                                printf("Usage error");
                                return;
                        }

                fp=fopen(argv[1],"r");
                if(fp==NULL)
                        {
                                printf("ERROR IN OPENING A FILE");
                                return;
                        }
                for(i=0,a[i]=getc(fp);feof(fp)!=0;a[++i]=getc(fp))
                                 ;
                a[i]='\0';
                fclose(fp);
                remove(argv[1]);
                fp=fopen(argv[1],"w");

                for(i=0;a[i]!='\0';i++)

                        {
                                b=a[i]+2;
                                putc(b,fp);
                        }
                fclose(fp);
        }

 

SENDING MAIL THROUGH C#

SMTP MAIL IN C SHARP

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Mail;

namespace mailing
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MailMessage message = new MailMessage();
            message.To.Add("ragava08@ymail.com");
            message.Subject = "SUBJECT";
            message.From = new MailAddress("ragava08@gmail.com");
            message.Body = "BODY PART";
            SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
            SmtpServer.Port = 587;
         SmtpServer.Credentials = new System.Net.NetworkCredential("ragava08@gmail.com", "password");
            SmtpServer.EnableSsl = true;
            SmtpServer.Send(message);
            MessageBox.Show("Message successfully sent");

        }
    }
}

Tuesday, March 11, 2014

ARITHMETIC CALCULATOR

Calculator

ONLINE CALCULATOR

PRESS C FOR "CLEAR SCREEN"

Thursday, January 30, 2014

HTML


SIMPLE HOMEPAGE FOR EASY NAVIGATION TO FREQUENTLY VISITING WEBSITE:

<html>
    <head>
        <title> Home page </title>
    </head>
        <body>
            <h1>WELCOME TO HOME PAGE</h1>
            <body bgcolor="blue" text="black">
            <a href="http//www.google.com"><input type="button" value="Google"></a></br>
            <a href="http//www.googlemaps.com"><input type="button"  value="Google Map"></a></br>
          
            <a href="http//www.wikipedia.com"><input type="button"  value="WIKIPEDIA"></a></br>
          
            <a href="http//www.ragava08.blogspot.com"><input type="button"  value="ragava08"></a></br>
          
        </body>
</html>
------
NOTE: <a href="http//www.google.com"> //In above code,Change the URL specified in these tags for customized usage.