Posts

Showing posts from December, 2018

Fibonacci series program in c language

#include<stdio.h> #include<conio.h> void main() {   int i,a=0,b=1,c,n;   clrscr();   printf("Enter the limits:");   scanf("%d",&n);   for(i=1;i<=n;i++)   {     printf("%d ",a);     c=a+b;     a=b;     b=c;   }   getch(); }

program that compresses windows BMP image file using java

First of all you need bmp image file format this file in your java file folder . Image file name is input and after the run compress.java  then automatically generate.bmp Then you check file size is very small compare to input size file. This is java code for compresses windows BMP image file.   import java.awt.image.BufferedImage;   import java.io.*;   import java.util.Iterator;   import javax.imageio.*;   import javax.imageio.stream.*;   public class compress {   public static void main(String[] args) throws IOException {     File input = new File("input.bmp");     BufferedImage image = ImageIO.read(input);     File compressedImageFile = new File("generate.bmp");     OutputStream os = new FileOutputStream(compressedImageFile);     Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName("jpg");     ImageWriter writer = (ImageWriter) writers.next();     ImageOutputStream ios = ImageIO.createImageOutputStream(os);     writer.setO

Data insertrd in database using php

Image
Here there are two files one for creating form in html and second for connecting with database in php. 1.This file is form in html create save this file as index.php <?php ?> <html> <head> <title></title> </head> <body> <form action="insert.php<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post"> <table align="center" style="margin-top: 80px"> <tr><!-- prepared by vishal Rathod -->  <td>Name :</td>   <td>    <input type="text" name="name" required="required">   </td> </tr> <tr>  <td>Email :</td>   <td>    <input type="text" name="email" required="required" >   </td> </tr> <tr>  <td colspan="2" align="center"><input type="submit" name="submit" value="

table in html code

Image
<html> <head> <title>my table</title> <head> <body> <center> <br> <table border="2" cellspacing="1" width="400" height="200" bgcolor="#00FF00">  <tr>   <th rowspan="3" ><center>A</center></th>   <th rowspan="2"><center>B</center></th>   <th><center>C</center></th>   <th><center>D</center></th>  </tr>  <tr>   <td colspan="2"><center>1</center></td>  </tr>  <tr>   <td colspan="3"><center>2</center></td>  </tr> <!-- prepared by vishal Rathod -->  <tr>   <td colspan="2"><center>3</center></td>   <td colspan="2"><center>4</center></td>  </tr>  <td colspan=&q

table in html code

Image
<html> <head> <title>my table</title> <head> <body> <center> <table border="2" cellspacing="1" width="400">  <tr>   <th rowspan="2">id</th>   <th colspan="4">Marks</th>  </tr>  <tr>   <td><center>Maths</center></td>   <td><center>Science</center></td>   <td><center>Biology</center></td>   <td><center>Chemistry</center></td>  </tr>  <tr>   <td><center>1</center></td>   <td><center>89</center></td>   <td><center>82</center></td>   <td><center>81</center></td>   <td><center>78</center></td>  </tr>  <tr>   <td><center>2</center></td>   <td><center>79</center></td>  

Table in HTML

Image
<html> <head> <title>my table</title> <head> <body> <center> <table border="1" cellspacing="0" width="500">  <tr>   <th colspan="6"><font size="80">Time table</font></th>  </tr>  <tr>   <th rowspan="6">hours</th>   <th>mon</th>   <th>tue</th>   <th>wed</th>   <th>thu</th>   <th>fri</th>  </tr>  <tr>   <td>Science</td>   <td>maths</td>   <td>Science</td>   <td>maths</td>   <td>arts</td>  </tr><!-- prepared by vishal Rathod -->  <tr>   <td>Social</td>   <td>History</td>   <td>English</td>   <td>Social</td>   <td>Sports</td>  </tr>  <tr><th colspan="5">Lunch<