teleren/devto huggingface dataset:
What's the best VPS?
Published: 2020-11-26 18:52:52

##What is a VPS?
> A VPS is``a virtual machine sold as a service by an Internet hosting service and runs its copy of an operating system (OS), and customers may have super user-level access to that operating system instance, so they can install almost any software that runs on that OS.`` Keep note of that as we will need this for reference. In short, VPSes are virtual machines. Which uses the idea of **Virtualization**. Virtualization, from Wikipedia, is basically: ``resources are still shared, as, under the time-sharing model, virtualization provides a higher level of security, dependent on the type of virtualization used, as the individual virtual servers are mostly isolated from each other and may run their full-fledged operating system which can be independently rebooted as a virtual instance. ``


## Okay! Give me the choices!
Here you go:

|              | Cheapest Plan | If you want a little extra Plan | I have the money to afford anything Plan |
|--------------|---------------|---------------------------------|------------------------------------------|
| GalaxyGate   | $3.00         | $5.00                           | $240.00                                  |
| DigitalOcean | $5.00         | $10.00                          | $1200.00                                 |
| Hostbend        | $2.99         | $9.00                           | $65.00                                 |

**OKAY!** Why are you giving us a price table? This is for your price budget. You need to look at your budget or range. Which provider fits the criteria of the budget range.

## Cheapest VPS: Hostbend
Hostbend is definitely the cheapest provider. You can host your discord bot or project for $2.99! Personally, Hostbend has pretty quick support, although their UI can be improved.

[Website](https://hostbend.com)

## Best Value: DigitalOcean
Even though DigitalOcean is a bit more costly, it definitely has the best UI, is easiest to use (for example you can create a server with docker already preinstalled!) and you get billed hourly, so there is less commitment (you could just use a server for like 50 mins for free :)). 

[Website](https://m.do.co/c/c4ac7c20afda)

## Runner Up: GalaxyGate
I've used GalaxyGate for a while, and it's very reliable, but you get less!

[Website](https://galaxygate.com)

# If you use DigitalOcean, you can get $100 free credit if you use this link!
[Get $100 credit for DigitalOcean](https://m.do.co/c/c4ac7c20afda)
## Hey, I found something better! I think you should check it out!
Feel free to reply to this post and I'll check it out and maybe add it.
<a href="https://www.buymeacoffee.com/Losh531" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/arial-blue.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Digital Thanksgiving in 2020
Tags: discuss, culture, mentalhealth
Published: 2020-11-26 18:37:38

As we have been “living in the digital world” ever since the coronavirus took hold of the physical world, there has been an accelerating fear that we are losing ourselves as a culture and as individuals. It has forced many of our traditions to change or be canceled altogether. But where is this fear coming from? This is an attempt to shed some light on what many may be feeling during these novel times.

Society, as we know it, has been called into question and it has become apparent to just about everyone. Suddenly, there is even more complexity to reckon with when you can no longer trust in-person interactions. Everyone now must make more deliberate choices and weigh the tradeoffs between two values near-and-dear to the hearts of many: culture and health.

The first to go was “office culture”. The business-as-usual lifestyle is no longer floors of coffee machines, desks, and meeting rooms full of people. They have been replaced by the home’s spare bedroom or kitchen counter and video/audio conferencing tools. In a time when corporate real estate has taken a nose-dive, many are wondering if it will ever return to normal. But all agree business must press on regardless of the virus.

What is subtly missing when we talk about a “fear of contracting the virus” is that there is now a fear of in-person contact not just in the office place but wherever someone goes. No longer can we easily sanction random/non-essential encounters at grocery stores, visiting grandparents in nursing homes, or volunteering at soup kitchens. It makes it a very lonely world to exist in. And, yet, this loneliness is a commonality now as recent films such as the Social Dilemma have outlined. Many personal interactions have shifted to social media, video conferencing, and audio calls, but it isn’t the same. It has led us to become even more divisive and out of touch with others in a real-life sense.

This Thanksgiving, when large organizations, extended families, and friends have traditionally gathered for gratuitous feasting and an outpouring of togetherness, it hits hard that officials are recommending eating “the holiday spread” over these virtual platforms to prevent “the spread” of coronavirus. Many will accept the health risks as they fly, drive, and congregate as has been done for years to restore their sense of connection. Others will remain put to have a meal and some time for reflecting in their more immediate environments.

As we may be losing portions of our culture, it is also an opportunity to check-in with the existing aspects we have valued in the past. These “lost” or “lonely” feelings will birth newfound ways to connect. They will drive technical innovation because, after all, in 2020 nobody can hug a loved one or smell a roasted turkey over the Internet... yet. Until then, what are you grateful for?
Module, Packages, Dependencies! What are they?
Tags: javascript, beginners, tutorial
Published: 2020-11-26 18:03:16

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/q6uljrwhw1z063dbme5h.jpg)

Module is single file of code. Package is a group of modules in a directory. Dependencies are added files in a package to assist the module files to download other modules to have additional features without having to rewrite the code from scratch and use someone else's code.

This will be useful when you work in an organization and you are responsible for a module in a big project. The big projects are maintained by hundreds and thousands of developers(eg Linux os or Microsoft office..etc) where the project will have new features or bug fixes in weekly or monthly basis. These cannot be re-written from scratch. Let's say the big projects have lots of modules with duplicate copies across your system, How do you face this? Understand the entire project?. No, This is where having packages could save you. The packages are files arranged in a central repository in cloud or installed globally in your local pc so that you could import it in you module and use it. Now importing the external modules to your module, How do you do that? Simply by adding an "Import module_name"? Maybe. But in Javascript it does not work like that. The dependency files are created and the names of the files to be added are added in it. This will be read by the IDE to search and download the packages.

Unlike other programming languages, Javascript will need you to add packages individually for each project. This will be useful when you need to fix a bug in the package or do minor alterations in the packages will not affect the files globally and wont affect other people's work.

There are few things I thought should share for the noobs. 

+Please don't try to add separate Javascript file for html if you are not using any framework. It wont work. There are factors like changing the script type to module or developing a Javascript listener and rendering the html file as well importing different modules need to done. 

+Don't worry about the lines of code being too much or efficient. first try to produce output. Stressing too much will make you procrastinate.
SQL CROSS JOINs
Tags: sql, postgres, joins
Published: 2020-11-26 17:50:32

---
title: SQL CROSS JOINs
published: true
description: Using for SQL’s CROSS JOIN to generate content for a pivot table or chart
tags: sql, postgresql, joins
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/x7duv3qd1ugq0pusq16t.jpg
---

I found a use for `CROSS JOIN` in SQL recently when generating content for a [pivot table](https://en.wikipedia.org/wiki/Pivot_table).

Given a `fixtures` table:

```sql
CREATE SEQUENCE IF NOT EXISTS fixtures_id_seq;

CREATE TABLE "public"."fixtures" (
  "id" int4 NOT NULL DEFAULT nextval('fixtures_id_seq'::regclass),
  "start_time" TIMESTAMPTZ,
  "sport" VARCHAR(40),
  PRIMARY KEY ("id")
);
```

The SQL is something similar to the below:

```sql
WITH sports AS (
  SELECT
    DISTINCT sport
  FROM
    fixtures
  ORDER BY
    sport
),
days AS (
  SELECT
    day
  FROM
    generate_series(
      date_trunc('day', '2020-09-09'::date)::date,
      date_trunc('day', '2020-09-21'::date)::date,
      '1 day'::interval
    ) AS day
),
fixtures_per_day AS (
  SELECT
    date_trunc('day', start_time) AS day,
    sport,
    COUNT(*) AS c
  FROM
    fixtures
  GROUP BY
    date_trunc('day', start_time),
    sport
)
SELECT
  days.day,
  sports.sport,
  COALESCE(fixtures_per_day.c, 0) AS fixture_count
FROM
  days
  CROSS JOIN sports
  INNER JOIN fixtures_per_day ON (
    days.day = fixtures_per_day.day
    AND sports.sport = fixtures_per_day.sport
  )
```

There are three [CTEs (**C**ommon **T**able **E**xpressions)](https://www.postgresql.org/docs/9.1/queries-with.html) which are like sub-queries but can be re-used. I’ve used them here to keep the query tidy.

The first “table”, `sports` just gathers us a list of each of the sports in a `fixtures` table. Next, `days` generates a sequence of `date`s from 9/Sep/2020 to 21/Sep/2020. Finally `fixtures_per_day` create a table with the count of events on any given day for any given sport.

Our query then `CROSS JOIN`s the `days` and `sports` “tables”  to create a [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product), a maths-y name for the result of the following Python code:

```python
result = []

for day in days:
    for sport in sports:
        result.append((day, sport))
```

Once we have the `CROSS JOIN` we can `LEFT JOIN` on the `fixtures_per_day` to get something which would make sense in a pivot table or chart without having to fill in blanks by hand. We use the `COALESCE` function to make sure that any `NULL` rows become `0`.

The results for some test data look like the following:

| day | sport | fixture_count |
| --- | ----- | -------------:|
| 2020-09-12 00:00:00+01 | EPL | 3 |
| 2020-09-12 00:00:00+01 | NFL | 0 |
| 2020-09-12 00:00:00+01 | SPL | 6 |
| 2020-09-13 00:00:00+01 | EPL | 2 |
| 2020-09-13 00:00:00+01 | NFL | 3 |
| 2020-09-13 00:00:00+01 | SPL | 0 |
| 2020-09-14 00:00:00+01 | EPL | 2 |
| 2020-09-14 00:00:00+01 | NFL | 1 |
| 2020-09-14 00:00:00+01 | SPL | 0 |
| 2020-09-15 00:00:00+01 | EPL | 0 |
| 2020-09-15 00:00:00+01 | NFL | 0 |
| 2020-09-15 00:00:00+01 | SPL | 0 |
Hactoberfest T-shirt anyone?
Tags: hacktoberfest, programming, kotisdesign
Published: 2020-11-26 17:46:10

Did anyone get T-shirt from Hacktoberfest this year? I completed all the challenges and  received an email from KotisDesign with an order id but haven't received T-shirt yet. My deadline is November or December. Will i get a T-shirt?
How to check if a character is a number in java?
Tags: java, programming
Published: 2020-11-26 17:33:19

Hi, I am new to this world of programming in java language. You might feel to check if a character is a number in java? I mean what is the best way to do it?

#Solution:
I'm not sure if this is the best option or not, But this seems pretty simple to me. We can check whether the given character is a number or not by using the isDigit() method of Character class. This method returns true if the passed character is really a digit.

##Please check out the example below:

```
public class CharacterCheck {
   public static void main(String[] args) {
      String s = "ABC123";
      for(int Count=0; Count < s.length(); Count++) {
         Boolean ReturnValue = Character.isDigit(s.charAt(Count));
         if(ReturnValue) {
            System.out.println("'"+ s.charAt(Count)+"' = Num");
         }
         else {
            System.out.println("'"+ s.charAt(Count)+"' = NAN");
         }
      }
   }
}

```

##Output

```
'A' = NAN
'B' = NAN
'C' = NAN
'1' = Num
'2' = Num
'3' = Num
```


Also there is alternatine method, [read alternative](https://www.kodlogs.com/blog/2/how-to-check-if-a-character-is-a-number-in-java)
Getting new instance every time in Java Spring Boot
Tags: java, spring, springboot, programming
Published: 2020-11-26 17:29:10

This is one of the ways to get a new instance of a type everytime we request for it from a singleton scoped instance.

[`@Lookup`](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Lookup.html) Informs spring container to getBean from method decorated with this annotation.

Creating a method in configuration class so that it can be used anywhere configuration is injected.

```java
//ApplicationConfiguration.java
@Lookup
public UserDTO getUserDTOProtoTypeBean() {
    return null;
}
```

Make sure the `UserDTO` class is decorated with `@Scope("prototype")`. Now in your consuming class call this method when you need a new instance.


```java
@Component
public class UserMapper {

    @Autowired
    ApplicationConfiguration appConfig;

    public UserDTO ToDto(User userEntity) {
        var UserDTO = appConfig.getUserDTOProtoTypeBean();
        ...
    }
}
```

Code On!

Originally Posted on [Bitsmonkey](http://bitsmonkey.in/blog/2020/11/26/java-springboot-newinstance)
What Should i do to start a new Angular Application ?
Tags: angular, javascript
Published: 2020-11-26 17:28:22

If you want to create a new Angular application locally you should have the following software  installed on your machine.

1. **Visual Studio Code**  [Installation](https://code.visualstudio.com/download) 
VSCode is a open source code editor developed by Microsoft for Windows, Linux and macOS. It includes the following features 
debugging, 
embedded Git control and GitHub, 
syntax highlighting, 
intelligent code completion, 
snippets, and code refactoring.
2. **Node.js** [Installation](https://nodejs.org/en/download/)
Node.js is an open-source code, platform independent that run JavaScript code outside of a browser.
3. **NPM** [Installation](https://cli.angular.io/)
Angular, the Angular CLI, and Angular applications depend on [npm packages](https://docs.npmjs.com/getting-started/what-is-npm) for many features and functions. To download and install npm packages, you need an npm package manager. This guide uses the [npm client](https://docs.npmjs.com/cli/install) command line interface, which is installed with Node.js by default. To check that you have the npm client installed, run npm -v in a terminal window.

So these are the prerequisites tools which you should have installed in your machine

as for as you skills to start angular application you should be familiar with the following:
* HTML
* CSS/LCSS/SASS
* TYPESCRIPT/JAVASCRIPT

Now you have all done so the next thing is to go for creating angular application. creating angular application is very simple job you just run a command and an application will be created. to create application you will go to the directory where you want to create with cmd ( command line ) and run the command given [below](https://www.kodlogs.com/blog/2111/what-should-i-do-to-start-a-new-angular-application)
Mailing List Software
Published: 2020-11-26 17:26:35

Sending bulk newsletters requires your managing a number of email address lists. It’s a well-known fact that high-quality mailing lists are the foundation for a successful email campaign.

Small amount of data are easily managed by a simple spreadsheet, whereas others need much more powerful and functional solutions of mailing list software. This is where online email list manager takes the lead. It’s capable of working with one–or several–email lists. Plus, it supports mailing lists of any size and, in addition, performs numerous functions.
How to use Phone Number Web Extractor
Tags: sms, leads, marketing
Published: 2020-11-26 17:20:06

Communicating with people by phone, Skype, or SMS message is often more effective than sending bulk email letters. Our lead scraper will find and collect contact information for you within a couple of minutes, and you can spend the time you save on yourself.

Atomic’s extractor software will gather email addresses, phone numbers, as well as Skype, MSN, AOL, Yahoo, and ICQ IDs, from the web. The program collects contacts in 39 search engines. Phone number web extractor understands edited and created scripts, and searches for contacts on all available sites.

You will also have the opportunity to search for unnecessary sites or search engines. To do this, the phone number web extractor has the ability to create a blacklist and add domains or sites there that you do not need contacts from. Atomic Lead Extractor quickly searches and retrieves information by analyzing multiple resources simultaneously. You can set the number of threads by setting limits when loading links.

https://www.atompark.com/phone-number-extractor/
My #100DOC - Day 91
Tags: 100daysofcode, challenge
Published: 2020-11-26 17:16:45

### Day 91: November 25, 2020

#### **Today's Progress**: 
1. **[DI exercises](https://github.com/pablohs1986/dam_di2021)** (1h 30min):<br>I keep working on the exercises. Focusing on handling the TableModel.
    
#### **What I learned**: 
* Handle TableModel.

#### **Total time**:
1h 30min.
Why and How to use SMS in Your Nonprofit Strategy
Tags: sms, marketing
Published: 2020-11-26 17:15:10

Charity and another non-profit activity has high significance for society because this is a possibility to help others. Contemporary charitable, educational, and service organizations need promotion similar to marketing in usual business. Thus, the traditional methods of staying in touch with the audience are suitable for nonprofits. One of them is SMS sending.

Here are some cases when non-profit organizations may need them:

SMS messaging can help nonprofits to inform donors and volunteers. For example, bulk SMS service can send a reminder about donation to all active donors.

Also SMS texting could be used for confirmation of actions. A new potential donor can input a phone number for further contact and then confirm his number via SMS.

Another example of mass SMS is sending thankful messages. A nonprofit can express gratitude to all donors using a bulk SMS message.

So, you already know why you need to send the messages to the target audience. But why should you prefer mobile text sending for donations and other nonprofits to the other channels of communication? Here are some reasons for choosing SMS texting:

Almost all adult humans use cell phones. There are 3,5 billions of mobile owners in the world, according to the Statista latest data.

SMS doesn’t require the Internet connection. That’s why this channel of communication can be used in any region, even in those ones where there are problems with the Internet.

Information is delivered quickly. Just one second, and the notification about your message is shown on the receiver’s mobile phone screen.

Mobile messages have an impressive open rate. It reaches 98%, according to the Campaign monitor statistics. This is an enormous figure. Just imagine, 9800 receivers out of 10000 recipients from the contact list will read your information. So, SMS is the best way to reach the target audience.

SMS are read by the recipients immediately. On average, it takes only 3 minutes for a person to open the message since it has been delivered. So, mobile texting is the best way for sending the urgent information.

It’s easy to set up the SMS sending process. For example, in Atomic SMS Sender, it’s enough to register, get the Sender ID (if you need it), upload the contact base to the service, insert the text, and start sending. https://www.atompark.com/bulk-sms-service/
🛡 Preventing Command Injection Attacks in Node.js Apps
Tags: attacks, node, security
Published: 2020-11-26 17:13:46

🔰 Attackers can use Node.js apps to hack into your systems. Learn how to stop them.
[Read more](https://auth0.com/blog/preventing-command-injection-attacks-in-node-js-apps/?utm_source=content_synd&utm_medium=sc&utm_campaign=injection_attacks)
My customization of the git bash...
Tags: bash, cli, git
Published: 2020-11-26 17:01:07

For git i mostly use the git bash on windows. Created some aliases and functions for it, to make my life a little easier. Maybe some of the are helpful for you as well: 

```bash
alias gpl="git pull"
alias gst="git status"
alias gco="git commit -m "
alias gpu="git push"
alias gbr="git branch"
alias gch="git checkout "
alias gad="git add "
alias gme="git merge "
```

I think those alias are pretty self explanatory, but if something is unclear just let me know. The part requires a little bit of explanation. Before committing and pushing big changes i like to check each fill. I usually do a git diff on each file and than add it or not.  After i have added a file i type git status again, to see the name of the next file. 

Wrote the following code to speed this up a little and save me some typing: 
```bash
#Does a normal git diff, but afterwards it saves the file path 
#into a text file. Existing lines get overwritten, so that the file has only 
#one line at any time. Has to be called before fadd.
function fdiff {
	git diff $1
	echo -n $1 > /d/data/fdiff_data.txt
}

#Has to be called after fdiff. Uses the file path fdiff printed 
#into a textfile and does a git add one the file. After that it calls
#git status again.
function fadd {
   git add $(head -n 1 /d/data/fdiff_data.txt)
   git status
}

#Has to be called after fdiff. Rolls back the last file 
#compared with fdiff. 
function frbl {
	toRevert=$(head -n 1 /d/data/fdiff_data.txt)
	read -p $"$toRevert Will be reverted! Okay? Yes: return - No: crtl+c" 
	git checkout -- $toRevert
	git status 
} 

#aliases to shorten the typing even more
alias fa=fadd
alias fd=fdiff
alias fr=frbl
```
An example for the workflow: 

![example workflow](https://dev-to-uploads.s3.amazonaws.com/i/wr4jyqykrp7xwdaqebmy.PNG)



One last function: 
```bash
#I use this, when i know the commit is very small and unproblematic.
#Usually do a git status before. 
function gall {
	git add . && git commit -m "$1" && git push 
}
```
Hmmm... looking at the last function has made me think. It would be better if this would abort with an error if i'm about commit more than one file. It should also ask me to confirm if the single file it's about to commit is the file im expecting.