Articles on Trending Technologies

Technical articles with clear explanations and examples

Find depth of a dictionary in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 1K+ Views

A Python dictionary can be nested, meaning there are dictionaries within dictionaries. In this article, we will see how to calculate the level of nesting in a dictionary when there are nested dictionaries. Using String Conversion In this approach, we convert the entire dictionary into a string and count the number of opening braces { to determine the nesting level ? Example dictA = {1: 'Sun', 2: {3: {4: 'Mon'}}} dictStr = str(dictA) cnt = 0 for i in dictStr: if i == "{": ...

Read More

How to Make the CSS vertical-align Property Work on the div Element?

Rincy John
Rincy John
Updated on 15-Mar-2026 2K+ Views

This article will let you understand the vertical-align property in CSS. Here, we discuss the limitations of the vertical-align property and a few methods to overcome this, and hence, you will learn the solution to make the vertical-align property work on a div tag. Syntax vertical-align: value; Why does vertical-align don't work on div elements? Remember, the vertical-align property only works on inline, inline-block, and table-cell elements. You cannot use it to align block-level elements vertically. Tables work differently than divs because all the rows in a table are the same height. If ...

Read More

Find common elements in three sorted arrays by dictionary intersection in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 494 Views

When working with Python data manipulation, you may need to find elements that are common among multiple arrays. This can be efficiently achieved by converting arrays into dictionaries using the Counter class from the collections module. The approach involves using Counter to count occurrences of each element, then finding the intersection using the & operator. This method preserves the minimum count of common elements across all arrays. Using Counter and Dictionary Intersection Here's how to find common elements using dictionary intersection ? from collections import Counter arrayA = ['Sun', 12, 14, 11, 34] arrayB ...

Read More

How to Create Facebook Login Page in HTML and CSS

AYUSH MISHRA
AYUSH MISHRA
Updated on 15-Mar-2026 387 Views

HTML stands for Hyper Text Markup language that is used to create the structure or layout of any webpage. CSS stands for cascading style sheets that are used to format and add styles to web pages. In this article, we are going to discuss how we can create a Facebook login page using HTML and CSS. Facebook Login Page A login page is the first page of any application or website. If we had already created our account on any website or app then we enter our login credentials on the login page to access our account. The ...

Read More

Find all triplets in a list with given sum in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 2K+ Views

In a list of numbers we want to find out which three elements can join to give a certain sum. We call it a triplet. And in the list there can be many such triplets. For example, the sum 10 can be generated from numbers 1, 6, 3 as well as 1, 5, 4. In this article we will see how to find out all such triplets from a given list of numbers. Using Nested Loops with Set This approach uses nested loops with a set to efficiently find triplets. We iterate through the list, and for each ...

Read More

How to Make the CSS overflow: hidden Work on a Element?

Shefali Jangid
Shefali Jangid
Updated on 15-Mar-2026 860 Views

The CSS overflow: hidden property is used to hide content that extends beyond the boundaries of an element. However, for it to work effectively, especially on table cells, you need to combine it with other CSS properties to control how the content is displayed. Syntax selector { overflow: hidden; } Approaches to Make the CSS overflow: hidden Work Using table-layout: fixed Property Using text-overflow and white-space Properties Method 1: Using table-layout: fixed Property By default, tables adjust column ...

Read More

Find all possible substrings after deleting k characters in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 318 Views

Sometimes we need to find all possible substrings after deleting exactly k characters from a string. This means keeping n-k characters in their original order to form new substrings. Python provides multiple approaches to solve this problem efficiently. Using Loops and Recursion This approach uses recursion to generate all combinations by selecting characters at different positions. We track the start and end positions while building each substring ? def letterCombinations(s, temp, start, end, index, k): result = [] if index == k: ...

Read More

How to Create an SVG Drop Shadow?

Pankaj Kumar Bind
Pankaj Kumar Bind
Updated on 15-Mar-2026 789 Views

A drop shadow enhances the appearance of an SVG by giving it a 3D effect or a sense of depth. SVG drop shadows can be created using SVG filters and the CSS filter property. SVG Filters: Provides fine-grained control over shadow properties. CSS filter: Applies shadows using simpler syntax. Syntax For SVG filters − For CSS filter − filter: drop-shadow(x-offset y-offset blur color); Method 1: Using the Element in SVG ...

Read More

Find all distinct pairs with difference equal to k in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 556 Views

In this article, we will learn how to find all distinct pairs of numbers in a list where the absolute difference between the two numbers equals a given value k. We'll explore different approaches to solve this problem efficiently. Using Nested for Loops This approach uses two nested for loops to compare every possible pair of elements in the list. The outer loop visits each element, while the inner loop compares it with all remaining elements ? numbers = [5, 3, 7, 2, 9] k = 2 count = 0 # Check all possible pairs ...

Read More

How to Create a Blinking Effect with CSS3 Animations?

Pankaj Kumar Bind
Pankaj Kumar Bind
Updated on 15-Mar-2026 1K+ Views

To create a blinking effect with CSS3 animations, there are several approaches you can use. Blinking effects are commonly used to draw attention to specific elements on a webpage, such as warning messages, buttons, or text. CSS3 animations make it easy to implement such effects with clean and reusable code. Syntax @keyframes animation-name { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } } selector { animation: animation-name duration timing-function iteration-count; } ...

Read More
Showing 19361–19370 of 61,299 articles
Advertisements