teleren/devto huggingface dataset:
High ROI Testing With Cypress Component Testing
Tags: cypress, angular, testing
Published: 2023-05-18 14:47:22

Testing is one of the most struggled topics in Angular development and many developers are either giving up testing altogether or applying inefficient testing practices consuming all their precious time while giving few results in return.

This blog post will change all this as we will cover how I overcame these struggles the hard way and conducted a set of practices for high ROI testing using Cypress component testing.

We will cover:

My testing story
Cypress vs Jest testing
The testing pyramid vs the testing trophy
The High ROI Testing Strategy
Getting started with Cypress component testing
The best way to write component tests
Writing tests for a todo app
So let’s get to it!

Read the blog post [here](https://christianlydemann.com/high-roi-testing-with-cypress-component-testing/).
Rust贯穿整个语言的”严格区分“思想
Published: 2023-05-18 14:38:30

`let mut x = 5;` 这里定义了一个可变变量，但是这里仅仅只是在一定规矩内的可变

---

#### 什么意思呢？

---

- `let mut x = 5;`其实是一种省略的写法，完整的写法应该是：`let mut x: i32 = 5;`
- `mut` 是mutable的意思，可变，但是只针对与赋值操作，也就是说`x = `后面的值是可变的
- 也仅仅是这个狭隘的含义，`mut`和`=`中间夹的类型是不可变的
- 举个列子

> 正确写法
```
let mut x = 5;
x = 6;
```
> 错误写法
```
let mut x = 5;
// 注意 字可以用单引号，字符串得用双引号
x = 'j'
```
- 综上，这里的可变只是类型固定下，值的可变；这非常的狭隘，限制的很窄；
- 这种在概念含义，和操作，编译等环节做严格区分申明的例子还非常的多，分的很细，很明确，很严格，这种思想贯穿整个语言的设计；这和Python为了开发的高效快捷，省事；从而在规矩和限制上非常的宽松随意形成了鲜明对比；
- 显然 rust 语言设计的更加的”精致“，很在意细节
Leverage Our Cutting-edge technology to get ahead of the competition
Published: 2023-05-18 14:31:26

Our vision is to build the most efficient and robust opportunity management solution, so businesses can spend less time looking for tenders and opportunities and more time applying and pitching.

Started in 2017, [Tenderbird](https://tenderbird.co.ke/) was built to help business people discover and take advantage of opportunities available to them. Based on the Founders' own experiences, many business people find it tedious and taxing, having to look for and find opportunities that they can apply for, when that is not truly their core business.

Tenderbird is designed as a web application, with an Android mobile application (in development), that will provide you the most intuitive experience in opportunity discovery.
Los Números Naturales: La Esencia de la Matemática
Tags: matematicas, spanish
Published: 2023-05-18 14:26:58

Los números naturales son la base fundamental de las matemáticas. Nos acompañan en nuestra vida cotidiana, desde contar objetos hasta realizar operaciones matemáticas más complejas. En este artículo de divulgación, exploraremos en detalle la naturaleza y las propiedades de los números naturales, así como su importancia en diversas disciplinas científicas.

## ¿Qué son los números naturales?

Los números naturales, representados por el conjunto N, son aquellos utilizados para contar y ordenar elementos de manera secuencial. Comenzando desde el número 1 y avanzando sin límite hacia números mayores, los números naturales se extienden infinitamente: 1, 2, 3, 4, 5...

Este conjunto de números tiene una serie de características distintivas. En primer lugar, cada número natural tiene un sucesor inmediato. Por ejemplo, el sucesor de 2 es 3, y así sucesivamente. Además, cada número natural, excepto el 1, tiene un antecesor. Por ejemplo, el antecesor de 5 es 4.

Los números naturales también cumplen con la propiedad de la cerradura bajo la operación de suma. Esto significa que al sumar dos números naturales, el resultado siempre será otro número natural. Por ejemplo, 2 + 3 = 5, donde 5 es otro número natural.

## Propiedades y operaciones

Los números naturales exhiben varias propiedades matemáticas interesantes. Algunas de ellas incluyen:

1. **Propiedad de orden**: Los números naturales se pueden ordenar de manera creciente, lo que significa que podemos establecer relaciones de "mayor que" y "menor que" entre ellos. Por ejemplo, 3 es mayor que 2 y menor que 4.

2. **Propiedad de cerradura**: La suma de dos números naturales siempre da como resultado otro número natural. Por ejemplo, 2 + 4 = 6, donde 6 también es un número natural.

3. **Propiedad de conmutatividad**: La suma de dos números naturales no se ve afectada por el orden en que se suman. Por ejemplo, 2 + 3 es igual a 3 + 2.

4. **Propiedad de asociatividad**: La suma de tres o más números naturales no se ve afectada por la forma en que se agrupan. Por ejemplo, (2 + 3) + 4 es igual a 2 + (3 + 4).

Además de la suma, los números naturales también se pueden multiplicar. La multiplicación de dos números naturales también da como resultado otro número natural. Por ejemplo, 2 x 3 = 6, donde 6 es un número natural.

## Aplicaciones en diferentes disciplinas

Los números naturales tienen una amplia gama de aplicaciones en diversas disciplinas científicas. Algunos ejemplos son:

- **Ciencias de la computación**: Los números naturales se utilizan en programación y algoritmos para contar elementos y realizar iteraciones.

- **Física**: En la física, los números naturales se utilizan para cuantificar y medir propiedades como la masa, la distancia y el tiempo.

- **Economía**: En el ámbito económico, los números naturales se utilizan para contar y representar cant
Numérique et accords de Paris
Published: 2023-05-18 13:50:25

J'ai été intéressé par cet article du Monde dans lequel on trouve que pour respecter les accords de Paris, il faudrait réduire les émissions de gaz à effet de serre du secteur du numérique de 7 % par an jusqu'en 2050. On y lit aussi que le rythme actuel est une augmentation des émissions du secteur de 6 % par an. On ne va pas dans la bonne direction.

- [La recherche au défi de la sobriété énergétique du numérique](https://www.lemonde.fr/sciences/article/2023/05/01/la-recherche-au-defi-de-la-sobriete-energetique-du-numerique_6171677_1650684.html) ~ (réservé aux abonné·es)

`+ 6 %`, `- 7 %`, on ne se rend pas compte mais les deux sont énormes car les courbes sont exponentielles (principe des intérêts cumulés). Pour visualiser un peu les ordres de grandeur, j'ai fait rapidement ces deux courbes qui montrent :

- le résultat de la croissance actuelle si elle est maintenue jusqu'en 2050 = multiplier nos émissions actuelles par presque 5
- le résultat de la baisse nécessaire si on commençait aujourd’hui (ce qui est loin d’être le cas) = diviser nos émissions actuelles par plus de 5

Note : l’axe vertical part bien de zéro, on doit réellement arriver bien bas si on veut respecter les accords de Paris.

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

On lit aussi dans l'article que les émissions de gaz à effet de serre ne sont pas le seul impact négatif du secteur du numérique dans la catastrophe écologique actuelle.

### Conclusion

Ça me paraît évident que :

1. Prendre des décisions stratégique en se fiant au rythme de croissance actuel du secteur du numérique n'est pas réaliste.
2. Les sociétés doivent prendre conscience du problème et agir ASAP dans la bonne direction et avec les bons ordres de grandeur.
Dart Tutorial: A Comprehensive Guide to Learn Dart Programming
Published: 2023-05-18 13:56:56

Dart is a versatile and powerful programming language that has gained popularity for its use in building web and mobile applications. It is an open-source, object-oriented programming language developed by Google. It was introduced in 2011 and has since become a popular choice for building high-performance applications. Dart combines the best features of languages like Java, JavaScript, and C# to provide a seamless development experience.

Setting up the Dart Development Environment
Before we begin writing Dart code, we need to set up our development environment. Dart supports multiple editors and IDEs, such as Visual Studio Code, IntelliJ IDEA, and Android Studio. In this tutorial, we will use Visual Studio Code, which is a lightweight and feature-rich code editor.

To set up your Dart development environment, follow these steps:

Install Dart SDK
Install Visual Studio Code
Install Dart and Flutter extensions for Visual Studio Code
Configure the Dart SDK path
2. Variables and Data Types
Variables are an essential part of any programming language. In Dart, you can declare variables using the var keyword, or you can explicitly specify the type using keywords like int, double, String, etc. Dart supports a wide range of data types, including numbers, strings, booleans, lists, maps, and more.

Declaring Variables
In Dart, you can declare variables as follows:

var name = 'John';
int age = 25;
double height = 1.75;
Data Types in Dart
Dart provides several built-in data types, including:

int for integer values
double for floating-point values
String for text
bool for boolean values
List for ordered collections
Set for unordered collections with unique elements
Map for key-value pairs
3. Control Flow and Loops
Control flow statements allow you to control the execution flow of your Dart code based on certain conditions. Dart provides various control flow statements, including conditional statements and looping statements.

Conditional Statements
Conditional statements in Dart are used to perform different actions based on specific conditions. The most commonly used conditional statement is the if-else statement. Here’s an example:

`int num = 10;

if (num > 0) {
    print("Number is positive");
} else if (num < 0) {
    print("Number is negative");
} else {
    print("Number is zero");
}`

Dart also supports the switch statement, which allows you to select one of many code blocks to be executed. Here’s an example:

`String fruit = 'apple';

switch (fruit) {
  case 'apple':
    print('Selected fruit is apple');
    break;
  case 'banana':
    print('Selected fruit is banana');
    break;
  default:
    print('Selected fruit is not recognized');
}`

Read More Tutorial Click [Here](https://techzpad.com/dart-tutorial)
How to use AWSCLI to download S3 object
Tags: s3folderdownload, awscli, aws, startwithawscli
Published: 2023-05-18 13:54:32

AWS console doesn't allows to download multiple files or folder together. This is a limitation for the AWS console. But we can use awscli to get it. This is a very small doc but good to start with.

Prerequisite:

- AWS Active Account
- AWS CLI
- IAM user with s3 list and get access


Steps:

1. Create IAM user
2. Configure AWSCLI in your local
3. Use awscli to download it.


Implementation:
**Step 1: IAM user creation**

1. Login to AWS console, go to the IAM service and create one user.
2. Make sure to add S3 specific permission with this user. For your test purpose you can give AWS managed S3FullAccess permission.
3. Once the user is created 

-        --> click on users under the IAM page 
-        --> click on the user that you created just now
-        --> click on security credentials  


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


-        --> scroll down and under access key section click on   
          create access key.

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

-        --> Save you access key and secrets key in safe place. You will not be able to find it if you missed to save.


**Step 2: Configure AWSCLI**

Please refer step 1 and 2 of the below mentioned doc to get the steps if you need it.

https://dev.to/shubhamkcloud/automate-application-deployment-into-lightsail-instance-28co


**Step 3: Use awscli to download it**

We may have different use cases of downloading a single file or a complete folder.

If you need to download a single file, use the following command.

```
aws s3 cp <s3://bucket-name>/<file_name> <local/path>
```

If you want to download complete folder, use the following command.

```
aws s3 sync <s3://bucket-name>/<folder_name> <local/path>
```


By using the above mentioned command you will be able to download S3 objects from your S3 bucket to your local system.



Thanks for reading. This is a very small blog but important one to save our time.

Cheers!
Promise: any vs race vs all in simple terms
Tags: webdev, javascript, beginners, programming
Published: 2023-05-18 13:43:22

In short:

**Promise.all**: Returns all resolved values or first rejected.

**Promise.any**: Returns first resolved or aggregated all errors

**Promise.race**: Returns first resolved or rejected

Example1:
```javascript
const promise1 = Promise.resolve("Hello");
const promise2 = Promise.resolve("World");
const promise3 = Promise.resolve("!");

Promise.all([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Success:Hello,World,!

Promise.any([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Success:Hello

Promise.race([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Success:Hello
```

Example2:
```javascript
const promise1 = Promise.resolve("Hello");
const promise2 = Promise.resolve("World");
const promise3 = Promise.reject("!");

Promise.all([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Error:!

Promise.any([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Success:Hello

Promise.race([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Success:Hello
```

Example3:
```javascript
const promise1 = Promise.reject("Hello");
const promise2 = Promise.resolve("World");
const promise3 = Promise.resolve("!");

Promise.all([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Error:Hello

Promise.any([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Success:World

Promise.race([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Error:Hello
```

Example4:
```javascript
const promise1 = Promise.reject("Hello");
const promise2 = Promise.reject("World");
const promise3 = Promise.reject("!");

Promise.all([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Error:Hello

Promise.any([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Error:AggregateError: All promises were rejected

Promise.race([promise1, promise2, promise3])
  .then((results) => console.log("Success:" + results))
  .catch((error) => console.log("Error:" + error));

> Error:Hello
```
Please do add any more scenarios you came across.

Thanks.
Using xyz.objects.get() with Q unexpectedly returns multiple objects
Published: 2023-05-18 13:35:34

Using `get()` with `Q` in Django raises `MultipleObjectsReturned`. For context this was a method I wrote at work:

```python
from django.db import models
# ...
def get_foobar(a, b):
    try:
        return Foobar.objects.get(
            models.Q(foo=a) | models.Q(bar__in=[a, b])
        )
    except DoesNotExist:
        return None
```

Which translate in SQL to:

```sql
SELECT * FROM foobar
WHERE foo = 'a' OR bar IN ('a', 'b')
LIMIT 1
```

And this works fine. Until it probably won't. To mitigate this you can instead return just the latest entry:

```python
from django.db import models
# ...
def get_foobar(a, b):
    try:
        return Foobar.objects.filter(
            models.Q(foo=a) | models.Q(bar__in=[a, b])
        ).latest("created_at")
    except DoesNotExist:
        return None
```

Or, append `distinct()`. But I wanted to return `None` explicitly so I stuck with the above.
Methods to develop an STO platform using STO software
Tags: webdev, programming, blockchain, cryptocurrency
Published: 2023-05-18 12:23:30


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


When compared to other crypto crowdfunding methods, an STO is considered an effective method for raising funds. In this method, security tokens are distributed to the investors. Real-time assets like equity and real estate, are used to back security tokens. SEC regulations must be strictly adhered to while developing a security token. Investors have more trust in STO because of the backing of assets and SEC influence.

After knowing about the STO, you might be curious about STO development methods.

Generally, an STO platform can be developed in two ways. The first method is developing an STO from scratch, but it takes more time and it is more expensive. As you might possess a unique idea, it might require many resources too. To avoid these circumstances, you can go with an alternative method. The second method is creating the STO platform using the STO software. It is considered the best and simplest approach as it is time-consuming, cost-effective, and helps with instant deployment. So, developing your STO platform with an STO script will be the best choice that helps your business go to the next level.

Additionally, multiple features that come integrated with the STO software attract many cryptopreneurs to go with it. 

Admiring Features of the STO Platform

- Outstanding STO analytics
- Utilizing smart contracts
- Various payment options
- Integrating KYC and AML
- Administrator and investor dashboards
- Integration of the STO website

So, after knowing these features, you might be excited to create STO with ready-made STO software to simplify your crypto business. right!!! The next query that comes to your mind is where to get this STO platform and how much does it [**Cost to create an STO platform?**](https://www.icoclone.com/blog/cost-to-create-best-sto-platform/?utm_source=forumCTSTOPL&utm_medium=dev.to&utm_campaign=sp)

This ready-made STO software is offered by a reputable STO development company in the crypto space. They will provide you with an enriched STO website at an affordable cost. Contact them and begin STO development right away!
Kamagra Oral Jelly Kaufen: The Affordable Solution for Erectile Dysfunction
Published: 2023-05-18 13:24:49

• It's important to flash back that ordering Kamagra Oral Jelly doesn't cover against STDs, so condoms are recommended. 
 • It should be kept at room temperature, between 15 and 30 degrees Celsius, and out of the reach of children and tykes . 
 • It's important to flash back that <a href="https://www.kamagratoday.to/kamagra-oral-jelly/"> Kamagra Oral Jelly Kaufen</a> buying Kamagra Oral Jelly isn't a hormone or an aphrodisiac. A man must first be sexually aroused for it to work. Pregnant or suckling women, children or youthful people under the age of 18 shouldn't use this product. 
 • Before you start taking any drug, including this drug, you should bandy your treatment with your GP. They can tell you if the medicine is safe for you and tell you about any pitfalls. 
 • If your construction lasts longer than four hours, you should seek medical help incontinently. This could be a precursor of a disastrous event. 
 • If, after taking Kamagra Oral Jelly, you witness casket pain, nausea, or other symptoms during intercourse, you should stop using it incontinently and seek medical attention. 

Get Best Offer to This Site>>>>>> https://www.kamagratoday.to/kamagra-oral-jelly/
HappyX web-framework
Tags: nim, webdev, happyx, opensource
Published: 2023-05-18 13:18:15

## What Is HappyX? 🤔

HappyX is a macro-oriented asynchronous web-framework written in Nim ✨

## Why HappyX? 🤨

HappyX provides one solution for all project types.
Single page applications, Static site generation, Server side rendering - you can make it easy with HappyX 🎈

## Features 🍍

- Switchable HTTP server for SSR projects 🔌
- Configurable project, routing and path params ⚙
- CLI tool for working with your projects 💻
- Hot code reloading in single page applications (and other project types in future) 🔥

## Source Code 💾

You can find source code [here](https://github.com/HapticX/happyx)
4 of the best Python modules that you should know
Tags: python, programming, beginners, webdev
Published: 2023-05-18 13:13:39

Hello everyone, Today I want to introduce 4 of the best Python modules.



**1.Numpy**

-  NumPy is a library for the Python programming language, NumPy is short for "Numerical Python" , adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. 

[Numpy](https://www.w3schools.com/python/numpy/default.asp)

---

**2.Matplotlib**

- Matplotlib is a low level graph plotting library in python that serves as a visualization utility. Matplotlib was created by John D. Hunter. Matplotlib is open source and we can use it freely. Matplotlib is mostly written in python, a few segments are written in C, Objective-C and Javascript for Platform compatibility.

[Code Base](https://github.com/matplotlib/matplotlib)
[Matplotlib](https://www.w3schools.com/python/matplotlib_intro.asp)

--- 

**3.Pandas**

- pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series. It is free software released under the three-clause BSD license.

[Pandas](https://www.w3schools.com/python/pandas/default.asp)


---

**4.Django**

- Django is a free and open-source, Python-based web framework that follows the model–template–views architectural pattern. It is maintained by the Django Software Foundation, an independent organization established in the US as a 501 non-profit

[Django](https://www.w3schools.com/django/index.php)

Thank you for reading this Article.

Like , Comment , **Subscribe**
Notetaking: On technical courses, and my personal habits
Tags: opensource
Published: 2023-05-18 13:09:36

## Notetaking 📝
The "art" of taking good, clean, and proper notes is certainly not something that I've ever done well on. However, I think I improve every day, which for me, makes it all worthwhile

## Taking notes on a technical course 🔧
Unarguably, this is the hardest part for me. The only way I've ever been taught to take notes is to copy important topics off of slideshows in middle school. This is nice and all, but it's not applicable for real world/more technical course.

It certainly gets a little bit overwhelming, as there's just such a sheer amount of information to comprehend. Thankfully, in my experience, it tends to be a lot easier to simply make connections across topics, allowing for simpler notes.

## My personal habits 📖
First, I like to outline the topic, and then come back and write more _if I need it_. If I don't, no big deal! That means that most likely, I understand the topic really well!

Next, I like to read back over my notes when I'm done with whatever video/section of lecture I just finished. This gives me an opportunity to review and make corrections, if need be.

Finally, the big question. _Do I actually study these notes?_ In short, no, not at all. I study more technical things such as "How do you remove the head of a linked list", but I really only take notes so I pay better attention the video/lecture. Don't get me wrong, I do go back and look at them for a little bit of guidance, however it's not to study them.

## My notes! 📚

Since I do want every part of my learning experience to be open source/easy to view, I'd like to share my all of my notes that I've taken on... really any topic! It's not much, but it's a nice start.

[Google Drive Link](https://drive.google.com/drive/folders/1_FNhoSv7UMz1BAdcpFTglQSF7-WTp5HE?usp=sharing) 🙂