teleren/devto huggingface dataset:
An Open Source system to create Estimates and Quotes
Tags: webapp, laravel, php, estimate
Published: 2020-04-01 21:02:08

---
title: An Open Source system to create Estimates and Quotes
published: true
description: Are you tired of making long, static quotes?
tags: webapp,laravel,PHP,estimate
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/4vylboo9r71sf32m4nyr.png
---

# An Open Source system to create Estimates and Quotes

Some days ago, I found me extremely tired of doing long and static estimates/quotes to send to my customers. Sometimes, I needed to put sections to explain things like optional items, open scope, the total price, the price without optional items, etc

![Selecting Items](https://tiagosilvapereira.github.io/laraestimate-docs/images/selecting-items.gif)

So, I decided to make a Web Application to help me with:

- Adding fixed and optional items
- Putting the total price and the total selected items price in any place of the estimate/quote
- Sending it directly to the customer e-mail
- Allowing to change currency
- Rapidly duplicating estimates

Then I started to write LaraEstimate, a Laravel 7 (PHP) and VueJs system to solve these problems.

Now, the system is ready, and I'm sharing it with you all. I hope it would be helpful for you.

[Github Link](https://github.com/TiagoSilvaPereira/laraestimate)

[Live Preview - LaraEstimate](https://laraestimate-preview.kingofcode.com.br/)

Cheers!

## System Images

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

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

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

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

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

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4olu6nyi97ybhix977hq.png)
This is Weird
Tags: ruby
Published: 2020-04-01 21:01:42

---
title: This is Weird
published: true
description: 
tags: ruby
---

For Array <code>a</code>, I'm doing <code>a[range] = obj</code>.  Here's what I think I see:

If <code>range.end</code> is negative, assigns <code>obj</code> at offset <code>start</code>, retains <code>range.end.abs-1</code> elements past that, and removes those beyond:

```ruby
a = [:foo, 'bar', baz = 2]
a[1..-1] = 'foo' # => "foo"
a # => [:foo, "foo"]
a = [:foo, 'bar', baz = 2]
a[1..-2] = 'foo' # => "foo"
a # => [:foo, "foo", 2]
a = [:foo, 'bar', baz = 2]
a[1..-3] = 'foo' # => "foo"
a # => [:foo, "foo", "bar", 2]
a = [:foo, 'bar', baz = 2]
a[1..-4] = 'foo' # => "foo"
a # => [:foo, "foo", "bar", 2]
```
7 Practical Use Cases of JavaScript Array.from
Tags: javascript
Published: 2020-04-01 20:56:51

# Definition
Array.from ( items [ , mapfn [ , thisArg ] ] )

## Parameter
`items`: *required*, it could be Iterable like `Map`, `Set`, `WeakMap`, `WeakSet` or arrayLike object like regular `Array`, `string`, `NodeList`, `HTMLCollection` and so on.

`mapfn`: *optional*, It is a regular map function like 
```javascript
function(item, index){
  return item*2;
}
```

`thisArg`: *optional* It could be any type of object which can be accessible from inside the mapfn via this keyword

```javascript
Array.from([1,2,3], function(item, index){
console.log(this); //1
}, 1);
```
<br/><br/><br/>

### 1. Transform iterable to array.
We can transform any `iterable` to `array`. Let's see some examples for built-in iterables.

```javascript
Array.from(new Set([1,2]));
[1,2]

Array.from(new Map().set(1, 1));
[[1,1]]
```

### 2. Find unique items from array
We can use this method to identify unique items from array, though i prefer to use `spread` operator. like `[... new Set([1,1,2])]`
```javascript
Array.from(new Set([1,1,2]));
[1,2]

```

### 3. Create array from user-defined iterable
Sometimes we need to define our own iterable objects. We can convert them into array in a similar fashion.

```javascript
function* simpleIterator() {
    yield 1;
    yield 2;
}
Array.from(makeIterator())
[1,2]
```
### 4. Clone any array 5 Some use cases for arrayLike object

Since `Array.from` shallow copies item so we can use to clone any array.
```javascript
let foo = [1,2,3];
let bar = Array.from(foo);
foo === bar
false
```

The object equality `foo === bar` false means, they aren't same object though they have the same items.

### 5. Convert string to character array
Since `string` is an arrayLike object so convert them into array.
```javascript
Array.from('how are you');
["h", "o", "w", " ", "a", "r", "e", " ", "y", "o", "u"]

//It is Unicode supported
Array.from("I💖U")
["I", "💖", "U"]
```
### 6. Convert arrayLike object to array
Another useful use-case would be mapping items while converting them into an array. For example `HTMLCollection` is an arrayLike object, what if we want to change the `textContent`?

```javascript
let divs = document.getElementsByTagName('div');
Array.from(divs, div=> div.textContent = 'hello')
["hello", "hello", ...]
```

### 7. Prefill an array
Also, it can be useful to prefill an array

```javascript
Array.from({length:3}, x=> 0);
[0, 0, 0]
```

# Further more 
1. https://tc39.es/ecma262/#sec-array.from
2. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from
From Idea to Launch #4 - Into to NextJS API routes
Tags: react, showdev, javascript
Published: 2020-04-01 20:38:34

---
title: From Idea to Launch #4 - Into to NextJS API routes
published: true
description: A series where I show you how to take an idea and using React, NextJS and Now push it to production and launch it on Product Hunt.
tags: react, discuss, showdev, javascript
---

This week I am diving into an introduction to NextJS API routes. I also briefly talk about Formik and Yup! In this video we create and log in users using the [PaaSsword](https://paassword.now.sh) service. In the next video I will cover how to maintain a user state with cookies and JWTs.

Hope you enjoy! ❤️

{% youtube Sdf6nIPGp30 %}
---

I have doing a lot of work recently on my own projects, things like: [team-img.now.sh](https://team-img.now.sh) and [PaaSsword](https://paassword.now.sh). I launch both of these on Product Hunt and realized that it was super helpful to show off work you have done. Especially work that you think would be useful for other people!

So I am creating a series of videos to showcase my process of taking an idea all the way to launch on Product Hunt. I re-built a tool that I really like to use for myself: [Wachstum.space](https://wachstum.space). I am going to walk you through how I made it and show case why I love to use React and NextJS to build all of my projects.
Vue Composition API Components
Tags: vue, typescript
Published: 2020-04-01 20:34:58

# Component with Props

```ts
import { defineComponent } from "@vue/composition-api";
import { Article } from "../models";

export default defineComponent<{ article: Article }>({
  props: {
    article: Object
  },
  ...
});
```

# Component that emits an event
```ts
import { defineComponent } from "@vue/composition-api";

export default defineComponent({
  setup(props, ctx) {
    const onClick = () => ctx.emit("like");
    return { onClick };
  }
});
```
Globular Visualization of Active COVID-19 Cases
Tags: javascript, html
Published: 2020-04-01 20:09:11

Hello, I created a web application that uses the Plotly.js API to create a globe that shows the number of active COVID-19 cases in 178 countries.  It uses the thevirustracker.com API to retrieve the active-cases data for each country. There is also an option to view what the globe looked like on a previous visit as it uses localStorage. 

This is my first post here and my first web application ever: 
  https://mmslama.github.io/mmslama-io/projects/COVID-19Visualization/covidvisualization.html

P.S. It does take about 45s for the data to load as I have to retrieve the data for each country individually.
Welcome Thread - v67
Tags: welcome
Published: 2020-04-01 20:00:52

---
title: Welcome Thread - v67
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
---

![fox says hi](https://media.giphy.com/media/bcKmIWkUMCjVm/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Top Edpresso shots-March 2020
Tags: reactnative, dart, python, rust
Published: 2020-04-01 19:53:26

Happy April 1st! 

We've taken a moment to reflect on our most trafficked shots from March. Give them a read, and see what you think 😃

4. **[Rest in Peace, grep](https://www.educative.io/edpresso/rest-in-peace-grep)!** This shot goes over the reasons why ripgrep is faster (and better) than grep. Creator [Abhinav Kumar](https://www.educative.io/profile/view/5821909649326080) goes over ripgrep’s benefits, “gotchas,” installation process, and basic benchmarks. Check this shot out if you are interested in finding a great alternative to grep in Rust. 

3. **[How to find max and min from a list](https://www.educative.io/edpresso/how-to-find-max-and-min-from-a-list)**. According to creator [Manzar Iqbal Malik](https://www.educative.io/profile/view/4650721828929536), “Finding the maximum and minimum values in a list is pretty easy because of the built-in max and min functions provided by Python. However, you may be wondering what the logic behind these functions is. Let me explain with a couple of code snippets.” Click [here](https://www.educative.io/edpresso/how-to-find-max-and-min-from-a-list) to find out what the logic is behind these functions! 

2. **[React Native Deep Linking Simplified](https://www.educative.io/edpresso/react-native-deep-linking-simplified)**. Join [Shad Mirza](https://www.educative.io/profile/view/4533229743767552) as he explains deep linking in React Native, goes over “why” we want it, “how” we can add it, the steps involved to start a project, and how to open your project with URL. 

1. **[Understanding widgets in Flutter (burger analogy 🍔)](https://www.educative.io/edpresso/understanding-widgets-in-flutter-burger-analogy)**. Our most trafficked shot for March is this explanation of how you can easily understand widgets in Flutter. We won’t give away too much, but creator [Cynthia Peter](https://www.educative.io/profile/view/6080168303001600) does a fantastic job of comparing widgets to the layers of a burger.
Day 0 - Given a non-empty array of integers, every element appears twice except for one. Find that single one. 
Published: 2020-04-01 19:34:02

---
title: Day 0 - Given a non-empty array of integers, every element appears twice except for one. Find that single one. 
published: true
description: 
tags:
---
As a part of LeetCode's 30 Days 30 Challenges.

**Problem Statement**

Given a non-empty array of integers, every element appears twice except for one. Find that single one.

**Note:**

Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?

Example 1 - 
```
Input: [2,2,1]
Output: 1
```

```
Input: [4,1,2,1,2]
Output: 4
```

**Possible Approaches for solving the given problem**

**Approach 1**
   1. Iterate over the given array. Add the element in the dictionary. 
   Keep a check if the key already exists in the dictionary. Keep count of 
   the element as the value. Then return the element(key) whose 
   value(count) is 1.

**Problem with this approach**
   1. It'll iterate the complete list.
   2. Once the dictionary gets created. To return the element with count 1 
      again value corresponding to every element will have to be checked. 
   3. Making the time complexity - O(n^2)
   4. This would also lead to runtime error.

**Approach 2**
   1. As the elements in the list are repeated. Convert the list into a 
      set. A set consists of only unique elements.
   2. Instead of iterating over a complete list which would be complexity 
      O(n). Iterate over the set i.e unique elements only.
   3. Iterate over the set and check the count of that element in the 
      list. If count is 1. Return the element.

**Reasons this is better approach**
  1. We are not iterating over the complete array of duplicate elements 
     unnecessarily hence making the solution efficient.
  2. Time Complexity - O(n). The complexity of the earlier solution was 
     O(n^2).

```
class Solution:
    def singleNumber(self, nums: List[int]) -> int:
        unique_nums = set(nums)
        for element in unique_nums:
            count = nums.count(element)
            if count == 1:
               return element
```

**Learnings**
1. Time complexity of set is O(1).
2. Time complexity of list count is 0(n).
3. Set consists of unique elements.


**Reference Links**
https://leetcode.com/explore/other/card/30-day-leetcoding-challenge/528/week-1/3283/
What are the Differences Between Product Management and Software Engineering?
Published: 2020-04-01 19:24:55

Many computer science graduates leave school expecting their job prospects to almost exclusively revolve around Software Engineering(SWE) positions. While it's true that this is the most common career track, there is a career track that blends the technical aspects of SWE with the business aspects of product operations and product development in a role known as Product Management. When considering between the two career paths, it is important to consider if product management might be a better option for your particular skill set.

What exactly is a Product Manager(PM)? Wikipedia puts it nicely as "A PM is responsible for building, implementing, and managing software or digital products, taking into consideration their life-cycle considerations and audience". In more real terms, product management is all over the place and changes by company. PM work requires work with SWE/UX to define what needs to created in the stories, tracking customer usage, and deciding what should be created next. It also requires working with the business team to take in business requirements for a product and find a way to implement with the user experience, It prioritization, and timeline in mind. While PM work can sometimes feel like a babysitter for the IT backlog, at its best you define the product vision. This also usually comes with navigating office department politics and managing other business functions like vendor management and product operations.

Software engineering by contrast is definitively more cut and dry as a narrow technical career. SWE work is individually focused and concrete. Work is completed in sprints and individual tasks are assigned and performance is rated on the promptness, efficiency, and functions of your assigned tasks. You spend a lot of time working alone to complete some technical task, the output of which can be easily measured. 

Individual personality and skill set do play a role as the positions are quite different in there day to day. However, if you enjoy interpersonal connection and meshing technical skills with it, product management may be a career path that fits you!
SAML/SSO Authentication and Conan in Nexus Repository 3.22
Tags: nexusrepository, featured, cc, saml
Published: 2020-04-01 20:41:24

---
title: SAML/SSO Authentication and Conan in Nexus Repository 3.22
published: true
date: 2020-04-01 19:16:54 UTC
tags: NexusRepository, featured, CC, SAML
canonical_url: https://blog.sonatype.com/saml/sso-authentication-and-conan-in-nexus-repository-3.22
---
By <a href="https://dev.to/brent_kostak">Brent Kostak</a>

[![single sign-on](https://blog.sonatype.com/hubfs/GettyImages-1148091063.png) ](https://blog.sonatype.com/saml/sso-authentication-and-conan-in-nexus-repository-3.22)

Introducing the release of [Nexus Repository 3.22](https://help.sonatype.com/repomanager3/release-notes/2020-release-notes#id-2020ReleaseNotes-RepositoryManager3.22.0). Our product teams are excited to announce [SAML/SSO](https://help.sonatype.com/repomanager3/security/saml) authentication for Nexus Repository Pro. In addition to SAML/SSO, this release includes proxy support for Conan native format in both [Nexus Repository Pro](https://www.sonatype.com/product-nexus-repository) users and our free version, [Nexus Repository OSS](https://www.sonatype.com/nexus-repository-oss). Conan is the decentralized, portable, and extensible package manager for C/C++ projects.

Amidst much anticipation, Nexus Repository Pro now provides users the ability to authenticate with Security Assertion Markup Language (SAML) identity providers. Using SAML, users can now experience single sign-on (SSO) when logging into the Nexus ecosystem. In the reading ahead, we will ‘pop the hood’ on SAML to learn how it works with Nexus Repository Pro, what benefits users can gain setting up the SAML integration, and key highlights for both Nexus Repository admins and developers.

 ![](https://track.hubspot.com/__ptq.gif?a=1958393&k=14&r=https%3A%2F%2Fblog.sonatype.com%2Fsaml%2Fsso-authentication-and-conan-in-nexus-repository-3.22&bu=https%253A%252F%252Fblog.sonatype.com&bvt=rss)

<a href="https://blog.sonatype.com/saml/sso-authentication-and-conan-in-nexus-repository-3.22">Read more on the Sonatype blog</a>
Building a stock ticker app
Tags: beginners, ruby, cli
Published: 2020-04-01 19:02:32

Today, I submitted all the final requirements for my very first project in the Flatiron bootcamp. This project was a culmination of the modules we have learned in Ruby thus far including object orientation and building command-line interfaces. I chose to build a gem that will pull top stock gainers in the stock market real-time and I wanted to document parts of my journey. 

## Struggles 
I sometimes feel that the hardest part of starting something new is just 'starting'. This happened to be the challenge on this project as well. My two biggest challenges came with creating my Ruby gem and pushing my ruby gem to https://rubygems.org/. I initially worked to construct my gem with 'gem build <GemName>'. This method turned out to be light for my project since I'm a first-timer. I discovered a batteries-included method 'bundle gem <GemName>' and this got my project going smoothly. 

## Successes 
I was able to have plenty of success building this gem and it has strengthened my understand of building in Ruby. I was able to pull real-time data from a 3rd party API and construct custom ruby objects that were controlled through my command-line. This helped me get an understanding of control-flow in the gem. I hope to continue learning in this capacity in the bootcamp to become a better programmer. 


## Tools of the trade
I often liken ruby methods as tools and as a developer, we need tools to accomplish our tasks. Choosing the right tools or methods is key to your success. One of my favorite methods is the '#each' method. It allows us to efficiently iterate through objects and it implicitly returns the original object. In my cli project, I used the '#each' method with a pattern called 'chaining' to use multiple methods. I paired the '#each' method with the '#with_index' method in a technique to dynamically create a list of each stock instance in my object. Specifically, I choose the '#with_index' because it allows for an optional argument to start your index. I chose '1' so my output could reflect (e.g. 1. PTON - Peloton - $26.01 - (-6.970)).

Check out my snippet here:
``` 
StocktickerCli::STOCK.all.each.with_index(1) do |s, i|
       puts "#{i}. #{s.ticker} - #{s.companyName} - $#{s.price} - #{s.changesPercentage}" 
       end 
...
end 
```





## Feel free to give it a try 
Install gem with this command:
```ruby
gem install stockticker_cli 
```
Run gem with this command:
```ruby
stockticker 
```

Signup and enter your api key: https://fmpcloud.io/register
```
Welcome to the stock ticker cli app!

Please sign-up for a free account to use this app here: https://fmpcloud.io/register
Please enter your api key to continue.

<YOURAPIKEY>
```

Thanks for reading! 

Happy Coding

Terry Threatt
v2.0 for 2020 🚀🎉🎊
Tags: showdev, react, serverless
Published: 2020-04-01 18:07:10

We hope everyone is holding up well amid the current time. Hunkered down with a bit more time on our hands, we decided to make a big change for GVEMPIRE.

Today, we’re announcing our move from [gvempire.com](http://gvempire.com/) to [gvempire.dev](https://gvempire.dev).

We’re on a mission to make the web better, one experience at a time. We felt that the .dev TLD and the new site aligns closer to our vision.

We welcome you to check out the new site at [gvempire.dev](https://gvempire.dev).
GetHelp('resumeTemplate')
Tags: javascript, vue, github, node
Published: 2020-04-01 18:03:00

Hello, World!
I just got a spark to build an **Open Source Resume and Portfolio Builder** for our fellow developers and whoever to make use of it.
Planning to build it as **Full-Stack JavaScript** application and I am getting started with this schema found in this open source project [JsonResume](https://jsonresume.org/).

I am calling a GetHelp method and expecting to get your favorite resume templates in the form of **_HTML_, _links_, _images_, _gist_, etc** in return that you wish to be in my project.

Since it is an **Async** function I am not waiting for the return to happen and just going to **start** with my favorite template using the below JSON schema.

```
{
  "basics": {
    "name": "John Doe",
    "label": "Programmer",
    "picture": "",
    "email": "john@gmail.com",
    "phone": "(912) 555-4321",
    "website": "http://johndoe.com",
    "summary": "A summary of John Doe...",
    "location": {
      "address": "2712 Broadway St",
      "postalCode": "CA 94115",
      "city": "San Francisco",
      "countryCode": "US",
      "region": "California"
    },
    "profiles": [{
      "network": "Twitter",
      "username": "john",
      "url": "http://twitter.com/john"
    }]
  },
  "work": [{
    "company": "Company",
    "position": "President",
    "website": "http://company.com",
    "startDate": "2013-01-01",
    "endDate": "2014-01-01",
    "summary": "Description...",
    "highlights": [
      "Started the company"
    ]
  }],
  "volunteer": [{
    "organization": "Organization",
    "position": "Volunteer",
    "website": "http://organization.com/",
    "startDate": "2012-01-01",
    "endDate": "2013-01-01",
    "summary": "Description...",
    "highlights": [
      "Awarded 'Volunteer of the Month'"
    ]
  }],
  "education": [{
    "institution": "University",
    "area": "Software Development",
    "studyType": "Bachelor",
    "startDate": "2011-01-01",
    "endDate": "2013-01-01",
    "gpa": "4.0",
    "courses": [
      "DB1101 - Basic SQL"
    ]
  }],
  "awards": [{
    "title": "Award",
    "date": "2014-11-01",
    "awarder": "Company",
    "summary": "There is no spoon."
  }],
  "publications": [{
    "name": "Publication",
    "publisher": "Company",
    "releaseDate": "2014-10-01",
    "website": "http://publication.com",
    "summary": "Description..."
  }],
  "skills": [{
    "name": "Web Development",
    "level": "Master",
    "keywords": [
      "HTML",
      "CSS",
      "Javascript"
    ]
  }],
  "languages": [{
    "language": "English",
    "fluency": "Native speaker"
  }],
  "interests": [{
    "name": "Wildlife",
    "keywords": [
      "Ferrets",
      "Unicorns"
    ]
  }],
  "references": [{
    "name": "Jane Doe",
    "reference": "Reference..."
  }]
}
```
Just remember about the **Promise** that Async function should return :-)