teleren/devto huggingface dataset:
About Myself
Published: 2021-08-31 20:44:28

My name is Shawn, and I have been abroad for 10 years -- 5 years in Japan and 5 years in Canada. In 2013, I went to Toyota Technical College and majored in Automobile Technology. With high grades achieved in school, I acquired Japan Student Services Organization Scholarship on my second semester. After graduation, I became an automobile mechanic and worked at Toyota dealership for 1 year. Then I made a decision to immigrate to Canada, as I had been thinking of immigration during my school years. After 2-year study and working for 3 years in Winnipeg, Manitoba which is another province in Canada, I finally received my Permanent Resident Card early this year and moved to Vancouver -- one of the best cities to live in the world.

In my free time, I like reading, listening to music and watching TV shows -- mostly sitcoms like Friends, The Big Bang Theory and so on. Also I enjoy outside activities, like jogging and hiking. I jog everyday and think it is the one of the best ways to relieve stress and challenge myself by setting up harder goals every time.

I am always looking for volunteer opportunities to be involved in the community. In 2017, I assisted with the greeting and direction of guests at special events at University of Manitoba. Back in 2014, I helped with set-up and serving as well as guest entertainment for special events at Toyota Technical College.

After I worked in Canada for 3 years as a car mechanic, I realized that this kind of jobs is not suitable for me because of the different situations between Japan and Canada. So I decided to change my career after I acquired my permanent residency. Then I did a lot of research and it turns out that programming is one of good choices for people who want to change their career like me. Also I watched a few videos about web development, and found out that I am very interested in it and it is suitable for me as well, since I like solving problems and am always willing to learn new things.

Currently, I just took an online course of HTML and CSS, did a lot of code-along projects and finished halfway through a web development bootcamp on Udemy. Then I realized that I need more practice on Javascript, so I decided to pause the boot camp and jump onto another course which is dedicated to Javascript. Now I am working on that course and hope I could grasp a better understanding of Javascript. Although it is getting more and more difficult while moving forward and sometimes I get stuck, but overcoming that is also kind of fun to me and I believe that I will make it through eventually.

My end goal is to find a job in Vancouver, therefore becoming an independent front-end web developer would be my first objective. Since React developers are in very high demand now, I think I will be spending more time on that part.
Got a favorite DEV plugin or accompanying app?
Tags: discuss, meta
Published: 2021-08-31 20:14:04

I recently rediscovered the post "Generate Cover Image For Your Dev Posts Easily" by @pjijin : 

{% link https://dev.to/pjijin/generate-cover-image-for-your-dev-posts-easily-27co %}

You can find the full app [here on GitHub](https://github.com/PJijin/Cover-Image-Generator) or [use it right here](https://blogcover.vercel.app/)... and it reminded that there are quite a few folks out there creating cool plugins and/or accompanying apps to DEV.

Got any favorites?
Follow GitHub repos the way you like
Tags: opensource, github, saas
Published: 2021-08-31 20:07:39

Hi, DEV!
I'm looking for GitHub users to help me with feedback.

GitHub notification sucks. It's so easy to be overwhelmed when there is a lot of activity in the repositories.

So I build a newsletter service to be up to date with desired repository activity:
https://ohmycode.cc

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

Any feedback is welcome!
Overthewire.org Bandit Level 3 -> 4
Tags: linux
Published: 2021-08-31 20:06:31

A walkthrough for Overthewire.org [Bandit Level 3 -> 4](https://overthewire.org/wargames/bandit/bandit4.html)

---

## Level Goal  
The password for the next level is stored in a hidden file in the `inhere` directory.

---

## Walkthrough  
Login to the server using the password obtained from the previous level Bandit level 2 -&gt; 3. 

username: `bandit3` 

```bash
ssh bandit3@bandit.labs.overthewire.org -p 2220
```

Change directory into `inhere`, running `ls` command will show no files.  

```bash
bandit3@bandit:~$ ls
inhere
bandit3@bandit:~$ cd inhere/
bandit3@bandit:~/inhere$ ls  

```

Running `ls -a` will let us see all files including hidden files.  
`-a` for all files (do not ignore entries starting with `.`)  
We can then see a file named `.hidden`.  
The you can print to screen using `cat` command.

```bash
bandit3@bandit:~/inhere$ ls -a
.  ..  .hidden
bandit3@bandit:~/inhere$ cat ./.hidden
pIwrPr##########################
```
Overthewire.org Bandit Level 2 -> 3
Published: 2021-08-31 19:59:42

**Description** 
A walkthrough for [Bandit Level 2 → Level 3](https://overthewire.org/wargames/bandit/bandit3.html)

## Level Goal 
The password for the next level is stored in a file called `spaces in this filename` located in the home directory

## Walkthrough  
Login to the server using the password obtained from the previous level Bandit level 1 -&gt; 2. 

username: `bandit2`

```bash
ssh bandit2@bandit.labs.overthewire.org -p 2220
```

This time there is a file with spaces in the name.  
```bash
bandit2@bandit:~$ ls 
spaces in this filename 
```

Running `cat spaces in the filename` will cause errors as it will think each word in `spaces in the filename` is its own separate file.  

```bash
bandit2@bandit:~$ cat spaces in this filename
cat: spaces: No such file or directory 
cat: in: No such file or directory 
cat: this: No such file or directory
cat: filename: No such file or directory
```

Printing the contents of the file can be done 2 ways.  
One using `\` before each space to indicate to the terminal that the filename continues and the other is surrounding the file name with quotes `'` or `"`. 

```bash
bandit2@bandit:~$ cat 'spaces in this filename'
UmHadQ##########################
bandit2@bandit:~$ cat spaces\ in\ this\ filename
UmHadQ##########################
```
GITHUB! Jenkins, pipeline
Tags: github, jenkins
Published: 2021-08-31 19:31:41

As a record of how to set up a new CI/CD pipeline from Github to Jenkins:

A good first step is to install Jenkins on a separate machine or VM to get this started.  
https://www.jenkins.io/doc/book/installing/
You can pick Linux, Docker, Kubernetes.  What ever is your preference as long as you can get the webserver running.

We will start by assuming you have a github repo and you set up the credentials such as tokens correctly.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ir8w68qo9a28w71uevou.png)

Open a new pipeline and choose Github.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3wdks1hqn46juxwwuopu.png)

Enter your github token to access it initially for the wizard.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06qencqd6fg1vqhnxb2r.png)
If you are associated with multiple accounts or organizations, pick the one of your choosing and then the repo from the list provided.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qhtf12t8mdhbbzvunz5e.png)
The fun part starts, you can start adding steps and actions.  It even comes with a choice for Git.  
One you are done you can run it, but it probably won't work if the repo is private.  So we will need to add the login info.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4e1808zj8jph853vkx3u.png)
You will find this under Configure of your Pipeline.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gv7lrrw0kdntqxokxbjw.png)
Because of Github security you will need your Token once more.  It will be protected much like Github Secrets.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7pn51htptv4uy8ckpxb3.png)

We will add the target machine.  Go to the main page of Jenkins.
And click on Manage Jenkins.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4yfnaa4v5w4kqqppk40k.png)
Give it a new name.  Go back to Main Dashboard and Manage Nodes.  Click on the new node.
![jenkinsMachine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67qo45wcmlahguaz0u18.png)

Go under Configure and give it a name.
![jenkinsMachine2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01oqm4xgm35oxpfmy899.png)
Add the IP address and credentials for the SSH.  
This should do it to pull from github and apply to the target machine.
Building Vocabulary Day 3
Tags: day3
Published: 2021-08-31 03:51:52

1. **parochial**(adjective) :having a limited or narrowly restricted in scope or outlook. 
![alt text](https://dxuoddg10rgxw.cloudfront.net/wp-content/uploads/2011/07/17023837/parochial.gif)
[Checkout Pronunciation](https://www.google.com/search?q=parochial&oq=parochial&aqs=chrome.0.69i59j35i39j69i59j0i433i512j0i512l3j69i60.4546j0j9&sourceid=chrome&ie=UTF-8)

2. **vindicate**(verb) : to clear of accusation, blame, suspicion or doubt
with supporting arguments or proof.
![alt text](https://learnbookme.files.wordpress.com/2016/12/vindicated.png)
[Checkout Pronunciation](https://www.google.com/search?q=vindicate&oq=vindicate&aqs=chrome.0.69i59j0i433i512l2j0i512l2j0i433i512j69i60l2.4184j0j9&sourceid=chrome&ie=UTF-8)

3. **mercurial**(verb) : subject to sudden or unpredictable changes of mood or mind.
![alt text](https://miro.medium.com/max/1200/1*GMPTdwXD4gMCEd5OEU43WA.jpeg)
[Checkout Pronunciation](https://www.google.com/search?q=mercurial+meaning&bih=722&biw=1536&hl=en-GB&sxsrf=AOaemvLXtmCxp1P248qA8t97diAt438OTg%3A1630379398070&ei=hp0tYcfjA4fZz7sPjZW-4Aw&oq=mercurial+mea&gs_lcp=Cgdnd3Mtd2l6EAEYATIJCCMQJxBGEP8BMggIABCABBCxAzIFCAAQgAQyBQgAEIAEMgUIABCABDIFCAAQgAQyBQgAEIAEMgUIABCABDIFCAAQgAQyBQgAEIAEOgcIIxCwAxAnOgcIABBHELADOgQIABBDOgcIABCxAxBDSgQIQRgAUOAnWNQ9YONOaAFwAngAgAHrAYgB3AWSAQUwLjMuMZgBAKABAcgBCsABAQ&sclient=gws-wiz)

4. **belie**(noun) : to give a false representation to; misrepresent.
![alt text](https://pbs.twimg.com/media/D5ZyXHhWwAAY7vq.jpg:large)
[Checkout Pronunciation](https://www.google.com/search?q=belie&oq=belie&aqs=chrome..69i57j0i433i512j0i131i433i512j46i433i512l2j0i433i512l3j0i512j0i433i512.4486j0j9&sourceid=chrome&ie=UTF-8)
5. **chastise**(verb): to reprimand harshly
![alt text](https://image.shutterstock.com/image-vector/mother-guilty-son-isolate-on-260nw-1366732667.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=chastise&oq=chastise+&aqs=chrome..69i57j35i39j0i512l8.6722j0j9&sourceid=chrome&ie=UTF-8)
I hope this helps you if you are preparing for GRE exams.
"Stumbling into Dev Management" with James Stanier of Shopify | Educative Sessions
Tags: engineering, management, developer, academia
Published: 2021-08-31 19:24:09

Dr. James Stanier never intended to become a manager, let alone a Director or VP. He certainly never intended to publish a book about it either! Dr. Stanier shares his story from doing a Ph.D. to failing to get an academic job to joining a start-up which grew rapidly through numerous venture capital investment rounds. After reading lots of books on management in the "business" world, he applied what he knew to help shape the Engineering department at Brandwatch and now Shopify.

Listen to the podcast HERE: [https://www.podbean.com/media/share/pb-j99e5-10a558d](https://www.podbean.com/media/share/pb-j99e5-10a558d)

**Watch**: [https://www.youtube.com/watch?v=ud3yST_f0qQ](https://www.youtube.com/watch?v=ud3yST_f0qQ)
Views and it's types in Android {Android Development} | Day 2🔥🚀
Tags: xml, android, development, sharingknowledge
Published: 2021-08-31 19:06:11



In last blog([here](https://dev.to/star_trooper/introduction-to-android-development-part-1-day-1-4ki2))I talked about prerequisites ,tools and tech stack/Programming language we use for Android Development. And how XML help us in structuring and designing components and how Java/Kotlin/C++ is used for Logic
for our Android app.

In Android Development ,the first thing we need to learn is something called Views.
View is a basic building block of UI (User Interface) in android. 
And using the series of views we build our Application UI
At start we will have a look over 3 basic views 👇

1.1  TextView 👇
The first and commonly used view is "TextView".
➡️ TextView is the most widely used view used to show pre-defined text on display screen.
Snippet:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h69mbxvl52s2rduliw1s.png)

1.2 Few TextView attributes👇
i . android:text
➡️ Text to display. 
ii . android:textColor
➡️ Text color. 
iii . android:textStyle
➡️ Style (normal, bold, italic, bold|italic) for the text. 
iv . android:fontFamily
➡️ Font family for the text.

Read more about 👉 [TextView](https://developer.android.com/reference/android/widget/TextView)

2.1 ImageView 👇
➡️ The second commonly used view is "ImageView".
ImageView are used in Android application to place an image in the view.ImageView is used to show any picture on the user interface.

Snippet:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fk71mc9lkqws04q81rdp.png)


2.2 Few ImageView attributes
i . android:src
➡️ Sets a drawable as the content for this ImageView.
ii. android:cropToPadding
➡️ If true, the image will be cropped to fit within its padding.
iii. android:tint
➡️ The tinting color for the image.

Note for ImageView 👇
Any image that we want to display in the app should be placed under the drawable folder. This folder can be found under 
app → res → drawable. 
To insert an image, simply copy the image and then right click on drawable → Paste.



Read more about 👉 [ImageView](https://developer.android.com/reference/android/widget/ImageView)

3.1 Button
A user interface element the user can tap or click to perform an action.
Snippet:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e5k8amvr0kmnn7qztotr.jpg)

About the Button 👇
We use Button to trigger the method we wrote in Java/Kotlin/C++ using "android:onClick" attribute of button view.

Read more about 👉 [Button](https://developer.android.com/reference/android/widget/Button)

Resources
[Online XML visualizer](https://labs.udacity.com/android-visualizer/#/android/) for practicing Purpose.
Letter Grade Converter
Tags: python, programming
Published: 2021-08-31 19:03:01

```python
# letter_grade_converter.py
#   This program accepts an exam score as input and prints out
#   the corresponding grade.
# by: Scott Gordon

def main():
    # Write welcome message.
    print("***** Welcome to The Letter Grade Calculator *****")

    # Get input from user and assign it to score variable.
    score = int(input("Enter your exam score: "))

    # Use branching control statements to associate the score
    #       with the letter grade.
    letter_grade = ""
    if score < 60:
        letter_grade = "F"
    elif score < 70:
        letter_grade = "D"
    elif score < 80:
        letter_grade = "C"
    elif score < 90:
        letter_grade = "B"
    elif score < 100:
        letter_grade = "A"

    # Print out the corresponding grade.
    print(f"Your letter grade is {letter_grade}.")


main()
```
5 steps to resolve merge conflicts in Bitbucket repository with git bash
Tags: git, webdev, bitbucket, bash
Published: 2021-08-31 18:55:00

Before merging your branch to the main branch (develop, master, whatever), it occurs that your branch is many commits behind the destination branch and somebody pushed changes which have conflicts with yours. Before pushing your changed files you have to sync your branch with the destination branch and in case, that there are files with conflicts you have to resolve them. If you are a fan of git bash or command line, there are 5 steps how to manage merge. 
###1.Checkout the temporary branch with your changes.
This branch is created, when there are detected conflicts with your origin branch which are not possible to resolve with auto-merging .
```bash
git checkout <temporary-branch>
```
###2.Merge destination branch to your detached branch.
```bash
git merge remotes/origin/<destination-branch>
```
This command will merge all files which can merge. In others, there are marked lines of code, which have to be merged manually
###3.Resolve conflicts
Compare yours and incoming changes and resolve them. If you have finished, you can mark the resolved file with **git add**.
```bash
git add 'path/resolved-file'
```
###4.Commit resolved files
```bash
git commit
```
If you commit your resolved files you are in the detached branch so you have to push it to your branch. 
###5.Push detached branch to your branch
```bash
git push origin HEAD:<name-of-your-branch>
```
If it is successful, your branch is in sync with destination branch. You can continue with creating pull request or merging your branch to destination branch.

If you want to support me with coffee you can do it here: [![Buy Me A Coffee](https://cdn.buymeacoffee.com/buttons/default-black.png)](https://www.buymeacoffee.com/smetankajakub)
I would be grateful ;)

Visit website [smetankajakub.com](https://www.smetankajakub.com)

Follow me on [Twitter](https://twitter.com/smetankajakub_)
  
Photo by <a href="https://unsplash.com/@yancymin?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Yancy Min</a> on <a href="https://unsplash.com/s/photos/git?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Date Converter
Tags: python, programming
Published: 2021-08-31 18:42:07

```python
# date_converter.py
#     Converts day month and year numbers into two date formats
#     using string format or f string.
# by: Scott Gordon

def main():
    # get the day month and year as numbers
    day = int(input("Enter the day number: "))
    month = int(input("Enter the month number: "))
    year = int(input("Enter the year: "))

    date1 = str(month)+"/"+str(day)+"/"+str(year)

    months = ["January", "February", "March", "April",
              "May", "June", "July", "August",
              "September", "October", "November", "December"]
    monthStr = months[month-1]
    date2 = monthStr+" " + str(day) + ", " + str(year)

    # print("The date is", date1, "or", date2+".") # using string concatenation
    # print("The date is {0} or {1}.".format(date1, date2)) # using string format method
    print(f"The date is {date1} or {date2}.")  # using f string


main()
```
How to apply transparency in OO programming ?
Tags: oop, java, design
Published: 2021-08-31 18:40:06

Transparency is one of the Object Oriented Design Principles that helps developers keep the code readable and understandable.


When you look at the class or methods it should be very obvious immediately what it does, within the next 1 minute it should be obvious how it does what it does. You as a programmer should be able to understand the piece of code that you have written after several months even years when you look at it. Moreover, others too, should take the same amount of time that you took after 6 years to understand the code that you have written.  For Example, when anyone looks at the name of a class and its member variables and methods they should understand what they do and how, without any effort. 

* The name of the class should explain what it does or what it stands for.

* The name of the variable should say what it is used for.

* The name of a method should explain the action that is performed when the method is called. 

* A method name should have a verb to make that happen. 

* The same goes for the name of the objects, they should say what they are used for and in which context. 

* Normally a class is named as a noun example Employee class. 

As an example, an Employee class can have variables, to maintain the state of an employee object. When the task of the Employee class is to keep age, salary, name, department details of an employee then the variable names should be like  age, salary, name, department. We should use the easiest name that identifies what the variables are for.  


Here is another example for the methods. When a method increments the salary of an employee then name it like incrementSalary(). You can increment salary by providing an increment percentage or an adding a float amount to the existing salary. Then name them differently like
```
incrementSalaryByPercentage(double percentage)
incrementSalaryByAmount(long additionalAmount)
``` 
Now assume a department consists of 5 employees. and one of them is an IT manager, another is an accountant, another human resource manager and two programmers. You will create 5 objects of the same Employee class in the Department class. but name the name of each Employee object should explain their role like ITManager etc.

When you start creating classes, start from top to bottom. That means write the user interfaces first to provide transparency. Things like services, databases etc. should be at the bottom of the structure and written later. It should be done this way so that, even if there are changes in the technical layer like how to access the database it should not affect the upper layer.

This way just by following a good naming convention we can make our code easy to understand and transparent.

For the original post please refer to [my blog](https://www.cloudnativemaster.com/post/what-transparency-means-in-oo-design-pattern-how-to-apply-it-in-code)
You can see similar posts in Object Oriented Design [here](https://www.cloudnativemaster.com/object-oriented-design)
Copying Text to the Clipboard in JavaScript
Tags: javascript
Published: 2021-08-31 06:16:17

The [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API) now has [impressive browser support](https://caniuse.com/?search=clipboard%20api).

One way that we can interact with it is through the browser's `window.navigator` interface.

So, here is a simple function that uses the clipboard's `writeText()` method to copy any given string of text to the user's clipboard:

```js
const copyText = (text) => {
    if (!navigator.clipboard) return; // For unsopported browsers
    navigator.clipboard.writeText(text).then(() => {
        console.log(`Text copied.`);
    }).catch((e) => {
        console.log(`Error copying text:`, e);
    });
};
```

If an unsupported browser is used or if there is an error with `writeText()`, then the text will not be copied.

Some consider confirmation in the UI on successful copy events to be a good practice. One example would be a brief alert that pops up for a few seconds saying something like "Text copied".

It's especially important to make sure that you only modify the user's clipboard *with their explicit permission*.

## Conclusion

I hope you enjoyed this quick little tutorial!

It's a simple snippet that I use, on average, probably about once a week.
Installing Open-WC
Tags: openwc, tutorial, terminal
Published: 2021-08-31 18:29:41

###Applications Used:
* Terminal
* NodeJS (LTS)
* Yarn

###How to Access Terminal (Mac)
* Press Command + Space to access spotlight search
* Type in Terminal to Open

###How to install NodeJS [includes npm]
* Go to https://nodejs.org/en/ and download Node LTS
* Once downloaded, go into download folder
* Double Click and follow the installation prompts

*To make sure it successfully installed...*
* Open Terminal
* Type Node
* If "Welcome to node js [vs #]" shows up, it has been successfully installed.

###How to install Yarn
* Go to https://yarnpkg.com/getting-started/install
* In Terminal enter : `npm install -g yarn`

*To make sure it successfully installed...*
* In Terminal type *yarn*
* If "Success Already up-to-date" shows up, it has been successfully installed.

###How to use Open-WC Boilerplate
* In Documents Folder create a new folder called **git**
* In git create another folder named your git username
* Return to Terminal and enter `cd Documents/git/~name of folder~`
* Enter `npm init @open-wc`
* Select Scaffold a New Project
* Select Web Component
* Press A to select linting, testing and demoing
* Select No for Typescript
* Name Scaffold *hello-world*
* Install using Yarn

###Running Open-WC Boilerplate
* Enter `cd hello-world` in Terminal
* Enter `npm run start`