Articles on Trending Technologies

Technical articles with clear explanations and examples

Set outline style as a groove with CSS

Samual Sam
Samual Sam
Updated on 15-Mar-2026 296 Views

To set the outline style as a groove, use the outline-style property with the value groove. Under groove, the outline looks as though it is carved into the page. Syntax selector { outline-style: groove; } Example The following example demonstrates how to apply a groove outline style to a paragraph − .groove-outline { outline-width: 3px; outline-style: groove; ...

Read More

A shorthand array notation in C for repeated values?

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 245 Views

An array stores multiple values of the same data type. Sometimes you need to initialize several array elements with the same value, such as setting multiple positions to 3, 3, 3, 3. C provides a shorthand notation called designated initializers to simplify this process and reduce code repetition. Syntax [startIndex ... endIndex] value Where startIndex and endIndex define the range of positions to initialize with the specified value. Example: Array Initialization with Repeated Values This example demonstrates how to use the shorthand notation to initialize array elements with repeated values − ...

Read More

Set the width, line style and color properties for an outline in a single statement with CSS

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 257 Views

The CSS outline property is a shorthand property that allows you to set the width, line style, and color of an element's outline in a single statement. The outline appears outside the element's border and does not affect the element's dimensions or layout. Syntax selector { outline: width style color; } Possible Values PropertyValuesDescription widththin, medium, thick, or length (px, em, etc.)Sets the thickness of the outline stylesolid, dashed, dotted, double, groove, ridge, inset, outsetDefines the line style of the outline colorcolor name, hex, rgb, rgba, etc.Sets the color ...

Read More

A modified game of Nim in C ?

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 756 Views

The modified game of Nim is a strategic game played on an array where two players take turns removing elements based on divisibility rules. This game determines the winner based on optimal play and starting advantage. Game Rules In this modified Nim game − Player A removes elements divisible by 3 Player B removes elements divisible by 5 Elements divisible by both 3 and 5 (i.e., divisible by 15) can be removed by either player Player A moves first The last player to make a move wins Syntax // Count moves for ...

Read More

Set the color of the outline with CSS

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 117 Views

The outline-color property allows you to specify the color of the outline. Its value should either be a color name, a hex color, or an RGB value, as with the color and border-color properties. Syntax selector { outline-color: value; } Possible Values ValueDescription color nameSpecifies outline color using color names (red, blue, green, etc.) hex valueSpecifies outline color using hex values (#ff0000, #0000ff, etc.) RGB valueSpecifies outline color using RGB values (rgb(255, 0, 0), etc.) initialSets the property to its default value inheritInherits the property from its parent element ...

Read More

CSS outline property

Samual Sam
Samual Sam
Updated on 15-Mar-2026 170 Views

The outline property is a shorthand property that allows you to specify values for multiple properties such as outline-color, outline-style, and outline-width in a single declaration. Syntax selector { outline: width style color; } Possible Values PropertyValuesDescription outline-widththin, medium, thick, lengthSpecifies the width of the outline outline-stylesolid, dashed, dotted, double, groove, ridge, inset, outsetSpecifies the style of the outline outline-colorcolor name, hex, rgb, rgbaSpecifies the color of the outline Example: Different Outline Styles The following example demonstrates various outline styles and colors − ...

Read More

0-1 Knapsack Problem in C?

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 27K+ Views

The 0-1 Knapsack Problem is a classic dynamic programming problem where we have a knapsack with a fixed capacity and a set of items, each with a weight and value. The goal is to maximize the total value of items in the knapsack without exceeding its weight capacity. In the 0-1 variant, each item can either be included (1) or excluded (0) − no fractional items are allowed. Syntax int knapsack(int capacity, int weights[], int values[], int n); Sample Problem Items: 3 Values: {20, 25, 40} Weights: {25, 20, 30} Knapsack Capacity: ...

Read More

Cursor property of CSS

George John
George John
Updated on 15-Mar-2026 158 Views

The cursor property of CSS allows you to specify the type of cursor that should be displayed to the user when they hover over an element. Syntax selector { cursor: value; } Possible Values ValueDescription autoBrowser determines the cursor to display based on context defaultDefault cursor (usually an arrow) pointerHand cursor (typically for clickable elements) crosshairCrosshair cursor textText selection cursor (I-beam) waitLoading/wait cursor not-allowedCursor indicating something is not allowed Example: Basic Cursor Types The following example demonstrates different cursor types when hovering over elements − ...

Read More

Program to calculate Bitonicity of an Array

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 170 Views

The bitonicity of an array is a measure that indicates how much the array deviates from a monotonic sequence. It starts at 0 and increases by 1 when an element is greater than the previous one, decreases by 1 when smaller, and remains unchanged when equal. Syntax int calculateBitonicity(int arr[], int n); Algorithm The bitonicity calculation follows this logic − Bitonicity = 0 (initially) For i from 1 to n-1: if arr[i] > arr[i-1]: Bitonicity = Bitonicity + 1 if arr[i] < arr[i-1]: Bitonicity ...

Read More

Set outline style as a dotted line with CSS

Samual Sam
Samual Sam
Updated on 15-Mar-2026 265 Views

The CSS outline-style property is used to define the style of an element's outline. When set to dotted, it creates a dotted line around the element's border edge. Syntax selector { outline-style: dotted; } Example The following example demonstrates how to create a dotted outline around a paragraph element − .dotted-outline { outline-width: 7px; outline-style: dotted; ...

Read More
Showing 21641–21650 of 61,297 articles
Advertisements