teleren/devto huggingface dataset:
Building Your First API with Asp.Net Core
Tags: api, tutorial, dotnet, programming
Published: 2021-03-15 14:10:13

This is an introduction to a series of posts I am writing. The series describes how to build an API with ASP.Net Core. The series' purpose is to help me while I learn new technologies and to share what I learn with others.

I believe I have a unique perspective to share. You see, I've been a developer for a long time, but I haven't kept up with technology trends over the past several years. I am now starting a journey to refresh my skillset. In this series, I will apply all I've learned as a "maintenance developer" to today's newer frameworks and technologies, like ASP.Net Core, git, Azure, security, and many more. 

My learning tool will be an API I created, and loving call, "Mural". You can find information about Mural [here](https://dev.to/pdelcogliano/a-reference-application-for-building-your-first-api-with-asp-net-core-dl9). 

Mural is a simple API that creates short URLs from deep links. I intend to apply today's best practices to Mural to create a full feature, secure, scalable, and cloud-ready API. You can download Mural from [my GitHub](https://github.com/pdelcogliano) and follow along my journey with me.
Ser o bom, ou ser bom?!
Tags: resiliencia, reflexoes, mantra
Published: 2021-03-15 14:02:33

Passei muito tempo sem usar o Twitter, numa certa ocasião voltei, dai encontrei um tweet que deveria ser o Mantra diário:

- "Não perca a vida tentando ganhar"
- "Quem muito abraça, pouco aperta"
- "Se não está a seu alcance de resolver, não tem porque se estressar"
- "O tempo não volta, aproveite-o com sabedoria"

Analisando o todo, veio algo complementar a mente: 

> ser a diferença ou apenas ser mais um?!

Ta ai, uma lista que deveria ser reflexão diária.

Sobre redes sociais, a vida mostrou que precisaria ter apenas básico para comunicação e que deveria viver.

Sucesso, paz e bem a todos \o)
Automating LVM using Python
Published: 2021-03-15 13:55:25

## Logical volume management
Logical volume management (LVM) is a form of storage virtualization that offers system administrators a more flexible approach to managing disk storage space than traditional partitioning. The goal of LVM is to facilitate managing the sometimes conflicting storage needs of multiple end users.

## What is LVM used for?
 It is a system of managing logical volumes, or filesystems, that is much more advanced and flexible than the traditional method of partitioning a disk into one or more segments and formatting that partition with a filesystem.

**Github link for the code to automate Lvm using Python**
[Link](https://github.com/simranquirky/AutomateLVM-ArthTask7)

You can run this piece of code anywhere (be it local OS or Cloud system) by doing the following steps

Open the command prompt and run

1. yum install git -y (the git software needs to be installed in order to download the code from github)

2. git clone https://github.com/simranquirky/AutomateLVM-ArthTask7.git (This will download the repository to your system)

3. you can comfirm the successful download of the repository by running 'ls' command , which will show the folder AutomateLVM-ArthTask7

4. cd AutomateLVM-ArthTask7/ (to change to the folder to start working)

5. chmod +x run.sh (to make the bash script executable)

6. ./run.sh (to run the script so that it can configure the environment needed and automatically run the code for you)
🇺🇸 Cybersecurity Lessons from Capitol Riot
Tags: cybersecurity, security, capitol
Published: 2021-03-15 13:39:48

The Capitol riot on January 6 was a dangerous moment on multiple levels, not least of which were the cybersecurity ramifications. The Capitol’s information infrastructure — laptops, documents, phones — were all in the hands of rioters for several hours. In one case, a woman allegedly stole a laptop or hard drive from Speaker of the House Nancy Pelosi’s office, though the woman eventually turned herself in to law enforcement.

The potential exposure of sensitive government information — especially coming on the heels of the devastating SolarWinds hack — is inspiring business leaders to examine their own cybersecurity vulnerabilities.

Many are asking: What would I do if my company’s tech was lost, stolen, or tampered with? How would we mitigate the damage from compromised hardware?

To start addressing those questions, it’s important to understand how a physical breach (of your offices or of your hardware) can have digital implications. Here are some of the cybersecurity lessons from the Capitol riot and how to protect your company in such an event.

[Read more](https://auth0.com/blog/cybersecurity-lessons-from-capitol-riot/?utm_source=content_synd&utm_medium=sc&utm_campaign=cybersec)
9 Key Points about Passwords
Tags: cybersecurity, security, hacking, pentest
Published: 2021-03-15 13:33:52

Passwords!!! It's the Holy Grail of computer security. 🙈

{% youtube __z2IZ3v5Tk %}

---

Everyone would like to get rid of it. 🚮
Everyone always has a revolutionary idea to do without it. 💡
But, when we look at the facts, we are still forced to use them on a daily basis. 👨🏼‍💻

That's why, it's important to follow some best practices, as passwords and credentials theft are a national sport among hackers. 🤺
However, a human being does not have a brain designed to remember tens (hundreds 🤔) of complicated passwords with upper and lower case letters, numbers and special characters.

Also, many problems occur due to little human error.
In the computer world, it is often said that the problem lies between the chair and the keyboard. 😄

In this video, I go back in detail, with key examples, to the essential points that allow you to avoid making stupid mistakes that could threaten your digital security.

Feel free to tell me in the comments if you have any other points that you use to protect yourself.

---

*If you like this content, push the like button, that helps spread the message.* 👍🏼
*If you think it can be useful to anyone in your network, share it.* 📨

---

Video produced by [Wild & Secure](https://wildnsecure.com), your consulting firm to all things security and real estate.
If you want to receive weekly quality content about security, subscribe to our newsletter [on our website](https://wildnsecure.com/contact).
Those Days
Published: 2021-03-15 13:32:42

By : Sayoni Roy

You know those days
Those days where you're sad for no reason
Those days where your body is heavy
And it looks like everyone else except you is busy and fierce
My feet won't set off, though it seems like I'm already too late
I'm hateful of the whole world
Yeah, here and there are click-clacking speed bumps
My heart grows crumpled and my words lessen
Why the hell? I ran so hard
Oh why to me
Come home and lie in bed
Thinking if it was my fault?
Dizzy night, looking at the clock
Soon it will be midnight
Will something be different?
It won't be something like that
But this day will be over
When the minute and second hands overlap
The world holds its breath for a little while
Zero o’clock
What is SQL?
Tags: sql, sqlserver
Published: 2021-03-15 13:28:40

A structured query language (SQL) is a language that is used to operate relational databases. Some of the major ways in which SQL is used in conjunction with a relational database is for the purposes of storing, retrieving, and manipulating data stored in a relational database. 
Are you interested in learning SQL? Then check out the <a href="https://intellipaat.com/microsoft-sql-server-certification-training/">SQL certification</a> from Intellipaat to get yourself certified.

Why use SQL?

SQL is nearly 45 years old software and is still in usage in the IT industry as a database language. It's still one of the widely used software among tech professionals.
The reason to use SQL is simple - it is easy to learn and use.
It is unique and is tested for heavy usage even by big corporations like Facebook.
Strong community support as it is open-sourced.
The benefits outweigh the age of SQL and that is the reason this database language is still one of the most popular languages that are in existence today.

What should I Know before learning SQL?

No need to learn anything before starting SQL. It's a query language similar to the English language. So, anyone who can use English at a basic level can learn and write SQL queries easily. The good thing is that most Database engines are compatible with the SQL code.
Realistic Red Switch (Pure CSS)
Tags: codepen, webdev, css, html
Published: 2021-03-15 13:27:37

This is my attempt at making a realistic switch using CSS only. I'm using multiple CSS techniques here, including gradients, 3D transformations, animations, and transitions.

Making realistic 3D elements in CSS is kind of like making a very low-poly version of a high-poly model. In this example, I made the button out of 3 "polygons" (3 divs) that are all at 90 degrees from each other (creating like a square U shape).

Interested in a tutorial on how I made this? Let me know!

{% codepen https://codepen.io/ykadosh/pen/ExNOmZx %}

This pen is based on this beautiful Dribbble shot by Voicu Apostol <a href="https://dribbble.com/shots/14172039-3D-Red-Switch" target="_blank">https://dribbble.com/shots/14172039-3D-Red-Switch</a>
New webMethods.io Integration Enablement Series available on YouTube
Tags: integration, video, training, webmethods
Published: 2021-03-17 14:03:56

---
title: New webMethods.io Integration Enablement Series available on YouTube
published: true
date: 2021-03-15 13:21:23 UTC
tags: #integration, #video, #training, #webmethods
canonical_url: https://tech.forums.softwareag.com/t/new-webmethods-io-integration-enablement-series-available-on-youtube/239714
---

We are happy to announce the launch of the **[webMethods.io](http://webMethods.io) Integration Enablement Series** to help developers and citizen integrators get started quickly and make best use of our platform.

In this series of short (3-5 min), easy-to-understand videos you will learn about [webMethods.io](http://webMethods.io) Integration features, utilities, terminology, use cases, tips & tricks and much more.

**[webMethods.io](http://webMethods.io) Integration Enablement Series** is available for free on YouTube. **[Watch it now](https://www.youtube.com/playlist?list=PL3HwmrSYjxiOSBXu9OqiOmcresQDCk9Xg)**, leave us a comment and subscribe to stay tuned on updates.
 
{% youtube DbSlg_i0UQg %}


[Read full topic](https://tech.forums.softwareag.com/t/new-webmethods-io-integration-enablement-series-available-on-youtube/239714)
Create Modern Navigation Bar with logo using HTML, CSS, and Bootstrap
Tags: html, css, javascript, webdev
Published: 2021-03-15 13:14:28

We have seen navigation bars or top navbars in almost every website and the navbar is one of the basic things which makes the website attractive and more user-friendly (easily navigatable). The navigation bar can be of different types and different styles.

# What is Navigation Bar?
The navigation bar is a UI element in the website which contains links to other sections of the same website or another website. In maximum websites, the navigation bar is displayed on almost every page of the website but this can differ.

In most websites, the navigation bar is mostly displayed as a horizontal list of links (link to different parts of the website) at the top of every page styled in such a way that it perfectly fits into the website design.

The navigation bar contains the website logo and other navigation options and a search bar too.

In this tutorial, we will learn how to create a simple Horizontal Navigation Bar for any website in few simple steps by just using HTML, CSS, and some Bootstrap.

{% youtube ZMW1e7PwA8M %}

Although in most of the cases the navigation bar is placed horizontally at the starting of the webpage(on top), in some cases, a horizontal navigation bar may not fit the website design, so in this type of case, we create a vertical navigation bar on the left side or right side of the website. This type of vertical navigation bar is also called a sidebar, as it appears on the side of the main content. Some websites have both a horizontal navigation bar at the top and a vertical navigation bar on the left or right side of each website.

Many other websites use a horizontal navigation bar for desktop view and a vertical navigation bar for the mobile view of their websites.


Download Source Code: [Click Here {Google Drive}](https://drive.google.com/file/d/1W6NWvOe3wWEPkMmwJOG9OSCZskVTrtlr/view?usp=sharing)

Watch Video Tutorial: [Click Here {YouTube}](https://youtu.be/ZMW1e7PwA8M)
what other ci/cds can do this?
Tags: discuss
Published: 2021-03-15 13:14:16

---
title: what other ci/cds can do this?
published: true
description: 
tags: #discuss
//cover_image: https://direct_url_to_image.jpg
---

So, I was going through a few CI/CD alternatives since Gitlab was down for quite a while today and 2nd time this week so wanted to have a fallback runner for the same. 

I came across [buddy.works](https://buddy.works/) and I kinda like it but then the memory is kinda limiting on the free plan and the actual reason I chose buddy was that it allows maintaining a mirror of the repository and I can push to it's remote to trigger a build but the it failed on all the builds due to memory limitations and I was thinking if there's other CI/CDs that provide this kind of functionality where I can push a mirror repo to the service. 

It can be a self hosted solution as well
Short Read: Domain Model vs View Model?
Tags: csharp, dotnet, beginners
Published: 2021-03-15 13:08:20

I have been learning C# and ASP.NET recently and came across this idea of Domain Model vs View Model.

I used to think that, as an example one single User model, is used from data layer to the presentation layer. However, in some cases, you might want to have different attributes for the User model in presentation layer and the data layer. 

A common example would be, in a Sign up form (presentation layer), you might want to have these three attributes for User model: Username, Password and RePassword(Re-enter your password). In the database, we do not want to store RePassword attribute, and therefore we would use a different User model for database which only contains Username and Password.

You could define the method to retrieve User data in User services layer, and then map the retrieved User attributes that you want to the View User Model.

Let's make another simple example.

We have an Employee model defined in Domain layer:
```csharp
public class Employee
    {
        public int Id { get; set; }
        [Required]
        public string EmployeeNo { get; set; }
        [Required]
        public string FirstName { get; set; }
 
        public string MiddleName { get; set; }
        [Required]
        public string LastName { get; set; }

        public string FullName { get; set; }   
    }
```
This Employee model is mapped to ApplicationDbContext, which is how our Employees information are stored in the database.

We need a method from Service Layer to retrieve this Employee context from ApplicationDbContext.

```csharp
public class EmployeeService : IEmployeeService
    {
        private readonly ApplicationDbContext _context;
        public EmployeeService(ApplicationDbContext context)
        {
            _context = context;
        }
        
        public IEnumerable<Employee> GetAll()=>_context.Employees;
    }

```
In our presentation layer, we define an Employee Controller to handle the mapping from Domain Employee model to View Employee model.

```csharp
public class EmployeeController : Controller
    {
        // bring the employee service in
        private readonly IEmployeeService _employeeService;
        public EmployeeController(IEmployeeService employeeService)
        {
            _employeeService = employeeService;
        }

        public IActionResult Index()
        {
            // Do the mapping, in this case I only want a few attributes to be in View Employee model
            var employees = _employeeService.GetAll().Select(employee => new EmployeeViewIndexModel
            {
                Id = employee.Id,
                EmployeeNo = employee.EmployeeNo,
                FullName = employee.FullName,
            }).ToList();
            return View(employees);
        }
    }

```

Appreciate if any of you would like to elaborate some use cases of independent View Model from Domain Model in the comment section below.

Cheers.

**Do follow me for more future articles on web design, programming and self-improvement** 😊
Hiding a Keyboard in Swift
Tags: ios, mobile, swift
Published: 2021-03-15 12:59:36

---
title: Hiding a Keyboard in Swift
published: true
description: Code to hide a keyboard when user taps elsewhere
tags: [ ios, mobile, swift ]
canonical_url: https://thomasstep.com/blog/hiding-a-keyboard-in-swift
---

[I've been working on developing an iOS 14 app in my free time lately](https://thomasstep.dev/blog/i-built-and-published-an-iphone-app), and the other day I wanted to create a `TextField` to receive input from the user. I needed a number, so [I changed the `keyboardType` to `numberPad` and added some validation logic](URL FOR KEYPAD POST). Everything was fairly easy to set up especially considering I have never developed on iOS before or written code in objective C. Then came the doozy. Whenever I tapped on something other than the `TextField`, nothing happened. I expected the keyboard to go away but it didn't want to budge. Every app I have ever used had this behavior, so I assumed that it was the built-in default behavior. I was wrong. I went down rabbit hole after rabbit hole trying to figure out how to hide the keyboard. Most of the problems I encountered were due to blog posts and StackOverflow answers referring to earlier versions of iOS, and since I was developing for iOS 14, all of my code and views were written differently. (Again, I have never developed for iOS before. It is very well possible that I am completely wrong and I could have solved this much quicker with any of the other snippets out on the internet.) It turns out that the behavior of hiding a keyboard when a `TextField` becomes unfocused is not natively built into Swift. The alternative that I ended up going with was extending `View` with a function that sends an action to `resignFirstResponder`. Then I added `onTapGesture` to a view that encompassed the screen where the keyboard showed up and called the function as a result. The whole process is still a little weird to me, but it has started to make more sense the more I look at it. Here's an example of the code.
```swift
#if canImport(UIKit)
extension View {
    func hideKeyboard() -> Void {
        UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
    }
}
#endif

struct ContentView: View {
  @State private var myInput : String = ""

  var body: some View {
    ScrollView {
      TextField("Demo text field", text: $myInput)
          .multilineTextAlignment(.center)
          .textFieldStyle(RoundedBorderTextFieldStyle())
          .keyboardType(.numberPad)
    }
    .onTapGesture(count: 1, perform: self.hideKeyboard)
  }
}
```

I think the key here for me is that `ScrollView` takes up the entire screen of my app, so when I added the listener, if the user tapped anywhere else on the screen, they would experience the desired behavior. Since this is not natively built into Swift, I have to assume that there is no standard way of doing this. Not using this behavior as a default seems like a huge oversight to me, and I wish there was an Apple-approved way of writing in this behavior.
Sky Hub New Server On Discord
Tags: news
Published: 2021-03-15 12:44:17

Update: 14/03/21
We're excited to announce we're moving our chat to Discord for an improved chatting experience.

Rocket.Chat has been good to us, but we've outgrown it in recent weeks.
Fully optimized for desktop and mobile devices, our new server with Discord will enhance your Sky Hub community experience.
You can use it via web browser but the desktop / mobile apps offer the best experience .
Click the invite link below to join the server:
https://lnkd.in/gwmhPRx
Stuck among slides
Published: 2021-03-15 12:41:40

`
//föra bilderna fram och tillbaka

//Funktion för att aktivera bildspelet

function runSlideshow(){
    let intervalId = setInterval(function () {
        //Alla bilderna
        let slideshowImages = document.querySelectorAll("#slideshow img");
        //Sista bilden
        let lastImage = slideshowImages[slideshowImages.length-1];
       console.log("Tona ut bilden", lastImage);
      let opacity =1;
       let fadeOutId = setInterval(function () {
           lastImage.style.opacity = opacity;
           if (opacity>0) {
               opacity-=0.01;
           } else {
               clearInterval(fadeOutId);
               opacity = 1;
           }
       },1000/60);
    },5000);
    return intervalId;
    function FadeOut(moveImage){
        image.style
    }
   
};
runSlideshow();
runFadeout();
runMoveImage();


function moveImage(image){
    image.remove();
    slideshow.prepend(image);
};
Stuck again I can't get my slideshow to go around It doesn't fade correctly and all three pics don't rotate. Any suggestion?? I do have text to my slides but the text doesn't fade away either.
 `
Today I learned about the Box Model and Positioning elements
Tags: html, css, webdev
Published: 2021-03-15 12:36:09

Here's my HTML code.
```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Positioning</title>
    <link rel="stylesheet" href="./style.css" />
  </head>

  <body>
    <div class="box box-four"></div>
    <div class="boxes">
      <div class="box box-one"></div>
      <div class="box box-two"></div>
      <div class="box box-three"></div>
    </div>
  </body>
</html>
```
Here's my CSS code.
```CSS
.boxes {
  border: 3px solid lightcoral;
}
.box {
  width: 5rem;
  height: 5rem;
}
.box-one {
  background-color: lightgreen;
}
.box-two {
  background-color: black;
}
.box-three {
  background-color: blue;
}
.box-four {
  background-color: orange;
  position: relative;
  left: 20rem;
  top: 10rem;
}
```
Here's the output
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u6nhvcg4l2q9r1r8in02.jpg)
Mechanical Soup Vs. Proxies API
Published: 2021-03-15 12:27:49

The world of web scraping is varied and complex, and Proxies API sits at one of the most crucial junctions. They are allowing web scrapers/crawlers to bypass IP blocks by using a single API endpoint to access our 20 million-plus high-speed proxies on rotation.
One of the questions we get frequently is how we are different from services like OctoParse or Diffbot. Many times it is like comparing Apples and Oranges. Still, when we send this comparison table to our customer's developer team, their CXO, their marketing, or SEO team, they typically get it quite quickly if we are a convenient service or not.

So here is how we are different from Mechanical Soup.

Mechanical soup is a super simple library that helps you scrape, store and pass cookies, submit forms, etc. but it doesn't support Javascript rendering.

Here is an example of submitting a form and scraping the results on Duck Duck Go
Code Review 💪
Tags: codereview, career, discuss, opensource
Published: 2021-03-15 12:05:30

I have been writing #Angular since version 2 and always been one of the more senior devs on the team, what this hasn't allowed for was someone better than myself to review and give feedback on my code. This is what makes OSS so powerful!

With that I started to wonder are people in this same situation? All this time thinking their code is pretty good but never really getting better?

Does anyone know of a way to skill up by PR?

What is the best review you have received that makes you want to grow more?