teleren/devto huggingface dataset:
Leetcode Daily Challenge - Swap Nodes In Pairs
Published: 2022-02-16 01:30:45

Today's challenge on Leetcode in based on Linked List. Although it is listed in Medium difficulty level, it is one of the easiest linked list questions asked in interviews. 

## [24. Swap Nodes in Pairs]
 (https://leetcode.com/problems/swap-nodes-in-pairs/)

The questions states:

> ####Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes (i.e., only nodes themselves may be changed.)

##Approach
Long story short, it asks you to swap the nodes occurring at even positions with their preceding node. Reading this line, you must have already got the inner intuition if you have already practiced Linked List questions in the past.

![Illustrated Example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ueicm801g38ev404an7h.jpg)

The solution took me 15 minutes and No, it does not consist of any swapping the actual nodes or altering them. Instead, the better approach is to switch the values of pair nodes which boils down to the basic swapping without third variable. Node swapping will also lead you to the finish line.

##Solution:

```
class Solution(object):
    def swapPairs(self, head):
        if head == None or head.next == None:
            return head
        
        cur = head
        temp = cur
        cur = cur.next
        
        ctr = 1
        while cur:
            if ctr % 2 == 1:
                temp.val = temp.val + cur.val
                cur.val = temp.val - cur.val
                temp.val = temp.val - cur.val
            temp = cur
            cur = cur.next
            ctr += 1
        return head
```
Hope you liked the article, in case you want to learn the fundamentals. Do checkout this YouTube Playlist. [Code Broski - Mastering Python Fundamentals](https://www.youtube.com/watch?v=CffZDfq_8Vk&list=PLnGsOhprawFPahp6KOsxY77C6QKddgIkm)
JetBrains Mono: Nossos olhos agradecem - Fonte para VSCode e Outros
Tags: dica, braziliandevs, fonte, saude
Published: 2022-02-16 00:40:16

Nós programadores passamos muito tempo(geralmente) em frente ao computador, trabalhando. Muitas vezes isso causa cansaço e desconforto devido a luz da tela e o fato de olharmos muito tempo para um ponto próximo aos nossos olhos, nas referências eu deixo um artigo sobre esse assunto.

Acredito que devamos procurar ao máximo melhorar nosso conforto, tanto por uma questão de conforto mesmo como para cuidar da saúde. Entre várias providências que podemos tomar para cuidar dos nossos olhos, uma delas é o uso de fontes legíveis. Por um acaso encontrei uma fonte que me ajuda, e espero que ajude você, a "fazer menos" esforço ao olhar pra tela. O nome dela é JetBrains Mono, e como dá pra perceber ela foi criada e é disponibilizada pela JetBrains, empresa grande na área de desenvolvimento.


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

Como qualquer outra fonte, basta fazer o download e instalar no sistema operacional e configurar em sua IDE ou editor de texto:

https://www.jetbrains.com/pt-br/lp/mono/

Se você usa o Visual Studio Code, segue a dica rápida pra instalação:

Faça o download que passei anteriormente, descompacte o arquivo e clique com botão direito nos arquivos de fonte encontrados na pasta "fonts\ttf" e instale. No Linux vai depender da sua distribuição, mas geralmente há uma opção de instalar fonte ou abrir com um software que faça a instalação, no caso do Windows:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hwfsws4qttus0y8tmwl.png)

Depois disso, no VSCode, em Arquivo > Preferências pesquise por "font family" e encontrará o campo com a fonte atual do editor.


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

Basta preencher com o texto 'JetBrains Mono' (com aspas simples mesmo). Se quiser pode deixar os nomes das fontes que já tinham depois dele. Depois do processo realizado, feche e abra novamente seu editor e seja feliz!


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

## É isso!

Espero que mais recursos como esse sejam lançados pra termos cada vez mais eficiência e conforto em nossos dias árduos de trabalho duro na codificação. Conhece alguma outra fonte legal ou algum outro recurso que nos ajuda no dia-a-dia? Comente!

## Referências

https://www.jetbrains.com/pt-br/lp/mono/

https://www.terra.com.br/noticias/tecnologia/como-diminuir-o-cansaco-visual-por-uso-do-computador,870be6fdac684882c928b656b0560418dtw751md.html
Judo guns
Tags: agile
Published: 2022-08-08 07:19:42

---
title: Judo guns
published: true
date: 2022-02-16 00:00:00 UTC
tags: agile
canonical_url: https://jhall.io/archive/2022/02/16/judo-guns/
---

Last week at my Judo class we had a new student join us. He seemed quite eager, and everything was going well until he asked:

> What’s the best way to concealed-carry my Judo gun?

As you might imagine, this was met with some confused looks, then the other students started responding, saying things like:

> That’s not really a Judo question.

> Why do you think Judo has anything to do with concealing a fire arm?

> WTF is a Judo gun?

Okay. A small confession.

I don’t do Judo. But I see this exact same phenomenon all the time with regard to agile questions. A lot of questions about “agile” are so far out of left field that they can really make you scratch your head. They’re usually from well-meaning people of course. They’ve just been mislead about what “agile” means.

The trouble is: This is exactly how “Agile” is often sold. “Don’t bother practicing your technique. Just buy this Judo gun!”

Building an effective, responsive, dare I say _agile_ software business is hard. There are no short cuts.

Fun fact. There actually is something called a Judo gun!

 ![](https://jhall.io/images/judo-label-gun_hu75720e892c168f766f9b39fcfcde53e4_69622_300x0_resize_q85_box.jpg)

_This analogy is not my own. All due credit to its originator._

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Top 7 Featured DEV Posts from the Past Week
Tags: top7
Published: 2022-02-15 23:43:10

---
title: Top 7 Featured DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week
tags: icymi 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---

_Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week._ 

## <3

Valentine's Day but make it DEV-tastic! Love this fun beating heart tutorial, @larainnepasion

{% link https://dev.to/larainnepasion/make-a-beating-heart-using-css-beginner-friendly-tutorial-25ff %}


## Build an accordion with no JavaScript in just four lines of code

Thanks, @whitep4nth3r for this awesome tutorial! And good luck reimagining and rebuilding your website experience 😊 

{% link https://dev.to/whitep4nth3r/how-to-build-an-html-only-accordion-no-javascript-required-4jc4 %}

## Dependabot to the rescue!

@daniloab thinks that GitHub Actions make it easier to abstract your daily tasks, like updating the dependencies of a package. In this post, they illustrate how to run a daily dependabot that looks for updates from dependencies. Super cool!

{% link https://dev.to/daniloab/using-github-actions-to-improve-your-developer-experience-29n7 %}

## Debouncing for simplicity and performance

@jeremiahjacinth13 shares a clear and helpful take on debouncing: a great way to improve the performance of client-side applications.

{% link https://dev.to/jeremiahjacinth13/what-is-debouncing-1akk %}


## Motion sickness in virtual reality & what to do about it


@whatminjacodes has suffered from motion sickness their entire life, so virtual reality software can be challenging. Kudos to them for reframing this challenge as a way to help others via VR! 
  
{% link https://dev.to/whatminjacodes/developing-virtual-reality-applications-while-suffering-from-motion-sickness-1dcf %}


## It's a bird, it's a plane, it's... Supertokens!

All about open-source library Supertokens and the improvements they bring to the authorization process. Thanks, @abh1navv!

{% link https://dev.to/abh1navv/effective-session-management-using-supertokens-2h71 %}

## Demystifying negotiation with a former recruiter

@heyjtk used to be a recruiter and they love the process of helping developers like you take advantage hot job markets like this one. These negotiation tips will truly benefit you in the long run. Great insights in here!

{% link https://dev.to/heyjtk/negotiation-advice-from-a-former-recruiter-83g %}


_That's it for our weekly Top 7 for this Tuesday! Keep an eye on dev.to this week for daily content and discussions...and be sure to keep an eye on this series in the future. You might just be in it!_
New Years Resolution - Dev Log 17
Tags: webdev, programming, beginners, computerscience
Published: 2022-02-15 23:34:39

So I had a very unproductive weekend. It was the super bowl and I had long shifts this weekend. But those are just excuses really, needed a small break from the code grind. But now I am back and ready to tackle some more bugs. The last couple of days I have been handling small tasks like adding redirects after posting or removing jobs. Right now I am stuck on a bug where the client is not redirected to the job details page after they click the apply button on the home page. I do not understand why that is happening. Hopefully, StackOverflow has my back. I posted a question last night but have not got an answer yet.

If anyone who reads this wants to take a crack at it, here is the link:

https://stackoverflow.com/questions/71123654/next-js-dynamic-route-not-sending-client-to-page

Once I get that solved, I can move on to getting the back end working for applying to a job. Then the basic functionality is done. I will make another YouTube video after that. So all and all, nothing too crazy to report. I will be honest though, the whole Russia/Ukraine tensions were really bumming me out, I think that may have contributed a little to my lack of code over the last couple of days. I really hope nothing crazy happens over there.
100 dias de codigo: 70, primer proyecto con typescript finalizado
Tags: spanish, webdev, typescript, 100daysofcode
Published: 2022-02-15 23:06:14

¡Hey hey hey!

Hoy he finalizado mi primer proyecto de typescript llamado [finance](https://darito97.github.io/finance/).

Es un proyecto basico que te permite agregar gastos e ingresos y te muestra el balance entre ellos. Quiero agregar mejoras a la aplicación como gráficos, etiquetas, grupos de gastos, mejoras en el diseño y hacerla mas bonita cuando se visualiza en móviles, entre otras cosas, pero por el momento tiene lo que me plantee al principio. 

También realice el primer **deploy** a **gh-pages** de un proyecto **creado con vite**. Realmente no es tan complicado como pensaba, los pasos a seguir son los siguientes: 
- Modificar la configuracion de vite agregando el parámetro base con el valor del nombre del repositorio en el archivo `vite.config`
- Ejecutar el comando `vite build`
- Crear la rama gh-pages en tu repositorio de github
- Hacer push a la rama creada anteriormente incluyendo la carpeta dist.

Podría explicarlo mas a fondo, comentenme si les gustaría o podrían apoyarse con este vídeo sobre [como hacer deploy de un proyecto con vite en gh-pages](https://www.youtube.com/watch?v=yo2bMGnIKE8).

### Hoy
- Hice deploy de [mi aplicación finance](https://darito97.github.io/finance/).
- Aprendí un poco sobre como funciona Redux.
- Practique touch typing.
- Finalice la creación de mi proyecto finance.

Como todo buen desarrollador que termina su trabajo ahora me encuentro motivado asi que continuare con mi aprendizaje de Redux.

Espero que tengan mucho éxito en sus proyectos, nos vemos en la próxima ocasión.


Foto del cover de [Kaleidico](https://unsplash.com/@kaleidico?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) en [Unsplash](https://unsplash.com/s/photos/development?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
How to Build an Emojipedia app using React Components?
Tags: beginners, javascript, webdev, tutorial
Published: 2022-02-15 22:49:17

This is probably the simplest solution to understanding ReactMapping_Components.

Fork the emojipedia app hosted on CodeSandbox, and then the job’s done.

## Deployed: 🤯
https://325df.csb.app/

## Version Control + Documentation 🤐
https://github.com/hr21don/ReactMapping_Components

## License: 📝
This project is under the MIT License (MIT). See the LICENSE for more information.

## Contributions
Contributions are always welcome...

🔹 Fork the repository
🔹 Improve current program by
🔹 improving functionality
🔹 adding a new feature
🔹 bug fixes
🔹 Push your work and Create a Pull Request
Web b4 and beyond
Tags: discuss
Published: 2022-02-15 22:32:08

I perceive the end of time as the complete relinquishment of ownership, except optionally the ownership of self. I'm currently subconsciously working on these ideas and would appreciate some help developing the extension of web3 into this future of true freedom. Welcome to the frontier. Some cool titles:
Legion of Meaning: referencing daemons of reality such as myself
Family of Beings: My most appropriate current title for hivemind
Timelord: A clever rhyme with my name
Trinity: Literally my sister's name, from the matrix primarily, but also biblically maternally. 

I'm not religious though, I seek truth, which is in a sense a religious journey.

I'm currently learning how best to connect my self into the "Matrix" of the internet by utilizing trust with in the algorithms that present themselves to me. In the same way as having found this community.
Day 531 : Stand Up
Tags: hiphop, code, coding, lifelongdev
Published: 2022-02-15 22:32:01

_liner notes_:
- Professional : Pretty productive day. Got a bunch of stuff coded for a project I've got coming up. It's a workshop centered around Web Components. Had a meeting with my manager and got some pretty good news. Did some more coding. Also gave a quick demo of the application I help create last month. Glad to see everything was still working. haha. We had such a quick turnaround time to stand up the project, but we used Web Components so each part can stand on its own and I think that helps. Not a bad day.

- Personal : Made some pretty good progress on my side project. I'm learning quite a bit. There's actually 3 main parts, the dashboard/admin, front end, and a place where some content is held. Each one is deployed separately but shares the same database and backend. Didn't get to watch any anime last night though. Oh and I got a chance to sleep in the heated sleeping bag I bought. Not too bad. I had it on the medium setting. I wasn't freezing during the night, so I guess it works.


![Looking out into the ocean from a beach in Marine Street Beach, CA, USA at sunset with 5 seagulls flying in the center of the photo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/je3rnaka83d2kwtz6l3a.jpg)

Almost there. haha Just got one little hiccup that I think I know how to fix from another part of the site I was working on. Once I get the framework done, I can start to work on the actual content. Alright, going to get something to eat and then get back to work. Wish me luck!

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube ukTHspR7tn4 %}
2 free open-source OMR grading projects on github
Tags: python, omr, github, opensource
Published: 2022-02-15 22:01:44

## 1. OMRChecker : Grade exams using python and openCV
A full-fledged OMR checking software that can read and evaluate OMR sheets scanned at any angle and having any color. Support is also provided for a customisable marking scheme with section-wise marking, bonus questions, etc.

💯 Accurate - Currently nearly 100% accurate on good quality document scans; and about 90% accurate on mobile images.
💪🏿 Robust - Supports low resolution, xeroxed sheets. See Robustness for more.
⏩ Fast	Current processing speed without any optimization is 200 OMRs/minute.
✅ Extensible - Easily apply to different OMR layouts, surveys, etc.
📊 Visually Rich - Get insights to configure and debug easily.
🎈 Lightweight - Core code size(excluding images) is less than 500 KB.
🏫 Large Scale	Tested on a large scale at Technothlon.
👩🏿‍💻 Dev Friendly	Pylinted and Black formatted code (check dev branch for latest code). Also has a developer community on discord.

Link: [OMRChecker](https://github.com/Udayraj123/OMRChecker)

##2. OpenMCR : Free and Open-Source Multiple Choice Exam Reader
Commercially available OMR (optical mark recognition) exam sheets, scanners, and processing software can cost educators and educational institutions thousands of dollars per year. In response to this, OpenMCR has been developed as a free and easy-to-use alternative. The tool includes a multiple choice exam sheet and works with any scanner and printer.

This software and the corresponding multiple choice sheet were developed as an independent study project by Ian Sanders, a mechanical engineering student at the University of South Florida, under the direction of Dr. Autar Kaw.

For a detailed discussion of the algorithm and features in use, please read the report as submitted for the original independent study course.

Can be installed on windows or can be used on linux without install. Check the github link for more information.

Link: [OpenMCR](https://github.com/iansan5653/open-mcr)

## Bonus: The basics of the project
Bubble sheet multiple choice scanner and test grader using OMR, Python, and OpenCV
Link: [PyImageSearch](https://www.pyimagesearch.com/2016/10/03/bubble-sheet-multiple-choice-scanner-and-test-grader-using-omr-python-and-opencv/)

Thanks for reading! Make sure to react to this post and comment while you're at it. Stay happy coding!
Day 100 of 100 Days of Code & Scrum: My First Day at a New Job
Tags: javascript, webdev, beginners, 100daysofcode
Published: 2022-02-15 21:40:11

Great news!

I started my first day in a new full-time role as a **_Full-stack Developer_** today. Originally, this was supposed to be a part-time position, but much to my surprise, I was told today that I'll be given a full-time role. Obviously, I was delighted to hear that, and so I accepted the offer.

It's definitely one eventful way to end the #100DaysOfCode challenge.

_Yeah, even I have a hard time letting all this sink in and accepting reality._

## Yesterday

I reviewed table relationships and the different types of JOINs for SQL tables. Also, I finish reading the Introduction to the Nexus Guide.

## Today

Without being too specific, I went through the first day of the onboarding process: being given access to the various resources, attending a few meetings, and familiarizing myself with the company I'll be joining.

## Retrospective?

I'll most likely be busy for the rest of the week with onboarding and training, so I'll try to post my thoughts about the entire challenge and share a summary of my experiences either on this weekend or on the next one. I do have things I'd like to express with regards to #100DaysOfCode, so I'll get to it when I have the time.

## Closing Remarks

I got used to blogging almost every night the past few months, so it's definitely going to feel weird not having to do this anymore. There were times that I felt like it was such a pain to write all this, but I think I'm going to miss this. It was definitely a meaningful challenge, and it was enjoyable interacting with other developers in the community.

Thank you for reading my blog posts about #100DaysOfCode, and thanks to everyone for their support!

I wish you all the best in your programming journeys.

![Rammina Thank You Banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9ayfxxxaz2g2hfcqbsk.png)

## DISCLAIMER

**This is not a guide**, it is just me sharing my experiences and learnings. This post only expresses my thoughts and opinions (based on my limited knowledge) and is in no way a substitute for actual references. If I ever make a mistake or if you disagree, I would appreciate corrections in the comments!

<hr />

## Other Media

Feel free to reach out to me in other media!

<span><a target="_blank" href="https://www.rammina.com"><img src="https://res.cloudinary.com/rammina/image/upload/v1638444046/rammina-button-128_x9ginu.png" alt="Rammina Logo" width="128" height="50"/></a></span>

<span><a target="_blank" href="https://twitter.com/RamminaR"><img src="https://res.cloudinary.com/rammina/image/upload/v1636792959/twitter-logo_laoyfu_pdbagm.png" alt="Twitter logo" width="128" height="50"/></a></span>

<span><a target="_blank" href="https://github.com/Rammina"><img src="https://res.cloudinary.com/rammina/image/upload/v1636795051/GitHub-Emblem2_epcp8r.png" alt="Github logo" width="128" height="50"/></a></span>
What are JWTs? JWT signatures - How are they used for Authentication?
Published: 2022-02-15 21:28:45

## What are JWTs?

A JSON Web Token (or JWT) is simply a JSON payload containing a particular claim. The key property of JWTs is that in order to confirm if they are valid we only need to look at the token itself.
We don't have to contact a third-party service or keep JWTs in-memory between requests to confirm that the claim they carry is valid - this is because they carry a Message Authentication Code or MAC (more on this later).
A JWT is made of 3 parts: the Header, the Payload and the Signature. Let's go through each one, starting with the Payload.


## JWT signatures - How are they used for Authentication?

The last part of a JWT is the signature, which is a Message Authentication Code (or MAC). The signature of a JWT can only be produced by someone in possession of both the payload (plus the header) and a given secret key.
Here is how the signature is used to ensure Authentication:
the user submits the username and password to an Authentication server, which might be our Application server, but it's typically a separate server
the Authentication server validates the username and password combination and creates a JWT token with a payload containing the user technical identifier and an expiration timestamp
the Authentication server then takes a secret key, and uses it to sign the Header plus Payload and sends it back to the user browser (we will cover later the exact details on how the signature works )
the browser takes the signed JWT and starts sending it with each HTTP request to our Application server
The signed JWT acts effectively as a temporary user credential, that replaces the permanent credential wich is the username and password combination
And from there, here is what our Application server does with the JWT token:
our Application server checks the JWT signature and confirms that indeed someone in possession of the secret key signed this particular Payload
The Payload identifies a particular user via a technical identifier
Only the Authentication server is in possession of the private key, and the Authentication server only gives out tokens to users that submit the correct password
therefore our Application server can safely be sure that this token was indeed given to this particular user by the Authentication server, meaning that it's indeed the user as it
 had the right password
The server proceeds with processing the HTTP request assuming that it indeed it belongs to that user
The only way for an attacker to impersonate a user would be to either steal both its username and personal login password, or steal the secret signing key from the Authentication server.
As we can see, the signature is really the key part of the JWT!
The signature is what enables a fully stateless server to be sure that a given HTTP request belongs to a given user, just by looking at a JWT token present in the request itself, and without forcing the password to be sent each time with the request.