Samual Sam has Published 2310 Articles

dechex() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:41:43

108 Views

The dechex() function converts decimal to hexadecimal. It Returns the hexadecimal string of the specified decimal.Syntaxdechex(num)Parametersnum − The decimal value to be convertedReturnThe dechex() function Returns the hexadecimal string of the specified decimal.Example Live DemoOutputf7c6

abs() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:38:08

255 Views

The abs() function returns the absolute value of a number.Syntaxabs(num)Parametersnum − The number for which we want to get the absolute value. If the num is float, then the return type will be float, otherwise it is an integer.ReturnThe abs() function returns the absolute value of the specified number.Example Live DemoOutput3.19.7Let ... Read More

acosh() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:37:08

144 Views

The acosh() function returns the inverse hyperbolic cosine of the specified number.Syntaxacosh(num)Parametersnum − The number for which we want the inverse hyperbolic cosine.ReturnThe acosh() function returns the inverse hyperbolic cosine of a number.Example Live DemoOutput01.0469679150032

asinh() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:36:21

160 Views

The asinh() function returns the inverse hyperbolic sine of a number.Syntaxasinh(num)Parametersnum − The number to be specified.ReturnThe asinh() function returns the inverse hyperbolic sine of a number.Example Live DemoOutput0.881373587019541.3258977669011

Generating random strings until a given string is generated using Python

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:33:53

597 Views

Given a string, our task is to generate some strings using the random combination of characters, special characters, numbers etc.ExampleInput PP Output AK AK . . . . .AlgorithmStep 1: Input a string. Step2: Here we store all possible combination of lowercase, uppercase and special characters in a variable. Step3: ... Read More

Replace Character in a String in Java without using replace() method

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:32:30

8K+ Views

To replace a character in a String, without using the replace() method, try the below logic.Let’s say the following is our string.String str = "The Haunting of Hill House!";To replace character at a position with another character, use the substring() method login. Here, we are replacing 7th position with character ... Read More

Python Tools for Web scraping

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:29:53

338 Views

In computer science Web scraping means extracting data from websites. Using this technique transform the unstructured data on the web into structured data.Most common web Scraping tools In Python3 are −Urllib2RequestsBeautifulSoupLxmlSeleniumMechanicalSoupUrllib2 − This tool is pre-installed with Python. This module is used for extracting the URL's. Using urlopen () function ... Read More

Java Program to remove leading and trailing whitespace from a string

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:22:53

454 Views

Use the Trim() method to remove leading and trailing whitespace from a string. Let’s say the following is our string with white spaces in the beginning and the end.String str = " a ";Now, use the trim() method.str.trim()The following is the final example with output.Example Live Demopublic class Demo {    public static void main(String[] args) {     ... Read More

What is the difference between g++ and gcc?

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:21:24

3K+ Views

g++GNU C++ Compiler ( g++ ) is a compiler in Linux which is used to compile C++ programs. It compiles both files with extension .c and .cpp as C++ files.The following is the compiler command to compile C++ program.g++ program.cpp -o filenameHere, filename − The name of file with .c ... Read More

What is the difference between an int and a long in C++?

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:20:19

2K+ Views

intThe datatype int is used to store the integer values. It could be signed or unsigned. The datatype int is of 32-bit or 4 bytes. It requires less memory area than long to store a value. The keyword “int” is used to declare an integer variable.The following is the syntax ... Read More

Advertisements