teleren/devto huggingface dataset:
Microservices, Docker e Tecnologias de Mensageria
Tags: microservices, kafka, elasticsearch, fila
Published: 2022-02-28 02:57:15

Fala devs nesse post vou detalhar uma aplicação que criei utilizando tecnologias de mensageria (Kafka e fila(ActiveMq)) que são utilizadas para ligar aplicações independentes que se comunicam entre si, traduzindo Microservices :).
Nossa aplicação consiste num cadastro de um Usuário que sera salvo em 3 tipos de database, **ElasticSearch**, **Banco de memoria Redis** e para finalizar em um database Sql **Postgres**.
Para isso teremos 3 APIs (construídas utilizando arquitetura DDD) se comunicando entre si após a requisição do cadastro de um usuário realizada pelo front, vamos detalhar abaixo a função de cada API.
* **API de Acesso** - Essa API ira receber a requisição de um cadastro de usuário e produzir uma mensagem em um tópico **Kafka** para que a mesma seja consumida pela aplicação seguinte.

* **API Orquestradora** - Essa API recebe a mensagem produzida pela primeira API acima através de um Listener de um tópico KAFKA que estará captando as mensagem produzidas por este tópico. Apos receber a mensagem a API produz uma mensagem agora numa fila com os dados do usuário e após salva os dados deste usuário dentro do elasticsearch.

* **API ConsumerMq** - Essa API recebe a mensagem produzida pela API acima através de um JmsListener e salva este usuário dentro de um banco de dados em memoria (**Redis**), estes usuarios serao listados no front para ser analisados por um admin e ser definido se valida ou não o cadastro, sendo validado será salvo em um banco de dados Postgres e excluído do banco de memorias Redis, caso seja invalido será excluído do banco de memorias Redis apenas. 

Abaixo um simplex fluxograma da nossa aplicação.

![Fluxograma](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/66bzy9ocduqxhqcnuhzo.png)

Dito isso bora iniciar o codigo, te espero no proximo post.

[Parte 2](https://dev.to/2020nani/microservices-docker-e-tecnologias-de-mensageria-parte-2-325e)

[linkedin](https://www.linkedin.com/in/nanialmeida/)
[github](https://github.com/2020nani)
Require twitter developer api help to use with Azure AI service in React-JS application
Published: 2022-02-28 02:52:45

I would love to attend the Microsoft Azure Trial Hackathon on dev.to

I am going to use Azure ai Services and twitter developer api for the application I am going to create in it.

But the problem with this is that it does not just use the Essential api for my application, it only uses the "Elevated" or "Academic research" api.

I am also a new twitter developer almost 12 times I created an account and explained about my application and applied for it. But all I got was failure.

This match ends on March 8th. Submission of project after that will not be accepted.

Without it I would not be able to pursue this further.

If anyone has access to "Elevated" or "Academic research" api please help me. I need that api secret key temporarily until it is completely finished.

Anyone please help me.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/667qnby5r27bve34omr1.png)
![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuj7auchc9k10h9imecb.png)

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ga5lz4t387x4divw671j.png)
Please support people suffering from the Invasion on Ukraine
Published: 2022-02-28 02:47:46


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

I am from Poland. Our neighbour, Ukraine is fourth day under a heavy Putin forces attack. Please join the worldwide effort to support all the people suffering from the invasion.
How to Docker
Published: 2022-02-28 02:35:42

## What is Docker and why is it so powerful?
As described by themselves, "Docker is an open platform for developing, shipping, and running applications". Docker utilizes "containers" which basically allow for developers to work on programs and interact without the worry of personal hardware or system based issues
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2l7d4m2gwto0vd2xep1n.png)
 
As pictured above, docker provides similar functionality as a VPN, but does it in a more light weight manner. If you would like to learn more about docker and its overall functionality there is a video provided at the end of the blog

## Applying Docker to the NASA api project (In theory)

Applying Docker to our NASA projects should be similar to the newsAPI exercise, first start with cloning in your repository. From there you'll need to get access to you API key.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gqaws8rowf8p3j9qi1pl.png)
You will also need to get the link to the endpoint by opening a port then copying the link of the webpage you are directed to into the correct line.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9461w3eswil0h0qfjoz2.png)
From here, run `docker-compose up` and click port 80. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hnxx6fxbpl6wg50ybu4j.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xy112btcquy3fna4mxif.png)

assuming all of the correct information, the process should be similar to the practice problem except with the NASA api in place.

**Additional Docker info**

https://www.youtube.com/watch?v=rOTqprHv1YE
https://docs.docker.com/get-started/overview/
1st week - 100 days of code
Published: 2022-02-28 02:29:09

so, as i said, i came here to record my journey of 100 days of code. i'll restart this 😅

from the beginning...

### 1 out of 100 - 27/fev/22

today i studied java, oop, and i'm so glad that now i'm truly understanding this concept without any fear. i've been carrying this for months and now i gave my brave steps and i can make my exercises in peace 😆 same thing works for git, i was always afraid of interacting with a black window and now we are friends.



### 2 out of 100 - 28/fev/22

hello, today i focused on javascript spring boot and had such a productive time learning new things from this intriguing language and its particularity. very interesting though. i also reviewed a site of mine and was trying to fix it


##### what i learned?

* javascript
  * introduction to es6;
  * concepts;
  * currying, hoisting, immutability, 
  * variables types.

##### what i developed?

  * codes to understand how the currying and hoisting methods + variables types work;
let go your fear and open the door to your braveness and be happy
My Egg-citing Weather App
Tags: javascript, dom, api, beginners
Published: 2022-02-28 02:26:17

When my instructor at DigitalCrafts told my classmates and I that we had to build a weather app using an API, I knew that I had to **hatch a plan** to make the app functional and entertaining! There was no **yolkin' around**!

The process started with me searching the internet for images that fit **eggs-actly** what I wanted. I would use a sunny side up egg to represent sunny weather, fried egg for cloudy weather, runny yolk for rainy weather, broken egg for thunderstorm, scrambled egg whites for snowy weather, and regular scrambled eggs for all other weather conditions. 

Once I found the images, I tested the [Open Weather Map](https://openweathermap.org/api) API. I found the [Postman application](https://www.postman.com/downloads/) **eggs-tremely** helpful during this step because it allowed me to test my links by mimicking the front end.  


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

After I tested the link with my API key, I was able add the url to my code. I wrapped the url in an asynchronous function, in order to fetch data from the url and convert the data to JSON. From there, I could access specific data from the JSON object(s) by using dot notation. Then, I added the data to elements that I created in the DOM (see code snippet below). I repeated this process until I had all information that I needed for the weather app displayed on the screen.

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

Now that the app is completed, users can look up a city's weather by typing in the zipcode for the city. The daily weather will show up with the egg for the current weather, as well as the weather forecast for the next 8 days and their corresponding egg images.

**Check out the video walk through [here](https://youtu.be/3X9yLwFWr_w)!** 

If I had more time, I would add CSS for the loading page in between the zipcode search and weather information, but overall I am pretty **eggs-tatic** about how the weather app turned out! 

If you'd like to see my code, check out my [github repo](https://github.com/ciaracloud/weatherApp_SunnySideUp) (keep in mind that you will have to add your own api key for Open Weather Map API in order to test it).

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jx8lwmq0x0psjdhs4x5b.png)
Hi :)
Published: 2022-02-28 02:20:06

Hello!

My name is Milena and I'm a full-stack development student from Brazil. Nice to meet you all!

Well, I've been studying hard and lately I was thinking about where I could record my journey of 100 days of code and I remembered right meow that I have this AMAZING platform to do this. I'm here since october/2021, if I'm not wrong, and I never created a post but, I was reading and learning new things here in this period.

That's all for now! :)
Cara Merekam Layar HP Realme 8
Published: 2022-02-28 02:13:01

## Cara Merekam Layar Realme 8 Tanpa Aplikasi

Cara merekam layar pada Realme 8, ada 2 cara untuk melakukannya. Cara pertama dengan bilah notifikasi dan cara kedua dengan smart sidebar atau bilah samping cerdas yang tampil disisi layar. Untuk cara melakukannya,

**Dengan Bilah Notifikasi**

- Buka ponsel Anda dan tarik dari atas kebawah untuk membuka Bilah Notifiksi.
- Diantara ikon shortcut yang ada, pilih ikon Perekaman layar.
- Ketuk untuk mulai merekam layar.

Lihat Selengkapnya di [agandroid.com](https://www.agandroid.com/2022/02/cara-merekam-layar-realme-8-series.html)
git diff-filter
Tags: todayilearned, git
Published: 2022-02-28 02:02:55

---
canonical_url: https://waylonwalker.com/til/git-diff-fil
published: true
tags:
- til
- git
series: til
title: git diff-filter
---

Git commands such as `diff`, `log`, `whatchanged` all take a flag called
`--diff-filter`.  This can filter for only certain types of diffs, such
as added (A), modified (M), or deleted (D).

## Man page

You can find the full description by searching for `--diff-filter` in the `man git diff` page.

``` bash
--diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]
    Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (i.e. regular file, symlink, submodule, ...)
    changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters (including none) can be used.
    When * (All-or-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no
    file that matches other criteria, nothing is selected.

    Also, these upper-case letters can be downcased to exclude. E.g.  --diff-filter=ad excludes added and deleted paths.

    Note that not all diffs can feature all types. For instance, diffs from the index to the working tree can never have Added entries (because the set of paths
    included in the diff is limited by what is in the index). Similarly, copied and renamed entries cannot appear if detection for those types is disabled.
```

## Try it out

Open up a git repo and play around with this, here are some example that I played with that seemed useful to me.

``` bash
# find when any files were deleted
git log --diff-filter D

# find when all files were added
git log --diff-filter A

# only one specific file
git log --diff-filter A -- readme.md

# partial match to a single file
git log --diff-filter A -- read*

# Find when all python files were added
git log --diff-filter A -- *.py
```
Freeze Panes in Excel
Published: 2022-02-28 01:44:41

---
canonical_url: https://ironsoftware.com/csharp/excel/examples/freeze-panes-in-excel
---

Use freeze panes to lock specific rows and columns in place, allowing them to remain visible while scrolling.

If you have a large table of data in Excel, it can be useful to freeze rows or columns. This way you can keep rows or columns visible while scrolling through the rest of the worksheet.

**C#:**
```
using System.Linq;
using IronXL;
 
WorkBook workbook = WorkBook.Load("test.xls");
WorkSheet sheet = workbook.WorkSheets.First();
 
//This is how we can freeze specified amount of columns and rows.They will be visible while scrolling the screen
sheet.CreateFreezePane(2,5);
 
//sheet.RemovePane() can be used to remove this frozen pane.
 
workbook.SaveAs("CreateFreezePanes.xls");
```

**VB:**
```
Imports System.Linq
Imports IronXL
 
Private workbook As WorkBook = WorkBook.Load("test.xls")
Private sheet As WorkSheet = workbook.WorkSheets.First()
 
'This is how we can freeze specified amount of columns and rows.They will be visible while scrolling the screen
sheet.CreateFreezePane(2,5)
 
'sheet.RemovePane() can be used to remove this frozen pane.
 
workbook.SaveAs("CreateFreezePanes.xls")
```
Here is the start of my Data Science journey!
Published: 2022-02-28 01:35:07

When the pandemic hit back in 2020, I started to think about my future career more seriously. Graduated with a hospitality management degree back in 2009, I have been working in the revenue field of the hotel industry in NYC ever since. While the industry was suffering due to travel restrictions,  I worked harder than ever from home through the long-lasting days of the pandemic. Then the thought of my future started to kindle in my heart - Do I really see myself in the career path in the next 10 years? 5 years? This wasn't about the workload, job security, or the uncertainty of the industry transformation. Despite the industry's struggle, my job was pretty secure with a good salary - I was sitting in a very comfortable position and thought to myself that I could ride out easily. But the problem was more about not having enough passion and personal growth. When I look back in the last few years, I wasn't learning much outside of what my job required and there wasn't much else to learn for job-related skills. And it slowly demotivated me over time and I just happened to finally realize that during the pandemic. We only live once and there are so many other things to experience in the world, and I felt that I'm still too young to sit comfortably and not venture out.

In today's era, every business depends on data, and the data science field increases its significance in all businesses. Big data has revolutionized companies and has given them a competitive edge. Since I worked with some data in my previous role, I was more interested to learn how to explore, analyze, and draw out meaningful findings from big data. Also to gain some technical skills using different programs that can be applicable in many industries. What excites me the most is having an opportunity to learn something new and keep me challenged. Gratefully, my family has encouraged me to take the journey and I look forward to what the new experience will open the doors to. Sure, it will be a bumpy and rough road ahead but it will certainly be an invaluable journey of my life.
11ty 101
Published: 2022-02-28 01:28:26

## 11ty Hello World ##

Alright, so I was very happy with house easy this part of the process. I was able to navigate through the tutorial about making a hello world style blog, but still making sure to go through the syntax plugin highlight first. 

Here is a quick screenshot of me completing the process.

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

I then went on to run the `npx @11ty/eleventy --serve` and was pleasantly greeted with the result I was hoping for! I was prompted to open up the local host site and was show this result.


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

This was about the extent of my success with this part of the lab. I am currently trying to get my repo push to github, but to no avail. I am hoping by the time you get to the end of this lab I will have figured it out!

## Template Blogpost ##

I was able to fork and clone the repo that was suggested to us for this part of the lab. I edited the first blog post as well as editing the few minor details to make it "Gigi's blog" how fancy!


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


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


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

Once again, github my mortal enemy has failed me and I am having authorisation issue :( CURSE YOU GITHUB!!!


## HAX11ty ##

This one was by far the easiest to work through! All that was needed was to use the template and use yarn to run it. Yarn was where I ran into my biggest problem. My computer was not loving me and yarn was a big pain to get working. No worries though, I am resilient as it turn out and this is what I ended up with.


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

## Comparing HAX11ty to 11ty ##

I found the main difference was that the HAX option was a lot more user friendly. Instead of having to set up and install 11ty, the HAX option had it almost automated into the program which was a very nice addition. Overall, my experience with HAX11ty was much more pleasant.


I am going to provide a link to my github and by the time you come to grade this I am hoping that I will have everything pushed-- the github gods permitting. 



## Resources:
https://www.11ty.dev/
https://www.11ty.dev/docs/plugins/syntaxhighlight/

My [Github](https://github.com/GigiFitiany?tab=repositories)
Get A Free Rollbar Account
Tags: developers, debugging, signup, learnmore
Published: 2022-02-28 01:18:07

[Start your FREE Rollbar](https://try.rollbar.com/free-trial/) account today. Rollbar gives you 25k free events per month. Easy and quick installation. Connect Slack, Jira, Trello & more. 






Sign up with [GitHub](https://github.com/login?client_id=2b45961370b9d5a2e5a9&return_to=%2Flogin%2Foauth%2Fauthorize%3Fclient_id%3D2b45961370b9d5a2e5a9%26redirect_uri%3Dhttps%253A%252F%252Frollbar.com%252Fcallback%252Fgithub_oauth_signup%252F%253Fsource%253Dsignup%2526utm_nooverride%253D1%2526next_url%253D%25252F%26scope%3Duser%253Aemail%26state%3DeyJhY2NvdW50IjogbnVsbCwgImNzcmZfdG9rZW4iOiAiZTJhYWM1YjJkYTQyNDFlZDYwMzJhYzBiZjhiMmZkMGUwMTg0OTNjYnxhMDI5MjNiNzI4YjRiNGYwYjhiNDdmNzg5NmJlMmM4MTk0ZGFhZTUzIn0)
Comandos práticos do Git
Tags: beginners, todayilearned, git, braziliandevs
Published: 2022-02-28 01:08:27

O Git é uma ferramenta muito boa, aqui reúno alguns comandos e flags que me ajudam muito no fluxo de trabalho!

---

**Corrigir a frase do commit use a flag `--amend` para refazer o commit com uma nova mensagem**

    `git commit --allow-empty --amend`

---

**Criar um arquivo de patch para compartilhar alterações em arquivos**

    git diff > 1.patch

---

**Mover as alterações feitas no código temporariamente em um stash para mudar ou atualizar a branch**

    git stash

*Para voltar com as alterações no stash*

    git stash pop

---

**Criar um gitignore local para não commitar arquivos e pastas e não listá-los no gitignore do repositório**

*Primeiro, edite a configuração local do repositório:*

    git config --local --edit

*Depois, adicione a linha abaixo dentro da seção `[core]`*

    excludesfile=.local_gitignore

Finalmente, crie o arquivo `.local_gitignore` e adicione os arquivos/pastas que não quer commitar (inclusive o próprio `.local_gitignore`!)

---

**Listar uma linha por commit no log**
    
    git log --oneline

---

**Aplicar um ou mais commits de uma branch em outra**

    git cherry-pick

---

**Atualizar branchs e informações de:**

*todos os remotos*

    git remote update
*remoto atual*
    
    git fetch

*remoto atual e também atualizar a branch atual*

    git pull

---

**Colocar um repositório Git dentro de outro (submódulo)**

    git submodule add <url-do-repo>
    git submodule init 
    git submodule update

---

Continuo aprendendo cada vez mais como funciona cada um dos comandos acima conforme a necessidade, abaixo uma lista de referências com mais informações!

---

**Referências:**
- https://medium.com/@peter_graham/how-to-create-a-local-gitignore-1b19f083492b
- https://devconnected.com/how-to-cherry-pick-git-commits/
- https://www.atlassian.com/git/tutorials/saving-changes/git-stash
- https://stackoverflow.com/questions/5159185/create-a-git-patch-from-the-uncommitted-changes-in-the-current-working-directory
LAB4 - Aarch64 VS. X84_64
Tags: spo600, lab, assemblylangua
Published: 2022-02-28 01:04:43

Hi this is Tecca, and in this post I will be demonstrating my findings with assembly language in the AArch64, an ARM architecture, and x86_64, an x86 architecture.

The goal of this lab is to generate output like the following in both AArch64 and x86_64:

```
Loop: 0
Loop: 1
Loop: 2
Loop: 3
Loop: 4
...
Loop: 30
etc.
```
**Source code for this lab in x86_64**
```
.text
.globl  _start


_start:
	

print:  mov     $0,%r15           		/* loop index */

loop:	mov	%r15,%r14
	add	$'0',%r14
	movb	%r14b,msg+6
	
	movq    $len,%rdx                       /* message length */
        movq    $msg,%rsi                       /* message location */
        movq    $1,%rdi                         /* file descriptor stdout */
        movq    $1,%rax                         /* syscall sys_write */
        syscall

    	inc     %r15                /* increment the index */
    	cmp     $10,%r15           /* check if we're done */
    	jne     loop                /* keep looping if we're not */

        movq    $0,%rdi                         /* exit status */
        movq    $60,%rax                        /* syscall sys_exit */
        syscall

.section .data

msg:    .ascii      "Loop: #\n"
        len = . - msg
```
Result:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gc3hy3g3v65czirr51f1.png)

Moving onto AArch64 source code:

```
.text
.globl _start

_start:

        mov     x19, 0

loop:
        add     x20, x19, '0'   // Create digit character
        adr     x17, msg+6      // Get a pointer to desired location of digit
        strb    w20, [x17]      // Put digit to desired location

        mov     x0, 1           /* file descriptor: 1 is stdout */
        adr     x1, msg         /* message location (memory address) */
        mov     x2, len         /* message length (bytes) */

        mov     x8, 64          
        svc     0               /* invoke syscall */

        add     x19, x19, 1
        cmp     x19, 10
        b.ne    loop

        mov     x0, 0           /* status -> 0 */
        mov     x8, 93          /* exit is syscall #93 */
        svc     0               /* invoke syscall */

.data
       msg:    .ascii      "Loop: #\n"
       len=    . - msg
```

This is done from storing value defined from the given range into a register, an ASCII value is then converted from the value within the register.
The value ‘0’ is stored into a register, which in turn is converted into an ASCII value of 48 in decimal. After the loop incremented it to 10, the program would not print an integer character as expected, there is no associated ASCII reference for '10'. 

I've tried adding 10 to the ASCII value of ‘0’, the resulting ASCII value prints out a colon “:” instead of the expected number 10 because 48+10=58 and 58 is a ":".
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y44j4o2l4v9ia7k1dokp.png)
 
 
I'll focus on making it loop past 10 and onward in the next post.