Articles on Trending Technologies

Technical articles with clear explanations and examples

Java Program to Print Pyramid Star Pattern

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 802 Views

In this article, we will understand how to print pyramid star pattern. The pattern is formed by using multiple for-loops and print statements. Below is a demonstration of the same − Input Suppose our input is − Enter the number of rows : 8 Output The desired output would be − The pyramid star pattern : * * * * * * * * * * * * * * * * ...

Read More

4 Keys Keyboard in C++

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

Suppose we will try to write the letter ‘A’, using the keyboard. Our goal is to use only four keys and try to write maximum ‘A’s on the text field. The keys are ‘A’, ‘C’, ‘V’, and ‘Ctrl’. To write a maximum number of A, we will use Ctrl + A to select All, Ctrl + C to copy, and Ctrl + V to paste. So, if the input is like the number of keystrokes is 7 then the output will be 9 as of press A three times. Then Ctrl+A, Ctrl+C, Ctrl+V, Ctrl+V To solve this, we will follow ...

Read More

Decimal type in C#

Samual Sam
Samual Sam
Updated on 11-Mar-2026 2K+ Views

The decimal type is a value type and has the plus, minus, multiply and divide operators. Firstly, set two decimal values − decimal d1 = 5.8M; decimal d2 = 3.2M; To add decimals − d1 = d1 + d2; Let us see an example to add two decimal values − Example using System; using System.Linq; class Demo { static void Main() { decimal d1 = 5.8M; decimal d2 = 3.2M; d1 = d1 + d2; Console.WriteLine(d1); } } Output 9.0

Read More

7 Best Wearable Health Monitors in 2025

Farzz
Farzz
Updated on 14-Oct-2025 2K+ Views

Wearable health monitors are used to track our body's activities and functionalities. In this article, I will discuss the 7 best health monitors such as smartwatches and smart rings, their features, and prices. Wearable Health Monitors Wearable Health monitors are smart devices that can track health information such as rate of heartbeat, sleeping patterns, and physical activity. These devices can be worn on your wrist, finger, or any other part of your body. The sensors attached to these devices will collect data from your body and that will be available on your smartphone or computer for tracking and analysis. ...

Read More

Adding a prefix to each key name in a Python dictionary

Priya Sharma
Priya Sharma
Updated on 22-Sep-2025 3K+ Views

In this article, we will understand how to add a prefix to each key name in a Python dictionary. Dictionaries in Python are collections of unordered items stored in the form of key-value pairs inside curly braces like this − Dictionary = {key: value, ….} Our goal is to add a prefix (i.e., a word or character added at the beginning of another word) to each key name of the dictionary in Python. Suppose a key in a dictionary is "name", on adding the prefix "company_" to it, the key becomes "company_name". For example − #Input dictionary: Dictionary = ...

Read More

How to Keep Your Browser Safe on Work and Home Networks (with an Optional Chrome VPN Layer)

sudhir sharma
sudhir sharma
Updated on 08-Sep-2025 1K+ Views

A single thoughtless click on a browser tab can cause hours of frantic IT calls, network scans, and security resets in numerous workplaces. Sometimes, when you seek a recipe or a good offer online, you end up with pop-ups or phishing attempts that are not good. These things happen all the time in a world where people are connected. The browser is the front entrance to the Internet, whether you're in a busy office or a peaceful living room. And just like any other front door, it can be closed, reinforced, and guarded, or it can be left open for ...

Read More

Binary Search Tree to Greater Sum Tree in C++

Ravi Ranjan
Ravi Ranjan
Updated on 04-Sep-2025 829 Views

In this article, we are given a binary search tree. Our task is to transform the given BST to a Greater Sum tree. A Greater Sum Tree with respect to the given BST is a tree where each node's value is replaced by the sum of all values greater than that node's value in the original BST. Below is an example scenarios to convert the given BST to a Greater Sum Tree: Example Scenario Input: BST inorder traversal= {0, 1, 2, 3, 4, 5, 6, 7, 8} Output: Greater Sum Tree = {36, 35, 33, 30, 26, 21, 15, ...

Read More

How to check if a string has at least one letter and one number in Python?

Sarika Singh
Sarika Singh
Updated on 02-Sep-2025 5K+ Views

To check if a string contains at least one letter and one number in Python, you can - Use any() function with str.isalpha() function and str.isdigit() function to go through characters. Use re.search() function with appropriate regular expressions for pattern matching. Both methods are commonly used for validating input strings where letters and digits are required. Using any() Function with String Methods The any() function can be combined with str.isalpha() or str.isdigit() functions to check if at least one character in the string is a letter or a digit. This approach is used for partial checks within ...

Read More

How do I verify that a string only contains letters, numbers, underscores and dashes in Python?

Sarika Singh
Sarika Singh
Updated on 02-Sep-2025 13K+ Views

To verify that a string contains only letters, numbers, underscores, and dashes in Python - Use re.fullmatch() function with a pattern like [A-Za-z0-9_-]+ for regex-based checking. Use set comparison with all() function for simple logic-based validation. Many systems restrict input to certain characters for security or formatting reasons. In this case, the allowed characters are alphabets (A–Z, a–z), digits (0–9), underscores (_), and hyphens (-). Using Regular Expressions The re module in Python allows you to define patterns to validate strings. You can use re.fullmatch() function to check if the entire string matches a specific pattern, such as ...

Read More

What is the Python regular expression to check if a string is alphanumeric?

Sarika Singh
Sarika Singh
Updated on 02-Sep-2025 6K+ Views

In this article, we focus on how to check if a string is alphanumeric using regular expressions in Python. Regular expressions are very useful for pattern matching and validation. To use them, first import the re library, which is included by default in Python. The regular expression ^[a-zA-Z0-9]+$ matches strings that contain only letters (both uppercase and lowercase) and numbers. This expression returns True if the string is alphanumeric; otherwise, it returns False. Using Regular Expressions By applying the re.match() function with the above pattern, you can check if the entire string contains only alphanumeric characters. Example: Checking an Alphanumeric ...

Read More
Showing 1–10 of 61,248 articles
« Prev 1 2 3 4 5 6125 Next »
Advertisements