teleren/devto huggingface dataset:
Utilizando/Customizando Módulos Específicos no Protheus
Tags: advpl, protheus, erp, totvs
Published: 2021-02-03 19:25:47

Se a empresa que você presta serviço ou trabalha, possui algumas customizações (Processos, Cadastros, etc) e elas são bem específicas do seu negócio, sem está no contexto dos módulos padrões do protheus (Financeiro, Compras, etc) você tem a possibilidade de habilitar um módulo específico, com um menu personalizado para o seu negócio e habilitar para os seus usuários.

Existe a possibilidade de habilitar até três módulos específicos, através da criação de pontos de entrada.
Ao acessar a configurações de usuários do protheus **Sigacfg->Usuários->Senhas->Usuários** e alterar ou incluir, você verá que na sessão **restrição de acessos->Ambientes** onde os módulos são listados, existem três módulos para se habilitar:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2gcfexkhcbkuxv635eym.png)

Esses são os três módulos disponíveis para utilizarmos.

# Utilizando o Ponto de Entrada!

Vamos alterar o nome do primeiro módulo que nos é disponibilizado (SIGAESP):

No projeto advpl, você tem que criar um fonte e esse fonte utilizará o Ponto de Entrada disponível que altera o nome do módulo:

> espnome.tlpp (ou .prw)
```
#include 'protheus.ch'
#include 'parmtype.ch'

user function ESPNOME()
	
return OemToAnsi( "Meu Modulo" )
```
Compilando esse fonte e entrando no sigacfg como mostrado acima, você verá que o nome do módulo que antes era Específicos agora é Meu Módulo

**Para os demais módulos basta criar os pontos de entrada ESP1NOME() ESP2NOME()**

E onde isso é mostrado? Na tela de login do usuário, nos ambientes, caso ele tenha acesso a esse módulo:

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

# Sobre o menu do módulo

Existe um menu para cada módulo espcífico: sigaesp.xnu, sigaesp1.xnu sigaesp2.xnu que podem ser modificados, criados com nome diferentes, desde que associados ao módulo pelo configurador.

> Documentação Oficial da totvs:
[link] https://tdn.totvs.com/display/public/PROT/ESPNOME+-+Ponto+de+Entrada

> Me siga no linkedin:
[link] https://www.linkedin.com/in/leandroayala/
February 2021 Releases – Horizon 27.0.4, Meridians 2018.1.25, 2019.1.16, and 2020.1.5
Tags: news, flows, grafana, horizon
Published: 2021-02-08 21:19:00

---
title: February 2021 Releases – Horizon 27.0.4, Meridians 2018.1.25, 2019.1.16, and 2020.1.5
published: true
cover_image: https://pbs.twimg.com/media/EtZ_d6iXYAA2Bdy?format=jpg&name=medium
date: 2021-02-03 19:14:41 UTC
tags: News,flows,grafana,Horizon
canonical_url: https://www.opennms.com/en/blog/2021-02-03-february-2021-releases-horizon-27-0-4-meridians-2018-1-25-2019-1-16-and-2020-1-5/?utm_source=rss&utm_medium=rss&utm_campaign=february-2021-releases-horizon-27-0-4-meridians-2018-1-25-2019-1-16-and-2020-1-5
---

For February we released point updates to all OpenNMS versions under active support.

### Horizon 27.0.4

Release 27.0.4 contains a number of bug fixes relating to WMI, the Minion, flows, reports, JEXL processing, and more, as well as a few small enhancements.

The codename for 27.0.4 is [_Towel_](https://hitchhikers.fandom.com/wiki/Towel).

For a high-level overview of what has changed in Horizon 27, see [What’s New in OpenNMS Horizon 27](https://docs.opennms.org/opennms/releases/27.0.4/releasenotes/releasenotes.html#releasenotes-27).

For a complete list of changes in 27.0.4, see [the detailed release notes](https://docs.opennms.org/opennms/releases/27.0.4/releasenotes/releasenotes.html#_release_27_0_4).

### Meridians 2018.1.25, 2019.1.16, and 2020.1.5

Meridian 2020.1.5 had a few bug fixes including a timezone fix for Grafana reports and an SFlow fix. Meridians 2019 and 2018 had smaller releases with just a couple of bug fixes.

For a list of changes, see the release notes:

- [2018.1.25](https://meridian.opennms.com/releasenotes/2018/latest/#_release_meridian_2018_1_25) ([_Mudflow_](https://wikipedia.org/wiki/Mudflow))
- [2019.1.16](https://meridian.opennms.com/releasenotes/2019/latest/#_release_meridian_2019_1_16) ([_Orwell_](https://wikipedia.org/wiki/11020_Orwell))
- [2020.1.5](https://meridian.opennms.com/releasenotes/2020/latest/#_release_meridian_2020_1_5) ([_Strandflat_](https://wikipedia.org/wiki/Strandflat))
Welcome Thread - v110
Tags: welcome
Published: 2021-02-03 19:10:35

---
title: Welcome Thread - v110
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![Celebrate](https://media.giphy.com/media/l2SpPlZNVOvVnH5C0/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
The beginning of a beautiful friendship with Javascript... hopefully
Tags: javascript, flatiron, neverstoplearning, newbie
Published: 2021-02-03 18:34:38

Hi, again!  Just finished phase 4 at Flatiron and learned some Javascript and built a single-page application using Javascript front-end and Ruby/Rails back-end.  I can officially say that Javascript and I have some more work to do on our relationship!  It feels like a language you can never fully understand - but maybe that's just me!  Either way, Javascript and I teamed up and completed our goal so it all worked out in the end!

There were a few key things I struggled with in the beginning and still probably need a little work on.

#this

I found myself losing track of what this was going to be in any place.  Console.log became my savior!  After awhile, I found myself getting better at figuring this out, but execution context is a difficult concept to master when your program starts getting bigger and bigger!

#event listeners

Sometimes I struggled with getting the information I needed out of an event listener.  Again, console.log came in handy here as well as just plain old guess work!  Sometimes to get to the specific areas I needed, it took a little manipulation but I usually got there eventually!

#organization

This one I'm sure I still haven't mastered!  I definitely need to read up on this!


Take a look at my Travel Tips App on my GitHub and give me suggestions and advice!
Live on GitHub Pages [Link](https://mimirandi21.github.io/travel-tips-frontend/)  
front-end [Link](https://github.com/mimirandi21/travel-tips-frontend)
back-end [Link](https://github.com/mimirandi21/travel-tips-backend)

Thanks to anyone following me on this journey and good luck and all my support to anyone embarking on their own!  Reach out if you need support, I'm here :)
A Quick Guide to build a Chrome Extension
Tags: webdev, javascript, programming, beginners
Published: 2021-02-03 18:27:53

In this tutorial, we'll build a Chrome Extension which blocks explicit words from appearing in your browser. Please refer to the cover photo for a quick demonstration.

## Step 0: Manifest.json
Our first step will be to create a `manifest.json` file which is necessary for every extension. This file will contain all the basic information about our extension. 

We specify the name of our extension in this object with a `name` key, the version with `version` key. The `content_scripts` has all the HTML, CSS, and JS files related to our extension along with a list of URLs for which our extension will be applicable. We want our extension to be active for all the websites so we'll use `<all_urls>` in the matches array. It will also contain our javascript file with the name `script.js`. 

Below is the code for this file
```javascript
{
  "manifest_version": 2,
  "name": "Explicit Word Blocker",
  "version": "0.1.0",
  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["script.js"]
    }
  ]
}
```
## Step 1: Script.js
Now for the `script.js` file, we have to create a function that replaces every single element containing an explicit word on our webpage with a blocked out text. To do this we'll use a recursive function that loops through every single element and its children until we find every element with the explicit words. 

Create a function named `replaceWords` which takes one argument called `element`. It will contain an `if-else` block with a condition that checks if the element has any child nodes. If the element has any child nodes then we'll call the `replaceWords` function on each of those child nodes. The else condition checks if the type of element is text and inside this block, we'll use regular expressions with `gi` flags for global and ignore case. This regular expression finds any word which has explicit text. Then this text element is replaced with black boxes similar to the ones seen in classified documents. In the end, this function is called on the body of our document.

Below is the code for this file
```javascript
function replaceWords(element) {
  if (element.hasChildNodes()) {
    element.childNodes.forEach(replaceWords);
  } else if (element.nodeType === Text.TEXT_NODE) {
    element.textContent = element.textContent.replace(/fuck/gi, '████');
    element.textContent = element.textContent.replace(/fucking/gi, '████');
    element.textContent = element.textContent.replace(/fucker/gi, '████');
  }
}

replaceWords(document);
```
## Step 2: Loading the extension
To see this extension in action, follow these steps:
- Go to chrome and type in `chrome://extensions/` in your search bar. 
- Turn on the Developer toggle on the top right corner.  
- Click on the `Load unpacked` button on the top left corner to load our extension.
- Navigate to the folder containing the `manifest.json` and `script.js` files. This will activate our extension.

And that's it folks we have built a simple chrome extension that blocks out explicit words appearing in our browser.
The value of feedback
Tags: beginners, productivity, learning, feedback
Published: 2021-02-03 18:20:38



Writing software is a complex job full of learning. We learn not only new technologies but also domains and avoiding disasters in production. From my experience, the best learning tool is fast feedback. Embracing it in all aspects of your development process will make your progress skyrocket.

## Feedback as a tool

Feedback is a tool to make your output and you better. If you submit your code to a colleague, to do a code review he will point out the mistakes you did and, in the best scenario, he will help you understand the issues and fix your code. Both of you are gaining from this situation. Bad code was not pushed to production, you learned how to write better programs and next time there will be a third of the issues. If you would not get the feedback you might to found out the issues later either as a bug or as technical debt and the cost of learning will be much higher.

## Feedback and current development practices

If you look at the current trends in software development, you can see that a lot of what is an everyday practice for us is some form of getting fast feedback. For example, writing tests. Without them, it is like playing a musical instrument without hearing it. You are almost sure that you are playing the right notes, but you cannot be sure. There is no better way to get fast feedback than by running a suite of good tests (okay, maybe Clojure and its repl driven development). Continues integration and continuous delivery allow us to ship software faster to get feedback from users and real-life situations as fast as possible.

## The problem with receiving feedback

Receive and accept feedback is tough. Ego, fear, and expectations get in the way of receiving it. But I have some good news for you, as with everything you get better at it. You learn how to separate yourself from the feedback and take what is going to move you forward. For me, there were a few books that helped me with this namely [mindset](https://www.amazon.com/Mindset-Updated-Changing-Fulfil-Potential/dp/147213995X) by Dr. Carol Dweck and [Creativity inc.](https://www.amazon.com/Creativity-Inc-Overcoming-Unseen-Inspiration-ebook/dp/B00GUOEMA4/) by Ed Catmull. Giving someone feedback is maybe an even bigger problem but I do not feel like having enough experience to write about it.

## Conclusion

Getting feedback is an often big step out of your comfort zone. You may show someone something terrible but if you don't put your skin in the game it stays terrible. If you get feedback, you have the opportunity to make it better.

If you like this article follow me on Twitter https://twitter.com/rejmank1
Atualizando as credenciais de login do SourceTree Git
Tags: git, opensource, productivity, programmer
Published: 2021-04-14 12:13:29

---
title: Atualizando as credenciais de login do SourceTree Git
published: true
date: 2021-02-03 18:09:25 UTC
tags: Git,OpenSource,Productivity,programmer
canonical_url: https://andersonbraz.com/atualizando-as-credenciais-de-login-do-sourcetree-git
---

No meu ambiente de trabalho, temos nossos projetos em repositório Git para controle e versão de código. E por sermos um time relativamente grande e com uma boa frequência de criação de branch paralela, é inevitável buscar uma interface com boa apresentação visual para as interações Git no andamento do projeto. Sou muito fã de soluções Open-Source e desta forma optei por utilizar o SourceTree para gerenciar meu código. Como o meu contexto de trabalho envolve Finanças por lá sempre temos forte regras de segurança e, portanto, de tempos em tempos é necessária a renovação da minha senha, só que isso acabava ferrando o meu SourceTree. Isso porque deixo as regras do meu Git config em relação a autenticação e o SourceTree em algum momento faz essa guarda não tão explicita.

Assim, quando eu mudo minha senha, o SourceTree não percebe ou é informado dessa mudança e então ele acab forçando a senha antiga e acaba bloqueando minha nova senha.

A solução mais eficaz e simples que encontrei para o meu problema - não usa nenhuma das caixas de diálogo SourceTree. E encontrei no post [Updating SourceTree Git Login Credentials escrito por Ben](https://www.binarymoon.co.uk/2014/11/updating-sourcetree-git-login-credentials/)

1. Abra SourceTree e navegue até o repositório do qual deseja atualizar a senha
2. Execute o comando 'Actions> Terminal' para pular para o local do repo na linha de comando
3. Digite 'Git Pull' e pressione Enter para atualizar o repositório
4. Quando solicitado digite sua senha

E pronto my friends, tá resolvido essa bagaça.

## Créditos

Photo by [Yancy Min](https://unsplash.com/@yancymin?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
How to infer recursive types with generics
Tags: typescript, help
Published: 2021-02-03 18:00:51

I have a helper function that infers types from the keys of object I pass to it. Helps in autocomplete.

I'm stuck at the point where I wanna add a `menu` property to my object, and that menu property is recursive, that is it references the original object it is part of:

Here's my current code:

```ts
export type IMenu = {
  title: string;
  breakAfter?: boolean;
  menu?: typeof createMenuConfig;
};

/**
 * This is just a helper function to infer types from the object passed to it
 */
export const createMenuConfig = <T>(et: { [K in keyof T]: IMenu }) => et;
```

But this doesn't work.

Error is weird: 
```md
Type '{ hello: { title: string; }; }' is not assignable to type '<T>(et: { [K in keyof T]: IMenu; }) => { [K in keyof T]: IMenu; }'.
  Object literal may only specify known properties, and 'hello' does not exist in type '<T>(et: { [K in keyof T]: IMenu; }) => { [K in keyof T]: IMenu; }'.ts(2322)
```

How I can I fix the problem?
Next.js include incremental static pages regeneration
Tags: nextjs, javascript, react, redux
Published: 2021-02-03 17:53:28

Next.js is a React JavaScript UI library getting a refresh. It’s new 9.5 update adds capabilities including incremental static regeneration.

Incremental static regeneration updates through re-rendering them from the background as traffic flow. Traffic is served statically beside the newly built page used only after it is done generating. So there are no spikes in latency and pages never going offline.

Incremental adoption of Next.js allowing developers to make incoming requests with different destination paths including other URLs. It is used in situations such as changing the structure of application routes, take the form of a list of redirects in next.config.js under the redirects key.

It developed by edge network provider Vercel and it is open-source. Next.js is used as an enterprise-level tool for building static websites, pre-rendered apps, and mobile web apps.

###**Some other new improvements and updates in Next.js 9.5: —**
* A trailingSlsh option offered as part of next.config.js. After this option set to true, Next.js will automatically add a trailing slash to URLs.
* A bashPath config option enables easy hosting of a Next.js application on a subpath of a domain.
* A previously introduced profiler API enabled tracking of performance issues in the React component instead of a separate version of ReactDOM to be used to profile in production. Through Next.j’s new version, developers can set up automatically correct aliases of react-dom and schedulermodules.
* JavaScript bundles use content hashes instead of the build ID. It allows for pages that new deploys changes happen, the bowers cache stored without having downloaded again.
* Fast Refresh has been refined to show more helpful application error messages.
* All dynamic routes provide more flexibility and choice in application routing needs. Actually is on the experimental stage.
* Webpack 5 beta module bundler release which has improvements such as better tree-shaking and persistent caching.

You can read more on: [HERE](https://centocode.com/next-js-include-incremental-static-pages-regeneration/)

Thank you for giving this article some time to read. Thank you so much.
Embed dev.to articles in your Vue app
Tags: vue, javascript, webdev, codepen
Published: 2021-02-03 17:50:51

I was looking for a way to show posts from dev.to on my website and I found [this](https://dev.to/comscience/embed-your-dev-to-posts-anywhere-3m23) post by [comscience](https://dev.to/comscience) who made exactly that in React, so I made a Vue version with Vuetify.
Here you go:
{% codepen https://codepen.io/venatus/pen/PobwOJm %}

You can also install it via npm:
`npm i dev-to-embed-vue`

And then import the component in your app:
```javascript
import DevToEmbed from 'dev-to-embed-vue/src/DevToEmbed'
``` 
And use it in your template:
```html
<DevToEmbed userName="venatus"/>
```



**Source code:**
{% github sangress/dev-to-embed-vue %}
Howdy People!
Tags: firstpost
Published: 2021-02-03 17:45:50

Hey, I am Saumya, a Sophmore, pursuing computer engineering, learning front-end development

This is my first blog, will continue to write frequently on various topics that I will learn that will help me grow
as rightly said, 
> *" By learning you will teach, by teaching you will learn "*

I am going to write technical blogs related to front end topics mostly the topic I'll cover or the tips and tricks I'll get to know while learning

I will share them so that it could be beneficial for others too, who are following the same path 

I am interested in learning javascript, so I'll follow along that path

Looking forward to learning more with the community.
Programmatically Write CSV Files using Pandas, Python, and WayScript
Tags: startup, python, tutorial, serveress
Published: 2021-02-03 17:36:52

Introduction
------------

Working with WayScript helps you automate simple tasks while you can focus on the important work.  
Today, we’ll learn to use Python to programmatically write CSV files with pandas.

Prerequisites
-------------

No prerequisites but some content you might find helpful:

*   [Working with Time Trigger](https://docs.wayscript.com/library/triggers/time-trigger)
*   [Working with Python](https://docs.wayscript.com/library/modules/python)
*   [Working with Requests](https://docs.wayscript.com/library/modules/requests)

Time Trigger
------------

To make the script running, we’ll simply use a Time Trigger.  
Add it as a Trigger and choose whatever time suits you best.

![Adding the Trigger](https://wayscript.com/blog_img/168/1.png)

Requests
--------

WayScript provides a Requests module to easily make requests without having to write a single line of code. Add it as a new step.

![Adding the module](https://wayscript.com/blog_img/168/2.png)

We’ll make requests to [Star Wars API](https://swapi.dev/). We’ll fetch all the planets of the Star Wars Universe using this endpoint. https://swapi.dev/api/planets/

![Configuring the module](https://wayscript.com/blog_img/168/3.png)

Once it’s done we can write the Python Script to write the JSON data into a CSV file.

Python
------

WayScript also provides a Python module to execute python scripts in our workflow. Add it as a new step.

![Adding the Python module](https://wayscript.com/blog_img/168/4.png)

Once it’s added, we can write the script.

![Writing the script](https://wayscript.com/blog_img/168/5.png)

If you run the script, you’ll notice a new file in the project directory. Well, it’s our CSV file.

![File in the directory](https://wayscript.com/blog_img/168/6.png)

Well, here’s the content.

![Content of the CSV file](https://wayscript.com/blog_img/168/7.png)

Conclusion
----------

Questions about this script or anything else? Join our [Discord](https://discord.gg/VWbXSbj). We're always around to help. If you want to work with the full script template, just find it [here.](https://wayscript.com/user/mangabo_kolawole/O-inFqKo)

[](https://wayscript.com/user/mangabo_kolawole/O-inFqKo)
Split.js Resizeable Split Image Views
Tags: jquery, javascript, html, css
Published: 2021-02-03 17:35:10

Split.js is a tiny resizeable split jquery plugin with the help of CSS float and flex properties. So here we made a simple Resizeable Split view using this library. Also, this liberty has mostly supported all browsers.

To make a split-view we used event listeners and some CSS properties. To make this element split views we used the only gutterSize for spacing and sizes for split images. Here we used two images to make these effects first one is original images and the second one is black. To see the split effects you have just hover and move the mouse right side.

Make it yours now by using it, downloading it, and please share it.

[Source Code](https://w3hubs.com/split-js-resizeable-split-image-views/)