teleren/devto huggingface dataset:
How to build an app using Electron
Tags: electron, javascript, node, html
Published: 2018-10-22 03:34:52

---
title: How to build an app using Electron
published: true
description: We look into how the electron app framework works and how to use it to create a simple progress counter application.
tags: electron, javascript, node, html
---

{% youtube Lva8LLQ7BVw %}
How to keep motivation?
Tags: career, advice, discuss
Published: 2018-10-22 03:20:01

---
title: How to keep motivation?
published: true
description: How to stay up and always be motivated to do and learn new stuff!
tags: #career, #advice, #discuss,
cover_image: https://thepracticaldev.s3.amazonaws.com/i/111tinl3nbdwv4qsztu1.jpg
---

Over the past few weeks/months I'm started to be confused and king of unmotivated on how to keep my motivation on things that I'd like to do outside of my daily work at a company.

How do you keep yourself motivated and what king of advice do you have to continue personal projects and always learn new things, and not get out of the ~rails~?
Filling SVG path with jpg image
Tags: svg, css, html
Published: 2018-10-22 02:58:17

---
title: Filling SVG path with jpg image
published: true
description: Hi there, I have be struggling to fill an image in my svg path. I have looked at forums to try and resolve my problem but was unable to. I would like to fill my svg shape path with an image. Below I have included an example of the problem I am experiencing. If you could take a look at it and potentially help me it would be much appreciated! {% codepen https://codepen.io/davidjbernstein/pen/QZBGYQ %}

tags: svg,css,html
---
The 3 Best dev.to articles #1 (14-20 October 2018)
Tags: showdev, discuss, bestofdev
Published: 2018-10-21 23:21:32

---
title: The 3 Best dev.to articles #1 (14-20 October 2018)
published: true
description: I will list the **top 3 best articles** I read last week here at dev.to that I think you should read if you haven't read it. I'm doing this to save the links of my favorites articles here at [dev.to](https://dev.to/) in order to find them whenever I need and to showcase some awesome articles written here at dev.to CUZ THEY DESERVE. Lets start...
tags: showdev, discuss, bestofdev
---
![The 3 Best dev.to articles #1 (14-20 October 2018)](https://thepracticaldev.s3.amazonaws.com/i/s13t3mjwnky84y8q4spt.jpg)

This article should have been posted on Saturday but I had electricity problems at home. I will list the **top 3 best articles** I read last week here at dev.to that I think you should read if you haven't read it. I'm doing this to save the links of my favorites articles here at [dev.to](https://dev.to/) in order to find them whenever I need and to showcase some awesome articles written here at dev.to CUZ THEY DESERVE. Lets start... 


{% link https://dev.to/helenanders26/how-to-avoid-relocation-depression-2md8 %}

I'm learning English and I confess that when I see this article title I still don’t understand very well what does “relocation blues” means. But I challenged myself to read this article and I found that it was written for me because I’m experiencing some mental health issues and I was willing to travel thinking that it would help. The author of this article explained through this article that it wouldn’t be so helpful and I do agree with her arguments. I really recommend this article. And don’t forget to follow the author [Helen Anderson](https://dev.to/helenanders26) 



{% link https://dev.to/gsto/choose-your-next-article-topic-with-this-exercise-17m2  %}

Have you never fallen out of your writing habits? Or do you want to start writing but you don't know where to start? Or what to write about? Choosing an article topic can be paralyzing. Read this article and you will know what to do. And don't forget to follow the author [Glenn Stovall](https://dev.to/gsto)



{% link https://dev.to/aviaryan/why-you-should-make-things-12ob  %}

As a developer, you are constantly learning. Whether you're learning  informally through reading an article like this now, or conducting research, many experiences can provide new and important information that enhance your skills and overall knowledge.

> I don't know about other fields of study but making is of paramount importance in Computer Science. Making means creating something. 

This article recommend us to put our knowledge into practice. Follow [Avi Aryan](https://dev.to/aviaryan) for more motivating articles.

Comment down below the best 3 articles that you read in the past week and lets share knowledge and put that into practice. Thanks.
In your environment, does a college degree matter?
Tags: career, discuss
Published: 2018-10-21 20:56:45

> Skills, not degrees. (Jeff Weiner, CEO of LinkedIn)

In Brazil, I can see a lot of companies changing their mindsets about hiring only people who have a college degree. With the ascension of online learning, and well known educational organizations, like Udacity, some companies are valuing more the skills than the degrees.

Unfortunately here in Brazil, although some companies are changing, this is a distant reality.

In your environment, does a college degree matter?
How to Get the Git Directory
Tags: ruby, git, github, opensource
Published: 2018-10-21 18:54:37

---
title: How to Get the Git Directory
published: true
description: 
tags: ruby, git, github, opensource
---
Here's a code snippet that shows how to get the git directory for a git project:

```ruby
def git_clone_dir_path
  git_dir = `git rev-parse --show-toplevel`.chomp
  $?.success? ? git_dir : nil
end

p git_clone_dir_path
```

[Simplified per reply below.  Thanks, Bez!]

This works in any directory in the project.

I use this for a test that involves a project-specific path.  On my machine, a test might generate an actual-value path such as <code>C:/Users/Burdette/Documents/GitHub/markdown_helper</code>*whatever*.

If I put use that path as the expected value, it

![](https://blog.codinghorror.com/content/images/uploads/2007/03/6a0120a85dcdae970b0128776ff992970c-pi.png)

On your machine's clone, that path would be different.

So in my expected values, I put <code>git_dir/</code>*whatever*. The test can then substitute in the local git directory.

That lets the test work on any machine.
Printing Articles and Blogs in 2018
Tags: tips, chrome, firefox
Published: 2018-12-30 16:41:00

---
title: Printing Articles and Blogs in 2018
published: true
tags: tips,chrome,firefox
canonical_url: https://www.stephencharlesweiss.com/2018/10/21/printing-articles-and-blogs-in-2018/
---

There are more free resources out there today than ever before. For a student, it’s a glorious time.

Despite the rise of great annotating tools ([Instapaper](https://www.instapaper.com/u), [Highly.co](https://www.highly.co/) – both of which I use regularly), I still find it helpful to read and annotate on paper depending on the content.

Getting there though is surprisingly difficult as websites have de-prioritized making it simple.

Take Medium.com for example. A few years ago, Marcin Wichary wrote about [designing Medium’s print experience](https://medium.design/printing-medium-stories-89f381b903c9) to translate articles from the web to the page. Today, that feature doesn’t exist.

Medium’s not alone. Try printing just about any website using `Ctrl+P` or `Cmd+P` and you’ll likely be in for a bad time.

I came across a pretty simple solution though: the reader view. Reader view comes built into Safari, Firefox. On Chrome, you will need an extension – I’ve been using [Reader View](https://chrome.google.com/webstore/detail/reader-view/ecabifbgmdmgdllomnfinbmaellmclnh/related?hl=en) and enjoy it so far.

By stripping away “clutter”, these methods create clean webpages that are much simpler to print, emphasize the text, not the page styling. It also means a much nicer layout for printing – wider margins, readable font sizes (because you don’t need to resize the page), etc.

## The steps:

1. Load up the article, blogpost, etc. in the Reader View
2. Print
3. Enjoy reading again.

## A video tutorial

I put together this 3 minute video showing how to use the Reader View in Chrome and Safari and highlighting the difference it makes for several websites.

{% youtube aAlZVcbNYUo %}
Netlify Continuous Development
Tags: netlify, lambda, functions
Published: 2018-10-21 04:34:24

---
title: Netlify Continuous Development
published: true
description: Easily emulate Netlify products with netlify-local
tags: netlify, lambda, functions
---
Many months ago Netlify released Netlify Functions which provides most of AWS Lambda's functionality within the Netlify Continuous Deployment platform.

When I first started playing with Functions I was impressed at how simple they had been able to make it and realised that with this I could deploy almost any product imaginable with ease. In addition to Functions, they'd written a neat tool called [netlify-lambda](https://github.com/netlify/netlify-lambda) which could help you bundle your functions for deployment and also serve them locally for development!

Almost immediately after starting to use **netlify-lambda** I was running into issues trying to maintain cohesion between my local, staging and production environments. The issue wasn't that **netlify-lambda** didn't do what it said it would, but Functions was only one of several features I was using on Netlify.

Netlify supports a bunch of additional features which you can configure with a file called `netlify.toml`, but none of those other features had local helpers like **netlify-lambda**. This means you need to write your own development tools and servers to replicate them which is fine for one application but once you're working on several it becomes rather unpleasant. The obvious solution to this would be to write another package, like **netlify-lambda** but for everything… so I did!

The package is called [netlify-local](https://github.com/8eecf0d2/netlify-local) and is available on NPM, in simple terms it will read your `netlify.toml` configuration and try it's best to provide 1:1 emulation of the options you're using. It also supports passing in Webpack configurations for rebuilding when something changes.

There's still quite a bit to implement before all features are 1:1 compatible but progress is being made every day and for most people it should work right out the box.
The Power of a Todo List Project
Tags: beginners, programming, learning
Published: 2018-10-21 17:59:10

---
title: The Power of a Todo List Project
published: true
description: Why a Todo list makes a great first project when learning to code or a new language.
tags: #beginners, #programming, #learning
---

I'm aware that there are several posts about how a Todo list can be demotivating, however I think they still have their place. There are several reasons developers choose to develop a Todo list, especially when learning a new language or learning to code. The main reason is that it's simple yet complex enough to explore most features of a language, which is great for beginners and experienced developers.

For a beginner it can be a daunting experience trying to choose the perfect project. A Todo list can be broken down easily and implemented as several separate components, which makes a perfect first project. It allows for faster results and reduces the feedback loop. There is nothing more motivating than seeing results quickly, especially for a beginner.

For more experienced developers trying their hand at a new language, it is complex enough that it will really allow you to explore the full range of features a language offers. The list itself will get you thinking about data structures and it's items about data types and object orientation. Creativity is the only boundary and this is still true for a Todo list. 

So what components can we break a Todo list down in to. The most obvious starting point is the list itself and this should get us thinking about what data structure to use. I'd tend to go with the simplest of structures first which would be an array. Then if we think about data types, an item could initially be a string. Without a list, we can't implement the other components:

- Adding an item
- Removing an item
- Displaying items
- Ordering items

Future changes such as setting "done by" dates might force us to change the data type of an item. I'll avoid going into more detail about software design at this point, but for more experienced developers this could be another consideration.

There are examples of Todo lists in every single language and this is great help especially for beginners. Being able to implement something and then look at how others have done so is a great way to learn.

So to wrap up, I still think there are major benefits from a traditional Todo list project. It might not be the most exciting of projects but it really does allow you to explore a language and for me this is the most exciting thing. 

If you feel I've missed any important points or you disagree then feel free to leave a comment with what is missing or what you disagree with.
Change the document title on react application
Tags: react
Published: 2018-10-21 17:13:08

---
title: Change the document title on react application 
published: true
description: 
tags: react
---
As a beginner in react, i developed the application by running the one command create-react-app. 

By default, the app will be generated with the below title

    <title>React App</title>

And it's pretty simple to change, just by having this life-cycle hook into your app file

~~~~
  componentDidMount() {
    document.title = 'Custom Title';
  }
~~~~

Now your application title will be changed to your custom title
PlazarJS - JavaScript framework
Tags: javascript, html, css, components
Published: 2018-10-21 16:57:20

---
title: PlazarJS - JavaScript framework
published: true
description: Hello everyone, I hope you're doing OK.
tags: javascript,html,css,components
---

I've created a standalone front-end component based framework. It's leaning on Object-Oriented-Principles (OOP) and it has no dependencies. All you need it's one script tag placed on your page.

By writing this post I am giving early access to it and hoping to get some feedback from the community :) Don't be afraid to praise or criticize, any feedback would be appreciated.

Documentation link: [plazar-js](http://www.plazarjs.com/)
GitHub link: [plazar-js-github](https://github.com/ProticM/plazar-js)

Thank you all!
What are the most common tools for data pre-calculation and aggregation?
Tags: sql, discuss
Published: 2018-10-21 16:41:10

Company, I work at, does data research and scraping which is later aggregated and published to our clients. We also try to denormalize data in order to provide faster data lookup in web applications.

Until now, we used mechanisms within SQL Server to do these aggregations. But recently this has became a bottleneck and processes take too much time to execute and overlap to business hours.

What are other tools that market uses to perform aggregations and pre-calculation outside of relational database? My discoveries include:
- Apache Hadoop MapReduce
- Apache Pig
- Apache Spark
[VIDEO] Augmented Reality vs. Virtual Reality #TFHDailyStandUp ep6
Tags: tfhdailystandup, beginners, virtualreality, augmentedreality
Published: 2018-10-21 15:51:58

---
title: [VIDEO] Augmented Reality vs. Virtual Reality #TFHDailyStandUp ep6
published: true
description: 
tags: #tfhdailystandup #beginners #virtualreality #augmentedreality
---

<img src="https://thepracticaldev.s3.amazonaws.com/i/006upwpqk9fno0xfbhzf.png" />

EP6: TFH DAILY STAND UP TIME!!!! In today’s stand up I talk about augmented reality vs virtual reality👀 💻 🤔🤔

#AR is a staycation w/ souvenirs while VR is the vacation🤔🤔
Decrypting correctly parameters from AWS SSM
Tags: aws, ssm, python
Published: 2018-10-21 15:29:54

---
title: Decrypting correctly parameters from AWS SSM
published: true
description: 
tags: AWS, SSM, python
---

Today is yet short one, but ideally will already save a whole lot of headaches for some people.

Scenario: You have stored the contents of a string using AWS SSM parameter store (side note: if you are not using it yet, you should definitely have a look), but when retrieving it  decrypted via CLI, you notice that the string has new lines ('\n') substituted by spaces (' ').

In my case, I was storing a private SSH key encrypted to integrate with some Ansible scripts triggered via AWS CodePipeline + CodeBuild. CodeBuild makes it realy easy to access secrets stored in SSM store, however it was retrieving my key incorrectly, which in term domino-crashed my ansible scripts.

<a href="https://github.com/aws/aws-cli/issues/2596" target="_blank" rel="noopener">Here you can also confirm more people are facing this issue</a>. After following the suggestion of using AWS SDK - in my case with python boto3 - it <em>finally</em> worked. So here is a gist to overwrite an AWS SSM parameter, and then retrieving it back:

{% gist https://gist.github.com/diogoaurelio/372005295a4884456500bccaab3bf84b %}

Hope this helps!
Getting Started with Spark (part 4) -  Unit Testing
Tags: apachespark, python
Published: 2018-10-21 15:27:52

---
title: Getting Started with Spark (part 4) -  Unit Testing
published: true
description: 
tags: Apache Spark, Python
---


Alright quite a while ago (already counting years), I published a tutorial series focused on helping people getting started with Spark. Here is an outline of the previous posts:
<ul>
	<li><a href="https://datacenternotes.com/2015/11/01/getting-started-with-spark-in-pythonscala-part-1/" target="_blank" rel="noopener">Part 1 Getting Started - covers basics on distributed Spark architecture, along with Data structures (including the old good RDD collections (!), whose use has been kind of deprecated by Dataframes)</a></li>
	<li><a href="https://datacenternotes.com/2015/11/01/getting-started-with-the-spark-part-2-sparksql/" target="_blank" rel="noopener">Part 2 intro to Dataframes</a></li>
	<li><a href="https://datacenternotes.com/2016/10/03/getting-started-with-spark-part-3-udfs-window-functions/" target="_blank" rel="noopener">Part 3 intro to UDFs and Window Functions </a></li>
</ul>
In the meanwhile Spark has not decreased popularity, so I thought I continued updating the same series. In this post we cover an essential part of any ETL project, namely Unit testing.

<a href="https://github.com/diogoaurelio/pyspark-bootstrap-repo" target="_blank" rel="noopener">For that I created a sample repository</a>, which is meant to serve as boiler plate code for any new Python Spark project.

<!--more-->

Let us browse through the main job script. Please note that the repository might contain updated version, which might defer in details with the next gist.

{% gist https://gist.github.com/diogoaurelio/9b6338d257e51cddb2f3015ea2ee17ae %}

The previous gist recovers the same example used in the previous post on UDFs and Window Functions.

Here is an example how we could test our "amount_spent_udf" function:

{% gist https://gist.github.com/diogoaurelio/f1a1f0f79f235d14868cb6dfe2015c93 %}

Now note the first line on the unit tests script, which is the secret sauce to load a spark context for your unit tests. Bellow is the code that creates the "spark_session" object passed as an argument to the "test_amount_spent_udf" function.

{% gist https://gist.github.com/diogoaurelio/709b1d6096da0ce9fdd713d3be4073d8 %}

And that is it. We strongly encourage you to have a look on the <a href="https://github.com/diogoaurelio/pyspark-bootstrap-repo" target="_blank" rel="noopener">correspondent git repository, where we specify detailed instructions how to run it locally</a>.

And that is it for today, hope it helped!
React Native Picker Spinner DropDown Menu List Example - Android
Tags: javasscript, reactnative, android, javascript
Published: 2018-10-21 14:45:45

---
title: React Native Picker Spinner DropDown Menu List Example - Android
published: true
description: React Native Picker Spinner DropDown Menu List Example - Android
tags: #javasscript #reactnative #android #js
---

Post Link : <a href="https://www.skptricks.com/2018/10/react-native-picker-spinner-dropdown-example-android.html" > React Native Picker Spinner DropDown Menu List Example - Android </a>

In this tutorial, we are going to discuss how to create simple picker spinner dropdown menu list in react native application. Picker Spinners provide a quick way to select one value from a set. In the default state, a spinner shows its currently selected value. Touching the spinner displays a dropdown menu with all other available values, from which the user can select a new one.

<a href="https://www.skptricks.com/2018/10/react-native-picker-spinner-dropdown-example-android.html" > React Native Picker Spinner DropDown Menu List Example - Android </a>

<img src="https://4.bp.blogspot.com/-puNk3kY_CaQ/W8yOhWzPiOI/AAAAAAAACDU/VlQ9bzG3x6c_7Vfm8ENo2c3uQh1jvhd0ACLcBGAs/s640/picker.png" />

<a href="https://www.skptricks.com/2018/10/react-native-picker-spinner-dropdown-example-android.html" >Continue Reading... </a>
IoT botnet construction tool "Mirai" was asked in Most famous Japanese information technology examinations
Tags: mirai, security, qualification, exam
Published: 2018-10-21 14:42:36

---
title: IoT botnet construction tool "Mirai" was asked in Most famous Japanese information technology examinations
published: true
description: Mirai was asked in Japanese qualification exam
tags: mirai,security,qualification,exam
---

On October 21 2018, I received an [information processing engineer exam ](https://en.wikipedia.org/wiki/Information-Technology_Engineers_Examination
)administered by IPA.

May be that is most famous qualifying examination about software engineer in Japan.

I chose Information Security Specialist Examination(SC)

I found Mirai is asked in that exam.

here is the question

![question](https://thepracticaldev.s3.amazonaws.com/i/vmqt5qz1e262tuy971mh.jpeg)

here is translation

>Which of the following is malware Mirai's behavior?
>
>A. It exploit vulnerabilities of Web servers that run on IoT devices etc. to spread infections, alter Web pages of Web servers, and perform DDos attacks on specific IP addresses at the date and time they were modified.
>
>B. It exploiting Web server's vulnerability to insert illegal JavaScript into a company's Web page and direct the user who viewed the Web page to an unauthorized Web site
>
>C. When the user erroneously and executes the malware execution file in the PC using the file sharing software, it uploads the information in the PC to the Web site on the Internet and makes it public to an unspecified number of people.
>
>D. Try logging in to the telnet port by generating a random IP address, spreading infection to IoT devices using weak passwords at the time of factory shipment, etc. In accordance with the instructions from the C & C server, DDoS attack it dose.

Answer is D
C++ simple string operations
Tags: cpp, string, replace, tokenize
Published: 2018-10-21 14:39:53

---
title: C++ simple string operations
published: true
description: The intention of this post is to list a set of C++ string operation related useful functions which are used frequently. I will try to use the solutions which I find simple, elegant and apparently deemed efficient by me.

tags: cpp, string, replace, tokenize
---

String Replace:

<pre>
bool str_replace(std::string& str, const std::string& from, const std::string& to) {
	size_t start_pos = str.find(from);
	if (start_pos == std::string::npos)
		return false;
	str.replace(start_pos, from.length(), to);

	return true;
}

//usage:

std::string str = "John XXX";
str_replace(str, "XXX", "Doe");

</pre>


String Tokenize:

<pre>
std::string input = "We, are, all, strangers, here"; // our input
char delim = ','; // our delimiter


std::istringstream ss(input);
std::string token;

std::vector<std::string> tokens;
while(std::getline(ss, token, delim)) {
    tokens.push_back(token);
}

// tokens contain the array of tokenized strings separated by delimiter 

</pre>