teleren/devto huggingface dataset:
Create a gitignore file with dotnet cli
Tags: dotnet, cli, git, github
Published: 2022-04-05 08:57:27

When I create a new project on GitHub, the first thing that I add in the initial repository is the .gitignore file (often for VisualStudio) and then I copy that file from another solution on my pc and I commit it.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/92mybeq0jx5xui6dwsxa.png)

But time to time, I add some files that I don't want on my repo.
Since a while, I found the perfect solution: create the .gitignore files with the dotnet cli.

## Create the .gitignore with the dotnet cli
Not many people know that the dotnet cli provides a command to create a .gitignore file, practically perfect.

In the root folder of your project, you can launch the command below from your favorite terminal application or from the terminal inside Visual Studio or Visual Studio Code.

```powershell
dotnet new gitignore
```

This command will create a perfect .gitignore in your folder with a lot of settings to ignore unnecessary files, not only for **Visual Studio** but also for **Visual Studio Code** and **JetBrains** products.

You can find the latest version of the file at the official repository.

{% embed https://github.com/github/gitignore/ %}
Weekly 006
Tags: weeklyretro
Published: 2022-04-05 08:56:58

### Monday

I started the morning with a surprise.
I found two books in my mailbox.
I will write the reviews on my blog very soon.

{% embed https://twitter.com/kasuken/status/1508411405715787781 %}

Then, I spent the morning and a lot of time in the afternoon writing some user stories on Azure DevOps for Red Origin.

### Tuesday

Nothing special.
Just debugging stuff and annoying day.

I published a blog post about the tools that I use during live events 🙂

{% embed https://dev.to/kasuken/tools-i-use-for-my-online-sessions-at-events-2ob2 %}

### Wednesday

In the morning I reorganized everything on DevOps about RedOrigin and I moved every Epic and Features in the right sprint.
It’s more easy to trace everything now.

I published a post about a great new feature on Visual Studio 2022: GitHub Copilot.

{% embed https://dev.to/kasuken/getting-started-with-github-copilot-in-visual-studio-2022-54bi %}

At lunch I had a “quick” live on YouTube and LinkedIn with some friends of mine about “The State of JS”.

{% embed https://www.youtube.com/watch?v=f6WAeq26EVI %}

In the afternoon the Microsoft MVP Summit 2022 has started. I watched the keynote about GitHub and other sessions about GitHub stuff related.
The online version is not the same like the live one, but it’s better than nothing.

### Thursday

I created the GitHub organisation for our team: [https://github.com/SWONE-CHCoreTeam](https://github.com/SWONE-CHCoreTeam)

We want to start to make some contributions in the communities and have a central repo for side projects of the team.
One of the first project is a migration from an Azure AD PowerShell module to a full Graph API module orientend.

In the late afternoon I did a meeting with the Oscar Team with an investor.
It’s not easy to speak about a product in only 8 minutes, but Marta did a good job about it.

### Friday

Starting the morning with a sales meeting in the background during debugging session on Red Origin.
I implemented the first version of the “Feature Flags” feature on Red Origin. We can control all the features of the product for the customers, directly from our settings.
Windows Command Prompt Tutorial for Perl 2022
Tags: perl, windows, commandprompt, beginners
Published: 2022-04-05 08:40:27

Explains how to use Windows Command Prompt to run Perl. Command Prompt is a [CLI](https://en.wikipedia.org/wiki/Command-line_interface) tool to run programs on Windows.

This article is originally <a href="https://en.perlzemi.com/blog/20080603121251.html">Windows Command Prompt Tutorial | Perl ABC</a>. 

### Execution of Command Prompt

Let's execute Command Prompt.

"Start Menu" | "Apps" | "Windows System Tools" | "Command Prompt"

![](https://en.perlzemi.com/images/commandprompt/commandprompt.png)

Your home directory is shown on Command Prompt.

<pre>
C:\Users\kimot
</pre>

### Showing File Extensions

The extension of Perl program is "**.pl**". It is useful if extensions of files are displayed.

The way to show file extensions is described in the following page.

[How to Make Windows Show File Extensions](https://www.howtogeek.com/205086/beginner-how-to-make-windows-show-file-extensions/)

### Execution of Notepad

Perl programs are text files. You can create your Perl programs using Notepad.

The way to use Notepad is described in the following page.

[11 ways to start Notepad in Windows](https://www.digitalcitizen.life/start-notepad-windows/)

### Creating Perl Programs

Let's create a Perl program.

Create a file named "start.pl" at your home directory.

<pre>
C:\Users\kimot\start.pl
</pre>

And write the following text.

<pre>
print "Hello World";
</pre>

And save it.

### Runing Perl Programs

You can run your Perl program using **perl** command.

<pre>
perl start.pl
</pre>

The output is:

<pre>
Hello World
</pre>

### Commands of Command Prompt

Intorduce offten used commands of Command Prompt.

#### dir

The "dir" command displays the list of files.

<pre>
dir
</pre>

#### cd

The "cd" command changes the working directory.

<pre>
cd DirectoryName
</pre>

".." is the file name that means the folder one level higher.

<pre>
cd ..
</pre>

#### Changing Drives

You can change drives using "c:" or "d:".

<pre>
c:
d:
</pre>

#### Seeing Command Histories

You can see command histories using "↑" and "↓" keys.

<pre>
↑
↓
</pre>

#### Getting Environment Variables

You can get and show a environment variable as the following.

<pre>
echo %PATH%
</pre>

#### Setting Environment Variable

You can set a environment variable as the following.

<pre>
SET DATE=20080604
</pre>
Real-time monitoring with nats-top
Tags: distributedsystems, tutorial, monitoring
Published: 2022-04-05 08:18:57

In this article, we will take a quick look at [nats-top](https://github.com/nats-io/nats-top) and see how we can use it for monitoring

### What is nats-top?

[nats-top](https://github.com/nats-io/nats-top) is a [top](https://linuxhint.com/top_-command-_linux/)-like tool that provides a dynamic real-time view of a NATS server. This is a great tool for not only sys admins but developers to quickly glance at their NATS server statistics.

### Installation

We can install `nats-top` using go

```
$ go install github.com/nats-io/nats-top@latest
```

Or using the release binaries from [here](https://github.com/nats-io/nats-top/releases)

### Usage

Start the NATS server with the monitoring port enabled

```
$ nats-server -m 8222
```

![https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kihl965iqwako2jg22ul.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kihl965iqwako2jg22ul.gif)

If you’re using the [config](https://docs.nats.io/running-a-nats-service/configuration), then use the `http_port` option

```
http_port: 8222
```

Let’s see how can we use `nats-top`

```
$ nats-top --help

usage: nats-top [-s server] [-m http_port] [-ms https_port] [-n num_connections] [-d delay_secs] [-r max] [-o FILE] [-l DELIMITER] [-sort by]
                [-cert FILE] [-key FILE ][-cacert FILE] [-k] [-b]
```

We can configure our monitoring port, key, cert, and much more! For now, let’s start `nats-top` with default options.

![https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgwynescmamhs71pvtex.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgwynescmamhs71pvtex.gif)

Here we can see some general data such as CPU and memory usage, and input/output bandwidth.

Notice the incredible `msgs/sec` metric? NATS is quite performant!

Now let’s use the [NATS CLI](https://github.com/nats-io/natscli) and do a simple benchmark to generate some publish/subscribe events.

```
$ nats bench test --msgs 10000000 --pub 5 --sub 5
```

![https://dev-to-uploads.s3.amazonaws.com/uploads/articles/heiu6zuy1jveim5ws4o2.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/heiu6zuy1jveim5ws4o2.gif)

Now if we look at the `nats-top` we can see all the real-time info about our messages such as size, host, version, and even the programming language used by the client! Amazing right?

![https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lj57l4ojy325xktl9n2d.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lj57l4ojy325xktl9n2d.gif)

### Conclusion

So in this short article, we looked at how we can use `nats-top` for real-time monitoring. For advanced usage, make sure to explore the [docs](https://docs.nats.io/using-nats/nats-tools/nats_top).  In the next article, we will look at how you can do extensive historical monitoring of NATS clusters with the NATS Surveyor.
Getting Started With Codedamn's Playgrounds
Published: 2022-04-05 08:17:47

> About Codedamn🚀 : Codedamn is an interactive learn-to-code platform where you learn by practicing concepts in-browser on real-world dev environments🧑‍💻.

**Overview**
Ever got stuck in _Tutorial Hell_??, Most of developers goes through this phase while Initially learning to code. to Get rid of the Tutorial Hell you can use **[Codedamn's Playgrounds](https://codedamn.com/playgrounds).** With the Playgrounds Build Awesome Stuff while Learning how to code without ever leaving your browser.
Playground Is a Platform which runs in your browser connected to computers in the cloud🌩. With the Playgrounds code in React, NodeJs or any popular language while learning with the codedamn's different [learning paths]🤓(https://codedamn.com/learning-paths).


#### Getting Started With Playgrounds.
Follow these Simple Steps To get started with Playgrounds

##### 1. First Visit the Playgrounds Page by Clicking [This link](https://codedamn.com/playgrounds)
--------------------------------------------------------------



##### 2. After Clicking the Link Above You will be Redirected to the Playgrounds Home page which Looks like This image💻.

![Playground's Home page Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8jahyq6icvnrav3dk4qa.png)

--------------------------------------------------------------

##### 3.Now You can Select any language in which You want to start coding.👀
--------------------------------------------------------------


##### 4.After Selecting your Preferred you will Be Redirected to the IDE in your browser With The All the Dependencies pre-installed for your Selected language.🚀⚛️

![Playground Img](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bs82214pczcnmk2dxnx.png)

--------------------------------------------------------------


##### 5. After Getting into the IDE You can start the coding And changes will be Reflected live into the secondary(browser Screen) Just like your In-Pc ide.🧑‍💻

![Playground img](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tdpkj2vm3x70rz6qr6h2.png)

--------------------------------------------------------------

 
`Note💡` You can also use all the terminal commands in Playgrounds integrated terminal for example npm/yarn commands for installing any third party packages🤩.
![Playground img](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r035l6syecsf3tznrygs.png)

--------------------------------------------------------------

That's all you basically Need to Know about Getting started with the Playgrounds, It's as simple as that🙌.
[Try it Now 
](https://codedamn.com/playgrounds) 

Thanks for Reading this Article..😊
Today's Fun Joke For Developers - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2022-04-05 08:00:25

---
title: "Today's Fun Joke For Developers - Daily Developer Jokes"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

**Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).**
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125927bb96c.png)

---
*Have a joke idea for a future post? Email **[xtrp@xtrp.io](mailto:xtrp@xtrp.io)** with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
**Q:** Why did the database administrator leave his wife?

**A:** She had one-to-many relationships.
 -->
Best YouTube pages for learn frontend
Tags: css, html, javascript
Published: 2022-04-05 07:19:43

Hello every one today we want introduce you best YouTube channels for learn frontend.


1.[**The Net Ninja** ](https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ayyl914fyjr97x84dzgj.png)

 

2.[**LevelUpTuts**](https://www.youtube.com/channel/UCyU5wkjgQYGRB0hIHMwm2Sg)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ns5ssuyerv3udo5pf3bt.png)
 

3.[**Simplilearn**](https://www.youtube.com/c/SimplilearnOfficial)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4h5s5n49jjikthigcke3.png)

  

4.[**Programming With Pax**](https://www.youtube.com/c/ProgrammingWithPax)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ngzfeduo54ho6ivjjs4h.png)

5.[**Tahmid Ahmed**](https://www.youtube.com/channel/UC6iO-h3n4adFsp3krxznqHg)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2m5totxumajf1omn5jl3.png)
 


6.[**Web Dev Simplified**](https://www.youtube.com/c/WebDevSimplified)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9p69hfta9r9ti7d8fqyw.png)


7.[**Online Tutorials**](https://www.youtube.com/c/OnlineTutorials4Designers)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kz0lcd0rn4s1k1n6k7iq.png)
  

8.[**Easy Tutorials**](https://www.youtube.com/c/EasyTutorialsVideo)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnv70umxafshn5p6344k.png)
 

9.[**Traversy Media**](https://www.youtube.com/c/TraversyMedia)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/scr4c3vp5fo8dslhf1dc.png)
 
10.**[Web dev](https://www.youtube.com/channel/UCZc238wXqeN2M2uXQaY9MEw)**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/slmxlz9alpf6htuiugs9.png)
【152】乘积最大子数组
Published: 2022-04-05 07:05:01

如果你仔细看看题目就应该直到这道题应该用的是DP，思考30分钟后无果，打开题解......

看题解看的一脸懵逼，打开youtube，有人这么解释道：

如果之前的数为10，现在是个5，那肯定取最后结果50

如果之前的数为-10，现在是个-5，那也肯定取最后结果为50

如果之前的结果不乘也没有当前的数大，那肯定最后结果为当前的数10000

![image-20220405145203708](https://gitee.com/li_da_ben_shi/MyPicture/raw/master/img/20220405145211.png)

结果显然，需要前期维护两个数组，maxarr 代表前期pre计算的结果的最大值，minarr 代表前期计算结果的最小值，因为你也无法保证当当前的数是正数还是负数。

鉴于上面的思考，写下下面的代码：

```c++
class Solution {
public:
    int maxProduct(vector<int> &nums) {
        int size = nums.size();
        vector<int> maxarr(size, 0);
        vector<int> minarr(size, 0);
        maxarr[0] = nums[0];
        minarr[0] = nums[0];

        for (int i = 1; i < size; i++) {
            maxarr[i] = max(max(maxarr[i - 1] * nums[i], minarr[i - 1] * nums[i]), nums[i]);
            minarr[i] = min(min(maxarr[i - 1] * nums[i], minarr[i - 1] * nums[i]), nums[i]);
        }
        return *max_element(maxarr.begin(), maxarr.end());
    }
};
```

---

当然这里是可以进行优化的，take less space：

```c++
int size = nums.size();
vector<int> maxarr(size, 0);
vector<int> minarr(size, 0);
maxarr[0] = nums[0];
minarr[0] = nums[0];

int premax = nums[0];
int premin = nums[0];
int maxres = nums[0];

for (int i = 1; i < size; i++) {
    int t = premax;
    premax = max(max(premax * nums[i], premin * nums[i]), nums[i]);
    premin = min(min(t * nums[i], premin * nums[i]), nums[i]);
    maxres = max(maxres, premax);
}
return maxres;
```

---

Thank you!
Using reduce() on an array of objects
Tags: javascript, array, reduce, objects
Published: 2022-04-05 06:56:00

![array of objects](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hsicqb7z4n07xhmhge2b.png)
 Here we have an array of objects labeled arrayOfObjects which holds 3 objects, labeled objectOne, objectTwo, objectThree. Each object holds 1 property labeled propertyOne.

<img>
![array of objects, property values highlighted](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oo5idwafuzjbxe8r0h42.png)
Let’s use the reduce() function to sum all the values of each object’s property, propertyOne. (50 + 60 + 70)
</img>

 
<img>
![reduce method and result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a0en02tbybx2op2ze2g0.png)
But this returns an unexpected result! We got a String concatenation: 
[object Object] + 60 + 70
</img>


<img>
![reduce method and result highlighted](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m5fl2war5b7ocxi51joj.png)
Reduce() requires 2 arguments, the **initialValue** to start with, and the **currentValue** being looked at. But because this is an _array of objects_, the **initial value** is an **object**, so Reduce() doesn’t know how to add this to 60 and 70, which results in the **string concatenation**.
</img>


<img>
![reduce method and result with 3rd argument](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3nlv8gan4a1dgy7l4ljw.png)
But Reduce() takes an optional argument, which comes outside of the callback function and tells Reduce() what **initialValue** to start with, in this case, we use **0**. **currentValue** starts on index 0 and because we’re looking at **currentValue.propertyOne**, will add 50 on the first iteration.
</img>


Now the process has all the same types, Number, and proceeds to sum all values of propertyOne:
0 + 50 + 60 + 70
![correct sum](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kisfnp3xcgny5u8trre6.png)
And console.log now prints the correct sum!
Don’t Cut the User from User Experience
Published: 2022-04-05 06:51:12

<em>In the context of a massive digital transformation of almost any activity, User Experience is a topic of ongoing interest not just in web development and web design, but in way more areas of competences, such as marketing or human resources, and all industries that seek to extend their product portfolio to serve USERS.</em>

Sibiu Web Meetup #17 tackled this topic and left us with some conclusions that we'll share here.

Quality user experience can sometimes be more than just a fluid journey through the software product. There are domains where user experience is crucial, making the difference between success and fail or even life and death, such as in healthcare.

User Experience is a mindset - this is what we could easily conclude when listening to our invitee Andreea, a UX professional on duty.  Why is it important? How to keep it in the web experience at all times and all phases of the development project? How not to lose it from sight during the development process? How to allow the user create his or her own experience in the application or device they use? All answers to these questions revolve around two main concepts: <strong>user research</strong> and <strong>usability testing</strong>.  It is by keeping them in mind and in practice that we can ensure a quality user experience.

But we will let you discover more about all this on your own from the [recording we keep for our subscribers on our Youtube channel](https://www.youtube.com/embed/DZ5-8Q4-KgA).


As for ourselves, we can notice in our development and QA teams that usability testing is gaining the attention and investment needed both from the part of developers and clients. Also, focusing on the user also eliminates conflicts in the team and contrasting personal opinions, because everybody works for the user's benefit.  

<h5>CONNECT WITH US</h5>
Sibiu Web Meetup community is also here:

<a href="https://www.linkedin.com/showcase/sibiuwebmeetup"><img class="alignleft size-full wp-image-11407" src="https://blog.ropardo.ro/wp-content/uploads/2022/01/sibiu-web-meetup-linkedin.png" alt="Sibiu Web Meetup Linkedin" width="200" height="50" /></a>
Importance of digital marketing in India
Tags: digitalmarketing
Published: 2022-04-05 06:23:58

When you are looking to set up a business in India and reach out to your target audience, it is necessary that you consult a professional digital marketing company that can provide you effective services to enhance the prospects of your business. Digital marketing is a booming field in India and this country has got numerous well known companies that offer such services to local, national and international clients. The great thing about digital marketing companies in India is that compared to their western counterparts, they can offer superior quality services and solutions at more affordable rates. It is for this reason that clients from different parts of the world choose to hire the digital marketing services offered by Indian companies.

Over last two decades or so, there has been a major surge of developments in India when it comes to digital marketing solutions. More and more young minds are taking an active interest in this line of work. Numerous academic centers have also opened up across the country that offer training and expertise for people looking to learn everything about digital marketing. There are also steps taken by digital marketing companies to make business owners aware of the benefits of digital marketing so that they can also use this tool to enhance their reach in the market. More and more companies across different niche markets are choosing to use this form of marketing nowadays than ever before. This has also ushered a new era in terms of business promotions and the way people learn about business firms and their products and services before they make a purchasing decision.

The scope of digital marketing has really expanded in India over the last few years and many new companies are entering this field to cater to the growing demand for these services. As business firms realize the way they can benefit from implementing digital marketing, there are now an increased number of companies looking to use digital marketing when they want to target their audience and build a strong online presence. Investing in digital marketing has got many distinct benefits of its own. Not only can it improve the chances of business companies when they are looking to compete aggressively with business rivals, but it can also help them to cater to the needs of their customers both in the local as well as the international markets.

With the development of associated technologies that enable [digital marketing](https://djonictechnologies.com/digital-marketing/) companies to serve their customers in a better way, the scope for this kind of marketing is now at an all time high. The career prospects for digital marketers have also soared higher over the last few years and new companies in this sphere are always coming to the fore. Both large as well as small scale business owners nowadays prefer to benefit from digital marketing. Therefore it can be said that India is perfectly well prepared to use digital marketing to boost its business scene while at the same time cater to the growing needs of the end users.