Introduction To jQuery



Q) What is jQuery ?
A) jQuery is the highly optimized JavaScript library designed to simply the client side scripting of HTML .

                                                                  OR

                        In short , jQuery is write  less do more javaScript library .

Note:- jQuery makes it easier and shorter to write JavaScript code. But jQuery does not replace JavaScript by an own language .



 Q) Who Created jQuery ?
A) John Resig is known for Creating jQuery and he is the lead developer of the jQuery JavaScript library .



Q) When jQuery first released ?
A) jQuery was released in January 2006 at BarCamp NYC by John Resig.



Q) How big is jQuery Library ?
A) jQuery is a small 24k (minified) JavaScript library .


Q) Browser Support ?
A) jQuery is compatible with almost all browser .
  • Internet Explore
  • Firefox
  • Chrome
  • Opera
  • Safari


Q) To Begin with jQuery what you should know ?
A) As a jQuery Beginner you should have a basic Knowledge of
  1.   HTML
  2.   CSS
  3.   JavaScript

Read More »

Top Hidden Tricks and Features of google Search

Google is one of the Top Seach Engine in the world , with millions of page views in a day , apart from search engine google provides other kind of services like gmail, google plus ,maps ,books and many more which are commonly know and used by many of us but there are some services which are not know but us ,Here in this post i am listing some of hidden tricks and features of google search 

Lets See Each One Of Them


1 Google Gravity

To see the effect of gravity on google then just type "Google Gravity " in search box and click on first link




2 Google Sphere

To see google moving like a globe the just type "Google Sphere" in search box and click on first link




3 Do a barrell roll

To see google search result to rotate 306 degree,then just type "do a barrel roll" in search box






4 Zerg rush

To see the google search result to chew up then just type  "zerg rush" in search box





5 Google Logo

To see your own name or text instead of google then just type "Google Logo" in search box and click on first result you will navigated to goglogo.com and there enter your name or any text in search box and the click "create my search page now" button



6 Google Mirror

To see the mirror version of google just type "elgoog" in search box and click on first link



7 Google Rainbow

To see the google logo in rainbow then just type "Google Rainbow" in search box and click on first result



8 Google Terminal

To see google in terminal version then just type "Google Terminal" in search box and click on first link



9 Google Weenie

To see google in small font version then just type "Weenie Google" in search box and click on first link



10 Google Epic

To see google in big font version then just type "Epic Google" in search box and click on first link




1 1 Atari Breakout

To play atari breakout in browser  just goto google images and then type "atari breakout" in search box and  you can start playing it



Read More »

SQL Check Constraint



The attribute or column in a table with CHECK Constraint can restrict the column value .



            Ex:-Lets see the declaration of CHECK constraint during creation of table .

                 





                          Create table Vehicle(
                               vehicle_id            int Primary key,
                              vehicle_name     varchar(30),
                              mileage int           int NOT NULL CHECK ( mileage>19  AND mileage <101)
                                              );

                     





  In the above defined vehicle table the column mileage is declared with NOT NULL and CHECK constraint .

  The check constraint for mileage columns restricts its value , should be in the range between 20 and 100

  Suppose if you try to insert the value which is outside the range then it database throws error message.



Inserting value:-

 Incorrect :             


Insert into Vehicle values(1,"Honda Activa",110 );




      Error : Inserted value for mileage column is out of range

.

 As you can see in the above insertion operation for Vehicle table, the mileage column is inserted
with value which is outside the range as per defined in CHECK clause, so the database throws the error message .



Correct :

  

 Insert into Vehicle values(1,"Honda Activa",52);


                 



Vehicle

vehicle_id vehicle_name mileage
1 Honda Activa 50
Read More »

SQL Default Constraint


The attribute or column in a which has Default constraint Specifies that when a user explicitly does not insert value for that column a default value which is defined for that gets inserted .


 Lets see the declaration of DEFAULT constraint during creation of table .


               

                      Create table Vehicle(

                        vehicle_id            int Primary key,

                        vehicle_name  varchar(30),

                        mileage int  int NOT NULL DEFAULT 50

                                            ) ;
 

In the above defined vehicle table the column Mileage is declared with constraint two  NOT NULL and Default .

  Q) The reason of using NOT NULL along with Default  constraint ?

  A) It implicitly saying that a default value defined is not null and which has got some value .


Inserting values:-

                           

                               Insert into Vehicle values(1,"Honda Activa" ) ;


                       



 As you can see in the above insertion operation for vehicle table , the mileage column is not inserted

 so a default value which is defined during its declaration gets inserted .


Vehicle

vehicle_id vehicle_name mileage
1 Honda Activa 50









Read More »

SQL NOT NULL Constraint


The attribute or column in a table which has NOT NULL constriant Specifies that
Null value is not permitted for that attribute .


 Ex :- Lets see the declaration of NOT NULL constraint during creation of table




                           Create table Member(
                                            member_id            int  Primary Key ,
                                                       name       varchar(30) NOT NULL ,
                                                     country   varchar(30)
                                                   ) ;   



             



In the above defined Member table the column name is declared with constraint NOT NULL .

 Inserting values :-

Incorrect : 



Insert into Member(1," "," india ");


                   

             Error:-Null value is not permitted
As you can see in the above insertion operation for Member table, the name column is not inserted
with value so the database throws the error message .



 Correct : 



Insert into Member(1,"Pavan","india");


                     

Member

member_id name country
1 pavan deshpande india bharat
Read More »

SQL Primary key,Foreign Key ,Unique

Primary Key :-

  • Primary Key is very important and special key or contraint that a single attribute or column in a  table  possess .
  • Primary key value is used to identify individual record or tuple in a table .
  • Primary key value cannot be NULL 


Lets see the declaration of primary key during the creation of table   

     Create table Person (

                                       Pid          int  primary key,

                                       Name      varchar(30)

                                 );

 

 

Foreign Key :-

  •  Foreign key is another very important key or constraint that an attribute or columns in a table posses .
  •  Foreign key is also stated as reference key .
  •  Foreign key value in one table that refers to another record in other table.


Lets see the declaration of foreign key during the creation of table

 

           create table user (

                               user_id         int primary key,

                               username      varchar(30)

                            );





           create table vehicle (

                                 vehicle_id            int primary key,

                                 vehicle_name       varchar(30)

                               );


 

 

Unique :-

  •   The Unique key or constraint is an alternative secondary key .
  •   The attribute or column in a table with unique key specifies the value of that column should be unique.


Lets see the declaration of Unique key during the creation of table   

    

              create table user (

                               user_id         int primary key,

                               username      varchar(30) unique

                         );
    Read More »

    SQL Insert Command

    The SQL insert command is used to add or insert a single tuple or record into the table


    There are 2 forms of insert command :-

    •   Insert values into all columns .
    •   Insert values into specific columns  .

    Insert values into all columns

                                            The first form of insert statement allows to insert values into all columns of the table ,The values should be listed in the same order in which the corresponding columns were specifed in the create table command .


    Syntax:-


           

             Insert into <table-name> values(val_1,  val_2, val_3 , ................, val_n );



    Example:-                  


                              

                                Create table Person(

                                   Pid           int primary key ,

                                   Name      varchar(30),

                                   country    varchar(30) 

                                 );


                      

                              Insert into Person values( 1, "Pavan", "India" );

             


    Insert values into specific columns

                                          The second form of insert command allows to specify column names that corresponding to the values  provided insert command .

                                   
          Syntax :-

                               

        Insert into <table-name> (col_1,col_2,col_3,..........,col_n)

                                          values(val_1,val_2,val_3..........,val_n) ;

          


    Example :-


                    Consider a table which is defined in above example

                     lets insert values in specific columns.

                                               Insert into Person ( Pid , Name)

                                                                   values ( 1, "Pavan" );
    Read More »