teleren/devto huggingface dataset:
Sometimes It's The Details
Tags: blazor, dotnet, programming, codenewbie
Published: 2021-04-07 23:03:21

Sometimes switching to a new language or framework doesn't mean that you have to make a vast shift in your thinking. In almost every language the concepts are the same it's just the syntax that people get hung up on.

I've been using JavaScript, (specifically React), daily for like 4 years and I've grown accustomed to the "loosey" nature of JavaScript.

For example,

```
let disabled = true;

if(disabled){
  // you can just do this.
}
```

You're relying on the fact that `disabled` can be either true or falsey. So you don't have to check disabled for `null` **and** `undefined` **and** `false` **and** `empty`, etc.

In most languages you have to make those checks explicit.

```
if (disabled != null && disabled != true && TypeOf(disabled) == bool)
```

So learning the quirks of your particular language is the real trick. Loops work the same **conceptually** in almost every language.

Thanks for reading and that's all y'all.
Those who are afraid to look dumb, always remain so
Tags: career, journey, advice
Published: 2021-04-07 22:30:07

---
title: Those who are afraid to look dumb, always remain so
published: true
description: Bytes of Wisdom is a new project by Sam Jarman that brings together snippets of advice for software engineers
tags: career, journey, advice
//cover_image: https://direct_url_to_image.jpg
---
## Bytes of Wisdom: Day 40

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

Challenging yourself to be better is incredibly important in software and incredibly important for your own growth. You will make mistakes, you will feel shame and embarrassment but that's always a good thing - it means you're learning. Repeated mistakes are bad, but new ones are usually full of opportunity.


Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!

You can catch up with all the other bytes at http://bytesofwisdom.com/
#NikemaLearns About AWS – #2 A Milestone Met!
Tags: learninpublic, aws, cloud
Published: 2021-04-07 21:38:37

I really wanted to finish my video course before writing this blog post, and *spoiler alert* I did it!

I finished the course and took my second practice exam today. I didn't get a passing score (69.23%, so close), but I did improve since the first attempt.

This will be a short blog post. The work I've done in the last two weeks isn't the kind of work that I have much to say about. In preparation for today's blog, I made sure to finish the course, set up the repo for notes, and I randomly had the idea to recap the lessons from the course using video ([transcript here](https://aws.nikema.dev/learning-path-aws-certified-cloud-practitioner-1-e-by-richard-a.-jones/module-1-cloud-concepts/video-recap-of-lesson-1)).

At least now the stage is set. I expect that my next post will be more interesting.

{% youtube nPMmrA2LTuY%}

The last thing I want to say is video is hard, but that's okay. We can do hard things! I'm looking forward to feeling more confident on video and more secure in my knowledge of cloud fundamentals. I'll get there, it's just a matter of investing the time and effort to do so.

### Next Steps
- Continue to work on converting handwritten notes to typed notes at https://aws.nikema.dev
- Start working through AWS Certified Cloud Practitioner (CLF-C01) Cert Guide on O'Reilly Learning
- Take practice tests at least weekly. Keep taking them until I am consistently exceeding 70% correct answers
- Once I start consistently passing the practice exams, schedule the real thing.

Thanks for being along on this learning path with me. See you in a few weeks!
What in the CWverse?
Published: 2021-04-07 19:50:02

I'd heard from others that the JavaScript project, and indeed, JavaScript itself was the most challenging part of the Flatiron curriculum, and now I truly believe it.

Aside from the challenges that arise when learning a new language and learning how to get that language to display what you know you can create in your head, it has been an extraordinarily tough year. Getting this far for me has been a hard-fought battle, and I can only keep looking towards the finish line and what the future has in store.

This project was both familiar to me in terms of using Rails as the backend and implementing some similar setups, and completely new in learning how to dynamically make changes to a web page. 

The challenges that I faced:

- Getting familiar and comfortable writing with a new syntax
- Working on this project in the midst of a COVID outbreak at work and its lasting effects
- Understanding how the backend and frontend talk to each other
- Rendering things outside of a static index.html
Youtube To MP3 😍
Tags: javascript, html, 100daysofcode, programming
Published: 2021-04-07 21:18:01

youtube to mp3 app using html5, css3 &javascript 😍🎉

Demo : 
https://youtube-mp3.netlify.app/

Code :
https://github.com/saidMounaim/100DaysOfCode/tree/main/Day50

Check my #100DaysOfCode challenge 😍

https://github.com/saidMounaim/100DaysOfCode
Self-Studying Advice from CodeNewbie Community
Tags: forem, codenewbie, beginners, productivity
Published: 2021-04-07 20:57:29

---
title: Self-Studying Advice from CodeNewbie Community
published: true
description: 
tags: forem, codenewbie, beginners, productivity
series: Best Reads Across the Forem Ecosystem
---

I came across a great post on the [CodeNewbie Community](https://community.codenewbie.org).

## **["Self-studying 101: Advice From a Self-Taught Dev”](https://community.codenewbie.org/httpspauline/self-studying-101-advice-from-a-self-taught-dev-2io2)**

If you're a newbie in deep need of self-teaching tips, or just feel like you need to improve on this skills, I highly recommend this post.

Reminder that the CodeNewbie community is a space entirely dedicated to newbie success. It's built DEV's open source software [Forem](https://github.com/forem/forem) but posts and comments are moderated explicitly with newbies in mind. Check it out if you want a second space to hang out.

_Note: We're getting closer to getting Forem Open Source project to general availability with versioned releases for anyone who wants to host a Forem. Stay tuned._

#### 🌱
Some Elixir katas - Pt 3
Tags: elixir, kata, algorithms
Published: 2021-04-07 20:24:08

So let's get started for this 6kyu kata -- I hope I'll do a 5kyu next time.

The gist of this Kata is pretty simple, we've got a list of numbers, and we have to find which one appears an odd number of times.

```elixir
    FindOdd.find([20,1,-1,2,-2,3,3,5,5,1,2,4,20,4,-1,-2,5]) # 5
    FindOdd.find([1,1,2,-2,5,2,4,4,-1,-2,5]) # -1
    FindOdd.find([10]) # 10
```

That's pretty straight forward and when I've read it I knew I was going to use `Enum.reduce`, it's not the only way to achieve it obviously but that's what comes in my mind.

As usual I'll also share another solution at the end of this post.

```elixir
defmodule FindOdd do
    def find([]), do: []
    def find([x]), do: x
    def find(list), do: list
end
```

So I've choose to use function clauses over multiples private function being called by the `find` one.

With these 3 clauses all cases are covered.

I want to create a `Map` where the key is the number in the list and the value is the number of times we encounter it, like this `%{10: 1}`.

Hence the `Map` I want to use, the shape of my data will looks like this `{x, y}`, and because I do not really care of the number of times at the end, it's going to be much like this `{x, _}`.

```elixir
def find(list) do
    {x, _} = 
        list
        |> Enum.reduce(%{}, fn x, acc -> Map.update(acc, x, 1, &(&1 + 1))end)
        |> Enum.find(fn {_,y} -> rem(y, 2) == 1 end)
    x
end
```

Let's analyze this bit by bit.

I take the list and pass it to the `Enum.reduce/3` function.
The first argument is the list itself, the second is where I want to accumulate the data and the third is the lambda.

If `x` is present in map with value of `1`, `&(&1 + 1)` is invoked with argument `1` and its result is used as the new value of `x` in my `acc` which is a `Map`.

I could have decoupled it but for the sake of simplicity and because it's not really the topic of this post I'll keep it like this.

So once I've got my reduced `Map` I still need to find where it's odd, and as I said earlier, it's explicitly told that there's only one odd value.
I just need to find in my `Map` -- a map implements the protocol Enumerable so I can call `Enum` module functions on my `Map` -- with the help of `Enum.find`, which takes the `Enum` and a lambda.

Here I just pass `y` because it's the value I want to get the reminder of.
The `Kernel.rem/2` or just `rem` function gives us back the reminder of the division, also named the modulo, and I want to it to equal to 1 when `x` is divided by 2.

After this, I just need to return `x` et voila.

It was a really simple problem, and because it is simple there's a tons of way to solve it.

My favorite is this *almost* one liner function.

```elixir
defmodule FindOdd do
  import Bitwise
  def find(list), do: Enum.reduce(list, &Bitwise.bxor/2)
end
```

The usage of `bitwise` operators is a field where I do not really perform so well, I recall having used it for solving a problem on Codewars too in a JS kata.
It will maybe be part of a future blog post!

Thanks for reading and happy coding.
Short Python Problem
Tags: python, beginners
Published: 2021-04-07 20:22:04

I was also struggling whit this one... didn´t really search for any help tho.
Source: https://codingbat.com/prob/p129125
 ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2h4o1vprf9op7guvt54f.jpg)
What's New in Codesphere Version 1.7.0
Tags: changelog, webdev, programming, typescript
Published: 2021-04-07 19:58:56

>We have exciting news.. we read your feedback and listened, we just released v1.7.0 as the latest version of Codesphere!

##What's new? 
###Features
* We added GitHub integration support
* We added ESlint code assistance

###Fixes
✓ We improved overall sign-up and sign-in process

In addition, our team is currently working on allowing users to sign in with third-party accounts like GitHub and Google to ensure that our users can get started with Codesphere as quickly as possible. We will be adding more frameworks and soon you will be able to connect your own domain and so much more. Stay tuned for future releases!

Happy Coding!
JavaScript assignments - 1
Tags: begginer, javascript
Published: 2021-04-07 19:36:41

---
title: JavaScript assignments - 1
published: true
description: Practicing Javascript
tags: begginer, javascript
//cover_image: https://direct_url_to_image.jpg
---
In this series of blog posts I will write simple JavaScript assignments and solutions for them.

Main purpose of this posts is to practice JavaScript and develop problem solving thinking.

If you have a another solution, please write it in the comment.


**Here is the first task:**

1. Write a program to check two numbers and return true if one of the numbers is 100 or if the sum of the two numbers is 100 */

```const checkTwoNum = (a, b) => {
  if (a === 100 || b === 100 || (a + b) === 100) {
    return true;
  } else {
    return false;
  }
};
//console.log(checkTwoNum(10,90));```
Improving Your Communication Skills for Effective Leadership - Communication Skills Evaluation
Tags: leadership, communicationskills, effectiveleadership, communication
Published: 2021-04-07 19:10:34

Learning effective communication skills is an essential process that allows you to express yourself and foster your personal and professional relationships. Knowing how to communicate in meetings with your team as a manager will help you express yourself at best and cultivate team growth. Years back from now, The Conference Board of Canada developed a program that lists the skills that a manager or employee must possess to succeed in the workplace. Set various criteria for  communication skill evaluation to fasten the development program. 

Want to communicate proficiently? 

These tips will help you improves your communication skills and avoid misunderstanding. Through great communication skills evaluation, one can understand the real meaning of what is being communicated and greatly strengthen your role as a manager and your teamwork. 

##Read, Follow and Improve Communication Skills 

These are some specific things to do that can improve your communication skills as a leader. Likewise, communication skill evaluation can be done with these practices. 

Let’s dive in!

###Listen, Listen, and Listen!

Employees in your team want acknowledgement that they are being valued and heard by top level managers. The best skill leader possess is that they listen to what subordinates are saying, instead of thinking of the best answer. 

Communication skills evaluation of your team and of yourself as a leader can determine how you all clarifies things to avoid misunderstanding. Listen attentively without dividing the attention—the team with a great listening leader fosters more than another team. If you want to improve yourself as a leader, then work on your communication skill. 

###Be Brief, Yet Specific

One of the factors of Communication skill evaluation is how well you can convey your message as a leader. Practice being specific enough with a brief discussion. Provide enough information for the person to understand clearly what you are trying to say. 

###Maintain a Professional and Positive Attitude

Even when you are speaking with individual or couple of team member smile because its give grandeur of positive attitude and the other person will know it as it is shining throughout you. A professional and positive communication style can lighten the conversation, and others can easily understand your message and respond positively. 

###Think Before You Speak

Always think before you speak. As a leader of your team, your words can have a great impact. Take a moment and pay attention to what to say and how to convey your message. This is the key communication skill evaluation factor one should possess to avoid misunderstanding and avoid the situation where your words are interpreted negatively. 

Communicating effectively and professionally is a teachable skill. Look into communication skill evaluation and learn what is required to have better communication skills.
How to insert a code before location / block? 
Tags: nginx, wordpress
Published: 2021-04-07 18:58:58

Hi everyone, I am very new to nginx environment. I have installed WP CMS on my nginx server. Secondly, I am trying to hide the platform from cms detection so the WordPress hiding plugin wants me to manually rewrite the nginx.conf files and insert a rewrite code before the location / block of the configuration file.

Now usually the nginx.cinf files is location at /etc/nginx/sites-available/
however, in my case it under at /www/server/nginx/conf .

But the problem is there are two files of the configuration 1. nginx.conf and 2. nginx.conf.default

when I open the conf.default file, it has a location / block where I can easily insert the code but since this is not the active configuration file I am forced to look into the existing nginx.conf file and insert code before any Location / block.

but this doesn’t help the plugin to verify the rewrite rules.

I am fairly a noob at this and require anyone with prior experience help solve this issue to verify the rewrite rules and further.

Here is the link to my nginx.conf file if it helps
(https://pastebin.com/W7gxi9dQ)
How to insert a code before location / block?
Tags: nginx, wordpress
Published: 2021-04-07 18:56:00

Hi everyone, I am very new to nginx environment. I have installed WP CMS on my nginx server. Secondly, i am trying to hide the platform from cms detection so the wordpress hiding plugin wants me to manually rewrite the nginx.conf files and insert a rewrite code before the location / block of the configuration file.

Now usually the nginx.cinf files is location at /etc/nginx/sites-available/
however, in my case it under at /www/server/nginx/conf .

But the problem is there are two files of the configuration 1. nginx.conf and 2. nginx.conf.default

when I open the conf.default file it has a location / block where I can easily insert the code but since this is not the active configuration file I am forced to look into the existing nginx.conf file and insert code before any Location / block.

but this doesn’t help the plugin to verify the rewrite rules.

I am fairly a noob at this and require anyone with prior experience help solve this issue to verify the rewrite rules and further.

Here is the link to my nginx.conf file if it helps
(https://pastebin.com/W7gxi9dQ)
Welcome Thread - v119
Tags: welcome
Published: 2021-04-07 18:38:29

---
title: Welcome Thread - v119
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![Spiderman hi](https://media.giphy.com/media/QYkX9IMHthYn0Y3pcG/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
CSS Clip Path
Tags: css, webdev, tutorial
Published: 2021-04-07 18:31:21

CSS Clip Path for 'clipping mask' style effects

Part 10 of the 21 CSS tips for 2021 Series

[Subscribe To The Channel!](http://www.youtube.com/FollowAndrew?sub_confirmation=1)

{% youtube rGuB76xdHa0 %}
Watch the Video Tutorial on YouTube for a visual explanation!
April 2021 Releases – Horizon 27.1.1, Meridians 2018.1.27, 2019.1.18, and 2020.1.7
Tags: news, cve, horizon, jetty
Published: 2021-04-20 14:50:12

---
title: April 2021 Releases – Horizon 27.1.1, Meridians 2018.1.27, 2019.1.18, and 2020.1.7
published: true
cover_image: https://pbs.twimg.com/media/EyeHKgHXAAAS8cz?format=jpg&name=large
date: 2021-04-07 18:27:26 UTC
tags: News,CVE,Horizon,jetty
canonical_url: https://www.opennms.com/en/blog/2021-04-07-april-2021-releases-horizon-27-1-1-meridians-2018-1-27-2019-1-18-and-2020-1-7/?utm_source=rss&utm_medium=rss&utm_campaign=april-2021-releases-horizon-27-1-1-meridians-2018-1-27-2019-1-18-and-2020-1-7
---

In April, we released updates to all OpenNMS versions under active support.

### Horizon 27.1.1

Release 27.1.1 contains a few enhancements, as well as a number of bug fixes including some XSS and CSRF cleanups and a Jetty DoS CVE.

The codename for 27.1.1 is [_Infinite Improbability Drive_](https://hitchhikers.fandom.com/wiki/Infinite_Improbability_Drive).

For a high-level overview of what has changed in Horizon 27, see [What’s New in OpenNMS Horizon 27](https://docs.opennms.org/opennms/releases/27.1.1/releasenotes/releasenotes.html#releasenotes-27).

For a complete list of changes in 27.1.1, see [the detailed release notes](https://docs.opennms.org/opennms/releases/27.1.1/releasenotes/releasenotes.html#_release_27_1_1).

### Meridian Releases

Meridian 2018.1.27 was a small release, with just the Jetty CVE update and a new option for tuning Minion communication with OpenNMS.

Meridian 2019.1.18 added on top of that a number of other useful bug fixes including some cosmetic UI cleanups and a fix to Kafka producer resource naming.

Meridian 2020.1.7 contains all of those changes, plus a few other bug fixes and a performance improvement in the Kafka producer.

For a list of changes, see the release notes:

- [2018.1.27](https://meridian.opennms.com/releasenotes/2018/latest/#_release_meridian_2018_1_27) ([_Volocano_](https://wikipedia.org/wiki/Volcano))
- [2019.1.18](https://meridian.opennms.com/releasenotes/2019/latest/#_release_meridian_2019_1_18) ([_Quaoar_](https://wikipedia.org/wiki/50000_Quaoar))
- [2020.1.7](https://meridian.opennms.com/releasenotes/2020/latest/#_release_meridian_2020_1_7) ([_Firth_](https://wikipedia.org/wiki/Firth))
Google I/O 2021 ! (May 18-21)
Tags: news, google
Published: 2021-04-07 18:08:01

The CEO of Google just announced **Google I/O 2021**.
Date of the event : **May 18-21**.

{% twitter 1379850658694635521 %}

Online and totaly free !

[See the website](https://events.google.com/io/)
Convert a document to Image - Set horizontal and vertical resolutions
Published: 2021-04-07 17:57:46

You can convert a file (e.g. Word, PDF, HTML) to and image format, such as, Tiff, Tif, Jpg, Jpeg, Png, Gig, Bmp, Ico, Psd, Wmf, Emf, Dcm, Webp, Dng, Svg, Jp2, Odg, J2c, J2k, Jpx, Jpf, Jpm, Eps, Cgm, Cdr, Cmx, Dib, Jpc, Jls, DjVu and set the output/resultant image's vertical and horizontal resolutions as follows:
```csharp
string outputFileTemplate = Path.Combine("c:\output", "converted-page-{0}.png");
SavePageStream getPageStream = page => new FileStream(string.Format(outputFileTemplate, page), FileMode.Create);
using (Converter converter = new Converter("sample.pdf"))
{
    ImageConvertOptions options = new ImageConvertOptions
    {
        Format = ImageFileType.Png,
        HorizontalResolution = 300,
        VerticalResolution = 100
    };
    
    converter.Convert(getPageStream, options);
}
Jpeg
```

There are a lot of other options that [API](https://products.groupdocs.com/conversion/) provides such as setting flip mode, grayscale. For more details, have a look at this [article](https://docs.groupdocs.com/conversion/net/convert-to-image-with-advanced-options/).
Starting Bug bounty
Published: 2021-04-07 17:49:06

### Starting bug bounty as beginner

I have been practicing cyber security related stuff for an year now. 
Initially started to learn from few courses on Udemy and then started doing some machines on Hack the box for practice. Initially it was really difficult as I had zero knowledge about tools and the methodology involved in it. Starting 3 months were the most crucial as I almost wanted to give up since it was so annoyingly difficult but somehow managed to pull through and made some real progress. I started practicing on different platforms in order to learn and participated in CTF as they were so much fun (not initially though). 

So now I have decided to start bug bounty, though I don't expect to be stok straight away but gotta try hard.

Today is day 1 of my bug bounty journey.

Found a suitable target and started looking for something interesting, although I was literally sweating since I didn't want to break any laws and get in trouble. It took me a while to know what programs, scope and priority mean but I know them now.

Haven't found anything interesting but I am gonna keep looking for my first bug.

***Don't de dumb on the internet.***
Wednesday Links - Edition 2021-04-07
Tags: java, jvm, maven, kotlin
Published: 2021-04-07 17:34:16

Google wins in Supreme Court with Oracle 🏛
https://twitter.com/errcraft/status/1379116652025892866

Maven internals 🔬
https://blog.soebes.de/blog/2021/04/05/maven-plugin-configuration/

Microsoft strengthen JVM support 🥳
https://devblogs.microsoft.com/java/announcing-preview-of-microsoft-build-of-openjdk/

JVM 16 is no longer so dynamic 🧨
https://blog.frankel.ch/changing-field-type-recent-jdks/

Ki: new interactive shell for Kotlin 🎮
https://blog.jetbrains.com/kotlin/2021/04/ki-the-next-interactive-shell-for-kotlin/

Run your swing app in browser 📽
https://blog.jetbrains.com/blog/2021/03/11/projector-is-out/

SQL Server can deadlock 😱
https://vladmihalcea.com/sql-server-deadlock-trace-flags/