Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Vladislav adgadhadhadhadhadh

CREATE TABLE [Klanten] (
	Klanten_ID integer(5),
	Naam text(40),
	Adres text(40),
	Postcode text(6),
	Woonplaats text(40),
	Land text(40),
	Geboortedatum date(8),
	Rekeningnummer text(20),
	Bonus text(3),
  

)
GO
CREATE TABLE [Reizen] (
	Reis_ID integer(5),
	Bestemming text(40),
	Vervoer text(40),
	Vertrek_datum date(10),
	Reis_duur integer(3),
	Logies text(250),
	Prijs decimal(6),

)
GO
CREATE TABLE [Reisboeking] (
	Boekin_ID integer(5),
	Klant_ID integer(5),
	Reis_ID integer(5),
  


GO

PHP code to design a registration form

php

<? 
    /*************************************************************
     * froshims0.php
     *
     * David J. Malan
     * [email protected]
     *
     * Implements a registration form for Frosh IMs.
     * Submits to register0.php.
     *****************************************************************/
?>

<!DOCTYPE html>

<html>
  <head>
    <title>Frosh IMs</title>
  </head>
  <body>
    <div style="text-align: center">
      <h1>Register for Frosh IMs</h1>
      <br><br>
      <form action="register0.php" method="post">
        <table style="border: 0; margin-left: auto; margin-right: auto; text-align: left">
          <tr>
            <td>Name:</td>
            <td><input name="name" type="text"></td>
          </tr>
          <tr>
            <td>Captain:</td>
            <td><input name="captain" type="checkbox"></td>
          </tr>
          <tr>
            <td>Gender:</td>
            <td>
              <input name="gender" type="radio" value="F"> F  
              <input name="gender" type="radio" value="M"> M
            </td>
          </tr>
          <tr>
            <td>Dorm:</td>
            <td>
              <select name="dorm">
                <option value=""></option>
                <option value="Apley Court">Apley Court</option>
                <option value="Canaday">Canaday</option>
                <option value="Grays">Grays</option>
                <option value="Greenough">Greenough</option>
                <option value="Hollis">Hollis</option>
                <option value="Holworthy">Holworthy</option>
                <option value="Hurlbut">Hurlbut</option>
                <option value="Lionel">Lionel</option>
                <option value="Matthews">Matthews</option>
                <option value="Mower">Mower</option>
                <option value="Pennypacker">Pennypacker</option>
                <option value="Stoughton">Stoughton</option>
                <option value="Straus">Straus</option>
                <option value="Thayer">Thayer</option>
                <option value="Weld">Weld</option>
                <option value="Wigglesworth">Wigglesworth</option>
              </select>
            </td>
          </tr>
        </table>
        <br><br>
        <input type="submit" value="Register!">
      </form>
    </div>
  </body>
</html>

C++ code to demonstrate example of try catch statement (example 1)

cpp

# include <iostream>

using namespace std;

void mightGoWrong()
{
	bool error = true;

	if (error)
	{
		throw "Something went wrong!";
	}
}

int main()
{
	try
	{
		mightGoWrong();
	}
	catch (int e)
	{
		cout << "Error code: " << e << endl;
	}
	catch (char const *e)
	{
		cout << "Error message: " << e << endl;
	}
	
	cout << "Hit [Enter] to exit ...";
	cin.get();

	return 0;
}

Execute MATLAB/Octave Online

x = [1 2 3 4 5 6 7 8 9 10];
y1 = [.16 .08 .04 .02 .013 .007 .004 .002 .001 .0008 ];
y2 = [.16 .07 .03 .01 .008 .003 .0008 .0003 .00007 .00002 ];

semilogy(x,y1,'-bo;y1;',x,y2,'-kx;y2;');
title('Plot title');
xlabel('X Axis');
ylabel('Y Axis');

print -dpng figure.png

Java code to demonstrate example of ternary operator on given age

public class HelloWorld{
    public static void main(String []args){
        int age=20;
        String result=(age==50)?"isOk":"Gooooz";
        System.out.println(result);
    }
}

SQLite example with create table, insert, COUNT(), GROUP BY etc

BEGIN TRANSACTION;

/* Create a table called Customer */



Create table Customer(Cust_id int NOT NULL PRIMARY KEY,
			Cust_name varchar(255) NOT NULL);
			
			
			
/* Create a table called Invoice */


Create table Invoice(Cust_id int NOT NULL,
			Invoice_Number int NOT NULL PRIMARY KEY,
			Invoice_Amount DECIMAL(7,2),FOREIGN KEY(Cust_id) REFERENCES Customer(Cust_id));
			

/* Create few records in this table */


insert into Customer values(1,'Brandon Thompson');
insert into Customer values(2,'Jason Richardson');
insert into Customer values(3,'Nicholas Ed');
insert into Customer values(4,'Ben King');
insert into Customer values(5,'Aqueela Lawson');
insert into Customer values(6,'Jay Taylor');
insert into Customer values(7,'Carson Knight');



insert into Invoice values(6,15001,500);
insert into Invoice values(2,15007,289);
insert into Invoice values(3,15987,1290);
insert into Invoice values(4,15980,120);
insert into Invoice values(5,15098,50);
insert into Invoice values(6,15976,19870);
insert into Invoice values(4,19877,1870);
insert into Invoice values(5,17980,300);
insert into Invoice values(6,19088,346);
insert into Invoice values(2,20090,25);
insert into Invoice values(4,13209,499);
insert into Invoice values(4,12098,89);
COMMIT;

/* Display all the records from the table */
SELECT * FROM Customer;

SELECT * FROM Invoice;



Select Invoice_Number, Invoice_Amount  from Invoice where Invoice_Amount > 500 order by Invoice_Amount desc;

/*
Select  C.Cust_name,Count(Invoice_Number) as Num_Of_Invoices  from Customer C,Invoice I where C.Cust_id= I.Cust_id;


select Count(Invoice_Number) from Invoice group by Cust_id;



Select C.Cust_name,((select Count(Invoice_Number) from Invoice group by Cust_id))as Num_Of_Invoices  from Customer C,Invoice I where C.Cust_id= I.Cust_id; 




select Count(Invoice_Number) from Invoice group by Cust_id

*/

SELECT 
  C.Cust_name,
  COUNT(I.Invoice_Number) AS "TOTAL Invoices"
FROM Customer C INNER JOIN Invoice I  ON C.Cust_id= I.Cust_id
GROUP BY C.Cust_id;


Select  C.Cust_name as Cust from Customer C where C.Cust_id not in (select  I.Cust_id from Invoice I) order by C.Cust_name;
 
 











HTML and CSS example to display rotate rectangles

<!DOCTYPE html>
<html>
<title>Web Page Design</title>
<head>
<style type="text/css">
div
{
   width:100px;
   height:75px;
   background-color:red;
   border:1px solid black;
}
#div2
{
   transform:rotate(30deg);
   -ms-transform:rotate(30deg); /* IE 9 */
   -moz-transform:rotate(30deg); /* Firefox */
   -webkit-transform:rotate(30deg); /* Safari and Chrome */
   -o-transform:rotate(30deg); /* Opera */
   background-color:yellow;
}
</style>
</head>
<body>
<div>Hello, World!</div>
<div id="div2">Hello, CSS3!</div>
<a href="https://tpcg.io/edIGss">Live Demo</a> 
</body>
</html>

Compile and Execute Java8 Online

public class HelloWorld{

     public static void main(String []args){
        System.out.println("Hello World");
     }
}

Java code to demonstrate example of Boolean type and if else statement

public class HelloWorld{

     public static void main(String []args){
         
         boolean t = false;
         
         if(t){
             System.out.println("false");
         }else{
             System.out.println("true");
         }
         
         
     }
}

Bootstrap example to print Hello World (within the heading tag)

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
  </body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.