teleren/devto huggingface dataset:
How Managed Hosting Works
Tags: managed, hosting, bitcoin, vps
Published: 2019-12-02 11:16:46

<a href="https://www.speedehost.com/managed-hosting.php">Managed Hosting</a> is the web hosting service which allows you to operate your website, communication channels, server-side data and all the web related tasks with hosting server provided by a service provider, who manages the all the backside technical and programming operations all together from a remote location to serve your organization a maximum level of security, encryption-based data and executing process. SpeedeHost in the US is one of the best managed to host service providers with a large extent of secured servers.
Using Imgur API with Ruby on Rails, Javascript, and React
Tags: imgur, rails, javascript, react
Published: 2019-12-02 11:14:31

Ruby on Rails backend:

For my bug tracking app, users are able to upload screenshots of bugs.

My model "bugs" has an "attachments" table. Instead of storing a blob/image/base64 data... attachments are just an array of strings. 

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/r8cefg0daayegbgeonqp.png)

In the "bugs" controller, I set the attachments to an array. Make sure the array is the LAST one in the controller or it won't work.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/gvc7wuseydsan0c7szjk.png)

React JS frontend:

I used the ImageUploader component from 'react-images-upload'
You can find that here: https://www.npmjs.com/package/react-images-upload

My onDrop looks like this: 
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ubc1mnq6ipo3jc3dgi1l.png)
Replace clientId with your own clientId that you get from imgur. All you need to begin posting to their API is your own clientId. You don't need to do all that OAuth stuff unless you need to for auth purposes for your app. It might take a few minutes or a few days to get your clientId. Make sure you include that space in clientId in your headers: 'Authorization': 'Client-ID '+ clientId

The response you get from imgur after posting to their API will include the link. Upon receiving the response I post that link as a string to my Rails backend.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/uaufxfvr49gc01pp2baw.png)
How To Create Custom Subscription Hook - Custom Hooks ReactJS Mini Course Part 3
Tags: react
Published: 2019-12-02 10:56:19

---
title: How To Create Custom Subscription Hook - Custom Hooks ReactJS Mini Course Part 3
published: true
description: Welcome to ReactJS Custom Hooks Mini Course. In this course we'll learn how to create custom hooks in React, how to test them using React Testing Library and how to publish them as a standalone npm package.
tags: react
series: Custom Hooks ReactJS Mini Course
---

{% youtube rYdt26s11NQ %}

Welcome to ReactJS Custom Hooks Mini Course. In this course we'll learn how to create custom hooks in React, how to test them using React Testing Library and how to publish them as a standalone npm package.

Course playlist: http://bit.ly/35FHALa
Subscribe to the channel: http://bit.ly/2QZ2UY3
C++ - The Introduction
Tags: cpp, beginners
Published: 2019-12-02 10:51:25

<img src="https://upload.wikimedia.org/wikipedia/commons/1/18/ISO_C%2B%2B_Logo.svg" alt="C++ Logo"></img>
<h1>What is C++?</h1>
C++ is the Programming Language use to create computer programs.

It is a <b>Cross Platform Language</b> means programs made in c++ are able to run on different platforms like Windows/Linux etc with no or little modifications.

It was developed by Bjarne Stroustrup at Bell labs in 1979.

It is a Object Oriented Language (Note:- <i>will discuss about it</i>).
<br />
<h1>How to Create Programs in C++?</h1>
To do that we need :-
<h2>Hard way</h2>
1. Text Editor :- Where you type code. It could be Notepad but VSCode will be better.
2. Compiler:- who convert our file into computer's understandable form.

Note:- file extension should be <b>.cpp</b> and compiler will be according to your platform (Windows/Linux etc).

<h2>Easy Way</h2>
Just download one of these softwares:-
1. DevC++ (<a href='https://sourceforge.net/projects/orwelldevcpp/'>Link</a>)
2. Code::Blocks (<a href='http://www.codeblocks.org/downloads'>Link</a>)

Note:- These are called IDEs (Integrated Development Environment).
Simply put <b>Text Editor + Compiler = IDE</b>.

<h2>Super Easy way</h2>
There are Online C++ Compilers:- 
1. <a href='https://www.onlinegdb.com/online_c++_compiler'>Link 1</a>
2. <a href='https://www.tutorialspoint.com/compile_cpp_online.php'>Link 2</a>

<h1>#Important terms</h1>
1. Source File :- File you create with text editor.
2. Executable File :- File that computer can understand/run directly.
3. Compilation :- Process of converting source file into Executable file.

<img src='https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190430122723/cpp-program-compilation3-1024x375.png'></img>


That's it for today.

If you find anything incorrect or know about it let me know in the comments it would be really appreciated.

Bye Guys Have a good day.
Quill NDBC Postgres: A New Async Module
Tags: scala, quill, ndbc, postgres
Published: 2019-12-02 10:40:16

[Quill 3.5.0 is out](https://twitter.com/deusaquilus/status/1200310094128390147) and this release brings an integration with the [already mentioned NDBC Driver](https://juliano-alves.com/2019/11/02/the-journey-of-an-open-source-developer/#there-and-back-again). This post is a brief summary about the new module `quill-ndbc-postgres`.

## Motivation

Quill has an asynchronous module called `quill-async` which provides support to MySQL and Postgres databases. This module is built on top of [mauricio/postgresql-async](https://github.com/mauricio/postgresql-async): a [Netty](https://netty.io/) based, database drivers for Postgres and MySQL written in Scala. It is a great solution, and we have been using it for a while now.

But all of sudden, [this issue appeared](https://github.com/getquill/quill/issues/1178):

<a href="https://getquill.io/">
![](https://thepracticaldev.s3.amazonaws.com/i/st3clhnc35de96sq3r2c.png)
</a>

Wait... what?

<a href="https://getquill.io/">
![](https://thepracticaldev.s3.amazonaws.com/i/mf2e3f6lt1vqo6oh3ii9.png)
</a>

Well, it happens. A replacement is necessary.

## NDBC: Non-blocking Database Connectivity

[NDBC's goal is to provide a full asynchronous approach to handle databases](https://ndbc.io/). It is built using Netty and [Trane.io Futures](http://trane.io), a High-performance Future implementation for the JVM. Sounds's like a good replacement!

Took me some time to implement it, but a few days ago [my pull request integrating NDBC got merged](https://github.com/getquill/quill/pull/1702). Now we have an alternative to `quill-async-postgres`; async support via NDBC driver is available with Postgres database.

## Quill + NDBC

To replace the deprecated driver just a few changes are necessary. First, add `quill-ndbc-postgres` to your dependencies:

```scala
libraryDependencies ++= Seq(
  "io.getquill" %% "quill-ndbc-postgres" % "3.4.11"
)
```

The `application.properties` needs to change as well:

```properties
ctx.ndbc.dataSourceSupplierClass=io.trane.ndbc.postgres.netty4.DataSourceSupplier
ctx.ndbc.host=database-host
ctx.ndbc.port=1234
ctx.ndbc.user=username
ctx.ndbc.password=password
ctx.ndbc.database=dbname
```

The main difference is the first line, NDBC needs to know which data source supplier class to use, for Postgres it is `io.trane.ndbc.postgres.netty4.DataSourceSupplier`.

> Even though NDBC is written on top of Netty, we keep the api and implementation apart. This way we can build another implementation, on top of [Akka](https://akka.io/), for instance.

Now we have everything in place to start using `NdbcPostgresContext`:

```scala
val ctx = new NdbcPostgresContext(Literal, "ctx")
```

That's all, fairly straightforward. When you start using it, let me know how it goes for you in the comments, or please [open an issue at the project's github](https://github.com/getquill/quill/issues).

The next step is the MySQL implementation. I will let you know when it happens :)

[Originally posted on my blog](https://juliano-alves.com/2019/11/29/quill-ndbc-postgres-a-new-async-module/)
Track your performance over time 🎛🏆
Tags: ios, productivity
Published: 2019-12-02 10:30:40

---
title: Track your performance over time 🎛🏆
published: true
description: 
tags: iOS, productivity, meta
---

Hi everyone 🌍🌎🌏,

I build a simple iOS app that can help you to track your performance on personally defined parameters. The app designed to help you to find a balance in things that matters to you in everyday life.

Here is the workflow:
1. Set up parameters for tracking. For example, think about what you want to improve in your life. It can be relations, productivity, calmness, etc. Or it can even be your engagement in projects, studying. You can add up to 10 parameters.
2. Once a day, give each parameter a mark.
3. Track your performance over time. You will see daily scores in the selected week or month. Other options are to track the average score of a parameter in the selected quarter or year.

You are welcome to download and try an app here:
https://apps.apple.com/us/app/day-marks/id1489576111
How to get the most from an internship
Tags: beginners, career, firstyearincode, motivation
Published: 2019-12-01 22:07:06

This is a different typeof blog post than I usually write. What started off as a quick reply to a question on Slack turned into a full article. 

Whether you internship is 3 months, 10 weeks or you're just shadowing someone for a day, it's important to approach every experience with clear expectations. I always try to go in with a plan and an ask for the end of the internship. My usual goals are:

1. Networking. Understand who you should be introduced to, their goals and how to make a positive impression on them. For example, what teams are growing? In what capacity? You might meet a senior developer who's looking to build a new team, but what is their timeline? It's not enough to know a team is growing, but also if and how you can have a positive impact. Maybe the new team is only looking for experienced engineers.
 
        Ask a million informed questions. To me networking is meeting people in dev, in HR, admins and trying to develop a genuine connection with willing to talk to you. 

2. Learning. Internships are a great introduction into that field and company. It's a low stress way to get experience because interns are not expected to know anything about anything. There's no pressure to wow people because the primary goal of an internship is to learn. There might be companies taking advantage of students for free or cheap labor, but they are the exception. 

       So I always try to pinpoint the biggest and best takeaways for the program. It might be a better understanding of what they’re looking for in terms of new hires, getting more comfortable with their stack. Some interns want real project experience that they can highlight on their resume. No matter what, there's always something to learn

3. Follow up. For me, followup isn't just follow through, but also understanding what that that followup should look like. If you can, try to figure out what the next step would be before you leave the internship. Confirm how to follow up, who to follow up with and if possible, set a timeline for it. 

  Ideally, you will leave the internship with several people in the company willing to vouch for you with the hiring manager or the team.
Interest in code
Tags: introductions
Published: 2019-12-02 09:43:27


My Personal [Blog](jeffubayi.site) 
I started of with the 100DaysofCode challenge to keep up on coding consistency.

You can find me on [Twitter](https://twitter/Jeffubayi) and [GitHub](https://github.com/jeffubayi)

I've tried quite a few things in my life. Coding is the one thing where  

I actually felt something positive, I felt I could grow in this domain.

I just happened to fall into it in my early-20's when I was looking for a career

where I could be happy. I guess it was there at the right time and the right 

place.
How to improve the hiring process in tech industry?
Tags: career, recruitment, watercooler, discuss
Published: 2019-12-02 09:21:53

Dear developers👩‍💻, recruiters🕵 and companies🏢,

I am a software developer. 

In the last few months I have been in the process of looking for a new challenge.

I was able to find a great team and interesting project😍 but this post isn't about it. 

It is about the **job search process itself**.

What I have to admit, is that the recruitment process was quite demanding and time-consuming.

It required the coordination of several phone calls, phone interviews, and onsite meetings.

I often found myself repeating answers for the same questions:
- What is my motivation?
- What technologies do I know?
- Why I am applying to this company?

Looking from the other side, I was probably just one of many candidates in the big sea.

Could it be done better? *I bet it could!*

It seems that the job search process is (not only in the IT industry) in some parts broken or bad designed.

I am happy to share my insights about the recruitment process from a Software Developer perspective and tell what made me pick one company and say *“Thank you”*👎 to the others.


###Let's start with the issues I found quite annoying:

The first annoyance is hearing the same questions across interviews at a company. (e.g. *"What is your motivation for applying?"*). 

Now, I understand that some information can get lost in the across multiple interviews but, dear companies and recruiters, please try to make it a consistent narrative and make sure that you are up to date with the notes from the previous meeting or call with the candidate. 

It is beneficial for both you and the candidates to get to know each other better during the interviews. 

If you require the candidate to have an interest in what you are doing, then you should also make sure to get a better understanding of the candidate's background. 

###**What is your take on that?** 
###**Did you experience something similar?**
Things you didn't know about Vue CLI
Tags: vue
Published: 2019-11-30 15:53:15

If you've just used `vue create` to create your projects, this post is for you!


**Important note for windows users:** Do not include the **$** sign in your commands, it is not a part of the command, it is just the prompt sign in linux/unix/bash shells.


# Creating projects
There are actually several commands you can use to create a Vue project using the CLI.

## The most known option

This is the default and recommended one.
```powershell
# creating a project using the command line
$ vue create my-project
```

## The CLI with the UI

Did you know that Vue CLI actually has a web UI?
It allows for a more interactive use of the CLI.
```powershell
# run this command and it will open a browser window with the UI
$ vue ui
```
The web UI also has some cool utils that you can use to monitor your build, your development server and other processes. 

If you're interested, let me know in the comments and I'll do a separate post on the web UI and its many options.

## Legacy templates

In version 2 of Vue CLI, there was a concept of "templates" that allowed you to specify a template (built-in or community provided) that will be the basis for your new project.

This is still supported in Vue CLI 3 but it requires an extra step.
```powershell
# run this once for enabling support of legacy templates
# you can run this anywhere as it installs a global plugin
$ npm install -g @vue/cli-init

# create a new project using a legacy template
$ vue init webpack my-project
```
And here's [a list of the built-in templates](https://github.com/vuejs-templates).
There are many other *community provided* templates out there.

# Fast Prototyping

Sometimes you just want to view a single Vue component for fast prototyping without the hassle of creating an entire project.

This is possible by globally installing another part of the CLI system:
```powershell
# run this once for enabling support of legacy templates
# you can run this anywhere as it installs a global plugin
$ npm install -g @vue/cli-service-global

# serve your component by running this command 
# (the --o is optional and opens a new browser window)
$ vue serve my-component.vue --o
```

# Plugins

The Vue CLI is all about plugins. Plugins add content and/or abilities to your project.
There are two types of plugins:
1. Internal plugins, these are prefixed `@vue/cli-plugin-`
2. Community plugins, these are prefixed `vue-cli-plugin-`

**Important**: Plugins usually modify your project sources, so it is a good idea to *git commit* all your changes before adding a plugin.

To add a plugin, use the following command inside your project's folder:
```powershell
$ vue add plugin-name
```
You can find a searchable list of plugins inside the **Vue CLI UI**:
1. Run the UI using `vue ui` command
2. Select a project of yours in the dropdown menu on the top left corner.
3. Click the "Plugins" in the menu on the left.
4. Click "Add plugin" button and browse the list of plugins.
5. When you're ready to add a plugin, select it and click the "Install" button on the bottom right.
Monkey Interpreter in V
Tags: showdev, v, interpreter
Published: 2019-12-02 09:15:43

This is an implementation of [Monkey Language](https://monkeylang.org/) from [Interpreter Book](https://interpreterbook.com/) in a new programming language called [V](https://vlang.io/) which will be a full implementation. The repo can be found [here](https://github.com/Delta456/monkey_v).
 
The currently it has only has Lexer completed but this will done as whole when V will have all desired features working. Currently it's in high speed of development. The instructions of installing and using it will be done soon and this post will be upated.

Hope you guys wish that I will be able to complete it.

Thanks!
🎄 Advent of Code 💻
Tags: webdev, javascript, adventofcode
Published: 2019-12-02 09:14:48

Christmas holidays are getting close. Either we are planning to work on some personal side projects, learning some new techie subjects or simply recharging batteries with a well deserved coding pause.

Nevertheless I would like to spread some awareness about the ["Advent of code"](https://adventofcode.com/2019) series, created by [Eric Wastl](https://twitter.com/ericwastl), allowing us to practice our developer skills by solving programming problems on a daily base before Christmas.

### What is it about?  

> Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.

The challenge for the second day looks like the following:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/mz8kkoie9u9qli75x7mv.png)

As you can see the UI is minimal and you do not need any super computer to take part to it. All you need is just some IT background, but without being an expert developer.

You need to authenticate before starting (you can use the most common social media login channels for this) and then you will get the input data to start the challenge and an input field to provide the answer with the solution.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/5h0ywss9jiyn9yiz5m1m.png)

Pretty easy, isn't it? The let's start solving the daily puzzle!!
Emoji in presentation?
Tags: discuss, beginners, programming, showdev
Published: 2019-12-02 08:52:34

Many people love emoji. Many people on Dev.To love emoji. Emoji start to be a part of everything.

So, I just want to say that **[Aspose.Slides](https://products.aspose.com/slides?utm_source=https://dev.to/grazhevskaja/emoji-in-presentation-with-aspose-slides-3h1k-temp-slug-1587170/&utm_medium=email)** supports working with **emoji in presentations**.

<img src="https://i.imgflip.com/3h3azc.jpg"/>

And, even if you need to convert your presentation with emoji whether to image, PDF, SWF or other format - [Aspose.Slides will render emoji](https://docs.aspose.com/display/slidesnet/Saving%2C+Printing+and+Managing#Saving,PrintingandManaging-Supportforrenderingemojicharacters?utm_source=https://dev.to/grazhevskaja/emoji-in-presentation-with-aspose-slides-3h1k-temp-slug-1587170/&utm_medium=email) with no problem. You dont need to do anything additional for that, just save presentation in the needed format:
```csharp
Presentation pres = new Presentation();
pres.save("Emoji.pptx", SaveFormat.Pdf);
```

Or, you may define emoji [substitution rules](https://docs.aspose.com/display/slidesnet/create+fallback+font?utm_source=https://dev.to/grazhevskaja/emoji-in-presentation-with-aspose-slides-3h1k-temp-slug-1587170/&utm_medium=email) this way, to be sure how they will substitute each other:
```csharp  
// Define fallback fonts
string[] fontNames = new string[] { "Segoe UI Emoji, Segoe UI Symbol" };

// Create fallback font rule
IFontFallBackRule thirdRule = new FontFallBackRule(0x1F300, 0x1F64F, fontNames);
```

The API is available for other languages too: Java, C++, Android, etc.

<hr/>
Have you ever used emoji in presentations?
Have you ever created your own emoji?👇👇👇
Create & Use Helper Functions | React Component
Tags: react
Published: 2019-12-02 08:47:10

You can use helper functions just like other frameworks. Also, you can achieve code reusability by using these functions.

In the blow example, we have to create a helper class and use to it.

As an Example,

#Helpers.js
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">plus(x, y){
     <span style="color: #008800; font-weight: bold">return</span> x<span style="color: #333333">+</span>y;
}
</pre></div>


Import and Use of Helper methods in calculator components,
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">import</span> React from <span style="background-color: #fff0f0">&#39;react&#39;</span>;
<span style="color: #008800; font-weight: bold">import</span> { plus, minus } from <span style="background-color: #fff0f0">&#39;./Helpers&#39;</span>

<span style="color: #008800; font-weight: bold">class</span> CalculatorComponents <span style="color: #008800; font-weight: bold">extends</span> React.Component {
    constructor(props){
        <span style="color: #008800; font-weight: bold">super</span>(props);
        <span style="color: #008800; font-weight: bold">this</span>.yourClickFunction<span style="color: #333333">=</span><span style="color: #008800; font-weight: bold">this</span>.yourClickFunction.bind(<span style="color: #008800; font-weight: bold">this</span>);
    }

    yourClickFunction(x, y){
      console.log(this.plus(x, y)); <span style="color: #888888">//Output will be (10, 20) =&gt; 30</span>
    }

    render() {
        <span style="color: #008800; font-weight: bold">return</span> (
            <span style="color: #333333">&lt;</span>div <span style="color: #333333">&gt;</span>
                <span style="color: #333333">&lt;</span>h4 <span style="color: #333333">&gt;</span>React Helper functions<span style="color: #333333">&lt;</span><span style="color: #FF0000; background-color: #FFAAAA">/ h4&gt;</span>
                <span style="color: #333333">&lt;</span> button onClick<span style="color: #333333">=</span>{<span style="color: #008800; font-weight: bold">this</span>.yourClickFunction(<span style="color: #0000DD; font-weight: bold">10</span>, <span style="color: #0000DD; font-weight: bold">20</span>)}<span style="color: #333333">&gt;</span>Click..<span style="color: #333333">&lt;</span><span style="color: #FF0000; background-color: #FFAAAA">/ button &gt;</span>
            <span style="color: #333333">&lt;</span><span style="color: #FF0000; background-color: #FFAAAA">/div &gt;</span>
        );
    }
}
<span style="color: #008800; font-weight: bold">export</span> <span style="color: #008800; font-weight: bold">default</span> CalculatorComponents;
</pre></div>


Explore React 63 Best FAQs
https://www.code-sample.com/2018/03/reactjs-interview-questions-and-answers.html