teleren/devto huggingface dataset:
Penfolio - Portfolio based on your Codepen profile
Tags: codepen
Published: 2021-12-25 01:39:22

<p>Build an entire portfolio based on your Codepen profile. Just change the codepen_username js variable and watch the magic happen. Based on <a href="https://codepen.io/harunpehlivan" target="_blank">HARUN PEHLİVAN</a>'s amazing api</p>

{% codepen https://codepen.io/harunpehlivan/pen/aYLNWa %}
Custom Build folder for React
Tags: react, bash
Published: 2021-12-24 23:48:56

In this article, we will learn how to change the Build path of a React application. Here I'm using a shell script for moving the contents inside the build folder to another location. 

1. Create a **{file-name}.sh** file inside the root directory of your react app. 

2. Open to your **package.json** file.

3. Just beneath the build script, add a new one called "**postbuild**" with a value "./{file-name}.sh".

> _if you are using Windows, use bash before executing the script._


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wu9ivyubo0hd3p1osbl.png)

This shell script is executed right after the build process, and the actual magic happens inside the shell script.

```
#If the folder exists, remove it first, then copy the files
if [ -d "./../server/public/${APP_NAME}/" ]; then

    rm -rv ./../server/public/${APP_NAME}/*
    mv -v build/* ./../server/public/${APP_NAME}/
    
#Else make a new folder and then move the files.
else
    mkdir -p ./../server/public/${APP_NAME}
    mv -v build/* ./../server/public/${APP_NAME}/
fi

```

In my case, I just wanted to move the build folder contents to my server folder.
Before moving the content inside the build folder, I checked whether the output folder was already exiting. If there is a folder, I want to clean it first and move the contents. 

This script can be customized to your need. Just go through some simple shell-script tutorials. Here what is helping us is the '**postbuild**' script that will be automatically executed after the build command.

Happy Coding 🥳
Levels of testing
Tags: qa, tdd, softwaretesting, softwaredevelopment
Published: 2022-02-09 18:58:19

---
title: Levels of testing
published: true
date: 2021-12-25 00:00:00 UTC
tags: qa,tdd,softwaretesting,softwaredevelopment
canonical_url: https://jhall.io/archive/2021/12/25/levels-of-testing/
---

I recently came upon an infographic on LinkedIn, which I won’t include here, because I don’t want draw negative attention to the author whose name appears in the image. But it’s quite simple, and the text reads:

> ## Levels of Testing
> 
> 1. Unit Testing — Done by Developers
> 2. Integration Testing — Done by Testers
> 3. System Testing — Done by Testers
> 4. Acceptance Testing — Done by End Users

This mindset might have been considered acceptable in the 1990s. But in the age of Agile software development and DevOps, we now know this approach is not a good one for a number of reasons. Most important, [we now know that quality suffers when developers aren’t writing acceptance tests](https://jhall.io/archive/2021/09/21/do-your-developers-write-tests/). We also know that it’s very inefficient to have so many work silos and breaks in workflow.

Furthermore, any developer who can’t write integration or system tests is not a qualified developer, in my opinion. Would you hire a plumber who only makes sure the faucent works, but doesn’t know how to test that the faucet is connected to the water supply?

What about acceptance testing?

If your developers don’t understand the customer requirements sufficiently to do acceptance testing, they also don’t understand customer requirements enough to implement the feature in the first place.

If you find yourself in a situation where developers cannot do acceptance testing on their own, the solution is probably to get the developers talking to the users of the software, not shirking their responsibility by offloading that testing work.

So here’s my fixed version of the “Levels of Testing”:

> # Levels of Testing
> 
> 1. Does it work? — Done by Developers

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
This is how you can make your Laptop or PC faster
Tags: windows, fast, junk
Published: 2021-12-24 23:38:50

Hold down the Windows Key and Press R on your keyboard. ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vm7esnjw2vv5hlx6o9w6.png)
 
On Key board

![On Keyboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nvfbnw27ikgela77x8js.png)

You can see this interface

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s29fzgcpi3ehfrzxq5kt.png)
1)write "temp"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25egzf6o7k7rffyuktnr.png)
Then press "OK"
You may find this
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wb2df1d42uqhywxl6eho.png)

Now press Control + A (ctrl + A) on your keyboard to select all of the files

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ls9nrz81v80qbxbogkw.png)
Now press Shift + delete to permanently delete them
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9bc7120srukprn13spf8.png)

Then press "Yes"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7zoc79wo0zdetku67tld.png)
Now you have to press " Continue" . 

2) Write "%temp%" and repeat the whole process
3) Write "prefetch" and repeat the process
Adding __rich__ methods to python classes
Tags: python, todayilearned
Published: 2021-12-24 20:33:12

---
published: true
tags:
- python
- til
series: til
title: Adding __rich__ methods to python classes
canonical_url: https://waylonwalker.com/til/dunder_rich/
---

Adding a `__render__` method that returns a rich renderable to any python class makes it display this output if printed with rich.  This also includes being nested inside of a rich Layout.


``` python
import rich
from rich.panel import Panel


class ShowMe:
    def __rich__(self):
        return Panel("hello", border_style="gold1")


if __name__ == "__main__":
    rich.print(ShowMe())
```

![results of printing ShowMe with rich](https://images.waylonwalker.com/dunder_rich_showme.png)

---

I'm shortening up my content pipeline and getting small ideas out more often by creating small tils that will eventually bubble up into larger peices.

All of my tils are on my website -> https://waylonwalker.com/til
Happy Holidays: From a developer with code!
Tags: javascript, watercooler
Published: 2021-12-24 22:45:28

This is a present for you!

I wrapped it in a way you have to “open it” to learn what’s inside.

Unless... can you can guess what this does before running it?

The present:

{% gist https://gist.github.com/Noriller/e651cfad352ddbc9469104a8e7334853.js %}

Happy Holidays!

---

Cover Photo by [Kira auf der Heide](https://unsplash.com/@kadh?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/present?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
Advent.js🎅🏼| #20: ¿Una carta de pangramas? ¡QUÉ!
Tags: javascript, adventofcode, webdev, spanish
Published: 2021-12-24 22:44:59

## [¿Una carta de pangramas? ¡QUÉ!](https://adventjs.dev/challenges/20)

En la clase de español del pueblo de Laponia han creado un reto a la hora de escribir la carta a Papa Noél 🎅: la carta ✉️ tiene que contener todas las letras del alfabeto.

Desde el taller de Santa 🎅 se han enterado y quieren escribir **una función** que les diga si realmente la cadena de texto que les llega tiene, efectivamente, todas las letras del abecedario español 🔎.

Hay que tener en cuenta las letras en mayúscula y que las letras con acento y diéresis se consideran iguales. Por ejemplo la `á` y la `ä` cuenta como una `a`

```JS
pangram('Extraño pan de col y kiwi se quemó bajo fugaz vaho') // true
pangram('Jovencillo emponzoñado y con walkman: ¡qué figurota exhibes!') // true

pangram('Esto es una frase larga pero no tiene todas las letras del abecedario') // false
pangram('De la a a la z, nos faltan letras') // false

```
Y ya que estás... **¿Cuál es tu pangrama favorito?** ¡Compártelo en nuestra comunidad de Discord!

Completa el reto!

---
Te dejo una posible solución:


{% jsitor https://jsitor.com/embed/dNqCtvnSy %}

---
Puedes seguir a @midudev y estar pendiente de los retos de Advent.js 

{% twitter 1466086678507008003 %}
Advent.js🎅🏼| #19: ¿Qué debeariamos aprender en Platzi?
Tags: javascript, webdev, spanish, adventofcode
Published: 2021-12-24 22:44:45

## [¿Qué debeariamos aprender en Platzi?](https://adventjs.dev/challenges/19)

Con motivo de las fechas más bonitas del año, en Platzi han lanzado una promoción muy especial porque **la educación es un regalo 🎁 para siempre**.

En Platzi tienen **más de 800 cursos** 📚 pero, claro, nuestro tiempo es limitado. Así que vamos a optimizar nuestro tiempo disponible para **completar dos cursos usando el máximo número de horas disponible**.

Tenemos que crear **una función que recibe dos parámetros**. El primero es el número de horas que tenemos disponible ⏳ y el segundo es un array donde cada índice es un curso y el valor el tiempo que se tarda en completar.

**Tenemos claro que queremos hacer dos cursos** así que la función debe devolver un array con el índice de los dos cursos que vamos a poder completar con el tiempo disponible proporcionado y **usando el máximo tiempo disponible**. Si no nos da tiempo, devolvemos null

Vamos a ver unos ejemplos:

```js
learn(10, [2, 3, 8, 1, 4]) // [0, 2] -> con 10 horas disponibles lo mejor es que completemos los cursos en el índice 0 y 2.

learn(15, [2, 10, 4, 1]) // [1, 2] -> Los cursos en [1, 2] son 14 horas, es la mejor opción.

learn(25, [10, 15, 20, 5]) // [0, 1] -> los cursos [0, 1] y [2, 3] completan exactamente con 25 horas pero siempre devolvemos el primero que encontremos

learn(8, [8, 2, 1]) // [1, 2] -> para hacer dos cursos, no podemos hacer el de 8 horas, así que devolvemos el de 1 y 2.

learn(8, [8, 2, 1, 4, 3]) // [3, 4] -> usamos el máximo tiempo disponible así que [3, 4] usa 7 horas y el [1, 2] sólo usaría 3 horas.

learn(4, [10, 14, 20]) // null -> no nos da tiempo a hacer dos cursos

learn(5, [5, 5, 5]) // null -> no nos da tiempo a hacer dos cursos
```
Mirando todo el tema de Platzi, además nos hemos dado cuenta que tienen un descuento especial para Navidad. ¿No sabes qué regalar? **Regala conocimiento** 🎓.

Completa el reto!

---
Te dejo una posible solución:


{% jsitor https://jsitor.com/embed/TmDzmXIJW %}

---
Puedes seguir a @midudev y estar pendiente de los retos de Advent.js 

{% twitter 1466086678507008003 %}
Advent.js🎅🏼| #18: El sistema operativo de Santa Claus
Tags: javascript, adventofcode, spanish, webdev
Published: 2021-12-24 22:44:29

## [El sistema operativo de Santa Claus](https://adventjs.dev/challenges/18)

Evelyn Belefzin 👩‍💻 está trabajando en un **sistema operativo** para ser usado en el taller de Santa Claus 🎅.

Se ha dado cuenta que en el taller nadie le presta atención a los nombres de los ficheros y a veces intentan guardar el mismo fichero más de una vez... así que es importante que **gestionemos bien los nombres duplicados**.

Tenemos que crear **una función que al pasarnos un array de nombres de archivo** devolvamos un array con el mismo número de elementos pero donde los nombres que se repetían se anexe al final `(k)` donde k sería el número de veces que se encontró repetido.

Lo mejor es que veamos un ejemplo:

```js
const files = ['photo', 'postcard', 'photo', 'photo', 'video']
fixFiles(files) // ['photo', 'postcard', 'photo(1)', 'photo(2)', 'video']

const files2 = ['file', 'file', 'file', 'game', 'game']
fixFiles(files2) = ['file', 'file(1)', 'file(2)', 'game', 'game(1)']

// ojo que los elfos ya tenían archivos con (1)... ¡y pueden estar repetidos!
const files3 = ['file', 'file(1)', 'icon', 'icon(1)', 'icon(1)']
fixFiles(files3) // ['file', 'file(1)', 'icon', 'icon(1)', 'icon(1)(1)']
```
Por cierto, **nos han dicho que son Agile y usan Scrum**. Por eso quieren saber cuánto tiempo vas a tardar para saber cuándo van a poder usarlo. Que hay prisa. 😝 Así que entra a Discord y cuéntanos.

Completa el reto!

---
Te dejo una posible solución:


{% jsitor https://jsitor.com/embed/pILkXfTvI %}

---
Puedes seguir a @midudev y estar pendiente de los retos de Advent.js 

{% twitter 1466086678507008003 %}
Advent.js🎅🏼| #17: La locura de enviar paquetes en esta época
Tags: javascript, adventofcode, spanish, webdev
Published: 2021-12-24 22:44:07

## [La locura de enviar paquetes en esta época](https://adventjs.dev/challenges/17)

Las empresas de paquetería 📦 se preparan para la época de fiestas y la locura de envíos que les espera.

La empresa funciona con flotas de furgonetas 🚛 y camiones 🚚. Las flotas tienen un organigrama, ya que existen rangos de nivel de experiencia.

Necesitamos saber el número de paquetes que una persona va a poder gestionar en un día. Para ello se cuenta el número de paquetes que puede llevar esa persona y **todos los transportistas que tiene en su equipo**. Lo malo es que los datos están almacenados de una forma un poco rara en un array:

    El array contiene otros arrays que contienen los datos de cada transportista
    `transportista[0]` -> Nombre/ID del Transportista
    `transportista[1]` -> Paquetes que gestiona en un día
    `transportista[2]` -> Array con sus subordinados


Para que lo veamos en código, tanto el array, como la función de dos parámetros para conseguir el número deseado:

```js
const carriers = [
  ['dapelu', 5, ['midu', 'jelowing']],
  ['midu', 2, []],
  ['jelowing', 2, []]
]

countPackages(carriers, 'dapelu') // 9
// 5 de dapelu, 2 de midu y 2 de jelowing = 9

const carriers2 = [
  ['lolivier', 8, ['camila', 'jesuspoleo']],
  ['camila', 5, ['sergiomartinez', 'conchaasensio']],
  ['jesuspoleo', 4, []],
  ['sergiomartinez', 4, []],
  ['conchaasensio', 3, ['facundocapua', 'faviola']],
  ['facundocapua', 2, []],
  ['faviola', 1, []]
]

countPackages(carriers2, 'camila') // 15
// 5 de camila, 4 de sergiomartinez, 3 de conchaasensio, 2 de facundocapua y 1 de faviola = 15
```

**¡Ten cuidado!** Como has visto en el segundo ejemplo, **el organigrama puede tener diferentes niveles y además nos viene información que puede ser que no necesitemos**. Debemos tener en cuenta el parámetro de carrierID para calcular bien el número y contar todo su equipo.

Completa el reto!

---
Te dejo una posible solución:


{% jsitor https://jsitor.com/embed/7dl1qhQsm %}

---
Puedes seguir a @midudev y estar pendiente de los retos de Advent.js 

{% twitter 1466086678507008003 %}
Replace fragment tag with FragmentContainerView Causing Runtime Error
Tags: kotlin, android, beginners
Published: 2021-12-24 22:33:53

**Because it fails to find navigation controller in your activity class**

You have fragment defined in your main activity layout xml file.

```xml
<fragment
    android:id="@+id/nav_host_fragment"
    android:name="androidx.navigation.fragment.NavHostFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:defaultNavHost="true"
    app:navGraph="@navigation/nav_graph" />
```

Android studio gives you the following warning.

![replace_with_fragment_container_view_01.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1634992939312/iNj3NA4ax.png)

> Replace the <fragment> tag with FragmentContainerView.


You follow the suggestion and replace it with `androidx.fragment.app.FragmentContainerView`

```xml
<androidx.fragment.app.FragmentContainerView
    android:id="@+id/nav_host_fragment"
    android:name="androidx.navigation.fragment.NavHostFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:defaultNavHost="true"
    app:navGraph="@navigation/nav_graph" />
```

Then, you can build the project successfully. However, when you run it, your app crashes with the following run-time error.

![replace_with_fragment_container_view_02.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1634993233083/1TNcOlXGC.png)

> Caused by: java.lang.IllegalStateException: Activity com.udacity.shoestore.ui.MainActivity@f2c4e66 does not have a NavController set on 2131362101 at androidx.navigation.Navigation.findNavController(Navigation.java:61)

## Solution
`findNavController()` no longer works in your activity class. You need to find the fragment first, using `supportFragmentManager.findFragmentById()` to access the navigation controller.

### Before
```kotlin
private val navController by lazy {
    findNavController(R.id.nav_host_fragment)
}
```
### After
```kotlin
private val navController by lazy {
    val navHostFragment = supportFragmentManager
        .findFragmentById(R.id.nav_host_fragment) as NavHostFragment

    navHostFragment.navController
}
```

## Conclusion
I'm not exactly sure why `FragmentContainerView` should be used, even after I read the documentation. Personally, from a user perspective, I prefer using `<fragment>` tag because it uses less code to find the navigation controller. The app also runs perfectly fine with it!

Also, the default template project from Android Studio does NOT use `<androidx.fragment.app.FragmentContainerView>` which it should if that is the recommended way?

---

*Originally published at [https://vtsen.hashnode.dev](https://vtsen.hashnode.dev/replace-fragment-tag-with-fragmentcontainerview-causing-runtime-error)*.
NoSql vs Sql

Tags: mongodb, beginners, javascript, webdev
Published: 2021-12-24 22:23:04

## 
Difference between NoSql and MySql.

**SQL**

SQL databases are the older and more widely used of the two data storage systems. Examples of the most popular SQL databases include:
MySQL
PostgreSQL
Microsoft SQL Server
Oracle
MariaDB
SQL databases are classified as relational databases which follow the relational model proposed by E. F. Codd in 1970. The relational model introduced the idea of organizing data as tuples, also known as rows, that are grouped into relations, also known as tables. 
**NO-SQL**
NoSQL databases are database systems that are not based on the relational model. Although such databases have existed since the late 1960s, the term NoSQL appeared in the early 2000s and has gained popularity since then. Some examples of common NoSQL databases include:
MongoDB
CouchDB
Redis
Elasticsearch
Cassandra
The popularization of NoSQL systems began as the result of the need for scalability and flexibility, especially from tech giants handling large and diverse sets of data.
Sohbet Chat Siteleri 
Tags: javascript, chat, sohbet
Published: 2021-12-24 10:04:02

Sohbet Chat Nedir?
Herkese Merhaba; Bugün sizlere çağımızın teknolojisi olan internet ve onun üzerine kurulan sanal dünya içindeki Sohbet Sitelerinden bahsedeceğim.Hepimizin bildiği gibi insanların sıklıkla girdikleri sitelerin başında Sohbet Chat siteleri gelmektedir.
Herkes bu sitelere giriş yaparak anlık sohbete başlayarak kendilerine arkadaş ve sevgili bulmak için girmeyi tercih ederler.Sohbet Siteleri hayatımızda 20 yıldan fazladır girmiş bulunmaktadır.Eskiden insanların çekinerek girdikleri bu sitelere günümüzde oldukça fazla ilgi duyulmakta olduğundan sitelerde zamanla sayıları artmıştır.
Bu kadar fazla olan siteler içeresinde En iyi Sohbet Siteleri hangisi diye kendi kendimize soruyoruz.Gerçek olan bir şey var en iyi olmak en kalabalık olan değil kaliteli ve seviyeli sohbet anlayışı ile sizleri güvende hissediren sitelerdir.
Yıllardır bu sektörün içinde biri olarak çok fazla analiz etme ve gözlemleme imkanım oldu ve sizlere önerim kalabalık sitelerde kendinizi ifade etmeniz oldukça zor ve nerede ise imkansızdır.Genel olarak kalabalık sitelerde aradığınızı bulamabilmeniz sizden ücret talep edilmektedir.Bu şekilde site içerisinde admin olarak amaçınıza ulaşabilirsiniz.
Bu yüzden sizlere önerim kalabalık sitelerde zaman kaybetmek yerine daha sakin ve sohbetin anlaşılabilir olduğu sitelere girmeniz.Genel olarak bu sitelerde daha gerçek ve samimi sohbet ortamı bulunmaktadır.
Hangi Sohbet Siteleri Güvenli
Türkiyede sayısız Sohbet Chat üzerine site olduğunu biliyoruz, belki şuan bir yenisi bile açılmış olabilir. Peki bu kadar çok sitenin içerisinde kullancılar nasıl tercih yapmalı?

Öncellikle bir sitenin güvenli olduğu site girişinin https uzantılı olması, giriş yaparken sizden her hangi bir kimlik bilgisi talep etmemesi ve üyelik ismi üzerinden sizden para talep etmesi bunlar başlıca nedenlerden en önemlisi.

Ülkemizde Sohbet Chat
99 yılının sonuna 200 li yılların başında ülkemizde popüler hale gelen [Chat Siteleri](https://eschat.net) günümüzde hala milyonlarca kişi tarafından tercih edilmeye devam ediyor. Teknoliji sayesinde Sohbet Sitelerine girişler artık bilgisayara gerek kalmadan akıllı telefonlar sayesinde internetin olduğu her yerden kolay şekilde giriş imkanı sunuyor.
Monitor all of your team's projects with team audit logs
Tags: netlify, collaboration, logging
Published: 2021-12-24 21:44:28

---
title: Monitor all of your team's projects with team audit logs
published: true
description: Keep track of all of your team project activity, from creation to deployments. From configuration to rollbacks. With Netlify team audit logs
tags: Netlify, Collaboration, Logging
cover_image: https://www.netlify.com/img/blog/og-team-logs.png
canonical_url: https://www.netlify.com/blog/2021/12/24/monitor-all-of-your-teams-projects-with-team-audit-logs/
series: Netlify - a feature a day 2021
---

> Throughout December we'll be [highlighting a different Netlify feature each day](/blog/2021/12/01/highlighting-a-different-netlify-feature-each-day-in-december/?utm_campaign=featdaily21&utm_source=devto&utm_medium=blog&utm_content=team-logs). It might just be the thing you need to unlock those creative juices, and [dust off that domain](https://www.netlify.com/blog/2021/12/01/dusty-domains-your-forgotten-domains-raise-money-for-charity/?utm_campaign=featdaily21&utm_source=devto&utm_medium=blog&utm_content=team-logs) you registered but never deployed! Keep an eye [on the blog](https://www.netlify.com/blog/2021/12/01/highlighting-a-different-netlify-feature-each-day-in-december/?utm_campaign=featdaily21&utm_source=devto&utm_medium=blog&utm_content=team-logs) and on [Twitter](https://twitter.com/netlify) for each feature!

When many people come together to collaborate on a project or on many projects, it can be difficult to keep track of what is happening. That’s why we created [Team Audit logs](https://docs.netlify.com/accounts-and-billing/team-management/team-audit-log/?utm_campaign=featdaily21&utm_source=devto&utm_medium=blog&utm_content=team-logs).

Team audit logs give any team administrator a heartbeat view of all of the actions taken by  members of a Netlify team.

{% youtube kbLQHvEiCHo %}

Now, you have on place to check to see which of your projects have been deployed or updated and when, which projects have been rolled back and by whom, and many other activities which might be useful to know about.

Teams bring all sorts of useful ways to collaborate on all of your web projects in Netlify. And access to this summary of actions is a great part of monitoring the health and productivity of your team.

## More information

- [Team pricing](https://www.netlify.com/pricing/?utm_campaign=featdaily21&utm_source=devto&utm_medium=blog&utm_content=team-logs)
- [Docs: Team overview](https://docs.netlify.com/accounts-and-billing/team-management/?utm_campaign=featdaily21&utm_source=devto&utm_medium=blog&utm_content=team-logs)