Articles on Trending Technologies

Technical articles with clear explanations and examples

How to disable resizable property of textarea using CSS?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 15-Mar-2026 1K+ Views

The CSS resize property controls whether an element can be resized by the user. By default, textareas are resizable, allowing users to drag their corners to change dimensions. Setting resize: none disables this functionality completely. Syntax textarea { resize: none; } Possible Values ValueDescription noneDisables resizing completely bothAllows resizing in both directions (default) horizontalAllows resizing only horizontally verticalAllows resizing only vertically Example: Disabling Textarea Resize The following example creates two textareas − one resizable (default) and one non−resizable − ...

Read More

Print first n distinct permutations of string using itertools in Python

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

When working with permutations of strings that contain duplicate characters, we often need to find only the distinct permutations. Python's itertools.permutations() generates all possible arrangements, including duplicates, so we need additional logic to filter unique results. Syntax from itertools import permutations def get_distinct_permutations(string, n): # Sort characters to group duplicates together sorted_chars = sorted(list(string)) # Generate all permutations all_perms = permutations(sorted_chars) # Use set to store ...

Read More

How to disable text selection highlighting using CSS?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 15-Mar-2026 9K+ Views

To disable text selection highlighting using CSS, you can prevent users from selecting and copying content. The CSS user-select property controls whether the user can select text within an element. Syntax selector { user-select: value; } Possible Values ValueDescription noneText cannot be selected by the user autoDefault behavior, text can be selected textText can be selected by the user allAll content of the element will be selected atomically Example: Disabling Text Selection The following example shows how to disable text selection on specific content using the ...

Read More

Prime or not in Python

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

Prime numbers play a central role in many applications like cryptography. So it is a necessity to check for prime numbers using Python programs in various applications. A prime number is a number which doesn't have any factors other than one and itself. Below we'll see programs that can find out if a given number is prime or not. Basic Approach We take the following approach to decide whether a number is prime or not ? Check if the number is positive or not. As only positive numbers can be prime numbers. We divide the number ...

Read More

Sorting Function in SASS

Rushi Javiya
Rushi Javiya
Updated on 15-Mar-2026 416 Views

In this article, we will learn about the sorting function in Sass, but before moving forward, let's have a basic idea about Sass; so sass is a powerful and popular preprocessor language for CSS that allows developers to write more efficient and maintainable stylesheets. One of the best advantages of Sass is the ability to use functions to streamline the development process. However, one function that Sass does not provide out of the box is a sorting function. Sorting is a common task in all programming languages and can be useful in many different contexts when working with stylesheets. ...

Read More

Maximum length of consecutive 1's in a binary string in Python using Map function

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

When working with binary strings, you may need to find the maximum length of consecutive 1's. Python provides several approaches using built-in functions like split() with map() and regular expressions. Using Split and Map The split() function divides a string by a delimiter. When we split by '0', we get segments of consecutive 1's. The map() function applies len() to each segment, and max() finds the longest one ? Example data = '11110000111110000011111010101010101011111111' def max_consecutive_ones(binary_string): return max(map(len, binary_string.split('0'))) result = max_consecutive_ones(data) print("Maximum Number of consecutive one's:", result) ...

Read More

NeumorphismUI Form

Rushi Javiya
Rushi Javiya
Updated on 15-Mar-2026 259 Views

NeumorphismUI is a design trend that combines skeuomorphism with modern aesthetics, creating elements that appear to extrude from the background. When applied to forms, it creates a tactile, interactive feeling that enhances user experience and makes interfaces more engaging. Syntax The key to neumorphism is using dual box-shadows to create the illusion of depth − .neumorphic-element { box-shadow: -5px -5px 10px #ffffff, 5px 5px 10px #b7b7b7; /* OR for inset effect */ box-shadow: inset -5px -5px 10px #ffffff, inset 5px 5px 10px #b7b7b7; } ...

Read More

Usage of Asterisks in Python

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

Python programming language uses both * and ** in different contexts. In this article, we will explore how these operators are used and their practical applications. As an Infix Operator When * is used as an infix operator, it performs mathematical multiplication on numbers. Let's see examples with integers, floats, and complex numbers ? # Integers x = 20 y = 10 z = x * y print(z) # Floats x1 = 2.5 y1 = 5.1 z1 = x1 * y1 print(z1) # Complex Numbers x2 = 4 + 5j y2 = 5 + ...

Read More

Statistical Thinking in Python

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

Statistical thinking is fundamental for machine learning and AI. Since Python is the language of choice for these technologies, we will explore how to write Python programs that incorporate statistical analysis. In this article, we will create graphs and charts using various Python modules to analyze data quickly and derive insights through visualization. Data Preparation We'll use a dataset containing information about various seeds. This dataset is available on Kaggle and has eight columns that we'll use to create different types of charts for comparing seed features. The program below loads the dataset and displays sample rows. ...

Read More

Last-child and last-of-type selector in SASS

Rushi Javiya
Rushi Javiya
Updated on 15-Mar-2026 4K+ Views

SASS provides advanced selectors that extend CSS functionality, including :last-child and :last-of-type pseudo-selectors. These selectors help target specific elements based on their position within parent containers. Last-child Selector in SASS The :last-child selector targets the last child element within a parent container, regardless of the element type. It applies styles to the final element and all its nested children. Syntax .parent-element :last-child { /* CSS properties */ } Example 1: Basic Last-child Selection This example demonstrates selecting the last child element within a container − ...

Read More
Showing 19641–19650 of 61,297 articles
Advertisements