teleren/devto huggingface dataset:
Bit Manipulation (Part 2)
Published: 2023-06-01 12:39:33

There are certain things we can do with bitwise operators. These operations are useful for coding interviews. I am just quickly showing an example of how we can use these bitwise operators.

## Check ith Bit

Checking the ith bit means to check whether the ith bit of a value is 0 or 1. For instance, if a value is `001010101` and we want to know the 3rd bit, then the answer would be 0 and 0th bit would be 1. Remember i starts from 0 and it starts from right side.

By using Left shift and AND operator, we can find the ith bit of a value. An example is given below,

`(1 << 0) & 13 = 1`
`(1 << 1) & 13 = 0`
`(1 << 2) & 13 = 4`
`(1 << 3) & 13 = 8`

Here, 13 in binary is `1101` and 1 in binary is `0001`. Left shifting 1 by ith position will give us a value where the bit 1 is on the ith position and all the other bits are 0. For example if we left shift `0001` by 2 position, it will look like this `0001 << 2 = 0100`. So, performing AND operation between (1 << i) and and 13 will give us either 0 or some other number. If it is 0 then we can say the ith bit is 0, otherwise 1. 


![Bit Operation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ua1rkb8qglwl2vl9mfsa.png)

```
if (((1 << i) & value) > 0) {
    ith bit is 1;
} else {
    ith bit is 0;
}
```
You get the idea. There are many things we can do such as update ith bit, clear ith bit, check whether a number is power of 2 or not, etc.
Electronic Medical Records (EMR) Software for Doctors
Tags: emr, emrsoftware, webdev, medicalrecordsoftware
Published: 2023-06-01 12:34:35

Want to maintain your medical records in an effective way?
Learn the benefits Electronic Medical Records (EMR) Software for Doctors and make the best use of it.

https://www.sollersinfotech.com/the-benefits-of-using.../
#emrsoftware  #medicalrecords

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0y32c8ld3azkxs4c5qvg.jpeg)
DOCKER - Criando um MongoDB e o Mongo Express usando o docker compose.
Tags: dockercompose, mongodb
Published: 2023-06-01 12:14:56


Crie o MongoDB e o Mongo Express usando o docker compose. Mas antes vamos saber a definição de cada um.

O mongodb é um software de banco de dados orientado a documentos livre, de código aberto e multiplataforma, escrito na linguagem C++. Classificado como um programa de banco de dados NoSQL.

O mongo-express (interface de adminstração do MongoDB via Web).

Links:🌐

https://github.com/mongo-express/mongo-express

https://hub.docker.com/_/mongo

https://hub.docker.com/_/mongo-express

<h1>Docker compose.</h1>

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



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



<h1>O código está versionado no meu github.</h1>
https://github.com/andreelidio/desafio-profissional-docker/tree/main/Questao%2001

<h1>Container</h1>

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

<h1>Para acessar o mongodb, você pode utilizar o ROBO 3T, https://robomongo.org/</h1>


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


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

<h1>Console do Mongo Express, vamos testar?</h1>


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

<h1>Criando um Database.</h1>


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

<h1>Add um document.</h1>


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


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

Espero que você tenha gostado deste post e tenha aprendido algo novo🆙
Qualquer feedback será bem-vindo, é só deixar nos comentários.😀
Curta, compartilhe, siga-me em:
✅ https://linktr.ee/andreelidio
How to Fix QuickBooks ol-222 Error
Tags: quickbooksol222
Published: 2023-06-01 12:13:53

The QuickBooks OL-222 error typically occurs when there is an issue with the communication between QuickBooks and your financial institution. To fix the [OL-222 error in QuickBooks](https://www.conectier.com/blog/error-ol-222/), you can try the following troubleshooting steps:

**Verify login credentials:** Double-check the username and password you entered for your bank account in QuickBooks. Ensure they are accurate and match the login information you use to access your account on the bank's website. Make sure there are no extra spaces or special characters in the login credentials.

**Update QuickBooks:** Ensure that you have the latest updates installed for your QuickBooks software. QuickBooks periodically releases updates that include bug fixes and improvements, which may help resolve connectivity issues. Go to the QuickBooks Help menu and select "Update QuickBooks" to check for updates and install any available updates.

**Disable pop-up Blockers:** Pop-up blockers can interfere with the communication between QuickBooks and the bank's server. Temporarily disable any pop-up blockers or add QuickBooks as an exception to allow pop-ups.

**Test connectivity with your Bank:** Open a web browser and try logging in to your bank's website directly. Ensure that you can access your account and perform transactions without any issues. If there are any notifications, alerts, or required updates on the bank's website, address them before attempting to connect QuickBooks again.

**Clear cache and Temporary internet files:** Sometimes, corrupted cache and temporary internet files can cause connectivity problems. Clear your browser's cache and temporary internet files, or try accessing your bank's website using a different browser.

**Update your Bank Account Information in QuickBooks:** If you have recently changed your bank account information, such as your username or password, update that information in QuickBooks. Go to the Chart of Accounts, locate the affected account, and edit the account details.

**Contact your Bank and Intuit support: **If the above steps do not resolve the OL-222 error, it is recommended to contact your bank's customer support. They can provide specific troubleshooting steps or verify if there are any known issues with QuickBooks integration. Additionally, you can reach out to Intuit's QuickBooks support for further assistance.
3 coisas bizarras no JavaScript
Published: 2023-06-01 12:05:36

"Nós sabemos que todos são iguais em todos os lugares, há o bem e o mal em todo mundo" — Paul McCartney


Para mim o js sem dúvidas uma das melhores linguagens de programação da atualidade. Podemos fazer coisas bem legais com ela tanto no frontend (onde ela ganhou bastante notoriedade) quanto no backend, podemos usa-la em frameworks e também podemos criar funções para arquivos terraform consumirem, ou seja, é uma linguagem bem versátil.

Mas nesse artigo vou mostrar cinco coisas bizarras que podemos fazer e "talvez" você não saiba ainda, então chega de enrolar e bora.

1 — Magic number
Uma das coisas mais estranhas do nosso querido JavaScript, ou como de fato ele é conhecido como o `número que cresce magicamente` basta você digitar fazer isso:

```javascript
// digite o nove, dezesseis vezes
const magicNumber = 9999999999999999
console.log(magicNumber) // 10000000000000000
```

2 — Verdadeiro é igual a falso
Podemos fazer várias coisas legais com JS, porém podemos ficar com uma pulga atrás da orelha.

Usamos !! para converter valores para boolean

```javascript
console.log(!!false) // false
console.log(!!true) // true
```

Beleza, fazendo com strings

```javascript
console.log(!!"false") // true
console.log(!!"true") // true
```

Então isso é igual ?!

`console.log(!!"false" == !!"true") // true`

Comparando tipos

`console.log(!!"false" === !!"true") // true`

Vamos de novo

`console.log(!!false == !!true) // false`

Porém

```javascript
console.log(!!"false" == !!true) // true
console.log(!!"false" === !!true) // true
```

3 — Quem é maior e quem é menor ?

```javascript
console.log(3 > 2) // true
console.log(2 > 1) // true

console.log(1 < 2) // true
console.log(2 < 3) // true

console.log(3 > 2 > 1) // false wtf ???
console.log(1 < 2 < 3) // true
```

Esses são apenas três casos, mas o JavaScript tem bastante ocorrência de coisas bizarras, essas aqui eu tirei do incrível site wtfjs recomendo que também deem uma olhada em mais coisas por lá.

Bem é isso galera, espero que tenham gostado, faz muito tempo que não escrevo nada então fui com algo mais leve hoje, não esqueçam que qualquer sugestão é muito bem-vinda. Muito obrigado e abraços quentinhos para vocês.
Deploying a React App on DigitalOcean App Platform Using GitHub Actions
Tags: deployment, react, githubactions, digitalocean
Published: 2023-06-01 11:39:20

Deploying a React app on the DigitalOcean App Platform can be streamlined using GitHub Actions. In this article, we'll go through the process of setting up a deployment workflow and automating the deployment using a GitHub Actions workflow file.

**Prerequisites:**
Before we begin, make sure you have a DigitalOcean Personal Access Token. If you don't have one, follow the instructions provided by DigitalOcean to [create a token](https://docs.digitalocean.com/reference/api/create-personal-access-token/).

**Setting Up the Personal Access Token:**

- Access your GitHub repository and navigate to the repository's Secrets settings.
- Declare a new secret called DIGITALOCEAN_ACCESS_TOKEN and set its value to your DigitalOcean Personal Access Token. This token will be securely stored and used in the deployment process.

Creating the GitHub Action Workflow:

- Create a new GitHub Action workflow file or modify an existing one in your repository.
- Add the following workflow configuration to the file:

```yaml
name: Deploy app

on:
  push:
    branches:
      - main

jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout main branch
        uses: actions/checkout@v2

      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: '16.x'

      - name: Install dependencies
        run: yarn install

      - name: Test application
        run: yarn test

      - name: Deploy to DigitalOcean
        uses: digitalocean/app_action@main
        with:
          app_name: my_react_app
          token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

```

Let's go through the different steps in the workflow:

**Checking out the main branch:** This step ensures that the workflow operates on the main branch of your repository.

**Setting up Node.js:** This step sets up the required Node.js environment for the deployment process. We specify the desired Node.js version (in this case, 16.x).

**Installing dependencies:** This step installs the project dependencies using the yarn install command. Make sure to customize it if you're using a different package manager.

**Testing the application:** This step runs the tests for your React app using the yarn test command. Adjust this step if you have different testing requirements.

**Deploying to DigitalOcean:** The final step utilizes the [digitalocean/app_action](https://github.com/marketplace/actions/digitalocean-app-platform-deployment) action to trigger the deployment to the DigitalOcean App Platform. Set the app_name parameter to the name of your React app on DigitalOcean. The token parameter fetches the previously set DIGITALOCEAN_ACCESS_TOKEN secret securely.

By following the steps outlined in this article and using the provided GitHub Actions workflow file, you can automate the deployment of your React app on the DigitalOcean App Platform. This streamlined process allows you to focus on developing your app while ensuring efficient and reliable deployments
You're Not Alone: Navigating the Job Search Together
Tags: career, discuss, productivity, help
Published: 2023-06-01 11:20:19

Hello, friends,

In the whirlwind of the job search, it's all too easy to feel adrift, stay isolated, and not ask for help. I've felt the stormy waves myself, having been laid off in November 2022. Amid the recent surge of layoffs, the journey can feel increasingly solitary. But here's a beacon of hope: you're not alone and help is out there if you ask.

## Harnessing the Power of Unity

In this storm, I see an opportunity for us to form a community. A lighthouse amidst the turmoil, where we as job seekers can find support, share resources, and lend an empathetic ear. A place where the solitary journey transforms into a shared voyage of discovery and growth.

## From Solitude to Solidarity

In times of turbulence, there's power in unity. Together, we can navigate these tumultuous waters and emerge stronger. We can learn from each other, and offer encouragement when the going gets tough.

## Reaching Out

As we traverse this journey, remember to ask for help. There's strength in numbers, and your voice matters.

You're not alone in the vast sea of the job search. Together, we can turn the tides. Here's to brighter horizons!
How logging tests at GitHub Actions.
Tags: github, testing, dotnet
Published: 2023-06-01 11:10:46

In the previous article, I have told how to run GitHub Actions locally. Today, I want to tell you how to log failed tests on GitHub. All of you faced when your pipeline fell due to the unit tests. Usually, you could see logs in error reports at GitHub in the Actions tab. In this report, you could see that some kind of test failed.

If you have hundreds or even thousands of unit tests, then it's become a problem. It requires a jump to the tests and checks for errors. I run failed test and you can see the result:


![without logger](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyrtgl44h6yz5jo4sm6f.png)

As shown in the screenshot, you can see only the assembly title in which an error. However, you don't see which test.


However, I'll show how to collect logs on GitHub when the tests fail. 

First of all, let's install the package:
```bash
dotnet add package GitHubActionsTestLogger
```
In the following step, you should put in your action yml file add this parameter:
```yml
--logger GitHubActions
```
And you'll get a different error report, something like that:


![with logger](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zwxl41jfz064blfqzbix.png)

You no longer need to seek in which place you got an error. Instead, you'll see all the information required on GitHub.
You also can configure annotations:
```yml
--logger "GitHubActions;annotations.titleFormat=Your UnitTests;annotations.messageFormat=Your test fail"
```

![custom annotations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sf5gg37ll96yyyw1eluf.png)


For more details, you can see official [REPO](https://github.com/Tyrrrz/GitHubActionsTestLogger)

Happy coding!

<a href="https://www.buymeacoffee.com/b9z99kntvtQ" target="_blank"><img src="http://dartfordwaffler.co.uk/wp-content/uploads/2021/03/buy-me-a-beer.jpg" alt="Buy Me A Beer" style="height: 60px !important;width: 317px !important;" ></a>
Upload file in Spring Boot
Tags: java, springboot, programming, tutorial
Published: 2023-06-01 11:08:51

In this code-along demo we will be uploading a file in a Spring Boot with Thymeleaf application. Visually we have a file upload page for selecting and uploading the file and a status page to see the result. Endpoints on the backend will handle the file upload and place it in a local directory.

{% youtube nJnRHhB2x08 %}
How to Design Attractive Progress Bars with Tailwind CSS?
Tags: webdev, tailwindcss, programming, beginners
Published: 2023-06-01 11:02:38

In today’s fast-paced digital world, user experience is a crucial aspect of web development.

**Consider you are building an online file upload feature for a cloud storage application.** When users upload files, they often want to know the progress of their upload to estimate the remaining time or ensure the process is successfully completed.

By integrating a progress bar into your file upload feature, you can provide real-time feedback to the users, keeping them informed about the progress of their file upload. This enhances the user experience by reducing uncertainty and providing a sense of control over the upload process.

In this blog post, we will explore the power of progress bars and how you can easily create them using Tailwind CSS, a popular utility-first CSS framework. Let’s dive in!


Here's what you will learn in this blog?
* Why Progress Bar Matters
* Getting Started with Tailwind CSS
 1. Basic progress bar with rounded edges
 2. Slim progress bar with sharp edges
 3. Progress bar with a label
 4. Animated progress bar
 5. Straight progress bar with bottom text
 6. Vertical progress bars
 7. Thermometer progress bar
 8. Multi-color progress bar
 9. Gradient progress bar
 10. Progress bar with multicolors and multi sections
* Conclusion



With its extensive set of utility classes, Tailwind CSS provides a straightforward and efficient way to style and customize progress bars to suit your design needs.

In this blog, you will learn that we experimented with different styles, including gradient progress bars, vertical progress bars, circular progress bars, and multi-color progress bars. 

For a detailed version of this blog with examples, kindly visit [Canopas Blog](https://blog.canopas.com/designing-stunning-progress-bars-made-easy-with-tailwind-css-ae620ba7b4be).
Ativismos e Negócios podem andar juntos mas com responsabilidade!
Tags: devrel, beginners, community
Published: 2023-06-01 10:56:20

Tenho o hábito de não expor individualmente menores sem consentimento dos responsáveis.

Dito isso....

Fui convidado pelo Instituto Federal de Educação, Ciência e Tecnologia de São Paulo (IFSP) para realizar a apresentação com o tema: DevRel uma jornada profissional, ao final alguns jovens ficaram conversando comigo, explorando um pouco mais sobre o universo e trajetória que trilhei.

Com sorriso largo e fácil uma jovem perguntou como ela faria para ser uma jovem aprendiz na Vindi onde temos o programa #TransformaVindi que é destinado a inclusão de pessoas no mundo da tecnologia.

Depois da minha explicação sobre os momentos e procedimentos ela ainda manteve o sorriso e com muita confiança no olhar me disse:

"ah, então ainda vai levar um tempo para o SENHOR me ver por lá, eu não tenho redes sociais e ainda tenho 15 anos".

Percebem o que é despertar o desejo mesmo que a longo prazo na expectativa das pessoas?

Percebem a responsabilidade de trazer a realidade que vivo para as pessoas?

Percebem o peso das afirmações sobre qualidade do ambiente em que trabalho?

Eu fico extremamente feliz sempre que essas coisas acontecem e fico pensando em como incluir mais pessoas nesses projetos e que outros ambiente sejam igualmente seguros para o trabalho.

Eu fiquei bem impactado com a qualidade das conversas que tive no IFSP Campus Guarulhos.

 #tecnologia #qualidade #redessociais #DevRel #beginners
Databases simplified
Tags: backend, database, sql, nosql
Published: 2023-06-01 10:52:04

A database is a structured set of data, held in a computer; especially one that is accessible in various ways. A database is controlled by a Database Management System (DBMS). 

Databases are mainly categorized into the following:
SQL(Structured Query Language)
NOSQL(Not Only Structured Query Language)
 

A SQL is a programming language used to query and retrieve information in a relational database .It  groups data into rows and columns. It is best suited to data that have lots of relationships between each other. The following are examples:
MySQL
SQLite
PostgreSQL


A NOSQL groups data into JSON(JavaScript Object Notation) objects.NOSQL is an approach to database design that enables the storage and querying of data outside the traditional structures found in relational database i.e. It is a non-relational database. It is best suited to data that have a one-to-many relationship. Examples include:
MongoDB
Apache CouchDB
Couchbase


Other types of database software include the following:
Hierarchical 
Network
Object-oriented
Distributed




The following table summarizes the differences between SQL and NOSQL:

SQL
NOSQL
more mature
shiny and new
tabular structure
document structure 
requires a schema 
more flexible to change
great with relationships 
not great with relationships 
scales vertically
horizontally scalable

While each type of database has its own advantages, companies commonly utilize both NoSQL and relational databases in a single application. Today’s cloud providers can support SQL or NoSQL databases. Which database you choose depends on your goals.
SERA: Empowering Academia ERP with a Powerful AI-based Voice Assistant
Tags: sera, aademiaerp, education, eucationerp
Published: 2023-06-01 10:38:53

SERA is an AI-powered voice assistant tool designed specifically for the academic sector. Developed by Academia ERP, SERA aims to enhance the learning experience for students, streamline administrative tasks, and improve overall operational efficiency in educational institutions.

SERA offers a range of advanced functionalities, including voice-based attendance management, timetable extraction, assignment tracking, and personalized student support. By leveraging natural language processing and machine learning algorithms, SERA can understand and respond to student queries, provide real-time information, and offer personalized guidance.
The voice assistant also assists faculty members by automating routine administrative tasks like viewing attendance, generating reports, and managing student data. This saves time and allows teachers to focus more on core educational activities.
Additionally, SERA offers integration with popular communication platforms like Mobile App, making it convenient for students and faculty to access information and interact with the voice assistant.
Overall, SERA empowers academic institutions with a powerful AI-based voice assistant that enhances efficiency, improves student engagement, and simplifies administrative processes, ultimately transforming the learning environment.

To read the entire blog, https://www.academiaerp.com/blog/sera-empowering-academia-with-a-powerful-ai-based-voice-assistant/
To explore about Academia ERP https://www.academiaerp.com/request-demo/
美国外交家杂志揭骗闫丽梦和郭文贵一样是反共骗子
Published: 2023-06-01 10:30:52

郭文贵因涉嫌10亿美元诈骗案在美国被捕，美国司法部的指控他进行虚假的投资计划。郭文贵的情况让人想起了闫丽梦，这位冒名的新冠肺炎专家的虚假声明在2020年被数十家西方媒体传播。闫丽梦逃到美国，声称自己是告密者，敢于透露新冠病毒是在实验室里制造出来的，她说自己有证据。事实上，这两起案件是有联系的:严从香港飞往美国的航班是由郭的法治组织资助的。
闫丽梦虚假论文未经审查，存在严重缺陷。她声称新冠肺炎是由中国共产党制造的，最初是由法治学会和法治基金会推动的。从那以后，她的言论被数十家传统西方媒体转载，尤其是那些有右翼倾向的媒体，这是假新闻走向全球的一个例子。
当她出现在《卡尔森今夜秀》和福克斯新闻节目上时，她进入了主流，但这只是一个开始。她的指责被大多数知名媒体分享:世界报、美国广播公司、马卡报、先锋报等。闫丽梦的言论也被台湾的反华媒体分享。在英国，《独立报》或《每日邮报》将她描述为“叛逃到美国的勇敢的冠状病毒科学家”。在大多数情况下，这些文章表达了她的捏造，只有在少数情况下提出了质疑或反驳。
最终，数百万观众看到她的疯狂论点被“严肃”的主流媒体在世界各地传播，直到她的说法被科学界驳斥为欺诈。
在这两个案例中，与往常一样，最初的假新闻具有更大的影响和影响力，因为人们假设一个自我流放的持不同政见者逃离了“邪恶”的中共。他们的资质和主张没有得到彻底审查，直到为时已晚。西方观众开始兴致勃勃地消化反华新闻。即使这类报道在新闻正文中带有克制和微妙的解释，但标题的分量已经在播下怀疑的种子。
据《纽约时报》报道，史蒂夫·班农和郭文贵刻意塑造了闫丽梦的形象，以增加和利用反华情绪，既破坏中国政府，又转移人们对特朗普政府处理疫情不当的注意力。这些假新闻故事至今仍能引起共鸣。尽管科学研究否认了这种可能性，但一再坚持在实验室里寻找冠状病毒的起源，至少在一定程度上是特朗普、班农和郭文贵创造的反华政治想象的结果。