Server Side Programming Articles

Page 46 of 2109

Element Methods in Selenium Python

Jaisshree
Jaisshree
Updated on 27-Mar-2026 835 Views

Selenium is an open-source automation testing tool used with programming languages like Python, Java, JavaScript, and Perl to test web applications. It provides various element methods to interact with web page components programmatically. Essential Element Methods 1. send_keys() Used for entering text into input fields, text areas, and form elements. Also supports modifier keys like Ctrl, Alt, and Shift. Return Type: None 2. is_selected() Checks if an element like checkbox, radio button, or option is selected. Return Type: Boolean (True or False) 3. is_displayed() Verifies if an element is visible on the web page. Return Type: ...

Read More

Generate a list using given frequency list

Atharva Shah
Atharva Shah
Updated on 27-Mar-2026 450 Views

Generating a list using a given frequency list is a common problem in programming. The task involves creating a list of elements based on the frequency distribution of those elements. This can be useful for generating passwords with specific character distributions, creating datasets for machine learning, or building recommendation systems. Basic Approach Using Lists The simplest method is to repeat each element according to its frequency ? # Generate list from frequency pairs frequency_list = [('a', 4), ('b', 2), ('c', 1), ('d', 3)] result = [] for element, freq in frequency_list: ...

Read More

Generate a Hermite_e series with given roots using NumPy in Python

Atharva Shah
Atharva Shah
Updated on 27-Mar-2026 355 Views

Hermite polynomials are orthogonal polynomials used in differential equations, probability theory, and quantum mechanics. The Hermite_e series represents functions using their roots. This article demonstrates how to generate Hermite_e series with given roots using NumPy in Python. Installation and Import NumPy provides support for Hermite_e polynomial operations − pip install numpy matplotlib import numpy as np import matplotlib.pyplot as plt Syntax NumPy provides functions to work with Hermite_e polynomials − # Generate polynomial from roots numpy.polynomial.hermite_e.hermefromroots(roots) # Gauss-Hermite quadrature numpy.polynomial.hermite_e.hermegauss(deg) roots − Array containing the ...

Read More

Gauss’s Forward Interpolation

Atharva Shah
Atharva Shah
Updated on 27-Mar-2026 2K+ Views

Gauss's Forward Interpolation is a numerical method that enables us to determine the value of a function at a certain point within a specific range using a sequence of equally spaced data points. This polynomial interpolation method uses Newton's Divided Difference Formula to calculate the coefficients of the polynomial. This method is particularly useful for estimating values at equally spaced locations within a given range. Installation To implement Gauss's Forward Interpolation, we need the numpy library for mathematical calculations ? pip install numpy Algorithm Input the function f(x), the range of x ...

Read More

Gauge Chart in pygal

Atharva Shah
Atharva Shah
Updated on 27-Mar-2026 816 Views

Gauge charts are a type of chart used to represent a value or a range of values in a circular format. These charts are similar to speedometer gauges in cars, where a needle points to a particular value on the gauge. Gauge charts can be useful for visualizing data related to performance indicators, such as completion rates or progress towards a goal. In this tutorial, we will explore how to create gauge charts using the pygal library in Python. Installation To use pygal, you first need to install it using Package Manager PIP ? pip install ...

Read More

Gantt Chart in plotly

Atharva Shah
Atharva Shah
Updated on 27-Mar-2026 2K+ Views

A Gantt chart is a popular way of representing a project schedule. It is a type of bar chart that illustrates a project timeline, including the start and end dates of tasks and their dependencies. Gantt charts are widely used in project management to visually represent project plans and track progress. In this article, we'll explore how to create Gantt charts in Python using the Plotly library. Installation First, install the Plotly library using pip ? pip install plotly Syntax The basic syntax for creating a Gantt chart in Plotly uses the px.timeline() ...

Read More

G-Fact 19 (Logical and Bitwise Not Operators on Boolean)

Atharva Shah
Atharva Shah
Updated on 27-Mar-2026 458 Views

Boolean operators are the foundation of logic in computer science. They are used to perform logical and bitwise operations on binary data. In Python, the logical not operator is used to negate a boolean expression while the bitwise not operator is used to invert the bits in a number. Boolean Operators Overview The Boolean operators in Python are and, or, and not. The and operator returns True if both operands are True, otherwise False. The or operator returns True if at least one operand is True. The not operator produces the opposite of the operand's truth value. ...

Read More

Functors and their use in Python

Atharva Shah
Atharva Shah
Updated on 27-Mar-2026 1K+ Views

Functors are objects that can be called like functions, providing a way to encapsulate values and apply transformations while maintaining immutability. In Python, functors are implemented using classes with the __call__ method, allowing for modular and reusable code patterns. What is a Functor? A functor wraps a value in a container and provides a way to apply functions to that value without modifying the original container. The key characteristic is that applying a function to a functor returns a new functor containing the transformed value. Basic Syntax To create a functor in Python, define a class ...

Read More

Functions that accept variable length key value pair as arguments

Atharva Shah
Atharva Shah
Updated on 27-Mar-2026 613 Views

Functions that accept variable-length key-value pairs allow you to create more flexible and dynamic functions in Python. The **kwargs syntax enables functions to handle arbitrary keyword arguments, making them ideal for optional parameters and extensible APIs. Syntax The **kwargs parameter collects keyword arguments into a dictionary: def function_name(**kwargs): # kwargs is a dictionary containing key-value pairs # code block Basic Example Here's how to iterate through keyword arguments: def print_values(**kwargs): for key, value in kwargs.items(): ...

Read More

Flipping Tiles (memory game) using Python3

Atharva Shah
Atharva Shah
Updated on 27-Mar-2026 620 Views

A memory game where players flip tiles to match colors is a classic puzzle that helps improve concentration and memory skills. In this tutorial, we'll build a 4×4 grid memory game using Python's tkinter library. Required Libraries The game uses these built-in Python packages — tkinter — Creates the graphical user interface random — Shuffles tile colors randomly itertools — Simplifies grid iteration ctypes — Handles Windows display scaling Game Logic The memory game follows these rules — Click a tile to reveal its hidden color Click a second tile to ...

Read More
Showing 451–460 of 21,090 articles
« Prev 1 44 45 46 47 48 2109 Next »
Advertisements