teleren/devto huggingface dataset:
Deploying a Turborepo Next.js App to Azure Static Web App
Tags: azure, nextjs, azurestaticwebapp, turborepo
Published: 2023-08-15 16:03:31

Deploying a Turborepo Next.js App to Azure Static Web App
---------------------------------------------------------

So, you've built an amazing Next.js app using Turborepo and now it's time to deploy it to Azure Static Web App. Don't worry, we've got you covered! In this article, we'll walk you through the steps to get your app up and running on Azure Static Web App in no time.

### Step 1: Prepare your Turborepo Next.js App

Before we dive into the deployment process, make sure your Turborepo Next.js app is ready for production. Double-check that all the necessary dependencies are installed, and your app is running smoothly locally. Remember, a well-prepared app is a happy app!

### Step 2: Create an Azure Static Web App

Head over to the Azure portal and create a new Static Web App resource. Give it a catchy name, because who doesn't love catchy names? Select the appropriate subscription and resource group, and choose your preferred region. Azure Static Web App makes it easy to deploy and scale your app globally.

### Step 3: Configure Deployment

Now it's time to connect your Turborepo Next.js app to Azure Static Web App. In the deployment configuration, specify the repository URL and branch you want to deploy. Azure Static Web App will automatically build and deploy your app whenever changes are pushed to the specified branch. It's like magic, but with less smoke.

### Step 4: Review and Deploy

Take a moment to review your deployment settings. Make sure everything looks good, and then hit that deploy button. Sit back, relax, and let Azure Static Web App do its thing. It will build and deploy your app in no time. Remember, good things come to those who wait.

### Step 5: Celebrate!

Congratulations! Your Turborepo Next.js app is now deployed to Azure Static Web App. It's time to celebrate! Go ahead, do a little happy dance. You deserve it!

Now that your app is live, you can start sharing it with the world. Azure Static Web App provides you with a unique URL for your app. Share it with your friends, family, and even your pet goldfish. Everyone deserves to experience the awesomeness of your Turborepo Next.js app.

### Conclusion

Deploying a Turborepo Next.js app to Azure Static Web App is a breeze. With just a few simple steps, you can have your app up and running in no time. So go ahead, give it a try and see for yourself. Your app deserves the best, and Azure Static Web App is here to make that happen.

### References:

*   [Next.js Official Documentation](https://nextjs.org/)
*   [Azure Static Web Apps Documentation](https://docs.microsoft.com/azure/static-web-apps/)
F Project clone tutorials
Published: 2023-08-15 15:55:59

Learning code by building projects seems like a really great idea... I've been doing that before. But, after I met some friends with better programming skills than me(despite we've learned programming roughly started same time) I asked them, "Do they learn programming by building projects?" all of them said _"yes"_... But when I asked my second question, "do they learn from project clone tutorials on YT or somewhere else?" most of them said _"NO"_. 

They explained that, with all the time we had it doesn't worth to learn by following or just typing code ignorantly. I understand not all of us learning programming from projects' tutorials in that way, but I'm sure most of aspiring programmers learning code in that way(me too)... All we care bout is adding more projects to our portfolios. And It's not a sin at all, but with all the time we had for following tutorials, we can find better way to learn programming.

And here's what my friends suggested me(and most of us) should do:
_**
just pick one app/website you wanna clone. And start clone it with all knowledge you have so far... Don't mind about where you are right now in term of your skills. And by doing that we're gonna face problems or errors, because we don't know everything. That's the best part... By solving problems we face in cloning or even building our own projects, we're gonna retain what we learn much better than following code from tutorials(without really try to understand what we're typing on our code editor). 

And we also can learn new tech stack in this way too...
**_
the title might be a clickbait... sorry
77 berufliches Vorwärtskommen: Ein Vorschlag für unsere Beweggründe als IT-Fachkräfteschaft.
Tags: deutsch, career, motivation, discuss
Published: 2023-08-15 15:54:00

Moin Moin,

den letzten Beitrag weiterdenkend, meine ich als Vorschlag für einen Beweggrund folgenden einbringen zu können: Wir haben einen starken Einfluss auf das gesellschaftliche Leben. Man schaue wie die IT unterschiedliche Lebensbereiche in den letzten Jahrzehnten beeinflusst hat. Wir sollten daher diese Entwicklung bewusst mitgestalten, so dass diese in eine Richtung geht, welche wir am Ende unseres Karriere-Weges vertreten können. 

1) Stimmst du dem Vorschlag zu? Anmerkungen? Ergänzungen?


Lass uns mittels Kommentaren austauschen.

Beste Grüße,
Mustafa

Oder auch mittels E-Mail: mustafa.kevin.dwenger@posteo.de
Betreff: Austausch
AgensGraph, AgensBrowser, What really are they?
Published: 2023-08-15 15:46:05

**AgensGraph**
AgensGraph is a database management system that supports both relational databases and graph databases. 
Its features include.
- Supports ANSI SQL and Cypher queries.
- Enables hybrid queries in the same query.
- Contains a visualization for viewing of graph queries.

**AgensBrowser**
AgensBrowser is a user interface which allows users to manage AgensGraph on a web browser. 
Its features include.
- Support for RESTful-API.
- Creating and deleting labels.
- Input, execution, storage of Cypher and ANSI-SQL.
- Project Load/Save/Delete.

**References**
https://bitnine.net/
https://bitnine.net/agensgraph/
Tech Update💡
Tags: discuss, career, news
Published: 2023-08-15 15:40:09


➡OpenAI Might go Bankrupt by end of 2024, ChatGPT costing over ₹5.80 crore per day.

➡Twitter.com Starts Switching Over to X.com; iOS Users Reportedly See Changed URLs.

➡India’s Homegrown Web Browser May Come With Crypto-Loaded Features.

➡PVR Inox Launches Standalone IMAX Experience at Delhi’s Priya Cinema.

➡WhatsApp Beta Adds Multi-Account Feature for Testers on Android.

➡Threads App On Android Sees 79% Drop In Usage After One Month.

➡India’s Laptop Import Restrictions Could Expand To Cameras And Printers.

➡Dell's Australian Unit Fined $6.5 Million for Misleading Customers on Discounts.
Levantar un Moodle rápidamente con Docker
Tags: docker, tutorial, spanish
Published: 2023-08-15 15:39:29

El otro día tuve que levantar un Moodle pero con Docker, la verdad es que es bastante sencillo y super rápido. Les dejo el Dockerfile y docker-compose.yml toda esta parte es para una configuración en modo desarrollador. Si se quiere poner el productivo solo es cuestión revisar la documentación y cambiar algunos parametros.

Por cierto la primera parte es para habilitar la codificación correcta para aceptar la configuración de idioma en Español.


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


![docker-composee.yml](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ke998b8n7g474uchgwt.png)



Lo único que tienes que hacer es tener estos dos archivos de configuración y ejecutar:
* docker-compose build
* docker-compose up -d

Posteriormente tendrás listo un Moodle minimalista con una configuración base por defecto. El usuario por defecto es user y la contraseña es bitnami.

Espero que pueda servirle a alguien mas como a mi me sirvió.
JS Challenge: Check if all elements in an array are the same
Tags: javascript, javascripttips, jschallenge, oneliners
Published: 2023-08-15 15:29:30

---
title: JS Challenge: Check if all elements in an array are the same
published: true
description: 
tags: javascript, javascripttips, jschallenge, oneliners
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-08-15 15:15 +0000
---
One solution is to verify each element in the array is equal to the first element of the array.

Alternately we can also filter which are not equal to the first element and verify the resulting array length is zero.

```js
arr1 = [1, 1, 1, 1, 1];
arr2 = [1, 1, 0, 1, 1];

arr1.every((e,i,a) => e === a[0]); //returns true
arr2.every((e,i,a) => e === a[0]); //returns false

//OR

arr1.filter((e,i,a) => e !== a[0]).length===0; //returns true
arr2.filter((e,i,a) => e !== a[0]).length===0; //returns false
```
Introduction to Vector Databases
Published: 2023-08-15 15:16:50

# The Marvelous World of Space Exploration

## Introduction

Space, the final frontier, has captivated human imagination for centuries. The quest to explore the cosmos has led to remarkable discoveries, technological advancements, and a deeper understanding of our place in the universe.
 # The Marvelous World of Space Exploration

## Introduction

Space, the final frontier, has captivated human imagination for centuries. The quest to explore the cosmos has led to remarkable discoveries, technological advancements, and a deeper understanding of our place in the universe.
 # The Marvelous World of Space Exploration

## Introduction

Space, the final frontier, has captivated human imagination for centuries. The quest to explore the cosmos has led to remarkable discoveries, technological advancements, and a deeper understanding of our place in the universe.
A Comprehensive Guide: replace() in Age
Published: 2023-08-15 15:16:33

Have you ever encountered a situation where you needed to replace a specific set of characters within a string with another set of characters? This common task is a fundamental operation in programming, and it can be accomplished using various methods depending on the programming language you're working with. In this article, we'll explore the concept of string replacement, its syntax, and provide a practical example using SQL.

## Understanding the Syntax
String replacement involves substituting a target sub-string within a larger string with a new sub-string. The syntax for this operation is typically as follows:
```
replace(originalString, searchString, replaceString)
```

Here's what each parameter signifies:

- `originalString`: This is the string on which the replacement operation will be performed.
- `searchString` : The substring that you want to search for within the originalString and replace.
- `replaceString` : The substring that will replace the searchString within the originalString.

## A Sample Query in SQL
Consider a scenario where you're working with a database and you want to replace specific characters within a string in the database. Let's look at a sample query using SQL:
```sql
SELECT *
FROM cypher('munmud_graph', $$
    RETURN replace('moon', 'oo', 'ea')
$$) as (finalString agtype);
```
In this query, the replace function is used to replace all occurrences of 'oo' with the characters 'ea' in the string 'moon'. As a result, the string 'mean' will be returned.


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

## Practical Use Cases
String replacement is a versatile operation with a wide range of applications:

1. Data Cleaning
In data preprocessing tasks, you might need to clean up inconsistent data entries. String replacement can help you standardize formats, correct spelling errors, or remove unwanted characters.

2. Text Processing
When working with text data, you might want to replace certain words, phrases, or special characters to modify the content or structure of the text.

3. URL Handling
In web development, you might need to modify URLs by replacing query parameters or path segments to navigate users to different parts of a website.

4. Template Rendering
In programming frameworks that support templates, string replacement can be used to dynamically generate content by replacing placeholders with actual values.

## Conclusion
String replacement is a fundamental concept in programming that allows you to modify strings to suit your specific needs. Whether you're cleaning data, processing text, or manipulating URLs, understanding and effectively implementing string replacement methods is a valuable skill for any programmer.
Using Scoop to Create a Portable Toolkit
Tags: scoop, windows, productivity
Published: 2023-08-15 15:04:36

[Scoop](https://scoop.sh/) provides a wonderful foundation for creating a portable developer's toolkit on Windows systems.

## What is Scoop?

Scoop is a command-line installer for Windows. It is created from Powershell scripts, so it installs easily with few dependencies on Windows-powered systems. The premier benefit of Scoop over other Windows installers (e.g., Chocolaty, Winget, etc.) is that it installs everything to a single directory under the user profile.

Scoop stores configuration data that should persist between software updates in a persistent data directory. This directory is an excellent candidate to store in a private repository somewhere. (Of course, this repository can be public. I tend to store license/registration keys in this directory, so I made mine private.)

## Creating your toolkit

To create your toolkit, first, install Scoop and then use it to install the utilities--development or otherwise--that you use.

![An example of what I have installed via Scoop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gj3gucytprqw61nuw7jv.png)

Once everything is installed and configured to your liking, create a Git repository in the Scoop persist directory. It should be located under **scoop/persist** in your Windows home directory.

This repository will allow you to back up your application configurations and import them on other machines, giving you an identical work environment across devices.

Before pushing your Git repository to some remote server, save a list of all the apps installed in Scoop to make them easy to install on other machines. Do this by running `scoop export > scoopfile.json` in the **persist** directory. Make sure to commit the **scoopfile.json** file. On other devices, you can install all your apps by running `scoop import scoopfile.json`.

## Cloning your toolkit

The process to create a copy of your work environment is as simple as the following steps:

1. Install Scoop
2. Install Git via Scoop: `scoop install git`
3. Checkout your Scoop persist repository to **$HOME/scoop/persist**
4. Install your Scoop packages: `scoop import $HOME\scoop\persist\scoopfile.json`

## Enjoy!

I find that using the same tools and configurations on any machine I work on allows me to become as efficient as possible with these tools. In my opinion, Scoop provides the easiest way to create an environment that can be easily synced across all of my development computers.
🚀 One Git Trick for Perfect Commits 🛠️
Tags: git, programming, productivity, tutorial
Published: 2023-08-15 15:04:04

Are you tired of seeing vague and meaningless commit messages like:

```shell
fix: close pull request discussion
fix: fix review discussion
```

If you're nodding your head in agreement, it might be time to introduce the "git fixup" technique to your team's workflow, or even just adopt it for yourself.

If the concept seems complicated and overwhelming, don't worry – you're about to be pleasantly surprised. Git fixup is actually quite simple, especially if you're already comfortable with making commits. Let's jump right in! 🏊‍♂️

Imagine you've made several commits on your working branch and have submitted a merge or pull request. However, during the code review, issues were identified—whether by your peers or during your own self-review. Instead of creating separate commits to address these problems, you can simply use the git fixup command. Here's how:

1. Identify the hash of the commit where the problem was found.
2. Run the command💡:
```shell
git commit --fixup=<commit hash you want to fix>
```

This command will generate a new commit with the original commit's subject, prefixed with `fixup!`. This additional commit might seem like a slight inconvenience, but even it is already far better than having vague commit messages cluttering your history.

But we're not done yet. The next step is to incorporate the fixup commit into the original commit using the following command:

```shell
git rebase --autosquash -i main
```

Here's what these parameters mean:
- `-i`: Interactive mode for the rebase.
- `--autosquash`: A special flag that squashes fixup commits into their respective originals.
- `main`: The branch from which your current branch originated.

**!!! This is a rebasing command, and you should be aware that this command will change your Git History. So, do it only if you know how it works.**

After executing this command, a text editor (VIM by default) will appear. Don't worry—there's no need to make changes. Simply close it by typing `:q!`.

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



Congratulations! Your commit history is now clean and organized. You're ready to share your changes with your team. Just use either of these commands to push your changes, depending on your circumstances:

- if you work on the branch alone: `git push --force` 💪
- if you share the branch with someone: `git push --force-with-lease` 🤝

To summarize:
1. Copy the hash of the commit you want to fix.
2. Run `git commit --fixup=<commit hash>`.
3. Execute `git rebase --autosquash -i main`.
4. Check the open text editor and close it if everything looks good (`:q!`).
5. Use `git push --force` to publish your changes.
Day 26: Typed Arrays
Tags: javascript, day26, 100daysofcode
Published: 2023-08-15 15:00:00

Typed Arrays were introduced as part of the ECMAScript 2015 (ES6) specification to address the limitations of traditional arrays when dealing with binary data. Unlike traditional arrays, where elements can be of mixed data types, Typed Arrays enforce a single data type for all elements within the array. This alignment enables better memory utilisation and more predictable behaviour.

1. **Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array**: These arrays deal with signed and unsigned 8, 16, and 32-bit integers.
2. **Float32Array, Float64Array**: These arrays work with 32-bit and 64-bit floating-point numbers.
3. **BigInt64Array, BigUint64Array**: Introduced in later specifications, these arrays handle 64-bit signed and unsigned integers.


## **Problem**
Imagine you're building a real-time audio processing application. You need to process raw audio data, where each audio sample is a 16-bit signed integer. 


## The Older Way
In the past, developers had to rely on standard arrays to handle binary data. 
```javascript
const audioSamples = [0.1, 0.5, -0.3, ...]; // Traditional JavaScript array

// Manipulate audio samples
const processedSamples = audioSamples.map(sample => sample * 2);
```

However, the dynamic nature of arrays introduces memory overhead, as each element requires additional space to store the type information and other metadata.

## Typed Array
```javascript
const audioSamples = new Float32Array([0.1, 0.5, -0.3, ...]); // Typed Array

// Manipulate audio samples efficiently
const processedSamples = audioSamples.map(sample => sample * 2);
```

By utilising Typed Arrays, you directly operate on the raw binary data, avoiding unnecessary overhead and benefiting from improved performance.

## Advantages 
1. 🚀 **Performance:** Typed Arrays offer better performance compared to traditional arrays for tasks involving binary data manipulation.
2. 🧐 **Memory Efficiency:** With a fixed data type, Typed Arrays are more memory-efficient as they eliminate the need for type information and other metadata per element.
3. 🔧 **Predictable Behavior:** Since data types are enforced, you can be confident in the expected behavior and avoid type-related bugs.
4. 🔗 **Interoperability:** Typed Arrays can be used with other APIs like WebGL, Web Audio, and Fetch API for seamless integration.

## Limitations
1. ⚠️ **Fixed Size:** Once created, the size of a Typed Array is fixed and cannot be changed dynamically.
2. 🚫 **Limited Data Types:** While there are several supported data types, the variety is not as extensive as with traditional arrays.

So, next time you're working on a project that involves crunching numbers or dealing with raw binary data, give Typed Arrays a try and witness the difference in speed and efficiency!
Como resolver serviços que aguentam poucas requisições?
Tags: webdev, programming, tutorial, discuss
Published: 2023-08-15 14:45:47

Imagine que você tenha um serviço que é literalmente uma blackbox (você não consegue alterar nada nele) que só aguenta 200 requests por vez? Como você resolveria isso?


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

Este problema surgiu enquanto estava conversando com um amigo, no qual ele relatou que já viu um serviço desta forma escrito em uma lang particularmente bem antiga.

No caso, para abordar o problema, fiz o mock em Fastify como na imagem anterior.

Daí, quando executo o script abaixo (ele manda 10 mil requests de uma vez), o server simplesmente não consegue responser muitas das requests. 


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

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

Neste caso, a solução aqui é simples.
Como você já sabe um limite conhecido que o seu server target consegue aguentar, você coloca um Proxy reverso na frente para regular a backpressure de requests dentro de um número razoável. Neste caso, fiz rapidamente em node mesmo.


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

O resultado é que, este Proxy Reverso só vai mandar 180 requisições de cada vez para que o servidor alvo processe, evitando esses crashs, mas atenção: isso é um paliativo, visto que como ele deixa as requests em idle até o server estar disponível, consequentemente a última requisição demorará mais a ser processada.


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


Repo com código: https://github.com/EronAlves1996/backpressure-monorepo