teleren/devto huggingface dataset:
Visual Studio Intellicode
Tags: csharp, dotnet, productivity
Published: 2020-09-07 16:17:57

At the Build 2019 conference, Microsoft announced the release of Intellicode. This tool based on artificial intelligence will help us developers while we are developing code. Intellicode is responsible for analyzing millions of lines of code coming from public GitHub projects to provide the best options for our projects and increase their quality, also, it does not give the ability to be more productive.

It supports the following languages in Visual Studio 2019:

* C#
* Java
* Python
* SQL Server
* TypeScript / Javascript
* XAML

Sure you wonder how it works? Intellicode analyzes millions of lines of code sourced from high-scoring public GitHub repositories. While we are writing our code, Visual Studio will show us the recommendations differentiated with a star, let's see the image:

![Visual Studio IntelliCode](https://withoutdebugger.azureedge.net/blog/20200907.Intellisence/01.gif)

In the image we can see how when writing our code the suggestions related to the context of what we are doing are displayed. In our context, that of the example, in the recommendations we see the most used options at the beginning of the list marked with a star.

This technology is based on GitHub line learning models. But we can create our own models for our projects. This allows us to customize our project adapting to our work team. The tool will analyze our projects or solutions, automatically generating recommendations.

![Visual Studio IntelliCode](https://withoutdebugger.azureedge.net/blog/20200907.Intellisence/02.png)

Another interesting feature is Code Styles. This functionality allows us to have code conventions to automatically make style and format corrections. It will help us keep our code clean and organized. For this we must add the file editorconfig. This file will contain the necessary information on the basic styles that we can then configure as we wish.

![Visual Studio IntelliCode](https://withoutdebugger.azureedge.net/blog/20200907.Intellisence/03.gif)

All the recommendations configured in these files can be seen in the error list window in Messages.

![Visual Studio IntelliCode](https://withoutdebugger.azureedge.net/blog/20200907.Intellisence/04.png)

Let's do a simple test. We will change in our editorconfig file that our indentation instead of being 4 spaces is 15. We will only have to change this line.

indent_size = 4 to indent_size = 15

After saving our file, we will return to our code and press the Ctrl K + D keys to activate the automatic style adjustment. We will see how the indentation changes in our code.

![Visual Studio IntelliCode](https://withoutdebugger.azureedge.net/blog/20200907.Intellisence/05.gif)

## Conclusion
Over time, more and more languages will be added, providing greater support to the tool. Intellicode will be a very helpful tool for programmers, being able to reduce a large number of common errors, maintain a clean, orderly and consistent code almost by the hand of an automatic refactoring.
Which frontend framework??
Tags: jquery, javascript, angular, vue
Published: 2020-09-07 16:13:24

---
title: Which frontend framework??
published: true
description: Convince a dev
tags: #Jquery #Javascript #Angular #Vue
//cover_image: https://direct_url_to_image.jpg
---
##Why move?
Angular & Vue developers(Next time React), how do you convince a *Jquerian* (Jquery dev) to switch to Angular/Vue?
Why College Students should learn Python Programming
Tags: python, career, startup
Published: 2020-09-07 16:12:54

Python is considered one of the most popular languages whose value has never been replaced to date. This makes Python as one of the most sought after language, and Python certification has excellent value for everyone. The best time to learn Python is in college, where your mind is free from worries, and your only focus is learning. In this article, we have listed down six reasons why every college student should learn Python.

##1) Simple and easy
Python is an extremely simple and easy language to learn. It’s free and open-source of learning and can be interpreted easily. **It does not deal with a complex syntax, and hence every college students find it easy to learn.** Moreover, you are always keen to learn new things in college and what better than learning Python.

##2) Easy access to personalized learning
Since Python is the leading programming language, most college students want to learn it to stay updated with the latest trends. There may be some students who do not want to do a specialization in college but still learn Python. You can easily connect with a good [python tutor online](https://favtutor.com/python-assignment-help) to get 1:1 tutoring and live help. Online tutors are best to learn anything at the comfort of your home and Python is one of the best programming languages that can be taught online easily.

##3) Increasing value and demand
The fact that companies like Google, Facebook, NASA, Amazon, Quora, and others use Python in their business, proves that learning this subject is in popular demand. It is sure to add value to your knowledge. Moreover, it is a scalable and simple programming language preferred by start-ups as well. Hence, learning this language in college will add immense value to your career.   

##4) Used in web development
Python is one of the most used applications in web development, and it’s the core reason which makes the code stable and fast. If you can learn Python in college, it’s the best time to explore your future and be able to take part in the growing scope of web development. **All big corporate giants like Google, Amazon, Uber, and others use Python in their regular business functioning.**

##5) Good Salary
Python engineers get some of the highest salaries across various industries. Though the figure varies from country to country, having specialized knowledge in Python gives you an edge over other candidates. Moreover, the future is technology-oriented, and hence learning Python in college will be a huge advantage.

I think these reasons made you believe why python coding is important.
Trie Data Structure
Tags: codenewbie, computerscience, codequality, cpp
Published: 2020-09-07 16:10:13

Trie is an efficient information re<b>Trie</b>val data structure. Using Trie, search complexities can be brought to an optimal limit (key length). If we store keys in the binary search tree, a well-balanced BST will need time proportional to M * log N, where M is the maximum string length and N is the number of keys in the tree. Using Trie, we can search the key in O(M) time.

There are many questions in strings where we should use a trie data structure, instead of other algorithms. For example, if there is a word in the dictionary, which you need to search, whether it is present or not. The most basic approach, that will come to your mind is to search the word one by one in the dictionary. 
But, if we are searching for the word "NO", and in the dictionary, we have {"Not", "Notes", "Notable", "Nope"}, then we will search character by character. Now, consider a word with 1 lakh length. If would become more complex and you will definitely get TLE, in CP. 

So, what you can do is, make use of the TRIE data structure. 

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

Here, what we are doing is, creating a class Node, where we have data, map, and terminal as its elements. We have an unordered map, which links the first character of the word, to all the words starting from it. For example, we have {"Apple", "Ants", "Animals", "Amphibians"}, then the map will link the character "A", with the tree which consisted of the rest of the letters as shown below.

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

Now, we will create another class TRIE, which will create our whole tree


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

Now we will create a function insert node, which will take the word as an argument, and will create the whole trie.

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

Here, we defined a temp Node, which contains the root node.
Now, we iterate through the characters in the word and will check, whether it is already present or not, if not, we create a new node and link it to our unordered_map.
After iterating through the whole character array, make sure to put temp->terminal to true, which will indicate that the word ends.

That's all for the TRIE data structure.
Happy Coding :)
VSC (custom editor buttons) WHATS THE CODE FOR..... 
Tags: python, texteditor, vscode
Published: 2020-09-07 16:05:16

I found a add on to create custom VSC buttons to execute code. 
What’s the code for runserver, makemigrations and migrate? BUT, BUT..... apparently it might be from a “outside “ look on the project?... what’s does ${ } mean?
Is there a way to aggregate dev.to RSS feeds?
Tags: watercooler, discuss, help
Published: 2020-09-07 15:54:31

Hey everybody!

I want to avoid getting posts that have several tags I read through RSS more than once in my reader app. Let's say I read the following RSS feeds:
`dev.to/feed/tag/webdev`
`dev.to/feed/tag/javascript`
`dev.to/feed/alexkhismatulin`

If `alexkhismatulin` posts something with both `webdev` and `javascript` tags, the post appears three times in the reader app. I'm wondering if there's a way to subscribe to an aggregation. I imagine something like this:
`dev.to/feed/?tags[]=webdev&tags[]=javascript&authors[]=alexkhismatulin`
Universal data tool weekly update 4
Tags: computerscience, datascience, machinelearning
Published: 2020-09-07 15:27:57

If you haven’t heard of the Universal Data Tool, it’s an open-source web or desktop program to collaborate, build and edit text, image, video, and audio datasets with labels and annotations. You can get started with [the Universal Data Tool](http://universaldatatool.com)

This is our fourth community update! We’re hoping by releasing these we can better engage the community and encourage new contributors. Let’s get started…

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

To watch the full video click [here] (https://youtu.be/aQ-7OShkfIM)

# New Feature: Universal Data Tool Courses

With this update, we are introducing the training courses for Universal DataTool. With this feature now you can ensure that your labeler team is working not only in a streamlined way but with the best quality as well. The people working on a dataset will have to complete it before they can begin working on the labels.
Creating a training course is super easy and it can be done in just a few minutes. You can insert a dataset of your choice to be put in the training. This training contains questions, exercises, tests, and different editable options.

# New Feature: Text Entity Relations

This is a much-awaited feature that was missing in the NLP(Natural Language Processing). This feature allows you to draw between different texts to create the relation. You can do it just by using a one-line command and it works super-fast. Not only that but you can also click on read more options to get additional commands and ways to use them which can be useful in different scenarios.

# New Feature: Download Mask Button

This is a small but very useful feature that we have added in the latest update. With this feature, you can download the colored masks just by clicking on the button which is in the download options list.

#New update: Brand new layout

With this new update, you can see a totally new layout of the options. It’s less cluttered and different options can be seen in different tabs. This makes using the Universal Data Tool easier than ever.

#Other updates:

Feedback button: Now you can share the feedback with us by clicking on this little button on the right bottom corner of the page. It allows you to add the screenshots as well. (thanks @moufette)
New Homepage: Now we have a redesigned and cool looking Homepage which can give you more information and insight of the Universal Data Tool

That’s it for our forth community update, be sure to follow us on [Twitter](http://twitter.com/UniversalDataTl), or join our [Slack](https://workaroundon.slack.com) to hear more!
How to parse a key-value pair list with AWK
Tags: awk, parse, shell, oneliner
Published: 2020-09-07 15:27:35

---
title: How to parse a key-value pair list with AWK
published: true
description: 
tags: awk, parse, shell, oneliner
cover_image: https://logodownload.org/wp-content/uploads/2017/11/gnu-logo.png
---

A simple example, using env as input:

```bash
$ env | grep EDITOR
EDITOR=vim
```

```bash
$ env | awk -F= '{a[$1]=$2} END {print(a["EDITOR"])}'
vim
```

It's way easier to just do `echo $EDITOR` though.

But sometimes it's not so easy:

```bash
$ xdotool getactivewindow getwindowgeometry --shell | awk -F= '{a[$1]=$2} END {print(a["WIDTH"])}'
1430
```

If you want to get the current window's width.

_

= M =
Multi-stage Docker Builds for Laravel
Published: 2020-09-07 15:19:17

---
title: Multi-stage Docker Builds for Laravel
published: true
description: Make your deployments faster by caching dependencies
tags: 
//cover_image: https://direct_url_to_image.jpg
---

Most applications have a build step to download all the dependencies and/or compile your frontend assets.

Usually, it takes most of the deployment time.

Not to mention that the final image may be bigger because of the unnecessary dependencies that were used to download dependencies and compile the frontend assets.

# Docker multi-stage builds

One of the easiest ways to make your deployments faster and images slimmer is to use multi-stage docker builds.

Docker caches a specific stage and only re-runs it if any of the dependent files have been changed.


# Composer Step 

1. Use Composer 2.0 image.
2. Copy files required for "composer install".
3. Run "composer install".
4. Copy the rest of the files.
5. Run "composer dump-autoload".

```docker
#
# PHP Dependencies
#
FROM composer:2.0 as vendor

WORKDIR /app

COPY database/ database/
COPY composer.json composer.json
COPY composer.lock composer.lock

RUN composer install \
    --no-interaction \
    --no-plugins \
    --no-scripts \
    --no-dev \
    --prefer-dist

COPY . .
RUN composer dump-autoload
```

# NPM Step

1. Use NodeJS image.
2. Cop files required for the "npm install".
3. Run "npm install".
4. Copy files required to build your frontend assets.
5. Build your frontend assets. 

```docker
#
# Frontend
#
FROM node:14.9 as frontend

WORKDIR /app

COPY artisan package.json webpack.mix.js yarn.lock tailwind.js ./

RUN npm install

COPY resources/js ./resources/js
COPY resources/sass ./resources/sass

RUN npm run production
```

# Application Step

1. Use your desired image.
2. Copy built files from the previous stages.
3. Enjoy fast deployments.

```docker
#
# Application
#
FROM php:7.4-fpm

WORKDIR /app

# Install PHP dependencies
RUN apt-get update -y && apt-get install -y libxml2-dev
RUN docker-php-ext-install pdo pdo_mysql mbstring opcache tokenizer xml ctype json bcmath pcntl

# Copy Frontend build
COPY --from=frontend /app/node_modules/ ./node_modules/
COPY --from=frontend /app/public/js/ ./public/js/
COPY --from=frontend /app/public/css/ ./public/css/
COPY --from=frontend /app/public/mix-manifest.json ./public/mix-manifest.json

# Copy Composer dependencies
COPY --from=vendor /app/vendor/ ./vendor/
COPY . .

RUN php artisan config:cache
RUN php artisan route:cache
```

You may find the full `Dockerfile` used in this article [here.](https://gist.github.com/TitasGailius/1f6ce9045938299ab53f608236839eac)

Enjoy!
State management in React made easy
Published: 2020-09-07 15:18:39

If you are using react to build web apps, you would know managing state is fairly complex, you either have to use big state management libraries like **redux** or use context api. Both approaches needs you to write a lot of boilerplate code, even to work on a small and easy to build feature. 

I faced a lot of these problems, thus I created this util library called [kladi](https://github.com/Ninja-Developers/kladi). It is built using context api. Using **kladi** is fairly simple.

## Here is how easy it is to use
- First, install kladi by typing `npm i kladi`
- Then you need to wrap your base component with a provider so that all components in your component tree gets the global state. 
```jsx

import { Provider } from "kladi";

import React from "react";
import ReactDOM from "react-dom";
import App from "./App";

ReactDOM.render(
  <Provider initialState={{count: 0}}>
    <App />
  </Provider>,
  document.getElementById("root")
);
```
you can pass an initial state object for you access anywhere in the component tree. 

- Now to access your state anywhere from the component tree use the hook provided by **kladi**

```jsx
import {useState} from "kladi"

const app = props => {

const [count, setCount] = useState('count')
const [name, setName] = useState('name', "Kladi")

return <>
{count} 
<button onClick={() => {setCount(count + 1)}}>Press</button>
{name}
</>
}

```

- yes you can create a new state in the fly and also access them in other components as well. Well, it does look like the `useState` hook from `react`, but this state is global. 

- To create and access state you need to maintain a unique string value. 
also to create a new state, you have to provide a default value, but if you are accessing a state that is already present then you don't need to provide the default value. 

---

> This library is new and under development, if you use this library and found any bugs pls create an issue [here](https://github.com/Ninja-Developers/kladi/issues).
Digital Dice using Python
Tags: python, ux, codenewbie, webdev
Published: 2020-09-07 15:13:49

All I wanted was to create a dice to generate random numbers from 1 to 6 using any possible simplest programming language. And I also wanted it to be displayed digitally each time when we roll the dice. 

So I used python to generate random numbers from 1 to 6. And display image based on the random digit output. The dice will be rolled & the output will be displayed each time when you click on the dice.

A simple solution for my Digital Dice 🙂

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

Here's the code below for reference 
https://github.com/dhanushnehru/100DaysOfCode
Vivium - Cause there's a shortcut for everything!
Published: 2020-09-07 15:00:47

AS an avid desktop user for most of my life, the change to using a laptop as a primary device has been interesting. The portability is great, but the interaction is a bit limited.  I'm looking at you, trackpad. I miss my mouse but I'm slowly learning that using a mouse or even a trackpad is not always necessary. And if we are talking about time efficiency, taking your hand off the keyboard to grab the mouse and navigate the UI is certainly less than ideal.  To solve that many of our favorite programs come with keyboard shortcuts to help users move through the software at a faster pace. Some of these ready to go shortcuts are great, but there are certainly holes to fill. Enter Vivium.

 Vivium is a chrome browser extension that promises to allow the user to navigate the internet without ever using a mouse. It's got the added benefit of making the user feel like a real hacker with all the clicking and clacking your keyboard will do. It's modeled after Vim, and adds several useful shortcuts to chrome.

Installation and Basic Commands:

First and foremost, installation is necessary.  Open up Chrome and take a moment to visit their extension store. I also provide a link to the extension [here](https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en).

To demonstrate a few of the commands I'll walk through visiting Reddit. On your desired webpage, press the F keyboard when your cursor is not active in an input field. Your screen will be filled with short, 2-letter boxes. If you type the corresponding letter, you will select and be brought to the link they are hovered over.
You can also scroll along the page by pressing "D" to go down and "U" to go up. Nifty! To scroll more slowly, on a line by line basis, you can press "J" to go down and "K" to go up.
![blog1](https://dev-to-uploads.s3.amazonaws.com/i/c8loqwxo95ozxmopoues.png)
 
Creating and changing tabs is also possible with Vivium. Try it out by creating a new tab with "Shift + F" to create a new tab, followed by "Shift + K" to make it active. Move back to your old tab with "Shift + J"   If you decide you are done with your tabs you may close the current one with "Shift + X" 

Give it a whirl, it will be faster navigation than using a mouse when you get used to it! Check out their GitHub page for official documentation and a deeper dive.
I Wrote a Book! How To Use Twitter To Break Into Tech
Tags: codenewbie, webdev, career, books
Published: 2020-09-07 14:50:16

## TL:DR
I wrote an eBook with all the tips and strategies I used to get build a professional network to get a job in tech! It's priced at $10 and you can grab it [HERE!](https://williamjohnson.podia.com/break-into-tech-with-twitter)
## About Me
Hi, I'm Will I currently work at egghead.io. At 33 I decided to change careers and teach my self web development. I knew that since didn't have a college degree or any experience in tech, I had to find another way to get into tech. 

From years of using social media to create opportunities for myself from booking performances for my dance group in other cities to being featured on EA Sports website when I was gaming. I knew that in order for me to stand out in tech, I needed to apply the same strategies. It worked! Now I want to help you do the same.

##What Is This Book About?

It's about creating a presence so strong on Twitter that opportunities start to just come your way. I know that sounds like a big promise. I agree is it but after using Twitter over and over again and still using it to this day. I have and continue to get amazing opportunities out of nowhere all the time.

I don't focus on followers, likes, or retweets. I focus on getting your profile seen by the right people, not a lot of people.

##What Are People Saying About The Book

**Brian Douglas** Developer Advocate @ GitHub
{% twitter 1302723314482204672 %}

**Alex Hillman** Author of TinyMBA
{% twitter 1302394825279524864 %}

## How can I get a copy?

You can purchase your PDF copy for $10 here: [Break Into Tech With Twitter](https://williamjohnson.podia.com/break-into-tech-with-twitter)

You also get a **limited amount of FREE** copies from [Alex Hillman](https://twitter.com/alexhillman) and [Rahat Chowdhury](https://twitter.com/Rahatcodes)

If you purchase the book and have any questions let me know! I'll be happy to help!