teleren/devto huggingface dataset:
Sample Blog 3
Published: 2022-03-29 14:52:51

This article discusses why you should avoid `rm` command in `*nix` based operating systems. It is impossible to prevent it entirely since you will need to delete files/folders from your system. But it is generally a good idea to move the files/folders you want to delete to a recycle bin and then delete them after some time. I will also share the script and modification I used to adopt this setup.

But before diving in those of you unfamiliar with `rm`, it is a command used to remove objects such as files, directories, symbolic links, etc. More precisely, `rm` removes reference/pointer to objects from the filesystem. If you have multiple pointers to the file (hard links), then deleting one of those pointers with `rm` leaves the others completely untouched and the data still available. Deleting all of those links still does not touch the data; however, the OS is now free to reuse the previously reserved blocks for storing that data.

It is important to note that the command works silently, and once you delete your files and folders, you won't be able to get them back. At least easily. You can find various "undelete" utilities. But depending on the filesystem, it can get relatively complex.

So I use a custom script that sends it to a recycle bin instead of deleting anything directly. Depending upon your OS, you may or may not have a recycle bin. If you don't have one, you can always make one.

last line
How to Increase Ahrefs Domain Rating
Tags: seo, ahrefs, wordpress, blogging
Published: 2022-03-29 14:46:12

Nothing worked like this ever. I have tried link-building and internal linking, and even created banner ads that got attention of major search engines. But nothing worked like this what I did in just 3-4 days that resulted in increase of Ahrefs' domain rating from 19 to 22 and also gained real search rankings.

Here is what I did.. 

## Find Blog Post Title

I managed to find 200 easy to rank keywords and phrases. If you ask me what keyword research tool to find easy to rank keywords. Honestly I did not use any keyword search tools. The niche was such that I was smart enough to generate 240 titles for my blog posts.

## Write Blog Post Content

I wrote 240 blog posts of 200-300 words each. I published them in one go with my secret tool. I knew these post content were not good to read so I added more content and structured the post content using links, lists, headings. 

## Submit Your Latest XML Sitemap 

I submitted the latest XML sitemap to Google only. But you should also submit to other search engines too, like Bing.

## Wait & Watch

After 2 days, I started getting clicks from Google search engine and I can see that increasing everyday in my Google Search Console Performance. 

## Keep Optimizing Your Content

Since these posts have almost thin content, I keep added relevant content to these 240 blog posts. 

## Ready to Help You

For generous business and individuals, I am readily available to help.
在Heroku一鍵架Ubuntu並用noVNC連進去
Published: 2022-03-29 13:10:32

更多會員限定文章可以到[patreon觀看](https://www.patreon.com/wade3c)

-----

可以用現成的Dockerfile會更快 (包含一鍵佈署)

> [https://github.com/xstriver/heroku-vnc](https://github.com/xstriver/heroku-vnc)

如果想要修改Ubuntu內含的套件可以直接去Dockerfile內加

## File Structue

- app.json & Dockerfile是給heroku用的
- 其他conf和sh檔是為了讓heroku啟動後直接用xfce4 + 桌面有chrome捷徑
- docker-compose.yaml是在本機時可以使用

### Xfce4

如果喜歡xfce4 style, Dockerfile最後幾行的設定要保留

```other
RUN echo xfce4-session >~/.xsession
RUN echo "exec /etc/X11/Xsession /usr/bin/xfce4-session"
```

### GNOME

理論上把xfce4相關的給去掉後就會是預設的Ubuntu介面了

但要去掉的有點太多，之後::會開新的repo::

## noVNC

預設是沒有密碼的 (目前這版的noVNC大概是兩年前了)

> 由於新版把websockify獨立出去，所以啟動方式有改

![image.png](https://res.craft.do/user/full/71bea674-0503-893e-0a7a-91e236797ff9/doc/256c53f6-cc1d-4e90-9fb3-a37b49963c1d/b21861e1-f263-4eb0-860a-68e7546d3c0c)

沒有密碼的可以直接按下connect

![image.png](https://res.craft.do/user/full/71bea674-0503-893e-0a7a-91e236797ff9/doc/256c53f6-cc1d-4e90-9fb3-a37b49963c1d/465b1bfa-d69a-4f4f-843c-b04585681c78)

由於免費版的會重開機，所以每次重啟都會回到初始化
Sample Blog 2
Published: 2022-03-29 14:43:55

This article discusses why you should avoid `rm` command in `*nix` based operating systems. It is impossible to prevent it entirely since you will need to delete files/folders from your system. But it is generally a good idea to move the files/folders you want to delete to a recycle bin and then delete them after some time. I will also share the script and modification I used to adopt this setup.

But before diving in those of you unfamiliar with `rm`, it is a command used to remove objects such as files, directories, symbolic links, etc. More precisely, `rm` removes reference/pointer to objects from the filesystem. If you have multiple pointers to the file (hard links), then deleting one of those pointers with `rm` leaves the others completely untouched and the data still available. Deleting all of those links still does not touch the data; however, the OS is now free to reuse the previously reserved blocks for storing that data.

It is important to note that the command works silently, and once you delete your files and folders, you won't be able to get them back. At least easily. You can find various "undelete" utilities. But depending on the filesystem, it can get relatively complex.

So I use a custom script that sends it to a recycle bin instead of deleting anything directly. Depending upon your OS, you may or may not have a recycle bin. If you don't have one, you can always make one.

last line
Why Chakra-UI is your secret lover... Stop denying it
Published: 2022-03-29 14:38:21

Chakra-UI is a modern component library for react created by Segun adebayo. It comes with accessible, reusable, and composable React components that you need to build front-end applications.

Chakra-UI uses Emotion and Styled System. Style systems are great kinds of infrastructure that can be used to build a UI component library. They make so many things much easier.

A great note is that Chakra-UI is typescript friendly and ready for any react app.

#CREATE-REACT-APP EXAMPLE
```

import React from 'react';
import {
  Button
} from '@chakra-ui/react';
import customTheme from "./customTheme";

const App = () => {
  return (
      <Button colorScheme="facebook" leftIcon={<FaFacebook />}>
    Facebook
  </Button>
  );
}

```
#TYPESCRIPT EXAMPLE
```
import React from 'react';
import { Box } from 'react';

type props = {
   message: string;
};

const flexSettings = {
    flex: "1",
    minW: "300px",
    textAlign: "center",
    color: "white",
    mx: "6",
    mb: "6"
} as const; 

const Message = ({message}: props) => {
   
   return (
     <Box {...flexSettings}>
        {message}
     </Box>
   )
}
```
STYLED-COMPONENT EXAMPLE USING CHAKRA-UI
```
import {chakra} from '@chakra-ui/react';

const Card = chakra("div", {
   baseStyle: {
    h: '300px',
    w: '300px',
    rounded: "sm",
    shadow: "lg",
   }
})

...
<Card>
 hello there
</Card>
```
Splash Screen on Gatsby JS
Tags: gatsby, splashscreen, react, javascript
Published: 2022-03-29 11:47:26

If you embark on the problem to add splash screen to your gatsby website you are in the right place. I myself was trying to add splash screen to a website and had to go a lot a forums but couldn't find much of a solution in one place after finding some pieces here and there finally done that. 

You let me tell you how did it 

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


So first find a cool GIF you want to add as splash screen then add loader code, so what loader does is wrap up the image and add id which is really important as we wanted to target that loader further on.

src/loader.js
```javascript
import React from "react";
import styled from "styled-components";
import BCTLoader from "../../assets/gif/BCTloader.gif";

const Loader = () => {
  return (
    <LoaderWrapper id="loader-wrapper">
      <img src={BCTLoader} alt="GIF Image" />
    </LoaderWrapper>
  );
};
export default Loader;

```
then add some css to it, I like working with styled components feel free to do it with simple css

```javascript
const LoaderWrapper = styled.div`
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffff;
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;

  img {
    width: 20vw;
  }
`;

```

Add that to your layout file if you have any if you don't have that please make one so we can have a wrapper for all the pages as we don't have centralised piece like react so we probably need to add that.

src/layout.js
```javascript
import React from "react";
import Header from "./Navbar";
import Footer from "./Footer";
import Loader from "./Loader";

const Layout = ({ children }) => {
  return (
    <>
      <Header />
      <main>{children}</main>
      <Footer />
      <Loader />
    </>
  );
};

export default Layout;
```

Now when you are done with it we can work with gatsby-brower so we can have access to initial rendering  

gatsby-browser.js
```javascript

export const onClientEntry = () => {
  setTimeout(() => {
    if (document.getElementById("loader-wrapper")) {
      document.getElementById("loader-wrapper").style.display = "flex";
    }
  }, 0);
};

export const onInitialClientRender = () => {
  setTimeout(() => {
    if (document.getElementById("loader-wrapper")) {
      document.getElementById("loader-wrapper").style.display = "flex";
    }
  }, 0);
};

export const onRouteUpdate = () => {
  setTimeout(() => {
    if (document.getElementById("loader-wrapper")) {
      document.getElementById("loader-wrapper").style.display = "none";
    }
  }, 3500);
};

```
 That's it! Now you would have a cool looking splash screen for your app
feel free leave any comments 🙂.
Chytrids
Tags: programming, news, webdev, mobile
Published: 2022-03-29 14:22:24

My own self made programming language coming out in 4 months, there will be pre releases soon, follow me on twitter and GitHub for more updates

1. Will be Simple
2. Will be using a compiler
3. Will be Object Oriented
4. Will be fast
5. Will use the idea of Rust
Using FaceID in C# without Xamarin or Maui
Tags: javascript, webdev, mobile, programming
Published: 2022-03-29 14:08:46

Build and test hybrid applications in real-time using Wisej Mobile in C# and Visual Studio.
![Wisej Mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tem0pkhs5mvy394tm95m.png) 
[Video](https://www.linkedin.com/feed/update/urn:li:activity:6914567891879120896)
Let's split and count
Tags: programm, javascript, discuss
Published: 2022-03-29 14:01:53

Given a string of letters and we have to find the number of times the string can be splitted in such a way that atleast one the splitted string have equal number of occurance of `x` and `y`. 
****
Example:
Let's say string is `ayxbx`. So possible case are:
- `a` and `yxbx`
- `ay` and `xbx`
- `ayx` and `bx`
- `ayxb` and `x`

Out of these possible cases only 2nd case (`ay` and `xbx`) does not satisfy the condition.(`ay` has 1 'y's and 0 'x's, xbx` has 0 'y's and 2 'x's).

****

#### My Approach:
- Split and count
````javascript
function getCount (str){
    let strLength = str.length;
    if(strLength < 2){
        return 0;
    }
    let count = 0,
        firstStringLettersCount = { x: 0, y:0 },
        secondStringLettersCount = { x: 0, y:0 };
        
    for(let i = 0; i < strLength; i++){
        secondStringLettersCount[str[i]] += 1;
    }
    
    for(let i = 0; i < strLength-1 ; i++){
        firstStringLettersCount[str[i]] += 1;
        secondStringLettersCount[str[i]] -= 1;
        if(
            firstStringLettersCount['x'] === firstStringLettersCount['y'] ||
            secondStringLettersCount['x'] === secondStringLettersCount['y']
        ){
            count++;
        }
    }
    return count;
}
````
Install Elm for OpenBSD x86_64
Tags: elm, openbsd, cabal, haskell
Published: 2022-03-29 13:31:37

## What?

Just some quick steps to compile Elm for OpenBSD on amd64 based chips since the official distribution does not support OpenBSD yet.

## How?

Get OpenBSD installed and run these commands as root:

```bash
pkg_add git
pkg_add cabal-install

git clone https://github.com/elm/compiler.git
cd compiler
git checkout 0.19.1

rm worker/elm.cabal
cabal new-update
cabal new-configure
cabal new-build
```

Wait for a while and the binary should be hopefully at `compiler/dist-newstyle/build/x86_64-openbsd/ghc-*/elm-0.19.1/x/elm/build/elm/elm`

> **IMPORTANT:** Please ensure you have at least 4 gigas RAM memory available for the compilation to work

## Who?

As always a big thank you to Evan Czaplicki and the wonderful people creating and maintaining Elm.

Some references compilation optimizations may be found at https://github.com/elm/compiler/blob/0.19.1/installers/linux/Dockerfile and https://gist.github.com/rlefevre/1523f47e75310e28eee243c9c5651ac9

> For learning more about Elm please go to [Elm The Complete Guide](https://www.udemy.com/course/elm-the-complete-guide/?referralCode=C7120849E19E4866E9C3)
IT program that can be useful in Future
Published: 2022-03-29 13:08:16

**NETWORK & SECURITY
**
If you want to know more about the world of IT, you should start with Network Security. You’ll need a Network+ certification or higher, which is available from CompTIA. You can get this certificate either by taking their exam and paying the exam fee, or by attending a training class and then taking and paying for their test. Regardless of how you go about it, it’s not very expensive — think of it as an investment in your future.

This blog post will teach you all about what needs to be done to achieve optimization when it comes to your IT department's network security. We'll take a look at the different elements that you should be considering and much more.

http://www.wikihow.com/Become-an-Information-Technology-Manager


**DATABASE ADMINISTRATION
**
The type of database you should work with depends upon your needs and budget, but diving into Postgre SQL, which is open source and free for most uses, will allow you to learn what works best for your organization – and at no cost to your company’s bottom line. This database works across multiple platforms, which means that it can easily integrate with other applications in the future if needed.

https://www.rpgcodex.net/forums/index.php?threads/information-technology-programs-undergrad-and-masters.163551/

https://www.thebalancecareers.com/information-technology-certification-courses-1419227


**WEB DEVELOPMENT
**
Coding for the [web](https://deepmaterialit.com/) is one of the newest, hottest fields to work in – and one of the most prevalent to boot! If you’re interested in learning new skills and don’t mind wearing a lot of hats, a career as a front end developer or back end engineer could be a great fit for you.

https://www.tutsplus.com/series/web-development-tutorials/fundamentals-of-html5-css3/step-by-step-guide-to-learning-html5/


**DATABASE MANAGEMENT
**
Although it’s not exactly a certification, it’s still important to know what types of databases that you should be working with on a day to day basis. The end game for this is always easy – to establish efficient practices for your company and make sure that the data is secure.
The beauty & power of Java
Tags: java, programming
Published: 2022-03-29 13:05:21

3 years back when I started learning programming, I thought of Java has a old fast grandpa, but after 2.5 years I have learned it's power, it's scalability, it's speed, it's cross platform abilities, how good it is for mobile development, backend development.

I know realise Java is not a old fast grandpa, it is a fast powerful legend.
The Powerful CSS not Selector
Tags: css, selectors, webdev, tutorial
Published: 2022-03-29 12:56:38

[This article was originally posted on my personal blog.](https://braydoncoyer.dev/blog/the-powerful-css-not-selector)

The `:not()` CSS selector is a powerful addition to the pseudo-class toolbelt, allowing you to select elements that are omitted by its argument.

## A basic :not() CSS Selector Example

Here’s an example. I have a few classes set up - one applies base styles for all buttons, one sets the styles of a primary button, and another determines what a primary disabled button should look like.


>📢 I’m using SCSS in the example below to gain the benefit of class nesting and variables, but the application of the `:not()` selector is the same.


```scss
.button {
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  cursor: pointer;
	margin-top: 1rem;
}

.button--primary {
  background: $button--primary;
  color: white;
}

.button--disabled {
  background: $button--disabled;
  cursor: auto;
}
```

{% codepen https://codepen.io/braydoncoyer/pen/KKZmNJa %}


In order to align with accessibility, it’s important that the background of the button changes when in `hover` state. That’s simple enough; here’s the change.

```scss
.button--primary:hover {
  background: $button-primary-hover;
}
```

But, after adding the `:hover` selector, we run into a problem. Try hovering over the disabled button and notice that the background changes as if we were hovering over an active primary button.

{% codepen https://codepen.io/braydoncoyer/pen/dyJWOBr %}

How do we get around this? The `:not()` selector makes this an easy fix, allowing the change to only affect primary buttons that are *not* disabled!

```scss
.button--primary:hover:not(.button--disabled) {
  background: $button-primary-hover;
}
```

{% codepen https://codepen.io/braydoncoyer/pen/JjMNbgm %}


>📢 Instead of using a class to determine if the button is disabled, I could have opted to use the `:disabled` attribute. I think the examples above are a bit easier to follow.


## Browser Compatibility for the :not Selector

Thankfully, the `:not()` selector is supported by most major browsers. 

Check out [caniuse.com](https://caniuse.com/css-not-sel-list) to see the exceptions.

## Conclusion

In this article, we briefly discussed the `:not()` selector and saw a real-world example. A variety of options open up when using this selector - what applications can you think of?
JAVA vs Kotlin Programming Language
Published: 2022-03-29 12:36:17

Are you looking to take your coding skills to the next level? Either you’re a beginner who wants to learn how to code in Kotlin, or a developer who wants an update on the current Java programming language. If so, then read this blog post to get all the facts about these two languages and why one might better suit your project.

Kotlin is a relatively new language that was introduced by Google back in 2010. It can be used as both an object-oriented and functional programming language - two styles that are very popular at the moment. This means it can be used in either web or mobile projects, which is perfect for startups since starting off with fewer resources has always been easier than creating from scratch.

Java already had these two languages in its repertoire, so the release of Kotlin was not a big surprise. However, Kotlin is different from Java in several ways. Therefore, if you are looking for more information about this language and its use with the JVM then this article can help you.

**WHAT IS KOTLIN?
**
Before we get into the details of why Kotlin might be better than Java, let's briefly learn about this new programming language. It was initially developed by JetBrains - a company that specializes in developing tools for developers - and is available on Android as well as other platforms like Linux and Mac OS X. This means that it works with any application that has been created using a .Net Framework.

Kotlin is a statically-typed and object-oriented programming language. This means that it can be used for [applications](https://deepmaterialpt.com/) of the following types:

web applications,

Android apps, and

web services.

Some advantages of Kotlin include:

it has an intuitive type system; its type safety allows for code refactoring, providing code analysis warnings about potential bugs before they occur; it also comes with a number of functional constructs such as extension functions; and its simple syntax makes it easy to read and understand. This enables it to act as a sort of middle ground between Java’s verbosity and Scala’s complexity - a major benefit especially for beginners.

Because it is based on Java, Kotlin can be easily integrated with Oracle's Java Virtual Machine (JVM). This means that you don’t need to pick a framework before starting your project. It also allows Kotlin to reuse a lot of the existing code that has already been written.

Speaking of which .NET developers will recognize a lot of similarities between Kotlin and Scala. In fact, it’s so similar that there are several open source projects currently being developed for the purpose of converting Scala to Kotlin. This means that you can create new applications using both Kotlin and Scala at the same time even if they use different platforms like .Net and Android respectively.
Community Building
Tags: devops, react, python, kubernetes
Published: 2022-03-29 12:31:48

We are extremely excited to announce the official launch of TruStacks! Our goal is to enable software teams to quickly adopt modern application development through industry standard DevSecOps tools and developer workflows.

We want the dev community involved in this initiative to help create code ready pipelines and transform the way organizations develop software. Stay tuned for more info and we look forward to connecting with you :)

https://cornerstonets.io/trustacks/
Learn Software Architecture with C#10
Tags: csharp, architecture, programming, tutorial
Published: 2022-03-29 12:30:15

We have published books on 

Software Architecture with C#10 .NET 6 Third Edition
Typical ASP.NET Core 6 Design Patterns Guide 2nd Edition.


We are giving a chance to read and review the book. If interested drop me a mail on royluisr@packt.com or send me a request on https://www.linkedin.com/in/royluis-rodrigues-66479123/
How Big Companies Heir?
Published: 2022-03-29 12:19:33

Some of the most recognizable companies in the world are considered to be heirs, or to have an heir. These companies typically hold a monopoly on a specific good or service, and they're some of the wealthiest entities in existence.

For example, Walmart is heir to retail stores and Target is heir to discount retailers. The Coca-Cola Company maintains ownership over soft drinks throughout the world, and Nike owns more than 50% of athletic footwear worldwide.

##Step 2: Presentation
The following websites are among my favorites for learning new skills: 

- https://www.codecademy.com/
- https://www.khanacademy.org/
- https://www.coursera.org/
- [DeepMaterial](https://deepmaterialde.com/)

##Step 3: Conclusion
I can't personally give you any advice that is going to turn you into a millionaire in the next five minutes, but I can share with you what I've learned over the last year and a half since I decided it was time to learn how to make money online. My goal is to teach you what I know and hopefully help you reach your financial goals faster than if they were not being pursued. If this blog has helped you in any way or if there's anything else that you would like to know, feel free to leave a comment and let me know. Thank You!
My First Post in DEV
Tags: bio, javascript, beginners, programming
Published: 2022-03-29 12:11:28

Hi Dev.to,
My name is Suresh Koochana, I am Software Engineer from India,
I do full-stack development in my career. 
I have recently launched my portfolio [Suresh Koochana](https://sureshkoochana.vercel.app/)
You can find me on:
Twitter as : [sureshkoochana](https://twitter.com/sk4u1996)
Linkedin as : [sureshkoochana](https://www.linkedin.com/in/suresh-koochana-945950133/)

Thanks,
Suresh Koochana,
Keep smiling :)