teleren/devto huggingface dataset:
I built a tax calculator for freelancers
Tags: showdev, javascript, webdev
Published: 2020-05-02 16:01:52

---
title: I built a tax calculator for freelancers
published: true
description: 
tags: showdev, javascript, webdev
---
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/yv0jjohm2rusnb158mgm.JPG)

I built a tax calculator for freelancers. The project started out as a personal one. I wanted a super simple way to calculate my taxes owed from my contract work without having to deal with all the bells and whistles you find on other sites. 

But as I started working off my coding rust, I couldn't stop fleshing out the calculator. I decided to include every state and the filing year of 2019 and 2020. 

The calculator is still simple though and doesn't give you an option to input deductions. The income input assumes you already know your net taxable income. It's also just an estimate, so definitely verify and consult with a tax professional. The point of something like this is to give you a solid idea of what you might owe before you start chopping off your liability with deductions.

What did I learn from my experience? I've written a couple of articles that stress learning to code by building things. So, it was probably a good idea that I followed my own advise. In doing so, I surprised myself by how quickly I was able to pick up patterns and then abstract that pattern into functional, modular code. You know when code is functional and modular when you can use it in different contexts without fearing that you'll break something.

This small project really showed me its importance because as I started adding more and more data, I didn't have to stress about whether the app would break. If there was an error, it was usually because of the data, not the algorithm.

The modularized algorithm allowed me to spin off a cascade of useful functions that were easy to reference. There are still improvements I can make to the code to increase the speed. I though about memoizing the arithmetic involved in the tiered tax calculation, but the nature of the calculation doesn't really call for it. 

Here's the website I made for the calculator. Enjoy: [https://www.taxmygig.com/](https://www.taxmygig.com/)
Encapsulates Google Maps and Huawei Maps support with Map Kit library
Tags: android, huawei, hms, maps
Published: 2020-05-02 15:46:12

By now, you probably know all about Huawei’s infamous U.S. trade ban. With Huawei being blacklisted by the U.S. Department of Commerce, all Huawei devices since then can no longer shipped with Google Mobile Services (GMS) by default.

Given the circumstances, Huawei's current solution is to create its own platform as a replacement - Huawei Mobiles Services (HMS). Huawei Mobile Services has been around for years, but Huawei relaunched and expanded the platform following the U.S. trade ban that deprived it of GMS.

One feature of GMS that being used in most of the apps I developed so far is Google Maps and with about one-fourth of my user base currently using Huawei devices, it is clear to me that supporting HMS is essential.

However, supporting both GMS and HMS is quite cumbersome and requires you to maintains separate codebase for each platform. Take a look at one of the examples in the following snippets:

```kotlin
import com.huawei.hms.maps.CameraUpdateFactory
import com.huawei.hms.maps.model.LatLng
import com.huawei.hms.maps.model.MarkerOptions

mapView.getMapAsync { map ->
    val location = LatLng(13.7650594, 100.5383354)
    val marker = MarkerOptions().position(location)

    map.addMarker(marker)
    map.animateCaemra(CameraUpdateFactory.newLatLngZoom(location, 16f))
}
```

```kotlin
import com.google.android.gms.maps.CameraUpdateFactory
import com.google.android.gms.maps.model.LatLng
import com.google.android.gms.maps.model.MarkerOptions

mapView.getMapAsync { map ->
    val location = LatLng(13.7650594, 100.5383354)
    val marker = MarkerOptions().position(location)

    map.addMarker(marker)
    map.animateCaemra(CameraUpdateFactory.newLatLngZoom(location, 16f))
}
```

You may notice that both codes are the same, except import statements. It may look simple at first, but the problem is you cannot share logic between these two APIs. That's not good.

So, my solution to this problem is to implement a wrapper library that encapsulate both APIs and decide which API to be used at runtime. It is now available on [GitHub](https://github.com/SupasinTatiyanupanwong/map-kit-android).

{% github SupasinTatiyanupanwong/map-kit-android %}

I hope you find this useful. Please check it out and thanks for reading!

-----

**P.S.** I do have other library projects like this in my pipeline, so I may publish them at some point.
Mixing nuxt generate and build
Tags: vue, nuxt, generate, build
Published: 2020-05-02 15:37:42

Hello everyone ! 

I wanted to share you a little tip with nuxt generate.

I wanted to put my landing pages in a CDN but not my dashboard.

According to the [nuxt generate documentation](https://nuxtjs.org/api/configuration-generate) we you can use exclude with a regex. 

But yeah "regex".

I don't like (a lot!) regex and i prefer to use include instead of using exclude. 
I created a module that use 'generate:extendRoutes' and introduce whitelist instead of exclude.

```js
// modules/custom-generate.js
module.exports = function() {
  this.nuxt.hook('generate:extendRoutes', (routes) => {
    const whiteList = [
      '/', //this is the index.vue root file
      '/talents-signed-up',
      '/404',
      '/company-signed-up',
      '/company',
      '/talents'
    ]
    const routesToGenerate = routes.filter((page) => {
      return whiteList.includes(page.route)
    })
    routes.splice(0, routes.length, ...routesToGenerate)
  })
}
```

This module is ok if you don't have a lot of pages that you want to generate.

You can add 'regex' valiation in the filter instead of my array if you prefer :).

Thank's !
Codeception tests in Travis CI with DDEV and Selenium
Tags: docker, codeception, travis, php
Published: 2020-05-02 15:29:24

Recently I posted about how to run codeception with DDEV. 
https://dev.to/tomasnorre/codeception-ddev-selenium-docker-36kk

This is of course really nice, but having it as part of the CI pipeline is even better.

So I decided to try to make it run within [Travis CI](https://travis-ci.org/) which is my preferred public CI at the moment. 

## What to do?

1. Signup with travis-ci and registre your repository
2. Add a `.travis.yml` to your github repository
3. Make changes and push, and wait for the results of the tests.

You can see the step in the [Travis CI Tutorial](https://docs.travis-ci.com/user/tutorial/)

The advantages here is that you will have your behaviour driven tests executed on every commit and pull request, to make sure you or others don't break functionality. 

## Configuring Travis CI

The `.travis.yml` is the configuration file for Travis CI. I contains different step and instructions to enable travis to do what you want.

This can be used to run PHPUnit, Checking Coding Standard, Codeception tests and so on, only your imagination is the limit. 

This is how the `.travis.yml` looks like for my [https://github.com/tomasnorre/ddev-codeception-poc](https://github.com/tomasnorre/ddev-codeception-poc)

```
language: php
dist: bionic

notifications:
  email:
    on_success: never
    on_failure: never

before_install:
  # turn off XDebug for speed up
  - phpenv config-rm xdebug.ini || return 0

php:
  - '7.4'

services:
  - docker

cache:
  directories:
    - $HOME/.composer/cache

before_script:
  - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
  - sudo apt update
  - sudo apt install docker-ce
  - sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  - sudo chmod +x /usr/local/bin/docker-compose
  - docker-compose --version
  - wget https://github.com/drud/ddev/releases/download/v1.13.1/ddev_linux.v1.13.1.tar.gz
  - tar vxzf ddev_linux.v1.13.1.tar.gz
  - sudo chmod +x ddev
  - sudo chmod +x mkcert
  - ./mkcert -install

jobs:
  fast_finish: true
  include:
    -
      stage: Tests
      name: "Code ception"
      script:
        - composer install
        - ./ddev --version
        - ./ddev start
        - php vendor/bin/codecept run
```

I had to install a never version of docker, manually to meet the requirements from [ddev](https://ddev.com). 

# The result

![Codeception in Travis CI output console](https://dev-to-uploads.s3.amazonaws.com/i/iwjx45kw14jwawb8fnn9.png)

Have fun.
Creating SQL Database Scripts
Tags: sql
Published: 2020-05-02 15:15:32

Original article in *russian* is [here] (https://docs.microsoft.com/ru-ru/sql/ssms/tutorials/scripting-ssms?view=sql-server-ver15)

When I finish developing a database, it's often necessary to transfer it to other computer. As for me, like a student, i need to take not only logic, but usually a data inside of it. Let's start! 🧐

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

###**Creating database script using *"Create scripts"* command**###

* Connect to server SQL Server.
* Expand the **database** node.
* Right-click on selected **database** and select > **Tasks** > **Generate scripts** (in example - AdventureWorks2016 database):

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

* The **Introduction** page opens. Click **Next** to open **Select objects** page. You can choose entire database or individual objects in it. Select **Script entire database and all database objects**.

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

* Click **Next** to open **Set scripting options**. Here you can configure the location for saving scripts and other additional parameters.
 * Select **Save to new query window**.
 * Select **Advanced**. 
  * Set **Script Statics** like *Script statics*. 
 * Set **Types of data to script** like *Schema only* or, if you want to save data inside existing tables, use *Schema and data*. 
 * Set **Script Indexes** like *True*.

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

* Click **Ok** and **Next**.
* Click **Execute** to run the query.

🥳 Well done! When the script has successfully compiled, you can use the database wherever you want! 💪
I published a NPM package
Tags: npm, javascript, react, web
Published: 2020-05-02 15:11:06

---
title: I published a NPM package
published: true
description: How I made and published my first NPM package
tags: npm, javascript, react, web
---

#Introduction
Hi Everyone! 

Before I get started with explaining how I made and published a npm package, I would like to introduce myself (since this is also my first Post here): 

I´m Maik, a 24-year-old developer from Germany. I like building Applications in Javascript, mostly React. If you want to reach out, you can find me on [GitHub](https://github.com/mpleines "GitHub") or [Twitter](https://twitter.com/maikcodes "Twitter"). If you like, you can also visit my [Portfolio](https://maikpleines.com "Portfolio") for further information.

#How I published a NPM package

I always wanted to publish a NPM package, mainly because I was interested in how it works. I stumbled across [create-react-library](https://www.npmjs.com/package/create-react-library "create-react-library"), which looked very promising to me. You can start writing your package like with create-react-app, and test it directly in another /example folder. All the building etc. is handled by create-react-library. 

I decided to make a small toast message package, which lets users create toast messages with a single function. So I wrote all the [code](https://github.com/mpleines/webtoasty "code") for it and tested in directly in the /example folder:

```javascript
import React from 'react'

import { toasty } from 'web-toasty'

const App = () => {
  toasty('this is a toast message ✅', 1000)
  return <div></div>
}

export default App
```
After testing it, I only had to publish it to NPM, which is very simple. You just have to run ```npm publish``` in the root directory.

So, here it is, my first NPM package: 

[webtoasty](https://www.npmjs.com/package/webtoasty "webtoasty")

I highly appreciate any feedback!
Lesser known JavaScript frameworks!
Tags: javascript, webdev, css, html
Published: 2020-05-02 15:08:10

To put it simply:
-JavaScript is the programming language of HTML and the Web.
-JavaScript is easy to learn.

And a JavaScript framework is an application framework written in JavaScript where the programmers can manipulate the functions and use them for their convenience.
So here are a few lesser known JavaScript frameworks (opinion!) that you should check out.

https://www.polymer-project.org/
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/k2mbfxxq6psuuxkvwsxq.png)

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

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

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

https://backbonejs.org/
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/z2qbulynfjufdsw4l08x.png)
A Beginner’s Digest of Lessons Learned in React - Part I
Tags: beginners, react, npm
Published: 2020-05-02 14:48:34

###About Me

As a perfectionist and beginner programmer who suffers from imposter syndrome, I must admit I am a bit intimidated to be writing about what I am learning at my current job as an associate software engineer; however, in the spirit of learning in public, I hope to not only share my experiences and advice but also push past my discomfort and hopefully learn even more.

I started as a front end developer on a React project about one month ago, and seeing as this is the first Scrum team I’ve been a part of, I have already learned a lot. From working with new libraries to learning the ins-and-outs of agile development, I hope to capture the little lessons or tips I’ve learned here on a recurring basis.

###Dynamic Environment Variables 

For this week, I’d like to share a few tips about writing custom npm scripts. 

In the app I am currently working on, we needed to set two different custom environment variables in our React start scripts, because our app interacts with two separate API endpoints. There are two different types of users for our app, and each user interacts with a different UI. Our thought for developing in these different environments was to tell the app which API to hit based on an environment variable set in npm scripts. 

I had previously only defined environment variables in a .env file, and so this was the first time I had dynamically set an environment variable in a script. I was a little unsure of the exact syntax of the script at first, but after trial and error, the scripts were working and spinning up the correct environments!

```javascript
"scripts": {
"start": "react-scripts start",
"start-user1": "cross-env REACT_APP_API_URL=https://iamuser1.com REACT_APP_ENV_CONFIG=user 1 npm start",
"start-user2": "cross-env REACT_APP_API_URL=https://iamuser2.com REACT_APP_ENV_CONFIG=user 2 npm start"
}
```

###A Few Tips

Here are a few points I learned along the way that might be helpful to you as you write your own custom scripts. 

1. By default, we have access to the NODE_ENV variable, but we create our own custom variables with the prefix REACT_APP.

2. Consider using a small package called [cross_env](https://www.npmjs.com/package/cross-env) (published by by Kent C. Dodds) in order to enable functionality across multiple platforms.

3. Using “&&” in a script will allow two commands to execute consecutively; therefore, the second command will only run if the first one is successful. 

4. In order to execute a custom script, we must include the word “run” before the command (i.e. “npm run start-my-custom-script”) 


Hopefully you find this helpful, and I look forward to posting more about what I’m learning as a FE engineer!
Building REST APIs using Node with Express and MongoDB
Tags: node, express, mongodb, webdev
Published: 2020-05-02 14:45:48

In the following Medium article, I am gonna show you, how to build REST APIs for CRUD operation with Node using Express and MongoDB. We will be creating a simple posts API, Where user can create, edit, update and retrieve a post. To check the full post, Please click the below article link

{% medium https://medium.com/@jeyanthkanagaraju/creating-restful-crud-apis-with-node-js-express-js-and-mongodb-from-scratch-3ef632067928 %}

You can find the complete code of the application explained in this article in below GitHub Repository.

{% github jeyk333/CRUD-REST-APIs no-readme %}
Placeholder title
Tags: twiliohackathon
Published: 2020-05-02 14:38:38

[Comment]: # (All of this is placeholder text. Use this format or any other format of your choosing to best describe your project.)

[Reminder]: # (Make sure you've submitted the Twilio CodeExchange agreement: https://ahoy.twilio.com/code-exchange-community)

[Important]: # (By making a submission, you agree to the competition's terms: https://www.twilio.com/legal/twilio-dev-hackathon-terms)


## What I built
#### Category Submission: 


## Demo Link
 

## Link to Code


## How I built it (what's the stack? did I run into issues or discover something new along the way?)


## Additional Resources/Info
Pardus'ta Xtreme Download Manager(XDM) Kurulumu ve Yapılandırılması
Tags: pardus, debian, download, install
Published: 2020-05-02 14:38:27

![](https://i.ibb.co/gjnz0Sc/Screenshot-2020-04-27-21-54-02.png)
Xtreme Download Manager açık kaynak kodlu güçlü bir indirme aracıdır. Kullandığı algoritmalar ile dosyaları parçalara bölerek klasik tarayıcılara göre çok daha hızlı inmesini sağlar. Aynı zamanda Youtube gibi sitelerden videoları indirebilir ve istediğiniz formata dönüştürebilirsiniz. 
Kurulum için aşağıdaki komutları giriniz.
<pre>
wget https://github.com/subhra74/xdm/releases/download/7.2.10/xdm-setup-7.2.10.tar.xz
tar -xf xdm-setup-7.2.10.tar.xz
sudo ./install.sh
</pre>
Programı indirdikten sonra videoları yakalaması için monitoring eklentisini indirmeniz gerekmektedir. Mozilla firefox için [buradan](https://addons.mozilla.org/tr/firefox/addon/xdm-browser-monitor/) yükleme yapabilirsiniz.

![](https://i.ibb.co/DY7hzrg/Screenshot-2020-04-27-22-16-20.png)
Video indirmek için ise eklenti kurulduktan sonra araç çubuğundaki simgeye tıklayarak izlediğiniz videoları görebilir ve üzerlerine tıklayarak indirebilirsiniz.

![](https://i.ibb.co/b27KPvF/Screenshot-2020-04-27-22-33-04.png)

Programı sistemden kaldırmak için ise tarayıcı eklentisini silip aşağıdaki komutu çalıştırınız.
<pre>
sudo bash /opt/xdman/uninstall.sh
</pre>
How to do this trick on a website
Tags: wordpress
Published: 2020-05-02 14:24:54

Watch this quick short video to see exactly what I'm looking for

https://www.youtube.com/watch?v=4B9QgflrZa4&feature=youtu.be

this is the website link:
https://de.cannaable.shop/?gclid=EAIaIQobChMI-e2478GM6QIVQe7tCh35qwttEAMYASAAEgLbQvD_BwE
May 2 — Daily CodeNewbie Check-in Thread
Tags: codenewbie, checkin, beginners, discuss
Published: 2020-05-02 14:14:45

---
title: May 2 — Daily CodeNewbie Check-in Thread
published: true
description: A daily thread to ask questions, share progress, and stay accountable!
tags: codenewbie, checkin, beginners, discuss
series: Daily Checkin
---

You are encouraged to use this daily thread to:
- Ask for help (all questions encouraged)
- Explore topics you’re curious about
- Share something you’ve written or read
- Celebrate your wins
- Stay accountable to your goals
- Support your fellow programmers

Happy Coding!

---

_Interested in joining the twice-weekly live [#CodeNewbie Twitter chats](https://twitter.com/search?q=codenewbie)?  You can find us [on Twitter](https://twitter.com/search?q=codenewbie) each Wednesday at 9pm ET (1am GMT on Thursday) and Sunday at 2pm ET (6pm GMT)!_
Block Chain Training 
Tags: blockchaintraining
Published: 2020-05-02 13:26:23

 ITstacklearn is among the outright ideal training institute in leading IT online training. We provide appropriate Block Chain Online Informing with our very specialist live trainers. Block Chain gives a wide overview of most of the topics connecting to and building upon the structure of Blockchain modern technology. A Blockchain is a long-term, consecutive list of purchase documents distributed over a network
https://www.itstacklearn.com/blockchain/blockchain-course/online-training
SAP FIORI  Course
Tags: sapfioricourse
Published: 2020-05-02 13:25:32

ITStackLearn Training using ideal SAP Online Educating with globally. SAP FIORI is a collection of modern applications designed to be straightforward & simple for the majority of widely used SAP software functions that work across the tool like desktop computer, tablet computer, and also mobile phones. SAP Fiori applications convey user-friendly techniques of SAP software program for required service features.
https://www.itstacklearn.com/sap/sap-fiori-course/online-training
Oracle OAF  Course
Tags: oracleoafcourse
Published: 2020-05-02 13:24:46

ITstacklearn is among the absolute ideal training institute in leading IT online training. We offer suitable Oracle Application Structure (OAF) Online Informing with our really specialist actual time trainers. Oracle Application Structure (OAF) is a design for developing web based front end web pages and J2EE sort of applications within the Oracle EBS ERP platform.We supply agency-specific training, work innovation programs, in addition to customized contacting solutions to improve knowing as well as in addition increase particular, team and also organisation effectiveness.
https://www.itstacklearn.com/oracle/oracle-oaf-course/online-training
SAP EWM Training 
Tags: sapewmtraining
Published: 2020-05-02 13:23:44

ITstacklearn is amongst the absolute best training institute in leading IT online training. We provide suitable SAP EWM Online Enlightening with our very specialist real time trainers.SAP Extended Storehouse Administration (SAP EWM) is the most recent storehouse monitoring system released by SAP.We supply agency-specific training, work innovation programs, as well as customized getting in touch with services to improve learning and additionally boost specific, team and organisation efficiency.
https://www.itstacklearn.com/sap/sap-ewm-course/online-training
API management survey 
Tags: api, apimanagement, tooling
Published: 2020-05-02 13:18:08

Hello there!
I am looking into the API Management tooling landscape & how to improve it!
Therefore I am doing a short survey and this seems the perfect audience! 
Could you please help me filling out this anonymous survey? It will take only 3-5 minutes and you would help me a lot! :pray:
Here is the link: https://apiment.typeform.com/to/HInRcw