teleren/devto huggingface dataset:
Cómo instalar WSL en Windows 10. Rápido y conciso
Tags: wsl, linux, windows, powershell
Published: 2022-01-11 06:38:45

*Mi computadora es una laptop HP Envy x360 Convertible*
## Paso 1. Verifica si la virtualización está habilitada/activada.

- Entra a **«Administrador de tareas»**. Oprime la tecla de windows y escribe "administrador de tareas", das enter a ese programa y espera.
- Una vez abierto al Administrador de Tareas das click en la pestaña que dice **«rendimiento»**, estando allí, posiciónate en **CPU**, en la parte inferior en una lista de información buscaras donde diga **«Virtualización: .....»**. Verifica que a un lado diga «Habilitado».
- En caso de que diga deshabilitado, revisa el Paso 3 de este escrito antes de realizar Paso 2.
  

## Paso 2. Abrir Powershell como administrador
Es importante que abras este programa como administrador pues de otra forma no te dejará instalar WSL.

- En la terminal de Powershell escribe `wsl -l -o`. Esto devolverá una lista con las distribuciones que puedes instalar.
- Luego, sólo instala la distribución de tu preferencia, usando el comando `wsl --install -d <nombre la distribución>`.
  
Ejemplo: `wsl --install -d Ubuntu-20.04`
- Se descargará automáticamente desde Windows Store la aplicación de esa distribución. La instalación se ejecutará, puede tardar unos minutos, sólo espera.
- Al finalizar la instalación, cierra Powershell, luego reinicia tu computadora.
- Por último, inicia la aplicación de la distribución linux que se descargo, y listo, el resto depende de ti(username, password, etc.).
  

## Paso 3. Habilitar la virtualización. Esto se hace desde la BIOS.

La manera segura para hacer esto es con un "inicio avanzado".
  
- Entra a **«Configuración»** y da click en **«Actualización y seguridad»**.
- Luego, te posicionas en **«Recuperación»**.
- Ahí, busca la opción de **«Inicio avanzado»** y das click.
- Espera un momento, te aparecerán una pantalla azul con más de una opción. Tú debes elegir la que diga **«Solucionar problemas»**.
- Te aparecerá otra pantallas azul con más opciones. Tú debes elegir la que diga **«Opciones avanzadas»**.
- De nuevo te saldrá una pantalla azul con más opciones. Tú debes elegir la que diga **«Configuración de firmware UEFI»**.
- Confia en estos pasos ;).
- Llegará un momento en que te aparezca un menu y te pedirá usar teclas para acceder a cada opción. Busca en ese menu **«BIOS Setup»** o algo con BIOS y accedes con su correspondiente tecla.
- Lee bien, pues la misma BIOS te indica las teclas para realizar cada cosa.
- Ya que entres a la BIOS, desplázate con las teclas que la BIOS te indica. Busca la opción de **«Virtualización»** o **«Virtualization»** en caso que tu BIOS esté en inglés.
- Das enter y cambias para **Habilitar/activar** la virtualización.
- Por último salva y sal. Lee bien pues la misma BIOS te indica las teclas para realizar cada cosa.
- Se iniciará normal tu computadora y prosigues con Paso 2.


En realidad puedes hacer el Paso 2 y luego Paso 3. Lo que sucede es que al abrir la aplicación de la distribución linux te saldrá un error, y pues deberás hacer Paso 3.

Saludos y que tengas un buen día.
Backend Cocepts
Published: 2022-01-11 06:36:34

Today we will talk about a few backend concepts
CRUD 
Create, Read, Update and Delete are the four basic functions of continuous storage. These procedures are usually referred to using the acronym CRUD. Within a database each of these processes maps instantly to a sequence of declarations, however, their relationship with a RESTful API is slightly more complex.
CRUD is frequently used for anything connected to a database and designing the database. Software developers can’t bring anything accomplished without CRUD procedures. Website product, for example, utilizes REST (Representational State Transfer), which is a superset of CRUD operated for HTTP aids.
On the other hand, CRUD stands simply essential for end-users. Without it, things like registering on websites, writing blogs, or bookmarks would be impossible. Most applications we operate let us add or complete the latest entries, explore for living ones, make modifications to them or delete them.
JWT
JSON Web Tokens (JWT) is a JSON-encoded declaration of a suit or claims that can be transferred between two parties.
The reality lies someplace in between: the importance of utilizing JWT depends on your use case and project requirements.
A JWT is an instrument to confirm the proprietor of some JSON data. It’s an encoded, URL-secure string that can include an endless quantity of data (unlike a cookie) and is cryptographically signed.
When a server accepts a JWT, it can ensure the data it holds can be trusted because it’s marked by the original. No middleman can change a JWT once it’s sent.
It’s critical to note that a JWT ensures data license but not encryption. The JSON data you keep into a JWT can be seen by anyone that intercepts the token because it’s just serialized, not encrypted.
For this cause, it’s positively suggested to utilize HTTPS with JWTs (and HTTPS in general, by the way).
JWT is an incredibly reasonable technology for API authentication and server-to-server authorization.
Express js
Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. It is an open-source framework developed and maintained by the Node.js foundation.
How to read file from test resources in java unit test
Tags: java, testing, codever, snippets
Published: 2022-01-11 06:16:44

Use the **`getClass().getClassLoader().getResourceAsStream()`** to get an `InputStream` for the wanted resource. In the following snippet we access the `bookmark-example.xml` file resource, which is placed directly in the  `src/test/resources` folder:

```java
@Test
void shouldUnmarshallXmlToJava() throws JAXBException {
    JAXBContext jaxbContext = JAXBContext.newInstance("dev.codepal.bookmark");
    final var jaxbUnmarshaller = jaxbContext.createUnmarshaller();

    InputStream inStream = getClass().getClassLoader().getResourceAsStream(
            "bookmark-example.xml");

    JAXBElement<Bookmark> o = (JAXBElement<Bookmark>)jaxbUnmarshaller.unmarshal(inStream);
    Bookmark bookmark = o.getValue();
    assertThat(bookmark.getTitle(), equalTo("CodepediaOrg"));
}
```

> Shared with :heart: from [Codever](https://www.codever.dev/snippets/605d86a3cfab4d6247615acf/details). Use :point_right: [**copy to mine**](https://www.codever.dev/snippets/605d86a3cfab4d6247615acf/details) functionality to add it to your personal snippets collection.
Project : Car's Company Website
Tags: javascript, css, php, database
Published: 2022-01-11 06:00:41

Hey Guys! 
I want to know how my project looks. u can Comment your opinios and if u like it please do mention it.

**About** : It is a Car's Company Website which showcases the info about their different models and individual specifications of products.describes the dynamic features of the models.you need to login inorder to access the site.

**Languages** : CSS , bootstrap ,PhP ,My SQL.
**Webiste** : [SuperWheels](https://superwheels9.000webhostapp.com/login.php)
**GitHub** : [Github Link](https://github.com/Uday-GIT-hub/superwheels)
These cryptocurrencies combined have given returns of over 2,400% in 2021
Published: 2022-01-11 05:55:04

<p>While crypto investors expected that the month of December will see some decent jump in crypto, but nothing like this happened. After touching, it's All-Time High (ATH) on 10th November, Bitcoin will see a lot of declines has been found.</p>
<p>Even amid such an upsurge, from the beginning of 2021 till now, a lot of cryptocurrencies have made very good returns to their investors. According to data from Coinmatrics, there are 35 cryptocurrencies that have given an average return of 2,400% this year.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1641844170969/DL8-jRduy.png" alt="https___bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com_public_images_62b1d980-a9fb-4b30-a238-94bb6a583dcc_1436x1216.png" /></p>
<p>On top of this comes the name of Axie infinity, which is a Play To Earn Blockchain game that has given a tremendous 17,213% returns this year, same category Blockchain gaming project Sandbox has also given 13,832% returns.</p>
<p>Matic, which is working on Ethereum's Layer 2 Solution, has given 12,133% to its investors. Investors' eyes are very much on Matic as it is contributing hugely to scaling Ethereum and right now Matic is also working on many projects. It is working, due to which the investor expects it will increase further.</p>
<p>During so many difficulties, the world's largest cryptocurrency, Bitcoin, did not anger people too much, from the beginning of this year to the end, Bitcoin has given a return of 62%, while the second number cryptocurrency Ethereum has given a return of 433%.</p>
<p>As awareness is increasing among people about NFT, DeFi, its biggest advantage will be the leader cryptocurrency of this category, Ethereum. Everyone is eagerly waiting for Ethereum 2.0. With its arrival, Ethereum's network will see a lot of booms, and people will get rid of the high gas fees and its slow transaction speed.</p>
<p>Its developers are working on Ethereum 2.0, it is expected that it will be completed by 2022, after which there will be no one to compete with Ethereum.</p>
<h2 id="heading-disclaimer">Disclaimer</h2>
<p>Do not invest your money in any cryptocurrency without doing your own research, as you will find many crypto projects that will lure you to give you high returns, but you should not invest money anywhere without doing research.</p>
Integration Server support for AMQP with providers (Azure Service Bus and RabbitMQ)
Tags: webmethods, integration, esb
Published: 2022-01-13 12:42:59

---
title: Integration Server support for AMQP with providers (Azure Service Bus and RabbitMQ)
published: true
date: 2022-01-11 05:25:18 UTC
tags: webmethods, integration, esb
canonical_url: https://tech.forums.softwareag.com/t/integration-server-support-for-amqp-with-providers-azure-service-bus-and-rabbitmq/254392
---

### Overview

Integration Server supports JMS over AMQP by using Apache QPID client libraries. We can connect with 0.x and 1.0 protocol with the limitations of unsupported features (based on providers)

```
  * MessageSelectors are not supported.
  * Temporary destinations are not supported.
  * Transacted/distributed transactions are not supported.
  * Volatile topic subscriptions not supported
  * One to many session -> consumer not supported

```

and there might be many based on the provider.

> **Warning** : While creating a JMS connection alias in Integration Server, consider unchecking the “Create Temporary Queue” option as JMS over AMQP doesn’t support temporary destinations. Without this the connection might get into a hung state and will always show as “In Progress”.

> **Recommendations** : Frequent polling sometimes introduces issues with Azure Service Bus sessions, and those bad sessions will have a side effect on both client and server as the consumers will continuously trying to reconnect, so consider increasing the primary and secondary thread polling intervals in Integration Server.

> Tune the following AMQP properties correctly as per the need  
> jms.prefetchPolicy  
> amqp.idleTimeout

> Having a short idle timeout will have frequent connection refresh, so I would recommend to change the default idle timeout.

> The documentation says it officially supports 0.x protocol version and uses the 0.x version JNDI content factory class as a default value for the JNDI template for QPID AMQP 0.x, where as the upcoming release will also add the support for 1.0 protocol

Check out the [full article](https://tech.forums.softwareag.com/t/integration-server-support-for-amqp-with-providers-azure-service-bus-and-rabbitmq/254392) in the Software AG Tech Community to learn about the different JNDI configurations for AMQP protocols and the step by step of the RabbitMQ Setup.
How to add your new project to GitHub in 10 easy steps
Tags: github, git
Published: 2022-01-11 05:17:06

Okay, I am fairly new to GitHub. And initially, I used to struggle a lot with adding my local projects to GitHub. 
I created a cheat sheet, so here it goes.

---

#####0. Pre-requisites:
Git on your local machine
[Here] (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) is a neat article to help with that.

#####1. Create new repository on github. 
Do not initialize .gitignore or readme at this point.

#####2. In your project root folder, create a .gitignore file. 
In this file, add all the folder and the file extensions that you wouldn't want in the remote repository. 
The following is an example .gitignore for a java project.

```
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

#folders
logs/
target/

#other
*.classpath
*.project
*.settings
*.pdf
```



#####3. Initialize local repo
In your local, navigate to the project folder from your favorite command prompt 
`git init -b main`

#####4. Add all files from your project to your local
`git add .`

#####5. See the status of changes in local
`git status`

#####6. Commit to local
`git commit -m "commit message"`
*On a side note, it's a great practice to keep committing to your local in small increments. That way, if you see that a code change is breaking and don't know which line did that, it's easy to revert back to a stable version.*

#####7. Specify the remote repo for current local repo
`git remote add origin https://github.com/username/repo`

#####8. Add files from local to remote
`git push origin main`

#####9. Add a README.md file in github repo.

#####10. In case you want to update local from remote
`git pull origin main`

That's it, you did it :)
Day 3 of 100 -Java: What to learn?
Published: 2022-01-11 05:14:19

I am planning to take the help of courses to supplement my study:

Udacity courses:
1. Object Oriented Programming - https://classroom.udacity.com/courses/ud283
  - Inheritance
  - Collections
  - Project

2. Java Basics - https://classroom.udacity.com/courses/ud282
  - Variables and Data types
  - Control flow and conditionals
  - Functions
  - Loops
5 Big Mistakes Companies Make When Testing Software
Tags: testing, performance, codequality, discuss
Published: 2022-01-11 04:40:28

Most software companies struggle with releasing quality code that doesn't break critical user workflows.

Companies invest significant dollars in testing their product to counter this but often ship a P0 bug anyway.

Here are 5 root causes for software bugs.

### #1 Inconsistent Testing Environments

A common mistake and often a harder one to fix during the nascent phases of software.

Naturally, if the pre-production environment never hits an edge case that can occur in production, it is impossible to validate enhancements accurately.

> **Thought:** _Deploy a snapshot of the production environment as a pre-release environment._


### #2 Backwards Incompatibility

Engineering teams write code to work in the "present" and the "future", making version testing hard. Software should not be forward-facing.

Example: Release #1 deploys software with a v1 dependency, and release #2 now uses a v2 version of the dependency. This change is non-idempotent - we wipe out a variable value by storing only the latest state. 

What happens to the deployed state that works with a v1 dependency? Does it break or work with the new release?

> **Thought:** _Always support X states of existing data. Streamline rollbacks._


### #3 Treating Infrastructure and Microservices Separately

As more folks campaign for infrastructure as code, we move towards automating infrastructure deployments.

But does a change in automation break existing infrastructure?

> **Thought:** _Can backward compatibility testing solve this problem?_


### #4 Ignoring the Network

Assuming the network behaves the same irrespective of time and region is a recipe for software failure.

> **Thought:** _Can Edge Testing gauge pre-release software inconsistencies?_


### #5 Testing Features in Silos

With the microservices architecture, a change in one service can cause a failure in unrelated user functionality. Testing a new release in a silo for a fixed subset of features doesn't help.

> **Thought:** _Replay tests for all critical user workflows for every release to generate an accurate failures heatmap._

Let me know if you've solved any of these mistakes and how.

Until later! :)
AtlasHackathon: Ecommerce Store (A Web App using Nuxt.js, Express, MongoDB Atlas)
Tags: webdev, javascript, atlashackathon, vue
Published: 2022-01-11 04:26:59

[Instructions]: # (To submit to the MongoDB Atlas Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
[Note]: # (Please make sure the project links to the appropriate GitHub repository, and includes the [Apache-2 permissive license](https://www.apache.org/licenses/LICENSE-2.0)  and README.)
This project is a e-commerce store built using Nuxt.js as front-end, and Express as backend. This project is created to participate in the MongoDB Atlas Hackathon.


### Submission Category: 

[Note]: # (E-Commerce Creation, Prime Time, Action Star, Automation Innovation, or Choose Your Own Adventure)
E-commerce Creation


### Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)
{% github https://github.com/nickypangers/mongodb-hackathon %}

[Demo](https://mongodb-hackathon-nickypangers.vercel.app/)

### Technologies Used

- Nuxt.js, Tailwind
- Node.js + Express
- MongoDB Atlas

### Additional Resources / Info

I have implemented MongoDB Atlas Search for the Product Search Bar, Product Catalog, and Order Search Bar.

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

The Refine Search Section from the screenshot above uses MongoDB Atlas Text Search to search for products with similar names of the query string, as well as displaying products that are within the price range.


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

The Search Bar shown above also uses MongoDB Atlas Text Search to search for both product names and categories. As you can see, when searched for "shoes" category, only products from that category were displayed.

### Deployment

- Vercel for front-end hosting
- Heroku for back-end hosting
SWE books catalog
Tags: atlashackathon
Published: 2022-01-11 04:18:02

### Overview of My Submission

A web application that lists software engineer books in which users can search by title, description, or author

### Submission Category: 

E-Commerce Creation

### Link to Code

{% github https://github.com/zsobral/book-store %}

### Additional Resources / Info

https://book-store-eewbr.mongodbstitch.com/

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x7utaqootq84zweytmiw.png)
Whoops! Ruby just Crashed in Rails
Published: 2022-01-11 04:12:35

This is more of a PSA than anything.

I have a legacy app I'm not ready to upgrade to Rails 7 yet. Ruby 2.7.5 and Rails 6. Suddenly it started to crash on the first request to the server. Like the Ruby callstack crash, the big one.

**If this happens to you**, make the **coffee-rails gem** the first thing you look at. I removed the gem from Gemfile, re-ran bundler, commented out the references to coffeescript files in application.js, and started the Rails server.

After two days of head-scratching, Bingo! It worked. (Minus the missing JavaScript, of course.)

Then I used [decaffeinate](https://github.com/decaffeinate/decaffeinate) to quickly convert those coffeescript files into vanilla JavaScript and uncommented their references in application.js.

I hope this helps someone.
Integer Overflow and Underflow in Solidity
Tags: solidity, smartcotract, ethereum, security
Published: 2022-01-11 03:59:24


##What do overflow and underflow mean?

In simple words, overflow is a situation when uint (unsigned integer) reaches its byte size. Then the next element added will return the first variable element.

Let’s say we have a uint8, which can only have 8 bits. That means the largest number we can store is binary 11111111 (in decimal 2^8 - 1 = 255)

Look at the code below.

```
uint8 balance = 255;
balance++;
```

If you execute the code above the "balance" will be 0. This is a simple example of overflow. If you add 1 to binary 11111111, it resets back to 00000000.

In case of underflow, if you subtract 1 from a uint8 that is 0, it will change the value to 255.

Now I show you a simple implementation of underflow in Solidity. 
Let's create a simple smart contract called "ChangeBalance.sol". We're going to use Solidity 0.7 for this example because Solidity 0.8 was secured.

```
pragma solidity 0.7.0;

contract ChangeBalance {
    uint8 public balance;

    function decrease() public {
        balance--;
    }

    function increase() public {
        balance++;
    }
}
```

![Integer Overflow and Underflow in Solidity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfzc4uprstpif796mlnk.jpg)

Let's compile and deploy the smart contract. As you can see the initial balance is 0.


![Integer Overflow and Underflow in Solidity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v184tceguzakvj5ydsnr.jpg)

If you press the "decrease" button, then the "balance" is decremented by one. Let's see what happen next.


![underflow in solidity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zt0sgxcnd5gadojocd3.jpg)

As you can see the updated balance is now 255.

##How to avoid overflow and underflow in Solidity?

The easiest way is to use at least a 0.8 version of the Solidity compiler. In Solidity 0.8, the compiler will automatically take care of checking for overflows and underflows.

Let me show you how it works in practice. To do that I will change the compiler version and deploy a new contract.

```
pragma solidity 0.8.0;

contract ChangeBalance {
    uint8 public balance;

    function decrease() public {
        balance--;
    }

    function increase() public {
        balance++;
    }
}
```

Initial balance is the same, i.e. 0. 


![underflow in solidity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4n4glzumw1ck2l0xz6z4.jpg)

Let's see what happened when we hit "decrease". Now you will get an error in the Remix console.


![underflow in solidity
](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h03hewgfwryudz3zzunm.jpg)
Connect time out error in pip install opencv
Tags: opensource, python, discuss
Published: 2022-01-11 03:58:53

Hello everyone, appreciate if you could you share your thought on how to resolve the following issue: when executing "pip install opencv-python" in Python 3.9.2, error message pops up as: "After connection broken by 'connect time out error', 'connect to pypi.org time out'  ". Thanks
Interview With Facebook
Published: 2022-01-11 03:26:06

# Round 1 Interview
1. Introduce your most challenging project in last 12 months.
2. Coding.

https://leetcode.com/problems/binary-search-tree-iterator/

https://leetcode.com/problems/k-closest-points-to-origin/


The coding questions are pretty simple actually, I was not doing that good.