
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

1K+ Views
In PHP, bcmul() math function is used to multiply one arbitrary precision number with another number. The bcmul() function takes two arbitrary precision numbers as strings and it gives the result as the multiplication of two numbers after scaling the result to an identified precision.Syntaxstring bcmul( $num_string1, $num_string2, $scaleVal)ParametersThe bcmul() math function accepts three different parameters $num_string1, $num_string2 and $scaleVal.$num_string1 - It represents the left operand and it is the string type parameter.$num_string2 - It represents the right operand, it is the string type parameter.$scaleVal - This is the optional integer type parameter that is used to set the number of digits ... Read More

200 Views
In PHP, bcpow() function is used to raise an arbitrary precision base number to another exponent number. It takes two arbitrary precision numbers as strings and gives the base number raised to the power exponent after scaling the result to the listed precision.SyntaxString bcpow($base, $exponent, $scale)ParametersThe bcpow() function in PHP takes three different parameters: $base, $exponent and $scale.$base - It represents the base in which power will be raised and it is the string type parameter.$exponent - It represents the exponent and it is the string type parameter.$scale - It indicates the number of digits that appear after the decimal in ... Read More

444 Views
In PHP, bcadd() math function is used to add two arbitrary precision numbers. The bcadd() function takes two random precision numbers as strings and it returns the addition of the two numbers after scaling the result to an identified precision.Syntaxstring bcadd ( $num_str1, $num_str2, $scaleVal)ParametersThe bcadd() math function accepts three different parameters, $num_str1, $num_str2 and $scaleVal.$num_str1 - It represents the left operand and it is the string type parameter.$num_str2 - It represents the right operand and it is the string type parameter.$scaleVal - It is the optional parameter that is used to set the number of digits after the decimal place in the ... Read More

4K+ Views
Data chunks in Node.js or any other language can be defined as a fragment of data that is sent to all the servers by the client. The servers make a stream of these chunks and form a buffer stream. This buffer stream is then converted into meaningful data.Syntaxrequest.on('eventName', [callback] )ParametersThe parameters are described below −eventName − It is the name of the event that will be fired.callback − Callback function to handle any error if it occurs.ExampleCreate a file with the name "index.js" and copy the following code snippet. After creating the file, use the command "node index.js" to run ... Read More

711 Views
The main aim of a Node.js application is to work as a backend technology and serve requests and return response. But we can also pass inputs directly to a Node.js application.We can use readline-sync, a third-party module to accept user inputs in a synchronous manner.Syntaxnpm install readline-syncThis will install the readline-sync module dependency in your local npm project.Example 1Create a file with the name "input.js" and copy the following code snippet. After creating the file, use the command "node input.js" to run this code.//Giving Input to a Node.js application Demo Example // Importing the realine-sync module const readline = ... Read More

212 Views
The util.debuglog() method creates a function that can be used to write the desired error/debug messages to stderr. These error messages are written only upon the existence of the NODE_DEBUG environment variable.Syntaxutil.debuglog(section, [callback])ParametersThe parameters are described below −section − This parameter takes the portion of the application for which the debug log is being created.callback − This is the callback function which will receive the pointer if any error occurs during the execution of method.Example 1Create a file with the name "debuglog.js" and copy the following code snippet - Live Demo// util.debuglog() demo example // Importing the util module const ... Read More

563 Views
The Hash class is one of the many utility classes that is used for creating the hash digests of data. The hash.update() method updates the hash content with the data passed, and the encoding that is passed along with the parameters. If the encoding is not passed and the data is a string, ‘utf8’ encoding is used.Syntaxhash.update(data, [inputEncoding])ParametersThe parameters are described below −data − This input parameter takes input for the data that will update the hash content.InputEncoding − Encoding to encode the input data or the data stringExample 1Create a file with the name "hashUpdate.js" and copy the following ... Read More

149 Views
The util.types.isNativeError() method checks whether the passed value is a built-in error type or not. If the above condition is satisfied, it returns True, else False. The error can be of any type.Syntaxutil.types.isNativeError(value)ParametersIt takes a single parameter −value − This input value takes input for the required parameter and checks if it's an error type or not.It returns True or False based upon the input value passed.Example 1Create a file with the name "isNativeError.js" and copy the following code snippet. After creating the file, use the command "node isNativeError.js" to run this code.// util.types.isNativeError() Demo Example // Importing the ... Read More

2K+ Views
The Hash class is one of the many utility classes that is used for creating the hash digests of data. The hash.digest() method calculates all the data that needs to be hashed passed inside the hash function and returns them. If an encoding is defined, a string will be returned, else a buffer is returned.Syntaxhash.digest([encoding])ParametersIt takes a single parameter −encoding − This input parameter takes input for the encoding to be applied while calculating the hash.Example 1Create a file with the name "hashDigest.js" and copy the following code snippet. After creating the file, use the command "node hashDigest.js" to run ... Read More

83 Views
The util.types.isInt8Array() method checks whether the passed value is a built-in Int8Array instance or not. If the above condition is satisfied, it returns True, else False.Syntaxutil.types.isInt8Array(value)ParametersIt takes a single parameter −value − This input value takes input for the required parameter and checks if it's an Int8Array instance or not.It returns True or False based upon the input value passed.Example 1Create a file with the name "isInt8Array.js" and copy the following code snippet. After creating the file, use the command "node isInt8Array.js" to run this code.// util.types.isInt8Array() Demo Example // Importing the util module const util = require('util'); ... Read More