Articles on Trending Technologies

Technical articles with clear explanations and examples

Add different styles to hyperlinks using CSS

mkotla
mkotla
Updated on 15-Mar-2026 361 Views

CSS allows you to apply different styles to hyperlinks using pseudo-classes. You can change colors, fonts, backgrounds, and other properties based on the link's state (unvisited, visited, or hovered). Syntax a:link { /* unvisited link */ } a:visited { /* visited link */ } a:hover { /* mouse over link */ } a:active { /* selected link */ } Pseudo-Class States Pseudo-ClassDescription :linkUnvisited link (default state) :visitedLink that has been clicked/visited :hoverLink when mouse hovers over it :activeLink at the moment it is clicked Example: Different Link Styles The following ...

Read More

Grand Central Dispatch (GCD)

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 1K+ Views

Grand Central Dispatch (GCD) is a technology for Apple's Mac OS X and iOS operating systems that provides a combination of extensions to the C language, an API, and a runtime library. It allows application developers to identify sections of code to run in parallel, managing most of the threading details automatically like OpenMP. Syntax // Block syntax ^{ /* code block */ } // Dispatch queue creation dispatch_queue_t dispatch_get_global_queue(long identifier, unsigned long flags); // Async execution void dispatch_async(dispatch_queue_t queue, dispatch_block_t block); Blocks in GCD GCD introduces extensions to the C and ...

Read More

Set min-width and max-width of an element using CSS

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

The CSS min-width and max-width properties are used to set the minimum and maximum width constraints for an element. These properties are particularly useful for creating responsive designs that adapt to different screen sizes. Syntax selector { min-width: value; max-width: value; } Possible Values ValueDescription lengthDefines width in px, em, rem, etc. %Defines width as a percentage of the parent container autoDefault value, no constraint applied noneNo maximum width limit (for max-width only) Example The following example demonstrates how min-width and max-width ...

Read More

What is OpenMP?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 8K+ Views

OpenMP (Open Multi-Processing) is a set of compiler directives and an API for programs written in C, C++, or FORTRAN that provides support for parallel programming in shared-memory environments. OpenMP identifies parallel regions as blocks of code that may run concurrently across multiple threads. Syntax #pragma omp parallel { // Code block to execute in parallel } How OpenMP Works Application developers insert compiler directives into their code at parallel regions, and these directives instruct the OpenMP run-time library to execute the region in parallel. When OpenMP encounters the #pragma ...

Read More

Windows Anonymous Pipe

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 1K+ Views

Windows anonymous pipes are unidirectional communication channels that enable data transfer between parent and child processes. They behave similarly to UNIX pipes but use Windows-specific APIs. Reading and writing operations are performed using standard ReadFile() and WriteFile() functions. Syntax BOOL CreatePipe( PHANDLE hReadPipe, // Read handle PHANDLE hWritePipe, // Write handle LPSECURITY_ATTRIBUTES sa, // Security attributes DWORD nSize ...

Read More

Set the height and width of an image using percent with CSS

radhakrishna
radhakrishna
Updated on 15-Mar-2026 1K+ Views

To set the height and width of an image using percentage values, you can apply CSS properties that make the image responsive to its container's dimensions. This approach is useful for creating flexible layouts that adapt to different screen sizes. Syntax img { width: percentage; height: percentage; } Example The following example demonstrates how to set an image's dimensions using percentage values − .container { width: 400px; ...

Read More

Role of margin property with value auto using CSS

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 272 Views

The CSS margin property with value auto is used to horizontally center block-level elements within their container. When you set left and right margins to auto, the browser distributes the available space equally on both sides, creating a centered effect. Syntax selector { margin: auto; } /* Or specifically for horizontal centering */ selector { margin-left: auto; margin-right: auto; } How It Works For margin: auto to work effectively for centering, the element must have a defined width and be a ...

Read More

Role of margin property with value inherit using CSS

Giri Raju
Giri Raju
Updated on 15-Mar-2026 504 Views

The CSS margin property with value inherit is used to inherit the margin value from the parent element. This allows child elements to automatically adopt their parent's margin settings, creating consistent spacing throughout the document hierarchy. Syntax selector { margin: inherit; /* or for specific sides */ margin-left: inherit; margin-right: inherit; margin-top: inherit; margin-bottom: inherit; } Example The following example demonstrates how a paragraph inherits the left margin from its ...

Read More

C/C++ Function Call Puzzle?

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

This C/C++ function call puzzle explores the different behavior of function calling between C and C++ programming languages. The key difference lies in how each language handles function parameters and argument passing. When a function is declared without parameters, C and C++ treat it differently. Let's examine this behavior with a practical example. Syntax return_type function_name(); // Function declaration without parameters Example The following code demonstrates the different behavior when calling a function with arguments that was declared without parameters − #include void method() { ...

Read More

Set the color of the four borders using CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 111 Views

The CSS border-color property is used to set the color of the four borders of an element. You can specify different colors for each border or apply a single color to all borders. Syntax selector { border-color: value; } Possible Values ValueDescription color-nameSpecifies a color by name (e.g., red, blue) hex-valueSpecifies a color using hexadecimal notation (e.g., #FF0000) rgb-valueSpecifies a color using RGB values transparentSets the border color to transparent Example: Four Different Border Colors The following example sets different colors for each of the four ...

Read More
Showing 21281–21290 of 61,297 articles
Advertisements