teleren/devto huggingface dataset:
Microsoft Azure: Building My First Azure Static Web App.
Published: 2023-04-14 14:09:24


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

Creating and deploying a static web app on Azure using GitHub involves several steps, which are:

1.	Create a GitHub repository: Create a new GitHub repository or use an existing one to host the code for your static web app.

![Github](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/khww0bqs1iwsdrwlrlc3.PNG)
2.	Create an Azure account: If you don't have an Azure account, create one at portal.azure.com
3.	Create a new static web app in Azure: In the Azure portal, navigate to "Static Web Apps" and click on the "Add" button to create a new static web app.
![Azure1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2rak68guqc0w978e3m2z.PNG)
4.	Configure your static web app: Configure your static web app by providing details such as the name of the app, the source code repository URL, build settings, etc.
![Azure2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rjxw9jzzymcq1h0y1zmt.PNG)
5.	Connect your GitHub repository to your Azure account: In the "Deployment Center" tab of your Azure static web app, connect your GitHub repository by providing the required access and authentication details.


![Azure3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ur8vdwbv4iis07c77sxw.PNG)
6.	Enable continuous deployment: Enable continuous deployment by selecting the option to deploy changes automatically whenever new changes are pushed to the GitHub repository.
7.	Deploy your static web app: Deploy your static web app by pushing the code changes to your GitHub repository. Azure will automatically build and deploy the changes to your static web app.
![Azure4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j6xams1eatbbxvrhokuf.PNG)
8.	Verify the deployment: Verify that your static web app is deployed and running correctly by navigating to the URL of the app provided in the Azure portal.
![Azure5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/424z1n6b7hjsr9tfyciu.PNG)
9.	Update your static web app: Whenever you need to make changes to your static web app, simply make the changes in your code and push them to your GitHub repository. Azure will automatically build and deploy the changes to your static web app.
![Azure6](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x4ampiv8wqyq0l16zyrv.PNG)
Following these steps will allow you to create and deploy a static web app on Azure using GitHub.
What was your win this week?
Tags: discuss, weeklyretro
Published: 2023-04-14 13:19:13

---
title: What was your win this week?
published: true
description: Looking back on this past week, what was something you were proud of accomplishing?
tags: discuss, weeklyretro
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-04-06 19:13 +0000
---

Hey folks 👋

Hope everybody enjoys their weekends!

Looking back on this past week, what was something you were proud of accomplishing?

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Celebrating a birthday 🥳

---

![a grumpy, push-face cat wearing a sombrero standing in front of a birthday cake looking unimpressed and flicking it's tail](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xgmjyfcztomzw3mbcxlz.gif)
Vue vs React: Which Technology to Choose?
Tags: vue, react
Published: 2023-04-14 14:08:42

React is an open-source JavaScript library developed by Facebook in 2013. It has quickly gained popularity among developers due to its ability to create efficient and scalable web applications with a strong emphasis on user experience. 

For more detail, https://www.code-sample.com/2023/04/vue-vs-react-which-technology-to-choose.html
Getting Started with SES: Required Permissions to Send Emails
Tags: webdev, javascript, aws, ses
Published: 2023-04-14 14:06:19

Sending emails has become an integral part of many web applications. Amazon SES (Simple Email Service) is a highly scalable email service provided by AWS (Amazon Web Services) that allows developers to send bulk emails using their web applications. In this blog post, we will explore the required permissions to send emails using SES.

Before sending emails using SES, you need to ensure that you have the necessary IAM (Identity and Access Management) permissions to access the SES service. You can do this by creating an IAM user with the required permissions or by adding the necessary permissions to an existing user.

The following are the required permissions to send emails using SES:

**ses:SendEmail -** This permission allows you to send emails using SES.

**ses:SendRawEmail -** This permission allows you to send raw email messages using SES.

**ses:GetSendQuota -** This permission allows you to retrieve the maximum number of emails you can send per 24-hour period and the number of emails you have already sent in that period.

**ses:GetSendStatistics -** This permission allows you to retrieve information about the emails you have sent using SES.

Once you have ensured that your IAM user has the necessary permissions, you can start sending emails using SES. Here's a simple code snippet in Node.js to send an email using SES:

```
const AWS = require('aws-sdk');
AWS.config.update({region: 'us-east-1'});

const ses = new AWS.SES();

const params = {
  Destination: {
    ToAddresses: ['recipient@example.com']
  },
  Message: {
    Body: {
      Html: {
        Charset: 'UTF-8',
        Data: '<h1>Hello from SES!</h1>'
      }
    },
    Subject: {
      Charset: 'UTF-8',
      Data: 'SES Test Email'
    }
  },
  Source: 'sender@example.com'
};

ses.sendEmail(params, function(err, data) {
  if (err) {
    console.log(err, err.stack);
  } else {
    console.log(data);
  }
});

```

In the above code snippet, we are sending an email using SES with a subject "SES Test Email" and a message "Hello from SES!" in HTML format. We have specified the recipient email address, sender email address, and the AWS region in which SES is enabled.

SES is an easy-to-use email service that allows developers to send bulk emails using their web applications. However, it is important to ensure that you have the necessary IAM permissions to access the SES service. By following the steps outlined in this blog post, you can easily get started with SES and start sending emails using your web application.
From Nominations to Awards: Singula Team Identity & Website
Tags: ux, branding, awwards, startup
Published: 2023-04-14 14:01:38

Our design & development company takes pride in delivering outstanding website designs that not only cater to the business needs of our clients but also grab the attention of leading design contests. We are thrilled to announce that our [Singula team identity & website project](https://www.behance.net/gallery/155103883/Singula-Team/modules/917277591) has been nominated for some of the leading design contests and has won several amazing awards!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6nj747hblqciyn3n6wk3.png)
Our identity design and website project received the Awwwards [Honorable Mention](https://www.awwwards.com/sites/singula-team) on January 31, 2023. It was also recognized as the [GURU OF THE DAY](https://www.webguruawards.com/sites/singula-team) by Webguruawards on March 14 and became a Web Awards Laureate at [Web Awards](https://webawards.com/winners/singula-team/). These awards are a testament to the hard work and dedication of our team of experts, who are passionate about building innovative and impactful websites.

Moreover, our project has been recognized by other prominent design contests, such as: 

Bestcss (Site of the Day), 
Cssreel (FEATURED), 
Csslight (Featured of the Day), 
Cssdesignawards (SPECIAL KUDOS), 
Designnominees (Site of the Day) 

We believe that these awards are a testament to our commitment to building innovative and impactful websites for our clients. If you are looking for a web development company that can deliver outstanding results for your business, then look no further. We are here to help you achieve your goals.
Resolvendo problemas no HackerRank: Diferença mínima dentro de Arrays.
Tags: javascript, beginners, programming
Published: 2023-04-14 13:54:52

Olá, seja bem vindo a mais um Resolvendo problemas no HackerRank: No caso de hoje,vamos inserir a diferença mpinima de valores dentro de um array, baseado na quantidade de pares existentes. Vejamos mais informações com a explicação detalhada e sua resolução.

**Minimum Distances -**

A distância entre dois valores de matriz é o número de índices entre eles. Dado `a`, encontre a distância mínima entre qualquer par de elementos iguais na matriz. Se esse valor não existir, retorne -1. Vejamos um exemplo:

- a = [3,2,1,2,3]

Temos dois pares neste array (2 e 3), a diferença do índice `i`= 0 e `j` = 4. Então a diferença de `d` é [i,j] = j-i = 4. No caso de do índice de 2, a diferença é `i`= 1 e `j`= 3, fazendo assim j-i = 2.

- Nosso objetivo é retornar o menor valor possível e caso não seja possível, retornar -1.

Vejamos o código:

```
function minimumDistances(a) {
    // Write your code here
  let result = [];
  
    for (let i = 0; i < a.length; i++) {
      for (let j = i + 1; j < a.length; j++) {
        if (a[i] === a[j]) {
          result.push(Math.abs(i - j))
        }
      }
    }
    if (result.length === 0) {
      return -1
    }
    else {
      return Math.min(...result)
    }
}
```

Criamos uma variável chamada `result`que irá receber um array vazio até então. Logo após isso, iniciamos um loop com um index chamado `i` que inicia em 0 e enquanto for menor que o comprimento de `a`(onde está reservado todos os valores do array), ele deve adicionar mais um.

Fazemos o mesmo agora declarando um index chamado `j` que irá receber o valor de `i`+ 1, enquanto ele for menor que o comprimento de `a`, e também adicionará mais um. Após isso criamos um `if`que caso o a[i] seja igual ao a[j], iremos lançar o valor absoluto em `result` com a diferença entre eles.

E caso o valor seja igual a 0, retornaremos -1, fora disso, o menor valor de diferença.

O resultado será:

```
6
7 1 3 4 1 7

input: 3
```

Assim, concluímos mais um _Resolvendo problemas no HackerRank:_ até a próxima.
Enviar geoposición desde el backend con Primefaces y Gmaps.
Tags: java, jsf, gmaps
Published: 2023-04-14 13:48:57

Este ejemplo muestra como interactuar con información del backend y el frontend. Específicamente, enviar una posición y mostrarla en un mapa (google maps).

Recuperamos la latitud y longitud (posiblemente desde la base de datos) en el controller.

{% embed https://gist.github.com/edgargs/a7646fac502d56c8a7426c1f5a6d2d69 %}

La posición lo almacenamos en variables de javascript. En la página web, también tendremos dos input's para mostrar cómo va cambiando la posición al mover el marker.

{% embed https://gist.github.com/edgargs/5dddd30570a0e358ac8eab71ef851464 %}

Creamos el mapa y colocamos el marker. Agregamos los eventos para mostrar la posición actual.

{% embed https://gist.github.com/edgargs/cb986464d781c3ba9f36ce6eb19e5e58 %}

---

## Documentación

https://developers.google.com/maps/documentation/javascript/examples/
Anyone using Remixjs for production? Which UI library are you using?
Tags: javasc, typescr, webdev
Published: 2023-04-14 13:42:51

First thing first, i'm a .NET developer and have some experience with front end stuff but i could only do the part where i create components add logic to it. If you were tell me to create a react app from scratch or webpack, esbuild, bundling stuff, i have no clues.

A couple of months ago. I saw their post on some platform and couldn't remember where it was but the post was quite impressive that they claims their way of fetching data was faster. Lately, i've got an idea and want to spin up a website so i gave it a try but been struggling to get the SSR stuff done correctly since React 18 hydration didn't go very well with Antd and Material UI. Moreover, the example on how to mix Remixjs with MaterialUI is outdated. So, i don't have any clues at the moment how could we do that.
Lessons Learned: Adding ChatGPT to a Tic-Tac-Toe Game in Next.js
Tags: chatgpt, webdev, javascript, nextjs
Published: 2023-04-14 13:31:06

Ever since ChatGPT showed up at our doorstep, we've been seeing a ton of cool apps popping up left and right. And now with the API out, the possibilities are endless!

Just the other day, I whipped up this super fun and addictive Tic-Tac-Toe game using Next.js. It's got all sorts of sound effects and animations that make it feel like you're really in the game. Give it a try.

Check it out here: https://tic-tac-toe-five-pi.vercel.app/

Aside from the cool animations and sound effects, I also spent quite some time working on the game logic to make it as efficient as possible. Playing against the computer (which I programmed to be my assistant) is already fun, but then I had an idea: what if the opponent was ChatGPT itself? Pretty neat, right?

The game logic is based on an array with 9 elements (0-8) representing the state of the board. Each element can hold either the player's or computer's symbol, or be null, indicating an empty spot. With this in mind, I thought it'd be cool to pass the board's state to the [OpenAPI Completion Endpoint](https://platform.openai.com/docs/api-reference/completions) and have AI suggest its next move by returning the index where it should place its symbol.

![Tic-Tac-Toe Game](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q84ujhj2gwp5fnu3dmbh.png)

It was a great idea, and technically it almost worked, but unfortunately, the implementation had some flaws. Firstly, allowing the AI to suggest the next move meant making requests to the endpoint every time, which was very slow and inefficient. After a few attempts, the response I received was "Too many requests," which essentially broke the game and ruined the fun.

Secondly, when you sign up for OpenAI's APIs, you receive free credits (about $18), which had already expired in my case. Upgrading to a paid plan wasn't feasible, as releasing the app would mean thousands of requests being made.

However, the game logic I created is pretty solid, and I believe the AI would suggest the same moves as the logic does. So, in the end, I decided to go with my own logic.😎. No questions asked!

Do you see what I see? This could be huge for the world of gaming. In the near future, instead of writing complex game logic, developers could simply enable AI to compete against players. Just imagine playing your favorite game against a well-built AI opponent. Trust me, you'll be crushed! 😂 The possibilities are endless, and we're just scratching the surface. This AI revolution is here to stay.

Thanks for reading, folks! Don't forget to follow me on [Twitter](https://twitter.com/JeffreySunny1). 

And if you're interested in a detailed guide on how I built the Tic-Tac-Toe game in Next.js, let me know in the comments!
Use Cases of Default Parameters and Parameters Check
Tags: parameters, programming
Published: 2023-04-14 13:19:12

In programming, there are different ways to handle function parameters, such as checking the validity of the passed arguments or setting default values for parameters. Here are some differences between parameter checking and default values:

1. Parameter checking ensures that the arguments passed to a function are valid and within the expected range, whereas default values are used when a parameter is not explicitly set by the caller.

2. Parameter checking can help prevent unexpected errors and bugs caused by invalid input values, whereas default values can make function calls more concise and convenient by allowing the caller to omit certain parameters.

3. Parameter checking can provide more flexibility and control over how a function behaves, whereas default values can simplify the function signature and make it easier to use.

4. Parameter checking can be more computationally expensive, especially if the input validation is complex, whereas default values are usually simple and have minimal performance impact.

5. Parameter checking is often used when the caller cannot guarantee the validity of the input, whereas default values are commonly used when the caller can make assumptions about the input or when a certain value is more common.

```
#include <stdio.h>

// Function that accepts two parameters with default values
void printMessage(char* message, int times) {
    // Set default value for times parameter
    if (times <= 0) {
        times = 1;
    }

    // Print message the specified number of times
    for (int i = 0; i < times; i++) {
        printf("%s\n", message);
    }
}

// Main function
int main() {
    // Call printMessage with valid arguments
    printMessage("Hello world!", 3);

    // Call printMessage with invalid times parameter
    printMessage("Invalid times", -1);

    return 0;
}

```
In the printMessage function, we have two parameters: message, which is a pointer to a string, and times, which is an integer that specifies how many times the message should be printed. We have set a default value for times by checking if it's less than or equal to 0, and if so, we set it to 1.

In the main function, we call printMessage twice: once with valid arguments, and once with an invalid times parameter. The first call will print "Hello world!" three times, and the second call will print "Invalid times" once (since the default value of 1 is used).

This example demonstrates the use of default values to simplify function calls and the use of parameter checking to handle invalid input values.

In general, both parameter checking and default values are useful techniques in programming, and their use depends on the specific needs and requirements of the function and its callers. A good practice is to use both techniques when appropriate, for example, by providing sensible default values for common input scenarios and performing parameter checking for critical input values.
How (not) to Respond to a CFP
Tags: speaking
Published: 2023-04-14 13:00:00

Over the last few years, I have submitted a lot of talk suggestions to conferences and events through their Call for Papers (CFP); I've had a lot of rejections and been accepted to speak at a lot as well.

I've also been involved in reviewing submissions for events and conferences and trying to decide which ones to pick and which to reject, which is always challenging.

In this blog post, I wanted to share some tips on filling in a Call for Papers for an event.

## Too short
When writing about a talk idea, make the description or synopsis a manageable length.  If the person evaluating the submissions doesn't know what the talk will be about, how can they assess it properly or trust that it will be a good talk for the audience?
Your submission extract should be long enough to give the conference organisers enough context to understand what you will be talking about and why it's worth picking your submission over the others.

## Too long
Equally, your submission should not be too long.  It doesn't need to be an essay; you don't need to write out an entire blog post or article in your submission.   Save that level of detail for the talk itself.

Try and strike a good balance of sharing enough details to show the value of the talk but not giving everything away. 😊

## Boring
Try and make sure your submission sparks interest.  There is no point in having a great subject or a very relevant one, but your submission needs to convey that.  Your description should share why someone would want to attend your talk.

Try and show your personality within the description.  If the description doesn't excite or interest you, why would others want to attend the talk?

## Sales Pitch
Some events are happy to have talks and presentations that are aimed at selling products to audiences, but you should focus on helping to teach the audience something.   By all means, chat about your company's products or offerings but don't turn your talk into a sales pitch.   If you aim to sell things at the event, then look to sponsoring it or getting a booth, don't submit a session. 

## Don't get discouraged
It can be daunting to write a submission for a conference or event, and you will undoubtedly face rejections.  Believe me, I've had my fair few rejections, and it's never pleasant; however, don't get discouraged.  Keep trying, keep learning, and you'll get there.
5 Reasons to Choose Magento Development for Your Next e-commerce Project
Published: 2023-04-14 12:32:31

In today's digital age, e-commerce has become an essential part of running a successful business. To stay ahead of the competition, it's important to choose the right e-commerce platform that meets your business needs. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cjh3odpqcg8j6fuzly9v.png)
Magento is one of the most popular e-commerce platforms that is trusted by businesses of all sizes. In this blog, we will discuss 5 reasons to choose Magento development for your next e-commerce project and why it's important to [**hire Magento developers**](**url**) for the Magento development services.

**1. Open-Source Platform:** Magento is an open-source platform, which means that the code is freely available to the public. This makes it easy for developers to customize and build on top of the platform. Magento has a vast community of developers who contribute to the platform, providing regular updates and new features.

**2. Scalability:** Magento is known for its scalability, making it a great choice for businesses of all sizes. Whether you are just starting out or are an established enterprise, Magento can handle your e-commerce needs. With Magento, you can easily add new products, features, and functionalities as your business grows.

**3. Customization:** Magento provides a high degree of customization, allowing you to tailor your online store to your specific business needs. Magento developers can create custom extensions, themes, and plugins to enhance the functionality and design of your online store.

**4. SEO-Friendly:** Magento is SEO-friendly, which means that it is optimized for search engines. This can help you rank higher in search engine results pages (SERPs), which can lead to increased traffic and sales. Magento developers can help you optimize your online store for SEO by implementing best practices like schema markup and meta tags.

**5. Multi-Channel Selling:** Magento allows you to sell your products on multiple channels, including your online store, social media, and marketplaces like Amazon and eBay. This can help you reach a wider audience and increase sales. Magento developers can help you integrate your online store with these channels to streamline your sales process.

In conclusion, Magento is a powerful e-commerce platform that provides a high degree of customization, scalability, and SEO-friendliness. Hiring Magento developers for the **[Magento development Services](https://www.webcluesinfotech.com/magento-development-services)** is essential for ensuring that your online store is optimized for success. WebClues Infotech is a leading Magento development company that can help you build a custom online store. Contact us today to learn more about our services and how we can help you grow your business.
chatGPT integration on Solcial.io
Tags: ai, socialmedia, blockchain, network
Published: 2023-04-14 12:22:08

[Solcial.io](https://solcial.io/feed) is going to become first web3 social network with AI technology integrated. A few weeks ago we started integration of chatGPT. It is not visible yet for users or better to say, hard to be recognised. But soon you will see the presence of AI on platform. 

We will keep you updated. Be ready for a combination of web3 social networking and powerful AI technologies.