teleren/devto huggingface dataset:
Getting Started with Next.js
Tags: nextjs, beginners, javascript, react
Published: 2024-01-24 19:00:08

If you're looking to dive into the world of modern web development, Next.js is a fantastic place to start. Next.js is a popular React framework that offers a range of features like server-side rendering and generating static websites. In this article, I'll guide you through setting up your standard Next.js project in a few easy steps.

## What is Next.js?
Before we jump into the setup, let’s understand what Next.js is. It’s a React framework that enables functionality such as server-side rendering and generating static websites, which are not available out-of-the-box with React. This makes Next.js highly efficient for building fast and scalable applications.

## Prerequisites
To get started with Next.js, you need to have Node.js and npm (Node Package Manager) installed on your computer. Next.js requires Node.js version 10.13 or later. You can download it from the official Node.js website. [nodejs.org](https://nodejs.org/en)

Follow these simple steps to set up your Next.js project:

### Step 1: Creating a Next.js App
**Open Your Terminal:** Access your command line or terminal.
**Create Your Project:** Run the following command:
`npx create-next-app@latest my-next-app`

Here, my-next-app is the name of your new project. You can name it whatever you like. Here we'll follow app-router folder structure.

### Step 2: Navigating to Your Project
Once the installation is complete, move into your new project folder:

`cd my-next-app`

### Step 3: Running Your Development Server
Start your development server with:

`npm run dev`

Now, your Next.js application is running! You can view it at **http://localhost:3000** in your browser.

### Step 4: Building Your First Page
Next.js uses a file-based routing system. The pages inside the pages directory automatically become routes.

- Open the app/page.tsx file in your code editor. This is your homepage.
- Modify the content and save the file. Your changes will instantly update in the browser.

### Step 5: Adding More Pages
To add a new page, simply create a new directory in the app directory. For example, you need to create a about page- create a 'about' directory, then inside the created directory create a page.tsx/jsx file.

### Deploying Your Next.js Project
When you’re ready to share your project with the world, you’ll need to deploy it. Platforms like Vercel (from the creators of Next.js) and Netlify offer easy deployment solutions for Next.js applications.

Congratulations! You’ve just set up your first Next.js project. Next.js makes it incredibly simple to build and deploy scalable, modern web applications. With your new project up and running, you're well on your way to exploring the vast capabilities of Next.js and React.
Aspectos Importantes para uma Pessoa Desenvolvedora Sênior
Published: 2024-01-24 17:59:46


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tuvba2akk1xi6752uav4.png)
Se tornar uma pessoa desenvolvedora sênior não apenas implica uma proficiência técnica avançada, mas também requer habilidades interpessoais, adaptabilidade e um compromisso contínuo com o aprendizado. Aqui estão alguns aspectos importantes que destacam o papel fundamental de uma pessoa desenvolvedora sênior:

**1. Proficiência Técnica:
**
- Uma base sólida em linguagens de programação e stacks relevantes é crucial. A capacidade de resolver problemas complexos e liderar tecnicamente é fundamental.

**2. Comunicação Eficaz:
**
- A habilidade de se comunicar de forma clara e regular, tanto com colegas de equipe quanto com clientes, é essencial. A comunicação eficaz contribui para negociações bem-sucedidas e para o entendimento claro dos requisitos do cliente.

**3. Liderança Inspiradora:
**
- Líderes técnicos eficazes motivam suas equipes, promovem um ambiente de aprendizado contínuo e demonstram entusiasmo mesmo diante de desafios.

**4. Orientação para o Negócio:**

- Compreender profundamente os objetivos e metas do negócio é crucial para tomar decisões informadas, priorizar o desenvolvimento e agregar valor real aos stakeholders.

**5. Manutenção de Atualização Constante:**

- O aprendizado contínuo é essencial. Participar de conferências, cursos online, ler blogs, contribuir para projetos de código aberto e experimentar novas tecnologias garantem que a pessoa sênior esteja sempre atualizada.

**6. Negociação Habilidosa:**

- Habilidade para negociar prazos realistas, resolver conflitos de forma construtiva e adaptar-se a mudanças nos requisitos é fundamental para o sucesso do projeto.

**7. Foco no Cliente:**

- Atender às necessidades do cliente vai além do desenvolvimento técnico. Compreender as expectativas, antecipar necessidades e proporcionar uma experiência positiva são essenciais.

**8. Mentoria e Desenvolvimento de Equipe:**

- Uma pessoa desenvolvedora sênior deve orientar e desenvolver membros juniores da equipe, promovendo uma cultura de aprendizado e crescimento.

**9. Gestão de Projetos Eficiente:**

- Gerenciar recursos, prazos e orçamentos eficientemente. A habilidade de avaliar e mitigar riscos é crucial para o sucesso do projeto.

**10. Adaptação e Inovação:**

- Ser adaptável a mudanças no mercado e na indústria é essencial. Incentivar a inovação dentro da equipe contribui para a evolução constante.

Ao equilibrar esses aspectos, uma pessoa desenvolvedora sênior pode desempenhar um papel fundamental no sucesso de projetos, no crescimento da equipe e na criação de soluções impactantes para os desafios da indústria de desenvolvimento de software.
Fauna database functions: Server-side data functions
Tags: nosql, database, webdev, productivity
Published: 2024-01-24 18:59:26

The move from traditional RDBMS to NoSQL databases brought many advantages but also led to losing some critical features, one example is stored procedures. Cloud services like AWS Lambda and Azure Functions have attempted to fill this gap but often fall short in proximity to data, consistency, and regional constraints. Fauna's document-relational database model addresses these challenges by reintegrating stored procedure-like functionality directly within the database, negating the need for external services and their associated complexities for **some use cases**, but not all.

Fauna’s server-side functions enhance data operations by running application code close to the data, akin to stored procedures, but with enhanced capabilities. These functions are type-checked only once upon creation or update, reducing the overhead in repeatable operations and ensuring faster execution. This approach not only streamlines code deployment across database replicas but also significantly reduces the need for region-aware programming. By embedding business logic within functions, Fauna enhances performance, minimizes transmission overhead, and simplifies application architecture.

In addition, Fauna's functions can bolster security and schema enforcement by enabling you to restrict direct database, collection, or document access, allowing only function-based interactions. Functions can be managed through Fauna’s Schema Language (FSL), which can be version-controlled alongside application code. This encourages developers to reconsider their approach to NoSQL databases, inviting them to explore the benefits of embedding functions and business logic close to their data as we used to, thus leveraging the full potential of Fauna's unique database architecture.

For more info on Fauna's server-side functions, check out [the docs](https://bit.ly/3OeloQY) and give functions [a try with a free trial](https://dashboard.fauna.com/).
Symfony's Component "u" for strings
Tags: symfony
Published: 2024-01-24 18:54:14

I'm discovering Symfony's Component "u". 

By setting a string as a parameter, it's converted into an object and processing can be performed. For example `u('ipsum dolor sit amet')->title(true);` returns `"Ipsum Dolor Sit Amet".`

https://symfony.com/doc/current/components/string.html
The Global Game Jam 2024
Tags: gamedev, globalgamejam, renpy
Published: 2024-01-24 18:29:07

Hello to my fellow developers, testers, and writers! I am participating in the Global Game Jam this week, specifically this weekend here in Maine, USA at the Bangor, Maine maker space. My boyfriend, my friends, new friends I haven't met yet, and I will all be getting together to build a video game in 48 hours. 

## What is the Global Game Jam? 

[The Global Game Jam](https://globalgamejam.org) is a worldwide challenge that goes on for one week in over 130 countries. Groups of developers, visual artists, musicians, writers, and illustrators get together to make a video game in 48 hours. We must all follow the theme that is handed out at the beginning of the week, and we must collaborate together. What an epic challenge!

## So What Are You Going to Do? 

My boyfriend Xavier (better known as the producer SpagettX) and I are driving up to Bangor, Maine to participate in this year's Game Jam this upcoming weekend. We'll be packing our two big dogs into the Subaru and going up to a hotel near [the maker space](https://bangormakerspace.org) where the Jam is going to be hosted. [Check out the official jam site!](https://globalgamejam.org/jam-sites/2024/bangor-makerspace-hybrid-jam) 

### How Will You Make Your Game? 

Since I am a developer that's comfortable with Python and we want to do an episodic multi-choice story game, I'm going to be using RenPy to make the game this weekend. [RenPy is an excellent Python based game engine](https://www.renpy.org) that will allow me to write a story quickly and simply. I can also create menus, add images, and create character variables.

Kelsey is a visual artist, so she will be creating the visuals for our story. SpagettX will set the mood with music for our story. I can't wait to see who else is in our group that will be a part of making the game! 

## Join me!

I've never done anything like this before but I love to create and I love telling a good story. So when Kelsey invited me to do the Global Game Jam, I couldn't resist. I'm going to blog about the experience here, and share what it's like to start using RenPy from nothing and making a game in 48 hours! 

It's not too late to be part of a Game Jam in your local area. Just [click through the locations](https://globalgamejam.org/jam-sites/2024) and join one of the Jams. Please don't forget to [add me as a friend](https://globalgamejam.org/users/cococreates) if you are in a Jam also! 

## Wrap Up 

See you soon, friends! I wish you all the luck this week with your game creation! 

--- 

Coco is a writer and developer living in Portland, Maine with her two big dogs and a cat. She has been writing stories, books, poetry, essays, reviews, and opinions her whole life. And probably more. Check out her [linktree](https://linktr.ee/youcancallmecoco) or her [writing portfolio](http://cocopo-codes.github.io).
Looking for your first easy open-source contribution? 🤔 Contribute to Frontend History! 📕
Tags: opensource, vue, javascript
Published: 2024-01-24 18:47:19

Many people would like to make their first contributions to open source, but sometimes it's not easy to find a repository that matches their skill level with current issues 🤔.

If you would like to help open source and make your first ever contributions, I would love to see your pull requests on my new project [Frontend History](https://frontendhistory.com/).


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

**How can you help?** Frontend History is a calendar showcasing the most important events in the history of frontend development. It's not that easy to keep track of everything happening now and document everything from the past. I would really appreciate it if you could add some new events! 🙏🏻

Please visit the [GitHub repository page](https://github.com/michalkuncio/frontendhistory) and see how you can contribute! 🎉
The Best Piece Of Advice I Was Given About Coding Interviews As A Junior Developer And How It Helped Me Land My First Job
Tags: webdev, beginners, interview, advice
Published: 2024-01-24 18:42:57

In 2017, I was **failing** all my coding interviews.

I wanted to land a job at a high-tech company. So, I would spend hours practicing on _LeetCode_. Still, I would fail to solve any new problem or, worse, fail at problems I've already solved before.

Until one day, a **Google** software engineer said to me:

## "You can't succeed without first understanding Data Structures & Algorithms."

That day, my whole life changed.

I realized that, indeed, he was right. Since I didn't have a proper CS degree, I wasn't comfortable with data structures like _trees_, _priority queues_, or algorithms like _DFS_ (Depth-First Search), _BFS_ (Breadth-First Search), etc.

So I decided to pick up a book: _**"Introduction to Algorithms, MIT Press"**_ and go through it during my entire holiday break.

This was another AHA moment. After reading this book:

- I could finally make sense of `big O` notation

- I could solve a ton of problems with `DFS`, `BFS`,...

- etc.

I also realized that there were some common patterns for solving problems. Thus, just learning one opened the door to solving multiple challenges.

As a **result**, I was able to:

- pass several interviews at companies like Bloomberg, Yelp

- get a job offer at Pinterest, where I actually had to solve a _tree_ problem 🤣

- and more importantly, land my current job

——

Thank you for reading this post 🙏.

Leave a comment 📩 to share the best piece of advice you received as a developer.

And Don't forget to Drop a "💖🦄🔥".

If you like articles like this, join my **FREE** newsletter, **[FrontendJoy](https://frontendjoy.substack.com/)**, or find me on [X/Twitter](https://twitter.com/_ndeyefatoudiop).
🎉 **iPhone 15 Pro Max Giveaway** 🎉
Published: 2024-01-24 18:42:20


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

🎉 **[iPhone 15 Pro Max Giveaway](https://sites.google.com/view/sojibalbani/home)** 🎉

📱 **Prize**: iPhone 15 Pro Max (Specify Storage Capacity and Color)

🚀 **How to Enter:**
1. Follow us (@YourBrand) on [Instagram/Facebook/Twitter].
2. Like this post.
3. Tag 2 friends who would love to [win the iPhone 15 Pro Max](https://sites.google.com/view/sojibalbani/home).

📅 **Deadline for Entries:** [10.02.2024]

🎁 **Winner Announcement:** [12.02.2024]

🔔 **Additional Details:**
- Open to [[Specify Eligibility Criteria](https://sites.google.com/view/sojibalbani/home)].
- Multiple entries allowed (tag more friends for more chances).
- Bonus entry: Share this post in your story/feed and tag us.

👉 **Note:** This giveaway is not affiliated with Apple Inc. The winner will be chosen randomly and notified via [Direct Message/Comment]. Good luck to everyone! 🍀

#iPhoneGiveaway #GiveawayAlert #iPhone15ProMax

**[Win iphone 15 pro max](https://sites.google.com/view/sojibalbani/home)**
Set a SharePoint Site as HomeSite using PowerShell
Tags: sharepointonline, sharepoint, microsoft365, office365
Published: 2024-01-29 19:20:25

---
title: Set a SharePoint Site as HomeSite using PowerShell
published: true
date: 2024-01-24 17:53:16 UTC
tags: SharePointOnline,SharePoint,microsoft365,office365
canonical_url: https://blogit.create.pt/miguelisidoro/2024/01/24/set-a-sharepoint-site-as-homesite-using-powershell/
---

This post explains how to set a SharePoint to be your home site in a Microsoft 365 tenant using PowerShell.

## Introduction

**SharePoint Home Site**  is a feature available in SharePoint that allows you to designate a given site as a Home Site for the whole SharePoint Intranet. By doing so, the site is designated to be  **the main site**  of the Microsoft 365 tenant.

## The Code

To transform an existing SharePoint site into a SharePoint home site, run the following PowerShell script:

```

Connect-SPOService -Url https://demo-admin.sharepoint.com
Set-SPOHomeSite -HomeSiteUrl https://demo.sharepoint.com/sites/home

```

NOTE: You can only have one SharePoint Home Site.

Happy SharePointing!

The post [Set a SharePoint Site as HomeSite using PowerShell](https://blogit.create.pt/miguelisidoro/2024/01/24/set-a-sharepoint-site-as-homesite-using-powershell/) appeared first on [Blog IT](https://blogit.create.pt).
Chat With Your PDFs: Part 1 - An End to End LangChain Tutorial For Building A Custom RAG with OpenAI.
Tags: ai, tutorial, video, python
Published: 2024-01-24 17:48:57

{% embed https://youtu.be/UwgZmrRAgQ4 %}

A common use case for developing AI chat bots is ingesting PDF documents and allowing users to ask questions, inspect the documents, and learn from them. In this tutorial we will start with a 100% blank project and build an end to end chat application that allows users to chat about the Epic Games vs Apple Lawsuit. 

There's a lot of content packed into this one video so please ask questions in the comments and I will do my best to help you get past any hurdles. 

In Part One You will Learn:
- Create a new app using  @LangChain  's LangServe
- ingestion of PDFs using  @unstructuredio 
- Chunking of documents via  @LangChain  's SemanticChunker
- Embedding chunks using  @OpenAI  's embeddings API
- Storing embedded chunks into a PGVector a vector database
- Build a LCEL Chain for LangServe that uses PGVector as a retriever
- Use the LangServe playground as a way to test our RAG
- Stream output including document sources to a future front end.

In Part 2 we will focus on:
- Creating a front end with Typescript, React, and Tailwind
- Display sources of information along with the LLM output
- Stream to the frontend with Server Sent Events
- Deploying the Backend application to  @DigitalOcean  &  @LangChain 's LangServe hosted platform to compare
- Deploying the frontend to  @DigitalOcean 's App Platform

In Part 3 we will focus on:
- Adding Memory to the  @LangChain  Chain with PostgreSQL
- Add Multiquery to the chain for better breadth of search
- Add sessions to the Chat History

Github repo
---
https://github.com/focused-labs/pdf_rag
The Impact of Juice WRLD's Merch on His Legacy and Fanbase
Tags: fashion, lifestyle, love, trend
Published: 2024-01-24 17:47:33

Juice WRLD, born Jarad Anthony Higgins, was a talented rapper and songwriter whose impact on the music industry continues to be felt even after his untimely death in 2019. Beyond his musical contributions, **[Juice Wrld Merch](https://juicewrldmerch.co/)**  left behind a powerful legacy that extends to his merchandise. This essay explores the profound impact of Juice WRLD's merchandise on both his legacy and fanbase, delving into the cultural significance, economic aspects, and the emotional connection fostered through his unique approach to merchandising.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wmf29m9u4fz9wzs22ajd.jpg)
NestJs에서 TypeORM을 사용하여 MySQL 연동, 2024-01-25
Tags: nestjs, mysql, typeorm
Published: 2024-01-24 17:25:04

project에서 사용하기 위해 설치
```
npm i @nestjs/typeorm typeorm mysql2
```

src/app.module.ts

TypeOrmModule 추가

```
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TypeOrmModule } from '@nestjs/typeorm';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: 'localhost',
      port: 3306,
      username: 'root',
      password: '',
      database: '',
      entities: [],
      synchronize: true
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
```

type : 사용할 데이터베이스 종류
host, port : 데이터베이스의 호스트와 포트번호
username, password : 데이터베이스의 유저네임과 비밀번호
database : 사용할 데이터베이스(생성이 필요)
synchronize : 엔터티와 데이터베이스 테이블을 자동으로 동기화 여부 지정, 개발모드에서만 사용

_참조:https://blog.naver.com/ashah29/223195669977_
Síncrono vs Assíncrono
Tags: developer, development
Published: 2024-01-24 17:10:51

A programação síncrona e assíncrona são dois paradigmas fundamentais que influenciam a forma como os programas lidam com a execução de tarefas e a comunicação entre diferentes partes do código. 

**Síncrono:**
_Na programação síncrona, as operações são executadas uma após a outra, de forma sequencial. Quando uma tarefa é iniciada, o programa espera até que ela seja concluída antes de passar para a próxima. Isso significa que o fluxo de controle do programa é bloqueado até que a operação atual seja finalizada._

```
public class ExemploSincrono {

    public static void main(String[] args) {
        System.out.println("Início do Programa");

        // Executa a operação síncrona
        operacaoSincrona();

        System.out.println("Fim do Programa");
    }

    public static void operacaoSincrona() {
        System.out.println("Início da Operação Síncrona");

        // Simula uma operação demorada
        for (int i = 0; i < 5; i++) {
            System.out.println("Executando passo " + i);
        }

        System.out.println("Fim da Operação Síncrona");
    }
}
```

**Assíncrono:**
_Na programação assíncrona, as operações podem ser executadas em segundo plano sem bloquear o fluxo principal do programa. Isso permite que o programa continue a executar outras tarefas enquanto aguarda a conclusão de operações demoradas._

```
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

public class ExemploAssincrono {

    public static void main(String[] args) {
        System.out.println("Início do Programa");

        // Executa a operação assíncrona
        CompletableFuture<Void> future = CompletableFuture.runAsync(() -> operacaoAssincrona());

        // Realiza outras operações enquanto aguarda a conclusão da operação assíncrona
        System.out.println("Realizando outras operações");

        try {
            // Aguarda a conclusão da operação assíncrona
            future.get();
        } catch (InterruptedException | ExecutionException e) {
            e.printStackTrace();
        }

        System.out.println("Fim do Programa");
    }

    public static void operacaoAssincrona() {
        System.out.println("Início da Operação Assíncrona");

        // Simula uma operação demorada
        for (int i = 0; i < 5; i++) {
            System.out.println("Executando passo " + i);
        }

        System.out.println("Fim da Operação Assíncrona");
    }
}

```


Bom, é isso, pessoal. Foi um exemplo simples de síncrono e assíncrono, com teoria e um pouco de código em Java na prática. Abraço a todos e até a próxima.
Extending ClientID/Secret Expiration Date using PowerShell
Tags: security
Published: 2024-01-29 19:20:05

---
title: Extending ClientID/Secret Expiration Date using PowerShell
published: true
date: 2024-01-24 16:55:55 UTC
tags: Security
canonical_url: https://blogit.create.pt/miguelisidoro/2024/01/24/extending-clientid-secret-expiration-date-using-powershell/
---

This post explains how to extend a Client ID / Client Secret pair using PowerShell.

## Introduction

By default, a Client ID / Client Secret pair is only valid for 1 year. This post explains how to extend a client/secret using PowerShell, without the need for you to create a new Client ID / Client Secret pair.

## The Code

```

#Client ID
$clientId = '0E03B46D-F2ED-4571-BAA4-79DB79227D41'

Connect-AzureAD
 
#Get the Client ID
$App = Get-AzureADServicePrincipal -All $true | Where-Object {$_.AppId -eq $clientId}
 
#Get the Current Expiry Date
$CurrentExpiryDate = (Get-AzureADServicePrincipalPasswordCredential -ObjectId $App.ObjectId).EndDate
Write-host "Current Expiry Date:"$CurrentExpiryDate

#Extend the validity of the App by 1 year
$StartDate = Get-Date
$EndDate = $StartDate.AddYears(1)
New-AzureADServicePrincipalPasswordCredential -ObjectId $App.ObjectId -StartDate $StartDate -EndDate $EndDate



```

The post [Extending ClientID/Secret Expiration Date using PowerShell](https://blogit.create.pt/miguelisidoro/2024/01/24/extending-clientid-secret-expiration-date-using-powershell/) appeared first on [Blog IT](https://blogit.create.pt).