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
Sum of series 1^2 + 3^2 + 5^2 + . . . + (2*n – 1)^2
A series is a sequence of numbers that follow a specific mathematical pattern. The series 1² + 3² + 5² + ... + (2*n-1)² represents the sum of squares of the first n odd numbers. This series has a special property − it follows the formula: Sum = n²(2n² - 1)/3. However, we can also calculate it using loops by adding each term individually. Syntax Sum = n²(2n² - 1)/3 // Or using loop: sum += (2*i - 1) * (2*i - 1) Method 1: Using Loop This approach calculates the sum by iterating through each odd number and adding its square − #include int main() { int i, n, sum = 0; n = 7; for (i = 1; i
Read MoreFade In Right Animation Effect with CSS
The CSS Fade In Right animation effect creates a smooth transition where an element starts invisible and positioned to the right, then gradually fades in while moving to its final position. This effect is commonly used for creating engaging entrance animations. Syntax @keyframes fadeInRight { 0% { opacity: 0; transform: translateX(distance); } 100% { opacity: 1; ...
Read MoreC Program for Selection Sort?
The selection sort is a simple sorting algorithm that works by finding the smallest element from the unsorted portion of the array and placing it at the beginning. This process is repeated until the entire array is sorted. Syntax void selectionSort(int arr[], int n) { for (int i = 0; i < n-1; i++) { int minIndex = i; for (int j = i+1; j < n; j++) { ...
Read MoreFade In Right Big Animation Effect with CSS
The CSS Fade In Right Big animation effect creates a dramatic entrance where elements start completely transparent and positioned far off-screen to the right, then smoothly animate to full opacity while sliding into their final position. Syntax @keyframes fadeInRightBig { 0% { opacity: 0; transform: translateX(2000px); } 100% { opacity: 1; transform: translateX(0); ...
Read MoreC/C++ Program to Count number of binary strings without consecutive 1’s?
In this article, we will learn how to count all distinct binary strings of length n such that no two 1's appear consecutively. We'll explore this problem using both recursive and dynamic programming approaches in C. What is a Binary String? A binary string is a sequence of characters that contains only '0' and '1'. It represents information in base-2 format. For example, "0101" is a binary string of length 4. We are given a positive integer n, and our task is to count all possible distinct binary strings of length n that do not contain consecutive ...
Read MoreSet Mask Effect with CSS
The CSS mask effect is used to selectively hide parts of an element or apply visual effects by overlaying a mask layer. Modern CSS provides the mask property to create sophisticated masking effects using images, gradients, or shapes. Syntax selector { mask: mask-image mask-mode mask-repeat mask-position / mask-size; } Common Mask Properties PropertyDescription mask-imageSpecifies the image to use as a mask mask-modeSets how the mask layer image is interpreted (alpha, luminance, match-source) mask-repeatControls how the mask image is repeated mask-positionSets the position of the mask layer mask-sizeSpecifies the size ...
Read MoreC/C++ Program for the Odd-Even Sort (Brick Sort)?
The odd-even sort, also known as brick sort, is a comparison-based sorting algorithm that divides the sorting process into two alternating phases: odd phase and even phase. This technique is similar to bubble sort but operates on different index pairs in each phase, making it suitable for parallel processing. The odd phase compares and swaps elements at odd indices (1, 3, 5...) with their adjacent elements, while the even phase works on even indices (0, 2, 4...) with their adjacent elements. Syntax void oddEvenSort(int arr[], int n); How It Works The algorithm alternates ...
Read MoreAchieve Glow Effect with CSS Filters
The CSS glow effect is a visual technique used to create a luminous halo around elements. This effect makes objects appear to emit light and can be achieved using the drop-shadow filter or box-shadow properties. Syntax /* Using drop-shadow filter */ selector { filter: drop-shadow(0 0 blur-radius color); } /* Using box-shadow */ selector { box-shadow: 0 0 blur-radius color; } Parameters ParameterDescription blur-radiusThe amount of blur for the glow effect (in px) colorThe color of the glow (hex, rgb, or named colors) spread-radiusOptional: ...
Read MoreC/C++ Program for Number of solutions to Modular Equations?
We have a given number of coins and we need to arrange them to form a pyramid of maximum height. The coins are arranged such that the first row contains 1 coin, the second row contains 2 coins, the third row contains 3 coins, and so on. 1 2 3 4 5 ...
Read MoreShadow Filter with CSS
The CSS shadow filter is used to create drop shadows for elements. This filter applies an attenuated shadow in the specified direction and color, giving a 3D appearance to text and images. Syntax selector { filter: drop-shadow(offset-x offset-y blur-radius color); } Parameters Parameter Description offset-x Horizontal offset of the shadow (positive = right, negative = left) offset-y Vertical offset of the shadow (positive = down, negative = up) blur-radius The blur effect applied to the shadow (optional, default is 0) ...
Read More