Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to print without newline in Python?
In Python, the print() function adds a newline character by default at the end of each output. When you have multiple print statements, each output appears on a separate line. However, you can modify this behavior using the end parameter to print everything on a single line. Normal Print() Behavior By default, each print() statement ends with a newline character (), causing output to appear on separate lines ? Example print("Apple") print("Mango") print("Banana") Output Apple Mango Banana Using the end Parameter The end parameter controls what character(s) ...
Read MoreHow to download Google Images using Python
Google Images can be downloaded programmatically using Python packages that search and fetch images based on keywords. The google_images_download package provides a simple interface to download images by specifying search terms and parameters. Installation First, install the required package using pip ? pip install google_images_download Basic Image Download Here's how to download a limited number of images with URL printing enabled ? from google_images_download import google_images_download # Instantiate the class response = google_images_download.googleimagesdownload() # Set download parameters arguments = { "keywords": "lilly, hills", ...
Read MorePrimer CSS Typography Type Scale Utilities
Primer CSS is a CSS framework collectively developed by various GitHub contributors. One of its components is typography which enables developers to style the written content of websites. By applying these utility classes to HTML elements, we can easily customize the visual appearance of our applications. This article discusses the type scale utilities offered by Primer CSS and how to use them in webpages. What are Type Scale Utilities? Type scale utilities are a collection of properties that help create proper typography throughout your website. They consist of a series of pre-defined, built-in font sizes and line heights ...
Read MoreHow to clear screen in python?
When working with Python programs, you may need to clear the terminal screen programmatically to improve output readability. While you can manually clear the screen with Ctrl + L, Python provides ways to clear the screen automatically within your script. Python uses the os.system() function to execute system commands for clearing the screen. The command differs between operating systems: 'clear' for Unix/Linux/macOS and 'cls' for Windows. Basic Screen Clearing Function Here's how to create a cross-platform screen clearing function ? import os def clear_screen(): # For Unix/Linux/macOS (os.name is 'posix') ...
Read MorePrimer CSS Typography Heading Utilities
Typography is an essential component during creation of websites and applications. It is primarily used to display majority of the content for the users. It determines the tone and mood of the content of your website. So, it is very likely that it affects the overall user experience. Headings in any website is the center of attraction for any user. So, it is very important that it looks perfectly fine to increase the readability of your website or application. In this article, we will use Primer CSS to create headings. Primer CSS Primer CSS is a versatile ...
Read MoreHow to align checkbox and its label on cross-browsers using CSS?
Aligning checkboxes with their labels consistently across different browsers can be challenging due to varying default styles. CSS provides several effective approaches to achieve proper alignment. In this article, we will explore three reliable methods to align checkboxes and labels for consistent cross-browser display. Syntax /* Method 1: Using vertical-align */ input[type="checkbox"] { vertical-align: middle; } /* Method 2: Using flexbox */ label { display: flex; align-items: center; } /* Method 3: Using grid */ .container { display: grid; ...
Read MoreDifference Between Revert and Unset Keyword in CSS
CSS is a powerful tool which enables developers to customize the appearance of websites according to their will. Since there are numerous features and properties provided by CSS, it is quite possible that developers use two keywords interchangeably in order to achieve a desired effect. So, it is important to know about such confusing keywords in detail to avoid further mistakes. Two such keywords are "revert" and "unset". These two may appear similar, but have noticeable differences for some properties for certain elements. Here, we will discuss about these keywords, how and when to use them, and differences between ...
Read MoreFinding Mean, Median, Mode in Python without Libraries
Mean, Median and Mode are very frequently used statistical functions in data analysis. Python provides built-in functions and simple algorithms to calculate these measures without external libraries. Finding Mean Mean of a list of numbers is also called average of the numbers. It is found by taking the sum of all the numbers and dividing it by the count of numbers. In the below example we apply the sum() function to get the sum of the numbers and the len() function to get the count of numbers ? Example numbers = [21, 11, 19, 3, ...
Read MoreHow to set vertical space between the list of items using CSS?
In today's era of web design, creating visually attractive websites with proper layouts and organized content is a key task. One of the most commonly faced challenges is defining the proper space between elements to increase webpage readability. CSS enables developers to control the appearance of HTML elements, including proper spacing between them. In this article, we will discuss different methods for setting vertical space between list items using CSS. Syntax /* Common approaches for vertical spacing */ li { margin-bottom: value; /* Method 1: Margin */ ...
Read MoreFind the k most frequent words from data set in Python
If there is a need to find the k most frequent words in a data set, Python can help us achieve this using the collections module. The collections module has a Counter class which counts the frequency of words after we supply a list of words to it. We also use the most_common() method to find the specified number of most frequent words. Basic Approach Using Counter In the below example we take a paragraph, create a list of words using split(), then apply Counter() to count word frequencies. Finally, most_common() returns the top k most frequent words ...
Read More