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
Usage of CSS !important rule
The !important rule in CSS provides a way to give maximum priority to a CSS declaration. When applied, it ensures that the property value will override any other conflicting styles, regardless of specificity or source order. Syntax selector { property: value !important; } How CSS Cascade Works Without !important Normally, CSS follows the cascade rule where styles applied later override earlier styles. Here's an example ? p { color: red; ...
Read MoreSuper Prime in c programming
A super-prime number is a prime number that occupies a prime position in the sequence of all prime numbers. For example, if we list all prime numbers as 2, 3, 5, 7, 11, 13, ..., then the super-primes are the primes at positions 2, 3, 5, 7, 11, etc. So 3 (at position 2), 5 (at position 3), and 11 (at position 5) are super-primes. Syntax void superPrimes(int n); bool sieveOfEratosthenes(int n, bool isPrime[]); Example: Finding Super-Primes Less Than 50 This program uses the Sieve of Eratosthenes to find all primes, then identifies super-primes ...
Read MoreFade Out Left Animation Effect with CSS
The fade out left animation effect smoothly moves an element to the left while reducing its opacity to zero, creating a disappearing effect that slides leftward. This animation combines translation and opacity changes for a smooth exit transition. Syntax @keyframes fadeOutLeft { 0% { opacity: 1; transform: translateX(0); } 100% { opacity: 0; ...
Read MoreSums of ASCII values of each word in a sentence in c programming
In C programming, calculating the sum of ASCII values of each word in a sentence involves finding the ASCII value of each character and adding them up word by word. This technique is useful for text processing and string analysis tasks. Syntax int asciiValue = (int)character; // or simply int asciiValue = character; Example Here's how to calculate the sum of ASCII values for each word in a sentence − #include #include void calculateWordSums(char str[]) { int wordSum = 0; int ...
Read MoreWhich element is used to add special style to the first letter of the text in a selector with CSS
The CSS :first-letter pseudo-element is used to apply special styling to the first letter of the first line in a block-level element. This is commonly used to create drop caps or emphasize the beginning of paragraphs. Syntax selector:first-letter { property: value; } Example The following example demonstrates how to style the first letter of paragraphs with different effects − p:first-letter { font-size: 3em; color: ...
Read MoreUsage of CSS :first-line pseudo-element
The CSS :first-line pseudo-element is used to add special styles to the first line of text within a block-level element. This pseudo-element automatically adjusts based on the viewport width and text wrapping. Syntax selector:first-line { property: value; } Example: Basic First-Line Styling The following example demonstrates how to use the :first-line pseudo-element to style the first line of paragraphs − p:first-line { text-decoration: underline; ...
Read MoreSum triangle from an array in C programming
The sum triangle from an array is a triangle that is made by decreasing the number of elements of the array one by one. The new array that is formed contains integers that are the sum of adjacent integers of the existing array. This procedure continues until only one element remains in the array. Let's take an example to explain the concept better − Array = [3, 5, 7, 8, 9] Output [106] [47, 59] [20, 27, 32] [8, 12, 15, 17] [3, 5, 7, 8, 9] Explanation For ...
Read MoreHow to change the color of focused links with CSS
Use the :focus pseudo-class to change the color of focused links. This styling applies when a user clicks on a link or navigates to it using keyboard tabbing. Possible values could be any color name in any valid format. Syntax a:focus { color: value; } Example You can try to run the following code to implement the color of the focused link − a:focus { color: #0000FF; ...
Read MoreC Programming for sum of the series 0.6, 0.06, 0.006, 0.0006, ...to n terms
The given series 0.6, 0.06, 0.006, 0.0006, ... is a geometric progression where each term is obtained by dividing the previous term by 10. To find the sum of this series, we apply the formula for the sum of a geometric progression where the common ratio r < 1 (r = 0.1 in our case). Syntax Sum = a * (1 - r^n) / (1 - r) where a = first term, r = common ratio, n = number of terms Mathematical Formula For the given series − First term (a) = ...
Read MoreCSS outline-width property
The CSS outline-width property is used to set the width of the outline around an element. The outline appears outside the element's border and does not affect the element's dimensions or layout. Syntax selector { outline-width: value; } Possible Values ValueDescription thinSets a thin outline (typically 1px) mediumSets a medium outline (typically 3px) thickSets a thick outline (typically 5px) lengthSets a specific width using px, em, rem, etc. Example The following example demonstrates different outline widths − ...
Read More