teleren/devto huggingface dataset:
Fix "Warning! PATH is not properly set up..." when running "rvm use  2.7.0  --default"
Tags: rvm
Published: 2020-12-17 03:56:18

I ran `rvm use  2.7.0  --default` to switch to ruby 2.7.0

But ran into this error:

`Warning! PATH is not properly set up, /home/tao/.rvm/gems/ruby-2.6.1/bin is not at first place.
         Usually this is caused by shell initialization files. Search for PATH=... entries.
         You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
         To fix it temporarily in this shell session run: rvm use ruby-2.6.1
         To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.`

Here's how to fix it, add `rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.`

Now when running the command you will get: 

// ♥  rvm use  2.7.0  --default

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.

To permanently fix the second error:

Add this into your VSCode settings.json file:

`// Linux
"terminal.integrated.shellArgs.linux": ["-l"]`

Source for the permanent fix: https://code.visualstudio.com/docs/editor/integrated-terminal

OR

Run:  `/bin/bash --login`

Now rvm use  2.7.0  --default should work, and return the message:

`Using /home/tao/.rvm/gems/ruby-2.7.0`
WEB DEVELOPMENT - Basic Concept
Tags: webdev, beginners, codenewbie
Published: 2020-12-17 03:50:54

**Web Development is a major part of IT sector, and one of those that has a vast knowledge to be digested. So the foremost important thing while learning is that we understand each and every concept clearly and deeply as possible.**

We will take up the blocks and build them all together slowly to make the rigid concepts clearer.

###**Understanding the term _Web Development_ :-**###

Dividing the term web development makes the picture vividly clear that they refer to creating and maintaining our work on the web, i.e., the Internet.

But, here we need to understand that Internet simply doesn't mean searching something you want to know on the browser.

The Internet is a large network of cables that facilitates the transmission of Information through **data packets**.

The network of cables is very vast and spans the globe across 550000 miles of hidden cables under the ocean.

![Network of underwater cables](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTTtcusTjZHJCoycqpqzG4QDgT7k__Gks3XVQ&usqp=CAU)


Data packets are basically the small chunks of one information divided into many parts for efficient transmission of the complete information.


It contains all types of information including the locations of sender and the receiver devices.

The speed at which the data packets are transmitted is called **Bandwidth**.

It is measured in bit-rate, i.e., number of bits transmitted per second over a network.

Also time taken for 1 bit of data to be sent from sender to receiver is called as **Latency**.
Spring Boot + Angular Web socket using SockJS and Stomp
Tags: springboot, angular, websocket, sockjsandstomp
Published: 2020-12-17 03:43:09

---
title: Spring Boot + Angular Web socket using SockJS and Stomp
published: true
description: Spring Boot + Angular Web socket using SockJS and Stomp
tags: #SpringBoot, #Angular, #WebSocket, #SockJSAndStomp 
---
https://medium.com/@haseeamarathunga/create-a-spring-boot-angular-websocket-using-sockjs-and-stomp-cb339f766a98
Separating frontend and backend routes in Laravel
Tags: laravel, php, webdev
Published: 2020-12-17 03:02:02

In some projects, you want to separate frontend and backend routes, now I will show how you can do it.

Create a routes/web_admin.php file

```php
use Illuminate\Support\Facades\Route;

Route::match(['get', 'post'], '/', 'AuthController@login')->name('login');
Route::middleware('auth:admin')->group(function () {
    // dashboard
    Route::get('dashboard', 'DashboardController@dashboard')->name('dashboard');
    // logout
    Route::get('logout', 'AuthController@logout')->name('logout');
    ...
    
});
```

Edit routes/web.php

```php
use Illuminate\Support\Facades\Route;

Route::get('/', 'HomeController@index')->name('home');
```

In the app/Providers/RouteServiceProvider.php, we need to change something:

```php
namespace App\Providers;

use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;

class RouteServiceProvider extends ServiceProvider
{
    ...
    public function map()
    {
        $this->mapApiRoutes();

        $this->mapWebRoutes();

        $this->mapWebAdminRoutes();
    }

    protected function mapWebRoutes()
    {
        Route::middleware('web')
            ->namespace($this->namespace.'\Frontend')
            ->group(base_path('routes/web.php'));
    }

    protected function mapWebAdminRoutes()
    {
        Route::middleware('web')
            ->prefix('admincp')
            ->name('admin.')
            ->namespace($this->namespace.'\Backend')
            ->group(base_path('routes/web_admin.php'));
    }
}
```

Happy Coding:)
How should I learn new programming languages and develop my programming skills?
Tags: career, webdev, learning, tutorial
Published: 2020-12-17 02:57:18

It's a question that I get asked often by many developers and aspiring developers. 

There is a saying that if you fail to plan, you plan to fail and this applies to learning too. Sometimes, ambitious developers get impatient and plunge straight into active learning without any preparation. For example, a developer might say she wants to learn a Javascript framework, React, and started reading tutorials about that React without any outline on what areas she wants to focus on, or how to get to her end goal, being able to write React applications. The better way of learning, in this case, will be looking at the official documentation, going through the step-by-step approach from main concepts to advanced guides and API reference, creating a sample application in React, looking at and learning from other examples out there and setting SMART goals for each stage of your learning. S.M.A.R.T. goals are good goals because they’re specific, measurable, achievable, realistic, and time-bound.

Sometimes, developers get too greedy with wanting to know everything about a topic that they fail to narrow down and set a very broad learning objective. How board is too broad, I hear you ask. In my opinion, a topic is too broad if you can’t articulate your learning outcomes in a few words to another developer. Learning outcomes are statements about knowledge or skill a developer should acquire by the end of her learning journey on a specific topic. Sure, you can be learning about a particular topic forever, but there must be a point when you decide for yourself that it is enough, for now. Enough for you to feel confident in working toward and achieving your end goal. For example, some learning outcomes for learning React Javascript framework are:

**Learning outcomes**
By the end of my learning program, I should be:
* Able to create a new React app from scratch that can
* Consume JSON payload in a REST API
* Refresh the content of the app every x mins
* Navigate to different screens
* Remember the last screen I visited before (if any)
* Be Unit-tested

Note that the above learning outcomes are not too specific or detailed (like creating a component in JSX syntax, for example) because you don’t know about the ins-and-outs of the React framework yet. They are not too broad either; there is a clear outcome for each statement instead of just a broad, generic one, like “Create a React app”.

Good luck!

If you’re interested in understanding how to drive your career success as a developer, you may check out my book [Career Guide for Software Developers](https://gumroad.com/l/softwaredevelopers).

![Career Guide for Software Developers](https://dev-to-uploads.s3.amazonaws.com/i/p99sxx3b78i1skcp0zex.jpg)
ASP.NET Core C# – Does anyone know how to send email messages via SMTP with MailKit?
Tags: help, c
Published: 2020-12-17 02:47:04

---
title: ASP.NET Core C# – Does anyone know how to send email messages via SMTP with MailKit?
published: true
description: I tried some tutorials but I couldn's get it right.
tags: help , c# 
//cover_image: https://direct_url_to_image.jpg
---
I tried some tutorials but I couldn's get it right.
Daily Blog
Tags: go, restapi, gorm, mux
Published: 2020-12-17 02:46:17

---
title: Daily Blog
datePLEASE:
query: yes
---

## Adrnlnjnky's Daily(ish) Blog Post

Today I spent several hours working on my weather app.  Now I should explain
that the weather app is my punching bag.  When I work on new concepts or
projects I like to then go try them out on that project.  Today I migrated the
project to the Gin framework and rebuild the recording fucntions.  I record
weather from three locations.  When I was done I deleted it all.

And I gotta say that wasn't easy because I deleted more lines than I wrote.
Which is exactly why I did it.  Let me see if I can explain.  The code I wrote
today wasn't hard in fact refactoring and shrinking code is really fun and I
felt great watching the code become easier to read and better organized.  

When I was done I jumped around the program and looked at what I had done, I
though about pushing it all up; then I though, is this really what I want to
push up?  How long did that take me? Could I do it better?  I also had this
though creep into my head, something I heard CodingGarden (a twitch streamer)
say, code roulette.  And I did a pull instead of a push.  Maybe tomorrow I'll
keep what I write.

Thanks for reading
and remember:
Smile it might hurt!

Tom Peltier

This has been another SmokingEars Production!!
My journey to vim
Tags: vim, rant
Published: 2020-12-17 02:35:47

---
title: My journey to vim
published: true
description: The story of how I met vim
tags: #vim #rant
//cover_image: https://direct_url_to_image.jpg
---

Apparently everything started around october 2018, for some reason I found myself `ssh`ing (a lot) into a test server at work. As you might have guessed when I wanted to look at the content of a file my options were basically `cat`, `nano` and `vim`. When `cat` wasn't enough I chose `vim` but I knew vim was basically a trap so every time I opened a file I made sure I had cheatsheet close to me. That was good enough for awhile until it wasn't, and I decided to learn vim for good. And so the story begins...

{% comment 7pi5 %}

Fast forward to december 2019, I was still using my homemade Sublime Text plugin but at this point my `.vimrc` was almost good enough to start using `vim` fulltime in my job. There was only one thing missing: a "guess indentation" feature. I looked around for plugins for that but they didn't work exactly like I wanted. The one that came close enough was [vim-sleuth](https://github.com/tpope/vim-sleuth), so I basically took their main function and pasted it on a file I called `custom-commands.vim` (Now it's called `guess-indentation.vim`). After that I was ready to stay in vim-land.

Fast forward to december 2020 (the world almost ended like 10 times [each day]). I'm using neovim + tmux and I'm happy with this. Maybe in 2021 Onivim 2 can reach a stable status and I can use that fulltime (it seriously looks good).

Update july 2021 (still no onivim 2), Neovim 0.5 was released and with it came better support for lua based configs. I now have a new config written in lua: [it's here](https://github.com/VonHeikemen/dotfiles/tree/master/my-configs/neovim).
Project 1, Week 3, Day 4 ( I know I missed Day 3 :P)
Published: 2020-12-17 02:09:17

Nothing much was done yesterday. I feel I need to list down what needs to be done and move forward. There's a bit of direction lacking.

```
Todo List:

* Get server up and running on the domain
* Test manually first if it is working as intended
* Check performance
* Move forward from there
```
What is the most tedious part of your day?
Tags: discuss, process, tooling
Published: 2020-12-17 02:07:47

---
title: What is the most tedious part of your day?
published: true
description: Let's talk about how are days could improve.
tags: discuss, process, tooling
//cover_image: https://direct_url_to_image.jpg
---
For me it's the start. I shutdown my machine and have to restart all my software in the morning and sometimes remembering where I left off is impossible 😂
SQL vs NoSQL
Tags: datascience, sql
Published: 2020-12-16 22:36:55

# Introduction    
Hey, readers, my name is Marcelo Salas but you call me Marshmellow Salad. I'm an undergraduate at Penn State University majoring in Applied Data Science. While I may seem like just your run of the mill tech nerd, I'm also really passionate about philosophy. Those might seem like two fully independent fields, but the overlap between technology and philosophy is vast. More specifically, I'm interested in the ethical considerations and the drives behind technological innovations. 

Data Science is a field at the forefront of ethical considerations as the rapidly growing potential for harvesting vast amounts of user data becomes more and more daunting. That's why I want to enter the field and have a say on how companies levy this power of information against concerns over privacy.

# What are SQL and NoSQL
SQL stands for Structured Query Language. It's a programming language used to build databases. Databases that use SQL have a pretty universal structure that allows you to easily cross-reference data. SQL is like the organized file cabinet that lets anyone easily understand where things go and where to find them.

NoSQL on the other hand is a completely different ball park. If SQL is the file cabinet, then NoSQL is the cluttered mess of papers on your desk. Even though you might have the perfect system for understanding where everything is that works for you, none of your coworkers are going to be able to find what they need in the pile. 

The distinction between the two types of databases means that if your going to be working solo on a project, you don't need to follow SQL's strict formatting and design the system that works for you. If you are working with other people, the universal format of SQL mean anyone can hop in and understand what's going on with your database.

While everything is an SQL database needs to be stored as tables, NoSQL gives you the option of using a document-based, key-value pairs, graph or wide-column data storage method. Lastly, SQL uses a concentrated node storage, which means to scale up an SQL database you have to use a more powerful machine. NoSQL on the other hand uses multiple node, which means you can simply add more servers to improve its performance.

{% youtube GBrrZJzQx3U %}
Starting my React journey
Tags: react, javascript, journey, learning
Published: 2020-12-17 02:01:18

I always admire javascript. I am involved in developing two projects during my course in college with html ,css , javascript and php but always disappointed with those outcome because it lack proper planning and skills.

I did start learning React with some blogs , freecodecamp React curriculum and also with some youtube videos. But I was never consistent in learning. Most of the times I did go through JSX and usually stops at state management.

Now, is the time to start all over again. I am committing myself to learn React at least to the level that I can build basic web pages with it and this time doing it daily. And to make it more fun and entertaining, I want to blog about my journey while learning React.  

Thank you for the people reading this post and I request you to leave some awesome resources of React.
How to append a string to URL?
Tags: html, css, javascript, beginners
Published: 2020-12-17 01:42:12

In this post, I will be able to allow you to skills to feature or update query string parameter to current URL using JavaScript and also, you’ll skills to feature query string to the current URL without reloading page.

##How to append string to URL Example 1##
```
    function updateQueryStringParameter(url, key, value) {
      var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
      var separator = url.indexOf('?') !== -1 ? "&" : "?";
      if (url.match(re)) {
        return url.replace(re, '$1' + key + "=" + value + '$2');
      }
      else {
        return url + separator + key + "=" + value;
      }
    }
```
In above example, you’ll get to pass three argument, first are going to be your current URL and second are going to be key which you would like to update and last argument are going to be the worth of key.

Function will return you a replacement URL with updated query string.
##How to append string to URL Example 2##
Using below line of code, you’ll add query string to current URL without reloading page.
```
<button onclick="updateURL();">Update</button>
  <script type="text/javascript">
    function updateURL() {
      if (history.pushState) {
          var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?query=hello';
          window.history.pushState({path:newurl},'',newurl);
      }
    }
  </script>
```
In above example, history object of the DOM window is employed to supply access to the browser’s history.

PushState method is used to add or modify history entries and it takes three parameters a state object, a title and a URL.

**Thanks for reading how to append string to URL :)**

Source URL: [How to append string to URL?](https://blog.stackfindover.com/how-to-append-string-to-url/)
Solving Magento Re-indexing Error on Replica Database
Tags: magento, reindex
Published: 2020-12-17 01:11:13

A common issue that face many developers who are working on magento 2.x, is **indexing error** that arise when importing and existing website database to a replica website that acts as back up for the original one, which impact **cron jobs**.

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

A quick solution provided by magento CLI is to use the following reindexing command in magento project root:
```bash
bin/magento indexer:reindex indexer_name
```

If everything was working fine so you should see this:
```bash
indexer_name has been rebuilt successfully in x time
```

The other scenario is having error like this:
>SQLSTATE[28000]: Invalid authorization specification: 1045 Access denied for user 'dummy_user'@'localhost' (using password: YES), query was: "**What ever SQL statement**"

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

This error indicates an issue with view "inventory_stock_1".

The issue is that the **DEFINER** has wrong user.

###*To solve this*

Through **phpmyadmin** interface:
1. Navigate to the required view, in our case "inventory_stock_1".
2. Go to Structure Tab.
3. Select Edit View

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/iewzooeu2n6yigvz0kyy.png)
4. Add the right db user name in definer field

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

**Note**: you can get the right username navigating from magento project root directory to `app/etc/env.php`.

Now hopefully you can navigate back to your magento project root directory and use rendinxing command.
 

###A Treat
In some cases after reindxing you may face invalidated cache disclaimer like this one.

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

All you need is to click on Cache Management and select the invalidated cache(s).

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

Then choose refresh, click submit and all is fine! 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jrakzhx1cgvy3e7m4r4f.PNG)
Micro Frontends Patterns#2: MFE in 3 minutes
Tags: microservices, javascript, microfrontends
Published: 2020-12-17 01:07:47

The main goal of Micro Frontends is to enable organizations to develop applications at scale in a loosely coupled and flexible manner.

For this reason, Micro Frontends emphasizes the importance of [Cross Functional](https://en.wikipedia.org/wiki/Cross-functional_team) teams (Cross Functional Team is a base concept that also appears in Scrum). Microservices is mainly about backend architecture, which poses some problems in achieving autonomous organization sometimes. The idea behind Micro Frontends is not to "turn the Frontends into Microservices", but rather to "have a Cross Functional team that develops its features end-to-end, and solve problems for a distinct area of business or mission".

Technically, you may imagine something like "Microservicing UI parts in a nice way with Web Component". However, Micro Frontends themselves have been around for a long time, iframes are a prime example. These days, there are also several composition patterns for extracted components (called Fragments), and there are also architectures like that prepare reverse proxies for the layout service of components. The correct understanding is that the name "Micro Frontends" was given to those old-fashioned methods, as well as to methods that meet the challenges of today's distributed systems and organizations.

**Therefore, Micro Frontends is not just "let's extract the UI into common components"**. There are Micro Frontends concepts as mentioned above, and there are several methods to realize them (I think the phrase "The DOM is the API" from micro-frontends.org is a kind of misleading). Therefore, I believe that the solution will vary depending on the challenges of the organization.

If you want to know more about the concept of Micro Frontends, I recommend you to read the following two articles.

- [Micro Frontends](https://martinfowler.com/articles/micro-frontends.html)
- [micro-frontends.org](https://micro-frontends.org/)

If you want to learn more, please read the book [Micro Frontends in Action](https://www.manning.com/books/micro-frontends-in-action). It systematically covers concepts, specific techniques, performance and design systems, and asset management. In addition, the `Reading List` of this series contains information that I consider useful, including actual cases.

In this series, I would like to introduce the architecture as described in the `Introduction`, and also tell you how it relates to Micro Frontends.
CodePen 🍴 Fork: Pure CSS Gooey Blob CTA Element
Tags: codenewbie, html, css, codepen
Published: 2020-12-17 00:53:52

I continue to 🔎 find, 🍴 fork and have 🥳 fun with CSS driven animations.

Here is a demo I am working on making into slider.

{% codepen https://codepen.io/livewordpresshelp/pen/mdrmpry %}

Another demo of just the blobs.

{% codepen https://codepen.io/livewordpresshelp/pen/xxEdPXp %}