teleren/devto huggingface dataset:
My first post amidst the struggles on switch careers.
Tags: newbie, transition, career
Published: 2019-04-06 20:04:15

---
title: My first post amidst the struggles on switch careers.
published: true
description: 
tags: newbie,transition,career
---

<b>Hello world!</b>

As the unwritten norm states, my first program is up and running even thou am yet to make an installation of the much-needed development environments.

Here is a take from a tiny boy who still believes that indeed the developer tag will be his new title before the kid(2019) grows some teeth.
Not so sure what the right title would have been, let's stick with the above since all am trying to do is make a transition over the code life. I strongly believe am meant to be that guy, working endless times to birth a solution, but before that am also willing to travel down the rejection & frustration path.

Enough of my first words, seeing am all new to this world after reading along threads encouraging new entrants to aim at making technical blog posts on a promise that this will greatly give them (us) the much-needed skills to make a presentation, and generally get to communicate effectively.

<i>On a separate news, you may be willing to give a look onto my campaign, knowing that any form of help stands appreciated.</i>

<a href="https://gogetfunding.com/mycodingjourney/">My coding journey</a>
Should you listen to Podcasts?
Tags: podcast, javascript, react, discuss
Published: 2019-04-06 19:40:56

# What's the lowdown 
  So... The last few posts I did were about resources and where you can find them. Something I recently noticed at work is that some of my co-workers have never listened to Podcasts related to our career field or the technologies they use. Is there anything wrong with that... Well no, of course not you can do whatever you want with your free time, some people prefer music; I rather listen to podcasts on hackers or technologies. 

## Ok so what's the point...? 

  The point is there's a benefit to listening to podcasts, definitely not necessary to listen as often as me, but just occasionally will suffice. 

*I definitely think there are a few bullet points.*
**TL;DR Yes.**

- **It keeps your mind in a particular headspace:**
   This can be a double edge sword for some, maybe you want to get your mind off work-related things then I suggest finding podcasts that are more entertaining anyway. (Personally, I listen to the hacker ones for pleasure, I am not a security researcher or anything, I just love the stories.)

- **Keeps you up to date with trends and technologies in the industry:**
   If you are working in the industry and want to stay on the pulse of what is going on with conferences, changes in trends, maybe new tech stacks (what's going on with WASM, React, Vue, etc...?)  

- **Interested in something new (I am checking out Golang):**
   If you want to maybe do more than read a few articles and documentation on something before diving into it and committing quite a bit of effort implementing. Podcasts on that particular tech can really give you insight on going all in or not. I start listening to Changelogs Go section, really helped me decide the benefit was worth the headache of learning a C like a language which for a person only ever used JavaScript and dabbled with Python seems like a bit of a task. 

- **They can be informative for learning, eureka moments can happen:**
   It doesn't happen nearly as often as it does with tutorials because that is what they are designed for, however, while listening to podcasts occasionally their discussions will be technical and can trigger similar eureka moments. 

- **They are free, handsfree, simple to use resources:** 
   There isn't much else to that bullet, truly it's just an easy resource to consume. 


## Podcasts

- [Syntax.fm](https://syntax.fm/) 
- [2ndCareerDevs](https://secondcareerdevs.com/)
- [React Podcast](https://reactpodcast.simplecast.fm/)
- [Full Stack Radio](http://www.fullstackradio.com/)
- [Real Talk JavaScript](https://realtalkjavascript.simplecast.fm/)
SQL: Copy Tables and Massive Update
Tags: sql, rdbms, database
Published: 2019-04-06 18:59:46

---
title: "SQL: Copy Tables and Massive Update"
published: true
description: "How to create a table from an existing one, insert all the data, and make a massive update in the case you made a mistake, using different RDBMSs."
tags: SQL, RDBMS, Databases
---

## The road map

There are a lot of times during development where we make a mistake and all or part of our data are gone. Even worse when we lose them due to a bug in our production version.

In this post, we'll see how to create a database table as a backup from an existing one, copy the data, and make a massive update joining these two tables. We'll quote the corresponding SQL statements from different RDBMSs: MariaDB, PostgreSQL, MS SQL Server, IBM DB2, SQLite.

## MariaDB

### Create the table

```sql
CREATE TABLE tbl2 LIKE tbl1;
```

`tbl2` table will inhert all the attributes from `tbl1`.

### Copy the data

```sql
INSERT INTO tbl2
SELECT * FROM tbl1;
```

We may use the `WHERE` clause to insert only a part of tbl1's data.

### Massive update

```sql
UPDATE tbl1 a
INNER JOIN tbl2 b ON
a.key = b.key
SET a.column1 = b.column1;
```

## PostgreSQL

### Create the table

```sql
CREATE TABLE tbl2 ( LIKE tbl1 INCLUDING ALL );
```

### Copy the data

```sql
INSERT INTO tbl2
SELECT * FROM tbl1;
```

### Massive update

```sql
UPDATE tbl1 a
SET a.column1 = b.column1
FROM tbl2 b
WHERE
a.key = b.key;
```

## MS SQL Server

### Create the table and copy all data

```sql
SELECT * INTO tbl2
FROM tbl1
```

### Create the table ONLY

```sql
SELECT * INTO tbl2
FROM tbl1
WHERE 1 = 0;
```

### Massive update

```sql
UPDATE a
SET a.column1 = b.column1
FROM tbl1 a
INNER JOIN tbl2 b ON
a.key = b.key;
```

## IBM DB2

### Create the table

```sql
CREATE TABLE tbl2 LIKE tbl1;
```

### Copy the data

```sql
INSERT INTO tbl2
SELECT * FROM tbl1;
```

### Massive update

```sql
UPDATE tbl1 a
SET a.column1 = b.column1
FROM tbl2 b
WHERE
a.key = b.key;
```

## SQLite

### Create the table only

```sql
CREATE TABLE tbl2 AS
SELECT * FROM tbl1
WHERE 1 = 0;
```

### Copy the data only

```sql
INSERT INTO tbl2
SELECT * FROM tbl1;
```

### Create the table and the data at the same time

```sql
CREATE TABLE tbl2 AS
SELECT * FROM tbl1;
```

### Massive update

```sql
UPDATE tbl1
SET
column1 = (SELECT b.column1
    FROM tbl2 b
    WHERE b.key = tbl1.key)
WHERE tbl1.key IN (SELECT b.key FROM tbl2 b);
```

In SQLite we may take advantage of the [Row Values Method](https://www.sqlite.org/rowvalue.html), in the case we want to use more than one key:

```sql
UPDATE tbl1
SET
column1 = (SELECT b.column1
    FROM tbl2 b
    WHERE (b.key1, b.key2) = (tbl1.key1, tbl1.key2) )
WHERE (tbl1.key1, tbl1.key2) IN (
  SELECT b.key1, b.key2 FROM tbl2 b);
```

---

*Originally published at https://www.codingnotebook.eu/sql-copy-tables-and-massive-update/*
The Dumps - In and Out Again 
Tags: depression, mentalhealth
Published: 2019-04-06 17:26:28

---
title: The Dumps - In and Out Again 
published: true
description: 
tags: depression, mental health
---

![depression](https://thepracticaldev.s3.amazonaws.com/i/ce9hpjltok552pli82t9.jpg)

This is a post from my blog [My Web Development Odyssey](https://mywebdevelopmentodyssey.dev)

This post highlights one of the other purposes of this blog. And that’s how mental illness, in this particular instance, depression, can affect learning. I’ve dealt with depression the majority of my life. My latest round of depression has been ongoing for a few years and peaked last fall. I began feeling better in December of last year and January this year.

I attribute learning web development as one of the factors that helped me get out of that dark place I was in. However, since about five weeks ago I’ve begun to slip a little. Less motivation and less clear goals. When it gets bad I begin to feel hopeless and helpless. Doing dishes, taking out the trash, or balancing a budget are tasks I can’t wrap my head around. Learning a complex subject like web development is next to impossible. It’s still nowhere near the peak as it was late last year, and I’m fighting hard to make sure it doesn’t. 

I began noticing that my motivation for learning JavaScript was declining. I’m unsure though, if that was due to depression or the fact that I seem to be slightly stumped by higher order functions and functional programming. That could be causing my depression to worsen. Which caused which? The “being stumped” causing my worsening depression or the depression causing my lack of motivation and clarity to learn? In reality, it’s likely a combination of both. 

Whatever the origin, I’ve not posted as soon as I had hoped. This blog was born not to long ago, and I intend for it to have a long and healthy life. And that might mean on occasion to explain how mental illness and life gets in the way of our best intentions. 

Life can be messy, but we can get on top things again. So what if we need to kick, claw, and scream our way out of whatever life’s strife may hurtle our way. Fight with all our might. We can do this!

Here are a few things I’m working on.  I hope to have a first version of my anticipated timeline of learning web dev soon using my Aeon Timeline app. You will be able to interact with it on my web page to examine more details. I’m looking forward to posting that soon. I hope to see you there. 

I recently purchased [NodeJS – The Complete Guide (incl. MVC, REST APIs, GraphQL](https://www.udemy.com/nodejs-the-complete-guide/) by Maximilian Schwarzmüller from Udemy. I like visual learning and Max likes to show graphs and diagrams. He’s also very enthusiastic. I look forward to finishing this course and also his [React course](https://www.udemy.com/react-the-complete-guide-incl-redux/). Using Gimp I will attempt to create a custom logo for my blog!
I'm a Visual Studio PM at Microsoft, working on developer services like Live Share. Ask Me Anything!
Tags: ama
Published: 2019-04-06 17:01:02

---
title: I'm a Visual Studio PM at Microsoft, working on developer services like Live Share. Ask Me Anything!
published: true
tags: ama
---

Hey all! I've been at Microsoft for >11 years, and have had the pleasure of working on everything from ASP.NET, the JavaScript/debugger editor in Visual Studio, the IE developer tools (performance/memory profilers), [OData](https://www.odata.org/) (aka GraphQL before it was cool), our Node.js support in Azure, and [CodePush](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/). So I've spent a lot of time caring about web development, DevOps, cloud and productivity. My current passion/focus is developer collaboration and how it can be fundamentally improved to better meet the [diverse needs](https://aka.ms/vsls-usecases) of teams.

I've recently joined the DEV.to community (which I love!), to share my thoughts on why our team built [Visual Studio Live Share](https://aka.ms/vsls), and what makes it *potentially* interesting (only you can really judge that):

* [In Pursuit of Enjoyable Developer Collaboration](https://dev.to/lostintangent/visual-studio-live-share-in-pursuit-of-enjoyable-developer-collaboration-2nko)
* [Localhost isn't local anymore](https://dev.to/lostintangent/localhost-isnt-local-anymore-2ib6)
* [Collaboration Doesn't Come in "One Size Fits All"](https://dev.to/lostintangent/collaboration-doesn-t-come-in-one-size-fits-all-33ai)

While Live Share provides an experience for real-time collaboration, my team is also working on services to make [async collaboration more efficient](https://code.visualstudio.com/blogs/2018/12/04/rich-navigation) as well. So we're interested in trying to enhance collaboration holistically.

I'm curious to hear how teams are collaborating, and what about your current tools/processes are good and bad. That said, feel free to ask me anything about Live Share, my career, my development preferences, being a PM, or anything else! I can’t guarantee I’ll have an answer for everything, but at a minimum, I’ll try to be interesting and transparent 🤗
Apple Magic Keyboard Multi-Device* trick 
Tags: apple, magickeyboard
Published: 2019-04-06 16:06:49

---
title: Apple Magic Keyboard Multi-Device* trick 
published: true
description: 
tags: apple, magic-keyboard
---

I'm a big fan of ![Apple Magic Keyboard](https://www.apple.com/sg/shop/product/MLA22ZA/A/magic-keyboard-us-english?fnode=56). It has everything* that I need for a slim profile Bluetooth keyboard except its ability to connect to few different devices (one at a time). Occasionally, I would want to use my iMac (for its larger screen), but the action to switch/reconnect to another device is so painful and troublesome.

But, I have discovered a trick recently, which is to make use the lightning port on the Apple Magic Keyboard to connect to different macs. Once the keyboard is connected to device through cable, it will be connected to it after that. 

Now, it is effortless* to switch the keyboard to another device (compared to disconnecting and connecting to the new device)

Let me know if it works for you too.
Configure security for an Azure subscription
Tags: azure, security
Published: 2019-04-06 14:05:20

---
title: Configure security for an Azure subscription
published: true
description: Manage identity and access
tags: #Azure, #Security
---
**Configure custom Azure RBAC**
- When most organizations consider using the public cloud, they are concerned about two things:
    - Ensuring that when people leave the organization, they lose access to resources in the cloud
    - Striking the right balance between autonomy and central governance
- Azure AD and RBAC make it simple for you to achieve out these goals

![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/u8i84wx0auuiprcbrkru.png)

**Configure subscription and resource permissions**
- You can create additional subscriptions for your account in Azure
- To create Azure subscriptions under your organization's Enterprise Agreement (EA), you must have the Account Owner role for your organization
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/ym5g3xumgsvay3hsmx3n.png)
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/4ofzu14r0138n09tphb6.png)

**Identify external accounts that have Azure management access**
- Azure Security Center is a unified infrastructure security management system that strengthens the security posture of your datacenters, and provides advanced threat protection across your hybrid workloads 
- Azure Policy is a service in Azure that you use to create, assign, and manage policies
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/81frl0v51hd45381aqj9.png)

**Transfer Azure subscriptions between Azure AD tenants**
- Typically, large organizations assign Azure subscriptions to various business units of the company
- Occasionally, organizations need to transfer the subscription between owners and Azure AD tenants
- Azure provides a process for transferring the ownership of an Azure subscription
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/olv2xz3egvwvwi4km4vs.png)

**Manage API access to Azure subscriptions and resources**
- When you publish APIs through Azure API Management, it's common to secure access to those APIs by using subscription keys
- Client applications that need to consume the published APIs must include a valid subscription key in HTTP requests when they make calls to those APIs
- API Management also supports other mechanisms for securing access to APIs, including the following examples:
OAuth 2.0
    - Client certificates
    - IP whitelisting
Hide Show View Text Component in React Native on button Click
Tags: react, reactnative, android, webdev
Published: 2019-04-06 15:36:10

---
title: Hide Show View Text Component in React Native on button Click
published: true
description: Hide Show View Text Component in React Native on button Click
tags: #react #reactnative #android #webdev
---

Source : <a href="https://www.skptricks.com/2019/04/hide-show-view-text-component-in-react-native.html" >Hide Show View Text Component in React Native on button Click </a>


This tutorial explains how to hide and show Text Component in react native application on button click. Hiding and showing any component in react native application is very easy and simple, just we need to use state object in react native component. Here in this example we are using content as state object with the helps of this we are displaying and hiding text component data in android or ios device screen.

<a href="https://www.skptricks.com/2019/04/hide-show-view-text-component-in-react-native.html" >Hide Show View Text Component in React Native on button Click </a>

<img src="https://4.bp.blogspot.com/-E-1gNHpkkYc/XKiZk7r5jlI/AAAAAAAACpY/Rn7CF_GpGwsRqVv8yvkSRP5TuYP9oWEcACLcBGAs/s640/hide.png" />


<a href="https://www.skptricks.com/2019/04/hide-show-view-text-component-in-react-native.html" > Continue reading... </a>
GeoIP: How To Get Country/City/ASN From IP Address
Tags: geoip, location
Published: 2019-04-06 14:55:44

---
title: GeoIP: How To Get Country/City/ASN From IP Address
published: true
description: I found my servers were given several requests by unknown hosts. I tried to find out who they were. Their locations were one of the good information, which were got in the way written in this post below. GeoIP by MaxMind did a great job.
tags: geoip, location
---

## Introduction

I found my servers were given several requests by unknown hosts.
I tried to find out who they were.
Their locations were one of the good information, which were got in the way written in this post.
[GeoIP](https://dev.maxmind.com/geoip/legacy/downloadable/) by [MaxMind](https://www.maxmind.com/en/) did a great job.

## Preparation: [Manjaro](https://manjaro.org/)/[Arch Linux](https://www.archlinux.org/)

Install 3 packages via [Pamac](https://wiki.manjaro.org/index.php/Pamac), the Manjaro package manager:

- geoip
- geoip-database
    - About Country
- geoip-database-extra
    - About City/ASN, [Autonomous System](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) Number

[AUR](https://aur.archlinux.org/) is also available.

Besides, installation for other distros is [here](https://github.com/maxmind/geoip-api-c/blob/master/README.md#installation).

## How To Get It

It is a very simple task.
Just use `geoiplookup`:

```shell-session
$ geoiplookup %ip-or-fqdn%
GeoIP Country Edition: %Country Code%, %Country Name%
GeoIP City Edition, Rev 1: %Country Code%, ..., ..., ..., ..., %Latitude%, %Longitude%, ..., ...
GeoIP ASNum Edition: ...
```

Happy computing :)
Accessing vue global filters inside component methods
Tags: vue, javascript, filters
Published: 2019-04-06 14:45:23

---
title: Accessing vue global filters inside component methods
published: true
description: Often times you will need to access the global filters in from your vue app inside methods and lifecycle within components. Well it's possible to do that without hacks and crazy imports, instead you'll use the $options object
tags: vuejs, javascript, filters
---

Often times you will need to access the global filters in from your vue app inside methods and lifecycle within components. Well it's possible to do that without hacks and crazy imports, instead you'll use the [$options object](https://vuejs.org/v2/api/#vm-options):


```javascript
this.$options.filters.yourFilterName(paramValue);
```

## Demo   

Let's suppose you have a global filter in your  `main.js`  that formats regular `Numbers` into the USD currency format, you'll would have something like this:


```javascript
// main.js
import Vue from "vue";

/**
 * numberToUSD: It format numbers into the USD currency format.
 * @param {number} value
 * @returns {string} value
 */
Vue.filter("numberToUSD", value => { 
    return value ? `$${value.toLocaleString("en-US")}` : "$0.0";
});
```

And then you want to access this same filter inside of a component method or lifecycle method, using the [$options object](https://vuejs.org/v2/api/#vm-options) would be something like:


```javascript
// App.vue

export default {
    name: "App.vue",
    data() {
        return {
            value: 5000
        };
    },
    methods: {
        /*
         * Inside a regular method
         */
        logValueInUSD() {
            console.log(this.$options.filters.numberToUSD(this.value));
        }
    },
    /**
     * Inside lifecycle method: created()
     */
    created() {
        console.log(this.$options.filters.numberToUSD(this.value));
    }
}
```


This technique became pretty handy to me specially when I needed to pass value as props to a third-party component where I couldn't apply them using interpolation and pipes `{{ value | numberToUSD }}`.

The only downside that I noticed while accessing global filters through $options was that the instructions to access the filter may become a little bit longer, but this could be easily overcome by wrapping up the `this.$options.filters` into a variable and then access the specific filter just like this:


```javascript
const filters = this.$options.filters;

filters.numberToUSD(this.value);
```


Thanks for having you here, bye bye 👋👋.
Selling an unused domain for profit
Tags: sideprojects, extraincome, domainflipping
Published: 2019-04-06 14:26:54

Hi There, I wanted to share with you my recent experience of selling an unused domain name for a profit.

Around a year ago, I had purchased the domain AppStoreMonitor.com to build a saas product to monitor app store listing of any apps. Back then I had some extra time to work on this product. I started research and even wrote some code but due to other freelance project commitments, I was unable to continue work on this project. And the domain sat unused for about a year.

Until a few months ago, I had never even heard the term Domain Flipping, this is buying lucrative domain names and selling them for a profit. I read an article about domain flipping and wanted to try it myself with my unused domain names that included the above-mentioned one. This article I read guided me to list my domains on sites like Sedo, Flippa and other forums that are exclusive for buying and selling domain names.

Deciding on a reasonable price for these domains was quite difficult since I was new to this sort of hustle. But after a few trial and errors, I figured how to price them. After this point, it was the waiting game.

At last, after a few months of waiting for someone to contact me, I got just the email I wanted. Some random human on the internet emailed me, saying that they were interested in buying AppStoreMonitor.com. After a few email exchanges, we settled on a price and I sent a Paypal invoice. Then the transaction was settled and the transfer was made. All of this in less than a few hours. I now feel that the few months I waited was worth it.

As you may know, I am a Freelance Web & Mobile Developer offering software development services. Domain flipping for me is a whole different world of business. I want to explore what more I can do to better the sale of my domains in the future. I don't see myself living off of selling domains but no one says no to extra income by selling something they don't use.

If you have a domain setting unused, try to sell them. If you need any help do let me know, will try to help out.

And, that's all for now.
Creating a simple mapper for java
Tags: opensource, java
Published: 2019-04-06 11:32:27

---
title: Creating a simple mapper for java
published: true
description: 
tags: opensource, java
---


I have posted before a custom java [annotation](https://dev.to/saifali40/java-annotations-5gi5)  and I thought of making it enhance and making it as open source project, 

https://github.com/saifali40/mapper