teleren/devto huggingface dataset:
Angular View Logic SOC
Published: 2020-07-08 15:03:17

All new Angular components get 4 default files, one of them is this file
```
name.component.ts
```
It's really easy to just put all our logic right in this file, but does this violate the Separation of Concerns Principle?

It depends on who we talk to about this.  If we are strict, the answer is that the name.component.ts file should have minimal logic, *all of it pertaining to the view only*. 

All other logic which processes onClick, onGet, onSubmit, onSave, onDelete etc. should be farmed off into a new ts module such as "someCommonFile.ts"

Like this:
```
// save is an exported function we import
import {save} from './someCommonFile'

onSave(){
  // just call the function in someCommonFile
  save(parameters);
}
```

When we first start creating new components, we would have put all the save logic into the .component file, but by moving that function elsewhere we are separating concerns which is good, and in this case better.

Remember that exported functions can be used anywhere.

Our new mantra could become "Keep those Views Clean!"

JWP 2020
Twitter automatic name changer based on your followers!
Tags: python, devops, showdev, codenewbie
Published: 2020-07-08 14:58:00

Twitter automatic name changer based on your followers
Example-

my twitter handle @erRaghavKhanna

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0r32jugclyrwtfehpi8s.PNG)

##Usage

Github link - https://github.com/raghavkhanna30/twitter-auto-name-changer

##Step 1 - Getting twitter API keys
go to the twitter developers page. In the Create an app enter the informations like app name, app description and so on. it asked me to clearly explain the reason of how I'm going to use the app After reviewing the terms,] app will be created. Note down the Consumer API key, Consumer API Secret key and Access token & access token secret keys!

##Step 2 - updating config.py
in config.py enter your Consumer API key, Consumer API Secret key and Access token & access token secret keys. after that save it.

In mainbot.py Edit your username and you are all done !

##Heroku deployment
for this you need to create a procfile with worker as mainbot.py and that's it !
Get Started with Power Apps Component Framework (PCF) 
Tags: ama, powerfuldevs, azure, powerapps
Published: 2020-07-08 14:48:36

---
title: Get Started with Power Apps Component Framework (PCF) 
published: true
description: In this session, Cassie Breviu will teach you how the Power Apps Component Framework helps create reusable components that can be integrated into your Power Apps. 
tags: ama, powerfuldevs, azure, powerapps 
--- 
   ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/h3gei8mo5b3q8xddo6ry.jpg)
<hr /> 
#### #PowerfulDevs Conference 

`RSVP HERE BY JULY 15:` 
[https://aka.ms/powerfuldevsconf](https://aka.ms/powerfuldevsconf) 
  
The [Powerful DEVs Conference](https://aka.ms/powerfuldevsconf) is the first virtual conference of its kind. We will showcase how developers can leverage the Power Platform to build applications faster and with far less effort. Connect with industry-recognized ProDev influencers, Microsoft Cloud Advocates, trusted and diverse community leaders, and members of the Power Platform Team. 
  
`BOOKMARK THIS FOR RESOURCES AND DISCUSSION WITH SPEAKERS`   
{% link https://dev.to/azure/powerfuldevs-conference-join-us-on-july-15th-online-fe3 %} 
  
Revisit this page during the event to engage in live (and post-event) discussions on those topics with both speakers and community. The speakers will be here for a live Q&A for at least 30 minutes immediately after their session concludes. After the event, come back to find additional slides, videos, and resources for this session. 
  
<hr/> 
  
## About This Session: 
  
`July 15, 2020: 14:00 PDT - 14:25 PDT` 
  
Learn how the Power Apps Component Framework helps you create reusable components that can be integrated in your Power Apps. The component framework empowers developers and app makers to build code components when the out-of-the-box components don't fit an app maker's needs. We will go step-by-step to create a code component using familiar technologies like TypeScript, node, html, and css. 
  
## About the Speakers: 
  
Cassie is a Cloud Developer Advocate @ Microsoft and .Net Software Engineer. Follow [@cassieview](https://twitter.com/cassieview) on Twitter.
MariaDB 10.4 On OpenBSD 6.7: Install
Tags: mariadb, mysql, openbsd, installation
Published: 2020-07-08 14:37:14

Installing MariaDB 10.4 on OpenBSD 6.7 is almost the same to MariaDB 10.0 on OpenBSD 6.4:

{% post nabbisen/installing-mariadb-server-on-openbsd-5lm %}

There is, however, a significant difference: "The unix_socket authentication plugin is now default on Unix-like systems" [since MariaDB 10.4](https://mariadb.com/kb/en/changes-improvements-in-mariadb-104/).

The steps to install it is as below.
First, install the package and prepare the daemon:

```console
$ doas pkg_add mariadb-server
```

pkg-readme is created as `/usr/local/share/doc/pkg-readmes/mariadb-server`.
Create a default database first:

```console
$ doas rcctl enable mysqld
$ doas mysql_install_db
$ doas rcctl start mysqld
```

Then execute:

```console
$ doas mysql_secure_installation
```

You'll be asked whether to use the unix_socket authentication or not, after the first confirmation "Enter current password for root (enter for none):".
The steps followed by it were as usual; such as whether to set root password, remove anonymous users, disallow root login remotely and remove test database.
That'll be it.
100K+ Views less than One Year
Tags: showdev, productivity, career
Published: 2020-07-08 14:32:38

Less than one year I have written 40+ posts and read a lot of articles here which have helped me how to write properly and improve my coding and knowledge daily. I have now achieved 100k+ Views on my all posts less one than one year. I would like to thank all the people and the DEV Community for their support!

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

Hope I will be able to achieve more things and get more support from you guys! Love you all!!
Hackusama - build custom blockchains and tools on Polkadot's wild cousin, Kusama
Tags: blockchain, rust, hackathon
Published: 2020-07-08 14:28:43

# Welcome to [Hackusama](https://hackusama.devpost.com/?utm_source=devto&utm_medium=referral&utm_campaign=hackusama&utm_content=devto), the first-ever hackathon for the Kusama or Polkadot ecosystem. 

[Hackusama](https://hackusama.devpost.com/?utm_source=devto&utm_medium=referral&utm_campaign=hackusama&utm_content=devto) is a **7-week online hackathon**, launched for developers to "Build a Blockchain" or submit your wildest tools, visualizations, and ideas to the "Open Hack" category. A **$30,000 USD prize pool** is up for grabs. 

[Watch the Introduction to Hackusama webinar](https://www.youtube.com/watch?v=bPJUQkr6x6U&feature=youtu.be) for a complete overview and technical presentation about Kusama and Substrate. 

[Kusama](https://kusama.network/) is a network built by Dr. **Gavin Wood, Polkadot founder and cofounder and CTO of Ethereum**. It's a risk-taking, fast-moving ‘canary in the coal mine’ built with nearly the exact same code as its cousin network, Polkadot. Kusama is a living, breathing, multichain ecosystem built to put the best tech in the hands of change agents to spark innovation, disrupt the status quo, and quickly push the limits of what’s possible.


### 👇👇 **JOIN THE EVENT AND START HACKING** 👇👇
[![Hackusama](https://dev-to-uploads.s3.amazonaws.com/i/pfw2sx4px3km1a8rhlwt.png)](https://hackusama.devpost.com/?utm_source=devto&utm_medium=referral&utm_campaign=hackusama&utm_content=devto)
Top 5 Python IDE in 2020
Published: 2020-07-08 14:23:08

GitHub’s second-most popular language and the most popular language for machine learning.

Python… the most popular and favorite programming language in the world for programmers of all age groups. For a programmer, a Code Editor or an IDE is the first point of contact with any programming language, making its selection one of the most crucial steps in the journey ahead. Understand that the best code editor or IDE depends on so many things such as programming language, project type, project size, OS support and considering a lot of other features. If we talk about Python so this language is also not an exception.

                
Here is the List of Best Python IDE


--PyCharm--

-It is considered as an intelligent code editor, fast and safe 
 refactoring, and smart code.
-Features for debugging, profiling, remote development, testing 
 the code, auto code completion, quick fixing, error detection and 
 tools of the database.
-Support for Popular web technologies, web frameworks, scientific 
 libraries and version control.

--Spyder--

-Auto code completion and syntax highlighting.
-Ability to search and edit the variables from the graphical user 
 interface itself.
-Static code analysis
-It is very efficient in tracing each step of the script execution 
 by a powerful debugger.

--Eclipse PyDev--

-Pydev supports Django integration, Unittest integration, PyLint 
 integration
-Code folding and code completion with auto import
-Good syntax high lighting and remote debugger
 Interactive console
-Allows you to create a Google App Engine (GAE) Python project

--IDLE--

-Python shell with syntax highlighting
-Call stack’s clear visibility
-Multi-window code editor that allows features like smart 
 indentation, autocomplete, etc
-It has an interactive interpreter with colorizing of input, 
 output, and error messages.
-Program animation or stepping.

--Wing--

-Automatic multi-process, child process, remote debug process and 
 refactoring, etc.
-Test-driven development with various frameworks like the 
 unittest, pytest, nose, doctest, and Django testing.
-It also has auto code completion in which the error is displayed 
 in a feasible manner and line editing is also possible.
 Remote development support.
#JulyOT - Develop and deploy Custom Object Detection Models with IoT Edge DeepSteam SDK Module
Tags: ai, computervision, nvidia, iot
Published: 2020-07-08 14:20:00

---
title: #JulyOT - Develop and deploy Custom Object Detection Models with IoT Edge DeepSteam SDK Module
published: true
description: Erik and Paul demonstrate how to leverage a model developed with CustomVision.AI for use with the IoT Edge DeepSteam SDK Module and then explore how to employ a Custom Yolo Parser for use with YoloV3 and YoloV3 Tiny. 
tags: artificialintelligence, computervision, nvidia, iot
---
Erik and Paul demonstrate how to leverage a model developed with CustomVisionAI for use with the IoT Edge DeepSteam SDK Module and then explore how to employ a Custom Yolo Parser for use with YoloV3 and YoloV3 Tiny.

Part 3 of a 5 part series created for #JulyOT - more details @ http://julyot.com

The full steps to reproduce this project can be found on github @ https://github.com/toolboc/Intelligent-Video-Analytics-with-NVIDIA-Jetson-and-Microsoft-Azure

For more information on the services employed, check out:
[Cognitive Services Documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/?WT.mc_id=julyot-devto-cxa)
[Custom Vision Service Docs:](https://docs.microsoft.com/en-us/azure/cognitive-services/Custom-Vision-Service/?WT.mc_id=julyot-devto-cxa)
[CameraTaggingModule](https://dev.to/azure/introduction-to-the-azure-iot-edge-camera-tagging-module-di8)
[Yolo Object Detection](https://pjreddie.com/darknet/yolo)
Using AWS with Ruby - in 2007
Tags: ruby, programming, history, todayilearned
Published: 2020-07-08 14:16:47

This one is a bit of a treat. Normally I capture blog posts, articles, releases or talks. But this week I've found an AWS-with-Ruby tutorial archived from the AWS site this week in 2007! Check it out here: http://www.pastrubies.com/
LibreSSL on OpenBSD: Error due to missing v3_ca in extension
Tags: libressl, openssl, openbsd, troubleshooting
Published: 2020-07-08 14:13:48

To use [`openssl`](https://man.openbsd.org/openssl.1), one of the utilities of [LibreSSL](https://www.libressl.org), and create root and intermediate certificates with v3_ca extensions, error might happen in [OpenBSD](https://www.openbsd.org) [6.7](https://www.openbsd.org/67.html).

This is because `/etc/ssl/openssl.cnf` doesn't have `[ v3_ca ]` section by default.
The solution is to create the backup, if necessary, and append the section.

```console
$ doas cp -p /etc/ssl/openssl.cnf /etc/ssl/openssl.cnf.org
$ doas nvim /etc/ssl/openssl.cnf
```

`[ v3_ca ]` section:

```diff
+ [ v3_ca ]
+ basicConstraints = critical,CA:TRUE
+ subjectKeyIdentifier = hash
+ authorityKeyIdentifier = keyid:always,issuer:always
```

Besides, I met this error when trying to build tls connection between [PostgreSQL](https://www.postgresql.org/) server and client:

{% post nabbisen/postgresql-tls-connection-k1h %}

like this:

```console
$ # create a root certificate authority
[...]
$ openssl x509 -req -in root.csr -text -days 36500 -extfile /etc/ssl/openssl.cnf -extensions v3_ca -signkey root.key -out root.crt
Error Loading extension section v3_ca
```
Welcome Thread - v81
Tags: welcome
Published: 2020-07-08 14:05:56

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

![sup dog](https://media.giphy.com/media/l41lShcuautqDZc5i/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!**
#AzureFunBytes Episode 5 - Cloud Windows VM with @TechieLass Reminder - 2PM EDT Thursday 7/9/2020
Tags: azure, beginners, cloud, windows
Published: 2020-07-08 14:00:48

New #AzureFunBytes - Windows VM on @azurefunbytes Azure


7/9/2020 at 2PM EDT @TechieLass will help me solve three problems on twitch!

 
*  How do we start a new Win VM?
*  How do we prep this VM for prod?
*  How do we handle cost management?


Sarah and I will discuss her tenure in technology with me and even answer some questions.


![AzureFunBytes logo](https://res.cloudinary.com/practicaldev/image/fetch/s--pxlTjTrD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/699md0mmakw0cbutamyq.jpg)


---


AzureFunBytes! - Byte-sized content with a live Twitch show! 

Learn about
Azure fundamentals with me!

Live stream is available on Twitch at 2 pm EDT Thursday. You can also find the recordings there as well.

https://twitch.tv/azurefunbytes
https://twitter.com/azurefunbytes

Join me, ask questions and learn about Azure!

Microsoft Learn: [Azure Fundamentals](https://cda.ms/1jV)
Microsoft Azure: [$200 Free Credit](https://azure.microsoft.com/free/?WT.mc_id=blog-devto-jagord)
My 2020 H1 in review
Tags: creativecoding, python, p5js
Published: 2020-07-08 13:59:48

---
title: My 2020 H1 in review
published: true
description: 
tags: creativecoding, python, p5js
//cover_image: https://direct_url_to_image.jpg
---

{% youtube nONwrjSQ2yQ %}

In the first half of 2020, I participated in my first art exhibitions, created music videos, served my sites to 28,930 visitors, made art for good, achieved a 50% savings rate, embarked on socially distant explorations, and set ambitious goals for the rest of 2020.

My name is Hamilton and this is my 2020 H1 in review: https://blog.iamhamy.xyz/posts/2020-h1-review/
How to pass data between view controllers in swift
Tags: tutorial, beginners, codenewbie, programming
Published: 2020-07-08 13:54:54

#Background
A month ago, I was working on an iOS app that used a realtime database in Firebase to more efficiently store, access, and utilize data inputted by a user.

When storing and retrieving the user’s data, I needed to create a reference to my database.

In order to successfully create the reference, I needed to know the correct child name in my database in Firebase. The child name wasn’t constant though, so I couldn’t hardcode it. 

I needed to assign the child name to a variable and pass the variable into my database reference.

This is where the problem occurred...

#The Problem
For my project, I could only access the child name from my MainViewController and could only create my database reference in my SecondaryViewController. 

Accordingly, I would need to pass the name from my MainViewController to my SecondaryViewController. 

I researched several different methods and settled on using a segue to pass the child name between view controllers.

Here’s how I did it...

#The Solution
First, in my MainViewController, I created a variable to access and store the child name.
```swift
let name: String = data.name
```

Second, in my SecondaryViewController, I created a variable for the child name. This is where the name would be stored when passed from the MainViewController to the SecondaryViewController.
```swift
var name: String = " "
```

Third, in my MainViewController, I defined the prepare(for:sender:) function which would be invoked before the segue between view controllers.
```swift
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
}
```
        
Fourth, inside the prepare(for:sender:) function in my MainViewController, I used an if statement and optional casting to determine if the segue destination is the SecondaryViewController. I also defined a new variable called vc to give me access to my name variable in the SecondaryViewController.
```swift
if let vc = segue.destination as? SecondaryViewController {
}
```

Fifth, inside of the if statement in the MainViewController, I accessed the name variable in the SecondaryViewController and set it equal to the name variable in my MainViewController.
```swift
vc.name = name
```

That’s all! I’ve found it to be a pretty simple and effective method. Here’s what the full code looked like:

MainViewController:
```swift
let name: String = data.name
override func prepare(for segue: UIStoryboardSegue, sender: Any?)
    {
        if let vc = segue.destination as? SecondaryViewController
        {
            vc.name = name
        }
    }
```

SecondaryViewController:
```swift
var name: String = " "
```

#In Closing
Here’s another resource I found helpful in learning to pass data between view controllers: https://learnappmaking.com/pass-data-between-view-controllers-swift-how-to/ 

The segue method worked for me but there might be a better way to do it! Leave a comment how you would attack this problem and let me know if you have an easier method!
The hitchhiker’s guide to Ethereum
Tags: career, learning, blockchain, ethereum
Published: 2020-07-08 13:52:59

---
title: The hitchhiker’s guide to Ethereum 
published: true
description: The hitchhiker’s guide to Ethereum 
tags: #career #learning #blockchain #ethereum 
---

Blockchain has emerged from the once shadowy world of cryptocurrency to become [the most in-demand skill in 2020](https://business.linkedin.com/talent-solutions/blog/trends-and-research/2020/most-in-demand-hard-and-soft-skills), according to LinkedIn. The promise of blockchain is huge. And large companies are continuing to hire and expand their blockchain teams, incl. Facebook, Amazon, Microsft, EY, Deloitte, IBM, and Oracle, to name a few. So, it should be well worth the effort to become familiar with how blockchain works, what its perceived benefits are, and as a developer starting building on top of them.

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

Over the past few years, I've been helping and on-boarding new team members and developers into the blockchain space. This helped me to collect blogs, links, materials, and resources and see which worked well for everyone's learning journey. It's time to share that with a broader audience. This guide provides a starting point for developers who're keen to learn more about blockchain and development on top of Ethereum. It will be opinionated and not contain a full list of everything available. But rather, a concise list of highly recommended options, from my own experiences. 

The guide covers:
1. Blockchain foundations 
1. Ethereum 101 
1. Ethereum Development, Smart contracts & DApps 
1. Advanced Topics, privacy, performance & permissioning 
1. Next steps 

You can find it at [wslyvh.com](https://www.wslyvh.com/ethereum-guide/).
Daily Challenge #266 - Who Likes It?
Tags: challenge
Published: 2020-07-08 13:47:19

---
title: Daily Challenge #266 - Who Likes It?
published: true
series: Daily Challenge
description: Create the text that should be displayed when checking a post's likes.
tags: challenge
//cover_image: https://direct_url_to_image.jpg
---

You probably know the "like" system from Facebook and other pages. People can "like" blog posts, pictures or other items. We want to create the text that should be displayed next to such an item.

Implement a function likes :: [String] -> String, which must take in input array, containing the names of people who like an item. It must return the display text as shown in these examples:

```
likes {} // must be "no one likes this"
likes {"Peter"} // must be "Peter likes this"
likes {"Jacob", "Alex"} // must be "Jacob and Alex like this"
likes {"Max", "John", "Mark"} // must be "Max, John and Mark like this"
likes {"Alex", "Jacob", "Mark", "Max"} // must be "Alex, Jacob and 2 others like this"
```

For 4 or more names, the number in and 2 others simply increases.

Good luck!

***
_This [challenge](https://www.codewars.com/kata/5266876b8f4bf2da9b000362) comes from BattleRattle on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Markdown like syntax parser
Tags: showdev, javascript, markdown
Published: 2020-07-08 13:37:57

---
title: Markdown like syntax parser
published: true
description: 
tags: #showdev, #javascript, #markdown
---

Sometimes you want markdown like syntax but not exact markdown specification. I build a really tiny markdown like syntax parser that you can use out of box or use the functions it exposes to write a custom markdown parser

you can install the package using npm or yarn

```bash
$ npm i pico-markdown-parser
```

## Simple usage

```javascript
import pico from "pico-markdown-parser";

const htmlOutput = pico(`
  # Hello

  This is a sample text!!
`);
```

## Building your own parser

This parser is composed of many small parsers you can import those small parsers from the library and put them together in ways you see fit (like Lego pieces).


```javascript
import {
  choice, 
  many,
  heading,
  bold,
  anything 
 } from "pico-markdown-parser";

// This new parser now supports only bold and heading
const parser = (input) =>
  many(choice([heading, bold, anything]))
    .run(input)
    .result.join("");

const htmlOutput = parser(`
  # Hello

  This is a **sample** text!!
`);

```

If the small parsers it gives does not suit your need you can even write your own parser and combine it. This parser is based on [arcsecond](https://github.com/francisrstokes/arcsecond)

Here is the [repo](https://github.com/Rafi993/pico). PR's are welcomed !!!