teleren/devto huggingface dataset:
Thank You For Your Support!
Tags: career, leadership
Published: 2021-11-25 10:56:27

Dear Dev.to Community,

This Thanksgiving, I want to share my genuine appreciation with you. Without you, I would not be where I am today, and I am so thankful for all of your support throughout the year.

Thank you for engaging with me on social media, [reading my books](https://eisabainyo.net/weblog/books/), [leveraging my digital assets](https://app.gumroad.com/eisabai), and entrusting in me to [accelerate your career in tech](https://eisabainyo.net/weblog/).

I hope you have a joyous holiday and I look forward to support you in your career.

You’re welcome to use coupon code **thankyou21** to get 20% off everything on [my online store](https://app.gumroad.com/eisabai). Coupon code valid until November 30, 2021.

All the best,
Isabel
How to Know if two given strings are anagrams in C
Tags: anagrams
Published: 2021-11-25 10:54:46

# What is an Anagram? 

An anagram is a word made by rearranging an original word’s letters to make a new word.

For example, “listen” and “silent” are anagrams of each other because we can create them by rearranging the other’s letters. In other words, the strings contain the same letters, but in a different order.

#Code

We are using the sorting method in the C program below to figure out if two strings are anagrams:

          #include <stdio.h>
          #include <string.h>

          void main () 
          {
             char s1[] = "listen";
             char s2[] = "silent";
             char t;
             int i, j;
             int n  = strlen(s1);
             int n1 = strlen(s2);

             // If both strings are of different length, then we can directly say they are not anagrams
             if( n != n1) 
             {    
                printf("%s and %s are not anagrams! \n", s1, s2);
             }
   
             // Soring both strings −

              for (i = 0; i < n-1; i++) 
             {
                for (j = i+1; j < n; j++) 
                {
                   if (s1[i] > s1[j]) 
                   {
                      t = s1[i];
                      s1[i] = s1[j];
                      s1[j] = t;
                   }
                   if (s2[i] > s2[j]) 
                   {
                      t = s2[i];
                      s2[i] = s2[j];
                      s2[j] = t;
                   }
               }
            }

             // Compare both strings character by character

              for(i = 0; i<n; i++) 
             {
                if(s1[i] != s2[i]) 
                {    
                   printf("Given strings are not anagrams\n");
                }
             }
             printf("Given strings are anagrams!\n");
          }
How to Uninstall a Nvidia Driver Completely in Ubuntu?
Tags: ubuntu
Published: 2021-12-01 08:42:47

---
title: How to Uninstall a Nvidia Driver Completely in Ubuntu?
published: true
date: 2021-11-25 09:46:58 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/how-to-uninstall-a-nvidia-driver-completely-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">nvidia</span><span style="font-size: 1.2em; color: initial;">uninstall</span><span style="font-size: 1.2em; color: initial;">unity</span></p>
</header>

As expected, Nvidia drivers have reduced my customizations. I can’t login to Unity 3D session. I can’t find any content to help me to uninstall the driver and I don’t know what to do as I have never uninstalled them before.

#### Accepted Answer

**For Ubuntu 12.04**

Commands can be executed to terminal. You can open a terminal with <kbd>Ctrl</kbd> + <kbd>Alt</kbd>+<kbd>T</kbd> keys combo.

If you `remove --purge` the nvidia driver you will be OK. No need to blacklist something, but sometimes maybe a force-load of the nouveau module needed.

First uninstall completely the driver.

Search what packages from nvidia you have installed.

```
dpkg -l | grep -i nvidia

```

**except** the package `nvidia-common` all other packages should be purged.

* * *

If you want to be sure that you will purge everything related to nvidia you can give this command

```
sudo apt-get remove --purge '^nvidia-.*'

```

the `.*` in the end means (Purge everything that begins (`^`) with the name `nvidia-`)

**BUT**

above command will also remove the `nvidia-common` package and the `nvidia-common` package has as a dependency the `ubuntu-desktop` package.

So after above command you should also give the installation command for `ubuntu-desktop` package

```
sudo apt-get install ubuntu-desktop

```

Also sometimes the nouveau driver get blacklisted from nvidia driver. With purge command it should UN-blacklisted. If you want to be sure that nouveau will be load in boot, you can force-load it by add it to /etc/modules

```
echo 'nouveau' | sudo tee -a /etc/modules

```

Last , search for the xorg.conf file and remove it as well

```
sudo rm /etc/X11/xorg.conf

```

In summary

```
sudo apt-get remove --purge '^nvidia-.*'
sudo apt-get install ubuntu-desktop
sudo rm /etc/X11/xorg.conf
echo 'nouveau' | sudo tee -a /etc/modules

```

Although all above commands not needed, this is my way to completely purge the nvidia driver and use the open source nounveau.

The post [How to Uninstall a Nvidia Driver Completely in Ubuntu?](https://stackallflow.com/ubuntu/how-to-uninstall-a-nvidia-driver-completely-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
Living in the Shell #2; grep (Pattern Matching) (Part 1)
Tags: productivity, linux, devops, bash
Published: 2021-11-25 10:49:10

## `grep`🎖️

Prints/filters lines that match a [Regular Expression (RE)][re] pattern.

[re]: https://en.wikipedia.org/wiki/Regular_expression

## Filter constant

```sh
echo -n 'Hello World!\nI''m Going!\nGoodbye!' | grep "Good"
```

> ```text
  Goodbye!
  ```

## Filter file content

```sh
cat ~/.bashrc | grep "alias"
```

```sh
grep "alias" ~/.bashrc
```

## Filter pattern, with PERL flavour `-P`

```sh
cat ~/.bashrc | grep -P "^#"
```

> Prints lines beginning with `#`.

## Filter case-insensitive `-i`

```sh
echo -n 'Hello World!\nI''m Going!\nGoodbye!' | grep -i "go"
```

> ```text
  I'm Going!
  Goodbye!
  ```

## Exclude `-v`

```sh
echo -n 'Hello World!\nI''m Going!\nGoodbye!' | grep -i -v "go"
```

> ```text
  Hello World!
  ```
Writing Maintainable Test : Multiple Asserts - Avoid Multiple Asserts
Tags: testing, tdd, unittesting
Published: 2021-11-25 10:48:50

Hello :smile:
Today we continue talking about the advices R. Osherove gives us in his great Book [The Art of Unit Testing](https://www.amazon.fr/Art-Unit-Testing-Roy-Osherove/dp/1617290890) . Today about **Multiple Asserts** we will briefly talk about why _avoid multiple asserts_.


## Multiple Asserts for a case
Indeed we see it sometimes , i would say it's us who creates this in our codebase. But There is two cases , firstly look at the code example ( again from the book :wink:)

```
[Test]
public void CheckVariousSumResultsOgnoringHigherThan1001()
{
   Assert.AreEqual(3, Sum(1001,1,2));
   Assert.AreEqual(3, Sum (1,1001,2));
   Assert.AreEqual(3, Sum (1,2,1001);
}
```
If we have used a tool for unit testing we all know that if the first assert Fails , the others 2 will not be execute. So The two cases will be :point_down: 

### We do not need the outputs of the others asserts
In this case we can just be happy and continue :smile:

### We need the outputs of the others Asserts
This is the case that happens sometimes, because each asserts is testing something different of our use case. So when there is an error we can not find exactly in the small world of our use case where the error happens. :smirk:

### Roy's Think

This is what Roy Says:
>This applies only when you’re asserting on multiple concerns. It wouldn’t hold if you were testing that you got a person with name X, age Y, and so on, because if one assert failed, you wouldn’t care about the others. But this would be a concern if you’re expecting an action to have multiple end results. For example, it should return 3 and change system state. Each one of these is a feature and should work independently of other features


## How To Deal With It 
There is three solutions : 

1. _Create a Separate Test for each assert_.

2. _Use Parameterized Tests_.
If you want to read more about it [parameterized tests](https://www.baeldung.com/parameterized-tests-junit-5)

3. _Use Try...Catch Block_.

The order is in term of usage , the first is better then the second and the second better then the third :smile_cat:.


## What I think about Them 
I do not know if for you it is the same , but me these last days i work thoroughly :weary: on front-end , and for the 2 others solutions it is some kind of hard . So i use everyday the first solution ( **Create Separate Test for Each Assert** ) and it forces me to respect the _Enforcing Test Isolation_ principles.




:smile: Thanks for Reading.
By The Grace of JESUS , in the next article about unit testing , we will talk about another aspect of multiple asserts in a unit test , _comparing objects_.
Best Regards :blush:
Why Is It Bad to Log in as Root in Ubuntu?
Tags: ubuntu
Published: 2021-12-01 08:42:38

---
title: Why Is It Bad to Log in as Root in Ubuntu?
published: true
date: 2021-11-25 09:46:20 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/why-is-it-bad-to-log-in-as-root-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">administrator</span><span style="font-size: 1.2em; color: initial;">root</span><span style="font-size: 1.2em; color: initial;">Security</span><span style="font-size: 1.2em; color: initial;">users</span></p>
</header>

I’ve often come across posts on forums or other websites where you see people joking in such a manner about running/logging in as root as if it’s something awful and _everyone_ ought to know about it. However, there isn’t much that a search reveals on the matter.

It may be widely known to Linux experts, but I really don’t know why. I remember always running as root when I first tried Linux years ago (Redhat and Mandrake) and don’t remember running into any problems because of that.

There are actually some distros that have a bright red background with alert signs all over it as wallpaper for the root user (SuSe?). I still use the “Administrator” account for regular use on my Windows installation and haven’t ever run into any problems there either.

#### Accepted Answer

It defeats the security model that’s been in place for years. Applications are meant to be run with non-administrative security (or as mere mortals) so you have to elevate their privileges to modify the underlying system. For example, you wouldn’t want that recent crash of Rhythmbox to wipe out your entire `/usr` directory due to a bug. Or that vulnerability that was just posted in ProFTPD to allow an attacker to gain a ROOT shell.

It’s just good practice on any operating system to run your applications on a user level and leave administrative tasks to the root user, and only on a per-need basis.

The post [Why Is It Bad to Log in as Root in Ubuntu?](https://stackallflow.com/ubuntu/why-is-it-bad-to-log-in-as-root-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).
Java Programming Language
Tags: programming, java, basics, beginners
Published: 2021-11-25 10:40:58

#About Java 


*Java is one of the most popular and widely used programming languages.*

*Java has been one of the most popular programming languages for many years.*


*Java is Object Oriented. However, it is not considered as pure object-oriented as it provides support for primitive data types (like int, char, etc)*


*The Java codes are first compiled into byte code (machine-independent code). Then the byte code runs on Java Virtual Machine (JVM) regardless of the underlying architecture.*


*Java syntax is similar to C/C++. But Java does not provide low-level programming functionalities like pointers. Also, Java codes are always written in the form of classes and objects.*


*Java is used in all kinds of applications like Mobile Applications (Android is Java-based), desktop applications, web applications, client-server applications, enterprise applications, and many more.*


*When compared with C++, Java codes are generally more maintainable because Java does not allow many things which may lead to bad/inefficient programming if used incorrectly. For example, non-primitives are always references in Java. So we cannot pass large objects (like we can do in C++) to functions, we always pass references in Java. One more example, since there are no pointers, bad memory access is also not possible.*


*When compared with Python, Java kind of fits between C++ and Python. The programs are written in Java typically run faster than corresponding Python programs and slower than C++. Like C++, Java does static type checking, but Python does not.*

#Features of java
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rs1qi988yo045hylml0f.jpg
)

#syntax

// A simple Java program to print "Hello World" 
public class sample { 
    public static void main(String args[]) 
    { 
        System.out.println("Hello World"); 
    } 
}

# Types of Java Applications
There are mainly 4 types of applications that can be created using Java programming:

###1) Standalone Application
Standalone applications are also known as desktop applications or window-based applications. These are traditional software that we need to install on every machine. Examples of standalone application are Media player, antivirus, etc. AWT and Swing are used in Java for creating standalone applications.

###2) Web Application
An application that runs on the server side and creates a dynamic page is called a web application. Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF, etc. technologies are used for creating web applications in Java.

###3) Enterprise Application
An application that is distributed in nature, such as banking applications, etc. is called an enterprise application. It has advantages like high-level security, load balancing, and clustering. In Java, EJB is used for creating enterprise applications.

###4) Mobile Application
An application which is created for mobile devices is called a mobile application. Currently, Android and Java ME are used for creating mobile applications.
Java training online with A2nacademy.com
Tags: javatraining
Published: 2021-11-25 10:29:36

Java is one of the most popular programming languages in the world. It is used to create applications for many operating systems.

<ahref="https://www.a2nacademy.com/course/web-design-course"> web designing course online</a> provides an opportunity for professionals with some programming experience to learn how to create graphical user interfaces, database access programs, and applets.

A Java training course provides a good foundation for understanding fundamental concepts that are needed to work with java at professional level.

Java is a programming language that is used for developing a huge range of applications and programs. It was originally developed by James Gosling in 1991 at Sun Microsystems.

It can be used to create everything from simple games to large-scale business applications, and the best way to learn it is through the right instruction. There are many sources of training available, but an online java course might be your best bet if you have a busy schedule.

In this article, we will cover what you need to know about Java before starting your journey towards becoming an expert programmer. We will also discuss all the pros and cons of taking an online java course versus going through a university class or teaching yourself from books.

Online java training courses are best for people who wants to learn java quickly and don't have time to go to a classroom.

There is a lot of demand for Java-related courses online especially the ones that offer certification.

Online java courses are most popular with learners who can't make it to a classroom due to their work or family commitments.
Get Current Route Name Path in Laravel
Tags: php, laravel, beginners, programming
Published: 2021-11-25 10:16:07

see the following code to get the current route name in Laravel blade view :-
resources/views/test.blade.php
```php
@php
   $route = Route::current()->getName();
@endphp
{{ $route }} //test
```
I hope you enjoy the code.
The Ultimate PowerShell Terminal Guide
Tags: bash, tutorial, linux, github
Published: 2021-11-25 10:10:24

Thanks to Scott Hanselman, my terminal looks fabulous, and it's not only the looks but also the productivity.

You can find the whole guide on his blog (quick guide):
https://www.hanselman.com/blog/my-ultimate-powershell-prompt-with-oh-my-posh-and-the-windows-terminal

Also, there's around one hour video with details - including mistakes which I though was great for learning from such a great teacher and expert - on YouTube:

{% youtube VT2L1SXFq9U %}

This is how my terminal looks like now :

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

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

YouTube : https://www.youtube.com/channel/UC7EVSn5inapL20oPSwAwEUg
Facebook : https://www.facebook.com/bekbrace​​​​
Twitter : https://twitter.com/BekBrace
Instagram : https://www.instagram.com/bek_brace/
GitHub profile : https://github.com/BekBrace
Website : https://bekbrace.com

Enjoy !
Get a full stack development certification course with A2Nacademy.com
Tags: fullstackdevelopment
Published: 2021-11-25 10:09:19

A full stack developer is a person who can handle both front-end and back-end development.

A lot of companies are now hiring for roles that require a full stack developer because companies need to deliver the best possible software and apps.

The <ahref="https://www.a2nacademy.com/course/web-design-course">learn web designing course online</a> will teach you how to use different programming languages like CSS, SQL, PHP and JavaScript, as well as frameworks like Node.js, React, AngularJS or Bootstrap 4.

The course will teach you how to integrate backend with frontend technologies.

You will learn how to work with databases such as SQL Server and MySQL as well as with APIs like Google Maps API or Facebook Graph API.

The course also teaches you about server security and debugging your code plus the skills needed for deployment on cloud platforms such as Heroku or Amazon Web.

Full stack development is a new, emerging field that can help graduates to understand how software development process works.

The need for full stack developers is rapidly increasing in today's job market. According to recent findings, the demand for software engineers who specialize in both front-end and back-end coding has surpassed the demand for specialized developers in front-end or back-end.

Today, most students want full stack development course because they are able to do everything themselves and don't need to rely on other departments. It means less dependency on other teams and easier access to markets.

A full stack developer is an individual who has knowledge of all layers in the software stack. They understand and can develop for both front-end and back-end technologies.

The demand for this kind of developers has been increasing in recent years, as they are now considered as a must-have skill to have by many companies. It's also a great career option for those who want to be able to work with Python and JavaScript at the same time.

This degree is perfect, as it provides high quality course materials, hands-on projects, and expert instructors with actual industry experience.
Newsletter to subscribe to
Tags: productivity, webdev, beginners, javascript
Published: 2021-11-25 10:04:50

Being in a fast-paced industry,  we need to update our skills to stay relevant to perform our jobs better(to get a better salary). For me, having a short attention span is a challenge; one minute, I'm watching a YouTube tutorial, next, I'm watching random nonsense internet content. Therefore, I find subscribing to weekly newsletters a concise way to learn new things without too many distractions and information overflow.

**Here are some on my list:**

### [React News Letter](https://reactnewsletter.com/)
> Stay up to date on the latest React news, tutorials, resources, and more. Delivered every Tuesday, for free.

Since developing React applications are my bread and butter, this is a must for me. _If you're working on another language, there's likely a newsletter for that._

### [Bytes](https://bytes.dev?x=1095221753)
#### Become a smarter JavaScript developer
> Staying informed on the JavaScript ecosystem has never been so entertaining. Delivered every Monday, for free.

Aside from providing JavaScript updates, what I like most about this newsletter is its sense of humor.

Just check this one. :D
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ictwlpdad4k44atvqel.png" />

### [DEV Community Digest](https://dev.to/settings/notifications)
By enabling a newsletter in your settings, you will receive a weekly newsletter of a list of development-related topics that you might find interesting. You even have the option to send a periodic digest of top posts related to tags you prefer.

### [TLDR](https://messaged.com/tldr/)
#### Byte sized news for busy techies
> TLDR is a daily newsletter with links and TLDRs of the most interesting stories in tech 📱, science 🚀, and coding 💻!

What I like about `TLDR` is that it summarizes daily news so that I will not quickly get bored. If I want more details regarding specific information, I can check simply the link they provide.

### [3-2-1 Thursday](https://jamesclear.com/3-2-1/refer?rh_ref=e281bada) By James Clear
#### Author of Atomic Habits

Don't forget that we are humans(except for the bot crawling this page). To succeed as a developer, we need a balance of technical skills and soft skills. You don't want to behave like an animal during stand-up or become a keyboard warrior when addressing a Pull Request comment.

### Any thoughts?
What do you think would be an excellent addition to the list?
How to remove the background from your video automatically and without a green screen?
Tags: tutorial, programming, beginners, background
Published: 2021-11-25 10:03:44

You can remove the background from your video totally for free on the [BgRem website](https://bgrem.deelvin.com/). You are not required to possess special knowledge in video editing – artificial intelligence will remove the background quickly and without a green screen.

The video editing takes 3 steps:

### Step 1: Upload your video file to the BgRem Website:
![the main screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8itxpn9tu0ylnlasfw5p.png)

### Step 2: Choose your video background from an extended library or upload your background:

![the editing process screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iquyiz712w2xqzhaqlg1.png)

### Step 3: Download your video result:

![save the result screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kzgdfkhokx5gir3gn20t.png)

There is no watermark in a free version, the original soundtrack remains after editing, and you get an HD video as a result. In addition, BgRem supports extensive variety of formats, such as: .mp4, .mov, .ts, .avi, .mkv, .webm, .mpg.  The maximum length of the uploaded clip is 30 seconds, that is optimal for social media posts. 

If your video lasts more than 30 seconds, there is a “Pro” tariff – it allows you to upload videos of unlimited length and size. The price begins at 1$ per 1 minute. 

There is a free BgRem application you can find on the App Store. Application users will have an opportunity to remove the background not just from their videos, but from their photos. And it’s worth trying out – because that is the only app on the App Store that can remove the background automatically and without a green screen.