teleren/devto huggingface dataset:
Chrome features that you might not know
Published: 2021-01-23 17:53:51

How often do you use Chrome? Is it your favorite browser or your least favorite?

I personaly use Chrome the most in comparison with Firefox, IE, Safari or any other Browser.

And in the below video I kind of showed why.

https://www.youtube.com/watch?v=NbAyze3qUk8&t=2s

Do you know other cool Chrome features that help in development and testing? If so please write in the comments.
5 Projects For New Software Developer 
Tags: codenewbie, beginners
Published: 2021-01-23 17:52:33

[Note: This post does not include any affiliates link, just a free course link at the bottom]
As a new software developer, you need to step up your game and become a top-notch developer in this competitive world. To become a better software developer you need to know how to create projects that fit your client's demand and expectations. 

Some articles you might like
{% link https://dev.to/advancedsoftwareofficial/top-programming-languages-in-demand-192c %}
{% link https://dev.to/advancedsoftwareofficial/how-to-learn-a-programming-language-3k9i %}

So, to become a better developer you need to create some side projects that will help you grow as a software developer and will gain you new skills. We have this list of 5 projects that any software developer can create. Let's get started!

##1. Todo List

This is the most basic and well-known project. We choose it because a lot of tutorials will be available for you as a reference to guide you with this project. These are the main components of this project

* User Registration Page
* Login Page
* Todo List Page with Edit/Delete
* Todo Add Page

##2. Student Registry

Have an app help students of school signup to see his courses and see his grades and other relevant information. This is a medium to a large project that will take considerable time to do everything in it. So try to choose what areas you want to develop no need to do all areas.

* Student/Teachers/Parents Registration
* Course Management
* Course Registration
* Exams
* Grade Book
* Certificates
* Attendence

##3. Medical Clinic

An app for a medical clinic to help it organize its work and manage its different aspects so it works well. 

* Patient Management
* Appointments
* Stock
* Payments and Billing


##4. Company HR

An app to help manage the employees and their attendance and different aspects.

* Attendance
* Salaries
* Contact Info
* Documents

##5. Stock Management

An app to help an inventory manager manage the stock. It will provide him with the tools need to add and remove inventory.

* Inventory Management
* Stock Transactions


We hope you enjoyed this post, please Heart it and follow us.

If you a new software developer, join our free course to help you get started
https://landing.advancedsoftware.io/software-developer-guide
GraphQL ToDo List with Apollo, TypeScript and Node.js
Tags: graphql, softwareengineering, node, typescript
Published: 2021-01-24 11:52:19

---
title: GraphQL ToDo List with Apollo, TypeScript and Node.js
published: true
date: 2021-01-23 17:34:32 UTC
tags: graphql,softwareengineering,nodejs,typescript
canonical_url: https://medium.com/swlh/graphql-todo-list-with-apollo-typescript-and-node-js-3c7df333e920
---

[![](https://cdn-images-1.medium.com/max/1920/1*-FzpJ19tC1SDKktD3XybDA.png)](https://medium.com/swlh/graphql-todo-list-with-apollo-typescript-and-node-js-3c7df333e920?source=rss-269f954fad8c------2)

A simple GraphQL service example that implements a ToDo list

[Continue reading on The Startup »](https://medium.com/swlh/graphql-todo-list-with-apollo-typescript-and-node-js-3c7df333e920?source=rss-269f954fad8c------2)
Вышел GitLab 13.8 c новым Pipeline Editor, CI Lint & Validator, Deploy Boards
Tags: gitlab, pipeline, editor, ci
Published: 2021-01-23 17:26:29

Вышел GitLab 13.8 c новым Pipeline Editor, CI Lint & Validator, Deploy Boards. Коротко о фичах для DevOps на русском: [https://demops.medium.com/вышел-gitlab-13-8-c-новым-pipeline-editor-ci-lint-validator-deploy-boards-3a59bc4980b0](https://demops.medium.com/вышел-gitlab-13-8-c-новым-pipeline-editor-ci-lint-validator-deploy-boards-3a59bc4980b0)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/go55dbpy0xmo9hfj3gxk.gif) 

P.S. Medium не даёт пошарить публикацию на Facebook с ошибкой "The parameter 'href' or 'media' is required"
Azure: Taking a Web App Offline
Tags: azure
Published: 2021-01-23 17:24:40

-Create a folder named offline like this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/cmoljwkxpk43qdlbo23f.gif)

-Add an html file named App_offline.htm and put it in the folder just created.
-Open Visual Studio Code to just that folder.
-Deploy to Azure.

Done, IIS knows to display that file.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/f1numzit2hxnv2pf5xps.gif)

JWP2021
How to use Vercel Cloud Functions
Tags: vercel
Published: 2021-01-23 17:18:05

## Context

[First Read My Article on Cloud Functions to understand why you should learn about them!](https://tuts.alexmercedcoder.com/2021/1/cloudfunctions/)

## Getting Started

- Create a new folder and initiate a git repo inside of it
- in this folder create one new subfolder, api
- Create an index.html in the main folder (just something for us to deploy)

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>My Vercel Function Site!</h1>
  </body>
</html>
```

- in the api folder create a first.js with the following

```js
// Vercel Functions docs => https://vercel.com/docs/serverless-functions/introduction

module.exports = (req, res) => {
  res.json({
    body: req.body,
    query: req.query,
    cookies: req.cookies,
    hello: "world",
  })
}
```

- now commit everything, push up to github and deploy to vercel

- then to use this function the url would be...

```
https://myvercelurl/api/first
```

just to see it grab the url query try out

```
https://myvercelurl/api/first?cheese=gouda
```

Try using postman or CURL to make other types of requests like POST, PUT, DELETE

## Other Things to Know

- The req and res objects should work as they do in express.js 


- To enable cors just set the headers like so:

```js
headers: {
      "Content-Type": "application/json",
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Headers": "Content-Type",
      "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE",
    }
```

- If you are getting a cors error despite having the proper cors errors, it may be because the function is erroring
Upgrading from PHP@7.3 to PHP@7.4 on Mac
Tags: mac, php
Published: 2021-01-23 17:17:40

`brew install php@7.4`
To find the compiler just installed run sudo find / -name php
To check this is the compiler run: 
`/usr/local/Cellar/php@7.4/7.4.14_1/bin/php -v`
Add the compiler to you PATH by editing your .zshrc file (in ~/.zshrc):
`export PATH="/usr/local/Cellar/php@7.4/7.4.14_1/bin/php:$PATH"`
Make sure that the php PATH is above you composer PATH, otherwise composer will look at your Mac’s default php which is at v7.3 i.e:

```export PATH="/Users/stuardcreed/.composer/vendor/bin:$PATH"
export PATH="/usr/local/Cellar/php@7.4/7.4.14_1/bin/php:$PATH"```

run `source ~/.zshrc` to implement the changes
Promesas - Ejemplo Básico
Tags: typescript, javascript, promesas, promises
Published: 2021-01-23 17:06:37

*Las promesas son utilizadas cuando se deben ejecutar tareas a destiempo o cuando se necesita ejecutar algo después de que una tarea suceda o algún procedimiento*

- Cuando declaras una nueva promesa, se debe indicar al menos el `callback` que se quiere ejecutar con la promesa.

Nuestra promesa

```tsx
console.log('Inicio del Init');

    const promesa = new Promise(resolve => {
      resolve('Hola World');
    });

    promesa.then( res => {
      console.log(`Se imprimió el ${res}`)
    });

    console.log('Fin del init');
```

*Le estamos diciendo, si la promesa se ejecuta correctamente, llama a `resolve`.*

`res` - se recibe el `resolve` de la promesa en el `then`.

¿Cómo interactuamos con la promesa?

Tenemos que suscribirnos a ella. Eso lo hacemos con uno de los tres métodos que vienen con ella. `catch()`, `finally()` y `then`.

`then()` - Método que contendrá instrucciones a ejecutar en caso de que la promesa se ejecute con éxito.

`catch()` - Método que contendrá instrucciones a ejecutar en caso de que la promesa haya tenido un error.

`fnally()` - Método que contendrá instrucciones a ejecutar sin importar si la promesa tuvo éxito o error. Siempre se ejecutará esta parte.

Si se ejecuta el código anterior, tenemos el siguiente resultado:

```
1- Inicio del Init
2- Fin del init
3- Se imprimió el Hola World
```

Ejemplo manejando el error:

```tsx

    console.log('Inicio del Init');

    const promesa = new Promise((resolve, reject) => {

      if (true) // coloca false para ejecutar el .catch()
      {
        resolve('Hola World');
      }
      else
      {
        reject('algo salió mal');
      }
    });

    promesa.then( res => {
      console.log(`Se imprimió el ${res}`)
    })
    .catch(error => console.log('Error en la promesa: ', error));

    console.log('Fin del init');

  }
```
Do You Find Other People's Success To Be Inspiring Or Discouraging? 
Tags: webdev, codenewbie, motivation
Published: 2021-01-23 16:59:41



<h4> <i>How do you feel when you see someone has achieved something? </i> </h4>

<h4><i>How do you feel when someone tweets " I got a job" or "I got promoted"?
Or when someone posts their expensive car on Instagram? </i> </h4>

<h4><i>How do you feel when you see someone's social media is growing? Or when someone's book is doing great in selling?
etc </i> </h4>

___________
I'm gonna be honest, there was a time when I used to feel useless and envy success people; like wow how did they do it ? They're a genius, I'm so jealous! 


<i>But I don't feel like that anymore. 
Actually I find it pretty inspiring. And honestly you should too. 
It even helps me to work harder towards my goals </i>

____________

<br>

Okay first let's see why some people would feel discouraged , jealous and demotivated when they see other's achievements! 

I can only think of two reasons : 

- They don't know about the pain and struggle behind the success. 
They don't know what those successful people went through to be where they are now. 
It didn't just happen over a night, it was result hard work .
Therefore it could lead people to think they have no chance of achieving great things and feel demotivated. 

- They're simply jealous (in some cases, they're a narcissist) and think if someone achieve something it means there's no room for them, might even try to do something to ruin other's success. 
I know someone who literally would not want anyone to be in a higher level than them!
Please don't be like them! 
______________
And now let's see why you should feel inspired rather than discouraged :

- As we've already talked about, their success was the result of hard work, so if they could make it then so can you. 

- We can learn from them. 
All of those who have achieved great things are supportive and try to do everything to help us grow as well. 
You don't know how to do something? Go ask them and they'll happily help you. 

- just because you haven't achieved something <b>yet</b>, it doesn't mean you're less than them. 
They are a living proof that we can achieve great things if you believe in yourself and work hard. 

- Sometimes you might feel like your progress is slower than others and feel overwhelmed or might even feel you're left behind! 
But don't forget, they have started their journey before you and they're more experienced than you are. 
So don't worry you will get there, it just takes time. Be patient. 

__________
To summarize the article :
- You can learn from people's success
- You're moving at your own pace. 
- Don't compare yourself to others.
- Don't be a jealous narcissist. 
- celebrating people's success won't ruin your future achievements. 
There's room for everyone. 
- You know nothing about their struggles.
Flutter: Linux: Snap Desktop Icon
Tags: flutter, linux
Published: 2021-01-23 16:41:53

---
title: Flutter: Linux: Snap Desktop Icon
published: true
description: Hints for setting up an application icon for Flutter Linux Desktop apps
tags: flutter, linux
---

This blog post describes how to add an icon to a Flutter Linux Desktop app.

It is assumed that [Snapcraft](https://snapcraft.io) is being used to compile and install the app, as explained in the [Flutter documentation](https://flutter.dev/docs/deployment/linux).

## Goals

After installing the app, the app's icon should show up in the application menu.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ooxl1ri548e1p3oj7nlh.png)

Further, when the app is running, the app's icon should be in the launcher bar.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qmhhawqle7hpch8c3zm8.png)

## Snap configuration

This functionality has nothing to do with Flutter, but needs to be configured in the Snap level.

Withing the `snap` folder, create a `gui` subfolder. There create a [desktop file](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en), e.g. `succedo.desktop`. In the "Icon" row needs to be a reference to the Snap metadata.

```
[Desktop Entry]
Icon=${SNAP}/meta/gui/succedo.png
Exec=succedo
Version=1.0
Type=Application
Name=Succedo
Terminal=false
```

The icon should be placed in the same directory as the `desktop` file. It can have either PNG or SVG format. For PNG images a file size of 256x256 pixels is recommended.

## References

- https://snapcraft.io/docs/desktop-menu-icon-support
- https://github.com/flutter/flutter/issues/53229
Testing errors with Jest
Tags: testing, javascript, typescript
Published: 2021-01-23 16:56:45

I'm continuing with Jest and typescript, we already know how to expect and assert variables and objects in our code, next step is handling errors.

The Calculator has a new requirement, if the type of calculation is not +,- or / we need to throw an error.

The lest to edit the calculator class and add the following steps.

- Define array with the list of valid action.
- If the Action is not into the array throw an error.

Your code will look like:

```javascript
export class Calculator {
    static validActions: Array<string> = ['+',"-","/"];
    public static increase(value: number) {
        return value + 1;
    }
    public static generateCalcSetting(valueA: number, action: string, valueB: number) {

        if(!this.validActions.includes(action)){
            throw new Error("Invalid action");
        }
        
        let result : number;
        switch (action) {
            case "+":
                result = valueA + valueB;
                break;
            case "-":
                result = valueA - valueB;
                break;
            case "/":
                result = valueA / valueB;
            default:
                result = 0;
        }
       
  
        return  {
            valueA,
            mathAction: action,
            valueB,
            result
        }
    }
 
 }
```

Perfect, update the Calculator.test.ts and use jest matchers  toBeInstanceOf() it helps to get the type, so we need to do the following changes.
- Use try catch statement.
- call the generateCalcSettings with wrong parameters
- The catch take the return and use tobeInstanceOf and compare with type Error.
- compare the error.message toBe ('Invalid action')

Your code should look like:

```typescript
    it('should return a error if is invalid action',() => {
        
        try {
            Calculator.generateCalcSetting(1,'M',5);    
        } catch (error) {
            expect(error).toBeInstanceOf(Error);
            expect(error.message).toBe('Invalid action');
        }

    })
```

Run our tests and get the results 

```bash
dany@dany:~/Desktop/calculator(master)$ npm run test

> calculator@1.0.0 test /home/dany/Desktop/calculator
> jest

 PASS  src/tests/Calculator.test.ts
  Calculator
    ✓ should return a number (1 ms)
    ✓ should increment the number (1 ms)
    ✓ should return a calculation Object logic (1 ms)
    ✓ should return a error if is invalid action (1 ms)

Test Suites: 1 passed, 1 total
Tests:       4 passed, 4 total
Snapshots:   0 total
Time:        2.253 s
Ran all test suites.
```
Great! The matcher toBeInstanceOf allow to get the error type and also read the properties message to validate the error message is the expected.


<span>Photo by <a href="https://unsplash.com/@rojekilian?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Sarah Kilian</a> on <a href="https://unsplash.com/s/photos/error?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
Steps in Building a Machine Learning Project
Tags: machinelearning, process
Published: 2021-01-23 16:56:02

In this post, we will be discussing the basic steps in building a machine learning project. The process of building an ML project includes collecting the dataset, cleaning it, processing the data, training and testing of the model and deploying it. All the steps are explained briefly below.

### **Data collection**

Data collection is the first step in developing any machine learning model. The source and type of data play an important role in determining whether the upcoming steps will be easy or complex. If we acquire data with less missing values, with only the most important features which determine the output and less ambiguous data, it would be easy for us to process it in the further steps.

### **Data cleaning**

In data cleaning, we check for any missing values, duplicate rows, features that don't have a high influence on the output and other unwanted values. The relations between the remaining input and output features are studied through plots and graphs. We remove these unnecessary data and make our dataset clean. 

### **Data preprocessing**

Preprocessing of data means to find a suitable measure to bring the input features into a common standard like mean, median, mode etc. The categorical features if any should be encoded to numerical values. 

### **Model Training**

After the data is cleaned and processed, now we split the dataset into train data and test data. The training data is used to train the model while the test data is used to test how much our model performs and calculate its accuracy scores. In most cases, this ratio is taken as 70:30 or 80:20. It all depends on the use case. 

### **Evaluation**

Here in this step, the test data is fed into the already trained model. The efficiency of our model is determined through the scores we obtain at the output. There are various parameters like accuracy, F1-score, r2 score etc. which determines how much accurate is our model.

### **Deployment**

This is the final stage in a Machine Learning project. Once our model meets the standard set by us, it is time to deploy them. There are various platforms like Heroku, Netlify etc. which may be chosen as per the requirement of our project.

*So that is it for this post. Hope you learnt something new out of it. Thank you for reading.*😊
GraphQL January
Tags: graphql
Published: 2020-12-21 16:02:56

---
title: GraphQL January
published: true
date: 2020-12-21 14:34:51 UTC
tags: GraphQL
canonical_url: https://hasura.io/blog/graphql-january-with-hasura/
---

 ![GraphQL January](https://hasura.io/blog/content/images/2020/12/graphql_january-1.png)

As 2020 draws to a close, everyone at Hasura finds themselves preparing for 2021. For some, last minute holiday plans, for others budgets and hiring, for all of us...a series of lengthy conversations about you, our users (or those yet to become).

We believe, strongly, that GraphQL will continue to become a key skill for developers (of all types) to learn, understand, and explore over the next year.

With that in mind, we are pleased to announce:

GraphQL January with Hasura - #GraphQLJanuary

Beginning 11 January 2021, the team at Hasura will be providing you with a wide variety of content, tutorials, streams, and more with which you can expand your GraphQL familiarity and start your adoption journey. This will include:

### Daily blogs

Daily blog posts on the general theme of learning GraphQL. We know that we are all at different stages in our journey of understanding. Posts will range from a discussion of recorded talks, treatise on the future of GraphQL, beginner content, intermediate deep-dives, and more.

### Livestreams

Once weekly we will host language specific livestreams on our [Twitch channel](https://www.twitch.tv/hasurahq). We will build a full stack app with a variety of frameworks and keep your ears open for some special guests joining us.

### Tutorial Videos

We all learn differently. Once a week we will take one of the front-end GraphQL tutorials hosted on our [learning portal](https://hasura.io/learn/) and walk you through it in 30 minutes. These will be, initially, delivered by email but later hosted for future reference on the learning portal and [YouTube](https://www.youtube.com/hasurahq).

### Live Q&A

Come join the team from Hasura in a once a week live (text) chat in our [community Discord](https://discord.com/invite/hasura). Bring your questions...we will bring engineers and answers. The schedule will be shared via email to all registrants and, as the dates draw closer, promoted on our social media.

### Office Hours

Are you familiar with our [Hasura Office Hours](https://hasura.io/events/office-hours/)? If you have questions about how Hasura applies to the GraphQL journey in your company register for this weekly, live (but still informal) Zoom chat with members of the Hasura team.

### Are you interested?

Do you want to know what content is coming...and when? Register [here](https://docs.google.com/forms/d/e/1FAIpQLSfq_qsmp4tE_2WtQtaS6gRXLpXygYfAyfkHt6AAGIcTFJYPpA/viewform?usp=sf_link) for us to keep you up to date.

Of course, it wouldn’t be a Hasura event without an eye towards interestingly designed swag. More to come on this as the month progresses. But, trust me, you will want to be signed up.
Can you pass local functions to a method? If so, what type is a function?
Tags: csharp, dotnet, help, beginners
Published: 2021-01-23 16:29:48

I know you can make local functions in C\#, but can you pass them into a function, e.g. either:
```csharp
MyClass.MyMethod(int f(int x) {return x*2;});
```
or
```csharp
int f(int x) {
    return x*2;
}
MyClass.MyMethod(f);
```
(if only one can be done, it would be helpful to know which one is wrong)?

And if you can, what is the type of functions? `System.Function`, or something?

<div alt="Thanks! Cheers!">
##<b><center><b>Thanks!<br/>Cheers!</b></center></b>
</div>
Garbage Collection in Java - What is GC and How it Works in the JVM
Tags: java, programming, technology, software
Published: 2021-01-23 16:29:38

Garbage Collection is the process of reclaiming the runtime unused memory by destroying the unused objects.

In languages like C and C++, the programmer is responsible for both the creation and destruction of objects. Sometimes, the programmer may forget to destroy useless objects, and the memory allocated to them is not released. The used memory of the system keeps on growing and eventually there is no memory left in the system to allocate. Such applications suffer from “memory leaks”.

Java Garbage Collection is the process by which Java programs perform automatic memory management. Java programs compile into bytecode that can be run on a Java Virtual Machine (JVM).

Garbage collection makes Java memory-efficient because it removes the unreferenced objects from heap memory and makes free space for new objects.

The Java Virtual Machine has many types of garbage collectors.

In these videos, I’ve discussed the Garbage Collection in Java, how it works, and the various types of collectors available. 

Please subscribe to the channel and like the video if you find it helpful.

{% youtube X1DkoRGVRp4 %}

{% youtube 4sBhc-pSILs %}