This article shows how you can pass command line arguments/parameters to any Node.js programs or .js file.
Here’s an example:
Problem Scenario:
You are working on Hyperledger Fabric and you are following this tutorial: Chaincode for Developers and when you try building your chaincode, it hungs up forever.
You run the following command on your terminal to build the chaincode you wrote:
This is a solution to one problem scenario while working on Hyperledger Fabric. I was working on modifying a Hyperledger Fabric Sample Application called fabcar. You can face this issue with other sample apps as well.
The issue occurred when I tried modifying the function name in the chaincode file of the sample app.
This article shows how you can base64 encode and decode string using both Nodejs and Javascript.
Javascript: Base64 encode/decode string
Encode String
This article shows how you can get the associated Simple Product ID and Quantity (Qty) / inventory from a Configurable Product in frontend product detail page in Magento 2.x.
– The below code assumes that Swatches have been used in the product detail page.
– Suppose you have two configurable attributes (color and size) for your configurable product.
– When you click on any color swatch and then click on the size swatch:
– then the available stock quantity of that particular color & size associated product will be displayed.
This article shows how you can copy files and folders from your local machine to remote server. Also, how you can copy files and folders from the remote server to your local machine.
We will use SCP protocol for this purpose. SCP stands for Secure Copy Protocol. It’s a means of securely transferring computer files. Files can be transferred between local host and remote host, or between two remote hosts.
A Set object holds the unique values of any type like array or object. An array or any other iterable object can be passed to Set.
– It’s a new data structure introduced in JavaScript ECMAScript 6 (ES6).
– It has useful methods for iteration over the Set values.
A Javascript Map object holds the key-value pairs of elements. An array or any other iterable object can be passed to the Map.
– Map is a new data structure introduced in JavaScript ES6.
– It’s an alternative to JavaScript Object for storing key/value pairs.
– It has useful methods for iteration over the key/value pairs.
This article deals with creating a Javascript object and using different functions on the object. We also see how we can loop through the object and get the values.
Create a new Javascript Object