teleren/devto huggingface dataset:
Using heuristics for intelligence
Tags: beginners, algorithms
Published: 2021-07-14 13:14:40

When you're deciding if you'd try a specific pizza, you may have some criteria that it passes. The pizza might be made by someone different with a different technique, but as long as it passes your set of rules, you'll try it. This is a heuristic.

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

Often described as a rule of thumb, a heuristic is a rule or set of rules used to evaluate a state. It can be used to define criteria that a state must satisfy or measure the performance of a specific state.

A heuristic is used when a clear method of finding an optimal solution is not possible. A heuristic can be interpreted as an educated guess in social terms and should be seen more as a guideline than as a scientific truth.

If you enjoy cheddar cheese, mushrooms, and pineapple on a crispy base, a pizza that includes more of these attributes will be more appealing to you and achieve a better score for your heuristic.

Another example is writing algorithms to solve a GPS routing problem. The heuristic may be “Good paths minimize time in traffic and minimize distance traveled” or “Good paths minimize toll fees and maximize good road conditions”.

A poor heuristic for a GPS routing program would minimize straight-line distance between two points. This heuristic might work for birds or planes, but in reality, we walk or drive.

Heuristics are used in many AI algorithms to define attributes of what makes a good solution. Algorithms generate a variety of solutions and measure how good they are using heuristics. Some even evolve their own heuristics, like adversarial algorithms.

If you enjoyed this and want to learn more, see Grokking Artificial Intelligence Algorithms with Manning Publications: [http://bit.ly/gaia-book](http://bit.ly/gaia-book), consider [following me for more](https://twitter.com/RishalHurbans/), or join my mailing list for infrequent knowledge drops in your inbox: [https://rhurbans.com/subscribe](https://rhurbans.com/subscribe).
O que é SCORM?
Published: 2021-07-14 13:47:32

## O que é SCORM?
SCORM é um padrão internacional para e-cursos. Se o seu curso for publicado no formato SCORM, você pode ter certeza de que praticamente qualquer sistema de gerenciamento de aprendizagem (EaD) irá reconhecê-lo.

Padrões são importantes em qualquer campo. Tomemos como exemplo a indústria cinematográfica. Quando você compra um DVD, você tem certeza que será capaz de assistir em qualquer DVD player: Toshiba ou Panasonic — isso simplesmente não importa. Isso é possível porque o DVD é um padrão aceito; é por isso que os estúdios de cinema não têm que produzir diferentes tipos de discos para cada marca de player.

Infelizmente, essa era a situação no e-learning no ínicio dos anos 2000: os cursos eram criados para uma plataforma. Um e-curso criado para um sistema não funcionaria em outro. Se uma universidade mudasse o seu EaD, perderia toda a sua coleção de cursos, bem como os milhares de dólares gastos no seu desenvolvimento. Em 2001, o formato SCORM colocou o mercado de e-learning em ordem.

De fato, SCORM é uma lista de requisitos técnicos. Esta lista nos diz como criar um curso que irá funcionar em qualquer plataforma – há uma descrição detalhada da estrutura do e-curso e dos princípios de sua interação com os EaDs.

[Ler mais](https://www.ispringpro.com.br/blog/que-e-scorm)
O que é um LMS?
Published: 2021-07-14 13:42:25

## O que é um LMS?
Um LMS é uma plataforma para aprendizagem digital. Suas principais características podem ser encontradas na abreviação.

**L — Learning (Aprendizado)**. Com um LMS, você pode criar uma única fonte de [cursos online](https://www.ispringpro.com.br/blog/como-criar-um-curso-online) e materiais de treinamento. Isso se tornará uma fonte única de conhecimento em sua área, para que você possa manter e aumentar a expertise interna de sua empresa.

**M — Management (Gerenciamento)**. Você pode gerenciar cursos e alunos e até mesmo melhorar a sua própria eficiência.

Ao contrário dos serviços de compartilhamento de arquivos, um LMS não é apenas um amontoado de arquivos; pelo contrário, é um sistema bem organizado onde você gerencia o processo de treinamento. Para iniciar o treinamento, basta adicionar colaboradores e atribuir cursos.

Você contratou novos colaboradores recentemente? Envie-lhes convites para o curso de treinamento de integração. Está tendo problemas com vendas baixas? Peça a seus vendedores para praticar com clientes virtuais.

Graças a funções como calendário, você poderá atribuir e gerenciar não apenas o treinamento online, mas também as sessões em [sala de aula](https://www.ispringpro.com.br/blog/sala-de-aula-invertida). Dessa forma, um LMS pode ser uma espécie de app de tarefas projetado especialmente para alunos à distância.

**S — Sistema**. Sistema de computador, para ser exato. Um LMS automatiza o trabalho mais chato e tedioso, como atribuir notas, processar estatísticas e preparar relatórios. Além disso, você pode treinar seus colaboradores sem sair do escritório, gerenciando todos os processos diretamente do seu computador de trabalho.

Em outras palavras, um LMS é como sua própria universidade online. O sistema permite que você armazene e crie cursos online, fornece aos alunos acesso ao conteúdo e ajuda a avaliar os resultados.

[Ler mais](https://www.ispringpro.com.br/blog/o-que-e-lms)
How to add image to drawable in Android Studio
Tags: android, drawable, androidstudio
Published: 2021-07-14 13:39:11

1. Open Project
2. View as Android
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zlz32ywlf5rdlglutxkq.png)

3. Select Resource Manager
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/czyqqiesyu6qkuejuwhg.png)

4. Press + and select "Import Drawables"  
5. Select a picture
6. Press Next
7. Review and press Import
O que é e-learning? Definição, exemplos e guia rápido
Published: 2021-07-14 13:23:18

Desde cursos tradicionais por correspondência a treinamentos digitais abrangentes, o ensino à distância percorreu um longo caminho e agora atingiu seu auge como e-learning. Hoje já não é uma novidade, mas sim uma indústria em crescimento. De acordo com estatísticas da Ambient Insight, o mercado global de e-learning continuará a crescer 5% ao ano, e com o tempo substituirá os formatos offline.

O e-learning continua a ganhar terreno no setor empresarial. As empresas implementam-o para treinar seus colaboradores, agilizar os seus processos e estender seu alcance.

Então o que é e-learning em um contexto real e por que ele é tão atraente? Vamos dar uma olhada.

## O que é e-learning?

Hoje, quando as pessoas falam “e-learning”, elas estão se referindo a [treinamento](https://www.ispringpro.com.br/blog/treinamento-corporativo) em qualquer dispositivo digital. Assistir a um vídeo educacional, ler um artigo interessante ou fazer um questionário — tudo isso é e-learning.

Comparar e-learning com métodos de educação tradicional é como comparar formatos de e-book com livros em papel. Assim como os textos digitais não podem substituir a autenticidade de um livro real, o e-learning não pode substituir a educação em larga escala. Entretanto, ele está sempre disponível desde que você tenha seu dispositivo digital com você, e assim se torna mais conveniente.

A conveniência é uma das principais razões pelas quais as pessoas adoram o e-learning. Outra razão é que você pode personalizar sua experiência de aprendizagem com outras novidades, como a realidade aumentada e a realidade virtual (as pessoas adoram novas tecnologias!). Por exemplo, com cursos de RV, trabalhadores de armazéns e locais de construção recebem treinamento de segurança, e os alunos de medicina aprendem a localizar ossos e vasos sanguíneos.

Usamos o e-learning diariamente para nos desenvolvermos como indivíduos. Nós lemos artigos, assistimos vídeos do YouTube e jogamos jogos em nossos smartphones para exercitar nossa mente. Empresas, desde pequenas startups a grandes empresas, também utilizam o e-learning para [treinar colaboradores](https://www.ispringpro.com.br/blog/e-learning-corporativo) e ajudar com processos internos. Mas você não gostaria de saber como tudo começou?

[Ler mais](https://www.ispringpro.com.br/blog/que-e-elearning)
Types of CSS
Tags: css, webdev, vscode
Published: 2021-07-14 13:18:56

Styling is an important aspect for designing your Website. Website should look attractive and eye-catching to the users.
 
CSS - Cascading Style Sheet is used to style HTML webpages. CSS has many such properties that makes webpage more elegant. 

<b>1. Inline CSS:<b>

Inline CSS is used when we need to design a particular tag of 
our page. The style attribute is used within the tag which is 
need to be styled. 

Code:-
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vaulsuhpt0butrrx2i7w.PNG)

Output:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k9ad2y7mgz352qj3b4wy.PNG)

<b>2. Internal CSS:</b>

Internal CSS is mostly used to design a single webpage. The style tag is used within the head section to apply CSS properties. Inside the style tag the element/class/id which is to be styled is written an style is applied on it.

Code:-
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xmh73d7j6b0lf49oqud8.PNG)

Output:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tsidrbjry9rtmtb6dc0t.PNG)

<b>3. External CSS:</b>

In this method an external stylesheet is created. Now the question is how to link it with the html page on which styling is applied. The solution is link tag. The link tag is placed just below the title tag . 

Code:-
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y97mxuma5bmnktndj7s3.PNG)

style.css:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bff3eld2qy8l4kuirif5.PNG)

Output:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oyy4mhh6ufo9obacummz.PNG)

That's it for Today. Meet you soon with next post.
How to automatically clear old files from a folder on Linux
Tags: linux, automation
Published: 2021-07-14 13:15:40

One of the greatest things about Linux is how easily you can automate it. It gives you a huge amount of flexibility and control over your system, and it allows you to offload all the mundane or repetitive tasks to the system.

In this guide, I’ll briefly show you how you can periodically clear old files and folders from a directory. I use this to clear down my downloads folder, but you could use it anywhere.

You can view the guide here: https://www.saluki.tech/2021/07/14/how-to-automatically-clear-your-downloads-or-any-folder-on-linux/
Hmm, that was weird - part 3
Tags: qa, testing, api, aws
Published: 2021-07-14 13:10:19

_Here we are, the final level. Refer to [part 1](https://dev.to/alexandlazaris/hmm-that-was-weird-a09) and [part 2](https://dev.to/alexandlazaris/hmm-that-was-weird-part-2-1b1m) to catch up._

For the conclusion, I call in back-up using ... the cloud. Or AWS CloudWatch more specifically. 

I also mention [Charles](https://www.charlesproxy.com/), for network logging & manipulation. I highly recommend this tool.  It is an essential when testing as you can sift through all HTTP traffic, tweaking API requests & responses to fit your scenarios.

![part-3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gw7no6drrxkzs6onoil.png)

Well that's it from me. It's been interesting sharing my thought process for a day-to-day task and I hope these posts brought you a laugh or two, or at least triggered a "Hmm" of your own.
EuroLinux (1:1 RHEL clone) was released in the Open Core
Tags: linux, opensource, free
Published: 2021-07-14 13:00:18

EuroLinux (an Enterprise-class Linux distribution created by the European company at the same name) is gaining more and more popularity as an equivalent for RHEL that is fully compatible with it.

Since the news of the end of support for CentOS 8 has managed to go around the world, those who use CentOS are currently looking for a stable alternative that will provide future years of operation, stable updates and security patches. EuroLinux is such a distribution, the updates of which can extend the CentOS life cycle until 2029. 

Recently the owner decided to make the system available in the Open Core model for free including full updates. This fact is putting EuroLinux on the list of top 10 free alternatives to CentOS, as a strong competitor from Europe. Of course there are still available commercial version of the system with direct producer support.

It's good to know that EuroLinux (since from 8.3) is probably the only Enterprise-class Linux with RPM versions of 1:1 compatible with RHEL (in comparison with Oracle Linux or Rocky Linux). Moreover, the developers have created a build tool to compile the system in the client environment repeatedly or even make the distro fork.

Main product page
https://en.euro-linux.com/eurolinux/

Free download
https://en.euro-linux.com/eurolinux/download/

PS. You can find EuroLinux in AWS, MS Azure and Google Cloud Platform...
What Does "this" Refer to in JS?
Tags: javascript, beginners
Published: 2021-07-14 12:59:03

JS's "this" keyword has always caused a lot of confusion for me because it was difficult to understand what it referred to. I will attempt to clear this confusion up for myself and for anyone else reading.

The most important thing we have to remember is that "this" differs according to how a function is called. There are 4 main ways you can call a function which will help us understand how "this" works.

You can call a JS function:

1. as a function
```js
var age = 100;

function foo () {
 var age = 10;
 console.log(this.age);
}
foo(); // PAY ATTENTION HERE. This part determines what "this" will refer to.
```
Here, foo() is 100. In this situation, "this" refers to the global object because the function is called as a regular function and all regular functions refer to the global object(window).


2. as a method
```js
var age = 100;
var player = {
  name: 'Joe',
  age: 35,
  foo: function () {
    console.log(this.age)
  }
}
player.foo(); //PAY ATTENTION HERE. This part determines what "this" will refer to.
```
Here, player.foo() is 35. In this situation, "this" refers to the the player object because foo() is called as a method attached to player.

3. as a constructor
```js
function Foo (name) {
  this.name = name;
  console.log(this);
}
var player = new Foo('joe') // PAY ATTENTION HERE. This part determines what "this" will refer to
```
For constructor functions, a new "this" is created each time and that is what it refers to. So, the "this" in the code example above would refer to the variable "player". You should try *console.log* and see what you get. You will most likely get {name: 'joe'}.

4. via apply, call, and bind
```js
let player1 = {
  name: 'joe',
  age: 35,
  printName: function () {
    console.log(this.name);
  }
}

let player2 = {
  name: 'paul',
  age: 30,
}
player1.printName() // 'joe'
player1.printName.call(player2); // 'paul'
```
We learned that when a function is called as a method, "this" refers to the object it is attached to. But in *player1.printName.call(player2)*, "this" refers to player2 instead of player1. This is possible because of *call*. With *call* you can decide what "this" will refer to. It is the same with *apply* and *bind* but I won't go into the details in this post.
Deal with the *Host* header field
Tags: http, headers, web
Published: 2021-07-14 12:45:00

![http_request](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ta12ews6aaxhzc40mwo.png)

## Introduction
Performing HTTP requests is a routine task for a web developer nowadays.

This action contains, though, a number of things that are not necessarily well understood.

## The **Host** header
One of these things is the [Host header](https://datatracker.ietf.org/doc/html/rfc7230#section-5.4).

The `Host` header is a required one in `HTTP` requests:
>  A client MUST send a Host header field in an HTTP/1.1 request even if
   the request-target is in the absolute-form, since this allows the
   Host information to be forwarded through ancient HTTP/1.0 proxies
   that might not have implemented Host.

Wait a moment! How come I've never needed to deal with it ? How come it does not ring a bell with me ?

These questions are absolutely legit.
Since `Host` is required, browsers and even [curl](https://curl.se/) set it by default to the provided hostname.

### Example
Try to run these commands from your terminal:

1. request with hostname ✅
```
❯ curl -vvvI stackoverflow.com

> HEAD / HTTP/1.1
> Host: stackoverflow.com
> User-Agent: curl/7.64.1
> Accept: */*
>
```

2. request with ip address ❌
```
❯ curl -vvvI 151.101.65.69

> HEAD / HTTP/1.1
> Host: 151.101.65.69
> User-Agent: curl/7.64.1
> Accept: */*
>
```
Please notice the line `> Host: ` for each command 💡. Got it?

Let's talk about the wrong request.
If you execute the command number 2, you will notice that the response is an error.
This is due to the fact that when the request arrives til `stackoverflow` server, it cannot go any further as one IP address can host many websites.
So the web server gets confused and most likely returns `500 Domain Not Found`.

## Conclusion

Knowing how to deal with the `Host` header comes in handy when one needs to connect to a website through an ssh tunnel for instance.


A Post is coming soon to explain how this can be done 🚀.
Make your website faster with a HTTP/2 Webserver like Nginx
Tags: http2, nginx, spdy
Published: 2021-07-14 12:24:55

Websites have been around for a very long time. HTTP is the default protocol that is used in serving the web pages. The most common version used is version 1.1. and it has served us quite well the last few decades.

With the recent advances in the browser technologies, especially with the popularity of Web 2.0 features used in popular frontend Javascript frameworks, it was time to upgrade the backend server technologies also. 

Limitations of HTTP version 1.1
- Limited to single or a few handful of client requests
- SSL/TSL certificates are optional

Advantages of HTTP/2
- It loads pages much faster due to parallel downloads
- More secure as it requires SSL/TSL certificate to connect
- No frontend code changes required to take advantage of newer features on the server.

How to Enable HTTP/2 on Nginx Servers

If your website is running on Nginx webserver, it is very easy to change it to run HTTP/2. 

Step 1: Edit your server config file for your website.  For Linux users, it is usually found in /etc/nginx/sites-available/default. 

Step 2: Find the line that reads "listen 443 ssl"

Step 3: Append the word http2 so that it now reads "listen 443 ssl http2"

Step 4: Check if the settings are correct with "nginx -t"

Step 5: If everything is ok, restart the server with "systemctl restart nginx"

Et voila!

Testing the Changes

In order to verify that your server is now running on http/2 mode, you can open the website in your browser like Chrome or Firefox.  If you open the developer console and inspect the Network tab, it shows the version of the requests made to the web server.
Innovation from within the team?
Tags: discuss, help, webdev, innovation
Published: 2021-07-14 12:16:08

(Photo by [Tomasz Frankowski](https://unsplash.com/@sunlifter?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText))


## How do you bring innovation to long term client projects?

### Can you still be creative and try wild ideas?

 
We are working on a big project with many other people for quite some time now and we all will be working there for quite some more time. We have our set meetings, alignments, refinements, plannings, lunch times, reviews, and everything else for a smooth ride. But sometimes I wish I could bring more to the table, add my own ideas to existing stories or create new ones entirely. 

Many of us have some expertise through other [(side) projects](https://dev.to/s2engineers/do-i-need-to-do-private-side-projects-to-be-become-a-professional-web-developer-5137) or previous jobs and have ideas in that direction. For example, I really enjoy working with [animations](https://dev.to/lptw/series/9148) and therefore often see opportunities where to add them to increase the usability of the project. If I see some possibility to add them, I could of course write a ticket but it might never see the light of day on the bottom of the backlog (even if it suits the long term goals of the client).

###But should it? 
* Is this kind of thinking more of a luxury problem? 
* Does the client always know which ticket order is best because in the end, all we can do is give advice to the best of our knowledge and priorities are always shifting anyways?

###What about you
* Were you able to convince your client to let you bring in your own ideas to even further improve the product? 
* If so, how? 
* With your own process like an “innovation sprint” or separate backlog? 
* Or did you find another solution entirely?
구글 앱스 스크립트 (Google Apps Script) 를 이용하여 메일로 구글 설문지 제출 알림 받기
Published: 2021-07-14 12:07:41

*google apps script 에 대한 설명 및 사용법은
[이전 게시물] (https://dev.to/syan/google-apps-script-1-2j2m)에서 작성되어 생략합니다.*


###1. 구글 설문지 준비
구글 설문지를 생성합니다.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5lc3ozok78njo3ea47nx.png)

###2. 설문 조사
구글 설문지를 이용하여 설문조사를 받습니다.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/65ti0wo3gthwhybv5hux.png)

###3. 설문 응답 확인
설문지 응답 확인을 위한 구글 스프레드 시트 준비를 합니다.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/giqem6vi6ro3c52jaohq.png)
 
###4. 스크립트 편집기 작성
구글 스프레드 시트에서 스크립트 편집기에 들어갑니다.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s2r6x3194pb64gi6bn93.png)
 
###5. 구글 앱스 스크립트 내 소스코드 작성하기
메일을 발송하는 소스코드를 작성합니다.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smlkcol6q4aiaufdb7nx.png)
 
###6. 트리거 메뉴 
왼쪽 메뉴바의 시계 아이콘으로 생긴 트리거 메뉴로 접근합니다.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0dp7hesrmg6gn48ttvbj.png)

###7. 트리거 추가
양식제출 즉시 소스코드가 실행될 수 있도록 트리거를 추가합니다.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xqwz9a493jh4nbfirnhz.png)

###8. 트리거 생성 확인
트리거가 생성되었습니다.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uae7sqo97xfhhm0pulcn.png)

###9. 메일 전송 확인
양식 제출 시 메일이 전송되는 것을 확인하였습니다.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/31rfzgwxc25eijs1i82l.png)
    

###10. 메일 본문 내 스프레드시트 내용 첨부
메일 본문이 심심하므로, 설문조사를 한 내용이 담겨 있는 스프레드시트 내용을 첨부하는 소스코드를 작성합니다.

```
function onFormSubmit(e) {
  var sheet = SpreadsheetApp.getActiveSheet();
  var range = sheet.getRange("A1:G10");   
  var values = range.getValues();
  console.log(values);

  var contents = values.map(function(i) {return i + "<br>"});
  if (contents.length > 0) {
    var emailAddress = "<구글이메일주소>@gmail.com"; 
    var subject = "설문이 접수되었습니다.";
    var message = contents.join("\n");
    
    MailApp.sendEmail({
      to: emailAddress,
      subject: subject,
      htmlBody: message, 
    });
  }
}

```
- spreadsheetapp.getactivesheet() 함수를 통해 구글스프레드시트를 활성화
- getRange() 함수를 통해 셀의 범위를 지정
- getValues() 함수를 통해 값들을 가져옴
- console.log() 함수를 통해 가져온 값을 출력
- map() 함수 내 function 을 실행한 결과를 이용하여 새로운 배열을 생성
- join() 함수를 통해 배열 값을 구분자를 이용하여 문자열로 생성
- MailApp.sendEmail() 함수를 통해 메일 전송

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sn0wuahpstxqxa0te5pn.png)
 
 
###11. 메일 확인
구글 설문지가 제출되는 즉시, 메일로 설문내용이 전송되었습니다.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vt8y8zw56odho7fhih2i.png)