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
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Role of media attribute on the LINK element
The media attribute on the LINK element specifies the target media or device type for which an external style sheet is intended. This allows you to apply different styles for different output devices like screens, printers, or mobile devices. Syntax Possible Values Media TypeDescription allSuitable for all devices (default) printIntended for printed material screenIntended for computer screens handheldIntended for handheld devices Example: Print-Specific Styles The following example links a CSS file specifically for print media − Media Attribute Example ...
Read MoreC Program for the compound interest?
Compound interest is the interest calculated on both the principal amount and the previously earned interest. Unlike simple interest, compound interest grows exponentially because the interest earned in each period is added to the principal for the next calculation period. Syntax Compound Interest = Principal * pow((1 + Rate/100), Time) - Principal Amount = Principal * pow((1 + Rate/100), Time) Example: Calculate Compound Interest Here's a complete C program to calculate compound interest using the mathematical formula − #include #include int main() { float principal, ...
Read MoreHow to specify the target media within the document language with CSS
CSS media attributes allow you to specify which devices or media types should apply specific styles. This helps create responsive designs that work across different platforms like screens, printers, and handheld devices. Syntax /* In CSS */ @media media-type { /* CSS rules */ } /* In HTML link tag */ Common Media Types Media TypeDescription screenComputer screens, tablets, phones printPrinters and print preview allAll media types (default) speechScreen readers and speech synthesizers Example: Using Media Attribute in HTML The following example shows how ...
Read MoreC/C++ Program for the n-th Fibonacci number?
The Fibonacci sequence is a series where the next term is the sum of the previous two terms. The first two terms of the Fibonacci sequence are 0 followed by 1. In this problem, we will find the nth number in the Fibonacci series. For this we will calculate all the numbers and print the n terms. Syntax // Basic approach using loop for (i = 1; i
Read More10's Complement of a decimal number?
The 10's complement of a decimal number is a mathematical operation used in digital systems to simplify arithmetic operations, particularly subtraction. It is calculated by subtracting the given number from 10n, where n is the total number of digits in the number. The 10's complement can be found in two ways − Method 1: Calculate 9's complement first, then add 1 Method 2: Direct calculation using formula: 10n - number Syntax int tensComplement = pow(10, digitCount) - number; Method 1: Using 9's Complement First find the 9's complement by subtracting ...
Read MoreHow to specify the target media types of a set of CSS rules
The media attribute on CSS elements and @media rules allows you to specify which types of devices or media should apply specific CSS styles. This enables responsive design and device-specific styling. Syntax /* Using @media rule */ @media media-type { /* CSS rules */ } /* Using link element */ Common Media Types Media TypeDescription allSuitable for all devices (default) printIntended for printed documents screenIntended for computer screens speechIntended for speech synthesizers Example: Using Link Element with Media Attribute The following example shows ...
Read MoreAverage of Squares of n Natural Numbers?
Given a number n, we need to find the average of the squares of the first n natural numbers. We calculate the square of each number from 1 to n, sum all these squares, and divide by n to get the average. Syntax average = (1² + 2² + 3² + ... + n²) / n Example Let's calculate the average of squares for the first 3 natural numbers − #include int main() { int n = 3; int sum = 0; /* Calculate sum of squares */ for(int i = 1; i
Read MoreCSS media types
CSS media types allow you to specify how a document should be formatted for different output devices. They enable you to apply different styles for screen displays, printers, handheld devices, and other media types. Syntax @media media-type { /* CSS rules */ } /* Or in link element */ CSS Media Types Media TypeDescription allSuitable for all devices (default) printIntended for printed pages and print preview mode screenIntended primarily for computer screens speechIntended for speech synthesizers (replaces aural) Note: Most media types from CSS2 like ...
Read MoreAdd 1 to the number represented as array (Recursive Approach)?
Given an array which is a collection of non-negative numbers represented as an array of digits, add 1 to the number (increment the number represented by the digits). The digits are stored such that the most significant digit is the first element of the array. To add 1 to the number represented by digits − Start from the rightmost digit (last element of the array) If the last digit is less than 9, simply add 1 to it If the last digit is 9, make it 0 and carry 1 to the next position Continue this process ...
Read MoreCSS pitch property
The CSS pitch property specifies the average pitch (frequency) of the speaking voice in speech synthesis. The average pitch varies based on the voice family − for example, a standard male voice averages around 120Hz, while a female voice averages around 210Hz. Syntax selector { pitch: value; } Possible Values ValueDescription frequencySpecifies the average pitch in hertz (Hz) x-lowExtra low pitch relative to voice family lowLow pitch relative to voice family mediumMedium pitch relative to voice family (default) highHigh pitch relative to voice family x-highExtra high pitch relative to ...
Read More