teleren/devto huggingface dataset:
First time contributed in open source repo
Tags: hacktoberfest
Published: 2020-10-20 19:58:49


This was my first time that I contributed in any open source repository . so first, a big thanks to [hacktoberfest](https://hacktoberfest.digitalocean.com/). 

Yes, And now  
## **What I Learned From Hacktoberfest**
So, from my experience, contributing in open source is a fun task. 
You are making contribution in open source , so it will help many and if there is any kind of inefficiency in your code , someone can correct you.

And also you get familiar with many new stuffs.

## **In which I make contribution ?**
As I am learning algorithms and data structures nowadays, So I contributed many algorithms and data structures in [this repo](https://github.com/amritansh22/Data-Structures-and-Algorithms-in-cpp).

**Some of my pull request are for :**
* XOR linked list (implementation)
* counting sort (which works for both positive and negative numbers)
* radix sort
* sliding window maximum problem
* array rotation using juggling algorithm


For me, It was really a good experience of contributing my work. And I learnt lots of new things in algorithms and data structure from **Hacktoberfest**.
range
Published: 2020-10-20 23:56:28

The range of a function is domain beginning with x to and end point y.
e.g: P(x,y) 

As the term "range" can have different meanings, it is considered a good practice to define it the first time it is used in a textbook or article. Older books, when they use the word "range", tend to use it to mean what is now called the codomain. 

Create a *sequence of numbers* from 2 to 2, but increment by 3 instead of 1:
```
for n in range(2, 12, 3):
	print(n)
```
The formula is
 
for variable in range(start, end, increment) you should
     print(variable)
One liner to download a Browser with PowerShell on Windows Server
Tags: powershell, windows, microsoft
Published: 2021-09-03 15:24:34

---
title: One liner to download a Browser with PowerShell on Windows Server
published: true
date: 2020-10-20 23:28:00 UTC
tags: Powershell, Windows, Microsoft
canonical_url: https://www.petefreitag.com/item/909.cfm
---

It would be nice if Windows Server 2019 came with Microsoft Edge Browser, but it still comes with ~~good~~ old IE 11, and on a Windows Server, you have to jump through hoops to let IE download anything due to its default security settings.

First I tried downloading Microsoft Edge Browser with IE on Windows Server 2019. I got the following prompt: _Do you want to allow this website to open an app on your computer?_, then when I click _Allow_ it says:

> You'll need a new app to open this **microsoft-edge**

Yes IE, I know!

My next attempt was to download Chrome on Windows Server 2019 using IE, it tells me:

> Your current security settings do not allow this file to be downloaded.

Now I realize I could just make IE's security settings more lax, but I'd rather not do that on a server.

Finally before event attempting to download Firefox on Windows Server using IE, I though maybe I can just write a powershell script to download it, and bypass IE all together. It turns out this was quite a simple and successful endeavor. Just open up a new PowerShell session and run:

```
Invoke-WebRequest -Uri "https://download.mozilla.org/?product=firefox-msi-latest-ssl&os=win64&lang=en-US" -OutFile firefox.msi
```

This powershell command will download the latest Firefox web browser and save it as firefox.msi in the current directory. You can then just run firefox.msi and you'll be on your way with a legit browser.

You could use the same technique to download Chrome or Edge on Windows Server 2019, you would just need a URL to download it first. Then swap the URL in the powershell script to point to the browser you want to use. No need to even open Internet Explorer on Windows Server.
Handling time in JavaScript
Tags: javascript
Published: 2020-10-20 23:26:05

Depending on the project you are building, time can be a very important skill to master. This reality hit me when I went head first in a challenge on Edabit.com

Here is the general problem it needed me to solve:
```
function hoursPassed(t1, t2) {
    // `t2 - t1` must return the amount of hours passed
    // It must also return `There is no time passed.` 
    // if t2 is equal to t1
}
```

Time is tricky since 1 hour behind 12:00 AM isn't 11:00 AM.
Naturally, we want our algorithm to reflect the laws of time. Wouldn't it be nice if this worked?

```
function hoursPassed(t1, t2) {
     return t2 - t1
}
```

Unfortunately, this doesn't work for us. Time does come in different forms, however. Does military time ring a bell? Anything over 12:00 PM just adds to the hour. So 1:00 PM is really 13:00. That logic is handled below, assuming we pass the time of day in as an argument.

```
const hour = time =>
    time === "12:00 AM" ? 0 : +time.split(":")[0] + 12 * time.includes("P")
```

Above, we are passing our time in as an argument. If it is midnight, the hour should be 0 out of 24 in a day. Otherwise, we are grabbing the parsed hour and only adding 12 to it if it is in the PM and not the AM. With booleans, `true` is equal to 1 while `false` is equal to 0. As far as numerical values go, this is a major convenience for us.

In PEMDAS (throwback to our younger days, no?), multiplication happens before addition. Our 12 is multiplied by either 0 or 1 depending on morning or afternoon time.

```
// Example outputs

hour("2:00 PM") // -> 14
hour("11:00 PM") // -> 23
hour("3:00 AM") // -> 3
hour("6:00 AM") // -> 6
```

Fantastic! We have successfully created a function that converts our time into military time.

Now, we can use this function to our advantage:

```
function hoursPassed(t1, t2) {
    const h = hour(t2) - hour(t1);
    return h ? `${h} hours passed.` : "No time has passed"
}
```

Within our function, we have set a constant variable of `h` equal to the hour difference. If `h` is equal to 0, then our ternary knows to return "No time has passed.". Remember that 0 equals `false` and 1+ equals `true`. Anything greater than 0 will ultimately be our hours passed. 

I hope this algorithm helps many devs out there! This is bound to be in someone's technical interview. :)
Tips for lifelong learning when you have children
Tags: productivity, career
Published: 2020-10-20 22:38:08


I have loved my career as a dev so far. It has fulfilled all of the expectations I had before I started on the long slow journey from boring office job to grizzled senior dev. But in order to make a career out of being a dev you do have to commit to keeping your skills fresh. If you're lucky then you work in an environment where the latest technology is always being used so you're always learning new things on the job.

In my experience it's more likely that most of the time you'll be doing maintenance task on a mature codebase which isn't due to have any major overhauls anytime soon. If you're like me this is when the urge to learn something new kicks in. Learning new skills is a challenge at the best of times, but one thing that definitely makes it harder is being a parent.

#I'm not a monster

**Disclaimer**: I love my kids. I really do. But I have three kids under 5 and raising them is harder and more exhausting than dealing with 1,000 unsolicited calls from recruiters or failing hundreds of whiteboard interviews. And it doesn't let up.

Why does this matter? How is this related to being a developer? The answer lies in two things: attention and time. Kids demand a lot of attention, and a lot of time. These are two key resources you need plenty of in order to keep up to speed with the skills you need in your career as a dev. I simply don't have the free time that I used to have to code. When I do have time I'm not always able to give coding my undivided attention and I miss it. 

# The problem
At the end of a long day I'll put the kids to bed, walk the dog, then sit down and think "time to work on that nice little side project idea" or "maybe tonight's the night I finally get hands on with PACT testing". Often I don't get as far as opening my laptop. The enthusiasm I have for playing with some new tech is washed away by the deep tiredness that can only come from the cumulative effect of sleep deprivation, exposure to screeching at unsafe decibel levels and changing many, many nappies.

#What do I do about it?

I have, however adopted some strategies to try and keep on top of new developments, such as:
- scrolling through this site 
- listening to coding related podcasts while walking the dog
- listening to Pluralsight courses while walking the dog
- following influential devs on Twitter
- making the most of downtime at work to tinker with the codebase I work on. This usually results in me creating speculative branches that shoehorn in the latest approach I read a blog post about. The code won't be merged but at least it will be written!

There's no real substitute for getting your hands dirty and writing some code but the above do help me to feel like I'm not drifting too far from the pack. What's more I feel like they'll prove to be useful once I get some free time back.

If anyone else has productivity tips for time-poor parents then please comment!
Allure and Jenkins
Tags: allure, jenkins, cicd, automation
Published: 2020-10-20 22:57:50

In order to use **Allure** inside **Jenkins** you basically need 3 things:

1. Under `Jenkins > Manage Jenkins > Manage Plugins` install the Allure plugin.

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

2. Then, under `Jenkins > Manage Jenkins > Global Tool Configuration` you also need to install the Allure Commandline. In order to do so, you can try to installing it automatically from the Maven Central Repo, as follows:

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

3. In each project, set the path to the allure-results directory.

That's it, we're ready to generate Allure reports.


The first time you run your **job**, Jenkins will try to download the installation zip file and install the Allure Commandline for you. 

If for some reason it gives you a problem similar to the following:

``` console
[Checks API] No suitable checks publisher found.
java.io.IOException: Server returned HTTP response code: 401 for URL: https://repo.jenkins-ci.org/maven-repo1/io/qameta/allure/allure-commandline/2.13.6/allure-commandline-2.13.6.zip
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3061)
	at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:628)
	at java.net.URLConnection.getContentLengthLong(URLConnection.java:500)
	at java.net.URLConnection.getContentLength(URLConnection.java:484)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:412)
	at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: java.io.IOException: Server returned HTTP response code: 401 for URL: https://repo.jenkins-ci.org/maven-repo1/io/qameta/allure/allure-commandline/2.13.6/allure-commandline-2.13.6.zip
```

The problem is that you're trying to connect to  `https://repo.jenkins-ci.org` and you probably don't have permission.


What you could do is try install the **Allure Commandline** `Jenkins > Manage Jenkins > Global Tool Configuration` a different way. Rather than trying to get the zip installer from
- `https://repo.jenkins-ci.org` 
- Try getting directly from `https://repo.maven.apache.org`.

Check `https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/` to determin which version you need.

Then, write the url of the zip version you want to install, for example:

`https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.13.5/allure-commandline-2.13.5.zip`

And you'll be fine. The installer should look similar to the following:

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

Apply the changes, go back to the job and see the magic happening!

I hope this helps anyone!
What I learnt From Hacktoberfest 
Tags: hacktoberfest
Published: 2020-10-20 22:46:32

## What I Learned From Hacktoberfest

<!-- What did you learn that can help others contribute to the project you worked on? What did you learn that can help the users of that project?! -->

This is my first time participating in hacktoberfest fest programme. Heard about it in the previous years but I wasn't sure I was ready. So this year, I decided to give it a try. I was nervous at first but then I took tips and instructions from the website and read through the contribution guidelines of repositories before trying to make any contribution and it was really an amazing feeling having my contributions accepted - because it turned out contributing to open source wasn't as hard as I thought.

I contributed to a problem solving repository where you solve some algorithms in any language of your choice. I solved the palindrome, fibonacci series and ugly number algorithms using JavaScript. What I learnt contributing to the repository was that I had to cover all use cases and make my code as readable as possible (adding comments where necessary most importantly) to enable understanding to anyone who has access to it.

Any user of the project can use and implement it where necessary in his/her codebase and make additions or subtractions where necessary.

Overall, this year's hacktoberfest programme was a very exciting one for me and opened my eyes to the benefits of contributing to open source. I hope to contribute to repositories tackling real-life problems very soon. 

Feel free to send in comments with your personal experiences. Cheers!!
Day 41 of 100DaysOfCode
Tags: 100daysofcode, javascript, react, codenewbie
Published: 2020-10-20 19:00:56

Hi!

Today was the beginning of a new chapter in my coding life as I started learning React. One of my goals was to be able to make web apps using React. This way I can make something interesting, visual, and shareable. 

### What I did today:

#### 1. Started React challenges on fCC
https://www.freecodecamp.org/learn/front-end-libraries/react

#### What I learned from it:
* What React is
* How it merges HTML and JavaScript with JSX
* What is ReactDOM
* Rendering elements to the DOM
* All JSX tags must be closed

#### Time spent learning:
Task 'FCC'. Elapsed time: 50 min 21 s

#### Total time: 50 min 21 s
Time spent is tracked by my [TaskTimer](https://www.arttupyykonen.com/tasktimer/) script and the [WakaTime app](https://wakatime.com/about).

### Links and videos

If you want to learn React I recommend starting with the freeCodeCamp challenges mentioned above. After finishing them this video might be a good continuation.

{% youtube 4UZrsTqkcW4 %}

**Outro**
Thank you and see you tomorrow!
Beginner's Guide to Building a Web App
Tags: django, tutorial, webdev, beginners
Published: 2020-10-20 22:14:57


Don't worry if you're new to coding. 

This tutorial will teach you how to launch a fully-featured web app with the ability to log in/log out, submit product reviews, and create a wishlist.

The website itself will be a mixture of a product showcase and a blog. Unlike other tutorials, we also promote the use of affiliate marketing to create a monetizable website.

We'll start off with the basics of HTML and CSS and then move on to an introduction to Python. 

Finally, we will combine HTML, CSS, and Python using the Django web framework to create a web app. 


Feel free to get started on any part:

[Part 1: HTML and CSS](https://www.ordinarycoders.com/html-and-css)
Get to know the basics of HTML document structure and elements. Then continue with styling HTML elements using basic CSS declarations.

[Part 2: CLI and Python](https://www.ordinarycoders.com/cli-and-python)
Learn more about coding using a command-line interface (CLI) and Python Programming Language examples.

[Part 3: Django I](https://www.ordinarycoders.com/django-i)
Now that you have a grasp on using CLI and Python, let's jump into installing Django and setting up your first web app.

[Part 4: Django II](https://www.ordinarycoders.com/django-ii)
Further increase your web app functionality with the Django template language, Python packages and other built-in Django features.

[Part 5: Django II](https://www.ordinarycoders.com/django-iii)
Create a user page and allow users to submit product reviews. Then increase the app's mobile compatibility with media queries.

[Part 6: Deploying Django](https://www.ordinarycoders.com/deploying-django)
Add the final configuration settings to your project and deploy your Django web app using Amazon Web Services (AWS).

Currently, the project is themed for headphones but this can easily be changed to a different niche.

Check out what you'll be building below:
![A Django blog with a product showcase for headphones](https://d2gdtie5ivbdow.cloudfront.net/media/cache/ec/f8/ecf88732b570a31bab7695430dfecf35.jpg)
Is Your Boss a Micromanager?
Tags: career, productivity
Published: 2020-10-20 22:06:02

---
title: Is Your Boss a Micromanager?
published: true
date: 2020-10-20 22:03:40 UTC
tags: career,productivity
canonical_url: https://www.notonlycode.org/is-your-boss-a-micromanager/
cover_image: https://www.notonlycode.org/content/images/2020/10/micromanager1-thumbnail.jpg
---

In this video I'm talking about micromanagement. A lot of people ask - is there something wrong with me or is my boss a micromanager? I'm here to answer this question - I'll explain what is micromanagement, how micromanagers stiffle their teams and why people become (conciously or not) micromanagers.

{% youtube hUlFjjIWaLk %}

Working with micromanagers is often challenging and very exhausting, both mentally and emotionally. In this episode I'm talking about how to recognize a micromanager and what are 3 different types of micromanagers. Next week I'm going to follow up with a video about how to work with micromanaging boss.

🎥 Video timeline:

[0:00](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=0s) Intro  
[1:05](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=65s) Micromanagers want to know everything  
[1:39](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=99s) Micromanagers want to make all decisions  
[2:40](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=160s) Micromanagers are obsessed with irrelevant details  
[3:26](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=206s) Micromanagers are obsessed with reports and updates  
[4:03](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=243s) Micromanagers fail to delegate  
[5:17](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=317s) Why do people micromanage  
[6:00](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=360s) New managers  
[6:45](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=405s) Afraid managers  
[7:20](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=440s) Mircomanagement believers  
[8:36](https://www.youtube.com/watch?v=hUlFjjIWaLk&t=516s) Outro
Learning advance as a student
Tags: motivation, startup
Published: 2020-10-20 21:55:06

hello everyone I know I am still a student that doesn't have enough knowledge how these incredible things happen in the outside world but I am always searching answer whit this technology so if your student like me don't be afraid to learn new things because we don't if that technology that you want to learn is the way you to earn money many resources in youtube can be watched and also try to invest course because there are many good instructors and also DEV community this kind of platform is very helpful to as a developer
Techies in Nigeria Are Not Safe Again In The Hands of the Government
Tags: technology
Published: 2020-10-20 21:34:39

Hello everyone!

I am typing this in tears 😭😭😭

This is just to inform you that Nigerians are not safe again in the hands of our so-called government.

There is a special unit of the Nigerian Police Force called SARS that is supposed to be handling robbery cases but in recent years, the operating officers switched from protecting lives of the citizen to destroying their lives.

It all started as a cybercrime movement but  they started attacking techies after sometime and now it is everyone!

Now the protest for the government to disband this unit has been on for a while now, the government disbanded them and after like 3 days came with another unit which is basically the same thing but with different name: SWAT.


The protest continued but today became our worst nightmare as the government hired thugs, sent out the army to start killing it own people!

**Warning: there are graphic images of real-life brutal violence in the following link:** https://endsars.com/videos

PLEASE HELP US!

😭😭😭😭😭
Writing code is tough
Tags: webdev, opensource, programming
Published: 2020-10-20 21:32:13

Writing code is hard, it's difficult because it requires isolation, you have to banish any noise, anything that can disorient you, it's like you have to wear blindfolds to write. It is very lonely, it is a process that comes and isolates you from friends, from acquaintances, FROM LIFE ITSELF - this is how I perceive it, if you want to do it right. I can start something with enthusiasm and then I go into the process of judging it very strictly and what I liked on Monday, on Tuesday I no longer like. It is a difficult process but in the end it always makes you proud.
Day 238: Make It Work
Tags: hiphop, code, coding, lifelongdev
Published: 2020-10-20 21:20:11

_liner notes_:
- Professional : Got a few things done early and went back to working on a demo for blog post that has been giving me trouble. Still working on it. There are so many ways to do things and options that can be changed and break what you are working on. hahaha Especially when it's a framework and there's so many things that were done for you behind the scenes. I'll make it work though.

- Personal : Got the authorization part working for my side project. It's for the chat functionality. The user types in their username, that goes to the backend where the user is created, then added as a member to the chat room and then a JWT is generated that allows the user access to the chat. Now I just need to work on the chat app itself now that there are users that can use it. Good thing is that I've basically made a chat app for work recently. Shouldn't take too long. I was just too tired last night.

![View from the shore of a lake in Hector Lake, AB, Canada with a forest and mountain range in the distance](https://dev-to-uploads.s3.amazonaws.com/i/6ljrcnflqbrqk9d9tm7a.png)

Going to see if I can get this demo working for my upcoming blog post. I feel like I'm so close. If I can get that working, I'll finish up the chat room for my side project. Back to work.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube pDjdHHWfNYo %}
My #100DOC - Day 55
Tags: 100daysofcode, challenge
Published: 2020-10-20 21:13:09

### Day 55: October 20, 2020

#### **Today's Progress**: 
1. **[Goose game](https://github.com/pablohs1986/gooseGameJava)** (2h):<br>I continued with the UML and started to code.
    
#### **What I learned**: 
* Review of UML design.
+ Review of Java sintax.

#### **Total time**:
2h.
My #100DOC - Day 54
Tags: 100daysofcode, challenge
Published: 2020-10-20 21:11:36

### Day 54: October 19, 2020

#### **Today's Progress**: 
1. **[Goose game](https://github.com/pablohs1986/gooseGameJava)** (1h):<br>I began this course by reviewing Java with the goose game. Today I started to design it with UML.
    
#### **What I learned**: 
* Review of UML design.

#### **Total time**:
1h.
My #100DOC - Day 53
Tags: 100daysofcode, challenge
Published: 2020-10-20 21:11:04

### Day 53: October 18, 2020

#### **Today's Progress**: 
1. **[Redesign of my portfolio](https://github.com/pablohs1986/pablohs1986.github.io)** (2h):<br>I ended the version 5 of my portfolio with some final touches: I added sitemap, robots, license, change blacks to Dracula blacks and merge all to master.
    
#### **What I learned**: 
* Use of merge ours.

#### **Total time**:
2h.