teleren/devto huggingface dataset:
How to Create a Database in MongoDB
Tags: mongodb, node
Published: 2020-08-31 08:00:36

---
title: How to Create a Database in MongoDB
published: true
description: When learning a new technology, sometimes the hardest things are the simple steps that take place to get started. These are the steps that “everybody knows” but are often not discussed.
tags: #mongoDB #node
//cover_image: https://direct_url_to_image.jpg
---

## Creating a MongoDB Database with the CLI (the MongoDB shell)

Open your terminal and type the following:

```
mongo
```
Thereafter, 

```
show dbs
```
What will be retrieved is admin and local, also note that these two instances are part of every cluster.

Now let us create own! Take note that there is no create keyword. We are going to use 'use' instead.

```
use myAwesomeDB
```
We are done. Now you need to insert your schema and data for it to reflect.

Thanks for reading!
Mconnect Search Autocomplete & Suggest Extension for Magento 2
Published: 2020-08-31 07:52:58

Does your store have a large product inventory with numerous categories? Well, that can make your customers struggle a bit to find the product they are looking for. That’s when a search box comes into play. It helps customers to find their desired product with such ease. The Econsultancy found that 30% of the eCommerce store visitors use the search box by entering either name of the product or code. Because with a search box, you can save tons of precious time of your customers. Also, they don’t have to necessarily navigate through various pages, categories, and store products to find the one they need. With a quick site search functionality, you could increase your Magento 2 store’s revenue by almost 50%.

Mconnect Search Autocomplete and Suggest Extension for Magento 2 helps you achieve that. The extension facilitates your customers to find the perfect product rapidly with the help of a very interactive and elegant AJAX-based search box. The extension will show search results instantly on the same page instead of showing on the separate search page. It enhances the default Magento 2 search feature with the help of AJAX functionality. The extension is capable to autocomplete the search term when customers exceed the required characters. It will start to look for the exact and similar products from your product database. Also, the users don’t need to necessarily hit the enter key for a search to take place. 

Features of the Mconnect Search Autocomplete and Suggest Extension for Magento 2:

The extension helps to enhance the default search functionality with an advanced AJAX-based search box.

Customers can use the search features from any of the Magento 2 pages.

AJAX integration helps extension to fetch products relevant to the search query.

Also, it shows the search results as a dropdown without page redirection. 

The extension will autocomplete the search term after the user enters the minimum required characters set from the backend.

The admin has control over how many products to show on the search page.

Option to show/hide View all button to redirect the full search page.

The admin can exclude any product categories or product pages from displaying in the search result.

The extension provides frictionless search experience that boosts sales and conversion of your Magento 2 store.

For more such Magento 2 Extensions visit Mconnectmedia.com


Download now: https://www.mconnectmedia.com/search-autocomplete-m2.html
setTimeout in nodeJS
Tags: javascript, node, eventloop
Published: 2020-08-31 07:31:07

We recently started with building new messaging service, that should be made with request reply pattern.

We had no much experience how nodeJS works so we struggled with setting timeout.
Initialy we thought this should work
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ff6atg9h84f8ju9ct451.JPG)
If you will write code like us you will never get out of while loop, because setTimeout will never be executed.

It is caused because nodeJs has event loop and you have to pass context
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/pc8l1ialtiuknzlm8orh.JPG)

Have you ever struggled with same problem?
Share your ideas.
How to Use Excel COSH Function in Office 365? – {with Examples}
Tags: excelcoshfunctionino, excelfunctions
Published: 2020-08-31 12:27:38

---
title: How to Use Excel COSH Function in Office 365? – {with Examples}
published: true
date: 2020-08-31 07:15:39 UTC
tags: ExcelCOSHFunctioninO,ExcelFunctions
canonical_url: https://geekexcel.com/how-to-use-excel-cosh-function-in-office-365-with-examples/
---

## Excel COSH Function:

![COSH Function](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/08/EXCEL_KX6bhJ0bCa.png)<figcaption id="caption-attachment-12985">COSH Function</figcaption>

In this article, you will learn how to use **Excel COSH Function in Office 365** with its syntax, explanation, and examples. Let’s step into this article!! Get an official version of **MS Excel** from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)



## **COSH Function – Explanation:**

- This function returns the **hyperbolic cosine of a given input number**.
- For example, **COSH(-2)** returns the output value as **3.7622**

## **Syntax:**

**=COSH(number)**

### Parameter Description:

**Number** – The input number to which you want to find the hyperbolic cosine.

The formula for the hyperbolic cosine is:

![Hyperbolic Cosine Formula](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/08/1-99.png)<figcaption id="caption-attachment-12959">Hyperbolic Cosine Formula</figcaption>

### Note:

- If the argument is a non-numeric value (letters and special characters) and then it returns [**#VALUE!** Error](https://geekexcel.com/how-to-fix-value-error-in-excel-office-365-with-example/).

## **Examples:**

Let’s see some examples to make it clear.

### Example 1:

- Refer to the below example image.
- You can see the input real numbers in **Column A** and its corresponding hyperbolic cosine output values in **Column B**.

![Example 1](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/08/2-84.png)<figcaption id="caption-attachment-12966">Example 1</figcaption>

### Example 2:

- If the argument is a non-numeric value (letters and special characters) and then it returns[**#VALUE!** Error](https://geekexcel.com/how-to-fix-value-error-in-excel-office-365-with-example/).

![Example 2](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/08/3-54.png)<figcaption id="caption-attachment-12967">Example 2</figcaption>

## **Verdict:**

In this article, you can understand the usage of **Excel COSH Function in Office 365** with its syntax, explanation, and examples. Drop your **feedback** in the comment section. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!!

### Read Also:

- [How to Use Excel POWER Function in Office 365? – [with Examples]](https://geekexcel.com/how-to-use-excel-power-function-in-office-365-with-examples/)
- [How to Use Excel ACOS Function in Office 365? – (with Examples)](https://geekexcel.com/how-to-use-excel-acos-function-in-office-365-with-examples/)
Mconnect Product Quick View Extension for Magento 2
Published: 2020-08-31 07:14:44

Need to boost your Magento 2 store sales and conversion? One study found that 75% of the visitor would leave the site if the store is not optimized to find things they are looking for in an easy way. Product information plays an important role in selecting the right product your customers want to purchase. Also, Baymard’s study found that only about 46% of overall eCommerce stores are optimized in a proper way. Other stores suffer due to little to no content on their website’s product listing pages. Therefore, you need a solution that provides customers with sufficient product information on the product listing pages so that your customers can make better-informed decisions.

Mconnect Product Quick View Extension for Magento 2 would help store owners to boost their store’s user experience during the buyer’s journey to find the perfect product for their needs. This extension would help you to increase sales and conversion of your store. How? Well, the extension provides a quick preview of the product detailing all the necessary information. It would eliminate the process for your customers to visit the product pages to know more. When customers hover over the product image in the category or product listing pages the quick view button will appear. When users click on that, a popup window will open with all the important information to show the customers. The admins of the store have creative control over what information to show. 

Features of the Mconnect Product Quick View Extension for Magento 2:

Customers can have a quick preview of the product without visiting the page. 

Show the necessary information about the product in an elegant popup window.

Option to add the product directly to the cart from the popup itself.

The popup will be fully responsive to all the devices.

It improves the buyer’s journey to find their favorite product quickly.

Admin has control over what information to show in the popup window.

Option to show/hide product description.

Backend option to customize the quick view button text.

For more such Magento 2 Extensions visit Mconnectmedia.com

Download now: https://www.mconnectmedia.com/product-quickview-magento-2.html
Mconnect Product Part Finder Extension for Magento 2
Published: 2020-08-31 06:41:26

Do you sell spare parts of automobile products on your eCommerce store? I am sure that it won’t be an easy job for any eCommerce store to sell those. Also, it won’t be an easy job for your customers either to find the perfect automobile product especially when you have a large number of spare products. Because spare parts of different automobile products are different. And to find perfect spare products, customers need to enter the make model, year of manufacture, model number or other such attributes to narrow down the search. Because as per one study, 75% of customers would leave if they are unable to find what they are looking for in around 15 seconds or less. So, you need a solution that helps your customers to find the perfect spare part of the automobile product they are looking for. 

Mconnect Product Part Finder Extension for Magento 2 helps customers to find and narrow down the automobile spare parts as per their needs. The admin of the store can display the search box for part finder on any of the category or CMS pages. This part finder allows your customers to find products by using predefined filters. It is capable to filter product based on the make model, year of manufacture, model number, and other product attributes that eases the work of customers to find the perfect required products. Also, the AJAX integration makes this a lot faster because the product appears without any reload of the page when applied some filters. It drastically increases the user-experience of your eCommerce store for your customers.

Features of Mconnect Product Part Finder Extension for Magento 2:

The international store can use the extension for selling various automobiles and other spare products. 

Customers would be able to find products easily with the help of this extension.

It allows you to create many product attribute filters from the backend grid.

It is capable to import and export data with a CSV file.

The option of drag and drop to arrange the filter for the part finder.

Showcase the part finder filters on any category or CMS page.

The search box will appear on the top of the page to let customers find the perfect product.

AJAX integration eliminates the page reload when filters are applied to display products.

Also, a reset option provided to clear all the applied filters.

For more such Magento 2 Extensions visit Mconnectmedia.com

Download now: https://www.mconnectmedia.com/product-part-finder-extension-m2.html
You Contribute You Rock - (Submission)
Tags: actionshackathon, github, showdev, formaintainers
Published: 2020-08-31 06:34:52

### Hey there folks :wave:
This is a summary of my previous 3 weeks that I spent on github actions. As I wrote in the previous blog, I am developing a `Contributor Appreciator` Action called `YouRock`.

>_This is my submission for :hash:actionsHackathon_

## Aim and Impact
This action will help :hash: **maintainers** to improve the `outreach` and Public Relations.  

## What it do? 
Sends out a personalized email appreciating the contribution with some badges and **Image Processed Personalized Material**

#### Submission Categories: 
:hash:Maintainer Must-Haves, :hash:Wacky Wildcards.   

## What it looks like?

![](https://dev-to-uploads.s3.amazonaws.com/i/6i6rektrha9wi4w78fd3.gif)

## How it works?
When a user contributes to a particular repository, the `YouRock` action gets triggered and performs the following steps:
1. User's public data gets fetched from `Github graphQL API`. 
2. A small image processing task gets executed. It pastes the `mask` image by doing facial recognition using `OpenCV`.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qd6xd0a6o7iarm74hnnv.png)

**_(In this case the mask image is given below :arrow_down: But it can be changed easily according to the organizations need)_**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e62qsfcytg1sz5nnd28a.png)

3. Then a mini mailing server sends the email from your given email.

## How to test?

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/oo03juzr2lvyr1ue74xt.png)

1. Just open a new issue on this [YouRock](https://github.com/TheShubham99/YouRock) Repo.
2. You'll receive a personalized email (email account linked to your **Github**)

{% twitter 1300155509656285184 %}

## How to use it in your repository?
- Yes, you can use it in your organization or even for your personal repository.
- [here is a detailed guide for that.](https://github.com/TheShubham99/YouRock#how-to-use-it-in-your-repo)

### Driver Code _**(Update)**_ - 
- Check out the [Rock.py](https://github.com/TheShubham99/YouRock/blob/master/Rock.py) file to know how it works.

### Code - 
1. Fetching Users Data. [JOB - start_sending]
```
- uses: octokit/graphql-action@v2.x
        id: start_sending
        with:
          query: |
            query send($login:String!){
              user(login:$login){
                  login
                  avatarUrl
                  email
                }
              }
          login: ${{ github.actor }}
```

2. Run Python Script [JOB - Send Email]

```
- name: Send Email
        run: |
          python ./Rock.py '${{steps.start_sending.outputs.data}}' '${{github.repository}}'
```
## [Actual Workflow file](https://github.com/TheShubham99/YouRock/blob/master/.github/workflows/Appreciate.yml)

### Stack
1. Github Actions running on ubuntu.
2. Python.
3. open-cv.
4. Pillow.
5. GraphQL API.

#### Repository - https://github.com/TheShubham99/YouRock/
How to Build a Smart Contract based MLM Platform like Forsage?
Tags: smartcontract, bitcoin, mlm, startup
Published: 2020-08-31 06:33:29

If you are looking to start your own Smart Contract based MLM Business like Forsage, Then Forsage Clone helps you to launch it in a few days. These Readymade solutions will help in faster development of your MLM Platform instead of building it from scratch and also cut down the investment costs.

##Forsage Clone Script

[Forsage Clone Script](https://www.employcoder.com/forsage-clone-script) is a powerful and feature-rich Smart Contract MLM Script that assists you to develop and launch your own MLM platform as similar to Forsage. Forsage Clone MLM Script is a ready-made package of source code with all the outstanding features of Forsage, with which one can easily start an MLM business.

##Steps to Launch Smart Contract MLM Platform

1. Get our Forsage Clone Script.

2. Customize the Forsage MLM Clone Script according to your business needs with the help of our Blockchain Development Team.

3. Add the respective additional features that you want to integrate into your MLM Website to enable efficient services.

4. Launch your Smart Contract MLM Platform into the market, watch your MLM business grow, and in return which makes you huge revenue.

##Where to Get the Best Forsage Clone Script?

We Employcoder provides you the best Forsage Clone Script package which helps in faster development and also cuts down the MLM Platform Development costs and enables you to Launch your own [Smart Contract based MLM](https://www.employcoder.com/smart-contract-based-mlm-platform-development) similar to Forsage.

We offer the Popular Smart Contract MLM Clone Scripts such as

##Smart Contract MLM Clone Scripts

1. [Million Money Clone Script](https://www.employcoder.com/million-money-mlm-clone-script)
2. Forsage Clone Script
3. Etrix Clone Script
4. XOXO Clone Script
5. Ethereums Cash Clone Script
6. Doubleway Clone Script and a lot more to kickstart your MLM business.

If you are an entrepreneur or business owner looking to invest in this flourishing market, there is no better time than now. Start an MLM Platform with Forsage Clone and earn in million within days of launching your MLM business.

Get an Exclusive Free Demo of our Forsage Clone Script !!
Improve your Chrome by enabling these flags
Published: 2020-08-31 06:32:53

Make your Chrome browser better by enabling a few flags.

To enable a flag follow any link below, and select "Enable" in the menu. Then relaunch Chrome.
If you want to deactivate a flag, go to the link, select "Default" or "Disabled" and relaunch Chrome.

##**1. Hide full URL path (since Chrome 85)**

This cool feature was added a week ago in the new version of Chrome. By enabling it any URL path in omnibox will be hidden.
There are two flags. If you choose first, to see the full path you need to hover on omnibox. Otherwise, you need to interact with the page.

On hover: chrome://flags/#omnibox-ui-reveal-steady-state-url-path-query-and-ref-on-hover
On interaction: chrome://flags/#omnibox-ui-reveal-steady-state-url-path-query-and-ref-on-interaction

Before:

![Before](https://dev-to-uploads.s3.amazonaws.com/i/8lqavenz5009gu311812.png)

After:

![After](https://dev-to-uploads.s3.amazonaws.com/i/lxzbtdnaoedxttj3rf0b.png)

##**2. Tab hover cards**

Flag: chrome://flags/#tab-hover-card-images

By enabling this flag, when you hover on the tab there will be a mini-card of it.

Tip: there will be a normal image only if you had already visited the tab. If not, you'll see the world icon.

Example:

![Example](https://dev-to-uploads.s3.amazonaws.com/i/bdtlmztvpaz3if1hpqog.jpg)


##**3. Smooth scrolling**

Flag: chrome://flags/#smooth-scrolling

Sometimes when you're scrolling down a page it twitches a little. With this flag, we can fix it.

##**4. Tab strip**

Flags:
chrome://flags/#webui-tab-strip
chrome://flags/#webui-tab-strip-demo-options
chrome://flags/#top-chrome-touch-ui

After enabling them you'll get the new tab bar and your browser interface will be changed a lot. Your Chrome will be fullscreen!

Examples:

![Example](https://dev-to-uploads.s3.amazonaws.com/i/ysionb8acr28dsbya7lk.png)
![Example](https://dev-to-uploads.s3.amazonaws.com/i/ur1xp63slg78pszgyc8d.png)

##**5. Tab groups**

Flag: chrome://flags/#tab-groups

Do you have many open tabs in Chrome? Chrome works on the feature, that allows users to group tabs, change the group name, and color. With it, your productivity will increase!
To create a group, right-click on any tab.

Example:

![Example](https://dev-to-uploads.s3.amazonaws.com/i/uydw63l2o6hsc4rppovm.png)


##**6. "New" badge on menu items**

Flag: chrome://flags/#enable-new-badge-on-menu-items

To keep abreast of new features in Chrome, enable this flag and near any new item, there will be a nice badge.

Example:

![Example](https://dev-to-uploads.s3.amazonaws.com/i/mf6c58svlg2p59pj6kx1.png)

That's all I want to say. Thanks for reading!
DocumentFragment 🤔
Published: 2020-08-30 00:32:00

---
title: DocumentFragment 🤔
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---
I recently found out about `DocumentFragment`, which is something I had never heard of before so I figured maybe a lot of other people never came across it either. 

A `DocumentFragment` is described on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment) as 
> a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is due to the fact that the document fragment isn't part of the active document tree structure. Changes made to the fragment don't affect the document (even on [reflow](https://developer.mozilla.org/en-US/docs/Glossary/reflow)) or incur any performance impact when changes are made.

Each time you add elements to the DOM, the page has to immediately update. For example, say you have a lot of items you want to add to a list. Below is a silly example that loops 10,000 times and each time it creates an `<li>` element, appends that to a `<ul>` that exists in the DOM already, and for each of those iterations there is an inner loop that runs 100 times. Each of those times it creates a `<p>` element, appends it to the previously created `<li>`, and creates a text node with the current `count` value, which is then appended to the `<p>`. Every time it appends an element the DOM has to update. This code would result in A LOT of updates.

```
const ul = document.querySelector('ul');
let count = 0, li, p;

for (let i = 0; i < 10000; i++) {
	li = document.createElement('li');
	ul.appendChild(li);
	
	while (count < 100) {
	  p = document.createElement('p');
	  li.appendChild(p);
	  p.appendChild(document.createTextNode(count));
	
	  count++;
	}
	
	count = 0;
}
```

Because fragments aren't part of the DOM, the contents that are added to it won't be rendered until the fragment is appended to the document. By using a fragment, you can append as many elements as you want to it as you're looping and then add the fragment into the document after. In this example, once the fragment is added its child nodes are removed and placed onto the `<ul>`. The fragment itself is not added into the document.

```
const ul = document.querySelector('ul');
let count = 0, li, p;
const fragment = document.createDocumentFragment();
  
for (let i = 0; i < 10000; i++) {
	li = document.createElement('li');
	fragment.appendChild(li);
	
	while (count < 100) {
	  p = document.createElement('p');
	  li.appendChild(p);
	  p.appendChild(document.createTextNode(count));
	
	  count++;
	}
	count = 0;
}
  
ul.appendChild(fragment);

```

Using `DocumentFragment` helps when manipulating the DOM to avoid unnecessary re-renders, which results in faster code.