teleren/devto huggingface dataset:
What is an API? 3 APIs to develop your next project
Tags: beginners, javascript, webdev, codenewbie
Published: 2020-11-03 14:57:44

# Introduction

API stands for Application Programming Interface but it is not much of the information to understand API. So in this post, we are going to learn "What is an API?" and a few examples of API to develop your next project. So let's get started with the post. 

## What is an API?

I am not a guy who goes with the definition of the word but still let's look into the definition.

> An API is a set of programming code that enables data transmission between one software product and another.                                                                           
       Source - [altextsoft.com](https://www.altexsoft.com/)

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

We can simply define API as a service provided by an application to other external applications to exchange data. Consider there is an application that has data and there is another application that requires that data do some work. In this case, the second application can make an API call to the first application to get the data. After getting data, the second application can use that data as it wants. For now, this is the work of an API to exchange data. API will be more clear with examples.

{% post https://dev.to/surajsrv11/5-netflix-documentaries-for-every-designer-3a4g %}

# APIs to develop your next project

## 1. [OpenWeather API](https://openweathermap.org/)

![OpenWeather](https://dev-to-uploads.s3.amazonaws.com/i/ecgrv2703wyevcnk7uao.PNG)

As the name suggests it provides you with weather-related information. The API data updated within every 10 minutes. Also, it provides you with an icon code which you can use to display an icon according to weather conditions.

## 2. [Google Map API](https://developers.google.com/maps/documentation)

![Google Map API](https://dev-to-uploads.s3.amazonaws.com/i/hvbyy77q0b0bco5wjijh.jpg)

Now-a-day, many application uses Google Map API to find direction, locations. You can separately make a travelling app using the API or you can integrate with your app to find locations or direction.

## 3. Wallpaper API

![Wallpaper API](https://dev-to-uploads.s3.amazonaws.com/i/dyw2df8m9j6y84dgwdv6.png)

You can create a wallpaper web-app by using API from various website. You can get API from 

- [Unsplash](https://unsplash.com/developers)
- [Pexels](https://www.pexels.com/api)
- [Alphacoder](https://wall.alphacoders.com/api.php)
- [Pixabay](https://pixabay.com/api/docs/)

{% post https://dev.to/dailydotdev/5-react-based-projects-every-beginner-must-try-571o %}

*I hope you are now comfortable with the API. You can start building your next project using those APIs. You can mention your favourite API in the comment box. Thank You for reading the blog.*

<hr/>

# Support
You can support me by buying me a coffee on BMC. Thank You so much.

<a href="https://www.buymeacoffee.com/surajsrv11" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-green.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Custom PC build - suggestions welcome!
Tags: watercooler
Published: 2020-11-03 14:53:50

Hope all is well with everyone!! I've currently just started my journey with web development and am looking at upgrading my current PC situation as I'm finding it to be a bit slow. I'd love any thoughts and suggestions as I'm actually looking at building my own PC utilizing pcpartspicker.com. Below is the current build I've come up with along with some thoughts that led me to select what I chose. Please know when reviewing this list that I'm not a gamer nor do I intend to become one, therefore I am looking at building a very simple PC that will help with basic tasks along with web development and design (VS Code, Figma, etc.). I'm also very interested in building something that will give me options for upgrade in the future.

- AMD Ryzen 7 2700x: Reviews seem to be excellent based on quality to price.
- ASRock B450M PRO4 microATX motherboard: I'd prefer a microATX as it's smaller in size and less expensive. Again this mb seems to be reviewed quite well.
- Corsair Vengeance LPX 16GB DDR4-3200 CL16 memory: Pretty basic and inexpensive. Motherboard above would allow me to upgrade memory to 64GB so I figure I'd start on the small end. No RGB lights needed for me :)
- Samsung 970 Evo 1TB M.2-2280 NVME SSD: Really want an SSD and this has excellent reviews. It is a bit more expensive than other 1TB SSD drives though. Also figured I'd bump up from 500GB to 1TB as the increase in price is not that much.
- MSI GEForce GTX 1660 6GB Ventus XS OC video card: Honestly, I have no idea how best to select a video card. I chose to not go with an integrated card in the CPU as I figure having a separate card would give me options in the future. The GTX 1660 seems to have pretty good reviews for a low end card. They're just so expensive!!
- Fractal Design Define Mini C microATX tower case: Figured I would go with the microATX case since that's the size motherboard I selected.
- EVGA G3 650W power supply: Again, not a great idea on the type of power supply I should get. All of the above results in just over 300W power usage. Reviews made it sound as if having a full modular power supply was ideal for layout purposes.
Total build is just under $900. This is an ideal price point for me. Would love to keep it below $1000 if possible. The less the better!!

I'd love any and all thoughts. Any different parts you'd recommend and why?? This would be my first PC build and it's honestly quite exciting to consider. Thanks so much!!!
Open-Source is fun!
Tags: hacktoberfest, opensource, github
Published: 2020-11-03 14:49:33

So finally it was the month of October when the topic of contributing to the open source community was emerging as the trending topic due to few positive and negative news.

Many people participated in the fest just to get those T-shirts to flaunt whereas some were really serious about doing their part and contributing to the community.

This year's edition was my first, and hope that this isn't my last. I learned a lot about open source community and enjoyed contributing to the repo's by writing codes on cryptography and even helping others to improve their codes. Overall it was a lovely experience.
 
Github: abhinavkmr569
How to stop OneNote automatically starting with Windows?
Tags: onenote, windows
Published: 2020-11-03 14:41:54

If your are reading this article. You are probably annoyed by automatic start of OneNote on your Windows 10.

The annoying OneNote icon on your taskbar can be easily disabled.

**Step 1. Open OpenNote**

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


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

 **Step 2 > File** 





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

**Step 3 > Options**



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

**Step 4 > Display > Uncheck the "place OneNote icon in the notification area" of the 
taskbar.**



![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/63wahka7m2vly0ag2dxp.jpg)


**Step 5**

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


Congratulations! You have successfully disabled OneNote.
Step Up the Digitalization of Your Business with Alibaba Cloud 2020 Double 11 Big Sale
Tags: alibabacloud
Published: 2020-11-03 14:41:44

This Double 11, expect more data intelligence, more security, and more sustainability with Alibaba Cloud!

As the technological backbone of Alibaba, #AlibabaCloud is providing #Double11 , the world's largest annual shopping event, with stronger technological support including AliRack co-location technology, a data leakage prevention service, and a new warehouse packaging robot!

Check out our new video on the technical milestones Alibaba Cloud has achieved over the past 11 years!

Double 11 deals are already here! 

[Save Big Now](https://www.alibabacloud.com/campaign/singles-day-double-11-2020)
Guess the Numbers of the Technology behind the 2020 Double 11 Shopping Festival to Win Up to $1111 in Credits
Tags: alibabacloud
Published: 2020-11-03 14:38:50

Double 11 is the world's largest online shopping festival hosted by Alibaba Group. During the 2019's Double 11, with the support of cloud technologies, Alibaba set a new sales record of 268.4 billion CNY (38.4 billion USD), and broke several other technology records. 

Will this year's Double 11 set new records? 

Simply guess 5 numbers and get a chance to win a up to $1,111 credits

[GUESS NOW](https://www.alibabacloud.com/campaign/double-11-guessing)
Division by zero in pure python vs numpy
Tags: python, beginners, numpy
Published: 2020-11-03 14:12:45

Today I learned that if you're trying to divide by zero and that zero is a Numpy type, the compiler will not raise the `ZeroDivisionError` but only `RuntimeWarning` and it will assign `numpy.inf` to the value. `numpy.inf` is IEEE 754 floating point representation of positive infinity, [according to the docs](https://numpy.org/doc/stable/reference/constants.html). 

Example:

```
import numpy as np

try:
    a = 1 / 0
except ZeroDivisionError:
    print("You can't divide by zero!") 

try:
    b = np.intc(1) / np.intc(0)
    print('Hello numpy, b is: ', b)
except ZeroDivisionError:
    print("Can you divide by zero?")

```

output:
```
>>You can't divive by zero!
>>RuntimeWarning: divide by zero encountered in int_scalars
  num = np.intc(1) / np.intc(0)
Hello numpy, b is:  inf
```
third-auth-ms - A micro-service for 3rd party authentication
Tags: microservices, javascript, github, opensource
Published: 2020-11-03 14:12:15

Creating your own authentication mechanism involves a lot of work and exposes your system to attacks due to breaches you are not aware of or did not handle correctly.  
On the other hand, there are 3rd-party vendors which have very solid, tested and trust-worthy authentication mechanisms you can use to you own application benefit, such as Google, Github, etc.

This micro-service aims to help you integrate with those 3rd-party authenticators.

## What does it do?
Once set up and triggered this micro-service initiates an authentication flow which validates the user against the 3rd-party authentication vendor, and if valid, returns the user's approved details to be shared with your application.

## How does it do that?
Every respectable authentication vendor has means to preform authentication. This micro-service simply consolidates the different vendors and exposes an abstraction API to work with them. 

Here it is: https://github.com/mbarzeev/third-auth-ms

This micro-service is intended to work with other micro-services which construct your application.
Common flow of integrating the third-auth-ms in your system might be:
![Common flow of integrating the third-auth-ms in your system](https://dev-to-uploads.s3.amazonaws.com/i/mqov53sjx1hdtpy6s1fk.png)

Cheers :)
Everyday Heroes: Rethinking Developer Motivation
Tags: productivity, management, motivation, leadership
Published: 2020-11-03 14:06:17

>"Wiefling says, 'Never reward firefighters. Don't encourage them! Reward is a double-edged sword: what gets rewarded is what gets done...Firefighting, diving catches, and heroics are symptoms of a problem, not signs of a cure. Don't spread this disease by rewarding the carriers. Find the person who is planning ahead, preventing disaster, executing with excellence, and recovering from setbacks without setting their hair on fire, and without glitz or fanfare. Whip out a Starbucks gift certificate for this everyday hero and send them home at 3 p.m. to enjoy some time with their kids."

##"Firefighters who get rewarded carry matches."
-Kimberly Wiefling

‍
We started [Staat] (https://www.staat.co/) with a base hypothesis: there had to be a better way to manage engineering projects and teams.In the process of proving this hypothesis, we did not expect to also uncover that there was a fundamental disconnect in engineering cultures.

‍
There's a natural impulse to reward what Kimberly Wiefling refers to as "firefighters". These are the ones on your team who take out the fires, jump headfirst into the hairiest problems, and welcome chaos. Although we all appreciate these members, we've come to realize their "heroics" wouldn't be necessary if there was a better planning culture.
‍

As motivated, determined, and self-sufficient as most engineers are, they're like the rest of us; they aren't their work. They want a life (even if it's a life of more coding) outside of work. How do we create engineering teams and cultures that are optimized for a full life and not just a full work life? How do we get people to do the best work of their lives with the least amount of stress and anxiety?

‍
Better planning. Clearer communication. Stronger management.
‍

All of this seems obvious, maybe even antiquated. But the lack of proper implementation is a real problem.
‍

Wiefling unpacks this issue further.

‍
>"...We were discussing the motivations for companies who routinely work on almost twice as many projects as they have the resources to efficiently staff. Key projects are routinely understaffed, and many individuals multi-task among various projects, resulting in task-switching inefficiencies known to decrease productivity by as much as 60%.


Lack of planning and lack of focus routinely lead to predictable delays in product launches as well as server quality problems with those products that do manage to launch.”
‍

This is not news to anyone in product development. In our own development lifecycle, we've discovered this to be true. Our core challenge shifted from "what features should we prioritize" to "how do we focus?"

‍
Focus is the golden egg. Focus comes when technologies talk to one another. When teams are in sync. When managers feel ahead and on top, not behind and sinking. When IC's are confident. When companies are restrained and disciplined.

‍
Enabling focus, enables progress.
Where I've been...
Tags: zig, cpp, rust, webdev
Published: 2020-11-03 14:02:22

You might've not seen a lot of me recently. I've been quite inactive on twitter, discord, here on dev, and on some other places.... well, I've got quite the explanation. I've been learning a new programming language, and because I am learning it, I have a massive project. The language in question is known as "zig". it is written in c++, and is a minimalistic and fast programming language. So, what have I been working on? A web server framework. Yep, you heard me. A web server framework. I see zig as a chance to grow and be better known here in the programming world. So, If you'll excuse me, **I have some learning to do ;)**.


also, possibly coming soon is a blog site for me, I haven't decided if I actually want to add it yet or not.
Netlify で WebAssembly バイナリを Git LFS 経由でデプロイして配信する
Tags: webassembly, netlify, git
Published: 2020-11-03 13:56:54

Netlify は静的ファイルを配信する素敵サービスです。Git 連携してくれるので Git に Push するだけで、ビルドしてデプロイしてくれたりします。

無料で使えるので、触ったことない人は触ってみることをおすすめします。

https://www.netlify.com/

## WebAssembly バイナリを Netlify にデプロイして配信したい

Go 経由で出力した WebAssembly バイナリを Netlify にデプロイしてみたのですが、自分がやりたいことを満たしていたので簡単にまとめておきます。

やったことは dist/ というフォルダに Git LFS を利用して WebAssembly バイナリを追加し、 dist/ をデプロイしてみました。

利用した機能は Netlify Large Media という機能です。

https://www.netlify.com/products/large-media/

簡単に言えば Git LFS で登録しておいた大きめのバイナリデータを配信してくれる機能です。

使い方はドキュメントを読めばそのままなので解説は特にしません。
ただ Git LFS と netlify-cli というコマンドが必要になります。

https://docs.netlify.com/large-media/overview

結果、配信されたファイルを[キャッシュに詳しい人](https://twitter.com/xcir)にチェックしてもらったところ ...

- content-type は application/wasm で問題ない
- content-encoding は br で brotli で圧縮されて配信されていた
- cache-control は public, max-age=0, must-revalidate でキャッシュされるけど即座に入れ替わる(max-age=0)し仮に取得できなくてもすでに持ってるキャッシュを再利用しない(must-revalidate)
- age が増えてるのでキャッシュが挟まっていそう
- 容量が 2.9 MB 近いが問題なくデプロイされた
- Pro プランであれば 400G 転送量があるのでよほどのことがない限り困らなさそう

無事 WebAssembly バイナリが Netlify にがデプロイされ配信できました。

![image](https://i.gyazo.com/b993de3ef916922d7b5d469dec8694cf.png)
Identity, Unlocked... Explained | Episode 2
Tags: identity, security, devrel
Published: 2020-11-03 13:47:14

Aaron Parecki joins the show to discuss the development of the OAuth 2.1 specification.
[Read more...](https://auth0.com/blog/identity-unlocked-explained-episode-2/?utm_source=content_synd&utm_medium=sc&utm_campaign=identity_unlocked)
Learning & Memorization.
Tags: javascript, codenewbie, devjournal, react
Published: 2020-11-03 13:38:32

This article is my personal viewpoint on how to quickly and reliably remember a lot of information from different areas.
Obtaining knowledge is relatively easy but keeping it is another story.

A dev career certainly entails constant learning.
It is quite easy to forget what you don’t understand. So, making sure that you truly understand what you are learning is very important. How do you do that?

**Do you need to memorize?**

Learning programming is like learning a second language:
Once you learn it, it becomes intuitive - you easily pick up on common words, grammar, and syntax just as you learned English, or maybe a second natural language. it's therefore not memorization like multiplication tables, it's more of comprehension. 

#**Best Practices**:
Writing good code takes a lot of time and effort, so the best way to retain the information is through practice and repetition.

**Build projects**
You need to convert the knowledge from abstract to practical, run into difficulty during the process, make mistakes, then identify and correct them. 
That process makes you more familiar with your newly acquired information.

**Document the process**.
The very act of handwriting appears to have important cognitive benefits. Note taking is an effective memory and learning aid because it prompts us to think about our learning.


**Quiz yourself**
Another good way to keep your knowledge and skills is to make a challenge for yourself. Answer the quiz questions related to the subject you are studying.

**Remember**:
All the solutions already exist; we just must be able to find them!
It's ok to google solutions to problems.
💾 Using Linux? Backup is critical.
Tags: archlinux, backup, linux, timeshift
Published: 2020-11-03 13:38:19

Whatever Operating System you are using, having proper backups is really important. But I never thought about backup when I was using Windows and Mac. Until now,

I started using Linux for my primary needs.

The main challenge of using Linux and messing around with the terminal is things can go ugly unexpectedly.

Long story short, I run the below command in the terminal accidentally.

`sudo rm -rf ~/.config` 😐

Guess what? 3.5 GB of configuration files are gone. 

`.config` folder contains most of the application configurations related to your user account. This includes operating system customizations and settings. Deleting the folder will not cause any harm to your operating system. But you have to configure all the settings from the beginning. Unless you have a backup.

## Timeshift
![Timeshift](https://dev-to-uploads.s3.amazonaws.com/i/or42cd8hagfj1mdks41j.png)

Timeshift is a system restore tool for Linux. If you ever used Time Machine in MacOS or System Restore in Windows, you will get the idea.

Here are my timeshift settings

### Snapshot Type - RSYNC
I'm using a separate Hard Disk for backup. RSYNC allows you to create backups on any Linux partitions. If your system got crashed, you can connect your HDD back, run Timeshift, and use the backup from the HDD to restore.

### Storage Location - HDD
I have an M.2 SSD with 256GB capacity and a 2TB Hard Disk for storage and backup purpose. A 100GB ext4 partition is reserved for backup.

### Schedule - 2 per week
I am using Arch Linux. I have weekly maintenance scheduled for my PC. Before I start maintenance tasks, I will create a backup, and after the maintenance, I will create another one. Since I'm not storing any large files in the SSD, the backup size is always small. 

If you have plenty of space left in your backup drive, you can choose the boot time backup. This will create a backup every time when the PC boots up. Booting speed will not be affected.

### Users & Filters
I've created symlinks for folders inside the home directory from my external HDD. All of the hidden folders in the home directory are backed up except `.cache`. All other system folders are backed up.

After I deleted the `.config` directory, all my settings are reset. I simply had to open Timeshift and choose the most recent backup. 

Let me know your thoughts about backups 😊
Data Structures & Algorithms using Rust: Consecutive Characters
Tags: rust
Published: 2020-11-03 13:30:27

As part of Data Structures & Algorithms implementation using Rust, let's see how to solve `Consecutive Characters` problem.

Leetcode problem link: https://leetcode.com/problems/consecutive-characters/

###### Problem Statement

```rust
Given a string s, the power of the string is the maximum length of a non-empty substring that contains only one unique character.

Return the power of the string.
```

###### Instructions

```rust
Example 1:

Input: s = "leetcode"
Output: 2
Explanation: The substring "ee" is of length 2 with the character 'e' only.

Example 2:

Input: s = "abbcccddddeeeeedcba"
Output: 5
Explanation: The substring "eeeee" is of length 5 with the character 'e' only.

Example 3:

Input: s = "triplepillooooow"
Output: 5

Example 4:

Input: s = "hooraaaaaaaaaaay"
Output: 11

Example 5:

Input: s = "tourist"
Output: 1

Constraints:

1 <= s.length <= 500
s contains only lowercase English letters.
```
###### Solution

Please find below the solution implemented using Rust

```rust
impl Solution {
    pub fn max_power(s: String) -> i32 {
        let mut ch: char = ' ';
        let mut i1: i32 = 1;
        let mut max: i32 = 1;
        for (i, c) in s.chars().enumerate() {
            if c != ch {
                ch = c;
                if i1 > max {
                    max = i1;
                }
                i1 = 1;
            } else {
                i1 += 1;
            }
        }
        if i1 > max {
            max = i1;
        }
        max
    }
}
```
Please feel free to share your feedback.

Happy reading!!!
My Hacktoberfest 2020 experience 😄🎉
Tags: hacktoberfest, opensource, git, github
Published: 2020-11-03 13:28:53

### What I contributed to Hacktoberfest 2020?
I created a basic repo for newbies to get started with open-source.

{% github cmcodes1/css-puns %}

### Repo stats
It received 9 stars, 33 forks, and 49 PRs.

### Thank You! DEV & Digital Ocean for this initiative! ❤