Articles on Trending Technologies

Technical articles with clear explanations and examples

Event scheduler in Python

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

Python provides the schedule module for running tasks at specific times. This module offers a simple and intuitive way to create scheduled jobs using the every() function with various time intervals. Installation First, install the schedule module ? pip install schedule Syntax schedule.every(n).[timeframe] Where: n is the time interval (integer) timeframe can be seconds, minutes, hours, days, or weekday names (monday, tuesday, etc.) Basic Example Here's a simple example that prints messages at different intervals ? import schedule import time def job(): ...

Read More

How to style label associated with selected radio input and checked checkboxes using CSS?

Tarun Singh
Tarun Singh
Updated on 15-Mar-2026 4K+ Views

To style label associated with selected radio input and checked checkboxes using CSS, is important task in forms as it makes it easy to identify the option selected by user. In this article, we will understand how to style label associated with selected radio input and checked checkboxes using CSS using :checked pseudo class selector and CSS combinators. Syntax /* Style label next to checked radio button */ input[type="radio"]:checked + label { /* CSS styles */ } /* Style label next to checked checkbox */ input[type="checkbox"]:checked + label { ...

Read More

How to style icon color, size, and shadow by using CSS

Tarun Singh
Tarun Singh
Updated on 15-Mar-2026 3K+ Views

Icons are an essential part of any website or application, as they provide users a quick and easy way to understand and interact with content. Using CSS, we can style icon color, size, and shadow to create a unique and visually appealing user experience instead of relying on default styling. In this article, we will learn different methods to style icons using CSS properties to customize their appearance. Syntax /* For Font Icons */ .icon { color: value; font-size: value; text-shadow: horizontal vertical blur ...

Read More

Adding value to sublists in Python

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

Sometimes we need to add new values to sublists in an existing list. In this article, we will see how new values can be inserted into sublists by combining them with each item of the existing list. Using List Comprehension with Fixed-Length Sublists When you have sublists of the same length, you can use list comprehension to unpack and add new values ? data = [[10, 20], [14, 8], ['Mon', 'Tue']] print("Given List:") print(data) s = "Rise" t = "fast" result = [[m, n, s, t] for m, n in data] print("New List:") print(result) ...

Read More

Turtle graphics using Python

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

Python's Turtle graphics library provides an easy way to create drawings and animations. After importing turtle, you can use commands like forward(), backward(), right(), and left() to move the turtle cursor and draw shapes. By combining these commands, you can create beautiful graphics ranging from simple shapes to complex patterns. Simple Turtle Commands forward(10) − Moves the turtle forward by 10 pixels backward(5) − Moves the turtle backward by 5 pixels right(35) − Turns the turtle clockwise by 35 degrees left(55) − Turns the turtle counter-clockwise by 55 degrees goto(x, y) − Moves the turtle to position ...

Read More

What is CSS sprites and how to implement them on a page?

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 268 Views

CSS sprites are a technique used to reduce the number of HTTP requests by combining multiple images into a single image file. Instead of loading several individual images, the browser downloads one sprite sheet and displays different portions using CSS background-position property. Syntax .element { background-image: url('sprite-sheet.png'); background-position: x-offset y-offset; width: image-width; height: image-height; } Benefits of CSS Sprites The main advantages of using CSS sprites include − Reduced HTTP requests: Multiple images are loaded with ...

Read More

Python - Get the Index of first element greater than K

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

When working with Python lists, you often need to find the index of the first element that satisfies a specific condition. In this article, we'll explore different methods to get the index of the first element greater than a given value K. Using Enumeration with next() The enumerate() function provides both the index and value of each element. Combined with next(), it returns the first index where the condition is met ? numbers = [21, 10, 24, 40.5, 11] K = 25 print("Given list:", numbers) # Using next() + enumerate() result = next(k for k, ...

Read More

What is CSS Flexbox?

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 204 Views

CSS flexbox is a powerful layout model that makes it easier to design flexible and responsive layouts. It allows you to arrange child items efficiently within a container and automatically adjusts item dimensions when content overflows. Syntax selector { display: flex; } Terminology of CSS Flexbox Understanding these key terms is essential for working with flexbox − Flex container − An HTML element with display: flex applied to it. Flex items − Direct children of the flex container that are arranged using flexbox properties. Main axis − The ...

Read More

Python - Get sum of tuples having same first value

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

Tuples are Python collections that are ordered but unchangeable. When working with a list of tuples where multiple tuples share the same first element, we often need to sum the second elements of tuples that have matching first elements. Using Dictionary and For Loop This approach converts tuples to a dictionary where first elements become keys and second elements are summed as values − # List of tuples with some duplicate first elements data = [(3, 19), (7, 31), (7, 50), (1, 25.5), (1, 12)] # Create dictionary with first elements as keys, initialize to ...

Read More

Python - geometry method in Tkinter

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

Python's Tkinter library provides the geometry() method to control the size and position of GUI windows. This method is essential for creating properly sized and positioned applications. Syntax window.geometry("widthxheight+x_offset+y_offset") Where: width and height define window dimensions in pixels x_offset and y_offset set position on screen (optional) Basic Window Sizing Here's how to create a window with specific dimensions ? from tkinter import * base = Tk() base.geometry('200x200') stud = Button(base, text='Tutorialspoint', font=('Courier', 14, 'bold')) stud.pack(side=TOP, pady=6) mainloop() This creates a 200x200 pixel window with a button ...

Read More
Showing 19721–19730 of 61,297 articles
Advertisements