teleren/devto huggingface dataset:
Using WordPress API with React - Parsing Special Characters
Tags: wordpress, react
Published: 2020-10-20 10:05:44

While I was working with the **WordPress REST API**, I encountered that the response from the WordPress API contained few undesired things such as HTML tags and special characters such as `&#8217;`. For example:

```
<p>Hey there! A young and eager to learn native English speaker
here. I&#8217;m a Materials Science graduate from the University
of Cambridge and have a broad range of experiences in
engineering and education, from saving elephants in 
South Africa to manufacturing design in Cyprus. I&#8217;m happy
to code and develop my skills as an intern.</p>
```

I wanted to get rid of the `<p>` tags and replace the special characters with appropriate *human-readable* characters.

After spending some time on solving this problem, I found a couple of node packages which solve my problem. They are
* striptags
* he

Let's first start with striptags. *Install* it using: ``` npm i striptags``` 

Here's an *example* usage of striptags:
```
import striptags from 'striptags';
var html = <p>Functional consultant specialized on financials
 modules of Oracle E-Business Suite.</p>

striptags(html);
```
You can actually do a lot of things with this package, for example, you can decide which tags you want to keep, and which tags you want to replace.

So the next problem was that I was receiving some special characters like I&#8217;m, which was meant to be I'm. To solve this,  I made use of a decoder named as [he](https://github.com/mathiasbynens/he).

Installed the package using:
```npm install he``` 
Then, I used the package 
```
import he from 'he';

he.decode('Hey there! A young and eager to learn native English 
speaker here. I&#8217;m a Materials Science graduate from the
University of Cambridge and have a broad range of experiences 
in engineering and education, from saving elephants in South
Africa to manufacturing design in Cyprus. I&#8217;m happy to code
and develop my skills as an intern.');
```

####And the output was 
```
Hey there! A young and eager to learn native English speaker here.
I'm a Materials Science graduate from the University of Cambridge
and have a broad range of experiences in engineering and education, 
from saving elephants in South Africa to manufacturing design
in Cyprus. I'm happy to code and develop my skills as an intern.
```

I share my learning experience in form of writing blogs, so I write anything new learned. *Don’t hesitate to clap if you considered this a worthwhile read!*
µTemplate : Vue3 without tooling, greatissime 
Published: 2020-10-20 10:00:39

Many developpers love Vue, but if you want to build an app, you have to deal with all the 'node toolset'.
What if you could the same without building tool ?

Documentation : [µTemplate](https://github.com/WebReflection/uce-template)

You can test the demo here : [Demo](https://flems.io/#0=N4IgzgpgNhDGAuEAmIBcIB0ALeBbKIANCAGYCWMYaA2qAHYCGuEamO+RIsA9nYn6wA8AQgC0ogATwsECUgjk6yCT1wAHXhD4TxAPgA6dQdIiiA5gCcIW3YID0J81ZuHDI8RIZ0kEsvDByCmR0fmS8OqIGRojqUAyIvmAAvPogAK6wpjFqcYipUYYSEoJg8ACeMBJgPGrIUUVgal4SwCrcUNwWqBKW1nQSAL6FxXalFRAF-cWOvS5TRQAqMsWNXrrAwNLBZgMD9qt0uok9znTD9jOnk0UlsBZkavBSZbUpILjcSGkw+cMQAB4aCxPeQkBjfJ7AYYNCDwNJqAAUAEoWtCihIrHCLP1Nlhtt0AOQAd06UCQBKG80Gw0pN1Gdwe8EmFwgsXiE04kBgCDCdCo6AATALUABGEUgAaEehMFjoDAAKyoxB4fC08FYnFUagoEAsrAARgx9dAJVKQIxmKwMLAwEquLx+Or0BKALrEKDBADW-No5plrAyWVZOXZnDSFgI6Bw8DUYFQdjsaToak9Zmt3FwicyomyuQgAAEAAwYAUYEUCuy4YIKu3lWqsar3R6ugZAA)


```html
<!-- the defined component -->
<the-green></the-green>

<!-- and its definition -->
<template is="uce-template">

  <style scoped>
  span { color: green }
  </style>

  <the-green>
    The <span>{{thing}}</span> is green
  </the-green>

  <script type="module">
  export default {
    setup() {
      return {thing: 'world'}
    }
  }
  </script>

</template>
```
Powerlevel10k CLI wizard to generate Oh-My-Zsh! theme
Tags: zsh, vscode, terminal, linux
Published: 2020-10-20 09:54:25

So, if you use zsh, don't just try `random` theme. `powerlevel10k/powerlevel10k` is not in there.

{% github romkatv/powerlevel10k no-readme %}

## What is powerlevel10k?

Powerlevel10k is a highly customizable theme, for CLI environment, zsh specifically. (I do realize about [oh-my-bash](https://ohmybash.nntoan.com/), but I haven't looked into it much.)

CLI is all text, but when you have [a right font](https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k) and a good color palette, it is very powerful.
Send Notification via Slack if Condition Meets User Uploaded Profile with WayScript
Tags: startup, tutorial, wayscript
Published: 2020-10-20 09:42:39

Introduction
------------

Today, we’ll use the WayScript platform to build a script to send Notification via Slack if Condition met in user-uploaded file.

Prerequisites
-------------

No prerequisites for this tutorial but here is the documentation worth reading.

*   [Working with Form Trigger](https://docs.wayscript.com/library/triggers/form-trigger)
*   [Working with Slack](https://docs.wayscript.com/library/logic/conditionals)
*   [Working with conditions](https://docs.wayscript.com/library/modules/slack)

Form Trigger
------------

For the Trigger, we’ll use Form Trigger. The objective is to receive files, then run the script and the conditions following the Trigger.  
Add it as a new Trigger.

![Adding Trigger](https://wayscript.com/blog_img/141/1.png)

Now we can configure the Trigger. First, let’s add useful information to the form.

![Adding Descriptions](https://wayscript.com/blog_img/141/2.png)

We can now create the form element. Choose File input as element type and .pdf for extensions.

![Adding Form elements](https://wayscript.com/blog_img/141/3.png)

Conditionals
------------

The next step is to put some conditions on the file before sending the Slack notification. For this tutorial, we’ll ensure that we are receiving a pdf file.  
Add If/Else as a new step.

![Adding conditionals modules](https://wayscript.com/blog_img/141/4.png)

Once it’s done, we’ll add an input: the comparison. We’ll compare the extension of the file to “pdf” string.

![condition](https://wayscript.com/blog_img/141/5.png)

Great. If you’ve noticed, adding an If/Else module creates two branches: one If the condition is valid (If branch) and one if the condition is invalid (Else). WayScript allows you to add many modules to the branches. It all depends on your needs. Well, in the If branch, add the Slack module.

![Adding Slack module](https://wayscript.com/blog_img/141/6.png)

If you’ve added the module, we can easily configure it now.

![Configuration of Slack module](https://wayscript.com/blog_img/141/7.png)

And now, let’s add a message.

![Slack Message](https://wayscript.com/blog_img/141/8.png)

Great! In the Else branch, I’ve added the Write to Log module, to print a message when the condition is not met.

![Log message](https://wayscript.com/blog_img/141/9.png)

if you’ve followed well this tutorial, here’s how your workflow should look like.

![Workflow image](https://wayscript.com/blog_img/141/10.png)

The Script is ready now. Be sure to have your Trigger turned on, so everyone can access the webpage.

Conclusion
----------

Questions about this script or anything else? Join our [Discord](https://discord.gg/VWbXSbj). We're always around to help. If you want to work with the full script template, just find it [here](https://wayscript.com/user/mangabo_kolawole/ie7G0FO_)
WFH Essentials List 
Tags: workstations, productivity
Published: 2020-10-20 09:09:34

Made a WFH Essentials Checklist to keep track of all Home Office Setup Purchases, and what to buy next. It's Trending on Product Hunt Today
https://www.producthunt.com/posts/wfh-essentials-list
![WFH Essentials](https://dev-to-uploads.s3.amazonaws.com/i/o9k0m556met2vrnj4gn1.png)
Hacktoberfest
Tags: hacktoberfest
Published: 2020-10-20 09:07:55

I am very Grateful to be part of the hactoberfest.
This is my first time i took part in this fest
which gave me so happiness that i will continue this in future too.
I able to learn many new things which help me in the future to put my interest further.
Thank you @DigitalOcean for believing in me .
Regards
Bhavna Mishra.
What is useContext() in React?
Tags: react, javascript, webdev, codenewbie
Published: 2020-10-20 09:05:09

In my previous blog about [contextType](https://dev.to/olenadrugalya/what-is-contexttype-1b75) I explained that we use **contextType** only in `class-based` components.
This post will explain **useContext()** hook, which is used only in `function` components.
If you’re new to hooks, you might want to check out the [overview](https://reactjs.org/docs/hooks-overview.html) first on the official React docs page.

## What is useContext()?

React provides the above hook for functional components to get access to `context` without `Context.Consumer` component. To understand better, lets remember how we use `Consumer` in functional components:
```react
import React from 'react';
import MyContext from './MyContext';

const Person = () => {
   return(
     <PersonContainer>
       <MyContext.Consumer>
         {context => context.authenticated ? 
            <p>Authenticated!</p> : <p>Please log in</p>
         }
       </MyContext.Consumer>
     </PersonContainer>
   )
}
```

To start using the hook, first we need to import **useContext()** to our project file to be able to use it:
```javascript
import {useContext} from 'react';
```
Now we can use it anywhere in our file. To do that we need to create a variable which will store our **context** data:
```javascript
const myContext = useContext(MyContext);
```
NOTE: When the nearest <MyContext.Provider> above the component updates, this hook will trigger a re-render with the latest **context** value passed to that provider. 

Having **context** data stored now, we can log it for example:
```react
console.log(myContext);
```
AND of course we can use it instead of `MyContext.Consumer`:
```react
import React, {useContext} from 'react';
import MyContext from './MyContext';

const Person = () => {
   return(
     <PersonContainer>
         {myContext.authenticated ? 
            <p>Authenticated!</p> : <p>Please log in</p>
         }
     </PersonContainer>
   )
}
```
Summary:
1.) useContext() hook is used to get **context** data and use it anywhere in the file
2.) it can be used only in `functional` components
3.) it will trigger a re-render with the latest **context** value passed to the **context** provider. 

If you like to read my blog, you can [buy me coffee!](https://ko-fi.com/olenadrugalya) :)
Enabling Remote State with Terraform
Tags: technology, terraform
Published: 2020-10-21 14:13:13

---
title: Enabling Remote State with Terraform
published: true
date: 2020-10-20 09:00:00 UTC
tags: Technology,Terraform
canonical_url: 
---

So I’ve made no secret of my love of TerraForm. Honestly, I really like TerraForm for using infrastructure as code. Now one of the features that I really like about TerraForm, is the ability to execute a plan and see what’s going to change.

### What is state in Terraform?

Terraform leverages using state to enable the ability to have the “plan/apply” functionality. Which makes it such that you can see the changes before they are applied.

### How do we enable remote state?

So the process of enabling state remotely isn’t necessarily hard, and is requires a simple piece of code. For my projects, I add a “Terraform.tf”, that contains this information. NOTE: I do usually add this to the gitignore, so that I’m not checking in the keys:

```
terraform { backend "azurerm" { resource\_group\_name = "..." storage\_account\_name = "..." container\_name = "..." key = "..." } }
```

It really is that simple, and the key part of this is it becomes very important if you are working with more than one person on deploying to the same environment. In that scenario, if you have two developers using local state, then your state can become out of sync. But this is an easy way to make sure that you manage state in a way that allows collaboration.
Lernplattformen im Vergleich
Published: 2020-10-20 08:56:33

Für eine Ausbildung eignen sich am besten sogenannte MOOC-Plattformen (Massive Open Online Course) mit Web-Seminaren von Universitäten und Zertifizierungen. Für Weiterbildung und gezieltes Lernen ist die Auswahl an E-Learning-Plattformen und Online-Kursen viel größer. Besonders hochwertige Video-Kurse gibt es für die Bereiche Marketing und Lifestyle. Für Kinder gibt es eher spielerische Angebote, die das Lernen erleichtern.

...

Lies den ganzen Artikel: [Lernplattformen im Vergleich](https://kursprofi.com/lernplattform-vergleich/)
Python ile Liman API Kullanımı
Published: 2020-10-20 08:47:20

Liman sunucunuzda oluşturduğunuz sunucu, anahtar, modül, talep ve bildirimler gibi verilere ulaşabildiğiniz Liman API dokümantasyonuna buradan ulaşabilirsiniz:

https://api.liman.dev

Yukarıda paylaştığım dokümantasyonda, Liman API’ı yardımı ile gönderdiğiniz parametreye bağlı olarak birden fazla veriye erişmek mümkün. 

Örnek olarak, Liman’a giriş yapıp bir Erişim Anahtarı oluşturalım. Sol taraftaki menüden **"Erişim Anahtarı"** seçeneğini seçip, gelen ekranda **“Oluştur”** butonuna basarak bir anahtar oluşturalım.

![lisans-gorsel](https://i.hizliresim.com/akolvE.png)

Anahtarınıza isim tanımladıktan sonra, otomatik bir şekilde size Token başlığı altında size özel bir anahtar oluşturulacak. 

Şimdi ise bir Python dosyası yaratalım ve içerisine aşağıdaki kodu yapıştıralım.

```python
import requests
myToken = 'KEY'
myUrl = 'https://IP/profil/anahtarlarim'
head = {'liman-token': myToken, "Accept":"application/json"}
response = requests.get(myUrl, headers=head, verify=False)
print(response.text)
```
Request modülü eğer bilgisayarınızda yüklü değilse pip paket yöneticisi ile request modülünü bilgisayarınıza kurabilirsiniz.

```bash
pip install request
```

Kodumuzda request.get metodu, ilk parametre olarak hedef URL’yi almaktadır. Bu noktada sizin Liman’a giriş yaptığınız IP’yi yazmanız gerekmektedir. (Örneğin; https://192.168.0.0/profil/anahtarlarim) İkinci parametre olarak headers'ı gönderiyoruz. Headers'ın içindeki liman-token parametresine, Liman sunucumuzda bize tanımlanan anahtarı tanımlıyoruz. Bu parametreyi API'ı kullanma amacımıza göre https://api.liman.dev linkinde yer alan parametreleri kullanarak değiştirebiliriz. Biz bu örnekte anahtar bilgilerine ulaşmak istiyoruz bu yüzden **liman-token** parametresini gönderiyoruz. Son olarak, bize dönen verinin JSON metni biçiminde dönmesini istediğimiz için **"Accept":"application/json"** değerini eklememiz gerekmektedir. Eğer bunu tanımlamazsak varsayılan olarak hedef verinin bulunduğu URL'nin HTML kodu dönecektir. 

En sondaki **verify=False** yazmamızın sebebi ise, sertifika ile alakalı bir hata alırsanız sertifika yüklemek yerine sertifika kontrolünü kapatarak alınan hatanın önüne geçmektir. 

Son olarak request.get’e eşitlediğimiz response’u printleyerek dönen HTTP kodunu görebiliriz **print(response)**. Eğer **200** kodu dönüyorsa API’ımız başarıyla çalışıyor demektir.
An Introduction Guide on Bitcoin TAPROOT
Tags: cryptocurrency, bitcoin, taproot, blockchain
Published: 2020-10-21 19:18:46

---
title: An Introduction Guide on Bitcoin TAPROOT
published: true
date: 2020-10-20 08:38:06 UTC
tags: cryptocurrency,bitcoin,taproot,blockchain
canonical_url: https://medium.com/coinmonks/an-introduction-guide-on-bitcoin-taproot-7a8e0f06af8e
---

[![](https://cdn-images-1.medium.com/max/1920/1*B35rDHj7GuPDa5yMFige1Q.jpeg)](https://medium.com/coinmonks/an-introduction-guide-on-bitcoin-taproot-7a8e0f06af8e?source=rss----721b17443fd5---4)

After analyzing the BIP of Schnorr digital signatures, the time has come to better understand how the BIP Taproot works and why it is so…

[Continue reading on Coinmonks »](https://medium.com/coinmonks/an-introduction-guide-on-bitcoin-taproot-7a8e0f06af8e?source=rss----721b17443fd5---4)
Formulas for Counting the Number of Bold Cells in a Range In Excel!!
Tags: excelformula, excelformulas
Published: 2020-10-20 12:16:11

---
title: Formulas for Counting the Number of Bold Cells in a Range In Excel!!
published: true
date: 2020-10-20 08:36:24 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/formulas-for-counting-the-number-of-bold-cells-in-a-range-in-excel/
---

## Excel Formulas for Counting the Number of Bold Cells in a Range:

Here we will show the information on the **Formulas for Counting the Number of Bold Cells in a Range** In Excel Office 365. 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)
## Formula Syntax:

- To count the number of Bold cells from a range in Excel Office, use the below formula.

**=COUNTBYFONTBOLD(A1:B10)**

### Example:

- For example, if you have a data range as below, do the below steps.
- You need to enter the given formula in the selected area.
- After applying the formula, it will display the result as shown below.

![Result](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/Result-2.png)

## Syntax Explanation:

- **COUNTBYFONTBOLD** – The main purpose of this function is to count the numbers of bold cells. This function is available on Kutools in Excel Office 365.

## Summary:

From this article, you will learn the **formulas for counting the number of Bold cells in a range** in Excel Office 365. If you have any suggestions, feel free to share it with us. Thank you so much for Visiting Our Site!! Continue learning on **[Geek Excel](https://geekexcel.com/)!!**

### Related Articles:

- **[Formula to Find Position of Nth Occurrence of a Character in Text String!!](https://geekexcel.com/wp-admin/post.php?post=15989&action=edit)**
- **[Formulas for Counting the Number of Words in a Cell or Range in Excel!!](https://geekexcel.com/wp-admin/post.php?post=16001&action=edit)**
Formulas to Sum Bold Values or Numbers Only ~ Simple Method!!
Tags: excelformula, excelformulas
Published: 2020-10-20 12:16:27

---
title: Formulas to Sum Bold Values or Numbers Only ~ Simple Method!!
published: true
date: 2020-10-20 08:34:47 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/formulas-to-sum-bold-values-or-numbers-only-simple-method/
---

## Excel Formulas to Sum Bold Values or Numbers Only:

In this article, we will guide you to learn the **Formulas to Sum the Bold Values or Numbers only in Excel Office 365**. 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)

## Formula Syntax:

- Use the below formula to Sum the bold values or numbers in Excel Office.

**=SUMBYFONTBOLD(A1:D9)**

### Example:

- In the below image, we will show how to sum the bold value in Excel.
- If you have the input ranges as below, enter the given formula in the selected formula bar.
- After applying the formula, you will get the results as shown below.

![Result](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/EXCEL_fyDRjuGpvL.png)

## Syntax Explanations:

- **SUMBYFONTBOLD** – This function will help to count the Bold values from your input and gives the result as a sum of the bold values.

## Bottom Line:

In this article, you can get to know the **formula to sum the bold values or numbers only** in Excel Office 365. If you have any queries, leave it in the below comment section. Thank you so much for Visiting Our Site!! Continue learning on **[Geek Excel](https://geekexcel.com/)!!**

### Read Ahead:

- **[Excel Formula to SUM Absolute Value in a Range ~ A Simple Guide!!](https://geekexcel.com/wp-admin/post.php?post=15998&action=edit)**
- **[Formulas to Vlookup Values from Bottom to Top in Excel 365!!](https://geekexcel.com/wp-admin/post.php?post=15914&action=edit)**
What is difference between spring MVC and spring boot?
Tags: java, career, computerscience
Published: 2020-10-20 08:29:06

Spring MVC and Spring Boot are exist for the different purpose. So, it is not wise to compare each other as the contenders.

What is Spring Boot?

Spring Boot is a framework for packaging the spring application with sensible defaults. What does this mean?. You are developing a web application using Spring MVC, Spring Data, Hibernate and Tomcat. How do you package and deploy this application to your web server. As of now, we have to manually write the configurations, XML files, etc. for deploying to web server.

Spring Boot does that for you with Zero XML configuration in your project. Believe me, you don't need deployment descriptor, web server, etc. Spring Boot is magical framework that bundles all the dependencies for you. Finally your web application will be a standalone JAR file with embeded servers.

If you are still confused how this works, please read about microservice framework development using spring boot.

What is Spring MVC?

It is a traditional web application framework that helps you to build web applications. It is similar to Struts framework.

Meet The Experts For Better Guidence : https://nareshit.com/spring-online-training/
Auto-linking URLs with Trix Editor and StimulusJS
Tags: rails, stimulus, trix, tutorial
Published: 2020-10-20 12:12:07

---
title: Auto-linking URLs with Trix Editor and StimulusJS
published: true
date: 2020-10-20 08:25:00 UTC
tags: rails, stimulus, trix, tutorial
canonical_url: https://paraside.in/auto-linking-urls-with-trix-editor-and-stimulusjs/
---

The [https://trix-editor.org](https://trix-editor.org/) is fantastic, but there's one simple thing I expected to be built-in that isn't: copy/pasting a URL should create a link automatically instead of inserting the link as plain text.

Thinking of it, it's not so surprising because there are many things one could want to do instead, like embedding a video or a tweet. But it's a [common request](https://github.com/basecamp/trix/issues/167), and the GitHub issue includes a solution with jQuery that I used to build my Stimulus controller.

So, without further ado, here's a simple 2 steps rails tutorial to add URL auto-linking to your forms.

# The controller

Create a `/app/javascript/controller/trix_paste_controller.js` file and copy/paste the code below.

```jsx
import { Controller } from "stimulus"

export default class extends Controller {
  connect() {
    document.addEventListener("paste", this.pasteHandler.bind(this));
  }

  disconnect() {
    document.removeEventListener("paste", this.pasteHandler.bind(this))
  }

  pasteHandler(event) {
    const pastedText = event.clipboardData?.getData?.("Text")
    if (!!pastedText && !!pastedText.match(/^(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})$/ig)) {
      this.pasteUrl(pastedText)
    }
  }

  pasteUrl(pastedText) {
    const editor = this.element.editor
    let currentText = editor.getDocument().toString()
    let currentSelection = editor.getSelectedRange()
    let textWeAreInterestedIn = currentText.substring(0, currentSelection[0])
    let startOfPastedText = textWeAreInterestedIn.lastIndexOf(pastedText)
    editor.recordUndoEntry("Auto Link Paste")
    editor.setSelectedRange([startOfPastedText, currentSelection[0]])
    editor.activateAttribute('href', pastedText)
    editor.setSelectedRange(currentSelection)
  }
}

```

# Your forms

And now, anytime you want need this auto-linking feature, just reference the controller like so:

```ruby
= f.rich_text_area :content, data: { controller: "trix-paste" }

```

That's it, and it's "trix-paste" and not "trix-autolink" because I have further plans for this controller.

---
That's it! Follow me here or [@sowenjub](https://twitter.com/sowenjub) on twitter for more