Translate
Wednesday, 3 December 2014
Difference between Javascript and JQuery
Javascript:
1. javascript is a language
2. you need to write you own scripting which may take time
3. hard to consuming services
4. EX: document.getelementBYid('txtID').value
jQuery:
1. Jquery is a framework (Build in library)
2. you need not to write much scripting which already exists in JQuery (user friendly)
3. Easy to consuming services
4. EX: $("#txtID").val
1. javascript is a language
2. you need to write you own scripting which may take time
3. hard to consuming services
4. EX: document.getelementBYid('txtID').value
jQuery:
1. Jquery is a framework (Build in library)
2. you need not to write much scripting which already exists in JQuery (user friendly)
3. Easy to consuming services
4. EX: $("#txtID").val
Difference between HTTP and HTTPS
Hypertext Transfer Protocol (HTTP) is a protocol for transmitting and receiving information across the Internet.
Https=Http + SSL
1. URL begins with “http://" in case of HTTP while the URL begins with “https://” in case of HTTPS.
2. HTTP is unsecured while HTTPS is secured.
3. HTTP uses port 80 for communication while HTTPS uses port 443 for communication.
4. HTTP operates at Application Layer while HTTPS operates at Transport Layer.
5. No encryption is there in HTTP while HTTPS uses encryption.
6. No certificates required in HTTP while certificates required in HTTPS.
SSL:
1. Authenticate the server to the client.
2. Allow the client and server to select the cryptographic algorithms, or ciphers, that they both support.
3. Optionally authenticate the client to the server.
4. Use public-key encryption techniques to generate shared secrets.
5. Establish an encrypted SSL connection.
6. Once the SSL connection is established the usual transfer of HTTP requests will continue.
Where should https be used?
HTTPS should be used in Banking Websites, Payment Gateway, Shopping Websites, Login Pages, Emails (Gmail offers HTTPS by default in Chrome browser) and Corporate Sector Websites.
Https=Http + SSL
1. URL begins with “http://" in case of HTTP while the URL begins with “https://” in case of HTTPS.
2. HTTP is unsecured while HTTPS is secured.
3. HTTP uses port 80 for communication while HTTPS uses port 443 for communication.
4. HTTP operates at Application Layer while HTTPS operates at Transport Layer.
5. No encryption is there in HTTP while HTTPS uses encryption.
6. No certificates required in HTTP while certificates required in HTTPS.
SSL:
1. Authenticate the server to the client.
2. Allow the client and server to select the cryptographic algorithms, or ciphers, that they both support.
3. Optionally authenticate the client to the server.
4. Use public-key encryption techniques to generate shared secrets.
5. Establish an encrypted SSL connection.
6. Once the SSL connection is established the usual transfer of HTTP requests will continue.
Where should https be used?
HTTPS should be used in Banking Websites, Payment Gateway, Shopping Websites, Login Pages, Emails (Gmail offers HTTPS by default in Chrome browser) and Corporate Sector Websites.
Tuesday, 2 December 2014
List all employee's names and their managers by manager name using an inner join
select distinct e.Ename as Employee, m.ManagerID as reports_to, m.Ename as Manager
from EMPLOYEES e
inner join Employees m on e.ManagerID
= m.EmpID;
EXCEPT vs NOT IN and INTERSECT vs IN in SQL SERVER:
"EXCEPT
" operator was introduced in SQL SERVER 2005. This operator used to achieve Distinct
and Not In
queries. EXCEPT
operator returns all distinct rows from left hand side table which does not exist in right hand side table.
On the other hand, "NOT IN
" will return all rows from left hand side table which are not present in right hand side table but it will not remove duplicate rows from the result.
create table #tblsample (ProductId tinyint)
create table #tblsample2 (ProductId tinyint)
--insert values to tbl 1
insert into #tblsample values (1)
insert into #tblsample values (2)
insert into #tblsample values (3)
insert into #tblsample values (4)
--insert values to tbl 2
insert into #tblsample2 values (1)
--SELECT
select * from #tblsample
select * from #tblsample2
--USE EXCEPT
select * from #tblsample
except
--intersect
select * from #tblsample2
--USE NOT IN
select * from #tblsample
where productid NOT IN(
select * from #tblsample2)
-------------------------------------------
-- INSERT DUBLICATE VALUE
insert into #tblsample values (1)
insert into #tblsample values (2)
--SELECT
select * from #tblsample
--USE EXCEPT
PRINT 'EXCEPT RETURNS DISTINCT VALUES'
select * from #tblsample
except
--intersect
select * from #tblsample2
--USE NOT IN
PRINT 'NOT IN RETURNS DUPLICATE VALUES IF ANY'
select * from #tblsample where productid NOT IN(select * from #tblsample2)
--USE DISTINCT + NOT IN = EXCEPT
select * from #tblsample
except
select productid from #tblsample2
Subscribe to:
Posts (Atom)