teleren/devto huggingface dataset:
O que são Design Patterns, e como podemos nos beneficiar?
Published: 2023-04-21 04:01:40

Design Patterns, ou padrões de projeto, são soluções recorrentes para problemas comuns encontrados no desenvolvimento de software. Eles surgiram como uma forma de codificar as melhores práticas e soluções de design para situações comuns, permitindo que os programadores economizem tempo e esforço ao criar novos sistemas.

O uso de Design Patterns tem vários benefícios para os programadores. Eles fornecem uma linguagem comum para discutir soluções de design, permitindo que os desenvolvedores comuniquem ideias de maneira mais clara e resumida. Isso também significa que novos membros da equipe podem entender rapidamente o código existente e contribuir para o projeto de forma eficiente.

Outro benefício do uso de Design Patterns é que eles são testados e comprovados, o que significa que os desenvolvedores podem ter confiança na solução que estão implementando. Os padrões de projeto também ajudam a manter o código limpo e organizado, tornando-o mais fácil de manter e modificar no futuro.

Existem vários tipos de Design Patterns utilizados para diferentes propósitos. Alguns padrões são usados para organizar o código em grandes projetos, enquanto outros são mais específicos e ajudam a resolver problemas menores. Os principais tipos de Design Patterns incluem:

**Padrões Criacionais**: 

Esses padrões são usados para criar objetos de maneira eficiente e flexível. Eles incluem padrões como Singleton, que garante que apenas uma instância de uma classe seja criada, e Factory Method, que permite que subclasses decidam qual objeto criar.

**Padrões estruturais**: 

Esses padrões ajudam a organizar o código em grandes projetos. Eles incluem padrões como Adapter, que permite que duas interfaces incompatíveis trabalhem juntas, e Facade, que fornece uma interface simplificada para um subsistema complexo.

**Padrões comportamentais**: 

Esses padrões ajudam a controlar o fluxo de dados e o comportamento dos objetos em um sistema. Eles incluem padrões como Observer, que permite que um objeto seja notificado quando outro objeto muda, e Command, que encapsula uma solicitação como um objeto.

É importante lembrar que a escolha do Design Pattern mais adequado depende do contexto específico de cada projeto e do problema que se está tentando resolver. O desenvolvedor deve ser capaz de avaliar a situação e escolher o padrão mais apropriado para solucionar o problema em questão.

Em geral, os Design Patterns são uma ferramenta poderosa para os programadores. Eles permitem que os desenvolvedores criem soluções de design comprovadas e testadas, economizando tempo e esforço. Além disso, o uso de Design Patterns ajuda a manter o código limpo e organizado, tornando-o mais fácil de manter e modificar no futuro. Se você é um programador que ainda não utiliza Design Patterns, vale a pena estudá-los e começar a implementá-los em seus projetos.
How to Unlock Admin User in Magento 2
Tags: webdev, magento, magento2tutorials
Published: 2023-04-21 03:49:04

Assuming the director of a web based business store utilizing Magento 2 coincidentally loses admittance to their administrator client account or gets kept out of the backend, recovering control can be challenging. 

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

Magento 2 offers a few highlights and customization choices for online stores, yet at times, opening the administrator client is vital. This blog will direct you on **_how to unlock admin user in Magento 2_** by getting to the data set, finding the client record, refreshing the client status, clearing the store, and logging once more into the backend.

For more info, visit **_https://webguru.dev/how-to-unlock-admin-user-in-magento-2/_**
data.table Package in R
Tags: datascience, tutorial, beginners, learning
Published: 2023-04-21 03:45:31

In this post, we take a look at the data.table package in R. You use it with the tabular data in R language. You can think of this package as a much improved version of the data.table.

We take a look at this package in a brief and hopefully by the end of it you get the idea of how to use the data.table package. 

I created the video that covered the features of the `data.table` package. You can take a look at the video below.

{% embed https://www.youtube.com/watch?v=K1_hOo2h3yU %}

First step is the installation of the package. 

**Installation of Data.table**
---

Use the below command to install the package. 

> install.packages('data.table')

Then use the package. 

library(data.table)

Now let's play with the simple data. 

>dt = data.table(name = c("a", "b", "c", "d"),
                       id = (7, 0, 3, 4))

Then let's print the dt as a data table. 

>dt


That's it. 

You should check the above video to get the idea on how to do more customization and use the library. 

I hope this helps anyone who is trying to learn the data science and exploring the dataset on their own.
Announcing RelaGit
Tags: git, typescript, news, solidjs
Published: 2023-04-21 03:36:40

Brought over from [Rela](https://rela.dev/blog/announcing-relagit).

Today, I am pleased to announce our first product, RelaGit. RelaGit is a Git Client designed to do everything _you_ need, and everything _you_ want. The client provides a simple, intuitive javascript API for managing workflows, repositories, and more.

## Why RelaGit?

Existing Git Clients are well-tested, and have been around for a long time. They are battle-hardened but unfortunately, they are also very complex. RelaGit is meant to be simple, and easy to use. RelaGit is built with TypeScript, Electron, SolidJS and a custom Git library. Thsi will allow it to be faster and more speialised in what it does best. The client is designed to be useful for what the modern developer does ona day-to-day basis and make tasks faster and easier.

## Open Source???

At Rela, we believe in the values of Open Source. (We even have a whole [pledge](https://rela.dev/oss) on the topic) We are committed to making good Open Source software, and as such, we will be making RelaGit open source under the MIT license when it's release date comes around. For now, it is closed source. You can follow the development of RelaGit on our [GitHub](https://github.com/RelaGit).


## What's next?

This has been brief but don't worry: more is coming soon. Keep a look out for more posts on the blog, and more information added to the site.
Name and Greet Project
Tags: 50daysofpythonprojects, 100daysofcode, python, javascript
Published: 2023-04-21 02:55:52

Name and greet" is a simple Python project that allows the user to input their name and select a type of greeting. Based on their choice, the program outputs a personalized greeting. This project is a great way to get started with Python programming and practicing input/output functionality, if/else statements, and user prompts.

The program can be customized and expanded by adding more greeting options or by making the program more interactive, such as asking the user additional questions or providing them with more choices. With a few modifications, this project can be turned into a more complex chatbot or an interactive user interface for greeting people.

- Open your Python development environment (such as IDLE or PyCharm).

- Create a new Python file and name it `main.py`.
Start by printing a welcome message to the user:
python
```
print("Welcome to the name and greet program!")
```

- Next, prompt the user to enter their name:
```
name = input("Please enter your name: ")
```

- Once the user enters their name, prompt them to select a type of greeting:
```
print(f"Hi {name}! How would you like to be greeted?")
print("1. Say hello")
print("2. Wave")
print("3. Smile")
choice = input("Enter your choice (1/2/3): ")
```

- Now, based on the user's choice, output a personalized greeting:
```
if choice == "1":
    print(f"Hello {name}, wishing you a pleasant day from here")
elif choice == "2":
    print(f"Nice to meet you {name}! Waves")
elif choice == "3":
    print(f"It's so nice to meet you with a smile {name}. The Lord is your strength")
else:
    print("Invalid choice. Please enter 1, 2 or 3.")
```

- Finally, print a thank you message to the user:

```
print("Thanks for using the name and greet program!")
```

- Save the file and run the program to test it out.
```
python3 main.py
```
That's it! This simple program prompts the user to enter their name and then allows them to select a type of greeting. Based on their choice, a personalized greeting is displayed. You can customize the program with additional features or make it more interactive.

- Follow me on twitter [Emmanuel Adetoro](https://twitter.com/agba_software)
- Source code [Download source code](https://github.com/ademto/50-days-of-python-projects)
6 Hacks to create a Good Coding Habit
Tags: devjournal, beginners, programming, coding
Published: 2023-04-21 02:31:00

## 6 Hacks to create a Good Coding Habit:

1. Set aside a dedicated time and place for the habit.

2. Start with small achievable goals.

3. Practice regularly.

4. Seek help and feedback.

5. Stay organised.

6. Reward yourself.


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

Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with [me](https://calendly.com/pragyanatvade).

If you want to learn more about DevOps and Backend space, [follow me](https://dev.to/pragyanatvade).

If you want to connect, reach out to me on [Twitter](https://twitter.com/pragyanatvade) and [LinkedIn](https://www.linkedin.com/in/pragyanatvade/).
Rebuilding My Portfolio!✨
Tags: webdev, nextjs, frontend, design
Published: 2023-04-21 02:26:48

## This is finally it ! After 2 attempts of building my portfolio! I think this will finally be the time for it.

The **Tech Stack** I will be using is 

- `Next.JS`

- `TypeScript`

- `Chakra-UI`

- `Framer-Motion`

- `Axios`

- `Stapi`

- `FireBase`

- `GitHub API`

- `DevTo API`


After major thoughts and not hearing back from positions. I have decided to fully rebuild my developer portfolio. ✨😎




This really seem to be a strain and one of my biggest challenges due to my desire to have everything just right.😅

## Here is where I am at so Far.


![This The Main Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0axjfvomlxjc5qk825h.png)
![whats new- Main Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gy99a4r3d5120yvzfw6p.png)



![Features - on Main Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xjdlg0iijiziep8tqrdf.png)




![About Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0zpx9rygmbxj82xstdxh.png)


![Tech-Stack Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cnvsti0qx3h8m4q1qbhb.png)



So Far everything is going good besides few needed animations. Projects, Blog, Repository pages will be finished by the morning. 

> I will be giving this page its own custom ".dev" domain. 




**I will be blogging more at the least every 2 days to give a full walk through of how everything is going and what I am doing to build it. Maybe do a Youtube Video of building it. I will also continue to update my journey as a Front-End Engineer**



Can keep update till I deploy in[ GitHub Repository](https://github.com/judahsullivan/MyDeveloperPortfolio)
ZORP - A modern operations platform
Tags: operations, alerts
Published: 2023-04-21 02:05:34

ZORP is the OS for Operations. ZORP provides powerful technology solutions that help you automate all parts of your operations and streamline them in minutes. 

ZORP provides a no-code application builder to build simple checklists for complex applications in just a few minutes without coding. 

ZORP also enables businesses to respond faster to problems in their operations through a real-time incident management solution that automatically monitors for issues and alerts the right team.

[https://www.zorp.one](https://www.zorp.one)
A minimal ChatGPT client by vanilla javascript, run from local or any web host
Tags: chatgpt, javascript, html, selfhost
Published: 2023-04-21 01:40:34

Hi, all,

would like to introduce ["vannilla-chatgpt"](https://github.com/casualwriter/vanilla-chatgpt) - a minimal ChatGPT client by vanilla javascript, run from local or any web host

This program aims to code a full functional chatGPT client using only raw HTML/CSS/JavaScript with minimal coding effort, in the purpose of exploring the minimum requirements of utilizing chatGPT features without the need for a server, framework, or additional resources.

This program offers basic conversation functions with some enhancements for conversation content

1. refined printout 
2. easy to copy code-block and content
3. export conversation to markdown
4. voice recognition and speak answer

![layout](https://casualwriter.github.io/vanilla-chatgpt/vanilla-chatgpt2.jpg)

It is available as a single HTML file, which run directly from local or GitHub source folder.

* https://raw.githack.com/casualwriter/vanilla-chatgpt/main/source/index.html
* https://raw.githack.com/casualwriter/vanilla-chatgpt/main/source/vanilla-chatgpt.html
* if do not have API key, please check the [demo](https://pingshan-tech.com/demo/ps-chatgpt.html)

For more details, please visit github: https://github.com/casualwriter/vanilla-chatgpt

Have a nice day,
Chrono Tactics - DVLog 1
Tags: gamedev, programming
Published: 2023-04-21 01:18:52

This game is an update to this post

https://dev.to/kimsean/thedevlog-pvp-turned-based-tactics-game-33ee

This is the update. Im still working on a lot of things.

Heres a quick preview of the game update.
https://youtu.be/wT_iwf7Q618
Building Better Connections: Progress on the Contractr Matching Feature
Tags: webdev, javascript, beginners, programming
Published: 2023-04-21 01:06:00

Day 80 of #100DaysOfCode, and today I made some good progress on the Contractr project. Specifically, I worked on the matching feature, which is an important part of the app's functionality.

When a user likes another user's profile, a function is triggered that sends the profile's user ID and the ID of the signed-in user to the server. The server then puts these IDs in an array in the signed-in user's document in the database. This feature is essential for the app's matching algorithm.

In the coming days, I plan to work on displaying these connections on the frontend, as well as displaying past conversations with these connects. This will provide a more seamless user experience and make it easier for users to keep track of their interactions on the app.

Overall, I'm excited about the progress I'm making on the Contractr project and can't wait to see how it evolves in the future. Stay tuned for more updates and progress reports as I continue on this exciting path of learning and growth. Thank you for following my journey!
Ennyimba za Kristo for Windows 10/7/8/11
Published: 2023-04-21 00:47:24

If you are there wondering if you could download sda new Luganda version ennyimba za Kristo to work on Windows without installing any emurator software
Here; https://github.com/samueljevix/samueljevix/releases/tag/v2.0.0
You can download the exe file there on your PC, install it
The software is free 
And it's in Luganda only

 Any questions/ help;
Contact me at+256754045576
Email: samueljevix234@gmail.com
 Thanks
Function(al) Thinking 🧠
Tags: javascript, functional, coding, programming
Published: 2023-04-20 23:59:24

**Since the beginning of my coding journey, JavaScript functions have been an uphill battle.** 

Though, as the weeks have gone on, little by little I have been able to get bits and pieces of basic function structure to stick inside my scrambled brain. 
_- This has been no little feat_

It did not come in full, nor all at once. As I had to get flustered even further, to the point of total confusion before grasping the basic concept of **functions**.

Inevitably, without full understanding of the basic function expression, the course work dove straight in to more variations of JS functions. Such as...

- Callback functions
- Anonymous functions
- Arrow functions
... etc. 

In this blog post I'll start with further describing how we write a basic Javascript function.


_Lets begin with basic JS function!_

Functions are blocks of code that take in **inputs**, perform specific **actions**, and produce **outputs**.
![JS Function](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q9cmdhc2n84oarg26had.png)

Here we see the function keyword and then a variable name "sum" which holds the value of the function. Next we have <u>inputs</u> such as "num1" and "num2" which are variables holding values of their own. By placing these values in the parentheses "()", we are passing them into the function as parameters to hold an argument. Then within the function body we have the <u>action</u>, which is to add the two values together using the (+) arithmetic operator. In return we will get the result of adding the two values, which is the <u>output</u>.

In my next few blog posts I will dive further into explain the other type of functions different ways they can be written.
<link> vs @import, Which should you use to get Fonts
Tags: webdev, web, frontend
Published: 2023-04-20 23:27:14

## Intro
When you go to Google Fonts to get a font for your website, you definitely saw two options. You can use either the link HTML element `<link>` or the CSS `@import`. When you decided you probably just sticked to the `<link>` element if you're a beginner in this area. In this article you'll get to know all the pros and cons of using `<link>` and @import so stay here and read on.

## <link>

The `<link>` element is a good way to get started when you have just one page that you need to have in the specific font you picked. I've used the `<link>` element a lot in my early days of using html, and it does work, but does require you to paste it in all individual html files for it to function.

## @import

Now to my favorite way of importing a font into a html document, this will not only save time, but also not take up as much space as the `<link>` element so if you don't like long html documents then you will definitely like this method more. This is especially useful when making a website with only a few CSS files which allows you to save much more time than with the `<link>` 

## Conclusion

You should still take into consideration that both these tags get the exactly same job done so if you're just making a small page it won't make any difference which element `@import` or `<link>` you use. But `@import` is the clear winner here because it is much more time consuming to use the `<link>` element
Web420 is here!
Tags: web420
Published: 2023-04-20 23:20:01

---
title: Web420 is here!
published: true
description: YESH
tags: Web420
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3fe67z9l37dkp3pr1ydk.png
# Use a ratio of 100:42 for best results.
# published_at: 2023-04-18 11:08 +0000
---

## Web420 is here!

Rejoice, Good people!

Heralded by the passing of the Green Comet, blessed by favorable planetary conjunction, and honed to perfection under the Pink Moon of Resurrection, Web420 has arrived to return the power of the One True Yinterweb to the people.

Cast down your false externets of fear and doubt and witness the future unfold!

<a target="_blank"  href="https://futurehood.github.io/DeCent/#welcome">https://futurehood.github.io/DeCent/#welcome</a>
Am i wasting my time
Tags: ai, beginners, programming, discuss
Published: 2023-04-20 22:36:36

I Am a 19-year-old with no degree in computer science nor engineering.
But i have been studying ai for 3 years now, and still to tgis day i am learning and building projects.
How hard is it going to be for me to land a job in ai field?
Be brutally honest  pls
Debugging Node.js with VSCode
Tags: node, vscode, debugging, webdev
Published: 2023-04-20 22:16:41

After publishing [Back-In-Stock Vendure plugin](https://github.com/calliT-today/vendure-plugin-back-in-stock), we got our [first issue](https://github.com/calliT-today/vendure-plugin-back-in-stock/issues/1) reported almost immediately and it happened to be related to [an issue](https://github.com/vendure-ecommerce/vendure/issues/2099) with Typescript 3.7+ `useDefineForClassFields` flag in `ts-config` breaking Vendure BaseEntity initialization when consuming the plugin.

In a test-app we install the plugin and launch JavaScript Debug Terminal with command palette in Vscode and run yarn dev to start the app with debugger automatically attaching to all the processes. Now set a breakpoint on [this line](https://github.com/calliT-today/vendure-plugin-back-in-stock/blob/main/src/service/back-in-stock.service.ts#L150) inside `node_modules/@callit-today/vendure-plugin-back-in-stock/dist/src/service/back-in-stock.service.js` and create a subscription at [http://localhost:3000/shop-api](http://localhost:3000/shop-api) and we get this in vsc


![Visual Studio Code window with attached debugger paused at the breakpoint](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zpzudtljslcaw7hvnr6p.png)


Now, that we verified this as the issue, to fix it we remove the `useDefineForClassFields` flag and set `strictPropertyInitialization` flag to `true` in `ts-config.json` and add definitive assignment assertions (!/?) to the properties in `back-in-stock.entity.ts`

```ts
import { DeepPartial } from '@vendure/common/lib/shared-types';
import { Channel, Customer, ProductVariant, VendureEntity } from '@vendure/core';
import { Column, Entity, ManyToOne } from 'typeorm';
import { BackInStockSubscriptionStatus } from '../types';

/**
 * @description
 * A back-in-stock notification is subscribed to by a {@link Customer}
 * or by a guest user with email address.
 */
@Entity()
export class BackInStock extends VendureEntity {
    constructor(input?: DeepPartial<BackInStock>) {
        super(input);
    }

    @Column('enum', { nullable: false, enum: BackInStockSubscriptionStatus })
    status!: BackInStockSubscriptionStatus;

    @ManyToOne(type => ProductVariant, { nullable: false })
    productVariant!: ProductVariant;

    @ManyToOne(type => Channel, { nullable: false })
    channel!: Channel;

    @ManyToOne(type => Customer, { nullable: true })
    customer?: Customer;

    @Column('varchar', { nullable: false })
    email!: string;
}
```

While fixing the issue took 2 minutes, triaging the root cause took 2 days. Finally, @michlbrmly set me on the right path over at [Vendure slack](https://vendure.io/slack) ❤️ 🙏


"Yeah I hate it when you lose hours of your life to wrestling with tooling. Truly one of the worst aspects of being a dev." - @michlbrmly