teleren/devto huggingface dataset:
VS Code - Vertical Rulers for Prettier Code?
Tags: vscode, python, javascript
Published: 2020-12-31 07:37:27

## What is a Vertical Ruler in VS Code?
In VS Code, the vertical ruler is a static, customizable design element to give your code an unenforced right-side boundary, meaning it won’t word-wrap your code 

This vertical ruler isn’t for measurements, unlike in Word, Illustrator, or other design/editing packages. 

![Orange, gray, purple rulers](https://dev-to-uploads.s3.amazonaws.com/i/amas6zvy56v8gqsd9ujo.png)
<figure>
  <figcaption>Orange, gray, and purple rulers. Note lines 21, 22 are not impacted by the rulers.</figcaption>
</figure>


Text is not impacted by rulers, as the example above shows.

## Why?
A vertical ruler provides an easy means to make your code readable by not being too wide.   

Some languages (like Python or Drupal) have style guides for max characters per line. (79 characters for Python). 

While others, like Javascript, have a [very loose set of guidelines](https://developer.mozilla.org/en-US/docs/MDN/Guidelines/Code_guidelines/JavaScript) but nothing suggesting a max character count per line.


## How
Color and multiple vertical rulers are available in VS Code as of the [February 2020 edition](https://github.com/microsoft/vscode/issues/54312). 

###  Step 1 - Open `settings.json`
* Mac: Press `Shift` `Command`  `P` 
* non-macOS: press `Ctrl P`

This opens the file search.

Type in `settings.json` and select the file to edit it.

### Step 2 - Add the following to the last line inside the json object:

```json 
"editor.rulers": [
   {
     "column": 80, 	  // spacing of 1st column from left
     "color": "#ff9900"   // orange, Go Vols!
   },
     100,  // 2nd ruler with no color option
   {
    "column": 120,   	// third ruler
    "color": "#9f0af5" 	// purple, go Pirates! 
   },
],
```
The above implementation is language-agnostic and becomes the default "always-on" ruler(s). It is possible to have both the default and language-specific at the same time. 

For a specific language, change the language name in the ‘[  ]’ brackets to your preferred language:
```json
  "[ruby]": {
        "editor.rulers": [
            {
                "column": 100,
                "color": "#00ff22"
            }
        ]
    }
```
Add one for each language.

### Step 3 - Enjoy readable code
Make sure to save your changes and enjoy. 

![Pretty Code. Not too wide. Just right.](https://dev-to-uploads.s3.amazonaws.com/i/z220nvsrbhu64vydbfzu.png)
<figure>
  <figcaption>Pretty Code. Not too wide. Just right.</figcaption>
</figure>    

## Feedback?
Have thoughts or advice on the above implementation or other useful VS Code settings?

If so, drop a note. I'd love to hear and see your examples, explanations, and other details to clarify how/why/when.


## Resources
[February 2020 VS Code Feature](https://github.com/microsoft/vscode/issues/54312). 
[MDN Javascript Guidelines](https://developer.mozilla.org/en-US/docs/MDN/Guidelines/Code_guidelines/JavaScript)
[Python Style Guide - PEP8](https://www.python.org/dev/peps/pep-0008/)
Capturing bugs in iOS apps is lot more easier now
Tags: ios, swift, objectivec, mobile
Published: 2020-12-31 07:29:47

iOS developers out there, here is something that might be of interest to you. Finotes is moving closer to Zero code starting next release.

One major change is that capture of lifecycle events will happen without any code change.

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

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

There will be no need to import FinotesCore or extend ObservableViewController to report lifecycle event trail in #bug reports .

More to come. Watch this space.
My New Portfolio Site
Tags: dohackathon
Published: 2020-12-31 07:21:14

## What I built
I built a new portfolio web application with Python/Django. This will help me showcase my work and skills. 

### Category Submission: 
Portfolio Website

### App Link
https://www.jacobwelling.me

### Screenshots
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/m58jztqerz72yq39hj9p.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/nahkpdftvewzi18erw4z.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/u6uz6kk958oc7evj4q6f.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1rcr0y6cpe40y9tom6pe.png)

### Description
 This Portfolio website was built using Python/Django and deployed on DigitalOcean. It has a resume-like format showing my experience, skills, and education. In addition to this it has cards at the bottom where I can link to my other projects. 

### Link to Source Code
https://github.com/JAW1/myResume

### Permissive License
 MIT License

### Background
As a student, it is sometimes hard to differentiate myself from all of the other applicants to different internships or jobs, I really wanted to have a place where I can show people what I have worked on in the past and give them an easy way to see my experience and skills. 

### How I built it 
I first learned how to build Python/Django apps in my Business Programming class. I used what I had learned in that class to begin the creation of my app and get it mostly ready for deployment. In my experience, deploying a Django app can be really difficult. DigitalOcean's tutorial on how to deploy the app made it a lot more manageable. Deploying still took me quite a while because I'm definitely new to this sort of thing, but I really liked their simple way of explaining what I needed to do.
Creating an AWS Fargate service with a custom Task Definition using the AWS Python CDK
Tags: aws, cdk, containers, python
Published: 2020-12-31 07:16:50

Because not a lot of Python CDK examples seem to be available on the web I share this CDK code snippet for the common use case of creating a Fargate service. The code below deploys an ECS Fargate service on an ECS cluster. The Service uses a Docker Hub image and contains a port mapping. The code should be self-explanatory.

```
from aws_cdk import (
    core, aws_ec2 as ec2,
    aws_ecs as ecs,
    aws_ecs_patterns as ecs_patterns
)

class ExampleStack(core.Stack):

    def __init__(self, scope: core.Construct, construct_id: str, **kwargs) -> None:
        super().__init__(scope, construct_id, **kwargs)

        vpc = ec2.Vpc(self, "some-vpc", 
                cidr="10.0.0.0/22",
                max_azs=3)

        cluster = ecs.Cluster(self, "some-cluser", vpc=vpc)

        task_definition = ecs.FargateTaskDefinition( self, "spring-boot-td", 
                cpu=512, memory_limit_mib=2048)

        image = ecs.ContainerImage.from_registry("springio/gs-spring-boot-docker")
        container = task_definition.add_container( "spring-boot-container", image=image)

        port_mapping = ecs.PortMapping(container_port=8080, host_port=8080)
        container.add_port_mappings(port_mapping)

        ecs_patterns.ApplicationLoadBalancedFargateService(self, "some-service",
            cluster=cluster,
            task_definition=task_definition,
            desired_count=2,
            cpu=512,
            memory_limit_mib=2048,
            public_load_balancer=True)
```

Enjoy!
Scala 
Tags: scala, intellij
Published: 2020-12-31 07:14:50

C:/Program Files/Java/jdk-14.0.2/bin/java.exe -Djline.terminal=jline.UnsupportedTerminal -Dsbt.log.noformat=true -Dfile.encoding=UTF-8 -Didea.managed=true -Dfile.encoding=UTF-8 -jar C:/Users/sivareddy/AppData/Roaming/JetBrains/IntelliJIdea2020.2/plugins/Scala/launcher/sbt-launch.jar
[info] [launcher] getting org.fusesource.jansi jansi 1.11  (this may take some time)...
:: problems summary ::
:::: WARNINGS
module not found: org.fusesource.jansi#jansi;1.11
==== local: tried
C:\Users\sivareddy\.ivy2\local\org.fusesource.jansi\jansi\1.11\ivys\ivy.xml
-- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
C:\Users\sivareddy\.ivy2\local\org.fusesource.jansi\jansi\1.11\jars\jansi.jar
==== local-preloaded-ivy: tried
file:/C:/Users/sivareddy/.sbt/preloaded/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
==== local-preloaded: tried
file:/C:/Users/sivareddy/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
-- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
file:/C:/Users/sivareddy/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
==== Maven Central: tried
https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
-- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
==== sbt-maven-releases: tried
https://repo.scala-sbt.org/scalasbt/maven-releases/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
-- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
https://repo.scala-sbt.org/scalasbt/maven-releases/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
==== sbt-maven-snapshots: tried
https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
-- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
==== sbt-ivy-snapshots: tried
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
::          UNRESOLVED DEPENDENCIES         ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.fusesource.jansi#jansi;1.11: not found
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
Server access Error: Remote host terminated the handshake url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
Server access Error: Remote host terminated the handshake url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
[error] [launcher] unresolved dependency: org.fusesource.jansi#jansi;1.11: not found
[error] [launcher] error during sbt launcher: error retrieving required libraries
(see C:\Users\sivareddy\.sbt\boot\update.log for complete log)
[error] [launcher] could not retrieve jansi 1.11


I am getting above error while creating first scala project in intellij idea...please help me out with this issue..

Thanks in advance
Variables in Python
Tags: python, programming, beginners, tutorial
Published: 2020-12-31 07:08:00

**Variables** in programming are something like containers storing some specific things.

Variables are a way we store data on the computer.
This is how we create variables in python:
```
Syntax:
variable_name = data
```
But, there's a catch here, you cannot have some crazy names as variable names in python.

There are some **best practices** in python being followed by the python community when it comes to naming your variable names.
#### Do's
* Variable names can contain *letters, numbers, underscore*
* Always start with a lowercase letter or an underscore
* **snake_case**
Use lowercase letters and underscores for spaces.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/owvs5ml9g1sb8hhvju32.png)

#### Dont's
* Do not use reserved keywords of python as variable names, coz this is what python will tell you:
```
...
Traceback (most recent call last):
  File "./program.py", line (x), in <module>
...
```

* Do not use special characters like !,@,#,$,%,^,&,* in a variable name, coz you will get the same error message:
```
...
Traceback (most recent call last):
  File "./program.py", line (x), in <module>
...
```

#### Note
Keep in mind that python is case - sensitive, which means the variable like hello and Hello are very different for python.

### Best Resources

- [Python Blog Series](https://dev.to/aswin2001barath/series/10416) : A Blog series where I will be learning and sharing my knowledge on each of the above topics.

- [Learn Python for Free, Get Hired, and (maybe) Change the World!](https://academy.zerotomastery.io/a/aff_tz1t0tpx/external?affcode=441520_dcwk-s8s) : A detailed roadmap blog by Jayson Lennon (a Senior Software Engineer) with links to free resources.

- **Zero To Mastery Course** - [Complete Python Developer](https://academy.zerotomastery.io/a/aff_9khypm7v/external?affcode=441520_dcwk-s8s) : A comprehensive course by Andrei Neagoie (a Senior Developer) that covers all of the above topics.

**Who Am I?**

I’m Aswin Barath, a Software Engineering Nerd who loves building Web Applications, now sharing my knowledge through [Blogging](https://medium.com/techsoftware) during the busy time of my freelancing work life. Here’s the link to all of my socials categorized by platforms under one place: https://linktr.ee/AswinBarath

**Thank you** so much for reading my blog🙂.
Apply Slide Layouts in PowerPoint in Java
Tags: java, slidelayout, free
Published: 2020-12-31 07:02:39

Slide layouts are some simply “ready-to-use” slide templates that contain formatting, positioning, and placeholders. A properly constructed slide layout will greatly improve the clarity and readability of your slide content. This article will demonstrate how to apply slide layouts in PowerPoint via Java.  (API: Free Spire.Presentation for Java)

**Installation**
**Method 1:** Download the [Free Spire.Presentation for Java](https://www.e-iceblue.com/Download/presentation-for-java-free.html) and unzip it. Then add the Spire.Presentation.jar file to your project as dependency.

**Method 2:** You can also add the jar dependency to your maven project by adding the following configurations to the pom.xml.
```xml
<repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.presentation.free</artifactId>
        <version>3.9.0</version>
    </dependency>
</dependencies>
```

**1# Apply a title slide layout:**
```java
import com.spire.presentation.*;

public class SlideLayout {
    public static void main(String[] args) throws Exception{

        //Create an instance of presentation document
        Presentation ppt = new Presentation();

        //Remove the default slide
        ppt.getSlides().removeAt(0);

        //Append a slide and set its layout
        ISlide slide = ppt.getSlides().append(SlideLayoutType.TITLE);

        //Add content for Title and Text
        IAutoShape shape = (IAutoShape)slide.getShapes().get(0);
        shape.getTextFrame().setText("The Scarlet Letter");

        shape = (IAutoShape)slide.getShapes().get(1);
        shape.getTextFrame().setText("A Dark Romanticism Fiction");

        //Save the document
        ppt.saveToFile("SlideLayout.pptx", FileFormat.PPTX_2013);
        ppt.dispose();
    }
}
```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6ovl8m3ir5xvpfwr3mfs.jpg)

**2# Apply 11 kinds of different slide layouts:**
```java
import com.spire.presentation.*;

public class DifferentSlideLayout {
    public static void main(String[] args) throws Exception{

        //Create a PPT document
        Presentation presentation = new Presentation();

        //Remove the default slide
        presentation.getSlides().removeAt(0);

        //Loop through slide layouts
        for (SlideLayoutType type : SlideLayoutType.values())
        {
            //Append slide by specified slide layout
            presentation.getSlides().append(type);
        }

        //Save the document
        presentation.saveToFile("Result.pptx", FileFormat.PPTX_2013);
        presentation.dispose();
    }
}
```
ReactJS-A popular JS library
Tags: 100daysofcode, javascript, webdev, opensource
Published: 2020-12-31 06:53:32

Open-Source has been a popular word since the last few years and a developer's contribution to open-source is very much celebrated apart from its undoubted value. React is also an open-source JavaScript library which is a Frontend developer's buddy to build attractive UI components for users.

React has a hawk-eye on each component which has served a booster take-off for the library. Concentrating on every UI component, React simplifies the complicated tasks, which proves to be one of the main reasons for its popularity.
 
To understand the popularity shoot-up of React, we first must focus on learning what JSX is!

JSX - A buzzword for the React developers. JSX is the coined term for JavaScript XML, which helps write HTML in React. It acts as a magnifying glass over the React, aiding it to increase its code readability. JSX is a simplified interpretation of HTML tags to React.

The simplicity of the code and its flexibility has doubled the reasons to use React. The runtime performance and the HTML and CSS applications are embraced by a wide range of programmers.
 
<h1>Virtual DOM-An insight</h1>

* Virtual DOM satisfies the need for Dynamicity on your web page. APIs though relatively slow to interact with helping in modifying the nodes of the subtree events.

* Virtual DOM is highly efficient in viewing the web app. The changes in the React app reflects on the UI by the creation of a new Virtual DOM. 

* There are 2 Virtual DOMs which aids in surging the performance upwards. Nevertheless, updating the Virtual DOM must be taken care of, invariably since React is a master of 2 Virtual DOM memories.

* If you are a React developer, then the point of the hunt for a framework to be popular is 'Reactivity'. Although pure JS updates the React components, DOM manipulation and update is taken care of by the React.

* The CPU-intensity and the memory usage in another turn-on for the programmers to use Reactjs. 

ReactJS is a great choice for business since it delivers better methods for a profitable future. Designing the apps with increase user performance is a cakewalk for the developers and a treat to the users. 

<code><p><br>
<footer style="height:auto"><h3>*Follow our community for more updates*</h3><table><tr><td><a href="https://gitlab.substack.com/">![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hplp6opfpywirwur2vmz.png "Official Website")</a></td><td><a href="https://twitter.com/GitlabC">![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/00qhd8v9ma2t2l2xv4xh.png "Twitter")</a></td><td><a href="https://www.meetup.com/GitLab-Meetup-Coimbatore/">![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/aqq6pi897bk687d3kwwa.png "Meetup Community")</a></td><td><a href="https://www.linkedin.com/groups/8955040/">![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8u4886rik46g1bvvrx8d.png "LinkedIn")</a></td></tr></table></footer></p></code>
#P1 - Introduction
Tags: machinelearning, python, tutorial
Published: 2020-12-31 06:43:31

##Machine learning
**Arthur Samuel** First coined the term and described it as: “the field of study that gives computers the ability to learn without being explicitly programmed.” 

**Tom Mitchell** provided a more formal definition:
“A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.”

Sounds both interesting and confusing at the same time. isn't it?

One another question that comes in mind is that why there are so many terms related to it like Deep learning, Artificial Intelligence, Neural Networks? Are they all same or something different?

##Artificial Intelligence
Artificial intelligence (AI) refers to the simulation of human intelligence in machines that exhibits traits associated with a human mind such as learning and problem-solving. 
In simple words, when you see a machine taking decisions like a human, it is an AI.

##Deep Learning
Deep learning is the functioning of AI which mimics the workings of the human brain in processing data for use in detecting objects, recognizing speech, translating languages, and making decisions.

##Neural Networks
Neural networks are a series of algorithms that mimic the operations of a human brain to recognize relationships between vast amounts of data. 

You can relate the above all terms by the given image.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/opfqzb8zpd0tbxodp2ra.png)
######courtesy: Google

###My Opinions 
**Should we go for ML or Development ?**

According to me, ML is one of the most overrated topic of the decade. Development is now becoming underrated, only because of the cool things that you can do with ML. 
Actually, its hard to Develop something completely from scratch, and it is nowhere comparable to ML.
Just by learning how to use a python library and applying it on a dataset to create a model, you cannot say that you know Machine Learning.
So while choosing anyone of them, you should have to depend on other factors.
Monitor User Activity in Laravel Application!
Tags: laravel, package, monitoring, activity
Published: 2020-12-31 06:41:53

User activity monitoring in your laravel application is really easy with [Laravel User Activity package](https://github.com/haruncpi/laravel-user-activity). It can monitor user login, lockout, record edit, insert and delete operation with a beautiful UI.

#### Installation
```
composer require haruncpi/laravel-user-activity
```
Now run install command
```
php artisan user-activity:install
```
To monitor data edit, delete or insert on certain model use `Loggable` trait in your model.

```php
<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Haruncpi\LaravelUserActivity\Traits\Loggable;

class Invoice extends Model
{
    use Loggable;

} 
```
This package has a beautiful UI to check user activity.
`http://example.com/admin/user-activity`
![Activity Dashboard](https://dev-to-uploads.s3.amazonaws.com/i/4vowymh9j0597zf1w8n2.png)

GitHub repo: [Laravel User Activity](https://github.com/haruncpi/laravel-user-activity)
Get your web developer portfolio reviewed for FREE
Tags: webdev, portfoliocon, career, beginners
Published: 2020-12-31 06:37:18

---
title: Get your web developer portfolio reviewed for FREE
published: true
description: Submit your portfolio for a free review on the RealToughCandy YouTube channel.
tags: webdev, portfoliocon, career, beginners
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/agub3wc3k5ctre1b3w38.jpg
---

## Do you have a developer portfolio that could use a second set of eyes?

In a few weeks I'll be doing my second annual portfolio review livestream on my YouTube channel. 

Last year's session was a smash success and I'm excited to review even more portfolios this year! 

Here is our livestream from last year: 
{% youtube IqSwjamlivQ %}

Some things I assess during the review:

- First impressions
- Messaging
- UX/UI
- Projects: strengths & improvement areas
- Contact forms
- Browser compatibility
- More

It takes a lot of bravery to put your work in front of the world, but in return you will get a ton of practical, actionable advice from a working software developer who's helped developers just like you land a dev job. 

### Sound interesting? Leave a link to your portfolio in the comments below.

Alternately, you can send it via email (realtoughcandy at gmail dot com).

The deadline for submission is Thursday, January 7th at 11 pm CST.

The exact time of the livestream will be announced soon, on the following platforms:  
- Dev.to 
- [My Community tab](https://www.youtube.com/realtoughcandy/community?sub_confirmation=1) on YouTube
- [RealToughCandy.io](https://www.realtoughcandy.io)

Be sure to [subscribe to my YouTube channel](https://www.youtube.com/realtoughcandy?sub_confirmation=1) so you don't miss the stream! 
Looking forward to it!
CodePen - Generative Cacti [p5.js]
Tags: codepen
Published: 2020-12-31 06:29:29

<p>I found a still image of this on my HD today and remembered how much I liked it, so I dug out the code and made a pen. I think this is where my blob obsession started!</p>

{% codepen https://codepen.io/georgedoescode/pen/WNGMdrK %}