Server Side Programming Articles - Page 209 of 2650

How to test Typing Speed using Python?

Tushar Sharma
Updated on 10-Jul-2023 19:25:10

1K+ Views

If you've ever pondered the swiftness at which you can type or desire to refine your typing prowess, we possess a solution tailor−made for you! Within the confines of this composition, we shall delve into a simple approach that entails evaluating your typing speed utilizing Python. Fret not if you find yourself at the nascent stages of programming or if technical jargon leaves you feeling bewildered. We shall meticulously expound upon every facet using easily comprehensible verbiage, elucidating the process step by step. Step 1: Embarking on a Pythonic Journey To commence this undertaking, it is imperative to ensure that ... Read More

How to Terminate a Running Process on Windows in Python?

Tushar Sharma
Updated on 10-Jul-2023 19:20:22

4K+ Views

When delving into the realm of Python development on a Windows operating system, there will undoubtedly be occasions where the need arises to terminate a running process. The motives behind such termination could span a wide array of scenarios, including unresponsiveness, excessive resource consumption, or the mere necessity to halt script execution. In this comprehensive article, we shall explore various methods to accomplish the task of terminating a running process on Windows using Python. By leveraging the 'os' module, the 'psutil' library, and the `subprocess` module, we will equip ourselves with a versatile toolkit to address this imperative task. Method ... Read More

How to take backups of MySQL databases using Python?

Tushar Sharma
Updated on 10-Jul-2023 18:31:34

5K+ Views

Safeguarding the integrity and recoverability of your MySQL database is of paramount importance to mitigate the risks associated with data loss and corruption. Python, a versatile programming language, offers a myriad of libraries and techniques for seamless interaction with MySQL databases and accomplishing efficient backup procedures. This article delves into three distinct methodologies for creating MySQL database backups using Python, encompassing the utilization of the subprocess module, integration of the mysqldump command with the pymysql library, and leveraging the robust capabilities of the MySQL Connector/Python library. Through practical examples, we will delve into the intricacies of these techniques. Method 1: ... Read More

How to return an array to the function in Golang?

Aman Sharma
Updated on 10-Jul-2023 17:13:28

7K+ Views

In programming, to make the code more modular, usable, and readable we break the code into different functions. For example, we have to swap two numbers at different places so instead of swapping in place we create a different function and call it everywhere. In some use cases, we need a function that returns multiple values at once. For this, we have a data structure called arrays in programming that is nothing but a collection of multiple values of the same type. In this tutorial, we are going to learn about how to return an array in function as an ... Read More

How to Return a String from the Function in Golang?

Aman Sharma
Updated on 10-Jul-2023 17:10:56

3K+ Views

In programming, to make the code more modular, usable, and readable we break the code into different small blocks and these blocks are known as functions. A string is a data structure consisting of a set of alphabets. In solving any programming problem we want that the function should return some set of alphabets then we create a string in the function that the function returns in the end. This tutorial will explain this concept with the help of two examples. In the first example, we will define two strings and create a function that will return the string ... Read More

How to Pass an Array to the Function in Golang?

Aman Sharma
Updated on 10-Jul-2023 17:04:40

1K+ Views

In programming, to make the code more modular, usable, and readable we break the code into different functions. For example, we have to sort some set of numbers for which we will create a separate function. For this, we have a data structure called arrays in programming that is nothing but a collection of multiple values of the same type. Once the array of numbers is sorted then at the end of that function we have to return the sorted elements so in this article we will see how to return the array. Syntax The syntax to declare a function ... Read More

How to pass a string to the function in Golang?

Aman Sharma
Updated on 10-Jul-2023 16:59:44

2K+ Views

In this tutorial, we are going to learn about how to pass a string in function as an argument in Golang. In programming, to make the code more modular, usable, and readable we break the code into different small blocks and these blocks are known as functions. If you have created a string of alphabets and you want to perform some operations on the string then you need to pass that string to the function by passing it as an argument. This tutorial will explain this concept with the help of two examples. In the first example, we will ... Read More

How to Find Whether the given Number is PRIME or not using Recursion in Golang?

Aman Sharma
Updated on 10-Jul-2023 16:48:16

299 Views

In mathematics, there are numbers that can be divisible by 1 or by itself, and such numbers are called Prime numbers. For example, 2, 3, 5, 7 … etc. In programming, we can create a program to check number is prime or not. In this article, we will use the concept of recursion which we call the function within the function to create a program to check number is prime or not. Example 1 In this example, we are going to create a recursive function with two parameters one is the number and another one is the divisor. The ... Read More

How to find the Tangent of a given Radian Value in Golang?

Aman Sharma
Updated on 10-Jul-2023 16:40:12

123 Views

The ratio of the radian’s adjacent side and the opposite side is known as the tangent of the given radian. Golang language has many packages with predefined functions that the developer can use without writing the complete logic. To perform the mathematical operations and logic we have a math package in Golang. We will use this package only to find the Tangent of a given radian value. We will also see how to import the package and also how to call a function this package consists of by writing a Golang code. Tangent Definition Tangent is a function that ... Read More

How to Check Whether a Number is Even or Odd in Golang?

Aman Sharma
Updated on 10-Jul-2023 16:08:51

5K+ Views

In this tutorial, we are going to learn how we can check whether the number is even or odd. The number that can be divisible by 2 is an even number and the number that is not divisible by two is an odd number. This tutorial includes three different ways to achieve this Moulous Operator − In the first method, we are using the modulus (%) operator. This operator is used to find the remainder of two numbers. In our case, we will do the modulus of the number with 2 and if it returns 0 then ... Read More

Advertisements