teleren/devto huggingface dataset:
Prototypal Inheritance In JavaScript
Tags: javascript, beginners, inheritance, prototypeinjavascript
Published: 2020-09-11 09:30:52

---
title: Prototypal Inheritance In JavaScript
published: true
description: Inheritance In JavaSript
tags: ["javascript",  "beginners", "inheritance", "prototypeInJavascript"]  
//cover_image: https://direct_url_to_image.jpg
---

I have recently gone through some of the roots in JavaScript. It always fruitful when you look back to the basics of any Language. 

There were a couple of questions in my Mind like 

- What is Prototype in JS?

- What is Prototypal Inhertictane? How it is different from OOPS Inhertictane.

- How does Class work in JS?

In order to get all the answers, I created a small program on both the JS versions (Es5 and ES6).

Doing a practical will give you more understanding than reading and watching videos. 

So let's get started.


Inheritance in Older Version 

- Step 1 

Create a function(Tile) which will act as a base class.

- Step 2 

Create a function(PushableTile) which will act as a Child class.

- Step 3 

Assign the Prototype of Base class to Child class prototype. 

- Step 4 

Add methods to the child class, we will use it to access the Parent Class. 

- Step 5 

Create an Object from Child Class 


```javascript
// Base Class 
function Tile (x,y,type){
    this.x = x;
    this.y = y;
    this.type = type;
}


// Child Class
function PushableTile(x, y, type) {
    Tile.call(this, x, y, type);
}

// Inheritence 
PushableTile.prototype = Object.create(Tile.prototype);

// Add Methods to the child class 
PushableTile.prototype.push = function(x, y) {
    this.x += x;
    this.y += y;
};

var object = new PushableTile(100,200,300);
```

Inheritance in New JS Version

Step 1 

Create a base class (Tile) with a constructor.

Step 2 

Create a Child class with the constructor.

Step 3 

Add Super to the Base Class. It will help to pass the same parameters to the Parent class. 

Basically, it is doing the same thing as the below code is doing.

```javascript Tile.call(this, x, y, type); ``` 

Step 4 

Add methods to the Child class. 

Step 5 

Create an Object from Child Class 



```javascript
// Base Class 
class Tile {
     constructor(x,y,type){
        this.x = x;
        this.y = y;
        this.type = type;
        console.log("CONSTRUCTOR");
     }
}

// extends is same as PushableTile.prototype = Object.create(Tile.prototype);
class PushableTile extends Tile{
    constructor(x, y, type) {
      // Tile.call(this, x, y, type);
      super(x, y, type);
    }

    push(x, y) {
        this.x += x;
        this.y += y;
    }
}

const object = new PushableTile(100,200,300);
```
Vue Telemetry, a new tool to analyze and discover Vue websites
Tags: vue, nuxt, webdev, news
Published: 2020-09-11 09:28:37

A brand new developer tool was launched just some days ago: it is Vue Telemetry, a project composed by a browser extension and a database of known Vue websites.

The browser extension is available for both Chrome and Firefox, and when visiting a website made with Vue, it will report all known information about the used stack: in particular it lists details about Vue implementation and, if present, the Framework, UI Framework, Vue plugins, and Nuxt modules.

![Vue Telemetry extension](https://dev-to-uploads.s3.amazonaws.com/i/0n58lv8d132gdlcnrufj.png)
<figcaption>The report of Vue Telemetry website itself.</figcaption>


The website is found at https://vuetelemetry.com, and its showcase lists websites detected and submitted by the browser extension. The sites are filterable by the same criteria detected by the extension.

![Vue Telemetry website](https://dev-to-uploads.s3.amazonaws.com/i/0iwxhutdm03mfriobr0a.png)
<figcaption>The filterable showcase on Vue Telemetry website.</figcaption>


---

<small>*Vue Telemetry was made by Sébastien Chopin and the Nuxt team.*</small>
Digital Payment Trends 2020 – Customer Experience Redefined 

Tags: mobileappdevelopment, mobileapp, appdevelopmentservices
Published: 2020-09-11 09:26:20

he trends in the digital payment apps are moving at a fast pace because now more and more people prefer to make the payments online. The online payment methods are like a blessing that has made payments more convenient than ever before. E-payments mobile app development services are redefining the customer experience for businesses. 
https://sites.google.com/view/digital-payment-trends-2020/
How to Use Excel GEOMEAN Function in Office 365? – [with Examples]
Tags: excelfunctions, excelgeomeanfunction
Published: 2020-09-11 12:18:16

---
title: How to Use Excel GEOMEAN Function in Office 365? – [with Examples]
published: true
date: 2020-09-11 09:20:38 UTC
tags: ExcelFunctions,ExcelGEOMEANFunction
canonical_url: https://geekexcel.com/how-to-use-excel-geomean-function-in-office-365-with-examples/
---

## Excel GEOMEAN Function:

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

In this guide, you will understand the usage of **Excel GEOMEAN Function in Office 365** with its syntax, description, and examples. 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)

## **GEOMEAN Function – Description:**

- This function **returns the geometric mean of a given array or range of data**.
- Refer to the following equation to calculate the **GEOMEAN.**

![Formula](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/Formula-2.png)<figcaption id="caption-attachment-13709">Mathematical Formula</figcaption>

## **Syntax:**

**=GEOMEAN(number1, [number2],..)**

### Arguments Description:

**Number1 ** – It is the first input number or cell reference.

**Number2 ** – It is an optional one. It can be a number or cell reference.

### **Note:**

- The arguments can be **Numbers,**  **Names,**  **Arrays, or**  **References**.
- This function ignores **Empty cells, Boolean values, and Text, any Non-numerical characters**.

## **Examples:**

Let’s see some examples to clearly understand how to use the **GEOMEAN** Function.

### Example 1:

- You can see the input values in **Column A** , and its geometric mean is printed in the **cell B9**.

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

### Example 2:

- This function ignores **Empty cells, Boolean values, and Text, any Non-numerical characters**.

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

From the above example, you can clearly see that the geomean function ignores the text values, symbols, and empty cells & calculate the geomean value of the given input and prints the output in the desired cell.

## **Verdict:**

In the above article, you can understand the usage of **Excel GEOMEAN Function in Office 365** with its syntax, description, and examples. Kindly, give your **feedback** in the comment section. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!!
Azure DevOps Time Tracking Made Easy
Tags: productivity, advice, timetracking
Published: 2020-09-11 09:15:36

Time Tracking is traditionally not very fun to do, and usually adds quite a bit of overhead to the workflow.

7pace Timetracker is the solution. 7pace is the only integrated, professional time management solution for teams using Azure DevOps. Here is a list of some of the features:
- From user stories to individual work items, measure work and track progress without a second of wasted effort;
- Desktop and mobile, an integrated API, and more options to get project and time data wherever you need it;
- Full visibility into the work your team’s done. Keep everyone in sync and every project on track;
- Plan, execute, and measure every part of your software development process; 
- Integrate time data with enterprise systems to get all the data you need.

We want to share with you a short video on how to install and integrate 7pace into Azure DevOps, and how to track time with azure boards.

Because as the saying goes, Time is Money.

[![7pace Timetracker: Azure DevOps Time Tracking Made EASY](http://img.youtube.com/vi/JQt8NpAm_3s/0.jpg)](https://www.youtube.com/watch?v=JQt8NpAm_3s&amp;feature=youtu.be)
How to Use Excel HARMEAN Function in Office 365? – [with Examples]
Tags: excelfunctions, excelharmeanfunction
Published: 2020-09-11 12:17:57

---
title: How to Use Excel HARMEAN Function in Office 365? – [with Examples]
published: true
date: 2020-09-11 09:05:02 UTC
tags: ExcelFunctions,ExcelHARMEANFunction
canonical_url: https://geekexcel.com/how-to-use-excel-harmean-function-in-office-365-with-examples/
---

## Excel HARMEAN Function:

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

In this article, we are going to learn the usage of **Excel HARMEAN Function in Office 365** with syntax, description, and examples. Let’s get 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)

## **HARMEAN Function – Description:**

- This function returns the **harmonic mean for a given set of input values**.
- The harmonic mean is a reciprocal of the **arithmetic mean** of reciprocals.

## **Syntax:**

**=HARMEAN(number1, [number2],…)**

### Arguments Description:

**Number1 ** – It is the first value or cell reference.

**Number2** – It is an optional one. It can be a second value or cell reference.

### Note:

- This function ignores **Empty cells, Boolean values, and Text, any Non-numerical characters**.
- The arguments can be **Numbers in an array format.**

## **Examples:**

Let’s see some examples to make it clear.

### Example 1:

- Refer to the below screenshot.
- You can see the input range in **Column A,** and its output harmean value is printed in the **cell B9**.

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

### Example 2:

- This function ignores **Empty cells, Boolean values, and Text, any Non-numerical characters**.

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

## **Wrap-Up:**

In this article, you can clearly understand the usage of **Excel HARMEAN Function in Office 365** with syntax, description, and examples. Drop your **feedback** in the comment section. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!!
A horrible coincidence
Tags: math, cookies
Published: 2020-09-11 08:52:06

---
title: A horrible coincidence
published: true
description: Saving a few bytes in JavaScript leads to a sober reminder.
tags: Math, cookies
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/4i97kqabddpd6ynaz64c.jpg
---
<small>Image by [Nicolas Poupart](https://www.pexels.com/@nicolas-poupart-1241079)</small>

I'm working on some cookie code where the cookie needs to expire one year from now. Well, not _exactly_. The full story is that the cookie needs to expire _no later than one year from now_.

This involves the following snippet of JavaScript:

```js
date.setTime(date.getTime()+(365*24*60*60*1000));
```

That's the number of days in a year, times the number of hours, times... well, you get the picture. Computers are weird: they calculate dates as the number of milliseconds which have passed since New Year 1970.

That calculation above is trivial for a computer and results in the number 31,536,000,000. But could I express it in fewer bytes? My first thought was to express it as a power, using `Math.pow()`. `Math.pow()` takes two parameters: the number and the exponent. Perhaps there was a pairing of such numbers which would use the smallest amount of bytes and create a number which was _slightly_ less than 31,536,000,000.

I did the dumb thing: I [found a cube-root calculator](https://www.omnicalculator.com/math/cube-root) and started plugging in exponents, until I found a number which rounded down well. The initial number was 9.00179. The exponent was 11. Rounding this down led to a cookie which would expire two days before the deadline.

Excitedly, I updated the code, to see how many bytes I would save:

```js
date.setTime(date.getTime()+Math.pow(9,11));
```

I glanced at the calendar, and remembered what happened on this day, nineteen years ago. Here's some more numbers: 2,977 people died that day. More than 6,000 were injured. Suddenly the maths seemed less fun.

Note that 9<sup>11</sup> would produce this rough approximation of the number of milliseconds in a year any time it was calculated. I just happened to stumble upon this today.
Craft Better Looking Vue Apps Using Tailwind CSS
Tags: webdev, javascript, css, tutorial
Published: 2020-09-11 18:28:37

---
title: Craft Better Looking Vue Apps Using Tailwind CSS
published: true
date: 2020-09-11 08:43:01 UTC
tags: webdev, javascript, css, tutorial
canonical_url: https://snipcart.com/blog/tailwind-vue-tutorial
---

![Craft Better Looking Vue Apps Using Tailwind CSS](https://snipcart.com/media/205227/tailwind-vue.png)

How do you feel about CSS?

It has always been a love-hate relationship for me. 

I mean, I like to experiment with it. However, my teammates at Snipcart have laughed at my demos’ design more than once (not that I agree with them.)

That’s why I’m so glad that we now have tools like Tailwind CSS to smooth devs’ relations with CSS.

On the other hand, I can confidently say that [Vue.js](https://snipcart.com/blog/wordpress-vue-headless) is more part of my expertise. Today, let’s bundle these two tools while learning **how to set up Tailwind CSS with [Vue](https://snipcart.com/blog/vuejs-debugging).**

Here’s what this tutorial includes:

- Generating a Vue 3 app
- Setting up Tailwind CSS
- Defining data to play with Tailwind
- Pushing the configuration further

I’ll also cover the naming convention in Tailwind at the end of the tutorial. It should be fun. Let’s go!


## What is Tailwind CSS?

![tailwind-css-tutorial](https://snipcart.com/media/205228/tailwindcss-tutorial.png)

In a nutshell, **[Tailwind CSS](https://tailwindcss.com/) is a utility-first CSS framework for rapidly building custom designs.**

Don’t worry if you’re not familiar with it. I’ll debunk that definition in a moment. 

But let’s start at the beginning.

Tailwind came on the scene as an answer to CSS frameworks that “were doing too much”. The most popular of these frameworks that came before it being [Bootstrap](https://getbootstrap.com/), I’ll use it as a point of comparison here.

Bootstrap came with a bunch of predefined styles for components such as buttons, icons, or cards. While it enabled fast shipping times, it didn’t do much in terms of offering *custom* designs. With time, the problem is that you can start to easily identify Bootstrap projects because they have similar looks. 

That’s not how Tailwind CSS works. Instead of giving you pre-styled components, it “provides low-level utility classes that let you build completely custom designs without ever leaving your HTML.”

That’s what **utility-first** means in that first definition. If it still sounds nebulous to you, the tutorial below will make it more concrete.


→ Read the full tutorial [here](https://snipcart.com/blog/tailwind-vue-tutorial)
Magento or BigCommerce
Published: 2020-09-11 08:11:34

According to SimilarTech, BigCommerce powers 37,278 online stores including Toyota, Tyler’s, and Clarks. Magento has a much bigger market share with 133,425 websites and big brands such as Bauhaus and Burger King on their client list. In 2018, the total value of merchandise sold on websites handled by Magento amounted to $155 billion. This doesn’t mean you need to choose Magento and call it done. 

Ease of use

Setting up a BigCommerce website is much easier than Magento. The BigCommerce dashboard demands only minimal coding knowledge and has an intuitive dashboard that makes it simple for store owners to get their site up and running. 

With Bigcommerce, you get access to step-by-step instructions, useful tutorials, and tooltips that simplify the website development process. In the paid plan, BigCommerce provides excellent customer service. Additionally, the ecommerce solution comes with a website builder that enables merchants to build and operate the website without web technical knowledge.

How easy is Magento to use? Building an ecommerce store on Magento requires the technical expertise of the platform, thus you’ll need to hire a certified Magento development company that has an experienced team of developers with profound knowledge in HTML, CSS, PHP, Java, and JavaScript programming languages. 

Magento is written on PHP, so you can customize the store the way you need and has access to unlimited selling capacity. On the other hand, BigCommerce also allows you to customize your ecommerce website store but with many restrictions and this customization can cost a pretty penny.

SEO

Search engine optimization is vital for any ecommerce store. Recent research claims that 75% of users only check the first page of Google results. If your company doesn’t show up on the first page on the search engine, there is a high probability that your potential customers won’t find your brand. 

To develop your online business, you need to optimize your store for search engines. Fortunately, both BigCommerce and Magento come with powerful SEO tools. Both platforms give you an opportunity to perform significant tasks such as optimizing your pictures, customizing page meta tags, altering search links.

BigCommerce has many SEO features such as robots.txt file and Google sitemap to perform professional SEO configurations for your pages and headlines. With BigCommerce, store owners also get access to a program called SocialShop that enables you to post promotions on Facebook, Pinterest, and Twitter. 

Magento is known for its SEO friendly options. Being a self-hosted platform, Magento Open Source offers a lot more flexibility and control regarding SEO for maximum output. Magento 2 has introduced many improvements to SEO such as Auto-Generation and Schema.org features. Auto-Generation is aimed to set templates for product metadata and Schema.org could help to boost the search engine rankings of your ecommerce store. 
Keep reading <a href="https://elogic.co/blog/big-commerce-vs-magento-which-ecommerce-platform-is-right-for-your-retail-business/">here</a>
Vue SFC support (Vetur) not working for you? There are simple ways out. (Possibly also other SFC's, e.g. Svelte.)
Tags: vue, svelte, vscode, webdev
Published: 2020-09-11 08:10:21

As I have complained about TypeScript support in SFC's, including Vue and Svelte. There seem to be simple ways out, at least for Vue.

{% post https://dev.to/patarapolw/why-are-we-using-single-file-components-in-the-first-place-1nl3 %}

## Easiest way

Do you know that your `HelloWorld.vue` can be as simple as

```vue
<template src="./HelloWorld/index.html" />
<script lang="ts" src="./HelloWorld/index.ts" />
<style scoped lang="scss" src="./HelloWorld/index.scss">
```

Also, from my playing around, I can omit `lang="ts"`, but not `lang="scss"`.

## Omitting `*.vue` extension

This is possible too, via Webpack settings.

```js
// vue.config.js

module.exports = {
  configureWebpack (config) {
    config.resolve.extensions.unshift('.vue')
  }
}
```

## Folderize everything

It is also possible to use `./HelloWorld` instead of `./HelloWorld/index.vue` (or `./HelloWorld.vue`).

- `./HelloWorld/index.vue`

```vue
<template src="./index.html" />
<script lang="ts" src="./index.ts" />
<style scoped lang="scss" src="./index.scss">
```

Noted that because you unshifted, instead of pushing, `index.vue` will be prioritized before `index.ts`.

Also, via this way, you can also create `./index.spec.ts` (i.e. testing file).

## Other kinds of Single File Components

I haven't tested with Svelte, but it would be nice, because I wouldn't have to worry about TypeScript support of [Svelte language server of VSCode](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).

I believe [it should also work](https://github.com/sveltejs/svelte-preprocess#external-files).
Merge and Unmerge Cells in Excel in Java
Tags: java, excel, mergecell
Published: 2020-09-11 08:01:19

Merging cells is the operation of merging two or more cells in the same row or column into one cell. It is often used when we need to apply a header across multiple columns or rows. This article will introduce how to merge and unmerge cells in an Excel file by using Free Spire.XLS for Java.

**Installation**
**Method 1:** Download the [Free Spire.XLS for Java](https://www.e-iceblue.com/Download/xls-for-java-free.html) and unzip it. Then add the Spire.Xls.jar file to your project as dependency.

**Method 2:** You can also add the jar dependency to maven project by adding the following configurations to the pom.xml.

```xml
<repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.xls.free</artifactId>
        <version>2.2.0</version>
    </dependency>
</dependencies>
```

**Merge cells:**

```java
import com.spire.xls.FileFormat;
import com.spire.xls.Workbook;
import com.spire.xls.Worksheet;

public class MergeCells {
    public static void main(String[] args){
        //Create a Workbook instance
        Workbook workbook = new Workbook();
        //Load the Excel file
        workbook.loadFromFile("test1.xlsx");

        //Get the first worksheet
        Worksheet sheet = workbook.getWorksheets().get(0);
        //Merge cells by range
        sheet.getRange().get("A1:C1").merge();

        //Save the resultant file
        workbook.saveToFile("MergeCells.xlsx", FileFormat.Version2013);
    }
}
```

**Output:**
![](https://dev-to-uploads.s3.amazonaws.com/i/kr2xxkk69i1a1d70yfte.jpg)



**Unmerge cells:**

```java
import com.spire.xls.FileFormat;
import com.spire.xls.Workbook;
import com.spire.xls.Worksheet;

public class UnmergeCells {
    public static void main(String[] args){
        //Create a Workbook instance
        Workbook workbook = new Workbook();
        //Load the Excel file
        workbook.loadFromFile("MergeCells.xlsx");

        //Get the first worksheet
        Worksheet sheet = workbook.getWorksheets().get(0);
        //Unmerge cells by range
        sheet.getRange().get("A1:C1").unMerge();

        //Save the resultant file
        workbook.saveToFile("UnMergeCells.xlsx", FileFormat.Version2013);
    }
}

```

**Output:**
![](https://dev-to-uploads.s3.amazonaws.com/i/atdogsst62tsvopypcsc.jpg)