teleren/devto huggingface dataset:
Day 177: Slate
Tags: hiphop, code, coding, lifelongdev
Published: 2020-07-17 22:19:10

_liner notes_:
- Professional : Got up pretty early to do another tutorial run through with a friend. Got it working on the first try. Ran into an issue that may be caused by a Chrome extension. Not sure, will have to do more research. Right after that, had our team meeting. That went well and good to see everyone. The Livestream show got postponed till next week, so I worked on finishing up the presentation for it. Did some blog post work. Went through the video recordings from the tutorial run throughs and typed up some feedback and findings.

- Personal : Last night I updated my site. I added the presentation I did for the 12 hour Developer Day a couple of months back. I again had to order the presentations by the date of the presentation and not in the order it appears in the database. Worked on this week's radio show and went to sleep.

![View of Celano, Abruzzi, Italy from a mountain](https://dev-to-uploads.s3.amazonaws.com/i/xjp3pcn3nwbs3gdbm3is.png)

Whew, I don't know what it was, but this week was tiring! haha I had to take a nap after work. Feels like I got a lot off my slate this week. Going to work on the radio show. Got a package I ordered. They are some fans for the van. They seem pretty powerful. I want to have one by each window in the back of the van, next to the mesh so I can get some air flow. And they can flip around so when I'm cooking I can draw the steam out. At least in theory. Also have a portable shower setup coming in tomorrow. Looking forward to working on the van this weekend. I'm out!

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube JyR4vyp-8LU %}
2020 Coding Newbie
Tags: codenewbie, beginners
Published: 2020-07-18 02:09:08

**Hello World!**

I'm Jahaziel, a creative professional with a background in event management.  After years of working in meetings and events, and with the current state of the world pandemic completely turning the live events industry on its head, I've decided to take this time to re-skill and embark on a journey of web development.

Thankfully I have a pretty good start for a tech support team, my brother, who is currently working professionally as a developer with a Fortune 500 company, introduced me to this dev community and has inspired my journey into the vast world of technology.

I've been accepted into the vestibule of a local tech program called the **Innovation Fellowship** by a local non-profit called [The Knowledge House](https://www.theknowledgehouse.org/about/), which promotes technology-based career opportunities for NYC residents in the areas of web development, data science, and design.

This isn't my first rodeo-- I've attempted a coding bootcamp back in 2017, but the timing wasn't right.  This time, with all of the social-distancing, remote working and underemployment in the live events industry, I feel is the right time for me to continue this journey towards becoming a developer.

I'll admit, that it's humbling and challenging to start a whole new career path in my mid-30's -- but with the abundance of resources and information available freely on the Internet, and with the support of this dev community, I hope to share my journey, challenges and wins, as I embark on this new pathway.
Well explained: Javascript in operator
Published: 2020-07-18 01:49:16


This article is going to uncover the usage of Javascript `in` operator. `in` operator is one of the keywords in Javascript. We use it very often in loops or if conditions.

> `in` operator can check if something exists in the Object. It returns `true` when the first operand is in the Object as a property or exists in the prototype chain.

## 1. Simple basic usage

### Object property check

The follow example returns `true` because variable `obj` has all of them.

```javascript
let obj = {
  javascript: 1,
  html: 2,
  css: 3
}

'javascript' in obj // true
'html' in obj // true
'css' in obj // true
```

### Prorotype chain

It is `false` because `python` does not exist in `obj` but if we could add it to the prototype chain the result will turn to `true`

```javascript
'python' in obj // false

obj.prototype.python = 4

'python' in obj // true
```

### Deleted/Undefined Property

When a property is deleted from `obj`, it returns `false` because we remove the property completely.

```javascript
delete obj.javascript

'javascript' in obj // false
```

But if we sett the property `undefined`, the `in` operator returns true because the property exists it just doesn't have any value.

```javascript
obj.javascript = undefined

'javascript' in obj // true
```

## 2. Other usages

Other than using `in` operator in an hashmap Object, we could also apply it to other situations like `String` `Array` and some other supported behaviors in Javascript.

### If String is in another String

```javascript
let str = 'string'

'string' in str // true

'str' in str // true

'ing' in str // true

'something else' in str // false
```

### If an index is in an Array

There are only 3 elements in `arr`, so the fourth element witn index `3` is out of range.

```javascript
let arr = ['javascript', 'in', 'operator']

0 in arr // true
1 in arr // true
2 in arr // true

3 in arr // false
```

### Non-inherited property is in Object

`obj` is inheriting `Object`. But the native function of `toString` is an inherited property. To Check if non-inherited property is in Object we need to use [Object.property.hasOwnProperty()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty) method.

```javascript
let obj = {}

'toString' in obj // true

obj.hasOwnProperty('toString') // false
```


## References:
- [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty)
- [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in)
- [https://dmitripavlutin.com/own-and-inherited-properties-in-javascript/](https://dmitripavlutin.com/own-and-inherited-properties-in-javascript/)

---

Originally on [pitayan.com](https://pitayan.com)
https://pitayan.com/posts/javascript-in-operator/
Clumsy Factorial
Published: 2020-07-16 05:44:33

One of the interesting Leet code problems i solved in recent times.

> Normally, the factorial of a positive integer n is the product of all positive integers less than or equal to n.  For example, factorial(10) = 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1.

> We instead make a clumsy factorial: using the integers in decreasing order, we swap out the multiply operations for a fixed rotation of operations: multiply (*), divide (/), add (+) and subtract (-) in this order.

> For example, clumsy(10) = 10 * 9 / 8 + 7 - 6 * 5 / 4 + 3 - 2 * 1.  However, these operations are still applied using the usual order of operations of arithmetic: we do all multiplication and division steps before any addition or subtraction steps, and multiplication and division steps are processed left to right.

> Additionally, the division that we use is floor division such that 10 * 9 / 8 equals 11.  This guarantees the result is an integer.

Implement the clumsy function as defined above: given an integer N, it returns the clumsy factorial of N.

```js

/**
 * @param {number} N
 * @return {number}
 */
var clumsy = function(N) {
    let operators = ['*', '/', '+', '-']
    let index = 0
    let stack = []
    
    // Add an element to the top of the stack.
    // Initially i created a result variable and 
    // was performing the operations in the case: block
    // But the problem with that is that it was not following
    // BODMOS mathematical principle. 
    // Goal is to ensure Multiplications and Divisions happen
    // Before additions and subtractions in the order.
    // After formulating an array, just add all those elements
    // to get the total Sum :)
    stack.push(N)
    
    for(let i = N - 1 ; i >=1; i--){
        /*
            Our goal is to push the evaluated values ontop
            Multiplication and division: Evaluate
            Addition and Subtraction: append
        */
        switch(operators[index]){
            case '*':
                len = stack.length - 1
                if(stack[len] >= 0){
                     stack[len] = stack[len] * i
                }else{
                    stack[len] = stack[len] * i
                }
                break;
            case '/':
                len = stack.length - 1
                 if(stack[len] >= 0){
                     stack[len] = Math.floor(stack[len] / i)
                }else{
                    stack[len] = -1 * Math.floor(Math.abs(stack[len]) / i)
                }
                break;
            case '+':
                stack.push(i)
                break;
            case '-':
                stack.push(-1 * i)
                break;
        }
        
        index = (index + 1) % operators.length
    }
    
    // Sum all the elements in the stack
    return stack.reduce((acc,element) => {
        acc = acc + element
        return acc
    })
};

```
Advice for a struggling bootcamp grad?
Tags: discuss, career, beginners, codenewbie
Published: 2020-07-18 01:20:23

Hi dev community - I have not yet posted a #discuss type question here, so apologies in advance if this is too common of a question/too long. I know the market is saturated with coding bootcamp grads, and the 'blog market' is saturated with posts about bootcamp grads. I know it's very hard to get one of the most coveted, competitive, and high-paying jobs after taking only a 3 month course. And of course I know this is an unprecedented and horrible global pandemic economy.

All of that being said - I'm really struggling, and these problems have been around for bootcamps grads for years now. I've read a lot of blogs. I've done a ton of networking. Gotten good advice. And I generally feel like I just have to do something else major now - like get some kind of further online degree/certificate? I'm not sure, but it seems like employers see '3 month bootcamp' grad and throw the resume in the trash before it even gets to their inbox. I'm not trying to be lazy and say I'm owed anything after an objectively short time - I just don't know what else to do to show that I'm serious and that I love coding and I want to learn as much as possible. And it seems like everything I could do now to try and get more experience/demonstrate my skills - personal projects, hackathons, contributing to open source, freelancing, unpaid internships - might just be further exhausting myself with nothing tangible to show for it.

Again I am really not trying to hustle or cheat my way into something I am not qualified for. I am willing to put in the work. I also am interested in doing something like an online master's degree in computer science, truly genuinely for my own personal interest, but it seems like a risky further move into debt that may or may not even help me get a real job. 

A lot of the advice for struggling junior dev job seekers right now is 'just keep pushing along!' i.e. applying, networking, etc. I am not knocking that advice - and I will certainly keep applying, working on my personal projects, doing whatever self-taught learning that I can. But I am starting to wonder if I can/should do something that is more of a major change. Thank you!
Day 47 : #100DaysofCode - How do you code?
Tags: codenewbie, code, 100daysofcode, questions
Published: 2020-07-18 00:53:25

Today I worked on labs for my coding bootcamp. I am learning about layouts and partial forms, and thought of question that I wanted to ask the coding community.

<i><b>How do you code? Do you code everything and then refactor? Do you refactor as you go? Do you code piece by piece and refactor each piece in large pieces on the way? Do you code, wait for an error, then rectify that error? Do you code and then ask for a second or third party for their advice on how to refactor or make your code better? </i></b>

I ask because I am learning but can not say that I know ALL of the best practices with code. So there are times I may code something and then later on realize, "hey, I should have used a partial form here" or "hey, I should replace this instance variable with an object." Of course I add it as I learn but for future references, (and for you with jobs already), I would love to know what is the best way to code.

Any help and advice is helpful.

As always, thank you for reading!

Sincerely, 
Brittany
⚛️ useScroller, react hook for infinite-scrolling with no other dependencies
Published: 2020-07-18 00:06:26

React hook useScroller() that automatically adds the next page, saving users from a full page load, lightweight and with no other dependencies.

Github Link: https://github.com/geobde/use-scroller
Npm Link: https://www.npmjs.com/package/use-scroller
مانجا بلاك كلوفر الفصل 258 مترجم أون لاين
Published: 2020-07-18 00:04:52

مانجا بلاك كلوفر Black Clover الفصل 258 مترجم أون لاين على موقع ot4ku.
https://www.ot4ku.com/2020/07/black-clover-258.html
How to create a GitHub profile Readme
Tags: github
Published: 2020-10-21 10:15:15

---
title: How to create a GitHub profile Readme
published: true
date: 2020-07-18 00:00:00 UTC
tags: github
canonical_url: https://home.aveek.io/blog/post/create-github-profile-readme/
---

If you want to see what this looks like - [`My gitHub Profile`](https://github.com/Aveek-Sahar) 

You can also check out the repository here - [`Aveek-Saha`](https://github.com/Aveek-Saha/aveek-saha)

# Introduction

GitHub has recently added the ability to create a README for your profile that acts as an About Me section or an Introduction to your profile.

This can be helpful because the GitHub bios have a character limit and you might not be able to fit everything you want in there. So your profile readme is a good way to show visitors to your profile everything you need to introduce yourself.

# Steps

To get this About me section, follow these steps:

1. Create a new repository
2. Set the repository name to your github username
3. Make sure the repository is public
4. Select the option to initialize the repository with a README
5. Create Repository

![Screenshot1](https://home.aveek.io/blog/githubprofile/screenshot1.png)

Now if you check your Github profile, you should see something like this above your pinned repos.

![Screenshot2](https://home.aveek.io/blog/githubprofile/screenshot2.png)

You can look around and find some really interesting things to do with your bio, your imagination is your only limitation.
Crear tu perfil de Github con README.md
Tags: github, githubprofile, perfilprofesional
Published: 2020-07-17 23:58:55

**GitHub** acaba de lanzar una nueva funcionalidad que **te permite mostrar un README completamente personalizado en la página de tu perfil**. 

A continuación les voy a explicar lo que debes hacer para conseguir el tuyo.

### Crear un repositorio de GitHub con tu ID

 1. Ingresa a tu cuenta de Github y haces clic en el botón New o puedes accedes al siguiente enlace [https://github.com/new](https://github.com/new)
![Nuevo Repositorio](https://drive.google.com/uc?id=1rt3VtNpJ5tSA0JEmIhlw48klEK0ppVLY)

 2. En **Repository name** utilizas tu mismo nombre de usuario o id de tu cuenta de _Github_ y seleccionamos las opciones Public e iniciar el repositorio con un archivo `README.md` como se muestra en la siguiente imagen:
 ![Crear nuevo repositorio con tu usuario](https://drive.google.com/uc?id=1VB_gJybLBCPgG3ZP4DC2YCKbCIOBLPXD)

 3. Para terminar hacemos clic en el Botón **Create repository** y tendremos nuestro repositorio listo y el archivo `README.md` incluido en él.
 ![Vista repositorio final](https://drive.google.com/uc?id=1m_Y965iJX0V7AQuPf11Mv419L8ixAIST)

 4. Por último, es darle vida a nuestro archivo o fichero `README.md` editando a tu gusto. Los ficheros `README.md` los editas con el formato [GitHub Markdown](https://guides.github.com/features/mastering-markdown/) puedes utilizar [https://stackedit.io/](https://stackedit.io/) para tener una vista previa o utilizar un editor de código como [https://code.visualstudio.com/](https://code.visualstudio.com/) para editar el archivo `README.md` después de clonar tu repositorio.

**NOTA:** si no tienes mucho conocimiento en Markdown te recomiendo utilizar [github Profile Readme Generator](https://rahuldkjain.github.io/gh-profile-readme-generator/) para que partas de una base y puedas ir personalizando tu contenido.


Mi perfil como ejemplo después de editar el archivo `README.md`
![Primer ejemplo del Perfil](https://drive.google.com/uc?id=1dJmTUhWolnmh69HyoIBVszeJZ8BNtiKt)

![Segundo ejemplo del Perfil](https://drive.google.com/uc?id=1jbjEOav0K_p1JyP8Xd1z35_ozmLE1t05)
Signing Existing Commits with GPG
Tags: git, development, gpg
Published: 2020-07-17 21:11:27

---
title: Signing Existing Commits with GPG
published: true
description: 
tags: git, development, gpg
//cover_image: https://direct_url_to_image.jpg
---

[Signing commits](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work) is a longstanding practice, especially around tags (releases) for your projects, however, sometimes this must be done retroactively, especially if you hadn't been signing your commits/releases previously and don't wish to cut a new release simply to append your signature. 

Getting your gitconfig setup for GPG signed commits is pretty straight forward. Get your key fingerprint from the output of `gpg -k` and you'll see an output like this:

```bash
/Users/jmarhee/.gnupg/pubring.kbx
---------------------------------
pub   rsa2048 2020-06-15 [SC] [expires: 2022-06-15]
      <fingerprint>
uid           [ultimate] Joseph D. Marhee <email>
sub   rsa2048 2020-06-15 [E] [expires: 2022-06-15]
```

You'll then add it to your Git configuration so Git knows which key to sign your commits with:

```bash
git config --global user.signingkey <your Key ID>
```

and if you want to do this automatically on each commit, you'll also run:

```bash
git config commit.gpgsign true
```

and:

```
export GPG_TTY=$(tty)
```

and you're ready to modify your commits.

You'll start an interactive rebase:

```bash
git rebase -i --root
```
scroll until you find your commit in the pick list, then modify the keyword `pick` to read `edit`:

```
edit <commit>
```

save, and then amend your commit to include the signature, and complete the rebase:

```bash
git commit -S --amend --no-edit 
git rebase --continue
```

and then push to your branch. One thing to keep in mind is that you sign using the same email address you're committing with (the one you provided when you generated your GPG key); this must match, for example, in order for sites like Github to mark the signature verified. You can update the commit (without updating your Git configuration default email address) using:

```bash
git commit --amend --author "Your Name <you@domain.com>"
```
or setting this in your config to persist this for future commits:

```bash
git config --global user.email "you@domain.com"
```
and push.
ICML 2020 Oral Talk Collection
Tags: machinelearning, computerscience, techtalks
Published: 2020-07-17 23:47:15

I found a great collection of **ICML 2020 paper presentation videos** shared by the authors. You can access it [here](https://crossminds.ai/category/ICML%202020?utm_source=dev&utm_medium=referral) without the conference registration.

Here are some talks I found interesting:

* [Generative Pretraining from Pixels Review (Outstanding Paper HM, by OpenAI)](https://crossminds.ai/video/5f0e0b67d8b7c2e383e1077b?utm_source=dev&utm_medium=referral)

* [Estimating Q (s, s') with Deep Deterministic Dynamics Gradients (by Uber AI & Georgia Tech)](https://crossminds.ai/video/5f0f34107e8fa0cc1aa88f1c?utm_source=dev&utm_medium=referral)

* [Estimation of Bounds on Potential Outcomes For Decision Making (by MIT)](https://crossminds.ai/video/5f10b037e0c52a6346c614bd?utm_source=dev&utm_medium=referral)

* [Understanding and Mitigating the Tradeoff between Robustness and Accuracy (by Stanford & ETH Zurich)](https://crossminds.ai/video/5f0e084bd8b7c2e383e10773?utm_source=dev&utm_medium=referral)

* [Planning to explore via self-supervised world models (by UPenn, Berkeley, Google, FB, CMU, etc)](https://crossminds.ai/video/5f0de8fdd8b7c2e383e10639?utm_source=dev&utm_medium=referral)

Hope to see more talks coming out soon...
Creating an opaque cover with CSS
Tags: css, webdev
Published: 2020-07-17 23:35:47

Have you ever sees one of those fancy websites that display an image with some faded cover to make the text visible on top of the image?
Its a common design style in many websites and today we'll look at how to achieve and customize that design.

In my early days i remember trying to reproduce the effect, i tried editing the image itself in photoshop (most unpractical), then i tried adding an html element with a dark background and superimposing it on top of the image,  i tried so many different ways to achieve what was essentially an extremely simple task with a few lines of CSS.
Sure all those methods worked but they were super unpractical and hard to reuse or they had many html elements and more css code than necessary.

Let's see how we can achieve this in the most efficient way with css, while adding no html at all.

Say we have our image inside a container with some text:

```HTML
<div>
    <img src="bg-img.jpg" alt="bg"/>
    <h5>Horizon</h5>
</div>
```
We're gonna add the background with just those html elements.

Here's our css:
We'll define a container sizes and the image inside it

```CSS
div {
   width: 400px;
   height: 500px;  
}
div img {
    position: absolute;
     width: 100%;
     height: 100%;
     object-fit: cover;     
}
```
This will create our image with 400px wide and 500px high.

Let's style our text
```css
h5 {
    color: #fff;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    margin:auto;
    text-align:center;
    z-index:10;
    font-size: 40px;
}
```

Now is where we add the opaque cover.
We'll create it with a simple pseudo-selector ::after

```CSS
div::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    }
```
The content property is necessary, otherwise the browser won't display it. Then we set a full height and width. And finally we add the linear gradient property which starts at 0 opacity at the top and fades to full black background at the bottom to create that opaque effect.

And we're done! We've successfully created an opaque cover in the most efficient way possible, using as little code and no extra html elements.

Try it out and don't hesitate to share your thoughts!