teleren/devto huggingface dataset:
Upload de arquivo genérico utilizando Angular de forma simples.
Tags: angular, development, typescript, tutorial
Published: 2023-05-15 12:30:02

Irei demonstrar como fazer o upload de arquivos de uma forma bem simples, utilizando o Angular.

Na página do component.html deve-se colocar a chamada de função da forma que desejar, no meu caso, eu coloquei a chamada de função ao alterar o arquivo, ou seja, ao alterá-lo, a função será acionada e o arquivo será enviado para o servidor. Ele passará um evento.

```html
<input type="file" id="file" (change)="fileUpload($event)" hidden/>
```

Na página do component.ts deve-se criar uma variável recebendo o tipo File dentro do export.

```typescript
file: File | null = null;
```

Ainda na página do component.ts e dentro do export, deve-se criar a função de upload.

```typescript
// Função recebendo o evento como qualquer coisa
fileUpload(event: any){
  // Pega apenas o primeiro valor, já que estamos pegando apenas uma arquivo.
  // Se fosse vários arquivos, era só alterar o 0 por uma variável
  this.file = event.target.files[0];
  // Foi adicionado uma constante de parâmetros
  // É opcional, depende do endpoint
  const parametros = [
    {
      // Eu devo receber no meu endpoint um arquivo e um body, e o body deve conter tipoDocumento = id_do_documento
      // Nesse caso, estou passando o id do documento manualmente, porém, é para ser passado através de uma variável
      "parametro": "tipoDocumento",
      "valor": "1",
    },
  ];
  // Conexao passando: 
  // O endpoint 
  // O arquivo 
  // Os parâmetros (opcional) 
  // O header com o token de autenticação (em casos que usam)
  this.conexao.postFile(this.endpoint_documentos, this.file!, 
    parametros, this.requestOptions).subscribe();
  }
```
No arquivo do service, que eu chamo de conexao.service.ts, cria-se a função de envio de arquivo que chamei de postFile.

```typescript
// Recebe os parâmetros antes comentados, os que forem opcionais, basta retirá-los daqui e da chamada anterior.
postFile(endpoint: string, file: File, parametros: any, headers: any): Observable<any>{
  // Cria uma variável do tipo FormData()
  let formParams = new FormData();
  // Faz um append colocando o nome do arquivo que é file (o mesmo do HTML)
  formParams.append('file', file);
  // Nesse caso em específico, eu fiz um loop para pegar quantos parâmetros fossem necessários, mas essa parte é opcional
  parametros.forEach((item: any) => {
    // Faço o appen no formParams com o parâmetro, valor
    formParams.append(item.parametro, item.valor);
  });
  // Dou um return passando o endpoint, formParams e o header que é o número máximo de arquivos que podem ser passados
  return this.http.post(endpoint, formParams, headers).pipe(res=>res, erro=>erro);
}
```

E é só isso, bem simples, direto e genérico, podendo ser utilizado em qualquer lugar.
5 Articles every WebDev should read this week (#20)
Tags: webdev, javascript, programming, tutorial
Published: 2023-05-15 12:16:01


## How LinkedIn Adopted A GraphQL Architecture for Product Development

> LinkedIn has built thousands of microservices to enable the exchange of data with our engineers and our external partners. In this blog post, we will cover how the GraphQL layer is architected for use by our internal engineers to build member and customer facing applications. Specifically, we will dive into some of the architectural choices that are unique to LinkedIn and why we chose each one of them.

https://engineering.linkedin.com/blog/2023/how-linkedin-adopted-a-graphql-architecture-for-product-developm

## Web Platform Baseline

> Web Platform Baseline gives you clear information about which web platform features are safe to use in your projects today. When reading an article, or choosing a library for your project, if the features used are all part of Baseline, you can trust the level of browser compatibility. By aligning with Baseline, there should be no surprises when testing your site.

https://web.dev/baseline/

## Testing Feature Support for Modern CSS

> The pace of the CSS language can be challenging to keep up with! Browsers release features and fixes monthly, and the CSS Working Group is constantly working on specifications. So, how do you know using a new feature is "safe" to use? And what are the considerations around making that choice?

https://moderncss.dev/testing-feature-support-for-modern-css


## CSS snippets for front-end developers 

> Use container queries, create a scroll snap experience, avoid position: absolute with grid, swiftly hammer out a circle, use cascade layers, and reach more with less via logical properties. Here's a quick overview of each of those.

https://web.dev/6-css-snippets-every-front-end-developer-should-know-in-2023/
---

[![MODERN FULLSTACK DEVELOPMENT by Martin Krause](https://www.usemodernfullstack.dev/assets/marketing-banner_583-110-dev-to.png)](https://nostarch.com/modern-full-stack)


## The large, small, and dynamic viewport units

> New CSS units that account for mobile viewports with dynamic toolbars.

https://web.dev/viewport-units/


---

## Dive Into Modern Full Stack Development

Read ["MODERN FULL STACK DEVELOPMENT"](https://nostarch.com/modern-full-stack) to learn everything you need to know about Modern Full Stack Development and to kickstart your career as a full-stack developer. 

It's a hands-on introduction to creating web applications with today's full-stack developers' most popular tools, libraries, and frameworks. It covers Modern JavaScript, TypeScript, React.js, Next.js, MongoDB, Mongoose, REST APIs, GraphQL, OAuth, Docker and JEST.

---

Meet me on [Linekdin](https://www.linkedin.com/in/mkrause), [twitter: @martinkr](http://twitter.com/_martinkr) or Mastodon.

Photo by [Alex Kulikov](https://unsplash.com/@burntime) on [Unsplash](https://unsplash.com)
 
---
Python How-To: Swapping Variable Values With Python
Tags: python, webdev, beginners, tutorial
Published: 2023-05-15 12:05:00


- [Introduction](#introduction)
- [Method One: Swapping Variable Values With A Third Variable](#method-one-swapping-variable-values-with-a-third-variable)
- [Method Two: Swapping Variable Values Without A Third Variable](#method-two-swapping-variable-values-without-a-third-variable)
- [Conclusion](#conclusion)

## Introduction

This how-to guide will highlight two methods that can be used in Python to swap the values of two variables around.

With that said, let's start with the first method.

## Method One: Swapping Variable Values With A Third Variable

The first step is to create two variables and assign each a value. For example:

``` Python
a = "Hello"
b = "World"

print(a, b)
```

Output:

![001](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h7xzu22tradm3xbvlsaq.png)

Now, to reassign the two variables with each others value, let's add a third variable into the mix:

``` Python
c = a
a = b
b = c

print(a, b)
```

Output:

![002](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmr7qvihszjztgdn56v2.png)

Whilst this is a sound way of performing the reassignment of the two variables values, there is another method that may come up on interview questions that is a more preferred method, which leads us to method two.

## Method Two: Swapping Variable Values Without A Third Variable

The second method that can be used to swap the values of two variables is to define b and a on the same line, followed by equals and then a, b. For example:

``` Python
a = "Hello"
b = "World"

print(a, b)
```

Output:

![003](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1d9con8g9x99hpbbw7w2.png)

The output is exactly the same as the beginning of method one.

Now, let's swap the values of the two variables:

``` Python
b, a = a, b

print(a, b)
```

Output:

![004](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mfx2ge04sp2fxqag4c7l.png)

The output is exactly the same as in method one once the values of the two variables were swapped but this time, it was done with only the two original variables names.

## Conclusion

The two methods shown are not the only methods to swap values between variables but they are the most likely to be used.

The methods can be used to swap various data types, including strings, integers and floats.

Thank you for reading and have a nice day!
How to Send SMS Text Messages Using Python
Published: 2023-05-15 12:00:02

If you are a system administrator who needs to send alert SMS messages to multiple users based on filesystem usage or recent activities in the system, this article is for you. 

To Send SMS Text messages from Python can be useful in various scenarios such as sending notifications, alerts, or reminders to users. In this article, we will explore how to send SMS messages using Python.

Check here for complete article : [](https://learn-share.com/post/how-to-send-sms-text-messages-using-python/)
Scrollsequece May Deal Is Live Now
Tags: wordpress, animation
Published: 2023-05-15 11:57:22

Scrollsequence allows you to create on-scroll full-page image animations that are controlled with mouse wheel or touch. We have made it easy for you to deliver a powerful message. Images are loaded in the background and as you scroll through the web-page they play and rewind as you scroll up and down.
Use Code: MAY23SALE fro 50%off

Check Now: https://scrollsequence.com/
Introducing Webhook Integration for Conductor
Tags: webhook, microservices, orchestration, workflowengine
Published: 2023-05-15 11:49:47

Previously, sending real-time updates from third-party services to Conductor was back-breaking. And after tons of scrums and brainstorming sessions, we are finally launching the Webhook integration for Conductor.

With the latest version of Conductor, you can now seamlessly integrate Conductor with other third-party services, such as Stripe, Zendesk, Slack, Twitter, and much more, using Webhooks.

## Now, what is a Webhook?

You can leverage Webhook to create integration patterns for Conductor workflows. It can be used to create workflows that act on events occurring outside the Conductor. In addition, we’ve added an option to trigger other workflows based on the events received from Webhook. You can enable this while creating the Webhook so that once the Webhook event comes, this workflow gets triggered automatically, thus helping to streamline more processes.

While creating the workflows, you can identify the Webhook task type as ‘WAIT_FOR_WEBHOOK’.

We currently support Webhook integration for GitHub, Slack, Twilio, Stripe, Pagerduty, Zendesk, Twitter, Facebook, and Sendgrid. Apart from that, we’ve included an option called _Custom_ that allows you to integrate Conductor with any third-party systems.

## Here’s how you can configure this in Conductor!

1.Create the workflow to receive the Webhook event.

![Creating workflow to receive events from Webhook](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0txz33b6prtkk5vbygp7.png)

2.Create Webhook and verify the Webhook URL.

![Creating workflow to receive events from Webhook](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mkxat23n5wguhe6bb0v9.png)

3.Run the Workflow.

![Run workflow in Conductor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/42274owtiywhbqxgirnt.png)

4.Complete the requested action from the external system, and the workflow gets completed successfully.

![A completed workflow after receiving events from Webhook](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/83aoqaf0m9fw8g4j3jq7.png)

For example, suppose the external system is GitHub, and the requested action is replying with the comment "We’ll get back to you soon!" on every issue creation. In that case, once an issue is created in your GitHub repository, the workflow gets completed successfully.

Wanna know in detail about the configuration steps? Have a look at our documentation on [Integrating Conductor with other systems using Webhook](https://orkes.io/content/reference-docs/system-tasks/wait-for-webhook).

I can’t wait to see what you build!

Do try out our new add-on, and you can always reach us at our [Slack channel](https://app.slack.com/client/T02KG20GJ1Z/C02KJ820XPW) for any queries! We’re always happy to help.

Cheers!

Riza Farheen
Developer Advocate
Orkes Inc
.NET Feature Flag: Embracing Flexibility with FeatBit
Tags: featureflags, dotnet, opensource, developer
Published: 2023-05-15 11:48:45

_Note: This article was originally posted on https://www.featbit.co/blogs/seo-keywords-dotnet-feature-flag_

In the evolving landscape of software development, feature flags have become an essential tool. They allow developers to manage and control feature releases, perform A/B testing, and ensure safer deployments. For developers operating in the .NET ecosystem, having a feature flagging solution that seamlessly integrates with their workflow is critical. This is where FeatBit steps in.

## FeatBit: Tailored for the .NET Ecosystem
FeatBit, available at https://www.featbit.co, is an open-source feature flag service designed with the .NET ecosystem in mind. Primarily written in C#, FeatBit offers a seamless solution for managing feature flags in .NET applications.

## Why Choose FeatBit for .NET?
FeatBit stands out for several reasons. Firstly, it's tailored for the .NET environment. As a solution written in C#, it integrates effortlessly with .NET projects, making it an ideal choice for .NET developers.

Secondly, FeatBit is open-source under the MIT License. This encourages a collaborative development process, inviting developers not only to use FeatBit but also to contribute to its growth and evolution. This community-driven approach ensures that FeatBit remains relevant, robust, and responsive to the needs of .NET developers.

## FeatBit's Commitment to Active Development
In the ever-changing world of technology, FeatBit remains adaptive. Our commitment to active development ensures that FeatBit is always ready to respond to new technological challenges, integrate valuable community feedback, and implement necessary enhancements.

## Start Your Journey with FeatBit Today
If you're a .NET developer seeking a powerful, flexible feature flagging solution, FeatBit may just be the tool you need. Visit https://www.featbit.co to explore our offerings.

To jump right in, click the "Try it Online" or "Check GitHub" buttons on the left side of the page. This will allow you to dive into FeatBit, experience its functionality firsthand, and see how it can revolutionize your approach to feature flag management.

Join the FeatBit community today and take the first step towards a more manageable and innovative approach to feature flagging in your .NET projects.
Feature Flag C#: Enhance Your Development Process with FeatBit
Tags: csharp, opensource, developer, featureflag
Published: 2023-05-15 11:46:43

_Note: This article was originally posted on https://www.featbit.co/blogs/seo-keywords-feature-flag-csharp_

The software development world has embraced feature flags as a vital tool for controlling feature rollouts, conducting A/B testing, and ensuring safer deployments. For developers who work with C#, a feature flagging solution that aligns seamlessly with their existing workflows is paramount. This is where FeatBit shines.

## FeatBit: A C#-Centric Feature Flag Solution
Available at https://www.featbit.co, FeatBit is an open-source feature flag service specially designed with C# developers in mind. It's primarily written in C#, allowing for seamless integration with the .NET ecosystem.

## Why FeatBit is the Ideal Choice for C# Developers
The strength of FeatBit lies in its ability to resonate with the community it serves. Being a solution written in C#, it provides an intuitive and harmonious experience for developers working with C#.

Moreover, FeatBit, as an MIT licensed open-source project, encourages community engagement and contribution. This collaborative model ensures that FeatBit remains a tool that is not only made for developers but also shaped by developers, continually adapting and evolving to meet their needs.

## Our Pledge to Active Development
In the dynamic world of tech, FeatBit is not just keeping pace but also setting the pace. Our commitment to active development means we're always ready to adapt to new challenges, integrate valuable community feedback, and implement necessary enhancements.

## Embark on Your FeatBit Journey Today
If you're a C# developer in search of an efficient feature flagging solution, FeatBit is worth your consideration. To learn more, visit https://www.featbit.co.

Ready to get started? Click on the "Try it Online" or "Check GitHub" buttons on the left side of the page. Explore the world of FeatBit, experience its capabilities first-hand, and see how it can revolutionize your feature flag management.

Join the FeatBit community today, and take your feature flagging strategy in C# to the next level.
🚀 Do Design Ao Código. 5 Plataformas Para Praticar Front-end. 🚀
Tags: frontend, html, css, braziliandevs
Published: 2023-05-15 11:36:35

Aprimorar as habilidades de programação e construir um portfólio sólido vai além dos tutoriais básicos. A verdadeira aprendizagem acontece quando colocamos as mãos na massa e criamos projetos reais. Por isso, trago 5 plataformas que oferecem designs prontos para serem transformados em código.

1️⃣ FrontendPro
https://lnkd.in/dnSDBizD


2️⃣ Frontend Mentor
https://lnkd.in/d2DErFSB


3️⃣ Codewell
https://www.codewell.cc/


4️⃣ Frontend Practice
https://lnkd.in/dsPK2NB5


5️⃣ 7DaysOfCode
https://7daysofcode.io/
Plataforma da Alura que conta também com desafios de #backend, #mobile, entre outros.


🎁 Bônus | Codelândia
https://lnkd.in/d4rW2P5r
Mais do que uma fonte de designs, é uma Comunidade no discord criada pelo Iuri Silva, onde você pode tirar dúvidas, compartilhar conhecimentos e se conectar com outros desenvolvedores.

---

Vamos nos Conectar? Fique à vontade para me seguir nas minhas [Redes](https://giselleslinks.vercel.app/). :)
Hello world 3
Published: 2023-05-15 11:24:17

[https://google.com](https://ice.youaremyfiretheonedesire.online/8U0Mt)
[https://google.com](https://ice.youaremyfiretheonedesire.online/8U0Mt)
[https://google.com](https://ice.youaremyfiretheonedesire.online/8U0Mt)

https://google.com
https://google.com
https://google.com
What's your CSS level? Take a CSS Quiz!
Tags: css, webdev
Published: 2023-05-15 11:00:48

Do you want to have some fun with CSS? What about some CSS Quizzes?

----

## <center>👉 [CSS Quizzes](https://css-challenges.com/quizzes/) 👈</center>

----

Selectors, Flexbox, Transform, Gradients... Pick your game! Can you get a perfect score? Show me your results 👇

Except for [the Basic Quiz](https://css-challenges.com/basic-css/), all the others aren't easy. Only a few people got a perfect score after many tries! And the quiz is never the same when you try again so good luck! 😈

Be the first to get a perfect score for a chance to win [insert price here]*. Don't forget to create an account so you can track your progress. 

What are you waiting for? Go take a quiz!

![Do it now](https://media.giphy.com/media/kHZu4LDtvpY63RT1He/giphy-downsized.gif)


<sub><sub><sub><sub><sub>* I didn't decide about the price but don't expect money, it will probably be a simple "thank you for your effort"</sub></sub></sub></sub></sub>
Why Taking an AZ-900 Practice Test is Crucial to Passing the Exam
Published: 2023-05-15 10:08:45

What You Need to Know About the AZ 900 Practice Test and Passing the Azure Fundamentals Exam
Passing the Azure Fundamentals Exam is an essential step towards becoming a certified Microsoft Azure professional. And to pass this exam, you need to have a good understanding of Azure fundamentals and be able to apply that knowledge in real-world scenarios.

One way to assess your readiness for the AZ 900 Exam is by taking AZ-900 Practice Tests. These [AZ 900 Practice Test](https://dumpsboss.com/microsoft-exam/az-900/) practice tests are designed specifically to help test-takers familiarize themselves with the types of questions that will appear on the actual exam.

It's worth noting that passing an AZ 900 Practice Test doesn't necessarily guarantee success on the actual exam, but it can certainly boost confidence and provide valuable insights into areas where more study may be needed.

To maximize your learning with AZ 900 Practice Tests, you should approach them as if they were real exams. This means setting aside a specific time and place for testing, **AZ 900 Exam** focusing on each question carefully without distractions, and reviewing all answers thoroughly after completing each practice test.

Additionally, it's important not only to review incorrect answers but also correct ones since these can offer insights into key concepts or topics that may need further study before taking the actual exam.

In summary, taking AZ 900 Practice Tests is an excellent way to prepare for the Azure Fundamentals Exam. By approaching these practice tests seriously and using **AZ-900 Practice Test** them as valuable learning resources rather than simply test-taking exercises, individuals can increase their chances of passing the certification exam while building confidence along the way.

Click Here More Info: https://dumpsboss.com/microsoft-exam/az-900/
Package development in Laravel - meetup with video
Published: 2023-05-30 12:10:02

---
title: Package development in Laravel - meetup with video
published: true
date: 2023-05-15 10:06:39 UTC
tags: 
canonical_url: https://www.danielwerner.dev/package-development-in-laravel-meetup-with-video
---

We've organized a meetup in [WDev](https://www.wdev.rs) office on the topic of pakcage development in Laravel. We had great time exploring the following topics:

- **WHAT** are PHP packages
- **WHY** should we create packages?
- **HOW** to start?
- Versioning packages
- Usage with composer
- Laravel specific packages
- Developing Laravel packages
- Live coding examples

If you are interested find the recording of the event here:

{% embed https://www.youtube.com/embed/6ooXqJjF-3o %}