Articles on Trending Technologies

Technical articles with clear explanations and examples

Selects all elements with rel="nofollow" with CSS

usharani
usharani
Updated on 15-Mar-2026 397 Views

The CSS attribute selector [attribute="value"] allows you to select elements that have a specific attribute with an exact value. This is particularly useful for targeting links with rel="nofollow" attributes. Syntax selector[attribute="value"] { property: value; } Example The following example demonstrates how to select and style all anchor elements with rel="nofollow" − a[rel="nofollow"] { border: 3px solid blue; background-color: #f0f8ff; ...

Read More

Problem with scanf() when there is fgets()/gets()/scanf() after it in C

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 655 Views

In C programming, a common issue occurs when using scanf() followed by fgets(), gets(), or another scanf() for character input. The problem arises because scanf() leaves a newline character in the input buffer, which interferes with subsequent input functions. Syntax scanf("format_specifier", &variable); fgets(string, size, stdin); Problem 1: scanf() Followed by fgets() When scanf() reads an integer and is followed by fgets(), the newline character left by scanf() is immediately consumed by fgets() − #include int main() { int x; char str[100]; ...

Read More

With CSS set the element to retain the style values that is set by the first keyframe

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

The CSS animation-fill-mode property with the backwards value makes an element retain the style values defined in the first keyframe (the from or 0% state) before the animation begins. This is particularly useful when you want the element to appear in its starting animation state during any animation delay. Syntax selector { animation-fill-mode: backwards; } Example The following example demonstrates how animation-fill-mode: backwards applies the first keyframe styles before the animation starts − .box { ...

Read More

Process Synchronization in C/C++

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 7K+ Views

Process synchronization is the technique to overcome the problem of concurrent access to shared data which can result in data inconsistency. A cooperating process is the one which can affect or be affected by other process which will lead to inconsistency in processes data therefore Process synchronization is required for consistency of data. Syntax /* General structure for process synchronization */ do { entry_section(); critical_section(); exit_section(); remainder_section(); } while(1); The Critical-Section Problem Every process has a reserved segment ...

Read More

Set bottom tooltip with CSS

seetha
seetha
Updated on 15-Mar-2026 814 Views

To create a bottom tooltip with CSS, use the top property set to 100% along with position: absolute. This positions the tooltip below the trigger element when hovered. Syntax .tooltip .tooltip-text { position: absolute; top: 100%; visibility: hidden; } .tooltip:hover .tooltip-text { visibility: visible; } Example The following example creates a bottom tooltip that appears when you hover over the text − .mytooltip { ...

Read More

Usage of CSS [attribute] Selector

mkotla
mkotla
Updated on 15-Mar-2026 333 Views

The CSS [attribute] selector is used to select elements that contain a specific attribute, regardless of the attribute's value. This is useful for styling elements based on the presence of attributes like alt, target, title, or any custom attributes. Syntax [attribute] { /* CSS properties */ } Example: Selecting Images with Alt Attributes The following example applies a border to all images that have an alt attribute − img[alt] { border: 3px ...

Read More

Set left tooltip with CSS

Jennifer Nicholas
Jennifer Nicholas
Updated on 15-Mar-2026 150 Views

To set left tooltip, use the right CSS property. A left tooltip appears to the left of the trigger element when hovering, creating an interactive user interface element. Syntax .tooltip .tooltip-text { position: absolute; right: 100%; } Key Properties PropertyPurpose position: absolutePositions tooltip relative to parent right: 100%Places tooltip to the left of parent element visibility: hidden/visibleControls tooltip display on hover Example The following example creates a left tooltip that appears when hovering over the text − ...

Read More

Printing source of a C program itself

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 733 Views

In C programming, a self-printing program (also called a quine) is a program that prints its own source code as output. This can be achieved using the __FILE__ macro along with file I/O operations to read and display the current source file. Syntax FILE *fopen(__FILE__, "r"); The __FILE__ macro is a preprocessor macro that returns the name of the current source file as a string literal. This allows us to open and read our own source code at runtime. Example: Understanding __FILE__ Macro First, let's see how the __FILE__ macro works − ...

Read More

How to create a responsive image gallery with CSS

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

A responsive image gallery adapts to different screen sizes using CSS media queries and flexible layouts. This allows images to display properly on desktop, tablet, and mobile devices by adjusting the number of columns and image sizes automatically. Syntax .gallery-container { width: percentage; float: left; } @media only screen and (max-width: breakpoint) { .gallery-container { width: new-percentage; } } Example The following example creates a responsive image gallery that ...

Read More

C Program for Round Robin scheduling

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 10K+ Views

Round Robin is a CPU scheduling algorithm designed for time-sharing systems. It operates like FCFS scheduling but with a crucial difference − each process gets a fixed time slice called a time quantum. When a process's time quantum expires, it is preempted and moved to the back of the ready queue, allowing other processes to execute. What is Round Robin Scheduling? Round Robin treats the ready queue as a circular queue where each process gets a small unit of time (10-100 milliseconds typically). The main advantages include fair CPU allocation and good response time for interactive systems. The ...

Read More
Showing 21151–21160 of 61,297 articles
Advertisements