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
Make any particular color transparent with CSS Filters
The CSS chroma filter is a legacy Internet Explorer filter that was used to make a specific color transparent in an element. This filter allows you to specify a color that should become transparent, effectively creating a "color key" effect similar to green screen technology. Syntax selector { filter: Chroma(Color = #colorvalue); } Parameters ParameterDescription ColorThe hexadecimal color value that you want to make transparent Example: Making White Background Transparent The following example demonstrates how to make white color (#FFFFFF) transparent in an image − ...
Read MoreRole of CSS Filters
CSS filters allow you to apply visual effects like blur, brightness, contrast, and more to HTML elements without using external graphics. The filter property provides a powerful way to manipulate the rendering of images, backgrounds, and even text elements. Syntax selector { filter: filter-function(value); } Common Filter Functions Filter FunctionDescriptionValue Range blur()Applies blur effect0px to any px value brightness()Adjusts brightness0% to any percentage contrast()Adjusts contrast0% to any percentage grayscale()Converts to grayscale0% to 100% hue-rotate()Rotates hue colors0deg to 360deg Example: Basic Image Filters The following example demonstrates ...
Read MoreWrite a function that returns 2 for input 1 and returns 1 for 2 in C programming
A function that returns 2 for input 1 and 1 for input 2 can be implemented using various approaches. This is a common programming exercise that demonstrates different logical and mathematical techniques for value swapping between two specific numbers. Syntax int functionName(int x); Method 1: Using Conditional Statement The simplest approach uses an if-else statement to check the input value and return the corresponding output − #include int reverseif(int x) { if (x == 1) return 2; ...
Read MoreWrite a C program to print " Tutorials Point " without using a semicolon
In C programming, semicolons are statement terminators that mark the end of each statement. However, it's possible to print text without using semicolons by leveraging control structures and the return value of printf(). Syntax int printf(const char *format, ...); The printf() function returns an integer representing the number of characters printed. This return value can be used in conditional expressions within control structures that don't require semicolons. Method 1: Using if Statement The if statement can evaluate the return value of printf() without requiring a semicolon − #include int ...
Read MoreCSS Alpha Channel filter
The CSS Alpha Channel filter is a legacy Internet Explorer filter that alters the opacity of an element, creating transparency effects and gradient blending with the background. While this filter is obsolete in modern web development, it was historically used to create alpha transparency effects. Syntax filter: Alpha(opacity=value, finishopacity=value, style=value, startX=value, startY=value, finishX=value, finishY=value); Parameters Parameter Description Opacity Level of the opacity. 0 is fully transparent, 100 is fully opaque. finishopacity Level of the opacity at the other end of the object. Style The shape of ...
Read MoreWays to paint N paintings such that adjacent paintings don't have same colors in C programming
In this problem, you are given N paintings and we have M colors to paint them with. We need to find the number of ways to paint the paintings such that no two adjacent paintings have the same color. The program's output can have very large values, so we calculate the answer in standard modulo 109 + 7. Syntax long long paintWays(int n, int m); long long power(long long base, long long exp, long long mod); Mathematical Formula The formula to find the number of ways is − Ways = m ...
Read MoreHow to import styles from another style sheet in CSS
The CSS @import rule allows you to import styles from another stylesheet into your current CSS file. This rule must be placed at the very beginning of your stylesheet, before any other CSS rules. Syntax @import "stylesheet-url"; @import url("stylesheet-url"); @import url("stylesheet-url") media-query; Basic Import Example Here's how to import an external CSS file into your stylesheet − @import url("https://fonts.googleapis.com/css2?family=Arial:wght@300;700&display=swap"); body { font-family: Arial, sans-serif; ...
Read MoreSurface Area and Volume of Hexagonal Prism in C programming
The surface area of any figure is the total area that its surface covers. A hexagonal prism is a three-dimensional figure that has a hexagon at both its ends. In mathematics, a hexagonal prism is defined as a three-dimensional figure with 8 faces, 18 edges, and 12 vertices. It consists of two hexagonal bases connected by rectangular faces. a ...
Read MoreIndicate what character set the style sheet written in with CSS
To indicate what character set the style sheet is written in with CSS, use the @charset rule. The @charset rule must be written right at the beginning of the style sheet without even a space before it. The value is held in quotes and should be one of the standard character sets. Syntax @charset "character-set-name"; Example The following example shows how to specify the UTF-8 character set at the beginning of a CSS file − @charset "UTF-8"; ...
Read MoreSuperperfect Number in C programming
A superperfect number is a positive integer that satisfies a specific mathematical condition involving the sum of divisors function. This concept was introduced by D. Suryanarayana in 1969 as a generalization of perfect numbers. Syntax sig(sig(n)) = 2n Where sig(n) is the divisor summatory function that calculates the sum of all positive divisors of n (including 1 and n itself). Example 1: Checking if 16 is Superperfect Let's verify that 16 is a superperfect number by calculating sig(sig(16)) and comparing it with 2×16 − sig(16) = 1 + 2 + 4 ...
Read More