Samual Sam has Published 2492 Articles

abs() function in PHP

Samual Sam

Samual Sam

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

171 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

95 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

107 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

437 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

7K+ 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

244 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 convert integer to octal

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:26:39

1K+ Views

To convert integer to octal in Java, use the Integer.toOctalString() method.Let’s say the following is our integer.int val = 768;Convert the above integer to octal.Integer.toOctalString(val)The following is the final example.Example Live Demopublic class Demo {     public static void main(String[] args) {        int val = 768;        // integer        System.out.println("Integer: "+val);     ... Read More

Pre-increment and Post-increment concept in C/C++?

Samual Sam

Samual Sam

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

11K+ Views

Increment operators are used to increase the value by one while decrement works opposite increment. Decrement operator decrease the value by one.Pre-increment (++i) − Before assigning the value to the variable, the value is incremented by one.Post-increment (i++) − After assigning the value to the variable, the value is incremented.The ... 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

394 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

2K+ 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

Advertisements