Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to update column values with date records and set 1 for corresponding records before the current date in SQL
Let’s say the current date is 2019-08-20. Now for our example, we will create a table −mysql> create table DemoTable ( ProductStatus tinyint(1), ProductExpiryDate date ); Query OK, 0 rows affected (1.03 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(0, '2019-06-12'); Query OK, 1 row affected (0.43 sec) mysql> insert into DemoTable values(0, '2019-10-11'); Query OK, 1 row affected (0.38 sec) mysql> insert into DemoTable values(0, '2018-07-24'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable values(0, '2018-09-05'); Query OK, 1 row affected (0.27 sec)Display all records from the table ...
Read MoreC/C++ Function Call Puzzle?
This C/C++ function call puzzle is a puzzle that is intended to explore more about the behaviour of method calling in both the programming languages C and C++/.The output of a method in C and C++ is different. Lets see what is the difference in calling methods in C and C++.Let’s take an example and check the output of the below code in c and c++.Example Live Demovoid method() { // Print statement } int main() { method(); method(2); }OutputFor C++ −Error : too many arguments to function ‘void method()’For C −Program runs without any error.Logic behind the ...
Read MoreHow to use JavaScript to redirect an HTML page?
You might have encountered a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.It is quite simple to do a page redirect using JavaScript on the client side. To redirect your site visitors to a new page, you just need to add a line in your head section as follows.You can try to run the following code to learn how to use JavaScript to redirect an HTML page. Here, we will redirect to the homepageExampleLive Demo ...
Read MoreOrthogonal Frequency Division Multiplexing (OFDM)
In data communications and networking, orthogonal frequency-division multiplexing (OFDM) is a method of digital data modulation, whereby a single stream of data is divided into several separate sub-streams for transmission via multiple channels.OFDM uses the principle of frequency division multiplexing (FDM), where the available bandwidth is divided into a set of sub-streams having separate frequency bands. OFDM was introduced in 1966 by Chang at Bell Labs and was improved by Weinstein and Ebert in 1971.Working Principle of OFDMOFDM is a specialised FDM having the constraint that the sub-streams in which the main signal is divided, are orthogonal to each other. ...
Read MoreComplementary Code Keying (CCK)
Complementary Code Keying (CCK) is a modulation technique deployed in wireless local area networks (WLANs) that follow IEEE 802.11b specification. CCK came into use in 1999 whereby it replaced the Barker code in wireless networks. CCK helps in attaining data rates higher than 2 Mbps, though at the cost of shorter ranges.Features of CCKCCK is used in wireless LANs to attain theoretical maximum data rates of 11 Mbps.CCK is implemented for transmission in the radio frequency range (RF band) of 2.4GHz – 2.4835GHz.CCK includes a pair of codes called chipping sequences which are complementary to each other. In complementary codes, ...
Read MoreWhat is Rate Adaptation?
Rate adaptation is a criteria that determines the performance of IEEE 802.11 wireless networks, or WiFi. Rate adaptation allows transmission to be done at different rates within the wireless network, depending upon the network conditions.In wireless networks, the signal may be strong or weak. Through rate adaptation technique, the data transfer date can be changed depending upon the signal strength, i.e. when the signal is strong, high data rates are adopted, while low data rates are adopted during weak signals.Rate Adaptation AlgorithmsIn traditional rate adaptation algorithms, the lowest permissible data rate was selected for data transfer. Though this ensured that ...
Read MoreThe 802.11 Physical Layer
IEEE 802.11 standard, popularly known as WiFi, lays down the architecture and specifications of wireless LANs (WLANs). WiFi or WLAN 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.IEEE 802.11 ArchitectureThe physical layer architecture of IEEE 802.11 has the following components −Stations (STA) − Stations comprises of all devices and equipment that are connected to the wireless LAN. A station can be of two types −Wireless Access Point (WAP) − WAPs or simply access points (AP) are generally wireless routers that form ...
Read MoreC++ program to Adding elements of an array until every element becomes greater than or equal to k
We have array of unsorted element i.e. arr[] and have an integer K, and we have to find the minimum number of steps needed in which the elements of the array will be added to make all the elements greater than or equal to K. We can add two elements of array and make them one.Example, Input: arr[] = {1 10 12 9 2 3}, K = 6 Output: 2ExplanationFirst we can add (1 + 2), so the new array is 3 10 12 9 3, we can add (3 + 3), So the new array is 6 10 12 ...
Read MoreC program to check if a given string is Keyword or not?
Keyword is a predefined or reserved word which is available in C++ library with a fixed meaning and used to perform an internal operation. C++ Language supports more than 64 keywords.Every Keyword exists in lower case letters like auto, break, case, const, continue, int etc.32 Keywords in C++ Language which is also available in the C language.autodoubleintstructbreakelselongswitchcaseenumregistertypedefcharexternreturnunionconstfloatshortunsignedcontinueforsignedvoiddefaultgotosizeofvolatiledoifstaticwhileThese are 30 reserved words that were not in C, but added to C++asmdynamic_castnamespacereinterpret_castboolexplicitnewstatic_castcatchfalseoperatortemplateclassfriendprivatethisconst_castinlinepublicthrowdeletemutableprotectedtruetrytypeidtypenameusingusingusingwchar_tInput: str=”for” Output: for is a keywordExplanationKeywords are reserved words which cannot be used as variable names in program.There are 32 keywords in the C programming language.Compare the string with each ...
Read MoreSum of the series 1.2.3 + 2.3.+ … + n(n+1)(n+2) in C
Find the sum up to n terms of the series: 1.2.3 + 2.3.4 + … + n(n+1)(n+2). In this 1.2.3 represent the first term and 2.3.4 represent the second term.Let’s see an example to understand the concept better, Input: n = 5 Output: 420Explanation1.2.3 + 2.3.4 + 3.4.5 + 4.5.6 + 5.6.7 = 6 + 24 + 60 + 120 + 210 = 420nth term = n(n+1)(n+2); where n = 1, 2, 3, …= n(n^2+3n+2)=n^3 +3n^2 +2nNow, noteSum =n(n+1)/2 ; if nth term =n=n(n+1)(2n+1)/6 ; if nth term =n^2=n^2(n+1)^2/4 ; if nth term =n^3Hence the required sum =n^2(n+1)^2 /4 + ...
Read More