teleren/devto huggingface dataset:
What was your win this week?
Tags: weeklyretro
Published: 2024-06-14 15:38:55

---
title: What was your win this week?
published: true
description: 
tags: weeklyretro
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lj45j9daeu40yn1r7m7a.jpg
---

Heyo!

Hope you all had a wonderful week.

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
- Watching scary movies 😱

![Zack Galifianakis flying through the sky with the caption, "Winning"](https://media.giphy.com/media/3ohryhNgUwwZyxgktq/giphy.gif)

Have a good weekend :heart:
The Art of Learning from Tutorials
Tags: tutorial
Published: 2024-06-14 15:34:19



- Watching the whole tutorial isn't important, understanding what you're watching is.
- Pay attention to understanding the concepts, not just finishing the tutorial.
- Write down key points and ideas as you go. This helps reinforce learning.
- Take breaks to think about what you’ve learned and how it applies to your goals.
- Apply what you’re learning in real-time. Doing helps solidify understanding.
- Go back to complex parts until you fully grasp them. Repetition aids retention.
- If something isn’t clear, seek out additional resources or ask for help.
- Use what you’ve learned in a project or problem. Practical application is crucial.
- Summarize what you’ve learned and explain it to someone else. Teaching reinforces understanding.

The goal is to understand and apply the knowledge from tutorials, not just to complete them.
Free Website Checker Monkey
Tags: webdev, testing, website, qa
Published: 2024-06-14 15:30:20

Keeping your website problem-free is hard. When you change something, you often don't know if something is wrong until you check every part yourself.

what if there is a virtual monkey checking your website and score it as per best practices?

So try this https://labs.checkops.com

Check sample report :https://labs.checkops.com/freerun/gx43ckcu1o
Real-Time Sentiment Analysis using PySpark and FastAPI
Tags: bigdata, spark, python, fastapi
Published: 2024-06-14 15:15:49

⏱ Real-Time Sentiment Analysis using PySpark and FastAPI

In today's landscape, many APIs, including Twitter's, often require payment for real-time streaming access.

💻 To overcome this hurdle, I've developed my own FastAPI solution capable of delivering string values akin to Twitter's API and most of the APIs. Leveraging PySpark for real-time Big Data stream analysis.

💡 The potential applications for this solution are limitless. From machine learning to sentiment analysis and beyond, Offers a versatile foundation for various data-driven tasks.

Detailed ReadMe & Code 
GitHub: [github code](https://github.com/raghavtwenty/pyspark-realtime-streaming-sentiment-analysis)
Discussion: What makes good Content on DEV Community? 🚀🌟
Tags: watercooler, discuss, community, learning
Published: 2024-06-14 15:15:19



Hello fellow dev,

I hope you are all doing great.

I've been wondering 🤔 what makes a post beneficial to the DEV community.

There are many great posts out here, but I've noticed a mix of quality.

For example; incomplete posts, some relevant ones contain grammar and punctuation mistakes, while others seem unrelated to this platform.

I acknowledge the tag for off-topic subjects, but I've noticed that some posts lack it.

How can we continuously ensure high-quality content and provide valuable experiences for everyone?

**Some points to consider:**

- What makes a post valuable and informative for you as a developer?
- What criteria would you use to evaluate a post's quality (low or high) and relevance to the community?
- How important are clarity, accuracy, and usefulness when reading content?
- Have you noticed any posts that seem irrelevant or contain grammar and punctuation errors? How do these affect your experience?
- What are other points that you have noticed, good or bad?

I look forward to your thoughts and feedback in the comment section below! 💬 🙂

I wish you all a happy weekend ahead. 🌞

**Disclaimer:**
_I am not an expert and am new to writing and contributing to this community. I aim to share, learn, and grow together while promoting better contributions. If you have any concerns about the relevance or duplication of my posts, please notify me._

_Please note that this post aims to improve the community experience and is not directed at any specific individual._
Weekly Journal :: Retro Style
Tags: productivity, career
Published: 2020-05-20 01:09:10

Like many of you, I have read my fair share of productivity and time management books. I repeatedly see many of them suggesting one habit - writing a daily journal. As soon I finish reading a book (well… sometimes even halfway through the book), I get pumped up and start writing a journal with a brand new notebook. First few days it will be rosy, then it will become like a chore and I will give up due to below reasons:

* Nothing different happens between two consecutive days
* My journal becomes boring as I end up writing similar types of things day-in and day-out.

But this time, I have decided to try something different - **weekly Journal** that too in a retrospective style. 

<h5>My journal would focus on three key areas:</h5> 

* Professional (what I achieved at work) 
* Career Growth (what new skill I learnt / learning)
* Personal (relations, exercise, healthy eating etc…) 

<h5>Journal would answer below questions:</h5> 

* What worked well during the week? 
* What didn’t go well?
* What I am going to try differently the following week?

Also, I am going to pick a day / time of the week I will most likely be free to write a journal and stick with it. Of course, with a brand new notebook :smile: 

<h4>Benefits:</h4>

* With these journal entries, I am hoping to write a more meaningful performance review at the end of the year as I have a record of what I have been doing on a weekly basis at the professional level.
* After a few weeks of writing, I could see a pattern and catch myself in areas I am not making much progress.   

<h4>Final Thoughts:</h4>

I am hoping I will stick with the habit this time as writing journal once per week is not too time consuming plus I am sure there will be something different to write about every week. 

Thanks for reading!
Updates from the 102nd TC39 meeting
Published: 2024-06-14 14:57:17

There were several items on the agenda, this post focuses on feature proposals and their progress from the 101th TC39 meeting [11-13th June 2024].

__Stage 2:__

* [Error.isError](https://github.com/tc39/proposal-is-error): `Error.isError` tests if a value is an `Error` instance, irrespective of its Realm origin.

* [ESM Phase Imports](https://github.com/tc39/proposal-esm-phase-imports): Solves the static worker module analysis problem for JavaScript, through defining suitable phase imports for Source Text Module.



* [Discard Bindings](https://github.com/tc39/proposal-discard-binding): Discard `void` bindings.

* [Iterator Sequencing](https://github.com/tc39/proposal-iterator-sequencing): create iterators by sequencing existing iterators


__Stage 2.7:__

* [Deferred Import Evaluation](https://github.com/tc39/proposal-defer-import-eval): a way to defer evaluate of a module.

* [Joint Iteration](https://github.com/tc39/proposal-joint-iteration):synchronise the advancement of multiple iterators

* [RegExp.escape](https://github.com/tc39/proposal-regex-escaping):  proposal seeks to investigate the problem area of escaping a string for use inside a Regular Expression.


__Stage 3:__

* [Promise.try](https://github.com/tc39/proposal-promise-try): an ergonomic, readable, and intuitive way to invoke a function and always get a Promise.

<hr />
<center>
[Hemanth HM](https://h3manth.com)
<center />
Generate a SSL with certbot on digitalocean droplet
Published: 2024-06-14 14:56:11

## **Install Certbot for SSL**

```

# Install python3 virtual environment
apt install python3-venv

# Create a virtual environment
sudo python3 -m venv /opt/certbot/

```

```

# Upgrade pip
sudo /opt/certbot/bin/pip install --upgrade pip

# Using pip to install certbot & certbot-nginx
sudo /opt/certbot/bin/pip install certbot certbot-nginx

# Copy the newly install certbot package
sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot

# Instructs Certbot to use the Nginx plugin to automatically configure SSL/TLS for Nginx web servers.
sudo certbot --nginx

```

Add an auto certificate renew script

```
# Run once every 2 days
echo "0 0 */2 * * root /opt/certbot/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && sudo certbot renew -q" | sudo tee -a /etc/crontab > /dev/null
```
"Explurger.app: app for travelers make your journey effective"
Published: 2024-06-14 14:46:58

[App for travelers](https://www.explurger.com/
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0krld8awvyaoz26yiuf.png)) is platform to make your travel journey effective. Using this app create your own bucket list, start your journey and make your journey a memorable . Install this app right now.
$All and $ElemMatch in MongoDB
Tags: webdev, database, mongodb, kawsarkabir
Published: 2024-06-14 14:41:52

## Using $All and $ElemMatch in MongoDB

### $all

The `$all` operator is used with arrays. Let's say you have an array field called `interests`. If you want to find documents where the `interests` include "Travelling", you can easily do that:

```javascript
// array field
"interests" : [ "Travelling", "Gaming", "Reading" ]

db.students.find({ interests: "Travelling" })  // 'students' is the name of the collection.
```

However, if you are asked to find documents where the `interests` include both "Travelling" and "Reading", how would you do that?

```javascript
db.students.find({ interests: ["Travelling", "Reading"] });
```

If you run this query, it will throw an error because this query looks for an exact match of the array `["Travelling", "Reading"]`. To find documents that include both "Travelling" and "Reading" regardless of their positions in the array, you need the `$all` operator:

```javascript
db.students.find({ interests: { $all: ["Travelling", "Reading"] } });
```

- With `$all`, the positions of the elements in the array do not matter. As long as the specified elements are present in the array, the document will be retrieved.

### $elemMatch

The `$elemMatch` operator is used for matching elements in an array of objects.

### Example:

Suppose your `students` collection has documents with a `grades` array field, where each element is an object representing a subject and a score:

```json
{
  "name": "Alice",
  "grades": [
    { "subject": "Math", "score": 90 },
    { "subject": "English", "score": 85 }
  ]
},
{
  "name": "Bob",
  "grades": [
    { "subject": "Math", "score": 75 },
    { "subject": "English", "score": 95 }
  ]
},
{
  "name": "Charlie",
  "grades": [
    { "subject": "Math", "score": 90 },
    { "subject": "English", "score": 90 }
  ]
}
```

If you want to find students who scored more than 80 in Math, you can use the `$elemMatch` operator:

```javascript
db.students.find({
  grades: { $elemMatch: { subject: "Math", score: { $gt: 80 } } }
});
```

This query will return the documents for Alice and Charlie, but not for Bob because his Math score is not greater than 80.

### Conclusion:

- **`$all`** is used to match elements in an array.
- **`$elemMatch`** is used to match elements in an array of objects, where each element needs to satisfy multiple conditions.
How Entities and Symbols are displayed in HTML
Tags: webdev, css, learning, html
Published: 2024-06-14 14:29:00

## **HTML Entities**
Reserved characters in HTML must be replaced with entities:
< (less than) = &lt;
> (greather than) = &gt;
## **HTML Character Entities**
Some characters are reserved in HTML.
If you use the less than (<) or greater than (>) signs in your HTML text, the browser might mix them with tags.
Entity names look like this:
&entity_name;
Entity numbers look like this:
&#entity_number;
To display a less than sign (<) we must write: &lt; or &#60;
Entity names are easier to remember than entity numbers.
## **Non-breaking Space**
A commonly used HTML entity is the non-breaking space: &nbsp;
A non-breaking space is a space that will not break into a new line.
Two words separated by a non-breaking space will stick together (not break into a new line). This is handy when breaking the words might be disruptive.
## **Examples**
§ 10
10 km/h
10 PM
## **Combining Diacritical Marks**
A diacritical mark is a "glyph" added to a letter.
Some diacritical marks, like grave (  ̀) and acute (  ́) are called accents.
## **HTML Symbols**
Symbols or letters that are not present on your keyboard can be added to HTML using entities.
## **HTML Symbol Entities**
Many mathematical, technical, and currency symbols, are not present on a normal keyboard.
## **Example**
Display the euro sign:
```HTML
<p>I will display &euro;</p>
<p>I will display &#8364;</p>
<p>I will display &#x20AC;</p>
The HTML charset Attribute
```
The character set is specified in the `<meta>` tag:
## **Example**
```HTML
<meta charset="UTF-8">
```
## **The ASCII Character Set**
ASCII was the first character encoding standard for the web. It defined 128 different characters that could be used on the internet:
English letters (A-Z)
Numbers (0-9)
Special characters like ! $ + - ( ) @ < >.
The ANSI Character Set
ANSI was the original Windows character set:
Identical to ASCII for the first 127 characters
Special characters from 128 to 159
Identical to UTF-8 from 160 to 255
```HTML
<meta charset="Windows-1252">
```
## **The ISO-8859-1 Character Set**
ISO-8859-1 was the default character set for HTML 4. This character set supported 256 different character codes. HTML 4 also supported UTF-8.
Identical to ASCII for the first 127 characters
Does not use the characters from 128 to 159
Identical to ANSI and UTF-8 from 160 to 255
## **Example**
```HTML
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
```
## **The UTF-8 Character Set**
is identical to ASCII for the values from 0 to 127
Does not use the characters from 128 to 159
Identical to ANSI and 8859-1 from 160 to 255
Continues from the value 256 to 10 000 characters
## **Example:**
```HTML
<meta charset="UTF-8">
```
Hash Function 256 chars
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-14 14:26:43

*This is a submission for [DEV Computer Science Challenge v24.06.12: One Byte Explainer](https://dev.to/challenges/cs).*

## Explainer

A hash function takes a key or input data and maps it to a fixed-size, uniformely distributed value (hash), later used for data retrieval. It strives to be fast, only generate one possible hash per input and make key mapping possible in near constant time.

## Additional Context

Hashes are hard to define because it has many similar concepts in the field, which are used almost interchangibly; it is especially hard not to confuse them with _checksums_ - those are interested in data integrity, not mapping. Also, results uniformely distributed is an essential property to make use of the hash value constant in time, since no hash is more probable than another from the same function.
Another important distinction is to separate general hash functions to cryptographic ones: the latter takes computational effort to make a 1 to 1 mapping to input (any one input can only be represented by one hash) and to make the original input unguessable by the hash alone, among other differences.
error: Your local changes to the following files would be overwritten by merge
Published: 2024-06-14 14:16:22


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



This error message occurs when you try to use `git merge` but there are uncommitted changes in your local repository that conflict with the incoming changes from the remote branch. Git prevents overwriting your local work without your knowledge.

Here are three ways to resolve this error and proceed with the merge:

## Option 1: Commit your local changes:

- Review your local changes in the README.md file using git diff README.md.
- If you're happy with your changes, add them to the staging area using ```git add README.md```
- Commit your changes with a descriptive message using git commit -m "Your commit message".
- Then, you can retry the merge command: 

```
git merge <branch_name>
```

## Option 2: Stash your local changes:

- This temporarily stores your local changes without committing them.
- Use git stash to save your changes.
- Proceed with the merge: 

```
git merge <branch_name>
```

- After the merge is complete, you can apply your stashed changes back using git stash pop.

## Option 3: Discard your local changes (not recommended)

- This is the least recommended option as it permanently discards your local modifications.
- Use with caution!
- You can discard changes in `README.md` with:

```
git checkout -- README.md (replaces your local version with the remote version).
```
- Then, retry the merge: 

```
git merge <branch_name>.
```


## Choosing the best approach:

- If you want to keep your local changes in README.md and integrate them with the remote branch, commit them (option 1).
- If you're unsure about your local changes and want to temporarily store them for later, stash them (option 2).
Only discard changes (option 3) if you're absolutely sure you don't need them anymore.
CSM Training In Hyderabad | CSM Training Courses | |Learnovative
Tags: csm, acsm, cspo, acspo
Published: 2024-06-14 14:11:43

We are the learning partners in your career growth journey. Our Agile and Scrum training programs (CSM, CSPO, ACSM and ACSPO powered by international certification body Scrum Alliance) not only provide you with the required knowledge, but they also help you with practical insights that equip you for career development. Our workshops are a mix of theory, case studies, activities, group discussions and simulations. We take care of your career needs starting from training, post workshop support, resume review, and mock interview support. We also provide a wide range of resources including: Videos, e-books, quizzes, webinars, meetups and many more that help you to get connected.

Our training programs are available throughout major cities of India that include: Hyderabad, Bengaluru, Chennai, Pune, Delhi, Kolkata, Gurugram.

We are also truly international, we provide our training programs outside India including: Singapore, Malaysia, Canada, Australia, Hongkong, and USA.

(https://www.learnovative.com/)

Address : Flat no- G-I, Block B Jain Srikar Auroville Residency, Hitech City Rd, Hyderabad, Telangana 500084

Timings : Monday- Sunday Open 24hrs 

phone no : 09949994949
Como recuperar arquivos perdidos no Git utilizando o VSCode
Tags: git, programming, webdev, tutorial
Published: 2024-06-14 14:00:00

O git é o sistema de controle de versão de código mais utilizado no mercado, normalmente nós programadores apenas arranhamos a superfície do que essa ferramenta é capaz. No cotidiano, costumamos apenas realizar ações simples como pull, commit, merge e push.

No entanto, o git é uma ferramenta complexa, a sua incorreta utilização pode resultar em danos como perdas de código nos quais você ainda não tivesse "commitado" no seu repositório, se isso aconteceu com você, provavelmente você ficou muito preocupado que todo o tempo investido naquele código tivesse sido jogado fora.

Se você utiliza o VScode que é um dos editores de texto mais populares entre programadores, eu fico muito feliz de te dizer que você não perdeu o seu código, nesse artigo vou te mostrar como utilizar o [Visual Studio Code](https://code.visualstudio.com) para recuperar o seu código perdido no Git.

A funcionalidade que vamos utilizar se chama "Local History", foi adicionada na versão [1.66 do VsCode em Março de 2022](https://code.visualstudio.com/updates/v1_66#_local-history).

Se você prefere o aprendizado de forma visual, você pode assistir o vídeo abaixo que foi publicado no canal do **Código ao Ponto** no Youtube.
{% youtube xTo9turfbF0 %}

## A solução

Para resolver esse problema realize os seguintes passos:

1. Digitar <kbd>f1</kbd> para abrir a paleta de comandos do Vscode
2. Pesquisar pela funcionalidade: “Local History: Find Entry to Restore”
3. Após selecionar, você deverá procurar e selecionar o nome do arquivo que você perdeu, o VsCode irá te mostrar todas as versões do seu arquivo que ele tem salvo e os horários de alterações no seu arquivo.
4. Após encontrar, basta clicar e o seu código será restaurado para a versão selecionada.

### Conclusão

O Vscode é um editor de texto sensacional, possui tantas funções e atalhos que é impossível saber tudo que essa ferramenta pode te entregar. Fiquei muito surpreso ao descobrir que o VsCode guarda o histórico de alterações dos arquivos que foram editados nele, mas que bom que ele faz isso, porque vai ajudar muito quando aquelas alterações que fizemos e não "commitamos" foram acidentalmente desfeitas.
Laravel — PHP Artisan Serve Failed
Tags: php, laravel, artisan, tutorial
Published: 2024-06-14 13:54:28



Solve error “Failed to listen on 127.0.0.1:8000 (reason: ?)” when run “php artisan serve”

**Resolution**
Access your php.ini file in your PHP version folder. If you like me are using Laravel Herd on Windows you can access using the route "%USERPROFILE%\.config\herd\bin".
Now in your php.ini change the "variables_order" value.

```
// before
variables_order = "EGPCS"

// after
variables_order = "GPCS"
```
**Alternative**
If this don't work you can also start the server with PHP start command.

```
php -S localhost:8000 -t public
```
That's it. I hope it will help you.
Error: Cannot find control with name:
Published: 2024-06-14 13:51:25

I am using Angular 18.
It is strange it cannot find first two controls in a formGroup

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


**Errors:**
Error: Cannot find control with name: 'field1'
Error: Cannot find control with name: 'field2'

Rest of field are okay and i can load data into those fields

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


**Entire component.ts**
import { Component } from '@angular/core';
import {ActivatedRoute, RouterModule} from '@angular/router';
import { FormGroup, FormBuilder, FormControl,  Validators } from '@angular/forms';
import { Book } from '../book.interface';
import { BookService } from '../book.service';

@Component({
  selector: 'app-book-edit',
  styleUrl: './book-edit.component.css',
  template: `
    <form [formGroup]="editForm"(submit)='submitTask()'>
      Field1 <input type='text' formControlName='field1'>
      Field2 <input type='text' formControlName='field2'>
      Field3 <input type='text' formControlName='field3'>
      Field4 <input type='text' formControlName='field4'>
      Field5 <input type='text' formControlName='field5'>
      Field6 <input type='text' formControlName='field6'>
      Field7 <input type='text' formControlName='field7'>
      <button type='submit'> test </button>
    </form>
        `
})

export class BookEditComponent {
  paramMap!: any;
  editForm: FormGroup = new FormGroup({});
  constructor(
    private route: ActivatedRoute,
    private bookService: BookService,
    private formBuilder: FormBuilder
  ) { }

  ngOnInit() {  
  // read query params
    this.route.queryParamMap.subscribe(
      (paramMap) => {
      this.paramMap = paramMap;
    });

    //oninit method
    this.bookService.getBook(
      this.paramMap.get('bookId'),
    
    ).subscribe((book: Book) => {
    next:
    this.editForm = this.formBuilder.group({
      field1 : [book.bookId,Validators.required],
      field2 : [book.title,Validators.required],
      field3 : [book.isbn13,Validators.required],
      field4 : [book.languageId,Validators.required],
      field5 : [book.numPages,Validators.required],
      field6 : [book.publicationDate,Validators.required],
      field7 : [book.publisherId,Validators.required],
    });
    console.log(book, 'res');
    error: (e: string) => console.error(e)
  });
  }

  submitTask()
  {
    console.log(this.editForm.value)
  }
}


Can anyone tell what am i doing wrong.