Posts

Showing posts from 2014

SQL: ALTER TABLE STATEMENT

This SQL tutorial explains how to use the SQL  ALTER TABLE statement  to add a column, modify a column, drop a column, rename a column or rename a table (with lots of clear, concise examples). We've also added some practice exercises that you can try for yourself. DESCRIPTION The SQL  ALTER TABLE statement  is used to add, modify, or drop/delete columns in a table. The SQL ALTER TABLE statement is also used to rename a table. ADD COLUMN IN TABLE Syntax To add a column in a table, the SQL ALTER TABLE syntax is: ALTER TABLE table_name ADD column_name column-definition; Example Let's look at a SQL ALTER TABLE example that adds a column. For example: ALTER TABLE supplier ADD supplier_name varchar2(50); This SQL ALTER TABLE example will add a column called  supplier_name  to the  supplier  table. ADD MULTIPLE COLUMNS IN TABLE Syntax To add multiple columns to an existing table, the SQL ALTER TABLE syntax is: ALTER TABLE table_name ADD (column_1 c...

SQL CREATE TABLE Statement

The SQL CREATE TABLE Statement The CREATE TABLE statement is used to create a table in a database. Tables are organized into rows and columns; and each table must have a name. SQL CREATE TABLE Syntax CREATE TABLE  table_name ( column_name1 data_type ( size ), column_name2 data_type ( size ), column_name3 data_type ( size ), .... ); The column_name parameters specify the names of the columns of the table. The data_type parameter specifies what type of data the column can hold (e.g. varchar, integer, decimal, date, etc.). The size parameter specifies the maximum length of the column of the table. Example CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) );

Applications of a Queue in Daily life

Image
Definition of Queue A Queue is "an abstract data type in which elements are added to the rear and removed from the front; a 'first in, first out' (FIFO) structure."  ( C++ Plus Data Structures , page 226) The main difference between a queue and a stack is that elements in a queue are put on the bottom and taken off the top (remember, in a stack, elements put on the top and taken off the top). For an everyday queue example, consider a line of customers at a bank waiting to be served. Each new customer gets in line at the rear. When the teller is ready to help a new customer, the customer at the front of the line is served. This is a queue--the first customer in line is the first one served. 1.1 Applications of a Queue In general, queues are often used as "waiting lines". Here are a few examples of where queues would be used: In operating systems, for controlling access to shared system resources such as printers, files, communication lines, disks and tapes.A ...

Course E-Books Semester Wise

E-Books:     1st Semester    2nd Semester      3rd Semester

PHP simple login script

Image
Hi dear friends, we have discussed about d eleting a file using PHP script  in our previous tutorial. In this tutorial I am going to explain you about login script using PHP. Login is used in applications where a user needs to be authenticated to access an application. This tutorial will give you the basic login form. I have used  MySql  to  connect to the database  where the login details are stored. I have three PHP files where the first file contains the login form, the second contains the process for login form and the third file is the one where you will be redirected after login is successful. Now let us see these files and let me explain them in detail. Please follow these carefully. login.php As I said there are three files. Login.php is the first file that contains login form. Let us see the code for it. login.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmln...

How to connect MySQL Database using PHP

 We have seen how to  fetch youtube videos using simple javascript  in our previous tutorial. Today's tutorial is about connecting our database using PHP. Since PHP is a dynamic scripting language and it uses mysql database in the back end to store the data. That means the php file has to be configured to connect the database. This can be done very easily with a simple php code. This tutorial will help you to connect to the database. The database connection needs four parameters to be passed into two functions.  mysql_connect () and  mysql_select_db () are the two functions to connect to the database. mysql_connect () function requires three parameters and this function is used to connect to the database. and  mysql_select_db () function is used to select the database. Here is the simple code that you can simply copy and use to connect your database with php. <?php $dbhost                 ...

How to use facebook on slow internet connections

Facebook has became a part of every monetize today. We see most of the people are now using Facebook. Every person who have the basic knowledge of computer is on Facebook today. Facebook uses php code and has ajax code for it's different features. So it takes large amount of time to load. Facebook users who have slow internet connections have to wait for longer times to load the page. So here is a simple trick that can give you a best option to use Facebook even on slow connections. Basically Facebook is faster on mobiles because mobile version is easier to load than the desktop version. Facebook is designed for mobiles, touch phones and PC in three different ways and there are also mobile applications to be used on phones. You can also  use Facebook even without any internet connection . Let us discuss about the trick now. I have discussed that mobile version is easier to load, so in this trick we...

Must Select > Copy > Paste > Compile >Run and Enjoy :) ☺

Image
Must Select > Copy > Paste > Compile >Run and Enjoy :) ☺  #include<iostream.h> #include<conio.h> #include<dos.h> void main() {int i; for(i=10;i<51;i++) {clrscr();gotoxy(20,5); textcolor(i); cout<<"|| P R O G R A M M I N G      S E E K E R Z  ||"; gotoxy(30,30);cout<<"pcphunt.blogspot.com"; gotoxy(i,15); cout<<"\2"; gotoxy(i,16); cout<<"()"; gotoxy(i,17); cout<<"_/|_ "; delay(190); clrscr(); gotoxy(20,5); cout<<"||  P R O G R A M M I N G    S E E K E R Z  ||"; gotoxy(30,30); cout<<"pcphunt.blogspot.com"; gotoxy(i,15); cout<<" \1"; gotoxy(i,16); cout<<" ))"; gotoxy(i,17); cout<<"_|\\_ "; delay(190); }gotoxy(35,16); cout<<"Let's ROcK!!"; gotoxy(30,25); cout<<"Keep Coding ..Be Seekerz \2 :)\n\n\t\t\t`~~ Hafiz Usman ~~"; getch(); }

How to add Automated Recent Post Slider in Blogger

Image
Today , Million of million Blogger launches the Blog in world wide.So , there have big competition to impress your readers and reduce the bounce rate using many effective widget in the template. This widget is very helpful to reduce the bounce rate and Make more traffic.  Automated recent post slider widget is for Blogger Blog which will display the recent post of your Blog . This widget update the recent post automatically and don't need to add the Title , image and description after every publish of post in Your Blog.So , just set up the widget only . Demo View  Integrate Font Awesome Twitter Bootstrap Icons in WordPress Font Awesome is a scalable image icons set on Twitter Bo… < 12345 > Set up automated recent post widget in Blogger: To add the widget , Go to Blogger Dashboard  - > click on  Layout   - >  click on add a Gadget   ->  click on  HTML/Jvascript   <link rel = "stylesheet" type = "text/css" href = "http...

Top 10 keyboard Shortcuts

Image
Using keyboard shortcuts can greatly increase your productivity, reduce repetitive strain, and help keep you focused. For example, highlighting text with the keyboard and pressing Ctrl + C is much faster than taking your hand from the keyboard, highlighting the text using the mouse, clicking copy from the file menu, and then putting your hand back in place on the keyboard. Below are our top 10 keyboard shortcuts we recommend everyone memorize and use. Ctrl + C or Ctrl + Insert Both  Ctrl + C  and  Ctrl + Insert  will copy the highlighted text or selected item. If you want to cut instead of copy press  Ctrl + X . Ctrl + V or Shift + Insert Both the  Ctrl + V  and  Shift + Insert  will paste the text or object that's in the clipboard. Ctrl + Z and Ctrl + Y Undo any change. For example, if you cut text, pressing this will undo it. This can also often be pressed multiple times to undo multipl...