Basic XML: Starting With Root Tag

Video tutorial explains the basics of XML and some rules to be followed to write the XML elements.
Also illustrating the way the raw XML files are displayed on the modern browsers.

Its a tag based language much like HTML, the difference is we can makeup our own tags.
XML is used to structure and describe the information.

Header Information

1
< ?xml version="1.0" encoding="utf-8"?>

it informs about the xml version and the encoding, i.e., the standard encoding utf-8
This is optional. But still recommended by W3C
And it is automatically generated by many tools, so lets keep it! It doesn’t hurt :-)

Full code

1
2
3
4
5
< ?xml version="1.0" encoding="utf-8"?>
<xml>
  IBM, Oracle, Apple, Maestro, Microsoft ..
  <!-- Google, Yahoo! -->
</xml>

Each XML document must have only 1 root tag.
Multiple root tag gives errors.

Rules To Write Elements(Tags) Names
Can begin with underscore or letter ..followed by zero or more letters, digits, hyphens, periods and underscores.

Video Tutorial: Starting With Root Tag: Basic XML


[youtube https://www.youtube.com/watch?v=6KUzJSEixXI]

YouTube Link: https://www.youtube.com/watch?v=6KUzJSEixXI [Watch the Video In Full Screen.]



Output in the browsers
this is on Chrome

1
2
3
4
5
6
This XML file does not appear to have any style information associated with it. 
The document tree is shown below.
<companynames>
IBM, Oracle, Apple, Maestro, Microsoft ..
<!-- Google, Yahoo! -->
</companynames>

Database & Table Creation: phpMyAdmin

Basic Tutorial to illustrate phpMyAdmin: create database and tables.

This basic tutorial is to introduce you to phpMyAdmin.

In this video tutorial, we are creating a database called micro and a table called soft inside database micro.

Eventhough you use the phpMyAdmin interface to create database and table, it executes queries to handle your UI requests.

Database Creation:

1
CREATE DATABASE micro;

Table Creation:

1
2
3
4
CREATE TABLE  `micro`.`soft` (
`id` INT( 10 ) NOT NULL ,
`powerpoint` VARCHAR( 20 ) NOT NULL
) ENGINE = MYISAM ;

Video Tutorial: Database & Table Creation: phpMyAdmin


[youtube https://www.youtube.com/watch?v=LWqkQNHajzs]

YouTube Link: https://www.youtube.com/watch?v=LWqkQNHajzs [Watch the Video In Full Screen.]



Inside the table, we take 2 fields and enter the needed details.
We have taken id as integer and another field called powerpoint with varchar(20)

Database & Table Creation: MySQL console (commands/Queries)

Basic Tutorial to illustrate mysql console: create database and tables. Desc Tables; show tables; show databases;

Left click, as well as right click on the WAMP/XAMP/MAMP/XAMPP icon in your task bar and see the options.
MySQL console will be present under the MySQL folder.

Usually your local installation of MySQL will have username as root and there will be no password. If you’re trying this on your commercial server, then make sure to use your correct username and password.

Video Tutorial: Database & Table Creation: MySQL console (commands/Queries)


[youtube https://www.youtube.com/watch?v=6nrtU4q7J2Q]

YouTube Link: https://www.youtube.com/watch?v=6nrtU4q7J2Q [Watch the Video In Full Screen.]



Database Creation

1
mysql> CREATE DATABASE software;

CREATE DATABASE are keywords.
software is the name given by us to the new database;

1
mysql> show databases;

This query / command would list all the databases present inside our MySQL installation.

1
mysql> use software;

This query / command tells which database we will be working on from now.

1
mysql> show tables;

This query / command would list all the tables present inside the database we are using or working on.

1
mysql> CREATE table Apple(id int, name varchar(20));

This would create a table by name Apple, which has two fields id and name.
Here id is of integer type: default size 11.
and name is of type varchar which is of size 20 – user allocated and its not default.

1
mysql> desc Apple;

This would show the description or the structure of the table Apple.

Object Oriented Programming: C++

To understand and switch from C to C++, you need to know some of the basic similarities and differences between the two.

Sample C Program:

#include<stdio.h>

void main()
{
  printf("Welcome To C");
}

Here stdio.h header file is included inorder to make use of printf and scanf functions.

Sample Cpp Program:

#include<iostream.h>

void main()
{
  cout<<"Welcome To Cpp";
}

Here iostream.h header file is included inorder to make use of cout and cin objects.

cout is an object of class ostream.
cin is an object of class istream.

Both these ostream and istream classes are present inside iostream.h file.

In both C and C++, execution of the program starts from main() function.

The difference is, printf and scanf are functions; while cout and cin are objects.

<< is called Insertion Operator. To show result on output window.
>> is called Extraction Operator. To get input from the user(keyboard).

Structures In C:

struct Student
{
  char name[20];
  int age;
}s1;

To access members of structure:

s1.name;
s1.age;

Video Tutorial: Basics of C++


[youtube https://www.youtube.com/watch?v=GuZFpc0diJ4&ap=%2526fmt%3D22]

YouTube Link: https://www.youtube.com/watch?v=GuZFpc0diJ4 [Watch the Video In Full Screen.]



Class In Cpp:

#include<iostream.h>
#include<conio.h>

class Student
{
  int a, b, c;

  public:
  void read() { cin>>a>>b>>c; }
  void show() { cout<<"\nEntered Numbers are "<<a<<" , "<<b<<" , "<<c; }
};

int main()
{
  A a;
  clrscr();

  cout<<"\nEnter 3 nums\n";

  a.read();
  a.show();

  getch();
 
}

member functions are accessed with the help of objects.

object.member

This way data binding is done and a level of security is imparted to the data.

Binding of Data and method into a single unit is called ENCAPSULATION.

First Java Program: Basic

This Java tutorial will illustrate the basics of all java programs.

class Welcome

Class is a keyword. Welcome is an identifier or name of the class.
Class Welcome is declaration of class.

class Welcome
{

}

Every class definition in Java begins with an opening brace and ends with a matching closing brace. Note that there is no ending semicolon in Java unlike in C++.

public static void main(String args[])
{
System.out.println("Welcome To Java!");
}

main() is the starting point for the interpreter to begin execution of the program. A java application can have any number of classes but only one of them must include a main method.
void: since main does not return any value;
static: Java is a pure object oriented programming language and hence even main is written inside of a class. main() belongs to the entire class and not a part of any objects of the class, so main is declared as static.
public: methods with public access specification can be accessed even outside the class.

String: is a built-in class, present inside java.lang package.
args[] : is a array variable, used to get the arguments from the user.

System.out.print() or System.out.println() is similar to printf() in C or cout>> in C++.
print() or println() method is a member of the out object, which is a static data member of System class.

Full Java code to print “Welcome to Java!” (Welcome.java)

class Welcome
{
public static void main(String args[])
{
System.out.println("Welcome To Java!");
}
}

Video Tutorial


[youtube https://www.youtube.com/watch?v=lXaFnboq3sk]

YouTube Link: https://www.youtube.com/watch?v=lXaFnboq3sk [Watch the Video In Full Screen.]


[youtube https://www.youtube.com/watch?v=ePG4GE3hmbY]

YouTube Link: https://www.youtube.com/watch?v=ePG4GE3hmbY [Watch the Video In Full Screen.]



Please watch the above video tutorial in full screen.