Saturday, 22 August 2015

How to add Booking Functionality on Web site using simple HTML and JQuery just like red bus and book my show

Here is Simple example of Booking website functionality. user can book online cinemas tickets or book a bus ticket online so how they design on web. here is the example. so watch it and learn it.

Screen Shot


You Can Direct Download From :: Google Drive

Saturday, 31 January 2015

Outlook Redemption

Redemption objects providing access to the properties, functions and objects blocked by the Outlook Security Patch. In addition to providing the exact replica of the corresponding Outlook objects, some of these objects have extra properties and methods, such as RTFBody on all Safe*Item objects, AsString and AsArray on attachments, etc. These objects are designed to be used alongside your existing OOM or CDO 1.21 code with as few modifications as possible.

  • How to use Redemption.dll with your C# .Net Application ?


STEP 2 :- Register Redemption.dll


  • Goto  START -> RUN
  • Type : regsvr32.exe "<path of dll file>"




STEP 3 :- Now Open Visual Studio
  • Create New Project
  • Goto -> Project -> Add References



Friday, 7 March 2014

Retrive Data From Database without refreshing the page using AJAX in PHP

To Fetch Data From the Database without refreshing the whole page using AJAX we have to create two file's that named as..


  • getuser.php
  • test.html
so first let's start the coading of test.html


<html>
<head>
<script type="text/javascript">
<!--
var xmlhttp;
function showuser(str)
{
if(window.XMLHttpRequest)
{
xmlhttp= new XMLHttpRequest();
}
if(window.ActiveXObject)
{
xmlhttp= new ActiveXobject("Microsoft.XMLHTTP");
}
var url="getuser.php?q="+str;
xmlhttp.onreadystatechange=statechanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function statechanged()
{
if(xmlhttp.readyState==4)
{
document.getElementById("txthint").innerHTML=xmlhttp.responseText;
}
}
-->
</script>
</head>
<body>
<form name="frm">
SELECT A PERSON : 
<select name="s" onChange="showuser(this.value)">
<option value="1">Nilesh</option>
<option value="2">Sagar</option>
<option value="3">Jaynit</option>
<option value="4">Ravi</option>
<option value="5">Chirag</option>
</select>
<input type="text" onKeyUp="showuser(this.value)">
<div id="txthint">YOUR DATA DISPLAY HERE.....</div>
</form>
</body>
</html>


now we create a getuser.php file



<?php
$q=$_GET['q'];
$link=mysql_connect('localhost','root','');
mysql_select_db("student");
$result=mysql_query("select * from student where name like '".$q."%'");
echo "<table border=1>
<tr>
<th>ID</th>
<th>Name</th>
<th>City</th>
</tr>";
while($rs=mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>".$rs[0]."</td>";
echo "<td>".$rs[1]."</td>";
echo "<td>".$rs[2]."</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($link);
?>


Now you have to create one database in MySql named as "student"
and create one table also name as "student"

The whole package you can Download From Here

Sunday, 9 February 2014

Creating a Digital Clock using an Applet in Java...


Here is Full Code To Create a Digital through JAVA Applet


import java.awt.*;
import java.awt.Graphics;
import java.applet.Applet;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DGClock extends Applet {
    DateFormat dateFormat;
    Date date;
    Thread t;
    public void init() {
        this.setSize(300,200);
    }
    public void paint(Graphics g)
    {
        try
        {
            Font f=new Font("Arial",Font.BOLD,50);
            g.setFont(f);
            g.setColor(Color.DARK_GRAY);
            dateFormat = new SimpleDateFormat("hh:mm:ss a");
            date = new Date();
            g.drawString(dateFormat.format(date),5,100);
            Font f1=new Font("Arial",Font.BOLD,10);
            g.setFont(f1);
            g.drawString("For More Example Visit : exceptionthroow.blogspot.in",20,170);
            g.drawString("Email : agotariyanilesh@gmail.com",65,185);
            showStatus("Developed By : Nilesh Agotariya");
            t.sleep(1000);
            repaint();
        }catch(Exception e)
        {
        
        }
    }
}


Thursday, 6 February 2014

Program of Stack in C Language with full functionality PHSH,POP,PEEP,SEARCH,DISPLAY,UPDATE


#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int tos=-1;
int data[5];
void MENU();
void PUSH();
void POP();
void PRINT();
void PEEP();
void UPDATE();
void SEARCH();
void MSG(char msg[]);
void main()
{
       MENU();
       getch();
}
void MENU()
{
int ch;
clrscr();
printf("\n\t----Menu----");
printf("\n\n\t 1. PUSH \n\t 2. POP \n\t 3. PEEP \n\t 4. UPDATE \n\t 5. SEARCH \n\t 6. DISPLAY \n\t 7. EXIT ");
printf("\n\n\t Enter Your Choice : ");
scanf("%d",&ch);
switch(ch)
{
case 1:
PUSH();
break;
case 2:
POP();
break;
case 3:
PEEP();
break;
case 4:
UPDATE();
break;
case 5:
SEARCH();
break;
case 6:
PRINT();
break;
case 7:
exit(0);
break;
default:
MSG("Invalid Choice");
}
}
void PUSH()
{
if(tos<4)
{
int item;
clrscr();
printf("\n\t Enter Item : ");
scanf("%d",&item);
tos++;
data[tos]=item;
MENU();
}else
{
MSG("Stack is Full");
}
}
void POP()
{
if(tos>-1)
{
clrscr();
printf("\n\t Deleted Item is : %d",data[tos]);
tos--;
getch();
MENU();
}else
{
MSG("\n\t Stack is Empty");
}
}
void PEEP()
{
if(tos>-1)
{
int pos;
clrscr();
printf("\n\t Enter Which Element You Want to See : ");
scanf("%d",&pos);
pos=tos-pos+1;
printf("\n\n\t Element is : ");
scanf("%d",data[pos]);
getch();
MENU();
}else
{
MSG("\n\t Stack is Empty");
}
}
void UPDATE()
{
if(tos>-1)
{
int pos,ele;
clrscr();
printf("\n\t Enter Position to Update Element : ");
scanf("%d",&pos);
printf("\n\t Enter Value : ");
scanf("%d",&ele);
pos=tos-pos+1;
data[pos]=ele;
MSG("\n\t Record Updated");
getch();
MENU();
}else
{
MSG("Stack is Empty");
}

}
void SEARCH()
{
if(tos>-1)
{
int i,ele,cnt=0;
clrscr();
printf("\n\t Enter Element to Search : ");
scanf("%d",&ele);
for(i=0;i<=tos;i++)
{
if(data[i]==ele)
{
cnt++;
}
}
if(cnt>0)
{
printf("\n\t Element %d  Found %d times in the Stack",ele,cnt);
}else
{
      printf("\n\t Element Not Found");
}
getch();
MENU();
}else
{
MSG("\n\t Stack is Empty");
}
}
void PRINT()
{
if(tos>-1)
{
int i;
clrscr();
for(i=0;i<=tos;i++)
{
printf("\n\t Element At Position %d is : %d",i,data[i]);
}
getch();
MENU();
}else
{
MSG("\n\t Stack is Empty");
}
}
void MSG(char msg[])
{
printf("\n\t %s ",msg);
getch();
MENU();
}

Wednesday, 5 February 2014

How to Hide Drive From My Computer or How to Unmount Drive From Your Computer

To Hide The Drive You have to follow some Steps

STEP 1: Check Drives in My Computer

STEP 2 : Open RUN and type diskpart and press OK

STEP 3 : Now You have to Write Commands...
               list volume

STEP 4 : Now You Will see all the Drives were listed. Now you have to select one of the drive that you want to hide or unmount and for do this command is 
               select volume 4
After selection of drive you have to remove the drive for that command is
          remove letter e
 


STEP 5 : Now goto My Computer You Will Not See the Drive E:\ and even you can not access it also
STEP 6: Now How to get back the Drive for that command is
              select volume 4
              assign letter e

STEP 7 : Now You Can Access or See your Drive

How to Create an Datepicker using JAVA SWING

Program of JAVA Datepicker.....


package datepicker;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

class DatePicker {
int month = java.util.Calendar.getInstance().get(java.util.Calendar.MONTH);
int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);;
JLabel l = new JLabel("", JLabel.CENTER);
String day = "";
JDialog d;
JButton[] button = new JButton[49];

public DatePicker(JFrame parent) {
d = new JDialog();
d.setModal(true);
String[] header = { "Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" };
JPanel p1 = new JPanel(new GridLayout(7, 7));
p1.setPreferredSize(new Dimension(430, 120));

for (int x = 0; x < button.length; x++) {
final int selection = x;
button[x] = new JButton();
button[x].setFocusPainted(false);
button[x].setBackground(Color.white);
if (x > 6)
button[x].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
day = button[selection].getActionCommand();
d.dispose();
}
});
if (x < 7) {
button[x].setText(header[x]);
button[x].setForeground(Color.red);
}
p1.add(button[x]);
}
JPanel p2 = new JPanel(new GridLayout(1, 3));
JButton previous = new JButton("<< Previous");
previous.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
month--;
displayDate();
}
});
p2.add(previous);
p2.add(l);
JButton next = new JButton("Next >>");
next.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
month++;
displayDate();
}
});
p2.add(next);
d.add(p1, BorderLayout.CENTER);
d.add(p2, BorderLayout.SOUTH);
d.pack();
d.setLocationRelativeTo(parent);
displayDate();
d.setVisible(true);
}

public void displayDate() {
for (int x = 7; x < button.length; x++)
button[x].setText("");
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(
"MMMM yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year, month, 1);
int dayOfWeek = cal.get(java.util.Calendar.DAY_OF_WEEK);
int daysInMonth = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
for (int x = 6 + dayOfWeek, day = 1; day <= daysInMonth; x++, day++)
button[x].setText("" + day);
l.setText(sdf.format(cal.getTime()));
d.setTitle("Date Picker");
}

public String setPickedDate() {
if (day.equals(""))
return day;
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(
"dd-MM-yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year, month, Integer.parseInt(day));
return sdf.format(cal.getTime());
}
}

class Picker {
public static void main(String[] args) {
JLabel label = new JLabel("Selected Date:");
final JTextField text = new JTextField(20);
JButton b = new JButton("Date");
JPanel p = new JPanel();
p.add(label);
p.add(text);
p.add(b);
final JFrame f = new JFrame("exceptionthroow.blogspot.in");
f.getContentPane().add(p);
f.pack();
f.setVisible(true);
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
text.setText(new DatePicker(f).setPickedDate());
}
});
}
}



OUTPUT : -