teleren/devto huggingface dataset:
Ads Invalid Click and Traffic Protection [Update]
Tags: webdev, adsense, blogging, beginners
Published: 2022-04-28 16:21:07

While there are many ways to protect AdSense accounts, there are some common mistakes that you should avoid. For example, if your account suddenly starts getting a high number of invalid clicks, you’re not doing it right. If you want to keep your account protected, follow the tips below. If you see that your traffic or clicks have suddenly jumped, it’s time to change your tactics.

You as a growing blog owner, author or social media influencer, might have to suffer through the issue of your **Google Adsense** being banned or suspended because of invalid traffic, and I know this sucks.

You really don’t have to do complex things to **protect your site** from being banned from Google Adsense, you just have to flow my instructions here, it’s that simple.

**Directly sharing** your site on social media is really a risky task, because a lot of social media traffic is considered as inorganic traffic. That’s why sharing your site on Facebook, Instagram or Twitter should be done properly with proper URL security layers, and for that, we will be using a tool called [Xoomato URL guard](https://xoomato.com/).

Xoomato provides a security layer called `s-l3` with which it makes the traffic organic. This is really an effective tool, that popular blog streamers are also using it.

# How to protect your Google Adsense account?

1. Optimize your site for Google or Bing search, and try to gain as much search traffic as you can.

2. Stop Clicking on Your Own Ads, if you’re doing so.

3. To Avoid Invalid Social Traffic; Go to the Xoomato URL guard, sign it, and get your social-sharable link from the [dashboard](https://xoomato.com/guard).

4. Do not request your audience to click on your own ads.

5. Purge all the Forbidden Content (Adult content, Alc0hol, Copyrights, Gambling and games, Healthcare and medicines, Political content, Financial services and Trademarks) by Google Adsense in your blog.

6. Don’t try to gain paid traffic, that’s not good for the health of your Google Adsense.

# What should be done to further protect your Google Adsense?

1. Promote your blog all over the internet, as much as you can.

2. Keep updating your site, and keep writing new fresh high-quality content

3. Make a connection with your audience via comments and replies

4. Try to optimize your site structure and site speed

5. Make your site look good and smooth

6. Keep monitoring your Adsense Account

## Summary

You should also check your AdSense account daily. Make sure to note your CTR and click-through rate (CTR). If you notice that your ad is getting a lot of invalid clicks, or if your site is getting a lot of direct or referral traffic then using Xoomato Adsense Protector is really very essential. This strategy is highly recommended if you’re worried about your AdSense account being banned.
First Half. Ruby noob question
Tags: beginners, programming, ruby
Published: 2022-04-28 16:18:13

I'm doing some exercises in ruby, my task was this

`Write a method **first_half(array)** that takes in an array and returns a new array containing the first half of the elements in the array. If there is_ an odd number of elements_, return the first half including the middle element.`

My solution was this

```
def first_half(array)
  new_arr = []
  i = 0
  while i < array.length / 2.0
    new_arr << array[i]
    
    i += 1
  end
    
  return new_arr

end

print first_half(["Brian", "Abby", "David", "Ommi"])# => ["Brian", "Abby"]
puts
print first_half(["a", "b", "c", "d", "e"]) # => ["a", "b", "c"]
```

end this works, but when I change 2.0 to 2.5 editor show only my first two elements "a" and "b". _Any explanation why?_ 
Maybe I just overthink this and this is something stupid... 

I just want to hear different thoughts

thanks in advance <3
How the TypeScript NonNullable Type Works
Tags: typescript, javascript, tutorial, webdev
Published: 2022-04-28 16:10:48

The `NonNullable` type is a utility type in TypeScript which creates a new type, whilst removing all `null` or `undefined` elements. It lets us take existing types, and modify them so they are more suitable in certain situations. Let's look at how it works.

## Custom Types
This article covers custom types. To learn more about custom types, [read my guide about it here](https://fjolt.com/article/typescript-creating-custom-types).


## NonNullable Utility Type

The `NonNullable` utility type works a lot like other utility types, in that it can take an existing type, and modify it as you see fit. As an example, let's say we have a specific union type which accepts `null` and `undefined` as potential options:

```typescript
type myType = string | number | null | undefined
```

This example works great in one example, but there is another part of our code where we don't want to accept `null` or `undefined`. We could create a new type for that, or we could reuse `myType`, using `NonNullable`:
```typescript
type myType = string | number | null | undefined

type noNulls = NonNullable<myType>
```

In the above example, `noNulls` is now of type `string | number`.
I made a Developer Quiz Game
Tags: javascript, html, css, shabilnedumpally
Published: 2022-04-28 16:06:42

Hey guys this is shabil nedumpally.This is my education Game 
But . These are just 10 Question You can play earn Badge.Just for fun Please Visit Your valuable comments Below

[check](https://shabil-nedumpally.github.io/dev-quiz-game/)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojdh3j66eh60g8qoqui6.png)
5 types of decision-makers
Tags: softskills, communication, decisionmakers
Published: 2022-04-28 16:01:47

I’m taking a course on [Communication Fundamentals](https://www.udemy.com/course/communication-fundamentals-how-to-communicate-better) and just learned the 5 types of decision-makers. I will be writing down all that I learned.

![](https://media.giphy.com/media/WySK0nQiJKLy25HLhp/giphy.gif)

The 5 types are:

1. **The Charismatics**
2. **The Thinkers**
3. **The Skeptics**
4. **The Followers**
5. **The Controllers**

---


## 🫀🧠The Charismatics:

These are the most easily intrigued by new ideas. They love novel and new ways of thinking, their experience has led them to explore these new ideas. In that way, they will be readily willing to listen to your ideas, but rest assured that they will use their experience to balance their decision-making around facts and emotion. So you want to appeal to their head 🧠 and their heart 🫀 .


## 🧠📚The Thinkers:

Hard people to convince, since they want an argument that’s very well supported by data. They want to take the time to make the decision, even if it takes a lot of time. So you might be in a situation where you have to present the data more than once, or in different ways in order to get that decision from that style of decision-maker.


## 🤷🤔The Skeptics:

They will always look at things from a “half empty” perspective. They are suspicious of new ways of thinking, particularly if it challenges their mental models and their way of thinking, and their view of the world. That’s why they will always find a reason why not. Usually seen as an aggressive and difficult person to deal with when regards to decisions. Provide them with enough information so that their assumptions are challenged.


## 🐹🕵️The Followers:

They want to know that somebody else has already done it. They are always the last to come on board in terms of new trends and new ways of doing things. It’s like they will never be the guinea pig in an experiment. Which experts have used it? Which people support it? How many? How many companies use it? Which companies? So come with expert opinions and facts to get your favorable decision.


## 🧠📊The Controllers:

100% mind-focused when it comes to decision-making. This group of people wants to focus on the data, and solely on the data. They are not going to become emotionally involved in any decision. They cannot stand ambiguity and uncertainty.

Hope this article helps you understand more about communication!

See you guys later!

![](https://media.giphy.com/media/EBJQRG6M99zSNhnhsW/giphy.gif)
Help me with Themes problems in WordPress on fedora 35 Linux
Published: 2022-04-28 15:42:30

I have installed WordPress in my f35 workstation following [this tutorial from fedora-magazine web](https://fedoramagazine.org/howto-install-wordpress-fedora/)
That was yesterday, now today after login to the WordPress local installation, URL: `localhost/wordpress/wp-admin` , there is a problem charging the themes.

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

I have edited this file: `/etc/wordpress/wp-config.php`

    define('DISALLOW_FILE_MODS', false);

This fixed the problem yesterday and was able to install ASTRA theme and a template.
source: [wordpress.stackexchange](https://wordpress.stackexchange.com/questions/244939/no-add-new-button-how-to-add-new-theme?newreg=fdcb55e7778b442399aabde47cc5ba6b)

But today the problem persists.

can it be permissions issue?

**information**
```Bash
[root@fedora chris]# getsebool -a | grep -P "httpd.+--> on"
httpd_builtin_scripting --> on
httpd_can_network_connect_db --> on
httpd_can_sendmail --> on
httpd_enable_cgi --> on
[root@fedora chris]# ^C
[root@fedora chris]# 
```
```Bash
❯ ll -d /etc/wordpress /usr/share/wordpress 
drwxr-x---. 1 root apache  26 Apr 27 16:04 /etc/wordpress
drwxr-xr-x. 1 root root   480 Apr 27 01:10 /usr/share/wordpress
```
```Bash
[root@fedora chris]# ll /usr/share/wordpress/wp-content/
total 4
-rw-r--r--. 1 root   root  28 Jan  8  2012 index.php
drwxrwsr-x. 1 apache ftp  264 Apr 27 03:18 plugins
drwxrwsr-x. 1 apache ftp  112 Apr 27 03:11 themes
drwxrwsr-x. 1 apache ftp    0 Apr 27 03:18 upgrade
drwxrwsr-x. 1 apache ftp  612 Apr 27 03:31 uploads
[root@fedora chris]#
```
Day-76 Training At Ryaz
Tags: javascript, webdev, beginners, programming
Published: 2022-04-28 15:51:15

-  Date:28/04/2022
-  Day:Thursday 

Today, I started at about 11:00 am as I was in progress to do the java script course so, I started with the left over task and firstly I started with creating dates in java script Date objects are created with the new Date() constructor.Date() constructor creates a JavaScript Date instance that represents a single moment in time in a platform-independent format after this I started with adding dates to the app and testing it after this I started with different operations with date in java script You can simply create a date using new Date() . You can pass parameters to the Date constructor to create a date of your choice. The given parameter can take different forms.The getFullYear() Method,The getMonth() Method,The getDate() Method he getDate() method returns the day of a date as a number (1-31) after this I started with internationalisation dates intl.DateTimeFormatThe Intl.DateTimeFormat object enables language-sensitive date and time formatting.it have fowling parameters like Intl.DateTimeFormat — language-sensitive date and time formatting.Intl.NumberFormat — language-sensitive number formatting,Intl.PluralRules — plural sensitive formatting and plural language rules.,Intl.Collator — language-sensitive string comparison. after this I started with set timeout The setTimeout() method calls a function after a number of milliseconds. this way my day ended up and I got to learn many new things.
How to do Ping-Pong pair programming in a remote environment
Tags: programming, pairprogramming, remote
Published: 2022-04-28 15:47:08

Ping-pong is a pair programming technique where two programmers work together to solve a problem. It could be implementing a new feature, fixing a bug, etc.

The difference from this technique to other common techniques like the driver/navigator through Google Meet is that, in the Ping-Pong pair programming session, a programmer start writing a test. With the test failing, the other programmer write code to pass the test. After getting green, the second programmer write a new failing test that the first programmer need to implement the code to make that test pass.

The cycle then repeat until both programmers achieve the initial goal.

#### Why ping-pong pair programming is a thing in remote environment?

Personally, I feel more connected with my working partner when working in this way. We can debate about how to implement the code, about how the code will communicate with the system and how well tested the new feature/bug fix is.

Also, writing test first gives you more guides about what you need to do and set clear expectations about the code.

To do that, we need some tools. I think that the most used today is [VSCode Live Share](https://code.visualstudio.com/learn/collaboration/live-share), where we can share a coding session that include server tunneling and access to the host terminal. It is very useful to put the tests running in the terminal and just write code together.

JetBrains had a tool integrated to its IDEs called [Code with Me](https://www.jetbrains.com/code-with-me/). I never used, but it looks spectacular by the outside view.

Alongside those tools, we have a bunch of other *shared programming environments* like [Codesandbox](https://codesandbox.io/).

Either way, working together with some other person in a remote environment is great! Thoughtbox had an excellent [video](https://thoughtbot.com/upcase/videos/ping-pong-paired-programing) teaching the hows with a live example.

Also, Tuple guys published a [blog post](https://tuple.app/pair-programming-guide/antipatterns) about antipatterns that should be avoided when pairing.
Beautiful Code Snapshots with Personal Watermark
Tags: webdev, programming, productivity, javascript
Published: 2022-04-28 15:42:42

Hi folks! 👋

I'd published a [post](https://dev.to/fatihtelis/best-code-to-image-converter-on-web-449b) recently about the **[code to image converter](https://10015.io/tools/code-to-image-converter)** I've been working on. Since then, I've added some nice features that has been requested and it becomes much nicer with the latest improvements. The best part is: it is totally free to use.

👉 [https://10015.io/tools/code-to-image-converter](https://10015.io/tools/code-to-image-converter)

## Personal Watermark

First of all, most of the paid converters put their own watermark to the screenshots and request for money to remove it. In [10015.io](10015.io), you can add your own personal watermark to the code snapshots with either with your avatar, or with a Twitter icon or as pure text. Here is an example of a screenshot with a Twitter handle.

![Code Spanshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ea0ra4lk8520wqbfuht4.png)


## File name with icon

Also, you can set a file name for the code block to make it more informative. It will detect the file extension automatically and add an icon if it is in the list of popular programming languages. Here is an example for custom file name.

![Code to Image Converter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nymgqi3gmh6q1x6ydp6a.png)

In addition to that, you can customize the highlight language, theme, background, font family, font size and many other features easily.

If you have any suggestion, feel free to comment.
Distributed latency based time synchronization
Tags: opensource, microservices, embedded, luos
Published: 2022-04-28 15:37:46

At Luos, we deal with distributed (multi-MCU) critical and real-time environments. Everything in our technology has been designed to be fast and light. A time synchronization management is essential, and we have a really specific way to make it!

⏩ https://www.luos.io/blog/distributed-latency-based-time-synchronization

To learn more, read this new article. How do people deal with this problem today and how does Luos deal with it?

Thanks to Edward Lee and Shaokai Lin (UC Berkeley) for helping us with this topic.

👨‍💻 Nicolas Rabault
Cuber is released under a source available license
Tags: kubernetes, opensource, cloud
Published: 2022-04-28 15:36:35

I am happy to announce that Cuber is moving from a custom commercial license to a source available license.

{% embed https://github.com/cuber-cloud/cuber-gem %}

In particular we are adopting the [Standard Source Available License (SSAL)](https://github.com/collimarco/Standard-Source-Available-License) and you can use Cuber for free for small / medium apps.

Cuber makes it easy to deploy your apps on Kubernetes: just create a `Cuberfile`, with ~10 lines of code, and then type `cuber deploy` to package and deploy your app on any Kubernetes cluster.
how to get auto suggestions in windows terminal
Published: 2022-04-28 15:24:34

1. open powershell and run `Install-Module PSReadLine -Force`
2. restart your pc 
3. run notepad $PROFILE
4. paste below 2 lines

`Set-PSReadLineOption -PredictionSource History`

`Set-PSReadLineOption -PredictionViewStyle ListView`


preview : [click](https://drive.google.com/file/d/1ee1x9H-JSjKrZh0Jm6Jpwj4M-0ZWKvK-/view?usp=sharing)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oohuq4cx0c6x5olv1qwu.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wcgxmnmiafojxpw6oogt.png)
🦶🏼Multi Step Form With Progress | HTML CSS & JavaScript
Tags: html, css, beginners, javascript
Published: 2022-04-28 15:32:13

**🦶🏼Multi Step Form With Progress | HTML CSS & JavaScript**



{% youtube ySQB42xQnPU %}

***

**Markup:**

```HTML
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Multi Step Form with Progressbar</title>
    <link rel="stylesheet" href="style.css">
    <script src="app.js" defer></script>
</head>
<body>

<form action="#" class="form">

    <h1 class="text-center">SignUp Form</h1>
    
<!--    Progressbar-->
    <div class="progressbar">

        <div class="progress" id="progress"></div>

        <div class="progress-step active" data-title="Name"></div>
        <div class="progress-step" data-title="Contact"></div>
        <div class="progress-step" data-title="ID"></div>
        <div class="progress-step" data-title="Password"></div>
    </div>

<!--    steps-->
    <div class="form-step active">
        <div class="input-group">
            <label for="username">First Name</label>
            <input type="text" name="username" id="username">
        </div>
        <div class="input-group">
            <label for="lname">Last Name</label>
            <input type="text" name="lname" id="lname">
        </div>
        <div class="">
            <a href="#" class="btn btn-next with-50 ml-auto">Next</a>
        </div>
    </div>

    <div class="form-step">
        <div class="input-group">
            <label for="phone">Phone</label>
            <input type="text" name="phone" id="phone">
        </div>
        <div class="input-group">
            <label for="email">Email</label>
            <input type="email" name="email" id="email">
        </div>
        <div class="btns-group">
            <a href="#" class="btn btn-pre">Previous</a>
            <a href="#" class="btn btn-next">Next</a>
        </div>
    </div>

    <div class="form-step">
        <div class="input-group">
            <label for="dob">Date of Birth</label>
            <input type="date" name="dob" id="dob">
        </div>
        <div class="input-group">
            <label for="id">National ID</label>
            <input type="number" name="id" id="id">
        </div>
        <div class="btns-group">
            <a href="#" class="btn btn-pre">Previous</a>
            <a href="#" class="btn btn-next">Next</a>
        </div>
    </div>

    <div class="form-step">
        <div class="input-group">
            <label for="password">Password</label>
            <input type="password" name="password" id="password">
        </div>
        <div class="input-group">
            <label for="ConfirmPassword">Confirm Password</label>
            <input type="password" name="ConfirmPassword" id="ConfirmPassword">
        </div>
        <div class="btns-group">
            <a href="#" class="btn btn-pre">Previous</a>
            <input type="submit" value="Submit" class="btn">
        </div>
    </div>

</form>

</body>
</html>

```
Advice to my younger self as a self-taught programmer
Tags: beginners, programming, productivity
Published: 2022-04-28 15:30:34

To start off, I began my journey as a programmer at 17 years old and that was in 2019. And of course, I haven't yet made anything big from programming other than just but a few scripts but that time is enough for a few experiences I would like to touch on today

## 🚩 **How I started...**

Going straight to the point, my first programming language ( which I'd like to call my "mother tongue" ) was **python**. Over the years I have interacted with other programming languages like JavaScript and C which is of course inevitable while doing a Bachelor's degree in Computer science.

My first advice to my young self is 

<u>1. **Have no gaps in your knowledge.**</u>

I am a good follower of tech and programming YouTube channels and this specifically I Learned from Tim.( click here to watch his python tutorials ). Do not rush while learning to program because, many of the concepts in the language you are starting with be it python, C++ or JavaScript, you'll get to apply the same in other languages but only the **syntax** will change.
![definition of syntax in programming](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mq95ruf5t2caujad783p.png)
Why learn the same concept twice and waste your time ?

<u>2. **Build on the essentials**.</u>

Languages evolve and others die and so do frameworks and libraries, but there are these things I'd like to call developer tools which will never get out of fashion and if they do, not so soon. Tools like git and GitHub, VS code shortcuts, these are the things that no matter which language you are doing, may come in handy. I'd suggest that you learn these first or early in your journey if you're planning on becoming a software developer.

<u>3. **Be consistent**.</u>

I swear if I had been consistent with programming, by now I would have a large knowledge-base at my fingertips. You normally tend to forget things when you cut of your practice flow, the same applies to programming.


<u>**Conclusion**</u>
Programming ain't easy, a few stumbles along the way but at the end of the day we end up getting our hunch of things and the final result is ultimate flexibility. Don't give up, don't be afraid to ask, Google it like  a pro

Thank you for reading 💘💓