teleren/devto huggingface dataset:
Vocabulary Building day15
Tags: gre, day15
Published: 2021-09-16 01:51:31


1. **glut**(noun): an excessive supply
![alt text](https://previews.123rf.com/images/rudall30/rudall301103/rudall30110300067/9187072-iconic-white-figure-sit-with-the-glut.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=glut&oq=glut&aqs=chrome..69i57j0i67i433j0i67j0i67i433l2j69i60l2j69i61.1621j0j7&sourceid=chrome&ie=UTF-8)

2. **fortuitous**(adjective): happening by a lucky chance; fortunate.
![alt text](https://i.ytimg.com/vi/hrZboPJQV2w/maxresdefault.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=fortuitous&oq=fortuitous&aqs=chrome..69i57j0i433i512j0i131i433i512j0i512l7.12059j0j9&sourceid=chrome&ie=UTF-8)

3. **superfluous**(adjective): unnecessary, especially through being more than enough.
![alt text](https://i.ytimg.com/vi/zZL-r30cla8/maxresdefault.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=superfluous+meaning&oq=superfluous&aqs=chrome.0.0i433i512j69i57j0i512l8.8189j1j9&sourceid=chrome&ie=UTF-8)

4. **obscure**(verb): make unclear.
![alt text](http://1.bp.blogspot.com/_oOfgV-vqn1E/S7hK5RYtbcI/AAAAAAAAAMY/TyPpZwaoc7Q/s320/AMBIGUOUS-Unclear+in+meaning%3B+confusing%3B+capable+of+being+interpreted+in+different+ways.gif)
[Checkout Pronunciation](https://www.google.com/search?q=obscure&oq=obscure&aqs=chrome..69i57j46i275i433i512j0i20i263i433i512j0i20i263i512j0i433i512j0i512l3j0i433i512l2.3668j1j9&sourceid=chrome&ie=UTF-8)
5. **mitigate**(verb): make (something bad) less severe, serious, or painful
![alt text](https://smallbusinessify.com/wp-content/uploads/2018/11/How-to-mitigate-risks-in-my-business-1024x751.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=mitigate&oq=mitigate&aqs=chrome.0.69i59j0i131i433i512j0i20i263i512j0i512l2j0i433i512l2j0i512l2j0i433i512.3656j0j9&sourceid=chrome&ie=UTF-8)
I hope this helps you if you are preparing for GRE exams.
Waihona
Tags: github, rust
Published: 2021-09-16 01:03:21

---
title: Waihona
published: true
description: A simple cloudstorage library for Rust
tags: github, rust
cover_image: https://github.com/bisoncorps/waihona/raw/main/assets/waihona.png
---

## What is [Waihona](https://github.com/bisoncorps/waihona)?
It aims to be a Rust crate for performing simple cloudstorage functions across popular cloud providers such as AWS, GCP and Azure.

## What is my personal motivation?
I find Rust particularly hard to adapt to especially coming from a dynamic language background with Python and Javascript. There is so much to unpack and learn with regards to the borrow checker, lifetimes, generics with regards to traits e.t.c. I tackle this the only way I know how, by writing incrementally difficult projects tailored to help broaden my understanding. Still not where I am comfortable with yet, but this project helped get me onboard and comfortable with most of these concepts and also with the package management lifecycle in the Rust community

Viva Rust!
Clean your condition 🧼
Tags: javascript, beginners
Published: 2021-09-16 00:27:58

## Always positive
It's need extra effort to understanding logic in negative condition, avoid it as you can

```js
// ❌ Don't 

function isUserNotVerified(){

}

if(!userVerified){

}

// ✅ Do

function isUserVerified(){

}

if(userVerified){

}

```



## Use Shorthands if possible

Shorthands make your code use less line and easier to read
```js
// ❌ Don't

if(isActive ==null){

}

if(firstname !== null || firstname !=='' || firstname !== undefined){

}

const isUserValid = user.isVerified() && user.isActive() ? true : false;

// ✅ Do

if(isActive) {

}

if(!!firstname){

}

const isUserValid = user.isVerified() && user.isActive()
```

## Object literals over Switch statements 

```js
// ❌ Don't

const getStatus = (status) => {
  switch (status) {
    case "success":
      return "green";
    case "failure":
      return "red";
    case "warning":
      return "yellow";
    case "loading":
    default:
      return "blue";
  }
};

// ✅ Do
const statusColors = {
  success: "green",
  failure: "red",
  warning: "yellow",
  loading: "blue",
};

const getStatus = (status) => statusColors[status] || statusColors.loading;
```


## Use optional chaining 
Remember that optional chaining is not working with IE browser yet, see [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) 
```js
const alice = {
    name:'Alice',
    cat:{
        name:'Nala'
    }
}
// ❌ Don't

const cat = (alice && alice.cat && alice.cat.name) || 'N/A';

// ✅ Do

const cat = alice?.cat?.name ?? 'N/A';

```
What does it take to affect change?
Tags: change, crisis
Published: 2021-09-20 11:43:55

---
title: What does it take to affect change?
published: true
date: 2021-09-16 00:00:00 UTC
tags: change,crisis
canonical_url: https://jhall.io/archive/2021/09/16/what-does-it-take-to-affect-change/
---

Change is hard.

Most of the time, we need a serious motivator to change.

Before the bombing of Pearl Harbor, the Japanese had estimated the U.S. capacity to wage a two-front war would be very limited, based on their current manufacturing practices.

However, as the war necessitated, the U.S. was eager to experiment with new production methods, and was able to double their output compared to Japan’s estimates, ultimately leading to Japan’s surrender, as we all know.

After the war, Japan was faced with a similar problem. They had few natural resources. And their attempt to commendeer (via war) the resources they felt were necessary for economic success had just met utter failure. So what did they do?

They changed their approach.

In an ironic twist of fate, the U.S. then reverted to their old ways as those familiar with “traditional” U.S. manufacturing methods returned from the war front to begin managing factories again, at the same time that Japan began adopting the new approaches that had allowed the U.S. to excel in wartime production, which lead to a booming Japanese economy and what we now know as things like the Toyota Production System, Lean Manufacturing, etc.

What’s the point?

We’re all more receptive to change when we’re facing crisis.

Intuitively this makes sense. When we’re not facing a crisis, it means things are working (at least to some extent).

Few of us ever face a crisis on the scale of a world war, or the economy of an entire nation. But we all face crises in our work.

Will the team be able to work together? Will the project finish on time? Will the servers be stable during the big event? Will the company declare bankruptcy?

How can you, your team, your company change to face these crises effectively?

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Very Alternative Search Engines
Published: 2021-09-17 13:38:08

---
title: Very Alternative Search Engines
published: true
date: 2021-09-16 00:00:00 UTC
tags: 
canonical_url: https://stegriff.co.uk/upblog/very-alternative-search-engines/
---

I think a lot of you already know about the usual alternatives to Google like [Ecosia](https://www.ecosia.org/) (the search engine that plants trees) and [DuckDuckGo](https://duckduckgo.com/) (the search engine that doesn’t track you).

I’d like to explore some _very_ alternative search engines that I’ve found recently.

These are good when you’re looking for niche results that are too hard to find with the usual suspects.

In no particular order:

## Mojeek

[https://www.mojeek.com/](https://www.mojeek.com/)

Mojeek is UK based, human-centric, tracking-free, and they have their own crawler (contrast to DDG which piggy-backs off crawlers like Yandex)

![Mojeek search results](https://stegriff.co.uk/assets/alternative-search-engines/mojeek-yamaha.png)

It seems fine. It finds this site so I’m happy 😁

## MillionShort

[https://millionshort.com/](https://millionshort.com/)

Search the web without the top `n` websites (where n is 100 to 1 million). Super useful when you want to find something that’s not on Pinterest, Amazon, Buzzfeed, or one of the other Big Content Walled Gardens.

You also get more filtering tools after search, like Date and Location, and you can re-introduce domains one-by-one if you think they may have relevant results.

This helped me find the [Common mistakes in English site after I lost it for a few years](/upblog/common-mistakes-in-english/).

## Marginalia Search

[https://search.marginalia.nu/](https://search.marginalia.nu/)

Just found this one today and it prompted this post. It has its own crawler, called Edge (lol).

> “The search engine calculates a score that aggressively favors text-heavy websites, and punishes those that have too many modern web design features.”

However it does that, I’m pretty sure it excludes _this website_. Which is weird because it’s pretty text heavy and not that modern, and Marginalia happens to include a few WordPress sites (which seem to be a counterexample of the above).

![Marginalia search results](https://stegriff.co.uk/assets/alternative-search-engines/marginalia-yamaha.png)

I searched for “yamaha pss a50 fix” and it returned one result, which was some poor `.inf` file from somewhere.

Widening the net to “yamaha pss a50”, we get results from [sandsoftwaresound.net](http://sandsoftwaresound.net/) (no complaints from me) but this site is excluded. I repeated the experiment with some other niche search terms which historically drive traffic to this blog and didn’t see myself. No offence taken, just… curious 😅

## Wrap up 🗞

Isn’t it weird that all three of these begin with ‘M’??

Anyway, more niche search engines are a good thing! Tools for the job, fighting back against monopolies and hegemonies. That’s good stuff.

Have you got any suggestions? Lmk in the comments! 👇
Understanding Azure Core Services Questions Flash Cards
Tags: webdev, tutorial, beginners, azure
Published: 2022-02-01 23:18:34

---
title: Understanding Azure Core Services Questions Flash Cards
published: true
date: 2021-09-16 00:00:00 UTC
tags: webdev,tutorial,beginners,azure
canonical_url: https://www.rupeshtiwari.com/understanding-azure-core-services-questions-flash-cards/
---

> Understanding Core Azure Services
How to add boolean array type to function return value in TypeScript?
Tags: typescript
Published: 2021-09-16 00:00:00

---
  title: How to add boolean array type to function return value in TypeScript?
  published: true
  tags: TypeScript
  date: Thu Sep 16 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/add-boolean-array-type-to-function-return-value-typescript
  cover_image: https://melvingeorge.me/_next/static/images/main-e9d141ea8e7ce3a85e9cac810fbeda20.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/add-boolean-array-type-to-function-return-value-typescript)
  
To add `boolean` array type to function return value first, declare the function, then add a `:` symbol (colon) after the parameters opening and closing brackets `()` and then type the word `boolean` followed by `[]` symbol (opening and closing square brackets) to indicate that the function's return value is of `boolean` array type.

### TL;DR

```ts
// simple function with return
// value of boolean array type
function getBooleans(): boolean[] {
  return [true, false, true];
}
```

For example, let's say we have a function called `getBooleans()` and on calling the function should return an array containing only boolean values for example `true`, `false`, `true`, etc.

It can be done like this,

```ts
// simple function
function getBooleans() {
  return [true, false, true];
}
```

This is fine. But what if we need to enforce that the return value of the `getBooleans` function should only return an array of booleans and nothing else. To do that we can add the function return type like this,

```ts
// simple function with return
// value of boolean array type
function getBooleans(): boolean[] {
  return [true, false, true]; // ✅ allowed
}
```

After defining the return type as a `boolean` array, we must return an array of boolean values or it may show an error.

Now Let's also try to return a value other than the `boolean` array type like this,

```ts
// simple function with return
// value not of boolean array type
function getBooleans(): boolean[] {
  return [1, 2, 3]; // ❌ not allowed. Type 'number' is not assignable to type 'boolean'.
}
```

As you can see from the above code the TypeScript compiler is not allowing us to return the array and shows us an error saying `Type 'number' is not assignable to type 'boolean'.` which is what we want to happen.

See the above codes live in [codesandbox](https://codesandbox.io/s/add-boolean-array-type-to-function-return-value-in-typescript-3ioi4?file=/src/index.ts).

That's all 😃!

### Feel free to share if you found this useful 😃.

---
Python useful list functions: map, filter, find and reduce
Tags: python, list, map, filter
Published: 2021-09-15 23:56:32

Hello everyone, I made a small recap of these super useful list functions in Python: map, filter, find, reduce.

Let’s start defining our array.

Defining our array of objects
For example, we gonna use some fruits and their price and quantity.

```python
fruits = [
    {
        "name": "Apple",
        "units": 3,
        "price": 0.25
    },
    {
        "name": "Mango",
        "units": 6,
        "price": 0.35
    },
    {
        "name": "Banana",
        "units": 4,
        "price": 0.15
    },
]
```

Now I have a developer blog, continue reading this post here: https://hhsm95.dev/blog/python-useful-list-functions-map-filter-find-and-reduce/

Thank you!
Part 2: 5 cool CSS properties 
Tags: css, html, webdev, beginners
Published: 2021-09-15 23:55:43


Hi, I'm [Aya Bouchiha](developer.aya.b@gmail.com), and this is part 2 of  [5 cool CSS properties](https://dev.to/ayabouchiha/5-cool-css-properties-part-1-nkg/).

## quotes

+ **quotes**: helps you to chose the quotation marks for a quote element.

{% codepen  https://codepen.io/Aya_Bouchiha/pen/eYRejbX %}

## scroll-behavior

+ **scroll-behavior**:  specifies whether to smoothly animate the scroll position, instead of a straight jump, when the user clicks on a link within a scrollable box.[more info](https://www.w3schools.com/cssref/pr_scroll-behavior.asp)

{% codepen  https://codepen.io/Aya_Bouchiha/pen/bGRYmeb %}

## user-select

+ **user-select**: used to allow or deny the user to select content like a text, image...

{% codepen https://codepen.io/Aya_Bouchiha/pen/JjJOmNL %}

## writing-mode

+ **writing-mode**: allows you to specify the writing mode (horizontal-tb, vertical-lr, vertical-rl)

{% codepen https://codepen.io/Aya_Bouchiha/pen/abwVRGY %}

## text-overflow

+ **text-overflow**: defines the way that the overflowed content should be displayed.

{% codepen https://codepen.io/Aya_Bouchiha/pen/VwWrEqR %}

## Summary

+ **scroll-behavior**:  specifies whether to smoothly animate the scroll position, instead of a straight jump, when the user clicks on a link within a scrollable box.
+  **quotes**: helps you to chose the quotation marks for a quote element.
+ **user-select**: used to allow or deny the user to select content like a text, image...
+ **writing-mode**: allows you to specify the writing mode (horizontal-tb, vertical-lr, vertical-rl)
+ **text-overflow**: defines the way that the overflowed content should be displayed.

## Reference
+ [https://www.w3schools.com/](https://www.w3schools.com/)

## Suggested Posts

+ [57 Essential HTML Tags To Know As A Beginner](https://dev.to/ayabouchiha/57-essential-html-tags-to-know-as-a-beginnert-1f3f)
+ [part-1: 5 HTML Tags That Almost Nobody Knows](https://dev.to/ayabouchiha/5-html-tags-that-almost-nobody-knows-5p5)
+ [Part-2: 5 HTML Tags That Almost Nobody Knows](https://dev.to/ayabouchiha/part-2-5-html-tags-that-almost-nobody-knows-nj8)

Have a great day!
CompileSwift – Apple September 14th Event
Tags: podcast, applewatch, ipad
Published: 2021-09-17 01:00:51

---
title: CompileSwift – Apple September 14th Event
published: true
date: 2021-09-15 23:35:16 UTC
tags: Podcasts,applewatch,ipad
canonical_url: https://peterwitham.com/podcasts/cs-s03-e12/
---

{% spotify spotify:episode:3CNFDKieAEmGyruqLGF0La %}

## Season 3 Episode 12

In this episode, I go over the hardware announcements with my own flair for commentary on what I think stood out in the crowd.

What did you take away from the event? Are you planning on any upgrades or sitting this one out until next year new iPhones, iPads, and watches?

**[Click here for other Audio Players](https://anchor.fm/compileswift)**
How to deploy Django to Heroku
Tags: django, heroku, python
Published: 2021-09-15 09:50:37

###Introduction:

Most of you would’ve already seen n number of blogs on how to deploy Django projects to Heroku but in this article, I shall explain in simple words in a sequential manner without much confusion.

We shall consider a simple project without any additional boiler plate code. I shall call the <u>*project* as **mysite** and *app* as **appOne**.</u>

I shall start from scratch and attach this repository at the end of this tutorial.

###For Linux Users:

```sh
python3 -m venv Environ
source Environ/bin/activate
python -m pip install django
```

###For Windows Users:

```cmd
python -m venv Environ
cd Environ/Scripts/
activate
cd ../../
```

###Configuring Django
Continuing this:
```sh
django-admin startproject mysite
cd mysite
django-admin startapp appOne
```



*This is how your tree will look after running those commands successfully* __:__

```
mysite
    │   manage.py
    │
    ├───appOne
    │   │   admin.py
    │   │   apps.py
    │   │   models.py
    │   │   tests.py
    │   │   views.py
    │   │   __init__.py
    │   │
    │   └───migrations
    │           __init__.py
    │
    └───mysite
            asgi.py
            settings.py
            urls.py
            wsgi.py
            __init__.py
```

##<u>__Steps to launch and deploy the project to Heroku:__</u>

#### *Step One*:

```python
from pathlib import Path
import os

BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = os.environ.get('SECRET_KEY')
DEBUG = os.environ.get('DEBUG')
ALLOWED_HOSTS = []
```
Once you've created the Django project, please add the security key to your Environment secrets and Config Vars.

![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/isnwdv9uul1u52bpkwei.png)


#### *Step Two*: 

We don’t have any static files for this project, but if needed you can use *whitenoise*.


[Heroku's guide on whitenoise]( https://devcenter.heroku.com/articles/django-assets)

```python
MIDDLEWARE  = [
   'whitenoise.middleware.WhiteNoiseMiddleware',
]

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'

```

In config vars set *DEBUG_COLLECTSTATIC* = 1.

#### *Step Three*: 
After configuring the project, we'll now be freezing the requirements and Procfile

```sh
pip freeze>requirements.txt
```

######**Procfile:**
```
web: manage.py makemigrations && manage.py migrate
web: gunicorn mysite.wsgi:app
```

#### *Step Four*: 
Commit all these files to your git repository and push it to your source .
I’ll be using *GitHub* for this tutorial

```sh
git init . 
git add . 
git commit -m  “Initial Commit🚀”
git remote add origin <link>
git push -u origin master
```

#### *Step Five*:
Go to dashboard and deploy 
 
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xz4b0w5mm1n2x12pned0.png)
 
It should be working fine! Feel free to reach out if there are any issues.


View the deployment here at: https://testing-repos.herokuapp.com/
Repository at: https://github.com/AbhijithGanesh/Tutorial-for-Heroku
How to build a React Video Modal with Hooks
Tags: react, css, tutorial, webdev
Published: 2021-09-15 23:14:29

I want to share with other Front End developers how to build a React Video modal from scratch.

I hope everyone finds this small tutorial really helpful.

I'm leaving the url of the working modal and code at the end of the tutorial if you want to test it and and check out the code 

First, we need to use the useState Hook to change the state of the modal once the user clicks the modal button and clicks the close modal button.

Second, we will do the same to build a loader icon once the modal is open and waits to fetch the video from YouTube like so.

```
const [modal, setModal] = useState(false);
  const [videoLoading, setVideoLoading] = useState(true);

  const openModal = () => {
    setModal(!modal);
  };

  const spinner = () => {
    setVideoLoading(!videoLoading);
  };
```
Third, we will start working on the JSX part of the code setting up an onClick event to the button and using the ternary operator for the modal and the loader icon like so. 
```
return (
    <div className="App">
      <button onClick={openModal} className="">
        Click Me!
        {modal ? (
          <section className="modal__bg">
            <div className="modal__align">
              <div className="modal__content" modal={modal}>
                <IoCloseOutline
                  className="modal__close"
                  arial-label="Close modal"
                  onClick={setModal}
                />
                <div className="modal__video-align">
                  {videoLoading ? (
                    <div className="modal__spinner">
                      <BiLoaderAlt
                        className="modal__spinner-style"
                        fadeIn="none"
                      />
                    </div>
                  ) : null}
                  <iframe
                    className="modal__video-style"
                    onLoad={spinner}
                    loading="lazy"
                    width="800"
                    height="500"
                    src="https://www.youtube.com/embed/4UZrsTqkcW4"
                    title="YouTube video player"
                    frameBorder="0"
                    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
                    allowfullscreen
                  ></iframe>
                </div>
              </div>
            </div>
          </section>
        ) : null}
      </button>
    </div>
  );
```
Here I'm leaving the url of the code if you also want to check out the CSS styles and also the live demo. 

Code: https://codesandbox.io/s/nkwxb?file=/src/App.js:423-1898
Live Demo: https://nkwxb.csb.app/

I hope I'm able to help anyone that wants to build a React Modal Video from scratch without using any library. 

Follow me on Github & Connect with me on LinkedIn

https://github.com/cesareuseche
https://www.linkedin.com/in/cesar-useche-profile/