The tx.origin global variable refers to the original external account that started the transaction while msg.sender refers to the…
Oracles are used to get data from real world to the smart contracts on blockchain. Problem Statement Smart contracts are unable to connect…
Convert IPFS Hash to bytes32 format If you are using bs58 version 4.0.0 , do the following If you are using bs58 version 5.0.0 , do…
abi.decode Consider the following solidity snippet If you want to do the same in subgraph, do the following in your mapping.ts file toUtf…
Things to note It is required that the files which you're trying to read are pinned on the IPFS node that the Graph Node indexing the…
Truffle dashboard Truffle dashboard helps you to connect any application on your computer to the metamask in your favorite browser. When ran…
The crypto module Node.js comes with its own cryptography module out of the box. And this article tries to explain how to get most out of it…
For more info: https://en.bitcoin.it/wiki/Weaknesses This article is a kind of course notes for https://academy.moralis.io/courses/bitcoin…
Getting funds You can get testnet LINK token using the links mentioned in chainlink docs https://docs.chain.link/docs/link-token-contracts…
Solution 1: Find and Kill the process using PID Let us assume that you want to kill a process running at localhost:3000 Find the PID using…
Inspiration https://itstillworks.com/download-multiple-files-using-idm-30721.html Another method: Create a file like: serve that sample…
Many will choose to freelance by considering the advantages in freelancing solely, and fail because of that. In this post I will tell you…
Braces A brace is either of the two marks { and } . In programming the braces are usually used to surround a block of statements. Square…
This guide is primarily for Windows PC . However you might find some useful information on replica sets here. Step 1: Initial Setup…
Mirroring a website is the process to mirror the entire website in the local system . Downloading entire website onto the system enables…
Hyper-V is Microsoft's hardware virtualization product. It lets you create and run a software version of a computer, called a virtual…
1. Working for free Sometimes when doing work for friends and neighbours is done for free. Avoid it. You can offer them a discount(max 3…
You definitely know that objects in JavaScript are made up of keys and values. The order of the keys will be usually in the order of…
Have a Dedicated Study Space Create a Study Plan Be Disciplined & Consistent Have a Reliable Internet Connection & Other Resources Follow…
Below are the meanings of common torrent terms: Peer A peer is someone downloading the file from a seeder but who doesn't yet have the full…
Sometimes it might be confusing which one to use among wrapPageElement and wrapRootElement . In this I will explain you when to use which…
Are you struggling to delete a folder. And if all the normal ways using Del , Shift+Del ,etc., doesn't workout. Then this article may help…
Here's a cheat sheet Example of usage in a script:
Introduction You may have tried running C/C++ programs using VSCode before. If you are not successful in doing so, this tutorial is for you…
Did you accidentally deleted any important files/folders? Now MicroSoft is providing a Windows File Recovery tool to recover your files. I…
There is a built-in tool in windows, using which you can clean the deallocated files in you hard drive. But however, if you want to sell…
JavaScript provides a sort method on every array(using prototype). Using the sort method you can sort arrays simple without having to…
Time Complexities of Sorting Algorithms Algorithm Data Structure Time Complexity Best Average Worst Quicksort Array O(n log(n)) O(n log(n…
In this aticle we discuss how to fix the following error: This error was currently occuring in beta version of vue-test-utils or @vue…
Testing code after sometime just remind you of the setTimeout functionality in JavaScript. Problem But when you simply write a setTimeout…
I have been watching a tutorial lately, and was suprised how the instructor managed to exclude node_modules folder without any .gitignore…
In vuetify creating a DatePicker is an easy task, but attaching it to a input field, adding collapse and expand feature to it needs ome work…
Yesterday I was installing the latest Windows 10 Pro on my laptop. And I figured out the hard way to do it right. Generally installing…
Earlier today I discovered an interesting way to keep (store) a CSS style on an element using CSS transitions. This is probably best…
To print hello world using your bash script. Run the following in your Bash terminal: echo is a Bash builtin command that writes the…
You can also provide compilation options that travel with your code via a tsconfig.json file. To start a new TypeScript project, cd into…
You need a TypeScript compiler to compile your TypeScript code into JavaScript code, so that you can execute it. So we begin with installing…
Writing TypeScript code means writing JavaScript code(ES6, ES7,etc.,) .Sometimes TypeScript is referred as a superset of JavaScript…
Node.js is an open-source and cross-platform runtime environment that executes JavaScript code outside of a web browser. We often use NodeJS…
For URL validations, you might not need a third party package always. You can use built-in URL package inside NodeJS or a URL constructor in…
While debugging your javascript code, you may have used console.log . But if you want to display the object in the UI, you need to convert…
Few days ago, I was trying to validate a mobile number using JavaScript. I wanted to use a regex . This a small snippet that I used to…
I am learning Vue for a new project lately. So, as a react developer I am searching something that's similar to create-react-app in the…
Out of curiosity, I started searching for a script to get the accent colors of external websites, kind of like Chrome does it in the most…
Component description This component renders a random image whenever its mounted, which is obtained from a third party API . You need to…
React Hooks are introuduced in React v16.8. One of those new hooks is useState hook. In this article I will walk you through a simple…
Arrays and objects are used in almost every javascript application. In this article we focus on how to insert an element into an array using…
Substring The syntax of substring is: Output will be of type string . While using substring you need to know the indexes both the start…
The split method on the string prototype is used to split strings in JavaScript. The general syntax of the split method is The separator…
The rest and spread operators are introduced in ES2015/ES6. The easiest way to remember these two operators is(this is what I use) rest will…
If you want to remove any character from a string, you can use replace method, but if you only want to remove extra spaces that were…
The modulo (%) operator in JavaScript works the same as it will in any other programming languages. It is used to get the remainder of any…
I am creating this post, just to generate the ISOString of current time. You can use this method to generate ISOString using any date object…
The new Date object always has the current date and time information of your PC. To create a new Date object, you can use: There are…
In this post we are going to create a function that accepts a string as an argument and returns the string with capitalized first letter…
To check whether a given number is Integer, we have a isInteger method available on Number object in JavaScript. The isInteger method…
The filter() method was introduced in JavaScript in ES2015 (ES6). This is a straight forward post explaining how to use it. The syntax of…
Today I have discovered a new flag --short , that can be used in git status command. This will hide the files in the subfolders getting…
Compare two commits in the CLI The following command lets you see the changes in between two commits. The commits are identified using…
To generate a random number in the JavaScript, you can just use default random method on Math object: The above code will generate some…
Creating a new branch If you want to just create a new branch (out of current branch), run the following command: The above command will…
Adding a file To add new file to the GIT staging area, run the following command with your desired filename along with the extension. Adding…
Problem While working with images in frontmatter using Gatsby, I got the following error: Explanation I have stuck with this error for…
Cloning a remote repository To clone a repository into your PC, you need to have the URL of the repository that needs to be cloned. Then…
To add a new remote to your existing repo, use the following command You can verify the remotes using the command:
Committing the staged files in your repo To commit all the staged fields, you can use the following command by adding a commit_message…
If you want to add an alias for a git command, use the following command: Example usage of the above command will be like git config…
Annotated tag To add an annotated tag, use the command: For e.g., you can do git tag -a v1.0.0 -m "initial release - mvp" To add an…
ES2015 i.e., ES6 has introduced a new way to concat strings with variables or create multi-line strings in JavaScript. This feature is…
Today I was trying to organize some scripts, where I have many lines of text and I need to eliminate duplicate lines. I knew that this can…
If you have multiple SQL Server instances for different zone in that server. You can set the timezone differently for each instance using…
We can get the Client IP Address from the request object on the server. Most of these information about the client lies in the headers. The…
I have been trying to figure out about the information that server gets. One of things the server can know is the browser version (also the…
Problem Gulp task not finishing, stuck at Starting a task only... Explanation CLI showing Starting <taskName>.. but not finishing it…
When using @now/static-build , now will serve the internal 404 page. That's the issue with some static site generators like GatsbyJS . But…
Open Git bash. I assume that you have VS Code installed on your PC. Run the following commands: And fill the files with the following…
In this post I will walk you through my setup how I manage multiple GitHub accounts with SSH keys. You can replicate the process for…
If you want to use Git without using password, then SSH key is the solution. Using SSH key is highly recommended and followed by…
Have you ever worked on a team where people use other OS along with windows(with Git as version-control system). In such case tesing or…
While running npm scripts there are certain situations where you need to set an environment variable for just that particular instance of…
TL;DR Create a react app Install electron and electron-builder Install foreman Configure using npm-scripts Setup a Procfile Setup package…
You can use preload.js which will be loaded before other scripts run in the page. This script will always have access to both electron…
I got this error when I recently tried to upgrade my Calculator which is developed in electron few years ago. Later I figured out that the…
I will walk you through my process when publishing packages to npm. Creating repo Create a new github repository with some name. Creating…
The system clipboard is a feature that most of us heavy computer users probably couldn’t survive a day without. While it’s mostly used for…
You know that MDX is created to support JSX syntax inside Markdown files. It helps you to write React components inside any Markdown files…
If you are publishing a package on npm, you should read this post. In this post I had made a clear differece between npmignore and gitignore…
Adding a tag To add a tag to a git repository, run the following command: Adding a tag with a message attached to it If you want to add a…
Do you ever wrote a shell script in your nodejs project. Shell scripts are very useful. Similarly npm scripts are also very useful to run…
Declaring a variable in C language will be based on the datatype of that variable. Declaring & Initializing variables in a program The…
Today when building a GatsbyJS site I got an error of 'Duplicated documents'. I got it when I ran gatsby build in my Git Bash terminal…
The following program is to print some text in the console using C language.
The trim() method returns a new string after removing the whitespace characters the beginning and the end of the original string…