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
How to create fading effect with CSS
To create a fading effect with CSS, you can use various techniques including CSS gradients, opacity transitions, and animations. The most common approach is using linear gradients with rgba colors to achieve smooth fading transitions. Syntax selector { background: linear-gradient(direction, color-stop1, color-stop2); /* OR */ opacity: value; transition: opacity duration; } Method 1: Using Linear Gradient The following example creates a horizontal fading effect using a linear gradient from transparent to opaque − ...
Read MoreMatrix Multiplication and Normalization in C program
In C programming, matrix multiplication and normalization are fundamental operations in linear algebra. Matrix multiplication follows specific rules where the number of columns in the first matrix must equal the number of rows in the second matrix. Matrix normalization scales each row so that its Euclidean norm equals 1. Syntax // Matrix Multiplication for (i = 0; i < rows1; i++) { for (j = 0; j < cols2; j++) { for (k = 0; k < cols1; k++) { ...
Read MoreAdd a background color to the form input with CSS
The CSS background-color property is used to add background color to form input elements. This property allows you to customize the appearance of input fields by setting their background to any color value. Syntax input { background-color: value; } Possible Values ValueDescription color namePredefined color names like red, blue, gray hex codeHexadecimal values like #FF5733, #000000 RGBRGB values like rgb(255, 87, 51) transparentMakes the background transparent Example The following example applies a gray background color to text input fields − ...
Read MoreStyle select options with CSS
The CSS select element can be styled to enhance its appearance and user experience. You can modify properties like width, padding, borders, background colors, and more to customize the dropdown menu. Syntax select { property: value; } Example: Styling Select Element The following example demonstrates how to style a select dropdown with custom padding, borders, and background color − select { width: 100%; padding: ...
Read MoreC Program for Naive algorithm for Pattern Searching
Pattern matching in C is the process of finding if a string (pattern) is present within another string (text). For example, the string "algorithm" is present within the string "naive algorithm". If found, its location (starting position) is displayed. The Naive algorithm is a simple brute-force approach that checks every possible position in the text. Syntax void naivePatternSearch(char text[], char pattern[]); Algorithm The Naive Pattern Searching algorithm works as follows − naive_algorithm(pattern, text) Input − The text and the pattern Output − locations where the pattern is present in the text ...
Read MoreSet Bordered Form Inputs with CSS
The CSS border property is used to add borders to form input elements. You can customize the border width, style, and color to create visually appealing forms. Syntax input { border: width style color; } Possible Values PropertyValuesDescription border-widthpx, em, thin, medium, thickSets the border thickness border-stylesolid, dashed, dotted, inset, outsetDefines the border appearance border-colorcolor names, hex, rgbSpecifies the border color Example: Inset Border for Text Inputs The following example creates bordered text inputs with an inset style − ...
Read MoreC Program for Minimum number of jumps to reach the end
The minimum jumps problem involves finding the minimum number of jumps needed to reach the last index of an array from the first index. Each element in the array represents the maximum number of steps that can be taken forward from that position. Syntax int minJumps(int arr[], int n); Algorithm The naive approach starts from the first element and recursively calculates the minimum jumps needed − minJumps(start, end) = Min(minJumps(k, end)) for all k accessible from start We use dynamic programming with bottom-up approach. For each position, we check all ...
Read MoreStyle Input Fields of a form with CSS
CSS provides powerful styling capabilities for form input fields, allowing you to customize their appearance, layout, and user interaction states. You can control properties like width, padding, borders, colors, and focus effects to create attractive and user-friendly forms. Syntax input[type="text"] { property: value; } input { property: value; } Example: Basic Input Field Styling The following example demonstrates how to style input fields with width, padding, and borders − input[type="text"] { ...
Read MoreC Program for Minimum Cost Path
The minimum cost path problem involves finding the path from the top-left corner to the bottom-right corner of a 2D matrix with minimum total cost. You can only move right or down from any given cell. Dynamic programming provides an efficient solution to this problem. Syntax int minCostPath(int cost[][COLS], int m, int n); Problem Approach The solution uses dynamic programming to build a table where each cell contains the minimum cost to reach that position from the starting point (0, 0). The formula for any cell (i, j) is − dp[i][j] = ...
Read MoreAdd space inside a form's text field with CSS
To add space inside a form's text field, use the CSS padding property. This creates internal spacing between the text and the field's border, making the input more visually appealing and easier to read. Syntax input[type="text"] { padding: value; } Example: Adding Space Inside Text Fields The following example demonstrates how to add internal spacing to text input fields − input[type="text"] { width: 100%; ...
Read More