teleren/devto huggingface dataset:
Here’s some internet laws you should be aware of
Published: 2023-03-27 17:07:31

Hey there! So, technology has revolutionized our lives and given us the freedom to do whatever we want, whenever we want. But let’s face it, with great power comes great responsibility, and the internet has given us more than just cat videos and online shopping. We’ve got cybercrime, mental health issues, and addiction to worry about, but luckily, our lawmakers are trying to sort it all out. Here are some of the latest changes you should know about:

Adult ID Certification

Now, if you want to access some adult content in Louisiana, you better bring your ID. Yep, it’s not just for voting or buying beer anymore. This new law aims to protect minors from the harmful effects of this material, like low self-esteem and body image disorders. It’s like they say, better safe than sorry. And apparently, 11 other states in the US are thinking about doing the same thing. So, keep that ID handy, folks.

Caller ID

We’ve all been there, right? You see a call from a familiar number, but it turns out to be some robocaller trying to scam you out of your hard-earned money. Well, the FTC has had enough and created the STIR/SHAKEN caller ID authentication framework. It’s like a superhero duo fighting off the evil robocallers. And it’s working! All telecommunication providers must use caller ID authentication to stop those pesky illegal robocalls.

Cybersecurity Management

Cybercrime is on the rise, and we need to fight back. That’s why the SEC created the “Cybersecurity Risk Management, Strategy, Governance, and Incident Disclosure.” Sounds fancy, right? Basically, they want public companies to report any cyber-attacks and provide updates on how they’re dealing with them. It’s like when you have to report to your boss about a mistake you made, except this is way more serious. So, let’s keep those passwords safe, people.

Influencer Marketing

Gone are the days of celebrities endorsing products, now it’s all about those online influencers. They’re just like us, but with a bigger following. But sometimes, they forget to tell us when they’re being paid to promote something. That’s where the Australian Competition and Consumer Commission (ACCC) comes in. They’re cracking down on influencers who forget to mention they’re being sponsored. It’s like when your mom catches you eating cookies before dinner and scolds you for not telling her. Be honest, influencers!

Data Sharing

You know that feeling when you realize Facebook knows more about you than you do? Yeah, that’s not cool. But the European Union has our back with the Digital Services Act. This act puts more regulations on tech companies and restricts how they can sell our personal data. It’s like when your nosy neighbor finally gets a life and stops asking about your business. Thanks, EU! created by @Cornatul on 2023-03-27 17:07:05 https://lzomedia.com #developers #opensource #laravel #php #social #medium #twitter #github created by [Software Developer](https://lzomedia.com)
Tips to Improve Your Web Development Skills
Published: 2023-03-27 16:46:18

Hey everyone! 👋 Today I wanted to share some thoughts on web development and how to keep improving as a developer. As someone who's worked with technologies like React, Express.js, and Tailwind CSS, I know firsthand how important it is to stay up-to-date and keep learning. Whether you're just starting out or you've been in the field for a while, I hope these tips can help you take your skills to the next level. Let's dive in! 🚀"

**Title: 5 Tips to Improve Your Web Development Skills**


1. Build Projects: The best way to improve your coding skills is by building projects. Start with small projects and work your way up to larger ones. This will help you gain experience and confidence in your coding abilities.
2. Learn New Technologies: Technology is constantly evolving, and it's important to stay up-to-date with the latest tools and frameworks. Take the time to learn new technologies and incorporate them into your projects.
3. Collaborate with Others: Working with other developers is a great way to learn new techniques and get feedback on your code. Join online communities and attend developer meetups to meet like-minded individuals and collaborate on projects.
4. Practice Good Coding Habits: Good coding habits, such as writing clean and readable code, are essential to becoming a great developer. Take the time to practice these habits, and your code will be more maintainable and easier to understand.
5.Read Code: Reading other people's code can be a great way to learn new techniques and gain insight into different coding styles. Take some time to read open-source projects and study their code. This will help you improve your own coding skills and become a better developer.

By following these tips, you'll be on your way to becoming a better web developer. Remember, web development is a constantly evolving field, and it's important to stay curious, keep learning, and have fun with your projects.


Thanks for reading! If you're interested in learning more about web development, feel free to follow me on LinkedIn or check out my GitHub profile for more code examples and projects. Let's connect and continue learning together!

Github Link: https://lnkd.in/dPRnV5J7
Linkedin: https://www.linkedin.com/in/andoh-francis-133aa7245/

#webdevelopment #technology
Bugun izohlar haqida gaplashamiz<
Tags: javascript, codenewbie, beginners, programming
Published: 2023-03-27 16:23:04

Assalomu aleykum xurmatli dasturchi .Bugun sizlar bilan `izohlar` xaqida gaplashamiz. `Izoh ` bu nima ? tog'ri bular 
` commentariyalar.
`
xardoim yodingizda qolsin `izohlar` ikki turga bolinishadi  1.ochiq izohlar, 2. yopiq izohlar.
`Ochiq izohlar` bu foydalanuvchiga ko'rinib turadgon izohlar sirasiga kiradi 
**misol**

```
Hohlagan tizimga kirsangiz login parol tog'ri yoki notog'riligini korsatishi bu ochiq izoh
```
Yopiq izohlar-  bu dasturchilar o'rtasida qayta tushintirish uchun hojat qolmasligi uchun qismiga sharx sifatida qoldiriladigon izohlar hisoblanadi! 

python dasturlash tillida izih yaratish uchun # shu belgidan foydalanamiz va undan keyin izoh yozasiz . Shunda kompyuter kodlarni oqiyotganda izohlarga etibor bermasdan o'tib ketadi .

Shunday qilib bugungi izohlar haqida bolgan maqolamizga commenttarialarda o'z izohlaringizni qoldiring.

E'tibor uchun raxmat!
Looking for New Opportunities
Published: 2023-03-27 16:09:33

Hello Dev Community!,
I'm looking for new opportunities as a Frontend Developer or Full Stack Developer in Bangalore or Remote if foreign company ! 🎯
Over the past 6 months, I've had the incredible experience of working remotely with an international early stage startup company, which has taught me the importance of flexibility and adaptability. I'm comfortable with different time zones and have effectively used communication channels like Slack, Trello, Google/Zoom Meet to collaborate with my team.
My skill set includes:
🔹 ReactJS and NextJS for building scalable and performant applications
🔹 Material-UI/TailwindCSS for creating stunning and responsive user interfaces
🔹 Docker for containerization and streamlining development workflows
🔹 Proficiency in version control systems like Git and GitHub for efficient code management and collaboration
If you know of any opportunities that align with my experience and goals, I would be grateful for any introductions or referrals. Please feel free to connect with me here on LinkedIn or send me a message at coefeewithav@gmail.com. I'm excited to explore new challenges and contribute to a company's success.
Thank you all for your support, and let's keep growing together! 🌱
Framer AI button animation
Tags: webdev, react, showdev, css
Published: 2023-03-27 16:06:30

This week I've seen a few people trying to replicate [this](https://twitter.com/edoardomercati/status/1638136335880921090) button hover animation created by [Edoardo Mercati](https://dribbble.com/edoardomercati).

I challenged myself to create the animation but using framer motion, a popular animation library for React. In addition, I added a few props to be able to change the color and the text of the button. This way, I can customize the animation to suit different themes and purposes.

I learned a lot from this challenge and I’m pretty happy with the final [result.](https://dribbble.com/shots/21022811--Framer-AI-Button)

You can find the code for this project on GitHub, feel free to contribute: 
[https://github.com/eduardconstantin/react-motion-components](https://github.com/eduardconstantin/react-motion-components)

And I also set up a website on Vercel:
[https://react-motion-components.vercel.app](https://react-motion-components.vercel.app)
Condicionales sin else en JavaScript
Tags: javascript, beginners, webdev, spanish
Published: 2023-03-27 16:00:00

Al utilizar JavaScript es muy común que en algun momento se necesite utilizar el [operador ternario](https://asjordi.dev/blog/aprende-a-utilizar-el-operador-ternario-en-javascript), que no es más que una forma de escribir un condicional if-else en una sola línea.

Por ejemplo:

```js
let variable = true;
let resultado = "";

if (variable) {
  resultado = "La variable es verdadera";
} else {
  resultado = "La variable es falsa";
}

// operador ternario
resultado = variable ? "La variable es verdadera" : "La variable es falsa";
```

## if sin else

Hasta aquí todo bien, pero ¿Que pasa si solo se necesita evaluar una condición y no se necesita hacer nada si no se cumple? Veamos un ejemplo:

```js
if (variable) {
  alert("Verdadero");
}
```

En este caso, si la variable es verdadera, se mostrará un alert con el texto "Verdadero", sin considerar el caso en el que la variable sea falsa. Podemos escribirlo utilizando el operador ternario de la siguiente forma:

```js
variable ? alert("Verdadero") : null;
```

En este ejemplo no se necesita especificar `null`, por lo que se puede sustituir al utilizar el operador `&&`:

```js
variable && alert("Verdadero");
```

De esta manera el código queda más limpio y solo se ejecutará el alert si la variable es verdadera.

## Valor null por defecto

En algunos casos es posible que se tenga una función que devuelve un valor cualquiera, pero se desea devolver un valor predeterminado si no se recibe ningún valor. Por ejemplo:

```js
let nombre = null;

const usuario = {
	nombreUsuario: nombre ? nombre : "Invitado",
};

console.log(usuario);
// {nombreUsuario: "Invitado"}
```

En este ejemplo la variable `nombre` se inicializa con el valor `null`, después se define un objeto `usuario` que tiene la propiedad `nombreUsuario` que a su vez se inicializa con el valor de la variable `nombre` o con el valor "Invitado" si la variable es `null`. En este caso, el valor de la propiedad `nombreUsuario` será "Invitado".

Todo funciona bien, pero se puede simplificar utilizando el operador `??` para establecer un valor predeterminado:

```js
const usuario = {
  nombreUsuario: nombre ?? "Invitado",
};

console.log(usuario);
// {nombreUsuario: "Invitado"}
```

De esta manera se devuelve el valor de la variable `nombre` si no es `null` o `undefined`, en caso contrario se devuelve el valor "Invitado".

En conclusión, la sintaxis abreviada `if` en JavaScript es una herramienta valiosa que podemos utilizar para escribir código más limpio y legible utilizando el condicional `if` sin `else` o el operador ternario.
Focus next input in React
Tags: react, abotwrotethis
Published: 2023-03-27 15:47:55

If you're building a form in React, you'll likely want to implement a way for users to quickly navigate between fields using the "tab" key. This can be achieved using the `tabIndex` and `ref` properties in React.

Here's how to implement keyboard navigation between form fields in React.

## Setting up Refs

In order to focus the next input, we'll need to first create a "ref" for each input. This can be done using the `useRef` hook, like so:

```javascript
import { useRef } from 'react';

function MyForm() {
  const nameRef = useRef(null);
  const emailRef = useRef(null);
  
  // rest of your component code here
}
```

We're creating two refs here, one for the name input and one for the email input. We can then use these refs to focus the next input when the user presses the "tab" key.

## Handling the Tab Key

Next, we'll need to handle the "tab" key press in our form. We can do this by adding an `onKeyDown` event listener to each input, like so:

```javascript
function MyForm() {
  const nameRef = useRef(null);
  const emailRef = useRef(null);
  
  function handleKeyDown(event, ref) {
    if (event.key === 'Tab') {
      event.preventDefault();
      ref.current.focus();
    }
  }

  return (
    <form>
      <label>
        Name:
        <input ref={nameRef} onKeyDown={event => handleKeyDown(event, emailRef)} />
      </label>
      <label>
        Email:
        <input ref={emailRef} onKeyDown={event => handleKeyDown(event, nameRef)} />
      </label>
    </form>
  );
}
```

Here, we're adding the `onKeyDown` event listener to each input. When the user presses the "tab" key, we call the `preventDefault` method to prevent the browser from focusing the next element automatically. We then call the `focus` method on the ref of the next input.

Note that we're passing the ref of the next input as an argument to the `handleKeyDown` function. This allows us to specify which input to focus next when the user presses the "tab" key.

## Wrapping Up

And that's it! With these few lines of code, we've implemented keyboard navigation between form fields in React.

To recap:

1. Create a ref for each input using the `useRef` hook
2. Add an `onKeyDown` event listener to each input
3. Handle the "tab" key press in the event listener by calling `preventDefault` and `focus` on the ref of the next input

With these steps, you'll have a form that allows for quick and easy navigation using the keyboard.

Happy coding!
Need guidance for creating an OTT platform.
Tags: node, express, architecture, webdev
Published: 2023-03-27 15:41:57

Hi devs, I am creating an OTT platform for a client. Its almost a netflix like application with a limited geographical content. The publishers will upload their movies, shows, podcasts video etc to the system & after processing the video files they will be streamed in different formats (like 1080, 720, 480 etc) to the users (There will be a subscription system too).

My development stack is - Nodejs, Express, MongoDB, Nuxtjs.

Now my questions are little bit a system design kind of thing!

1. Should I go for a service like JWPlayer for streaming or I handle my own streaming.

2. If I use my own streaming (without any 3rd party service), is Hls is the best option?

3. Which player should I use. (I have found some free to use - Plyr.js, video.js)

4. Should I convert the uploaded video files in the server using ffmpeg or use any other service like AWS Media convert (I am going to use s3 for storage)?

Any suggestions are highly appreciated. Thank you.
How to speed up Docker on MacOS
Published: 2023-03-27 15:33:53

**Problem**:  Containerization is a feature of the Linux kernel (namespaces + cgroups + chroot) and so MacOS and Windows must run a virtualized Linux environment to use Docker, which has a significant performance penalty.

**Solution**: To help mitigate this issue, Docker (the company) has some recommended configuration tweaks for optimizing performance on MacOS:

Step 1. In Docker Desktop Settings > General > Choose file sharing implementation for your containers.  Select VirtioFS and restart Docker Desktop.

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

Step 2. If you’re using any bind mounts, add the `delegated` option when you specify the mount source and destination in the `docker-compose.yml` file, for example:

```
  my-service:
    image: my-image
    container_name: my-container
    volumes:
      - ./my-app:/app:delegated  # this is the relevant setting
```

References:
https://www.docker.com/blog/speed-boost-achievement-unlocked-on-docker-desktop-4-6-for-mac/
https://docs.docker.com.xy2401.com/compose/compose-file/#caching-options-for-volume-mounts-docker-for-mac
Vue JS Essentials: A Beginners Vue JS Series on Using Pinia, Vitest, and Supabase #1 Getting Started
Tags: pinia, vue, vitest, beginners
Published: 2023-03-27 15:26:15

In this video series, we'll show you how to build a multistep wizard with form validation and database persistence using Vue JS and related technologies. We'll start with the basics of Vue JS and add Pinia for state management, Vue-use-form for form validation, and Vitest for testing. 

This series will be spread out across multiple videos, but this first video will provide an overview and demo of the solution we're building, as well as cover the setup and configuration of the environment.

We'll then walk you through building three basic screens for the application, integrating Pinia for state management, and writing a simple test for the application component, as well as a simple test for Pinia. As we continue through the application, we'll create more functionality and write more robust tests.

## What Libraries We Are Using In Series
Vuejs - The Progressive JavaScript Framework. An approachable, performant, and versatile framework for building web user interfaces.
https://vuejs.org/

Pinia -The intuitive store for Vue.js. Type Safe, Extensible, and Modular by design. Forget you are even using a store.
https://pinia.vuejs.org/

Vitest - Blazing Fast Unit Test Framework. A Vite-native unit test framework. It's fast!
https://vitest.dev/

vue-use-form - A composition api form validator for vue
https://vue-use-form.netlify.app/

## What Is Cover In First Video Of Series
- Learn how to build a multistep wizard with form validation and database persistence using Vue JS and related technologies.
- Discover how to use Pinia for state management, Vue-use-form for form validation, and Vitest for testing.
- Follow along with a step-by-step tutorial that walks you through building three basic screens for the application.
- Get hands-on experience with integrating Pinia for state management and writing tests for the application component and Pinia.
- Gain a solid foundation in Vue JS, Pinia, Vue-use-form, and Vitest that you can use to build more complex applications in the future.

By the end of this video series, you'll have a solid foundation for building a multistep wizard with form validation and database persistence in Vue JS, Pinia, Vue-use-form, and Vitest.

{% youtube uiwiNqzsIVE %}
What is a Go Routine?
Tags: go
Published: 2023-03-27 15:24:00

When we develop in Go, even more when we need to do a lot of treatments in a short time, do multithreading can be really useful. And it's in this context that we will talk about Go Routines.

## Definition

> A Go Routine is a method which can be executed in a thread in parallel of the main thread.

## How to use it
### 1. Declare a function which could be used by a Go Routine
```go
func toto(from string) {
    for i := 0; i < 3; i++ {
        fmt.Println(from, ":", i)
    }
}
```

As you can see, you haven't something particular to add to a function declaration to make it usable by a Go Routine.

### 2. Call the function as a Go Routine
To call a function as a Go Routine, you just need to add `go` before the function call.

```go
// Call the function as a Go Routine
go toto("goroutine")

// Direct function call
toto("direct")
```

### 3. Result
With the previous example, we can see that the Go Routine is called before the direct call. Let's see what the output is.
```
direct : 0
direct : 1
direct : 2
goroutine : 0
goroutine : 1
goroutine : 2
```

We can see that "direct" call has been done before "goroutine". It shows us that the go routine was done in parallel, and a bit later than the direct call. 

### 4. Anonymous functions
With Go Routines, we can create **anonymous functions**. This kind of function doesn't have a name and can't be called outside of the place where it was declared.
```go
go func(msg string) {
        fmt.Println(msg)
    }("test")
```

In this example, we can see a function which prints the message given in parameter, and the direct call of this function with "test" as parameter value.

---

## Conclusion
To conclude this  post, we can see that Go Routines are an easy way to do multithreading in Go. In a following post, we will see another Go feature which generally use Go Routines and which gives a powerful tool without external libraries, tools or plugins!

I hope it will help you! 🍺

---

<center><h3>You want to support me?</h3></center>
<a href="https://www.buymeacoffee.com/mxguilbert7" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Qu'est-ce qu'une Go Routine?
Tags: go
Published: 2023-03-27 15:23:00

Quand on fait du développement en Go, surtout quand on a le besoin de faire des traitements rapides, on peut avoir besoin de paralléliser certains bouts de traitements. Et c'est là que les Go Routines sont utiles.

## Définition

> Une Go Routine est une méthode qui est exécutée sur un thread en parallèle du thread principal.

## Comment l'utiliser ?
### 1. Déclarer la fonction qui pourra être utilisée par une Go Routine
```go
func toto(from string) {
    for i := 0; i < 3; i++ {
        fmt.Println(from, ":", i)
    }
}
```

Comme vous pouvez le constater, il ne s'agit que d'une déclaration de méthode "classique" sans rien de particulier.

### 2. Appeler la fonction en tant que Go Routine
Pour appeler la fonction en tant que **Go Routine**, il vous suffit de rajouter `go` avant la déclaration de l'appel à la méthode.

```go
// Appel de la fonction au travers d'une go routine
go toto("goroutine")

// Appel direct de la fonction toto
toto("direct")
```

### 3. Résultat
Dans l'exemple précédent, on voit que la Go Routine est appelée avant l'appel direct. Voyons ce que ça donne.
```
direct : 0
direct : 1
direct : 2
goroutine : 0
goroutine : 1
goroutine : 2
```

On peut voir que "direct" a été appelé avant "goroutine", démontrant le fait que le traitement dans la Go Routine a été fait en parallèle. En effet, l'appel à "direct" n'a pas attendu que "goroutine" soit terminé pour s'exécuter.

### 4. Fonctions anonymes
Avec les Go Routines, on peut créer des **fonctions anonymes**. Fonction qui n'ont pas de nom et qui ne peuvent être utilisées en dehors de l'endroit où elles ont été déclarées.
```go
go func(msg string) {
        fmt.Println(msg)
    }("test")
```

L'exemple ci-dessus déclare une fonction qui attend un message à afficher, et le paramètre utilisé pour appeler cette fonction est "test".

---

## Conclusion
En conclusion, on peut voir que les Go Routines sont un moyen simple d'effectuer des traîtements en parallèle avec Go. Dans un prochain article, on verra avec quoi on peut les utiliser pour avoir quelque chose de très puissant sans outils externes!

J'espère que ça vous aidera! 🍺

---

<center><h3>Vous voulez me supporter?</h3></center>
<a href="https://www.buymeacoffee.com/mxguilbert7" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>