teleren/devto huggingface dataset:
Building a Technical Legacy
Tags: documentation, career, ruby
Published: 2021-01-12 15:39:09

---
title: Building a Technical Legacy
published: true
description: 
tags: documentation, career, ruby
---
For forty years I labored the the software business, working in documentation, development, and test automation.  Nothing of what I did is still in use.  To quote Shelley, "Nothing beside remains."

Since retiring, I've spent time:
- Writing for my blog.
- Posting here and on Reddit.
- Working on open-source projects of my own.
- Making Rubygems for a few of those.

None of this has much reach.  It's amazing how quickly stuff recedes from the search engines.  (Think red-shift.)

So, for more than a year I've been putting up doc PRs over at the Ruby site.  (A while back I was made a ruby-committer -- still feeling biggity about that!)

These PRs represent major revisions and extensions to the doc, some of which I've posted about here.  These doc pages do have major reach.  They will be my technical legacy.

Found my spot.
Get current timestamp
Tags: javascript, webdev, codenewbie, beginners
Published: 2021-01-12 15:38:57

```js
 console.log(new Date().getTime());
```

---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript  
**[codedrops.tech](https://www.codedrops.tech/)**
Akka/Play/JVM monitoring tools, help us with feedback
Tags: monitoring, microservices, scala, showdev
Published: 2021-01-12 15:33:53

Hi all!

We are Kamon, a set of **monitoring tools** to help developers find and fix performance issues in microservices.

We have recently launched our new website [Kamon.io](https://www.kamon.io) and have redesigned and improved our product. So, we would appreciate any feedback from devs out there - whether it's just on how the website looks. :)

Kamon is especially great for developers using **Akka or Play frameworks**, but will work with anything on the **JVM**.

We are devs ourselves and monitoring nerdsso we are very keen on getting everyone to properly know what's going on in their microservices. 

![Alt text of image](https://s3.amazonaws.com/www.appcelerator.com.images/Clue-tweet.png)

We have an open-source and free instrumentation product and an APM product, that is paid but we offer monitoring for up to 5 services for free forever.

Anyway, Kamon is a small team and we're just starting so give it a try and get back to us with feedback.

Also, we want to make monitoring accessible to small teams and startups who can't afford the usual commercial tools so if that's you - knock yourself out!

Thanks!
Top 10 Animated login forms
Tags: html, css, javascript, beginners
Published: 2021-01-12 15:31:27

Hello, guys in this <a href="https://blog.stackfindover.com/category/tutorials/" rel="dofollow">tutorial</a> we will check the top 10 login form design inspiration & animations 2021.

The login form is one of the most important parts of the web. it's used for security and quiet effect. I have an awesome collection of 10 Best Animated Login Form In <a href="https://blog.stackfindover.com/category/html-css/" rel="dofollow">HTML & CSS</a> for designers and creative professionals. These Best Animated Login Forms are unique features that you can use on your WordPress website, blog, platform, or anywhere else.

{% youtube XEoQdB3wYwY %}
Framer vs Spring. What's your opinion about Framer Motion vs React Spring?
Tags: react, animation, style, discuss
Published: 2021-01-12 15:27:22

#Intro
After the javascript Framework Vue.js, React.js is my favorite Javascript library to work with. React.js is flexible, the most used library and has a big community.
 
React also has a lot of libraries for transitions and animations like [Framer Motion](https://www.framer.com/motion/) and [React Spring](https://www.react-spring.io/). I've read a lot about those two libraries but I can't decide which to use for my future projects.

#Question
What's your opinion about it?

I am wondering about how you think about those two libraries and what are the pros and cons of both? Let's discuss in the comments below.
How to Utilize Medium to Make Money and Drive Traffic as a Blogger
Tags: blogging, blogger, beginners, writing
Published: 2021-01-16 08:37:01

---
title: How to Utilize Medium to Make Money and Drive Traffic as a Blogger
published: true
date: 2021-01-12 15:19:46 UTC
tags: blogging,blogger, beginners,writing
canonical_url: https://medium.com/@kaperskyguru/how-to-utilize-medium-to-make-money-and-drive-traffic-as-a-blogger-83d8ee98d64f
---

[![](https://cdn-images-1.medium.com/max/1920/1*WIq22Sn2AYZHPWRreQdcxA.png)](https://medium.com/@kaperskyguru/how-to-utilize-medium-to-make-money-and-drive-traffic-as-a-blogger-83d8ee98d64f?source=rss-8b0955f01559------2)

Medium is a two side coin platform for Bloggers but the good news is that both sides are profitable to bloggers if you know the secrets.

[Continue reading on Medium »](https://medium.com/@kaperskyguru/how-to-utilize-medium-to-make-money-and-drive-traffic-as-a-blogger-83d8ee98d64f?source=rss-8b0955f01559------2)
Automatically link to your tickets
Tags: agile, git, bash, shell
Published: 2021-01-12 15:12:38

If you are like me, you grudgingly try to include links to the agile board even though git is the most logical place to put what you are doing and why.

To force myself to do this with the least effort possible, I came up with some automations. Maybe they will help you and your team.

### Decorating your branch

First, I tie my branches to specific tickets with this alias:

```
# create the alias
git config [-g] alias.story "! git config branch.$(git branch --show-current).story"

# set the branch story
git story [ id of the story ]

# get the branch story
git story
# > id of the story
```

### Forcing yourself to add the story

Next create the following pre-commit githook and make it executable:
```
#!/usr/bin/env bash

if [ -n "$SKIP_STORY" ]; then
  exit 0
fi

if [ -z "$(git story)" ]; then
  echo No story is set
  echo '$ git story AA-1234'
  exit 1
fi

echo "Story is $(git story)"
```

Anytime you try to commit without a story, git will not let you.

### Automatically decorate your commit messages

Next, create the following prepare-commit-msg hook and make it executable:

```
#!/usr/bin/env ruby

exit 0 if ENV['SKIP_STORY']

story=`git story`.strip

tmp=File.read(ARGV[0])
  .gsub(/\n+### Story.*/, "").tap{ |m| puts m }
	.+ "\n### Story [#{story}](#{ENV["STORY_BASE_URL"]}#{story})\n"
File.write(ARGV[0], tmp)
```

This hook will automatically add and change a markdown link to your story.

### Set the base URL

Finally, set the STORY_BASE_URL env variable such that the link will correctly point to your story. Here is an example for JIRA:

`https://[my-company].atlassian.net/browse/`

With that final part, I now look like I am being a great team player with a minimal amount of effort.
Get to Know N of MEAN Stack
Tags: node, webdev, beginners, meanstack
Published: 2021-01-12 15:10:48

##**Node.js**
[**Node.js**](https://nodejs.dev/learn) is a runtime environment to execute [**JavaScript**](https://developer.mozilla.org/en-US/docs/Web/JavaScript) code outside of a browser. Node.js is used to build and run the apps developed in JavaScript or any language that transpile to JavaScript. 

###**Overview** 
Node.js allows JavaScript code to run outside of a browser context, i.e. running directly on a computer or server OS. It allows the backend APIs to communicate with the OS APIs such as file system libraries. It gives JavaScript the ability to act as a web server language. 

Node.js is **event-driven**, i.e. flow of the program is based on user actions. So Node.js starts the server, performs the initial tasks, starts the event loop and then waits for the event to occur. 

Node.js uses **single threaded** [**event loop**](https://nodejs.dev/learn/the-nodejs-event-loop) to handle all the requests. Using the **non-blocking I/O model**, it comes up with the ability to handle a large number of concurrent requests without the need to manage thread concurrency.

Node.js provides access to an enormous number of reusable components through its **package manager** [**npm**](https://nodejs.dev/learn/an-introduction-to-the-npm-package-manager) and enhances the developers’ power in this way. 

###**Benefits**
Node.js is:  
+ Suitable for **data-intensive apps**.
+ Known for building **efficient** and **highly scalable apps**.
+ A good platform to serve real-time apps because of its **great performance** and **reliable service**.
Get to Know A of MEAN Stack
Tags: angular, webdev, beginners, meanstack
Published: 2021-01-12 15:08:24

##**Angular**
[**Angular**](https://angular.io/docs) is a component based web application framework used to build efficient front-end solutions. Angular simplifies the ways of creating single-page client-side applications using [**HTML**](https://developer.mozilla.org/en-US/docs/Web/HTML) and [**TypeScript**](https://www.typescriptlang.org/docs/) (a superset of JavaScript).

###**Overview** 
Angular app consists of [**module(s)**](https://angular.io/guide/architecture#modules). Every module represents a particular functionality and organizes related components.

[**Components**](https://angular.io/guide/architecture#components) are the building blocks of an Angular app. Every component defines an angular view. Components use:
+ HTML templates to define the view part of the component. These templates contain Angular [**template syntax**](https://angular.io/guide/template-syntax) to alter the views dynamically according to the app logic, state and data. 
+ Classes (written in TypeScript) to define components’ logic to handle data and functionality.
+ Component-specific styles for the UI design.

Then there are [**Services**](https://angular.io/guide/architecture#services-and-dependency-injection), i.e. classes used to define the functionality that is not associated with a view. Services can be injected into components with a mechanism known as [**dependency injection**](https://angular.io/guide/architecture-services#dependency-injection-di). Services are shared across components. 

The TypeScript code is translated to JavaScript instructions by the framework’s compiler at build time. It brings all the efficiency associated with JavaScript to the Angular app. 


###**Benefits**
+ Angular supports **highly scalable systems**.
+ Angular produces **high-performance apps**.
+ Angular provides the ability to design [**accessible apps**](https://angular.io/guide/accessibility) with [**Angular Material library**](https://material.angular.io/), for people with visual or motor impairments.
Get to Know E of MEAN Stack
Tags: express, webdev, beginners, meanstack
Published: 2021-01-12 15:05:59

##**Express**
[**Express**](https://expressjs.com/) is a minimal web application framework for Node.js applications. It gives the ability to develop fundamental web application features quickly and easily. Express is used to build server-side applications.

###**Overview** 
Express provides the mechanisms to:

>1.  Create [**web server**](https://expressjs.com/en/starter/hello-world.html) and server-side settings, e.g. port to use for connecting, database access, etc. 
>2.  Write request handlers for [**HTTP request methods**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods). These handlers can be required to read/write data from/to a database or many other tasks to satisfy the request and generate the response.
>3.  Add [**middleware**](https://expressjs.com/en/guide/using-middleware.html) functions to simplify common web development tasks during the request processing, e.g. file upload and storage, password hashing, routing, error handling, etc.

###**Benefits**
+ The **minimalist approach** makes it easy to learn and easy to build APIs with Express.
+ **Middleware based**. Integrate/create as many components as you want to achieve different functionalities. Easy integration with third-party middleware.
+ [**Unopinionated framework**](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/Introduction#is_express_opinionated). Flexible framework for the developers to choose suitable components to solve the problems or complete their tasks. Fewer restrictions on which components to use and how to use them together.
Get to Know M of MEAN Stack
Tags: mongodb, webdev, beginners, meanstack
Published: 2021-01-12 15:04:45

##**MongoDB**
[**MongoDB**](https://www.mongodb.com/) is a [**document-oriented**](https://www.mongodb.com/document-databases) and distributed database, built to fulfill the **flexibility** and **scalability** needs of modern applications. With its **dynamic schema** and **rich query language**, it offers more productivity to the developers. 
> MongoDB focuses on how fast you can incorporate the database in your applications, how easily you can scale your applications, and how deeply & accurately you can analyze your data.

###**Overview**
> MongoDB is a [**NoSQL**](https://www.mongodb.com/nosql-explained) (non-relational) database where [**collections**](https://docs.mongodb.com/manual/core/databases-and-collections/#collections) correspond to tables and documents correspond to records in relational databases. [**Documents**](https://docs.mongodb.com/manual/core/document/) contain JSON-like objects, usually in the form of field-value pairs. Internally MongoDB stores data in BSON format that is a binary representation of JSON. [**BSON**](https://www.mongodb.com/json-and-bson) is optimized for faster database operations. 

Documents allow easy evolution with application needs. Fields can vary from document to document in a collection. So it becomes easy to adapt to data model changes. Documents map to objects in the application code, making it easier for the developers to work with.

MongoDB’s comprehensive query language provides the fastest ways to access, transform and analyze data. 

###**Benefits**
MongoDB offers: 
+ **Flexible schema**. The document’s schema does not need to be pre-defined. Data models can change dynamically.
+ **Continuous availability** of data with [**cloud databases**](https://www.mongodb.com/cloud-database). 
+ **Elastic Scalability**. Data can be distributed to accommodate growing data volumes and load balancing. Cloud databases are designed to scale up and outward for handling data growth and load.
Day 12 - Add Two Numbers
Tags: leetcode, python
Published: 2021-01-12 14:52:41

## The Problem

> You are given two __non-empty__ linked lists representing two non-negative integers. The digits are stored in __reverse order__, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.

> You may assume the two numbers do not contain any leading zero, except the number 0 itself.

__Example 1:__

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

```
Input: l1 = [2,4,3], l2 = [5,6,4]
Output: [7,0,8]
Explanation: 342 + 465 = 807.
```

__Example 2:__

```
Input: l1 = [0], l2 = [0]
Output: [0]
```

__Example 3:__

```
Input: l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]
Output: [8,9,9,9,0,0,0,1]
```

__Constraints:__

* The number of nodes in each linked list is in the range `[1, 100]`.
* `0 <= Node.val <= 9`
* It is guaranteed that the list represents a number that does not have leading zeros.

## My Tests

```python
import pytest
from typing import List
from .util import ListNode, toListNode, toList
from .Day12_AddTwoNumbers import Solution

s = Solution()


@pytest.mark.parametrize(
    "l1,l2,expected",
    [
        ([2, 4, 3], [5, 6, 4], [7, 0, 8]),
        ([0], [0], [0]),
        ([9, 9, 9, 9, 9, 9, 9], [9, 9, 9, 9], [8, 9, 9, 9, 0, 0, 0, 1]),
    ],
)
def test_add_two_numbers(l1, l2, expected):
    list_root1 = toListNode(l1)
    list_root2 = toListNode(l2)
    assert toList(s.addTwoNumbers(list_root1, list_root2)) == expected
```

## My Solution

```python
from .util import ListNode


def add(carry: int, l1: ListNode, l2: ListNode):
    x = l1.val
    y = l2.val if l2 is not None else 0
    ans = x + y + carry
    if ans >= 10:
        carry = 1
        ans = ans - 10
    else:
        carry = 0
    l1.val = ans
    l2_next = l2.next if l2 is not None else None

    if l2_next or carry > 0:
        if l1.next is None:
            l1.next = ListNode()

        add(carry, l1.next, l2_next)


class Solution:
    def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
        carry = 0
        add(carry, l1, l2)
        return l1
```

## Analysis

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

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


## My Commentary

Just did this one the same way I'd do it in my head. Go through each number. Add them. If the sum is great than or equal to 10, carry the one. 

Made a small space optimisation by storing the answer in `l1`. This is `O(n)` in space and runtime, noting that `n` is the larger of `len(l1)` or `len(l2)` with potentially 1 more node added at the end for a carried sum.
Day 19 of 100DaysofCode: Simple Code on JSON
Tags: 100daysofcode, codenewbie, beginners, python
Published: 2021-01-12 14:35:46

This is my 19th day of #100Dayscode and #python. Today I continue to learn python access to web data. In that course I learned XML.XML stand for Extensible markup language. The primary purpose of XML is to help information system share structure data. It started as a specified subset of the standard generalized markup language and is design to be the relatively human language.

While taking the course I learned that XML is little bit complex than JSON. JSON is more popular than XML. XML is not really bad it is very powerful. It is more powerful than in general we need. JSON stand for JavaScript Object Notation.

# Simple JSON Program
My code start with importing json. JSON represent data as a nested list and dictionary. And here is an object inside of data. In dictionary we have key value pair but in JSON these are called object.

```python
import xml.etree.ElementTree as ET
import json
data = """<person>
<name>chunk</name>
<phone type = "int1">
+1 732 303 4456
</phone>
<email hide = "yes"/>
</person>"""
tree = ET.fromstring(data)
print('Name:',tree.find('name').text)
print('Attr:',tree.find('email').get('hide'))
```
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 19 of <a href="https://twitter.com/hashtag/100DaysOfCode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysOfCode</a> and <a href="https://twitter.com/hashtag/pythoncode?src=hash&amp;ref_src=twsrc%5Etfw">#pythoncode</a> <br>* Continue to learn python access to web data<br>* Learned more about XML<br>* Simple program on JSON <a href="https://t.co/wdScC25BnK">pic.twitter.com/wdScC25BnK</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1349025795671429121?ref_src=twsrc%5Etfw">January 12, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Added Intro and What's Here for Ruby Enumerable Doc
Tags: ruby, documentation, enumerable
Published: 2021-01-12 14:41:27

---
title: Added Intro and What's Here for Ruby Enumerable Doc
published: true
description: 
tags: ruby, documentation, enumerable
---
I've added introductory material and a What's Here for Ruby module Enumerable doc.  It's merged, but not yet released.  You can view it here:

https://docs.ruby-lang.org/en/master/Enumerable.html
What's Here for Ruby Hash Doc
Tags: ruby, hash, documentation
Published: 2021-01-12 14:37:03

---
title: What's Here for Ruby Hash Doc
published: true
description: 
tags: ruby, hash, documentation
---

I've added a What's Here section to Ruby class Hash doc.  It's merged, but not yet released.  You can view it here:
https://docs.ruby-lang.org/en/master/Hash.html#class-Hash-label-What-27s+Here
How can I show only 1 record which has a least score among all?
Tags: angular, typescript, javascript
Published: 2021-01-12 14:36:40

I wanted to show only 1 record among the DL list which has a minimum score from all the DLs. Currently it's displaying all the records.

In the example on stackblitz you can see for the first record DL scores are : 54, 20 and updated.

I want Instead of showing all 3 records I wanted to display only 1 record which has least score i.e. 20.

Please suggest.

Live https://stackblitz.com/edit/angular-ivy-1tsz1r?file=src%2Fapp%2Fapp.component.html
A junior developer's journey through 2021
Published: 2021-01-12 14:36:12

Almost two weeks into 2021 and I'm already making the most of it. I've decided that this is the year I'm going to make a huge step forward in my learning journey and become a better developer. How you may ask? well, I'm taking part in #365DaysOfCode, I will be spending my year coding for at least an hour every day. Okay, there will come a point when maybe I won't have the time to code, or something will come up, for these days I will be either reading one of the many programming books I own (Also please feel free to suggest some more), listening to podcasts, and watching some interesting tutorials or just programming videos in general.

The last few weeks I have been working on a number of things but going back to the basics was the main one. I believe that junior developers such as myself get caught up in trying to be the best and learn more advanced topics and that we brush over the basics whilst never reverting back to learn them. We want to build something fancy to show off our talents, but do we fully understand what we just built?
I have learnt a lot about myself as a developer throughout the past year and only really understood what it takes recently. Taking the time to go back and truly understand has been very beneficial in making me a better developer.

I want to write more, to show my development and the many goals I hope to accomplish. So please feel free to join me on this journey and perhaps we can learn together.
How to bring next and previous control in the record detail view
Tags: angular, typescript, javascript
Published: 2021-01-12 14:35:22

When a user click on any of the record they see the details of the record. I wanted to add next and previous control on the details view so, that user don't have to click again back to top row to view details. They can simply use next / previous control to see next and previous record.

<div *ngIf="isView" class="view-details">
    <button (click)="onPrev()">Prev</button>
<button (click)="onNext()">Next</button>
component.ts

current = 0;
  prev = -1;

  onPrev() {
    this.prev = this.allUser.current--;
    alert("Prev" + this.prev);
  }
  onNext() {
    this.prev = this.allUser.current++;
    alert("Next" + this.prev);
  }
Please help me with the solution. I tried this but didn't help.

https://stackblitz.com/edit/angular-ivy-1tsz1r?file=src%2Fapp%2Fapp.component.html