Mayank Agarwal has Published 373 Articles

Node.js – process.emitWarning() Method

Mayank Agarwal

Mayank Agarwal

Updated on 29-Oct-2021 08:13:50

220 Views

The process.emitWarning() method can be used to emit custom or user-defined process warnings. This can be listened by adding a handler to the warning event.Syntaxprocess.emitWarning(warning, [options])Parameterswarning – This is the warning that will be emitted.options –type – This is the type of warning being emitted. Default ‘Warning’code – This is ... Read More

Node.js – dns.resolveTxt() Method

Mayank Agarwal

Mayank Agarwal

Updated on 29-Oct-2021 08:07:24

422 Views

The dns.resolveTxt() method uses the DNS protocol to resolve the text queries (TXT Records) for the hostname. The addresses argument passed to the callback function is a two-dimensional array that contains the array of text records available for the hostname.Syntaxdns.resolveTxt(hostname, callback)Parametershostname – This parameter takes input for hostname to be ... Read More

Node.js – process.report Property

Mayank Agarwal

Mayank Agarwal

Updated on 29-Oct-2021 07:58:52

201 Views

process.report is an object whose methods generate the diagnostic reports for the current process. It is found under the process module.Syntaxprocess.reportExample 1Create a file with the name "report.js" and copy the following code snippet. After creating the file, use the command "node report.js" to run this code.// process.report Demo Example ... Read More

Node.js – dns.lookup() Method

Mayank Agarwal

Mayank Agarwal

Updated on 29-Oct-2021 07:31:40

649 Views

The dns.lookup() method resolves the host name (e.g., tutorialspoint.com) into the first found A IPv4) or AAAA (IPv6) record. The properties available under the options are optional. dns.lookup() does not have anything to do with the DNS protocol. The implementation uses an OS facility that can associate names with addresses ... Read More

Node.js – dns.resolveNs() Method

Mayank Agarwal

Mayank Agarwal

Updated on 29-Oct-2021 07:27:42

89 Views

The dns.resolveNs() method uses the DNS protocol to resolve the nameserver records (NS Records) for the hostname. The addresses argument passed to the callback function will contain an array of nameserver records for the hostname.Syntaxdns.resolveNs(hostname, callback)ParametersThe above parameters are defined as below −hostname – This parameter takes input for the ... Read More

Node.js – process.connected Property

Mayank Agarwal

Mayank Agarwal

Updated on 29-Oct-2021 07:24:49

115 Views

The process.connected property returns True if an IPC channel is connected and will return False after the process.disconnect() method is called. This happens only when the node process is spawned with an IPC channel (i.e., Child process and Cluster).Once the process.connected property is false, no messages can be sent over ... Read More

Node.js – Timers Module – Scheduling Timers

Mayank Agarwal

Mayank Agarwal

Updated on 27-Oct-2021 07:51:47

649 Views

The timers module contains functions that can execute code after a certain period of time. You do not need to import the timer module explicitly, as it is already globally available across the emulated browser JavaScript API.Timers module is mainly categorised into two categoriesScheduling Timers − This timer schedules the ... Read More

angularjs – ng-class Directive

Mayank Agarwal

Mayank Agarwal

Updated on 08-Oct-2021 13:45:35

691 Views

The ng-class Directive in angularjs allows the user to dynamically set the CSS classes on an HTML element by databinding an expression which will further represent all those classes to be added. The class is only added if the expression inside the ngClass Directive returns True, else it will not ... Read More

AngularJS – ng-mousedown Directive

Mayank Agarwal

Mayank Agarwal

Updated on 08-Oct-2021 13:33:17

350 Views

The ng-mousedown Directive in AngularJS basically specifies a custom event on mouse-down event. We can perform multiple functions whenever the mouse is pressed and the mouse-down event is called.Syntax..content..Example − ngMousedown DirectiveCreate a file "ngMousedown.html" in your Angular project directory and copy-paste the following code snippet.       ... Read More

AngularJS – ng-app Directive

Mayank Agarwal

Mayank Agarwal

Updated on 08-Oct-2021 13:23:32

384 Views

The ng-app Directive in AngularJS is used for auto-bootstraping of an AngularJS application. This directive gives the root element of the application and is generally placed near the root element of the page like on the  or tags. This directive declares the root context from where the application will ... Read More

Advertisements