-

- -

Sunday, October 27, 2019

How to Install Node.js and NPM on Windows

 .

Introduction

Node.js is a run-time environment which includes everything you need to execute a program written in JavaScript. It’s used for running scripts on the server to render content before it is delivered to a web browser.

NPM stands for Node Package Manager, which is an application and repository for developing and sharing JavaScript code.

This guide will help you install and update Node.js and NPM on a Windows system and other useful Node.js commands.

Tutorial on how to install, use, update and remove Node.JS and NPM (Node package manager)

Prerequisites

  • A user account with administrator privileges (or the ability to download and install software)
  • Access to the Windows command line (search > cmd > right-click > run as administrator) OR Windows PowerShell (Search > Powershell > right-click > run as administrator)

Note: If you want to install the run-time environment on a different operating systems, check out our guides on installing Node.js and NPM on CentOS 7.

How to Install Node.js and NPM on Windows

Step 1: Download Node.js Installer

In a web browser, navigate to https://nodejs.org/en/download/. Click the Windows Installer button to download the latest default version. At the time this article was written, version 10.16.0-x64 was the latest version. The Node.js installer includes the NPM package manager.

Location of download link of NodeJS installer.

Note: There are other versions available. If you have an older system, you may need the 32-bit version. You can also use the top link to switch from the stable LTS version to the current version. If you are new to Node.js or don’t need a specific version, choose LTS.

Step 2: Install Node.js and NPM from Browser

1. Once the installer finishes downloading, launch it. Open the downloads link in your browser and click the file. Or, browse to the location where you have saved the file and double-click it to launch.

2. The system will ask if you want to run the software – click Run.

3. You will be welcomed to the Node.js Setup Wizard – click Next.

4. On the next screen, review the license agreement. Click Next if you agree to the terms and install the software.

5. The installer will prompt you for the installation location. Leave the default location, unless you have a specific need to install it somewhere else – then click Next.

6. The wizard will let you select components to include or remove from the installation. Again, unless you have a specific need, accept the defaults by clicking Next.

7. Finally, click the Install button to run the installer. When it finishes, click Finish.

Step 3: Verify Installation

Open a command prompt (or PowerShell), and enter the following:

node -v

The system should display the Node.js version installed on your system. You can do the same for NPM:

npm -v

Testing Node JS and NPM on Windows using CMD

How to Update Node.js and NPM on Windows

The easiest way to update Node.js and NPM is to download the latest version of the software. On the Node.js download page, right below the Windows Installer link, it will display the latest version. You can compare this to the version you have installed.

To upgrade, download the installer and run it. The setup wizard will overwrite the old version, and replace it with the new version.

How to Uninstall Node.js and NPM on Windows

You can uninstall Node.js from the Control Panel in Windows.

To do so:

  1. Click the Start button > Settings (gear icon) >  Apps.
  2. Scroll down to find Node.js and click to highlight.
  3. Select Uninstall. This launches a wizard to uninstall the software.

Basic Node.js Usage

Node.js is a framework, which means that it doesn’t work as a normal application. Instead, it interprets commands that you write. To test your new Node.js installation, create a Hello World script.

1. Start by launching a text editor of your choice.

2. Next, copy and paste the following into the text editor you’ve just opened:

var http = require('http');
 http.createServer(function (req, res) {
   res.writeHead(200, {'Content-Type': 'text/html'});
   res.end('Hello World!');
 }).listen(8080);

3. Save the file, then exit. Open the PowerShell, and enter the following:

node \users\<your_username>\myprogram.js

It will look like nothing has happened. In reality, your script is running in the background. You may see a Windows Defender notice about allowing traffic – for now, click Allow.

4. Next, open a web browser, and enter the following into the address bar:

http://localhost:8080

In the very upper-left corner, you should see the text Hello World!

Right now, your computer is acting like a server. Any other computer that tries to access your system on port 8080 will see the Hello World notice.

To turn off the program, switch back to PowerShell and press Ctrl+C. The system will switch back to a command prompt. You can close this window whenever you are ready.

Conclusion

You should now be able to install both the Node.js framework, and the NPM package manager. You’ve also written your first node.js JavaScript program!

The NPM framework gives access to many different JavaScript solutions, which can be found at npmjs.com.

.

From:

https://phoenixnap.com/kb/install-node-js-npm-on-windows

Saturday, January 19, 2019

Blogger HTML Widget Show Specific Label Posts In Blogger



.
1.Goto Blogger Layout
2.Add a new Widget. select HTML type.
3.Add the following codes into the body of Widget.


 alternative codes:

JavaScript Compressor Packer Unpacker Obfuscator


.

1) http://javascriptcompressor.com/

2) http://dean.edwards.name/packer/

3) https://www.strictly-software.com/unpacker/

4) https://javascriptobfuscator.com/Javascript-Obfuscator.aspx

How To Run WordPress with SQLite.


.

Run WordPress with SQLite.

1) Get a copy of WordPress from here and expand the files in into Web root or wherever you website source is stored.

2) Get the SQLite integration plugin from here and expand the files.

3) Place the SQLite integration plugin folder in your wp-content/plugins directory.

4) Copy the db.php file found in the sqlite-integration folder to wordpress/wp-content folder.

5) Rename wordpress/wp-config-sample.php to wordpress/wp-config.php.

6) Add the following lines in the config file.

define('DB_FILE', 'wordpress.db');
define('DB_DIR', dirname(__FILE__).'/');


7) Visit your WordPress install url and you should see the setup page.

note:
You can enable the SQLite plugin on the plugins page and visit the Miscellaneous page and optimize the database every time there is a new plugin installed/removed or there is need to do a database cleanup.

Optimization will drop the size of the database by only keeping the required content of posts, pages, and plugins, this will improve the performance of WordPress overall.
.

alternatively, you may download a prepacked zip file (wordpress v.4):
https://github.com/sdsharma/wordpress-sqlite

Monday, October 8, 2018

Using ObservableHq Online (Notebook) Editor For JavaScript ML Programming Like Python Jupyter Notebook

 


.

Observable is not just another JavaScript sandbox. It introduces the notebook paradigm to JavaScript projects, those of you familiar with Jupyter notebooks, this is the equivalent with JavaScript instead of Python. It turns out JavaScript is very well-suited to this type of paradigm.

What’s more, JavaScript developers already have some sort of familiarity with reactivity since most frontend frameworks and view libraries build on it. It’s a different kind of reactivity, in that the library only re-renders or re-computes the section of the application that needs it (cf. Vue, Angular, React).

.

https://codewithhugo.com/observablehq-notebooks-for-javascript-demos-and-prototypes/

Thursday, October 4, 2018

The Difference Between Machine Learning and Neural Networks



.

A neural network (also called an “artificial neural network”) is a type of machine learning model that is usually used in supervised learning. By linking together many different nodes, each one responsible for a simple computation, neural networks attempt to form a rough parallel to the way that neurons function in the human brain.


The idea behind neural networks was first born in the 1950s with the perceptron algorithm. A perceptron is a simplified model of a human neuron that accepts an input and performs a computation on that input. The output is then fed to an activation function, which decides whether the neuron will “fire” based on the output value.


While one perceptron cannot recognize complicated patterns on its own, there are thousands, millions, or even billions of connections between the neurons in a neural network. This allows the network to handle even highly complex inputs.


Researchers “train” a neural network over time by analyzing its outputs on different problems and comparing them with the correct answers. Using an algorithm known as backpropagation, the neural network can adjust the influence of any particular node in the network, attempting to reduce the errors that the network makes when calculating a final result.

.


https://www.verypossible.com/insights/machine-learning-vs.-neural-networks