teleren/devto huggingface dataset:
Compose Components in VueJS - Introduction [Part 2]
Tags: vue, javascript, beginners, tutorial
Published: 2018-02-22 00:39:02

---
title: Compose Components in VueJS - Introduction [Part 2]
published: true
description: Part 2 of the VueJS Documentation Walkthrough.
tags: vue, javascript, beginner, tutorial
cover_image: https://thepracticaldev.s3.amazonaws.com/i/8ael8wm6c616qkmdt7b5.png
---

> Subscribe to my YouTube channel for [more tutorials on working with VueJS and AdonisJS -- an MVC framework for NodeJS](https://www.youtube.com/channel/UCF5w1QdWroWOoxxXMgp88AQ?sub_confirmation=1)!

Part 2 of my VueJS Documentation Walkthrough - an Introduction to Composing Components.

Learn the basics of composing components and using slots and props to make your components more flexible and reusable.

Together we'll go through the basic example from the documentation and then build out the Jumbotron Bootstrap template to get a little more practice.

This video contains a few challenges, too, to help you learn.


{% youtube Oh0xX32rvI8 %}

[Github Repo](https://github.com/patrickodacre/vue-docx/tree/composing_components)

```bash
git clone https://github.com/patrickodacre/vue-docx/tree/composing_components

git checkout composing_components

cd simple
```
Video: Code review of command line domain query tool
Tags: go, codereview
Published: 2018-02-21 23:48:14

---
title: "Video: Code review of command line domain query tool"
published: true
description: In this video I’m reviewing https://github.com/TimothyYe/namebeta Go package.
tags: go, code review
---
![codereview](https://thepracticaldev.s3.amazonaws.com/i/mdjore6uslijpbyoifft.jpg)

In [this video](https://youtu.be/kX83xGEkEiw) I’m reviewing https://github.com/TimothyYe/namebeta Go package.

Pull Request: https://github.com/TimothyYe/namebeta/pull/3
ASP.NET Core with PayTrace (Mime Type Fix)
Tags: mime, dotnet, core, api
Published: 2018-04-05 13:13:12

---
title: ASP.NET Core with PayTrace (Mime Type Fix)
published: true
tags: mime,dotnet,core,api
canonical_url: 
---

This year I am re-writing my previous payment solution (from PHP to .NET) and first on the project list is credit cards.  We are using PayTrace and their client-side encryption as to not have to worry about PCI Compliance.

## File Not Found

I'd gotten to the point where I had:
* a Pre-Payment model with all the fields needed to send via JSON
* method to request a token for sending (uses demo username and pass) 
* a JS file to help scan credit cards using a USB device
* a test PEM file I downloaded from the PayTrace site
* PayTrace's third party JS library to encrypt card information and attach on form post

I load it all, scan card, hit submit, and I get this:

```
XML Parsing Error: no element found
```

This is appearing in the console of Inspector in Firefox.  Turns out this a generic error Firefox throws out when it’s expecting a file but gets nothing.

My path’s are correct, but the “public\_key.pem” file is not attaching to my post.   The problem?  MIME-type.

## Making It Work

First, in Startup.cs, I needed to do this to add the MIME-type:

```c#
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    var provider = new FileExtensionContentTypeProvider();
    provider.Mappings[".pem"] = "application/x-pem-file";
```

in the same function add this:

```c#
app.UseStaticFiles(); // For the wwwroot folder
app.UseStaticFiles(new StaticFileOptions()
{
    FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot", "api-keys")),
    RequestPath = new PathString("/api-keys"),
    ContentTypeProvider = provider
});
```

**Do NOT forget app.UseStaticFiles();** for your general wwwroot folder.

I dropped public\_keys.pem in “api-keys” and done!

There seems something a bit off in this, so please correct me if you find it, but it's working for now!
How did you first start out learning programming?
Tags: discuss, education
Published: 2018-02-21 23:14:20

---
title: How did you first start out learning programming?
published: true
description: Did you go the traditional education route, or are you self-taught?
tags: discuss, education
---

My friend started learning Python on his own, and as a developer it's always great to see someone interested in the field. Of course, I was still a bit skeptical as to whether he was going to continue learning, but so far he's doing pretty well on his own. He started off with Codecademy, but found that it didn't really go into depth for mastery. Then he tried YouTube courses, and it went okay, but for whatever reason didn't like it as much either. THEN after that, he started PyGame, which seems to be his favorite, but he also tried Pluralsight since he got a free three month trial (going alright, I think). Now he's following Odin Project, or something like that.

Anyway, it got me wondering how everyone else started learning, especially since I couldn't really offer him the best advice on what to try. My experience learning programming isn't quite the same as his, and I had access to opportunities (coding bootcamp, for ex.) that he doesn't.

**What were your first steps getting into programming, and what do you know now that you wished you did?**
Smart City and Open Data
Tags: smartcity, technology, opendata, discuss
Published: 2018-02-21 21:34:41

---
title: Smart City and Open Data
published: true
description: https://thepracticaldev.s3.amazonaws.com/i/yppgw7amxwo4bivmz6jz.jpg
tags: #smartcity #technology #opendata #discussion 
---

https://thepracticaldev.s3.amazonaws.com/i/yppgw7amxwo4bivmz6jz.jpg

Hello Guys,

I want to open a discussion about smart cities. Your opinion matters!
Firstly let's start with what is the meaning of the phrase "smart city"?

In my opinion, a smart city is a city that uses information and communication technologies to increase operational efficiency, share information with the public and improve both the quality of government services and citizen welfare.

Actually, everything in a city can be smart if and only if uses some components to improve its quality and flexibility. For example, lots of cities already have the advantage to use the plate recognition of a car in order to pay their parking without any effort, just the parking cost is deducted from their debit/credit card.

Here comes your opinion! What do you think a smart city and open data is? How can they be combined together? Do you think open data provided by your country is useful enough?



Thank you for your time reading this, hopefully, we can get in touch and discuss this at further points. 


V. Vasilev
Definition of Ready
Tags: dor, agile, ready
Published: 2018-02-21 21:16:14

---
title: Definition of Ready
published: true
description: An example of an agile team's definition of ready checklist
cover_image: https://thepracticaldev.s3.amazonaws.com/i/l82ityr0itvea3pamvv7.png
tags: dor, agile, ready
---

The [Definition of Ready](https://softwaredev3loper.wordpress.com/2016/03/01/definition-of-ready/) (DoR) defines a product backlog item's *ready state*.

---

## Definition of Ready Checklist
[ &nbsp; ] - Business value clearly articulated
[ &nbsp; ] - Conditions of satisfaction scoped
[ &nbsp; ] - Supporting artifacts, fixtures, and dependencies established
[ &nbsp; ] - Non-functional requirements considered
[ &nbsp; ] - Success metrics identified
[ &nbsp; ] - Item can be completed in less than one iteration
15 Random Pieces Of Wisdom About People Management
Tags: management, advice, people, teamleading
Published: 2018-02-21 19:29:32

---
title: 15 Random Pieces Of Wisdom About People Management
published: true
description: Some sundry thoughts I've had throughout my career as a developer and more recently also a team leader.
tags: management, advice, people, team leading
cover_image: https://thepracticaldev.s3.amazonaws.com/i/4zz6tsd0au040h3uboh6.JPG
---

<em>This article has been first published on my website <a href="https://smartpuffin.com/15-random-pieces-of-wisdom-about-people-management/">smartpuffin.com</a>.</em>

<p>Here are some sundry thoughts I've had throughout my career as a developer and more recently also a team leader.</p>

<ol>
 	<li style="text-align: left;">Do not punish people who disagree with you. You'll end up in a very homogeneous team agreeing with all you say. It is very flattering for your ego, but useless for the company.</li>
 	<li style="text-align: left;">If people complain, they do it because they care. Beware if people stop complaining: they have probably lost interest and motivation. Thank them for helping you understand the problems.</li>
 	<li style="text-align: left;">Listen to people. Be quiet and listen until they finish. Ask questions. More questions. Listen to answers.</li>
 	<li style="text-align: left;">Praise your people. Even if they say you don't have to. <em>Especially</em> if they say you don't have to. Don't take all credit for their work.</li>
 	<li style="text-align: left;">Believe in them. Show it.</li>
 	<li style="text-align: left;">It is important not to demotivate people. Figure out what demotivates them: unclear tasks? Missing out on promotions? Unfair treatment? Too many meetings? Unrealistic deadlines? Fix it.</li>
 	<li style="text-align: left;">Protect your people. Don't let upper management hurt them unconsciously. Stand up for them.</li>
 	<li style="text-align: left;">Overcommunicate. Repeat yourself. Make sure they heard and understood you.</li>
 	<li style="text-align: left;">Make sure you treat people fairly. Educate yourself about biases. Make sure not to favor talkative people over quiet ones, boastful people over humble ones, people like you over different ones.</li>
 	<li style="text-align: left;">Trust your people.</li>
 	<li style="text-align: left;">Let them make mistakes. People learn from mistakes. Don't micromanage and handhold too much.</li>
 	<li style="text-align: left;">If they do things differently than you, it doesn't automatically mean they're wrong.</li>
 	<li style="text-align: left;">Think about what you wouldn't want your boss to do with you. Don't do it with your team.</li>
 	<li style="text-align: left;">Respect them. They are smart grown-ups. Treat them as such.</li>
 	<li>Integrity is important.</li>
</ol>

---

Have more tips? Please help me crowdsource a [portrait of an ideal manager](https://dev.to/ice_lenor/crowdsourcing-a-portrait-of-an-ideal-manager--29h8).
Your unfinished pet projects are letdown or a gain?
Tags: discuss
Published: 2018-02-21 19:12:16

---
title: Your unfinished pet projects are letdown or a gain?
published: true
description: 
tags: discuss
---

How do you consider them? Did they give you anything or it's just was a waste of time?

Whenever I looking my repo, I see unfinished projects:

I wanted to build my next photographer portfolio in Node.js + Express, instead I went with Wordpress again. But in return, I learnt Node.js.

I wanted to create a website, which listing companies of my country with public data. This stage, I'm an unverified identity to get access for this official database from the government, so I built a web scraper in Go able to start the development and actually come up with a product. The project still hangs in this state. I never finished it, but now I know how to implement this in Go, how to work with files on the disk and use the standard library.

What are your letdowns, that hadn't payed you anything, but you learnt something new?
MarkdownHelper#include
Tags: opensource, ruby, documentation
Published: 2018-02-21 18:52:53

---
title: MarkdownHelper#include
published: true
description: File inclusion for GitHub markdown files
tags: opensource, ruby, documentation
---

GitHub users have for years been asking for include files in GitHub markdown pages.

I've just put up a new Ruby gem, <a href="https://rubygems.org/gems/markdown_helper">markdown_helper</a>, that implements include files.

A file can be included as:

* Highlighted code block.
* Plain code block.
* Verbatim text.

The gem has an API and a CLI.  (For the very young, CLI <=> command-line interface.)
Describe the Best Interview You've Been In
Tags: discuss
Published: 2018-02-21 16:30:03

---
title: Describe the Best Interview You've Been In
published: true
description: Inspired by the horror stories among developers.. lets discuss our favorite interviews, why they stood out and tips for what could have made them better.
tags: discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/owqmul5e3ig3inq9zo6b.jpg
---

My favorite interview was one where I was able to bring my own laptop to do a code exercise that was mostly communicated ahead of time. They also allowed me to use any tools that would be accessible to me in the real world: other developers in the room, Google, Stackoverflow, etc.

I also LOVE a clear picture of what my day is going to look like- a schedule with who I'll be speaking with and what type of questions I'll be asked. For example: at 8am you'll meet with Bob Bobbs, Software Manager, to discuss previous experience. At noon you'll have lunch with the team. At 3 pm you'll meet with Linda Lindz, architect, for whiteboard interview.  Ok, ok, the type of questions I'll be asked is a dream - but a girl can hope.  

But the reason I enjoyed this was because 1) coding on someone else's laptop is actually pretty challenging. Consider opposite scroll directions, different keyboard shortcuts and IDE colors. This can all throw you off your game. 2) I have anxiety.. which makes interviewing especially stressful. Understanding the schedule and what to expect throughout the day helps me prepare and cope mentally for the day ahead. The best way I can describe it is instead of my mind racing "You're going to fail for a solid 6 or 8 hours" it will sound more like "Well, the morning is going to be rough, but you've got the 11-3 portion down".. and with that thought I can actually breathe.

What has your favorite interview been? Why?

--
Image Credit: [https://www.wocintechchat.com](https://www.wocintechchat.com)
I'm Charity Majors, Ask Me Anything! [FINISHED]
Tags: ama
Published: 2018-02-21 18:43:46

---
title: I'm Charity Majors, Ask Me Anything! [FINISHED]
published: true
description: I am the cofounder and accidental CEO of honeycomb.io
tags: ama
cover_image: https://thepracticaldev.s3.amazonaws.com/i/a14csi1piwptc9ou45a3.jpg
---

I am the cofounder and accidental CEO of [honeycomb.io](https://honeycomb.io/), where we are thinking hard about how to help you debug and understand the complex systems you have now && the even crazier systems you're going to have soon. I think a lot about observability and how to help software engineers own the code they write without losing their quality of life.  Before this I was an engineering manager at Facebook, built systems at Parse and Second Life, and spent most of my time worrying about databases. I miss being on call.
What JS framework to use to make stockmarket simulator - speed replay visualization tool?
Tags: stocks, market, javascript
Published: 2018-02-21 17:46:31

---
title: What JS framework to use to make stockmarket simulator - speed replay visualization tool?
published: true
description: stock simulator
tags: stocks,market,js
---



I want to make my own desktop stock simulator replay of historical stock price moves.

I have a sample dataset of time-series price data available in CSV format.

Essentially, I just need to render this data on canvas. The main point is to accumulate more trading experience in less time. A user can speed trade thru sessions for entire year in a week!

I made a gif of another program made in Delphi(not open-source) to demonstrate the program I want to build.

Here is the gif showing what I want to build:

https://thepracticaldev.s3.amazonaws.com/i/a3dkn2smu41zunxbyrv5.gif


I think my project has to do with data visualization.


The task seems quite easy, after all it's just parsing dataset like below and showing it on screen with every new row drawing the price moves.


 date         open  high  low close volume

 - 10/07/2016 -  1.4   2.3   0.7  1.5  400 
 - 10/07/2016 -  3.4   1.3   23   1.4  5500 
 - 10/07/2016 -  1.7   2.3   0.9  1.4  100


The high quality tick data shows change every milisecond, so it has more fields than just "open high low..", so i guess will need some milisecond clock counter to reflect every change in price.

The canvas should have:

automatic scaling to fit in entire price range when price moves out of bounds of the canvas - all bars should adjust their size accordingly,
zoom in\out
speed adjusting slider to slow down/increase the drawing speed
Could it be similar to some open-source graphics design drawing tool?

Should I use D3.js, python, C++, electron.js or some other JS framework? Could u give me the direction or tool where I should be researching?
I'm Losing The Motivation Needed, HELP!
Tags: javascript, discuss
Published: 2018-02-21 17:43:58

---
title: I'm Losing The Motivation Needed, HELP!
published: true
description: 
tags: javascript, discuss
---

I've finished the "Front-End" section in freeCodeCamp and in the Colt Steele's course "The Web Developer Bootcamp", right now I have completed the "CSS Flexbox" section from the "Advanced Web Developer Bootcamp" but a lot of developers recommended that I should first have a firm grasp of JavaScript before moving to React, which led to reading the "You Don't Know JavaScript" Series.

The books are amazing and offer a lot of value but the fact that I know that I'll be reading instead of coding a specific project leads me to procrastinate and do a lot of stuff rather than studying - and don't get me wrong, I love books.

I really want to finish this book series and I want to read "Eloquent JavaScript 3rd Edition". Do you have any tips that I could follow to move past this boring/frustrating part of my Web Development career?
Laravel 5.6 Release: What's New?
Tags: laravel, php, laravel5, phpdevelopment
Published: 2018-02-21 17:40:21

---
title: "Laravel 5.6 Release: What's New?"
published: true
description: Laravel 5.6 has officially been released. What's new? What improvements were made? Learn how to build better PHP applications with this new release.
tags: #laravel #php #laravel5 #phpdevelopment
canonical_url: https://auth0.com/blog/laravel-5-6-release-what-is-new/
---

On Wednesday, February 7, 2018, Laravel 5.6, was released to the public. It's a major release to the most popular PHP framework on GitHub as of this writing. Furthermore, Spark 6.0 was also released alongside Laravel 5.6. According to the policy laid down by the Taylor and the core team, major Laravel framework releases are released every six months (February and August). 

In this article, I'll cover the new features in Laravel 5.6 and several other changes and deprecations.

[Read on 💻](https://auth0.com/blog/laravel-5-6-release-what-is-new/?utm_source=dev&utm_medium=sc&utm_campaign=laravel5_new)

![Laravel 5.6 Release: What's New?](https://thepracticaldev.s3.amazonaws.com/i/ih10p9z56z53iskgthcf.png)
Have you been promoted out of programming?
Tags: career, discuss
Published: 2018-02-21 17:32:45

---
title: Have you been promoted out of programming?
published: true
description: Or avoided a promotion because you want to continue programming? 
tags: career, discuss
---

This article has always stuck with me:

{% link https://dev.to/figspville/promoted-out-of-programming %}

It's an interesting read about a woman in the late 70s/early 80s, who enrolled in a COBOL bootcamp, became a programmer, and eventually found herself promoted out of programming. Obviously a lot has changed since then, but I think this is still how it generally works.

Have you been promoted out of programming? Or avoided a promotion because you want to _continue_ programming? I'm curious how everyone feels about this.
Can I see your desktop home screen
Tags: discuss, windows, mac
Published: 2018-02-21 15:43:27

---
title: Can I see your desktop home screen
published: true
description: can I see your desktop home screen
tags: discuss, windows, mac
---

As always, I'm interested in what other guys are doing with their tools.
This time I just wanted to see your desktop home screen.


Here is mine 
![my own dp](https://thepracticaldev.s3.amazonaws.com/i/737mvga20itrovu5qz3a.PNG)
Execute Interactive Programs From Go
Published: 2023-04-29 22:26:43

---
title: Execute Interactive Programs From Go
published: true
date: 2018-02-21 14:11:22 UTC
tags: 
canonical_url: https://mikestaszel.com/2018/02/21/execute-interactive-programs.html
---

I had a hard time figuring out how to make a Go program execute a command and make that program take over the console. I wanted my program to launch an SSH session.

I recently started working on a tool to help me SSH into EC2 instances (more details coming in a future blog post). The goal was to automatically open up an SSH session into an EC2 instance.

It’s easy to execute a program like ssh but the input and output of that program is lost. After trying to figure it out — I had a realization — this was easy! Truly one of those moments where it’s obvious once you see it.

```
cmd := exec.Command("ssh", "root@127.0.0.1"))
cmd.Stdout = os.Stdout
cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
cmd.Run()

```

That’s all these is to it. I bet a similar approach would work in other languages — you’re setting the stdin, stdout, and stderr of your command to go to your terminal. When the program is finished running, control is given back to your Go program.
How to simulate an incoming call or SMS to an emulator in Android Studio
Tags: androidstudio, emulator, android, call
Published: 2018-02-21 13:42:40

---
title: How to simulate an incoming call or SMS to an emulator in Android Studio
published: true
description: How to simulate an incoming call or SMS to an emulator in Android Studio
tags: android studio, emulator, android, call
---

![](https://thepracticaldev.s3.amazonaws.com/i/5t8tgtgm0vkcj38i89b4.jpg)

_Originally published on [my blog](http://www.nikola-breznjak.com/blog/android/simulate-incoming-call-sms-emulator-android-studio/)_

In this quick tip, I'll show you how easy it is to simulate an incoming call or SMS to an emulator in Android Studio.

## TL;DR
In Android Studio, go to `Tools->Android->Android Device Monitor`

![](https://i.imgur.com/i3uDl2P.png)

Select the Emulator on the left (you have to run it first - do that through `Tools->Android->AVD Manager`), then the `Emulator Control` tab, insert the number, select `Voice` or `SMS` and click the `Call` or `Send` button:

![](https://i.imgur.com/yf802Im.png)

See both of these functions in action:

![](https://i.imgur.com/nr0Sj7b.gif)

## Conclusion
In this short tip, I showed you how easy it is to simulate an incoming call or SMS to an emulator in Android Studio.

Android Device Monitor allows you to set other stuff as well, like for example the current location, Network preferences (to test your app in not so ideal connectivity situations), etc.

Hope this helps 💪
MockitoでClassオブジェクトを返す
Tags: java
Published: 2018-02-21 13:41:36

---
title: MockitoでClassオブジェクトを返す
published: true
description: 
tags: Java
---

MockitoでClassオブジェクトを返すメソッドをモック化しようとした。

```java
Foo foo = mock(Foo.class);
when(foo.getBar()).thenReturn(Bar.class);
```

が、以下のエラーが発生。
> `The method thenReturn(Class<capture#1-of ?>) in the type OngoingStubbing<Class<capture#1-of ?>> is not applicable for the arguments (Class<capture#3-of ?>)`


doReturnを使うことで解決。

```java
doReturn(Bar.class).when(foo).getBar();
```