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
Array Manipulation and Sum using C/C++
In this problem, you are given an integer array arr of size n and an integer S. Your task is to find an element k in the array such that if all the elements greater than k in the array are replaced with k, then the sum of all the elements of the resultant array becomes equal to S. If such an element exists, print it; otherwise, print -1. Syntax int getElement(int arr[], int n, int S); Algorithm To solve this problem efficiently, we follow these steps − Sort the array in ...
Read MoreCSS stress property
The CSS stress property is part of CSS Speech Module and controls the stress level in speech synthesis. It specifies the height of "local peaks" in the intonation contour of a voice, affecting how emphasized certain words or syllables sound when content is read aloud by screen readers or speech synthesis engines. Syntax selector { stress: value; } Possible Values ValueDescription numberA value between 0 and 100. Higher values create more stress/emphasis in speech inheritInherits the stress value from parent element Example: Different Stress Levels The ...
Read MoreCreate an attenuated shadow with CSS
CSS shadows can be created using the box-shadow and text-shadow properties to add depth and visual appeal to elements. These properties allow you to create attenuated (softened) shadows with customizable direction, color, and blur effects. Syntax /* Box shadow syntax */ box-shadow: h-offset v-offset blur spread color; /* Text shadow syntax */ text-shadow: h-offset v-offset blur color; Parameters ParameterDescription h-offsetHorizontal offset of the shadow (positive = right, negative = left) v-offsetVertical offset of the shadow (positive = down, negative = up) blurBlur radius - higher values create more attenuated shadows spreadShadow spread ...
Read MoreAddition and Subtraction of Matrix using pthreads in C/C++
Matrix addition and subtraction using pthreads allows us to perform operations on large matrices efficiently by utilizing multiple threads. Each thread handles a portion of the matrix, enabling parallel computation and improved performance. To compile and run pthread programs, you need to link with the pthread library using: gcc -pthread program.c -o program Syntax pthread_create(&thread_id, NULL, function_name, (void*)argument); pthread_join(thread_id, NULL); Example: Matrix Operations with Pthreads This example demonstrates matrix addition and subtraction using multiple threads. Each thread processes one row of the matrices − #include #include #include ...
Read MoreC/C++ Program to Find sum of Series with n-th term as n power of 2 - (n-1) power of 2
Here we will see how to get the sum of the series with n-th term as n2 − (n−1)2. The recurrence relation is like below − Tn = n2 − (n−1)2 So the series is − S = T₁ + T₂ + T₃ + ... + Tₙ S = (1² - 0²) + (2² - 1²) + (3² - 2²) + ... + (n² - (n-1)²) S = 1 + 3 + 5 + ... + (2n-1) = n² We need to find S mod (109 + 7), ...
Read MoreWiggle Animation Effect with CSS
The wiggle animation effect creates small rapid movements that make an element appear to shake or vibrate from side to side. This effect is commonly used to draw attention to buttons, icons, or other interactive elements. Syntax @keyframes wiggle { 0%, 100% { transform: skewX(0deg); } 10% { transform: skewX(-8deg); } 20% { transform: skewX(7deg); } /* ... additional keyframe steps ... */ } .element { animation: wiggle duration timing-function; } Example: Basic Wiggle ...
Read MoreTypes of Polymorphisms - Ad-hoc, Inclusion, Parametric & Coercion
Polymorphism is a fundamental concept in programming that allows entities to take multiple forms. There are four main types of polymorphism − Ad-Hoc Polymorphism (Function Overloading) Inclusion Polymorphism (Subtyping) Parametric Polymorphism (Generics/Templates) Coercion Polymorphism (Type Casting) Note: This article explains polymorphism concepts using C syntax for illustration. Pure C doesn't support object-oriented polymorphism natively, but these concepts can be demonstrated through function pointers and other techniques. Ad-Hoc Polymorphism (Function Overloading) Ad-hoc polymorphism allows multiple functions with the same name to operate on different data types. In C, this is achieved through different ...
Read MoreCSS pause-after property
The CSS pause-after property specifies a pause to be observed after speaking an element's content in speech synthesis. This property is part of CSS Speech Module and is used by screen readers and other speech synthesis applications. Syntax selector { pause-after: value; } Possible Values ValueDescription timeExpresses the pause in absolute time units (seconds and milliseconds) percentageRefers to the inverse of the value of the speech-rate property noneNo pause after the element x-weakVery short pause weakShort pause mediumMedium pause (default) strongLong pause x-strongVery long pause Example: Using ...
Read MoreA Puzzle using C Program
Here we will see one C puzzle question. Suppose we have two numbers 48 and 96. We have to add the first number after the second one. So final result will be like 9648. But we cannot use any logical, arithmetic, string related operations, also cannot use any pre-defined functions. So how can we do that? This is easy. We can do by using Token Pasting operator (##) in C. The Token Pasting operator is a preprocessor operator. It sends commands to compiler to add or concatenate two tokens into one string. We use this operator at the macro ...
Read MoreCSS azimuth Property
The CSS azimuth property is part of the CSS Aural style sheets specification that defines where sound should come from horizontally when content is being read aloud by screen readers or speech synthesizers. Syntax selector { azimuth: value; } Possible Values ValueDescriptionEquivalent Angle anglePosition described in terms of an angle (-360deg to 360deg)Specified angle left-sideSound from left side270deg far-leftSound from far left300deg leftSound from left320deg center-leftSound from center-left340deg centerSound from center (default)0deg center-rightSound from center-right20deg rightSound from right40deg far-rightSound from far right60deg right-sideSound from right side90deg leftwardsMoves sound 20deg ...
Read More