- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- 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 380 Articles
Mayank Agarwal
116 Views
The dnsPromises.reverse() method performs a reverse DNS search to resolve the IPv4 or Ipv6 address to an array of hostnames. The promise is rejected with an Error object if a Success status is not encountered.SyntaxdnsPromises.reverse( ip )where, ip is the parameter that takes the input for the IP address to ... Read More
Mayank Agarwal
59 Views
The dns.resolveSoa() method uses the DNS protocol to resolve the start of authority records for the hostname. The address argument passed to the callback function will be an object that will contain the following properties −nsnamehostmasterserialrefreshentryexpireSyntaxdns.resolveSoa(hostname, callback)ParametersIt accepts the following parameters −hostname – This parameter takes the input for the ... Read More
Mayank Agarwal
9K+ Views
We can download file using Node.js by either using third-party libraries or using some inbuilt packages.Method 1: Using 'https' and 'fs' moduleWe can use the http GET method to fetch the files that are to be downloaded.The createWriteStream() method from fs module creates a writable stream and receives the argument ... Read More
Mayank Agarwal
138 Views
The diffieHellman.computeSecret() is used for computing the shared secret using the public key of other's party and returning the computed shared secret. The suppliedKey is interpreted using the specified inputEncoding and the secret is encoded using the specified outputEncoding. If the inputEncoding is not specified the other publicKey is expected ... Read More
Mayank Agarwal
265 Views
A timer can only be cancelled after it is being scheduled. The Immediate class has an object for setImmediate() method and passes the same object to clearImmediate(), in case it wants to cancel the scheduled timer function.Scheduling TimersThis type of timers schedules the task to take place after a certain ... Read More
Mayank Agarwal
6K+ Views
In this article, we will see how to integrate Redis Cache with Spring Boot. We will learn how we can configure Redis data inside the Spring boot cache.Let's look at the dependencies first that are required to import Redis into a Spring boot application.Dependencies// Adding spring-boot cache & redis dependencies ... Read More
Mayank Agarwal
161 Views
The dns.lookupService() method resolves a given address and port into a hostname and service. This method uses the operating system's underlying getnameinfo implementation. A TypeError will be thrown if the address is not a valid IP address.Syntaxdns.lookupService(address, port, callback)Parametersaddress - This parameter takes input for the IP address that needs ... Read More
Mayank Agarwal
83 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
295 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
738 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