teleren/devto huggingface dataset:
Overview of Machine Learning
Published: 2020-06-02 09:01:23

Machine Learning (ML) is coming into its own, with a growing recognition that ML can play a key role in a wide range of critical applications, such as data mining, natural language processing, image recognition, and expert systems. ML provides potential solutions in all these domains and more, and is set to be a pillar of our future civilization.

What is Machine Learning?

ML is actually a lot of things. The field is quite vast and is expanding rapidly, being continually partitioned and sub-partitioned ad nauseam into different sub-specialties and types of machine learning.

Among the different types of ML tasks, a crucial distinction is drawn between supervised and unsupervised learning:

Supervised machine learning: The program is “trained” on a pre-defined set of “training examples”, which then facilitate its ability to reach an accurate conclusion when given new data.

Unsupervised machine learning: The program is given a bunch of data and must find patterns and relationships therein.

Reinforcement Learning (RL)

Machine Learning – Applications:
Web Search Engine
Photo tagging Applications
Spam Detector
Database Mining for growth of automation

few examples of machine learning that we use everyday and perhaps have no idea that they are driven by ML:-
Virtual Personal Assistants
Social Media Services
Online Customer Support
Product Recommendations
Online Fraud Detection

Machine Learning Frameworks
Machine Learning Frameworks are tools for developers to understand and design machine learning models. It helps create powerful AI software without diving into the technicalities of the algorithms.
1. TensorFlow
2. Google Cloud ML Engine
3. Sci-Kit Learn
4. PyTorch
5. Microsoft Cognitive Toolkit (CNTK)

Conclusion:
We’ve covered much of the basic theory underlying the field of Machine Learning here.
重建匿名體系---CMN匿名幣項目解讀

Published: 2020-06-02 07:47:55

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

比特幣誕生之後，成為人們匿名交易的一個選擇。但隨著比特幣的認可度越來越高，各國也相應的出臺了監管政策，比如要求交易所對用戶做kyc認證。使得比特幣只要一進交易所和日常生活關聯，無法避免的就是隱私泄露。但人們希望在生活中匿名交易的需求卻愈加強烈，在這個過程中便誕生了“匿名幣”，目前匿名幣中比較主流的有門羅幣，大零幣等，但各個匿名幣的解決方案各有不同，實現的效果也略有不同。筆者長期關註數字貨幣，今天就跟大家簡單介紹一個主網上線半年多的匿名幣CodeMason。

雖然已經有了門羅幣，大零幣等匿名幣，但匿名幣依然是一個藍海市場。畢竟私有財產神聖不可侵犯，隱私權同樣神聖不可侵犯！各個匿名幣相互競爭，也互為補充，每年都會誕生一些新的匿名幣解決方案，用戶根據自己的需求來選擇使用哪種匿名幣來使用。人們希望行業裏能夠有一個大家公認的匿名幣，但似乎也不希望只有一個選擇。

偉大事物的誕生常常是對現有技術的重構與總結，也是對某個未被滿足的巨大需求的新的解決方案。CMN的誕生是建立在匿名技術不斷成熟的2019年，那時候，環形簽名的門羅幣，零知識證明的大零幣等都已初露鋒芒，並且在匿名市場起引領作用。但因為技術選擇和自身性能限制，雖然滿足了人們隱私需求，但依舊無法滿足一部分人對轉賬效率的要求。在這種背景下，誕生了一批新的匿名幣，其中就有CMN。

CodeMason 是由一群網絡上的極客(Geek)所創建，托管在 Github 上的區塊鏈平臺，旨在重建匿名支付體系。 這些現代的極客自稱為CodeMason，繼承了遠古石匠(Mason)的理念，秉承著極客的精神與理念，希望以理性為準繩，以道德為工具，不斷地修正自身精神上的缺陷，最終能夠憑借努力完善自身，實現目標（神殿）的建造，帶領人類進入新的領域。這些現代的代碼石匠們，借鑒、吸收現有的技術與理念，以新的思想、改造、革命現有的區塊鏈支付平臺，最終演化成最適合的CodeMason區塊鏈，重建匿名支付體系。

數字資產交易的終極目標是在於去中心和和隱私性，目前的區塊鏈技術在去中心化過程中進展迅猛，但是對於隱私性的保護不足。在交易環節主要包含以下要素：貨幣的發送人、貨幣接受人、轉賬金額、轉賬方式以及IP地址。從這幾個要素入手來進行解決隱私問題，來實現匿名的效果。鑒於以上的情況，CodeMason 旨在建立一套完全隱私交易的區塊鏈網絡，該區塊鏈網絡能夠實現完全匿名的數字貨幣交易，但同時也支持目前廣泛使用的非匿名交易。CodeMason將選擇權交給用戶，在特定條件下，交易雙方選擇非匿名交易，CodeMason同樣支持。

CMN的匿名技術使用的是當下主流的“混幣”技術，以成熟的技術作為基礎，並加以優化與創新，基於X12算法的混幣技術由此而來，X12算法也是CMN混幣技術的底層支持技術之一。對於任何既定匿名發送交易來說，有關匿名發送功能的具體混幣次數取決於量化效果，它涉及到對手追溯匿名發送資金來源時的可能性。考慮到這一點，匿名發送功能的混幣環節通常為四輪。

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

混幣技術非常好理解，我們都向幣池投入相當的幣，又從幣池拿出相當的幣，但妳拿出並不是或者不確定是不是當初放入的，這就是混幣技術，因為混幣的幣池是非第三方的，所以安全性增加，基於區塊鏈的去中心化的特性，無人可以篡改，給安全性又增加了堅固護盾！

後期在發展過程中，匿名交易會按照計劃持續引入新的技術來增強匿名的效果，比如采用環形簽名技術，采用網絡通信的加密技術等。

下面來看下CMN的發行數值：
CodeMason發行總量為225,333,333.333枚，不設置預挖。
出塊時間間隔約等於2.5分鐘
減少規則：
1-40000塊，每個塊獎勵300枚；
40001塊開始，每個塊獎勵200枚； 
之後每隔16萬塊減產一次，每次減產15%
根據時間計算，到2046年年總產出低於個位數

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

主節點需要質押1024枚CodeMason。每次產出區塊的時候，區塊的獎勵的30%分給主節點，60%分配給礦工，剩下的10%分配給CodeMason開發者。
礦工組成網絡的第一層級，為用戶提供資金的發送和接收服務並防止雙花支付的發生。主節點則構成了網絡的第二層級，為與眾不同的性能提供完整支持。

和比特幣及其它加密數字貨幣一樣，CodeMason以包含所有交易的分布式帳本為基礎，這些帳本也稱區塊鏈。CodeMason和比特幣區塊鏈由於共識機制的存在得到了保障，這種共識機制被稱作工作量證明（PoW）。礦工通過專用的設備來解決難題，在難題解決後，他們有權向區塊鏈添加新的區塊。如果運行軟件的其他用戶認為難題已經得到了恰當的解決，那麽新的區塊將會被添加到區塊鏈上，而礦工也將得到區塊獎勵。主節點不參與挖礦活動，因此挖礦的設備並不能充當主節點。

與比特幣的挖礦的發展歷程相似，CodeMason的研發團隊沒有進行預挖。在主網上線伊始，為了獲取算力支撐區塊鏈網絡的運轉，全網征召CPU礦工的支持，任何擁有計算機的人都可以提交申請成為CodeMason的礦工，對礦工非常友好，也因此獲得了很多CPU礦工的支持。筆者也是看到礦工征召才發現的這個匿名項目，目前還未看到這個項目有專業礦機出現，或許不久的將來也會像比特幣的挖礦歷程一樣，出現專業礦機提供高算力來支撐CodeMason的安全與穩定。

CMN是一個以混幣技術為基礎的匿名幣，專註公平、保護隱私。它具有安全性高、交易速度快、匿名性高、不可鏈接性等特點。CodeMason的研發團隊通過對技術不斷的研發與改造，希望重建匿名支付體系，最終實現匿名交易的廣泛應用。CMN解決的不僅僅是支付與轉賬，而是有關個人，機構，企業等需要隱私保護的方方面面。隱私上的自由，才是真正的自由！

綜合來看，匿名幣確實好像加密數字資產的2.0版本，它更好的保證了我們的秘密，我們的資產由我們完全掌控，實現了真正意義上的自由，這是非常不錯的！
Kubernetes for Oh-My-Zsh
Published: 2020-06-17 11:29:48

---
title: Kubernetes for Oh-My-Zsh
published: true
date: 2020-06-02 08:36:05 UTC
tags: 
canonical_url: https://www.nealshah.dev/posts/2020/06/kubernetes-for-oh-my-zsh/
---

Increase your productivity with Kubernetes CLI, using `zsh`, `oh-my-zsh` and the `kubectl` plugin. [Here](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/kubectl) is a full list of aliases for common commands.

For example:

| Alias | Command | Description |
| --- | --- | --- |
| `k` | `kubectl` | The kubectl command |
| `kca` | `kubectl --all-namespaces` | The kubectl command targeting all namespaces |
| `kgp` | `kubectl get pods` | List all pods in ps output format |

### Install zsh

#### MacOS

Install the following packages using `homebrew`:

```bash
brew install zsh zsh-completions
```

Change your default shell using the command:

```bash
chsh -s /usr/local/bin/zsh
```

#### Ubuntu

Using `apt`:

```bash
apt install zsh
```

#### CentOS/RHEL

Using `yum`:

```bash
sudo yum update && sudo yum -y install zsh
```

### Install oh-my-zsh

Using `curl`:

```bash
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

Using `wget`:

```bash
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
```

## Add the Kubernetes plugin

Add `kubectl` to the list of plugins in `~/.zshrc`,

```hcl
...
plugins=(
    ...
    kubectl
    ...
)
...
```

Then run `source ~/.zshrc` to reload the configuration.

💥 Instead of `kubectl get pods` you can simply run `kgp`.
Need Of Data Analytics To Enhance Mobile App Development

Tags: mobileapps, technology, applications
Published: 2020-06-02 08:35:28

As per the analysis, it has been recognized that till 2021, the number of smartphone users will rise to 3.8 billion. Those days are gone when mobile phones are just for messaging or calling. Mobile apps have enhanced the way people use their mobile phones. Today, mobile apps are used by enterprises, startups, and freelancers to run an entire company via smartphone through mobile apps. It increases the dependency on mobile apps to perform day to day tasks. Such apps require a lot of data. To efficiently analyze and manage such a large amount of data, a robust information management tool is necessary. And here comes the important role of data analytics. It helps companies to gain insights from collected data by the app.

**How To Use Data Analytics to Enhance App Development?**
*1. Prior Product development-*
Before starting the development of a product, it has been necessary to thoroughly analyze the user insights and market conditions for the product. This analysis can be from different perspectives, such as market research, the performance of previous apps, analysis of comparative apps, trends in the industry, and user behavior for those apps. Rather than a type of product, a complete analysis from all the above perspectives is important in making a product admissible to your audience. Data analysis does not stop here. Rather, it increases after the product development because the analysis is also what you will need for making an app popular and survive in the market. Consistent monitoring helps for exact insights and meet the demands of the market. Know the important considerations when building a mobile app at- 7 Important considerations when building a mobile app.

*2. Post-App Development-*
For the success of any application, it should be bug-free, easy to use, and offers an elegant look. But for users to continue to use your app, it is necessary that it meets all the user requirements. Big data provides a report of analysis based on users’ experience. By carefully considering these needs, app developers can effectively design an app that fulfills the user-oriented plans and unmatched user experience. By analyzing the customer’s behavior good big data analytics firms can offer you the detailed information. This data helps business owners to think about the upcoming innovative ideas for developing new apps. Companies can effectively develop solutions to attract more customers with retaining the previous ones. Developing client-driven apps, companies will get more revenue and improve their branding.

Know more at- [https://solaceinfotech.com/blog/need-of-data-analytics-to-enhance-mobile-app-development/]
6-10PM challenge problem #005 solution
Tags: challenge, programming, algorithms, map
Published: 2020-06-02 07:56:31

<h2><b>Flatten a Dictionary</b></h2>

Solution for the <a href="https://dev.to/akbhairwal/6-10pm-challenge-problem-005-41c8">Problem#005</a> is provided in Java language.

Test cases :

<b>Test case #1</b> 
input: {"Key1":"1","Key2":{"a":"2","b":"3","c":{"d":"3","e":"1"}}}

<b>Test case #2</b> 
input:{"Key":{"a":"2","b":"3"}}

<b>Test case #3</b> 
input: {"Key1":"1","Key2":{"a":"2","b":"3","c":{"d":"3","e":{"f":"4"}}}}

<b>Test case #4</b> 
input : {"":{"a":"1"},"b":"3"}

<b>Test case #5</b> 
input : 
{"a":{"b":{"c":{"d":{"e":{"f":{"":"awesome"}}}}}}}

<b>Test case #6</b> 
input : {"a":"1"}

Solution

<div class="highlight"><pre class="highlight plaintext"><code>

static HashMap<String, String> flattenDictionary(HashMap<String, Object> dict) {   
   HashMap<String, String> out = new HashMap<String, String>();
		putAllFlat(out, "", dict);
		return out;
  }
  
  
  static void putAllFlat(HashMap<String, String>out, String key, Object dictMap) {
   	HashMap<String, Object> objMap = (HashMap<String, Object>) dictMap;		
		for(Map.Entry<String, Object> eleMap : objMap.entrySet()){		      
		       if(eleMap.getValue() instanceof HashMap){
		    	   if(key.length()>0) {
		    		   putAllFlat(out, key+"."+eleMap.getKey(), eleMap.getValue());
		    	   }else {
		    		   putAllFlat(out, eleMap.getKey(), eleMap.getValue());
		    	   }
		       
		      }else {
		    	  if(eleMap.getKey().length()>0) {
		    		  if(key.length()>0) {
		    			  out.put(key+"."+eleMap.getKey(),eleMap.getValue().toString());
		    		  }else {
		    			  out.put(eleMap.getKey(),eleMap.getValue().toString());
		    		  }		    		  
		    	  }else {
		    		  
out.put(key,eleMap.getValue().toString());
		    	  }		       
		      }		      
		    }  
  }

</code></pre></div>
PostgreSQL 12.2 on OpenBSD 6.7: Install
Tags: postgres, database, openbsd
Published: 2020-06-02 08:24:14

\* The cover image is originally by [Photos_kast](https://pixabay.com/users/photos_kast-11966122/) and edited with great appreciation.

---

[OpenBSD](https://www.openbsd.org/) [6.7 was released](https://www.openbsd.org/67.html) last month and [PostgreSQL](https://www.postgresql.org/) was upgraded from 11.7 to 12.2 then.
The installation process of PostgreSQL server in OBSD 6.7 is almost the same to that in 6.5.

## Environment

- OS: OpenBSD 6.7
- DB: PostgreSQL 12.2

## Summary

The overall steps are below:

```console
$ doas pkg_add postgresql-server

$ doas su _postgresql
$ cd /var/postgresql/
$ # changed: `--auth=md5` -> `--auth=scram-sha-256`
$ initdb -D /var/postgresql/data/ -U postgres --auth=scram-sha-256 --pwprompt --encoding=UTF-8 --locale=xx_XX.UTF-8
$ # password of superuser = postgres is asked
$ exit

$ doas rcctl enable postgresql
$ doas rcctl start postgresql
```

Each of them will be described at the rest of this post as tutorial.

## Tutorial

### Install

Get the application package from [ports](https://www.openbsd.org/faq/faq15.html) system:

```console
$ doas pkg_add postgresql-server
```

### Init database

Switch user to `_postgresql` which was created at the package installation above in order to avoid error on permission:

```console
$ doas su _postgresql
$ cd /var/postgresql/
```

Run [`init_db`](https://www.postgresql.org/docs/current/app-initdb.html) to create a database cluster:

```console
$ initdb -D /var/postgresql/data/ -U postgres --auth=scram-sha-256 --pwprompt --encoding=UTF-8 --locale=xx_XX.UTF-8
```

Here, `--auth=scram-sha-256` and `--pwprompt` are for the sake of security. `--auth=scram-sha-256` can be relaced by `--auth=md5`.
`--locale` is up to your environment. In my case, it's `ja_JP.UTF-8`.
In order not to specify locale, run without `--encoding=UTF-8 --locale=xx_XX.UTF-8` instead:

```diff
- --encoding=UTF-8 --locale=xx_XX.UTF-8
+ --no-locale
```

The password of the superuser aka `postgres` is asked:

```console
Enter new superuser password: 
Enter it again: 
```

After the process is completed, exit from `_postgersql` user:

```console
$ exit
```

### Start PostgreSQL server

Activate the daemon and start it:

```console
$ doas rcctl enable postgresql
$ doas rcctl start postgresql
postgresql(ok)
```

Finished.

### After Installation

The config files such as postgresql.conf and pg_hba.conf were created.
They are useful to [configure your servers](https://www.postgresql.org/docs/current/runtime-config.html).

[`psql`](https://www.postgresql.org/docs/current/static/app-psql.html) was also installed. It is used as a terminal-based front-end to PostgreSQL.
By using the password asked above, it's able to connect to the server:

```console
$ psql -U postgres
```

Thank you for your reading :)
A question about transforming a monolith to microservices
Tags: microservices, devops, help
Published: 2020-06-02 08:14:26

Looking to transform a monolith to static hosting with microservices (with database connection). I was asking this on Google Cloud Support, actually.

- Is it a good idea?
- Where to host static part? Does it have to be Google Cloud Storage?
- Cloud SQL vs MongoDB Atlas (vs MongoDB Stitch)?
- How to protect the API endpoints? I heard someone said API Gateway...

Truth be told, Netlify lambda threw a little error on Webpacking a MongoDB connection (IIRC, it was about encrypting as well). Should I attempt Netlify again? What about Vercel? Not to mention the database connection alive time.

I am perfectly happy with Google Cloud Run, actually (fully-managed Docker hosting platform); but is it too monolithic?
Gain in Depth Knowledge in Oracle Fusion SCM with Oracle Fusion Cloud SCM Training
Published: 2020-06-02 08:11:17

In the advanced computer era almost all businesses are run through the advance application of computers to make the business process smooth and effective. Oracle Fusion Cloud SCM, a component of the Oracle Fusion Applications that offer you a revolutionary new approach to multi-system order fulfillment and product data management. Oracle Fusion SCM is a most up-to-date Solution for Cloud Supply Chain Management for Enterprises and Business Organizations which offers a complete suite of tools and features and delivers high performance and saves time in implementation. In order to gain in depth knowledge in Oracle Fusion Cloud SCM you need advance Oracle Fusion Cloud SCM Training from a professional training center.

Oracle Fusion SCM training offers hands-on skills and helps you develop and manage applications using Oracle Supply Chain Management Cloud. You can gain all the basic fundamentals knowledge of Oracle Fusion SCM such as Fusion Inventory, Configuration management, Product management, which can help you get real-time examples and projects for the development of your business. After completion of this Oracle Fusion Cloud SCM Training you are not only able to get the advanced knowledge to clear the Oracle Fusion SCM certification exam but assist you in your business process for growth. 

You can choose the professional training center to get the up to date Oracle Fusion Cloud SCM Training and achieve in depth knowledge in this application.  These institutions not only offer you basic fundamental knowledge but offer you the best opportunity to implement this application for your better use. 

Why to opt Professional Training Center for Oracle Fusion Cloud SCM Training:

Oracle Fusion Cloud SCM Training provides businesses with flexible opportunities and helps you manage operations in an efficient way with their supply chains. If you are planning to gain the advanced Oracle Fusion Cloud SCM, they can help you achieve advanced knowledge according to business needs with minimal effort.

During this training they can also help the trainees to get real time Methodologies and the tweak that can help them to complete the project in deadline. They offer training that covers real time application functionality for easy cracking the exam.

All the trainers of this institution are expert and well trained in this profile and help you learn advanced versions of Oracle Fusion Cloud SCM and cover both Procurement and SCM at a reasonable price. They can also arrange the flexible timing; comfortable classrooms and other amenities to offer you advance teaching process and meet your advance expectation. 

If you are looking for Oracle Fusion Cloud SCM Training, you can count www.erptree.com to get the up to date and latest version training program as per your needs.

See more: https://www.erptree.com/course/oracle-fusion-cloud-scm-online-training/
TVBlocker
Tags: octograd2020
Published: 2020-05-20 11:31:02

[Comment]: # (All of this is placeholder text. Use this format or any other format of your choosing to best describe your project and experience.)

[Note]: # (If you used the GitHub Student Developer Pack on your project, add the "#githubsdp" tag above. We’d also love to know which services you used and how you used it!)

## My Final Project
This is a simple Python script that can toggle firewall rules on and off on an OpenWRT based router. That's it. That's the biggest achievement I got in college. It's all downhill from here.

## Demo Link
 I do not have a demo link up and running because I'm afraid hackers will find a way to toggle my internet off when I'm playing WoW.

## Link to Code
{% github https://github.com/PricopeStefan/TVBlocker %}

## How I built it (what's the stack? did I run into issues or discover something new along the way?)
- Python is amazing for this kind of job.
- Built using the salt I generated while his TV was too loud.
- You can't parse HTML using Regex [(Who would've thought)](https://stackoverflow.com/a/1732454/5301431)

## Additional Thoughts / Feelings / Stories

So this is a project I built during my final year of college when I moved into a new place and a roommate thought it would be a cool idea to buy a new 700$ flat TV for himself. Can't deny the fact that the TV was indeed pretty cool, it had lights in the back that adapted to the content displayed on the screen, pretty immersive experience overall. 

However, that piece of scrap was also insanely loud while playing Spotify or Youtube which was weird because my roommate wasn't deaf, he just liked it that way. So being the extremely petty person that I am I decided that if he plays music while I'm trying to sleep, I'll just cut off his internet on the TV via the web interface of our router (which is basically a fancier way of saying adding 2 iptable rules). 

Thus, this project was born. The End.

[Final Note]: # (CONGRATULATIONS!!! You are amazing!)
How to require another PropType if it's dependant on another?
Tags: tutorial, react, javascript
Published: 2020-06-02 07:53:05

---
title: How to require another PropType if it's dependant on another?
published: true
description: Typechecking With PropTypes
tags: tutorial, react, javascript
---

# How to require another PropType if it's dependant on another?

Let's look at a situation where we have few tabs and below those tabs we have a button that can do something when clicked. I'll use `<ul>` in this case to represent the tabs:

```jsx
export function Tabs(props) {

  // Basic style to create a picture: text on left, button on far right
  const newGroupTabMarkup = props.newGroupTab ? (
    <div style={{display: 'grid', alignItems: 'center',  gridTemplateColumns: '1fr 30px'}}>
      <span style={{fontWeight: '600', fontSize: '18px'}}>Groups</span>
      <button
        onClick={props.onCreateGroup}
      >New</button>
    </div>
  ) : null


  return (
    <div>
      <ul>
        {props.tabs.map(tab => <li key={tab.id}>{tab.name}</li>)}
      </ul>
      {newGroupTabMarkup}
    </div>
  )
}
```

Rendering our function component we'll see our tabs. What if we want to show `newGroupTabMarkup`?

```js
import { Tabs } from '../Tabs'

const items = [
  {id: 1, name: 'Tab 1'},
  {id: 2, name: 'Tab 2'}
]

return (
  <Tabs 
    newGroupTab
    tabs={items}
  />
)
```

This opens up room for visual errors. If our users now click the "New" button, nothing happens. What if we never supplied the "tabs" props? Try is out and see what happens. But we can fix that, but you supply the correct styling.

```js
[..]

const tabsMarkup = props.tabs ? (
  <ul>
    {props.tabs.map(tab => <li key={tab.id}>{tab.name}</li>)}
  </ul>
) : <div>Tabs not supplied</div>

return (
  <div>
    {tabsMarkup}
    {newGroupTabMarkup}
  </div>
)

[..]
```

That should fix the UI, but what about the "New" button? We could supply the props `onCreateGroup` function and everything should now work. This post is all about [Typechecking With PropTypes](https://reactjs.org/docs/typechecking-with-proptypes.html). Let's start off with "tabs" prop and what should be the required format we accept.

```js
import PropTypes from 'prop-types'

[..]

Tabs.propTypes = {
  tabs: PropTypes.arrayOf(PropTypes.shape({
     id: PropTypes.number.isRequired, // or PropTypes.string.isRequired 🤷🏽‍♂️
     name: PropTypes.string.isRequired
  })).isRequired,

  // And this:
  newGroupTab: PropTypes.bool,

  // You could put this in a regular function: function(...) { return ...}
  onCreateGroup: (props, propName) => props['newGroupTab'] === true && (props[propName] === undefined || typeof(props[propName]) !== 'function') && new Error('Please provide an onCreateGroup function!'),
  [..]
}
```
Now that we supplied "newGroupTab", an error will occur requiring us to provide "onCreateGroup" function.

```js

[..]

return (
  <Tabs 
    tabs={items}
    onCreateGroup={() => console.log("TODO: Implement new tab creation")}
    newGroupTab
  />
)
```

There will be more code required for a tab to be clickable ie "selected tab", you could easily implement that ✌🏼
Build a Secure API in PHP Using Laravel Passport
Tags: laravel, passport
Published: 2020-06-02 07:38:13

# What is Passport?
APIs typically use tokens to authenticate users and do not maintain session state between requests. Laravel makes API authentication a breeze using Laravel Passport, which provides a full OAuth2 server implementation for your Laravel application development in a matter of minutes.

**What you will learn in this video tutorial?**
  * Laravel Passport Installation & configuration
  * Login API using Laravel Passport Personal Access Tokens 
  * Register And Logout API
  * Use API in Vue.js frontend APP
  * Vuex implementation for authenticated User

{% youtube UKSQdg1uPbQ %}
[Laravel Passport Tutorial](https://www.youtube.com/watch?v=UKSQdg1uPbQ "Laravel Passport Tutorial")