teleren/devto huggingface dataset:
Wayscript: A fast touch
Published: 2020-04-23 19:25:02

Hello there. Did you here about the new cloud platform launched some 2years back maybe yes maybe not. Well I have a post I wrote on my page for you to get a fast touch of the platform. Will like to hear your thoughts in the comment section below. 
Find it [here](https://ko-fi.com/post/A-new-cloud-platform-for-developers-G2G41N4CL)
Have a nice day 👍
17 : The Power Of Mathematics 
Published: 2020-04-23 01:45:48

Math let me how to think deeply and accurately,
---- 
what I describe my personality is intuitive, sensitive and a reserved person, I can act like an outgoing, vivid, like a California girl. The true myself also came out and now have a quite satisfying life, because, I can be totally in silence, and write about my feelings and how I see the world.
Oftentimes, I had to take too much of energies to explain how I am, in the society, and I guess people are not generous to each other, So should I fight for them? Not really, that does not belong to my personality, still peace and love.
However, I am learning the difference, and I don’t deal with everything, depending on the backgrounds, what experience they had, which logical thinking is suitable, sometimes, just let it go. math is a new language to make me belong to the world. Do you know how interesting talking about proofs and logic in daily life? It surrounds us.

---- 
I now accept that I might not be able to be a web developer, I got the point of thinking process I should have, and for a long time, I did not know, it is clear, and thanks to mathematics, I am now accepted the new way I am,
And It was going to remain math hate inside unless I tried to learn to program last year, I can not imagine how I spent that time with the pain.
---- 
Thus, my math project is officially started, it is as similar to vanilla JS, without frameworks, filled with truths, logics, and operations, What I prioritize in terms of mathematics is that becoming a best friend of math, and be natural with the mathematical process, and finally have my javascript!

---- 
My logic is completed, sometimes, switching off is okay to open the new door, don’t take an action if you want to rest, which means, take a rest.
I don’t get exhausted to think things deeply, it is not overthinking, it is the process the have a new solution for myself, I am lucky to meet math, so much
Configure SSH for a specific Host
Tags: ssh, quicktip
Published: 2020-04-23 19:15:17

I had to set up an Ubuntu machine a couple weeks back and set up a fresh git server at work. To get rid of the authentication every single push and pull I set up ssh keys to authenticate that way.

## Example
With the following ssh-config the ssh client will open a ssh connection with only typing `ssh example`. The user that is used then is `niklas`. Otherwise you would have to write `ssh -i ~/.ssh/example.key niklas@example.com`. If this is a connection you have to connect to more often this is can be a waste of effort. Just simply open your ssh-config with `nano ~/.ssh/config` and use the following config:

```
Host example
    HostName example.com
    User niklas
    IdentityFile ~/.ssh/example.key
```

## Copy specific key with ssh-copy-id

```
$ ssh-copy-id -i path/to/key user@host
```

This command will easily transfer your public key to the `authorized_keys` on your server.  

Thanks for your time,
Niklas
Debugging my installation of Elasticsearch
Tags: help
Published: 2020-04-23 19:15:13

![Frustration](https://media.giphy.com/media/xT5LMESsx1kUe8Hiyk/giphy.gif)

Yesterday, I was running into much frustration installing [Elasticsearch](https://www.elastic.co/) on my Mac machine. After a lot of Googling, I patchworked a solution that worked for and want to share it with you.

After installing Elasticsearch with [Homebrew](https://brew.sh/) and running `elasticsearch`, I ran into this issue:

```
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.data' (/usr/local/var/lib/elasticsearch)
```

Hmm. I googled this line and found that others encountered a similar issue. When I attempted to locate this folder, it did not exist, so I learned that I needed to 1) create it and 2) give myself permission to write into it. I did this by running these two commands:

```
sudo mkdir /usr/local/var/lib/elasticsearch/
chmod -R $USER /usr/local/var/lib/elasticsearch
```

After attempting to run elastic search this next time, it worked! 

```
elasticsearch
```

Phew, that worked! I was happy to resume the work I'd been doing. I hope this is helpful to anyone who is experiencing the same issue I had.

![Happy](https://media.giphy.com/media/MTclfCr4tVgis/giphy.gif)

#### Other links I tried
- https://github.com/elastic/windows-installers/issues/249
- https://discuss.elastic.co/t/error-encountered-after-modified-elasticsearch-yml/125526/2
- https://stackoverflow.com/questions/46860229/elasticsearch-after-change-path-data-unable-to-access-default-path-data
Hello WebVR with react-three-fiber
Tags: react, reactthreefiber, threejs
Published: 2020-04-23 19:06:07


{% codesandbox r3f-hello-world-3qdm3 %}

I have been experimenting with [react-three-fiber](https://github.com/react-spring/react-three-fiber) and also trying to use it to build virtual reality scenes. Starting form somewhere simple, I decided to rebuild the ["Hello WebVR"](https://aframe.io/examples/showcase/helloworld/) example found in [A-Frame](https://aframe.io/).

The first thing that caught me off guard was that after the scene is setup by react-three-fiber, it calls `camera.lookAt(0,0,0)`, even when passing a rotation to `<Canvas camera={{ rotation: [x, y, z] }}  />`. I created a `Camera` component that takes the camera from `useThree()` and reset the camera rotation inside a `useEffect()` react hook.

I created some wrapper components for the basic shapes (Cylinder, Sphere, Box, Plane) and define a flat set of props that would be passed to `<mesh />` and its corresponding geometry component. This caused some interesting TypeScript issues and took me a bit to figure out how to take react-three-fiber's types and merge them with additional props.

Using generics, I created a single type I could use for each of the shape components

```typescript
type MeshShape<T extends new (...args: any) => any, P = {}> = Overwrite<
  ReactThreeFiber.Object3DNode<THREE.Mesh, typeof THREE.Mesh>,
  {
    args?: ConstructorParameters<T>;
  } & P
>;

// Box Props
type IBox = MeshShape<
  typeof THREE.BoxBufferGeometry,
  {
    color?: ReactThreeFiber.Color;
  }
>;
```

I ported some of the [look-controls](https://github.com/aframevr/aframe/blob/master/docs/components/look-controls.md) component from A-Frame to get drag mouse look working, excluding touch events.

My next exploration will be to create a HUD.
SIMPLE CALCULATOR (python3)
Tags: python, codenewbie
Published: 2020-04-23 19:02:28


I will continue to update this as I add more to it, a simple calculator using while loops if elif else statements. I love this example and can't wait to improve it. 




#You are now using SimpleCalc
print('What would you like to calculate?')

while True:
    print('Options:')
    print('Enter "add" to add two numbers')
    print('Enter "subtract" to subtract two numbers')
    print('Enter "multiply" to multiply two numbers')
    print('Enter "divide" to divide two numbers')
    print('Enter "quit" to end the program')
    user_input = input(" ")

    if user_input == "quit":
        break

    elif user_input == "add":
        num1 = float(input('Enter a number: '))
        num2 = float(input('Enter another number: '))
        result = str(num1 + num2)
        print('The answer is ' + result)

    elif user_input == "subtract":
        num1 = float(input('Enter a number: '))
        num2 = float(input('Enter another number: '))
        result = str(num1 - num2)
        print('The answer is ' + result)

    elif user_input == "divide":
        num1 = float(input('Enter a number: '))
        num2 = float(input('Enter another number: '))
        result = str(num1 / num2)
        print('The answer is ' + result)

    else:
        print('Unknown input')



 solo learn
 FRANCNSTEIN © 2020 | Created 𝗐𝗂𝗍𝗁 ❤
About Ruby Hash#delete and Hash#delete_if
Tags: ruby, hash, documentation
Published: 2020-04-23 18:50:33

---
title: About Ruby Hash#delete and Hash#delete_if
published: true
description: 
tags: ruby, hash, documentation
---

Get more information and more examples at my AboutRuby project:
* [AboutRuby project](https://github.com/BurdetteLamar/AboutRuby/blob/master/core/Hash/api/markdown.md#delete)

Here's the write-up over at the Ruby project:
* [Ruby project](https://ruby-doc.org/core-2.7.0/Hash.html#method-i-delete)
Good Ideas for App Startups
Tags: appidea, newappideas, coolappideas, greatappideas
Published: 2020-04-23 18:10:17

Currently, there are an estimated 3.3 million apps on Google Play Store and over 2.2 million iOS apps on App Store. (Source), making a total of over 5.5 million apps on the two most popular platforms.

Some of the most simple app ideas have converted into multi-million dollar businesses: Instagram, WhatsApp, Tinder, Uber… the list reads like the who’s who of the digital corporate world.

If you’re considering getting an app built, it’s the right thing to do and this is the right time to do it. Here’s a list of the top mobile app ideas for 2020:

1.AGRICULTURE APP
2.VACATION FINDING APPS
3.DOCTOR CONSULTING APPS
4.INTEREST SPECIFIC DATING APP
5.AI BASED JOB AND EMPLOYMENT APPS
Clarifying Authentication and Authorization with Lupe Fiasco
Tags: beginners, security
Published: 2020-04-23 17:49:42

*(This post is a fragment of a post from [Software Mentor](https://softwarementor.substack.com/) - a newsletter aimed at accelerating the careers of junior engineers)*

When we talk about web security, two extremely important ideas often come up: Authentication and Authorization.

They confused me for years, and I avoided their distinction by blurring them under the topic of "Auth".

But don't be like me - let's clarify what these two words mean. To do so, let's get some help from our friend Lupe Fiasco, whose hit song  "Superstar" is an excellent mnemonic for Authentication and Authorization. Let's see why:

**Authentication** - often referred to as **AuthN**, is all about proving your identity. The key lyrics from Superstar:  🎤🎶 *“If you are, what you say you are - a superstar, then have no fear, the camera's here, and the microphone - and they wanna know”.* An authentication system cares about you proving your identity. It might not give you a camera or a microphone, (more likely it'll ask for a password or a fingerprint scan), but it just wants to know, if you really are who you say you are.

**Authorization** - often referred to as **AuthZ**, is all about determining your access level. The key lyrics from Superstar: 🗣 *"Well, your name ain't on the guest list, who brung you? You! The more famous person you come through".* The more famous person has greater privileges at this party. AuthZ is all about checking our directory (our guest list) to see what level of privileges you get. 

So AuthN - are you who you say you are? (Identity)
And AuthZ - are you on the guest list? Then you come through. (Privileges)

Thanks Lupe!
{% youtube hVkBlsgthLg %}
How to add roles for user while user registration form angular

Tags: angular, javascript, typescript
Published: 2020-04-23 18:05:03

I'm working on a Spring Boot based web application in Java. I'm trying to create admin/user registration for my application. To be honest this is my first application and I don't really know how to add user roles while registration in front end whereas I did it in back end role added without problem. I've searched about this issue, but no one helps me how to add roles.

In my database it added like user how ever the input are.

If someone tell me you should add the roles in constructor's user, the role in user is Set Role> while input value is Set String> it should convert it first to a Set Role> and add it to user.setRole(x) then I can use it but how can I use it in front end? that's my problem.

link contains part of code : https://stackoverflow.com/questions/61392221/how-to-add-roles-for-user-while-user-registration-form-angular
Projeto de Estudos
Tags: python, github, beginners, webdev
Published: 2020-04-23 18:02:36

Como tinha falado da última vez, venho agora falar um pouquinho sobre meus projetos que estão no [meu github](https://github.com/amaralluiz).

O primeiro que gostaria de falar é [este aqui](https://github.com/amaralluiz/screensaver_dvd_python), que nada mais é do que uma imitação daqueles screensavers de DVDs de antigamente, lembram?
Aprendi com este projeto um pouquinho da biblioteca pygame. Foi um bom projeto para começar, pois assim consegui ter um feedback em tela sobre o que eu estava fazendo. Pra quem quiser tentar fazer, segui [este tutorial](https://dev.to/jcowie/creating-the-dvd-screensaver-in-pygame-3di) aqui no DEV mesmo.

O segundo, é [este](https://github.com/amaralluiz/jogos-estudo-python), que é um projeto em python bem simples, onde você seleciona 2 jogos, um de adivinhar número e outro de forca. Foi um projeto seguido no curso de Python da Alura, feito pra quem está aprendendo a linguagem. Recomendo muito pra quem tá começando. O jogo de adivinhação é bom para conhecer as estruturas de seleção, enquanto o de forca aprendi mais sobre estruturas de repetição, manipulação de strings, criação de funções e como organizar um pouco melhor o código. Ainda existem coisas que podem melhorar no código deste projeto e irei dar mais atenção depois.

O [terceiro](https://github.com/amaralluiz/curso-hmtl-css-alura) foi seguindo o curso de HTML e CSS também da Alura. Eu não entendia muito bem como criar páginas web, mas este curso me mostrou o básico muito bem. Foi feita um site para Barbearia Alura, onde temos uma página inicial, de produtos/serviços oferecidos e uma de contato, com um formulário e todas as páginas com um design muito bonito e atual.

O [último projeto](https://github.com/amaralluiz/jogoteca-flask) e mais recente é um da jogoteca utilizando python e o framework Flask, uma pequena página web onde você pode colocar uma lista de jogos. Foi feito um CRUD inicial, mas sem conexão com banco de dados ainda, somente salvando em memória. Este, pra mim, foi o projeto mais importante, porque com ele consegui criar uma página web no trabalho, já conectando com banco de dados e que está acrescentando demais no meu aprendizado.

Futuramente penso em voltar em todos estes repositórios e melhorar o código, criar mais funcionalidades e tudo mais.
Também planejo criar um projeto todo do zero, somente pegando o que aprendi em cursos e tentando aplicar, acho que esta é a melhor forma de aprender.
On.NET Episode: Working with Channels in .NET
Tags: dotnet, async, azure, threads
Published: 2020-04-23 17:56:06

Channels enable a producer to safely pass data over to a consumer along with the appropriate notifications in both directions.

In this episode, Stephen Toub chats with Rich about the what, why and how of using the System.Threading.Channels library. They walk us through a simple demo of using channels and also discuss the various strategies at our disposal.

{% youtube gT06qvQLtJ0 %}

If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).


## Useful Links
* [Introduction to System.Threading.Channels](https://devblogs.microsoft.com/dotnet/an-introduction-to-system-threading-channels/?WT.mc_id=ondotnet-c9-cephilli)
* [System.Threading.Channels on NuGet](https://www.nuget.org/packages/System.Threading.Channels)
* [System.Threading.Channels on GitHub](https://github.com/dotnet/runtime/tree/df3930ecd237000813d1833286513d65557efffe/src/libraries/System.Threading.Channels)
BeTheHope - First Glimpse [1]
Tags: twiliohackathon, donation, shorturls, qrcodes
Published: 2020-04-23 17:46:44

Hey everyone, I’m Abhinav Chawla from Toronto, Canada. FYI: This is my first post here at DEV.to, and I won’t lie, I didn’t know about this platform before I came across this hackathon. So thanks to Twilio for bringing me here; I have been quite impressed with the community (somehow, I’m getting a strong feeling that I’ll be liking this over the ‘blue’ social platforms 😉) 

### So, what’s my project?
_….Wait, wait. Before explaining my idea, let me tell you how I came up with it in the first place._

**Story 1**: It was my sister’s birthday back in January, and I decided to donate on her behalf. Once I started exploring options online, I realized that it took me **an average of about 20 clicks** before I could reach the “Donate” button (including finding the Call-to-Action button, account registration, personal information, payment details). If I’m in a mood to drop $25 from my pocket, you better take it ASAP before my brain forces me to buy a pizza _(I’ll take pineapple on it, oops)_ with it.

**Story 2**: Before the social distancing laws came into effect, I noticed a friendly rally held by animal activists in Toronto. I approached a volunteer and asked them how I could donate. Since I didn’t have cash on me (btw, who still carries bills?), they handed me **a website to go home and open and donate**. _And of course, that never happened!_


###Yeah, yeah, but what’s the idea?
Since then, I always thought what if donations could be quicker, even instantaneous as these decisions are impulsive; especially within the millennials. So, with all the motivation (hackathon’s push) needed, I decided to build out my solution. **BeTheHope provides short URLs and QR codes, which can be distributed via texts, emails or social media providing an elegant user experience with an option of one-click payments integrated via Apple Pay and Google Pay.**

Let me show you guys a quick glimpse (I promise I’ll share more soon), here’s the teaser:
{% youtube y_fr0XbOyiE %}

How does it solve the problem? Well, I would finish donating by the time my brain wanders off and takes me to Dominos website. Plus, what if the volunteers at the rally wore a t-shirt with the QR code printed? Things could have been much simpler. 

Lastly, I came up with the name *BeTheHope* for the project.

_[Another FYI: I am a master procrastinator when it comes to writing blog posts, so sorry for not putting this up this sooner. Keep an eye for updates in the following days, before the final submission.]_
How to verify if point of coordinates is inside polygon [Javascript]
Tags: tips, geolocation
Published: 2020-06-07 20:24:23

---
title: How to verify if point of coordinates is inside polygon [Javascript]
published: true
date: 2020-04-23 17:46:07 UTC
tags: Tips,geolocation
canonical_url: https://boobo94.xyz/tips/how-to-verify-if-point-of-coordinates-is-inside-polygon-javascript/
---

Solution ES6

```

/**
 * Verify if point of coordinates (longitude, latitude) is polygon of coordinates
 * https://github.com/substack/point-in-polygon/blob/master/index.js
 * @param {number} latitude Latitude
 * @param {number} longitude Longitude
 * @param {array<[number,number]>} polygon Polygon contains arrays of points. One array have the following format: [latitude,longitude]
 */
export function isPointInPolygon (latitude, longitude, polygon) {
  if (typeof latitude !== 'number' || typeof longitude !== 'number') {
    throw new TypeError('Invalid latitude or longitude. Numbers are expected')
  } else if (!polygon || !Array.isArray(polygon)) {
    throw new TypeError('Invalid polygon. Array with locations expected')
  } else if (polygon.length === 0) {
    throw new TypeError('Invalid polygon. Non-empty Array expected')
  }

  const x = latitude; const y = longitude

  let inside = false
  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
    const xi = polygon[i][0]; const yi = polygon[i][1]
    const xj = polygon[j][0]; const yj = polygon[j][1]

    const intersect = ((yi > y) !== (yj > y)) &&
            (x < (xj - xi) * (y - yi) / (yj - yi) + xi)
    if (intersect) inside = !inside
  }

  return inside
};

```

The post [How to verify if point of coordinates is inside polygon [Javascript]](https://boobo94.xyz/tips/how-to-verify-if-point-of-coordinates-is-inside-polygon-javascript/) appeared first on [boobo94](https://boobo94.xyz).
Is it possible, to convert a Google Document into a Google Spreadsheet?
Tags: google
Published: 2020-04-23 17:45:18


I have a details listed out in a Google Docs like in the following format:

```
[4:05AM] - abc
[6:00AM] - def
[6:05AM] - ghi
[8:05AM] - jkl
```

I want to convert this into Google Sheets.
Rather than copying one by one is there a better way to convert the Docs into Sheets. Thanks.
Looking for a side project, which you could use yourself every day and which is even useful when working from home? 
Tags: help, angular, opensource, productivity
Published: 2020-04-23 17:40:42

---
title: Looking for a side project, which you could use yourself every day and which is even useful when working from home? 
published: true
description: I'm looking for people who would be willing to support me on my ongoing quest to make the app better every day.
tags: help, angular, opensource, productivity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/8w8fg63vy3t0sjwwf9ja.jpg
---

I'm resorting to cats. This is serious!

[Super Productivity](https://github.com/johannesjo/super-productivity) is a to do list / time tracker which comes with Jira, GitHub & Gitlab integrations as well as some nifty productivity helper features, such as a pomodoro timer and a break reminder.

It's my favorite side project and I use it every day to plan my tasks and to track my time. But my skill set and also my perspective after using it for over two years are limited.

I need your help!

## Things that would help

### Feedback
* What do you like and what not?
* What should be improved?
* What essential features are missing?
* What features seem useless to you or not well thought out?
* If you don't, why won't you use the app?
* How do you use the app, if so? I need to figure in which direction to head, as there might be too many features at the moment.
* Reporting bugs

### Design & UX
I am not a designer. So there is probably a lot not to like. It would be absolutely great if a professional could have a look or two.
* Are the general concepts working? What should be improved?
* Providing better icons

### Features/Coding
* I [started working on an android version](https://github.com/johannesjo/super-productivity-android) and I really suck at it...
* there are a lot of [open issues](https://github.com/johannesjo/super-productivity/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) most of them being improvement suggestions