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 CSS :only-child Selector
The CSS :only-child selector targets elements that are the only child of their parent element. It styles elements when they have no siblings, making it useful for applying special formatting to isolated elements. Syntax element:only-child { property: value; } Example: Styling Only Child Paragraphs The following example demonstrates how the :only-child selector applies styles only to paragraphs that are the sole child of their parent − p:only-child { background-color: orange; ...
Read MorePrinting all subsets of {1,2,3,...n} without using array or loop in C program
Given a positive integer n, we have to print all the subsets of the set {1, 2, 3, 4, … n} without using any array or loops. For example, if n = 3, we need to print all subsets of {1, 2, 3} which are {1 2 3}, {1 2}, {2 3}, {1 3}, {1}, {2}, {3}, and { }. Since we cannot use loops or arrays, recursion is the only way to solve this problem. We use binary representation to generate subsets efficiently. Syntax void generateSubsets(int n, int currentNum); void printSubset(int bitPosition, int num, int ...
Read MoreRole of CSS :only-of-type Selector
The CSS :only-of-type pseudo-class selector is used to style elements that are the only child of their specific type within their parent container. It targets elements that have no siblings of the same element type. Syntax element:only-of-type { /* CSS properties */ } Example: Basic Usage The following example demonstrates how :only-of-type selects paragraph elements that are the only element within their parent − p:only-of-type { background: orange; ...
Read MoreBash program to check if the Number is a Prime or not
A prime number is a natural number greater than 1 that has exactly two factors: 1 and itself. Examples include 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, etc. In this article, we'll write a C program to check if a given number is prime or not. Syntax for (i = 2; i
Read MoreMethods of 3D transforms with CSS3
CSS 3D transforms allow you to manipulate elements in three-dimensional space using the transform property. These methods enable translation, rotation, and scaling along the x, y, and z axes to create depth and perspective effects. Syntax selector { transform: transform-function(values); transform-style: preserve-3d; /* Optional: preserves 3D space for child elements */ } 3D Transform Methods MethodDescription matrix3d(n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n)Transforms element using 16 values of a 4x4 matrix translate3d(x, y, z)Moves element along ...
Read Morebar() function in C graphics
The bar() function in C graphics is used to draw a filled rectangular bar. It is defined in the graphics.h header file and is commonly used for creating bar charts and filled rectangular shapes in graphics programming. Syntax void bar(int left, int top, int right, int bottom); Parameters left − X-coordinate of the top-left corner top − Y-coordinate of the top-left corner right − X-coordinate of the bottom-right corner bottom − Y-coordinate of the bottom-right corner How It Works ...
Read MoreRole of CSS :nth-of-type(n) Selector
The CSS :nth-of-type(n) selector is used to select and style elements that are the nth child of their specific type within their parent element. This pseudo-class is particularly useful when you want to target specific elements based on their position among siblings of the same tag type. Syntax element:nth-of-type(n) { property: value; } Possible Values ValueDescription numberSelects the element at the specified position (1, 2, 3, etc.) oddSelects all odd-positioned elements of the same type evenSelects all even-positioned elements of the same type an+bSelects elements using a formula (e.g., ...
Read MoreBands in Radio frequency Spectrum in C program
Radio frequency (RF) is the oscillation of an A.C. current or voltage in the frequency range of 20KHz to 300 GHz. In C programming, we can create programs to classify and work with different RF bands. Radio frequency spectrum is divided into bands − frequency ranges used for specific applications. Each band has distinct characteristics, propagation methods, and uses in communication systems. Syntax // Basic structure for RF band classification if (frequency >= min_freq && frequency = 3000 && freqHz = 30000 && freqHz = 300000 && freqHz = 3000000 && freqHz = 30000000 && freqHz = 300000000 && freqHz = 3000000000 && freqHz = 30000000000 && freqHz
Read MoreX-axis 3D transform with CSS3
The CSS rotateX() function is used to rotate an element around its X-axis in 3D space. This creates a horizontal rotation effect, making the element appear to flip vertically. Syntax selector { transform: rotateX(angle); } The angle value can be specified in degrees (deg) or radians (rad). Example The following example demonstrates X-axis 3D rotation by comparing a normal element with a rotated one − div { width: 200px; ...
Read MoreRole of CSS :nth-child(n) Selector
The CSS :nth-child(n) selector allows you to select and style elements based on their position among siblings within a parent element. This powerful pseudo-class selector enables precise targeting of specific child elements without adding extra classes or IDs. Syntax selector:nth-child(n) { property: value; } Possible Values ValueDescription oddSelects every odd-numbered child evenSelects every even-numbered child nSpecific position number (1, 2, 3, etc.) an+bFormula for complex patterns Example 1: Selecting Specific Position The following example styles the fourth paragraph element with an orange background − ...
Read More