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
CSS Box Sizing Property
The CSS box-sizing property controls how the width and height of an element are calculated. By default, padding and border are added to the specified width and height, but this property allows you to change this behavior. Syntax selector { box-sizing: value; } Possible Values ValueDescription content-boxDefault. Width and height apply to content only border-boxWidth and height include content, padding, and border Default Behavior (content-box) By default, CSS follows this calculation − Total width = width + padding + border Total height = height ...
Read MorePrint nodes of linked list at given indexes in C language
In C programming, printing nodes of a linked list at given indexes involves traversing the list and accessing elements at specific positions. Unlike arrays, linked lists don't have direct indexing, so we must traverse from the head node counting positions until we reach the desired index. Syntax void printAtIndex(struct node* head, int index); void printMultipleIndexes(struct node* head, int indexes[], int size); Example 1: Print Single Node at Given Index This example demonstrates how to print a node at a specific index − #include #include struct node { ...
Read MoreCSS2 sizing property vs CSS3 box sizing property
Let us understand the difference between CSS2 sizing property and CSS3 box-sizing property. In CSS2, the width and height properties only apply to the content area, while CSS3 box-sizing property allows you to control how the total element size is calculated. Syntax selector { box-sizing: value; } Possible Values ValueDescription content-boxDefault CSS2 behavior - width/height applies only to content border-boxCSS3 behavior - width/height includes content, padding, and border CSS2 Default Sizing (content-box) In CSS2, the width and height properties apply only to the content area. Padding ...
Read MorePrint n x n spiral matrix using O(1) extra space in C Program.
We are given a positive integer n and need to create a spiral matrix of n x n using only O(1) extra space in clockwise direction. A spiral matrix starts from the center and fills values in a spiral pattern outward. The spiral matrix fills values in clockwise direction starting from the center. For example, a 3x3 matrix would fill as: center → right → down → left → up and so on. ...
Read MoreCSS3 Resize Property
The CSS3 resize property allows users to resize elements by dragging from the bottom-right corner. It provides control over which dimensions can be resized by the user. Syntax selector { resize: value; } Possible Values ValueDescription noneUser cannot resize the element (default) horizontalUser can resize horizontally only verticalUser can resize vertically only bothUser can resize in both directions Example 1: Both Directions The following example allows users to resize the element in both horizontal and vertical directions − ...
Read MoreSet the border image as rounded, repeated and stretched with CSS
The border-image-repeat property is used to set how the border image is repeated, stretched, or rounded along the border edges. This property controls the behavior of the border image segments between the corners. Syntax selector { border-image-repeat: value; } Possible Values ValueDescription stretchThe border image is stretched to fill the area (default) repeatThe border image is repeated to fill the area roundThe border image is repeated and scaled to fit the area perfectly spaceThe border image is repeated with spacing to fill the area Example 1: Round ...
Read MorePrint the last k nodes of the linked list in reverse order Recursive Approaches in C language
In C programming, printing the last k nodes of a linked list in reverse order using recursion is an elegant approach that leverages the function call stack. This technique traverses the entire list recursively and then prints the nodes during the return phase of recursion. Syntax void printLastKNodesReverse(struct node* head, int* count, int k); Algorithm The recursive algorithm works in two phases − Forward traversal: Recursively traverse to the end of the list Backward counting: During return, increment counter and print nodes if count ≤ k Linked ...
Read MoreSet the image path with CSS
The CSS border-image-source property is used to set the path of an image that will be used as a border around an element. This property allows you to replace traditional solid borders with custom images for more creative styling. Syntax selector { border-image-source: url(path-to-image) | none; } Possible Values ValueDescription url()Specifies the path to the image file noneNo image is used (default value) Example: Setting Image Border Path The following example demonstrates how to set an image path for creating a decorative border − ...
Read MorePrint the alternate nodes of linked list (Iterative Method) in C language
In this problem, we need to print alternate nodes from a linked list, which means printing every other node starting from the first node. The iterative method uses loops to traverse the linked list and prints nodes at even positions (0th, 2nd, 4th, etc.). For example, if the list contains nodes 29, 34, 43, 56, and 88, the output will be alternate nodes: 29, 43, and 88. 29 34 43 ...
Read MoreCSS border-image property
The CSS border-image property allows you to use an image as the border of an element instead of the standard border styles. This property is useful for creating decorative borders using custom images. Syntax selector { border-image: source slice width outset repeat; } Possible Values PropertyDescription sourceThe image to be used as border (url or gradient) sliceHow to slice the border image (in pixels or %) widthThe width of the border image outsetHow much the border extends beyond the border box repeatHow border image is repeated (stretch, repeat, round, ...
Read More