codegyan has Published 17 Answers

How to Install Jenkins on Ubuntu

Published on 28-Mar-2022 17:36:25
Jenkins is a software package for software developers. It’s used to automate parts of the testing, build, delivery, and deployment of software. This guide will help you install Jenkins on an Ubuntu 18.04 system. Prerequisites A system running Ubuntu 18.04 Bionic Beaver A user account with sudo privileges Access to a terminal window / command line (CTRL+ALT+T or search > terminal) Java 8 or 11 A Brief Note on J... Read More

Write PHP Program To Check Prime Number

PHP
Published on 16-Mar-2022 8:40:06
PHP Program To Check Prime Number : The below program checks if a number is a prime or a composite number. The PHP echo statement is used to output the result on the screen. Example <!DOCTYPE html> <html> <body>   <?php $num = 13; $count=0; for ( $i=1; $i<=$num; $i++){ if (($num%$i)==0){ $count++; } } if ($count<3){ echo "$num is a prime number.... Read More

Write PHP Program To Print Sum Of Digits

PHP
Published on 16-Mar-2022 8:34:26
PHP Program To Print Sum Of Digits : The below program gives the sum of two variables x and y. The PHP echo statement is used to output the text and sum value to the screen. In a similar way, codes can be written to get a sum of multiple variables in PHP. Example <!DOCTYPE html> <html> <body>   <?php $txt1 = "Sum of x and y is:"; $x = 1234; $y = 4321;   echo "<h3>" . $txt1 . "&... Read More

How to convert temperature from degree centigrade to Fahrenheit using C

Published on 12-Dec-2021 9:21:47
C Program to convert temperature from degree centigrade to Fahrenheit #include <stdio.h> int main() { float celsius, fahrenheit; printf("\nEnter temp in Celsius : "); scanf("%f", &celsius); fahrenheit = (1.8 * celsius) + 32; printf("\nTemperature in Fahrenheit : %f ", fahrenheit); return (0); } Output Enter temp in Celsius : 32 Temperature in Fahrenheit : 89.59998 ... Read More

How to find area and circumference of circle using C Programming

Published on 12-Dec-2021 9:15:04
C Program to find area and circumference of circle #include <stdio.h> int main() { int rad; float PI = 3.14, area, ci; printf("\nEnter radius of circle: "); scanf("%d", &rad); area = PI * rad * rad; printf("\nArea of circle : %f ", area); ci = 2 * PI * rad; printf("\nCircumference : %f ", ci); return (0); } Output : Enter radius of a circle : 1 Area of circle : 3.14 Circumf... Read More

How to find gretest in 3 number using C Programming

Published on 12-Dec-2021 8:57:08
C Program to find greatest in 3 numbers #include <stdio.h> int main() { int a, b, c; printf("\nEnter value of a, b & c : "); scanf("%d %d %d", &a, &b, &c); if ((a > b) && (a > c)) printf("\na is greatest"); if ((b > c) && (b > a)) printf("\nb is greatest"); if ((c > a) && (c > b)) printf("\nc is greatest"); return(0); } Output : Enter value for... Read More

How to find sum of two numbers using C Language

Published on 12-Dec-2021 8:44:14
C program to find sum of two numbers #include <stdio.h> int main() { int a, b, sum; printf("\nEnter two no: "); scanf("%d %d", &a, &b); sum = a + b; printf("Sum : %d", sum); return(0); } Output: Enter two no: 5 6 Sum : 11 ... Read More

How To Send mail from your Gmail account using Python

Published on 22-Nov-2021 21:52:51
Here, we are going to learn how to send a simple basic mail using Python code. Python, being a powerful language don’t need any external library to import and offers a native library to send emails- “SMTP lib”. “smtplib” creates a Simple Mail Transfer Protocol client session object which is used to send emails to any valid email id on the internet. Different websites use different port numbers. In this article, we are using a Gmail a... Read More

Accept Credit Cards Online with an Merchant Account!

Published on 01-Nov-2021 9:17:20
If you want to accept credit cards online, you will need to set up a credit card merchant account with a reputable firm. There are a lot of merchant account providers out there, however, Codegyan has teamed up with e-onlinedata to make it easy for our customers to obtain merchant accounts and use the Authorize.net gateway. Authorize.net will integrate into the shopping carts that we provide, such as OSCommerce, CubeCart, WHMCS, etc. ... Read More

How to get a list of parameter names inside Python function?

Published on 30-Oct-2021 13:40:54
To extract the number and names of the arguments from a function or function[something] to return ("arg1", "arg2"), we use the inspect module. The given code is written as follows using inspect module to find the parameters inside the functions aMethod and foo. Example import inspect def aMethod(arg1, arg2): pass print(inspect.getargspec(aMethod)) def foo(a,b,c=4, *arglist, **keywords): pass print(inspect.getargspec(foo))  Output ... Read More