
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
Mayank Agarwal has Published 373 Articles

Mayank Agarwal
124 Views
The diffieHellman.setPrivateKey() sets the Diffie-Hellman generated private key. The private key will be a string if an encoding argument is provided. If no encoding is provided, the private key will be of type buffer.SyntaxdiffieHellman.setPrivateKey( privateKey, [encoding] )Parametersencoding - This parameter specifies the encoding of the private Key.Example 1Create a file ... Read More

Mayank Agarwal
363 Views
A 'warning' event is emitted whenever a Node.js event emits a process warning. The process warning is similar to an error that describes the exceptional conditions that are being brought to the user's attention.Node.js can emit warnings whenever it encounters any bad coding practices that could lead to poor performance ... Read More

Mayank Agarwal
988 Views
The Timeout object is internally created and is returned from the setTimeout() and setInterval() methods. You can use this object and pass it to either clearTimeout() or clearInterval() if you want to cancel the scheduled actions.Following are the timeout class ref objects that can be used to control the default behaviour ... Read More

Mayank Agarwal
591 Views
Redis also supports the monitor command that lets the user to see all the commands received by the Redis server across all the client connections. These connections include commands from everywhere, including other client libraries and computers as well.The monitor event will monitor all the commands which are executed on the ... Read More

Mayank Agarwal
139 Views
The stringDecoder.end() method will return any remaining input that is left in the internal buffer as a string. Bytes that are left incomplete and represent UTF-8 and UTF-16 characters are replaced with the substitution characters appropriate for character encoding.StringDecoder.write() method is called before returning the remaining input if any buffer ... Read More

Mayank Agarwal
3K+ Views
The retry_strategy is a function that receives objects as parameters including the retry attempt, total_retry_time that indicates the time passed after it was connected the last time, the error due to which the connection was lost, and the number of times_connected in total.If a number is returned from this function, ... Read More

Mayank Agarwal
152 Views
This process.noDeprecation() method states whether the --no- Deprecation flag is set or not on the current Node.js project. This Boolean flag controls whether the deprecation warning messages are printed to stderr or not. Setting this flag as True will silence all the deprecation warnings.Syntaxprocess.noDeprecation( )Example 1Create a file with the ... Read More

Mayank Agarwal
115 Views
The dns.resolvePtr() method uses the DNS protocol to resolve the pointer records (PTR Records) for the hostname. The addresses argument passed to the callback function will contain the reply records as an array of strings.Syntaxdns.resolvePtr(hostname, callback)Parametershostname - This parameter takes the input for the hostname to be resolved.callback - This ... Read More

Mayank Agarwal
101 Views
The dnsPromises.resolveSoa() method uses the DNS protocol to resolve the Start of Authority records (SOA Records) for the hostname. On success, the promise is resolved with the following propertiesnsnamehostmasterserialrefreshretryexpireminttlSyntaxdnsPromises.resolveSoa( hostname )Parametershostname - This parameter takes the input for the hostname to be resolved.Example 1Create a file with the name "resolveSoa.js" and ... Read More

Mayank Agarwal
2K+ Views
The client.end(flush) method forcibly closes all the connection to the Redis server without waiting until all the replies have been parsed. This method just closes all the connection and ongoing streaming between the Node and Redis server. If you want to exit cleanly, you should use client.quit() method.Syntaxclient.end(flush)Parametersflush - This ... Read More