teleren/devto huggingface dataset:
Handling Events
Tags: typescript, frontend, framework
Published: 2023-11-10 19:01:35

Many JavaScript libraries seem intent on wrapping browser events in some custom event object. Libraries like jQuery and Angular  hide the original Event object behind a custom type that may be useful to the library but I can't remember it ever being useful to me.

My goal for handling events was to keep it simple. Registering an event on an element in the framework is effectively the same as calling `.AddEventListener(...)`. The only responsibility of the framework is to manage or clean up those events.

## Registering an Event
Events are registered using the `on` property of the element configuration object. This property takes an object with event names as properties.
```TypeScript
div({ 
  on: { 
      click: (event: Event) => alert('Hello World') 
  }, 
  () => "Click!"
)
```
## Component events
Components define supported events through the third generic parameter of the `Component<void, void, E>` class. The second type parameter is for defining templates and covered in a future post. The component events type is expected to be a map of event names associated with the type of data emitted by the event. A component can fire an event by calling `this.Fire(eventName: string)`.

Listening for a component event also uses the `on` property of the component configuration object. Component event callbacks take a single parameter typed by the event map. Components do not fire standard DOM events.
```TypeScript
type Events = {
  alert: string;
};

class ChildComponent extends Component<void, void, Events> {
  Template() {
    return div(
      {
        on: { click: () => this.Fire("alert", "Hello from ChildComponent") }
      },
      () => "Child click!"
    );
  }
}

const childComponent = Component.ToFunction(
  "child-component",
  null,
  ChildComponent
);

class HelloWorld extends Component<void, void, Events> {
  Template() {
    return
      childComponent({ on: { alert: (message) => alert(message) } });
  }
}
```
[Code Sandbox](https://codesandbox.io/s/j-templates-event-binding-f58xx6)

Next post will cover adding reactivity to components.
process.env
Published: 2023-11-10 18:44:37

Hi Team
I have nx witn nest postgres typeorm project
i can't configure the connection with database 
process.env loads me OS'environment not the .env file
I follow 
https://dev.to/ipreda/nx-nestjs-typeorm-database-connection-with-environment-variables-1na6
https://dev.to/ipreda/nx-nestjs-easy-way-to-get-autofill-and-validate-environment-variables-a4m
Help plz
I want to download images in a special URL using python selenium. I tried following
Published: 2023-11-10 18:42:08

`download_url = driver.current_url     
new_file_name = str(index) + '.jpg'     
destination_path = os.path.join(download_path, new_file_name)     print(destination_path)     
try:           
    urllib.request.urlretrieve(download_url, destination_path)      
except Exception as e:
    print(e)`
Unlocking the Code: The Insider’s Guide to Crafting a Software Developer Resume That Opens Doors
Tags: webdev
Published: 2024-06-28 15:44:43

---
title: Unlocking the Code: The Insider’s Guide to Crafting a Software Developer Resume That Opens Doors
published: true
date: 2023-11-10 18:25:32 UTC
tags: WebDevelopment
canonical_url: 
---

Creating a standout software developer resume is more art than science. With the right approach, you can present your professional narrative in a way that not only showcases your technical prowess but also tells a compelling story of your career. Here are pivotal software developer resume tips to help you sharpen your profile: 1. Begin […]

The post [Unlocking the Code: The Insider’s Guide to Crafting a Software Developer Resume That Opens Doors](https://blog.nextideatech.com/unlocking-the-code-the-insiders-guide-to-crafting-a-software-developer-resume-that-opens-doors/) appeared first on [Next Idea Tech Blog](https://blog.nextideatech.com).
GNU Public License (GPL) vs. MIT: Choosing the best for Open Source
Tags: opensource, programming, development, beginners
Published: 2023-11-10 18:24:09

I've been looking into why WordPress chose the GNU Public License (GPL). I had an interesting chat with someone on DEV.to, which you can check out right [here](https://dev.to/samirmishra27/comment/2aj06)). It hit me that GPL is smart because it stops people from taking the code private. You can use it, but you need to give credit and keep it open for everyone. That seems like a better deal than the MIT license, right? What's your take on that?

{% embed https://dev.to/samirmishra27/comment/2aj06) %}

I've been thinking that in the context of... of course... our new Open Source project WebCrumbs.

When considering open source licensing for a project like WebCrumbs, the choice between GNU General Public License (GPL) and MIT License often boils down to the philosophy and goals of the project. WordPress's choice of GPL aligns with its commitment to freedom and sharing, ensuring that derivatives of the software remain free and open source.

Under the GPL, any derivative work must also be distributed under the GPL, which means that if someone modifies the WordPress code, they must also share those modifications under the same license terms. This "copyleft" approach guarantees that the software and any derivatives of it remain free for all users. It’s a way to ensure that the community benefits from improvements and that the project remains a collective endeavor.

The MIT License, on the other hand, is more permissive, allowing anyone to do almost anything they want with the code, including making it proprietary, as long as they include the original copyright and license notice. This can be beneficial for encouraging wider adoption and use in a variety of projects, including commercial ones, as there are fewer restrictions on how the code can be used.

Choosing between these licenses can reflect a strategic decision based on how we envision the growth and development of WebCrumbs. If the aim is to foster a community that builds upon each other's work openly, GPL might be a better fit. If the goal is to maximize adoption and allow for more flexibility in how the code is used, then MIT might be preferable.

Both licenses have their merits, and the better choice really depends on the specific objectives and values of WebCrumbs as it positions itself as the WordPress for React. It's worth considering how these licenses align with the vision of creating a collaborative and open-source community while also encouraging innovation and extension of the platform.

{% embed https://github.com/webcrumbs-community/webcrumbs %}
Explorando el Mundo de los Archivos de Recurso en C# con Visual Studio
Tags: sql, csharp, dotnet
Published: 2023-11-10 18:04:00

¡Hola comunidad de desarrolladores! 👋 Hoy quiero compartir con ustedes un aspecto fascinante de C# y Visual Studio: ¡los archivos de recurso! 🚀

**¿Qué son los archivos de recurso?**
Los archivos de recursos se utilizan para almacenar datos que se pueden recuperar fácilmente en tiempo de ejecución. Además, proporcionan una forma conveniente de separar datos específicos de la aplicación del código fuente, lo que facilita la internacionalización, la localización y la gestión de recursos.

Hay varios tipos de archivos de recursos en C#:

- Archivos de Recursos de Texto (.resx)

- Archivos de Recursos Binarios (.resources)

- Archivos de Recursos Incrustados

En este artículo, exploraremos cómo utilizar archivos de recurso en C# y Visual Studio para ofrecer **mensajes de bienvenida personalizados** en tu aplicación.

**Paso 1: Crear un archivo de recurso**

1. En el Explorador de soluciones, haz clic con el botón derecho en la carpeta que contendrá el archivo de recursos y, a continuación, selecciona Agregar > Nuevo elemento.

![**Figura 1**](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/98dk9fztw90hvr1sqzl2.png)

2. En el cuadro para buscar plantillas instaladas, escribe "**recurso**" y asigna un nombre al archivo.


![Figura 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/leco76qha01ph4twhbnh.png)

3. Escribe el valor de clave (cadena nativa) en la columna **Nombre** y la cadena traducida en la columna **Valor**.

![Figura 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3twl2kdo8w3h4otksd7w.png)

**El archivo Welcome.es.resx aparece en Visual Studio**


![Figura 4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ihkg845434ldbgve361u.png)

**Paso 2: Acceder a los mensajes de error**
Ahora, puedes acceder a los mensajes de error almacenados en el archivo de recurso desde tu código C#. Aquí tienes un ejemplo de cómo hacerlo:

```c#
ResourceManager resourceManager = new ResourceManager("NombreDeTuProyecto.Welcome.es", Assembly.GetExecutingAssembly());
string mensajeDeBienvenida = resourceManager.GetString("Hello");

```
**Paso 3: Personalizar la experiencia del usuario**
Utiliza el mensaje de bienvenida en tu aplicación para proporcionar a los usuarios una experiencia personalizada y amigable desde el principio:

```c#
// Código de inicio de sesión o cualquier otro punto de entrada en tu aplicación
try
{
    // Código de inicio de sesión
    // ...

    // Mostrar el mensaje de bienvenida
    Console.WriteLine(mensajeDeBienvenida );
}
catch (Exception ex)
{
    // Manejo de errores, si es necesario
    Console.WriteLine("Se podría utilizar un mensaje de error desde un recurso");
}

```

**Conclusión**
Los archivos de recurso son como tesoros escondidos en C# y Visual Studio. Úsalos sabiamente para mejorar la eficiencia y la flexibilidad de tu código.

¿Tienes alguna experiencia interesante con archivos de recurso que quieras compartir? ¡Hablemos en los comentarios! 🚀✨
Unlocking the World of AR: A Step-by-Step Guide to Creating Location-Based Experiences with Adobe Aero
Tags: augmentedreality, adobeaero, googlearvr, metaverse
Published: 2023-11-10 17:55:21



## Introduction
Augmented Reality (AR) has transformed the way we interact with the world, and Adobe Aero’s Geospatial Creator is your gateway to crafting immersive, location-based AR experiences. Imagine augmenting the real world with your creative vision — no complex coding required. This blog will guide you through the seamless process of bringing your 3D content to life in a specific location, making it more engaging and interactive.

## Understanding Adobe Aero and Geospatial Creator
Adobe Aero opens up a world of possibilities for designers and creatives. With the Geospatial Creator powered by ARCore and Google Maps, you can now place 3D content in real-world locations. This digital twin of the world is your canvas, and Adobe Aero is your brush.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zhk3vncmhf6zi3qd30dz.png)
## Setting Up Your Project


Starting a new project in Adobe Aero is as simple as naming your file and selecting ‘Location’ as your anchor type. A map preview helps you choose the perfect spot for your AR experience. Let the environment load for a little while.

**Navigating the 3D View:** Learn the ropes of the 3D view in Adobe Aero. Master the Orbit, Pan, and Dolly tools to find the ideal angle and position for your AR creation.


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

## Importing and Positioning Your 3D Asset

Whether it’s a astronaut or any other object, importing and scaling your 3D asset in Adobe Aero is a breeze. Position it just right to fit into the real world.

**Adding Interactivity:** Interactivity breathes life into your AR experience. Adobe Aero’s Behavior Builder allows you to add triggers and actions, like making your 3d objects spin or bounce, with just a few clicks.

**Previewing in Augmented Reality:** Click on preview tab and get a sneak peek of how your AR experience will look in the real world. Adjust and perfect your creation until it’s just right.


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

**Sharing Your AR Experience:** Click share and share it with the world. A simple link or QR code allows anyone to view your AR experience on their device.

## Conclusion
Adobe Aero’s Geospatial Creator is a powerful tool that democratizes AR creation. By following these steps, you can create an engaging and interactive AR experience that’s anchored in the real world. So why wait? Start creating today and bring your imagination to life in a whole new dimension. Ready to explore the possibilities? Dive into Adobe Aero and unleash the full potential of location-based AR.

[SUBSCRIBE TO NEWSLETTER](https://techtrioinsights.hashnode.dev/newsletter)
For MORE Follow me:
[LINKEDIN](https://www.linkedin.com/in/seikh-nabab-uddin-266b10247/)
[X](https://twitter.com/NababUddin2)
Placeholder Maintainer
Tags: hack23maintainer
Published: 2023-11-10 17:51:38

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->

### Intro
<!-- Share a bit about yourself as a maintainer. Is this your first Hacktoberfest, or have you maintained in others? Feel free to embed your GitHub account by using {% embed LINK %} -->

### Project
<!-- Tell us about the repository that you hosted. What processes did you set up to review and merge pull requests? Feel free to embed your GitHub repo by using {% embed LINK %} -->

### Highs and Lows
<!-- What were some of your biggest accomplishments or light-bulb moments this month? Did any problems come up that seemed impossible to fix? How did you adapt in those cases?  -->

### Growth
<!-- What was your skillset before Hacktoberfest 2023 and how did it improve? Have your project goals changed since publicly maintaining it? -->
Let's talk bout Linear-Algebra and ML
Tags: linearalgebra, machinelearning
Published: 2023-11-10 17:40:08

_Part:1_
**The Neural Network**
Neural Network is a machine learning model that helps in image processing. So now, what if I give a picture as an input? A neural network takes it as a pixel and runs some mathematical operations on it using an algorithm. The data in the picture helps take parameters, which contribute to making the best prediction for existing data.


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

In the picture, those black points are neural network nodes, which are organized in layers. These layers can be expressed as a rectangular array of numbers, which is ultimately called a matrix. These image pixels are mainly simple values that are being received as input, and then the algorithm determines the output by doing mathematical operations on them. This amazing process actually reminds us of the precious existence of linear algebra. By the way, neural networks have many more amazing applications!
Mastering Django Forms: A Deep Dive into Building Dynamic Web Forms
Tags: beginners, programming, python
Published: 2023-11-10 17:07:22

## Introduction

In the realm of web development with Django, creating dynamic and user-friendly forms is a crucial skill. In this post, we'll embark on a journey to master Django forms, exploring the various aspects that make them powerful tools for collecting and processing user input.

---

## The Anatomy of Django Forms

### 1. Form Classes

Django forms are created using Python classes that inherit from `django.forms.Form`. We'll delve into the structure of these classes and how to define form fields such as text inputs, checkboxes, and file uploads.

### 2. Field Validation

Learn how Django forms handle data validation on the server-side. Explore the built-in validators and discover how to create custom validation functions to ensure the integrity of user-submitted data.

---

## Creating Dynamic Forms

### 1. Formsets

Django provides formsets for handling multiple forms on the same page. Explore how to use formsets to build dynamic forms for scenarios like adding multiple items to a database in a single submission.

### 2. Inline Formsets

Take it a step further with inline formsets, a powerful feature for handling related models. This allows you to edit and create related model instances within the same form.

---

## Enhancing User Experience

### 1. AJAX Form Submissions

Implement asynchronous form submissions using AJAX to enhance the user experience. Learn how to update parts of the page without requiring a full page reload.

### 2. Django Crispy Forms

Discover the Django Crispy Forms library to easily render your forms using customizable templates. This library enhances the visual appeal of your forms while maintaining Django's form functionality.

---

## Securing Your Forms

### 1. CSRF Protection

Understand Django's built-in Cross-Site Request Forgery (CSRF) protection and how it safeguards your forms from malicious attacks.

### 2. Customizing Form Rendering

Explore different techniques to customize the rendering of your forms, ensuring a seamless integration with your website's design.

---

## Real-World Examples

### 1. User Registration Form

Walk through the creation of a user registration form, incorporating user authentication and validation.

### 2. Contact Form with Email Notifications

Build a contact form that not only collects user inquiries but also sends email notifications to the site administrator.

---

## Conclusion

Mastering Django forms is essential for delivering a seamless and interactive user experience. Whether you're a beginner or an experienced Django developer, this guide will equip you with the knowledge and skills needed to create dynamic and secure web forms.
Is there any technician who can take orders for this CDN commercial authorization system?
Tags: cdn, node, python, api
Published: 2023-11-10 17:05:45

Publish an article CDN commercial authorization system development and recruit technical team to complete the project
Front-end requirements
Front-end: Chinese, English, and other languages, countries, and back-end are the same
Backend: No limitation on development language
A main control system (that is, a CDN control system) needs to be developed (controlled end: the connected server interface needs to be lightweight and occupy less server resources, and some core files of the main control system need to be encrypted)

Authorization system master control (a separate management system): network authorization, offline authorization, KEY authorization, and other encrypted authorizations.

Other functional requirements: The website backend can be freely modularized (templates can be switched to facilitate secondary template development later)

DNS docking third-party platforms, such as CloudFront, Alibaba Cloud, DNSPod

(Requires defense AWF, a visual picture, attack source, and other attack parameters that need statistics)
The specific budget can be discussed in detail, depending on ability.
Our requirement is to sell the system to customers and charge monthly or annual fees.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfvut7eh1ple4bvxfv01.jpg)
Significant Small Changes to improve UI / UX
Tags: webdev, react, javascript, node
Published: 2023-11-10 16:55:09

**_Three weeks ago_**, I completed my blog website. **Why a blog?** Because ever since I started developing applications, I've had a strong desire to create one.
Today, I added a subtle yet significant feature. Now, users can actually see the image they've selected, rather than just reading the file name (e.g., name.jpg). Additionally, when they update a post, they no longer have to reselect the image, a functionality I hadn't implemented earlier.

![Full stack blog website ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umvlrb4l5qc58bfp5sfa.jpg)
These seemingly small details are crucial in developing a smooth user experience.
To check out the website Click [here](https://craftzblog.vercel.app/)
**Note 1:** I am using a free service to host the backend of my website. Therefore, you have to wait 2-3 minutes to ensure that the server loads. When the 'Recent Posts' section loads, it means the server is now up and running.

**Note 2:** I'll be continuously updating this website, introducing more features and striving to enhance its smoothness and overall UX design.
Excitingly, I want to share that my friends are using it, though not necessarily for the intended purpose! 😂
Terraform Cloud Project Bootcamp with Andrew Brown - Week 0, 1 & 2 Journal
Tags: terraform, hashicorp, iac, exampro
Published: 2023-11-10 16:44:43

Hi guys. Welcome back. I recently decided to learn Terraform as I upskill for my first tech role. This article is part of my Terraform journey with [Terraform Bootcamp](https://www.youtube.com/watch?v=TXjzwiHtGqc&t=5852s) by Andrew Brown and Andrew Bayko, together with Chris Williams(I am also using his resources that he published [here](https://www.freecodecamp.org/news/terraform-certified-associate-003-study-notes/#preparation-materials) and the beloved Shala Warner. I am also using some other resources from [Aaron Brooks](https://www.youtube.com/@mastermnd) so that I can better explain new terms. And a special shout out to [Gwen Leigh](https://medium.com/@gwenleigh/terraform-cloud-project-bootcamp-with-andrew-brown-complete-learning-journal-3640cebc74b5) for such a helpful outline that I used as a guide to create this series so that the documentation is easy to read!

As I learn more about Terraform, feel free to follow [Andrew Brown on Youtube](https://www.youtube.com/@ExamProChannel) and see their free (and paid) content . I Now let's jump in. Follow the links below to be redirected to the respective week;

**Week 0 - Prep week**
[Week 0 Live Stream](https://www.youtube.com/watch?v=TXjzwiHtGqc&t=5852s)
0.0.0 [Basic Definitions](https://dev.to/msaghu/terraform-bootcamp-week-0-with-andrew-brown-basic-definitions-23l)
0.1.0 [Configuring Terraform on Gitpod](https://dev.to/msaghu/terraform-cloud-project-bootcamp-with-andrew-brown-configuring-terraform-on-gitpod-5fc9)
0.2.0 [Git Basics]()
0.3.0 [Creating an S3 bucket and bucket name using Terraform Providers](https://dev.to/msaghu/terraform-cloud-project-bootcamp-with-andrew-brown-creating-an-s3-bucket-and-bucket-name-using-terraform-providers-52ce)
0.4.0 [Storing the state file in Terraform Cloud](https://dev.to/msaghu/terraform-cloud-project-bootcamp-with-andrew-brown-storing-the-state-file-in-terraform-cloud-41cb)
0.4.0 [Creating a command alias](https://dev.to/msaghu/terraform-cloud-project-bootcamp-with-andrew-brown-creating-a-command-alias-4oa2)

**Week 1**
[Week 1 Live Stream](https://www.youtube.com/watch?v=qIe3srQOQ8Q)
1.0.0 Journal TOC and Major Version
 Git basics
1.1.0 Restructure Root Module
1.3.0 Create AWS Terrahouse Module
1.4.0 Static Website Hosting
1.5.0 Content Delivery Network
1.6.0 Terraform Data Content Version
1.7.0 Invalidate Cache Local Exec
1.8.0 Assets Upload For Each
1.8.2 Working Through Git Graph Issues

**Week 2**
Week 2 Live Stream
2.0.0 Setting up TerraTown Mock Web Server
2.1.0 Setup Skeleton for Custom Terraform Provider
2.2.0 Provider Block for Custom Terraform Provider
2.3.0 Resource Skeleton
2.4.0 CRUD Resource
2.5.0 Deploying to TerraTown
2.6.0 Terraform Cloud and Multi Homes

**Week 3**
Terraform
AWS
FIRST OPEN SOURCE CONTRIBUTION
Tags: hacktoberfest, hacktoberfest23, opensource, beginners
Published: 2023-11-10 16:37:38

Hacktoberfest 2023 marked a significant turning point in my journey! Overcoming my initial apprehensions about contributing to open-source projects, I triumphantly submitted four pull requests. The progress I've made as a developer is truly remarkable. Although I had hoped for more challenging issues, this only intensifies my commitment to sharpen my skills. The adventure in open source persists, and I eagerly anticipate Hacktoberfest 24! 🚀👩‍💻 #Hacktoberfest #OpenSource #DeveloperJourney

**RESULT**

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