You can extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the ‘expires’ attribute to a date and time.ExampleYou can try to run the following example to set cookies to expire in 30 minutesLive Demo Enter name:
The Advanced Encryption Standard, or AES, is an encryption standard established in 2001 by the National Institute of Standards and Technology (NIST) of USA. It is implemented worldwide both in hardware and software to encrypt sensitive data. AES finds wide usage while transmitting data over computer networks, particularly in wireless networks.Features of AESAES is a subset of Rijndael block cipher.It is a successor of Data Encryption Standard (DES) and is stronger and faster than DES.It is a symmetric key symmetric block cipher.It operates on 128-bit (16 bytes) data.The cipher key may be of 128, 192 or 256 bits.All computations are ... Read More
Wired Equivalent Privacy (WEP) is a security standard for wireless networks or WiFi. It was a part of the original IEEE 802.11 protocol. As wireless networks transmit data over radio waves, eavesdropping on wireless data transmissions is relatively easier than in wired networks connected by cables. WEP aims to provide the same level of security and confidentiality in wireless networks as in wired counterparts.Features of WEPWEP was introduced as a part of IEEE 802.11 standard in 1997.It was available for 802.11a and 802.11b devices.WEP uses encryption of data to make it unrecognizable to eavesdroppers.It uses RC4, a stream cipher, for ... Read More
Wi-Fi Protected Access (WPA) and Wi-Fi Protected Access 2 (WPA2) are security standards to protect network stations connected to WiFi networks. They were developed by WiFi Alliance for delivering sophisticated data encryption technologies and improved user authentication than the pre-existing Wired Equivalent Privacy (WEP).WiFi Protected Access (WPA)Wi-Fi Protected Access (WPA) was supported in IEEE 802.11i wireless networks and was proposed in 2004. It was backward-compatible with the existing WEP that led to its rapid, hassle-free adoption.The encryption method adopted in WPA is the Temporal Key Integrity Protocol (TKIP). TKIP includes per-packet key, integrity check, re-keying mechanism. It dynamically generates an ... Read More
The IEEE 802.11 standard, lays down the architecture and specifications of wireless local area networks (WLANs). WLAN or WiFi uses high frequency radio waves instead of cables for connecting the devices in LAN. Users connected by WLANs can move around within the area of network coverage.The 802.11 MAC sublayer provides an abstraction of the physical layer to the logical link control sublayer and upper layers of the OSI network. It is responsible for encapsulating frames and describing frame formats.MAC Sublayer Frame Structure of IEEE 802.11The main fields of a frame in WLANs as laid down by IEEE 802.11 are as ... Read More
Program DescriptionPrint Square inside a Square as shown belowAlgorithmAccept the number of rows the outer Square to be drawn Display the Outer Square with the number of rows specified by the User. Display another square inside the outer square.Example/* Program to print Square inside Square */ #include int main() { int r, c, rows; clrscr(); printf("Enter the Number of rows to draw Square inside a Square: "); scanf("%d", &rows); printf(""); for (r = 1; r
To concatenate several string, use “Array.join()” method. Here, we will concat the following strings:John Amit SachinExampleYou can try to run the following code to concat several stringsLive Demo var arr = ['Amit', 'John', 'Sachin']; document.write(arr.join(', '));
Program DescriptionPrint the Right and Left arrow PatternsAlgorithmAccept the number of rows to print the Left and Right Arrow Pattern.Print Upper Part of the Arrow with Stars Patterns Print Inverted Right Triangle with Stars Patterns Print Bottom Part of the Arrow with Stars Patterns Print the Right Triangle with Stars PatternsExample/*Program to print the Left and right arrow pattern*/ #include int main() { int r, c, rows; //Left Arrow Pattern int r1, c1, rows1; //Right Arrow Pattern clrscr(); printf("Enter number of rows to print the Left Arrow Pattern: "); scanf("%d", &rows); printf(""); printf("The ... Read More
JavaScript ClosuresIn JavaScript, all functions work like closures. A closure is a function, which uses the scope in which it was declared when invoked. It is not the scope in which it was invoked.Here’s an exampleLive Demo JavaScriptClosures varp = 20; functiona(){ var p = 40; b(function(){ alert(p); ... Read More
Program DescriptionA pyramid is a polyhedron formed by connecting a polygonal base and a point, called the apex. Each base edge and apex form a triangle, called a lateral face. It is a conic solid with polygonal base. A pyramid with an n-sided base has n + 1 vertices, n + 1 faces, and 2n edges. All pyramids are self-dual.AlgorithmAccept the number of rows from the user to form pyramid shape Iterate the loop till the number of rows specified by the user: Display 1 star in the first row Increase the number of stars based on the number of ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP