teleren/devto huggingface dataset:
4 common reasons cron jobs fail
Tags: cron, schedule
Published: 2022-03-15 09:36:02

Cron job failures create chaos for your users and your team. These 4 problems emerged as the most likely causes of preventable job failures:

### 1. System resources have been depleted

Without careful cleanup and log rotation, system resources like disk space can be consumed slowly over months or years before leading to job failures. By carefully cleaning up any files your cron job creates and using a tool like logrotate to automatically prune log files you can prevent disk space related failures.

Other resource problems, especially when running cron jobs in a virtual machine, are limits to the number of open file descriptors, threads, and memory usage. You can view limits on your system by running ulimit -a as the cron user.

### 2. Recent infrastructure updates were made

When developers are making changes to database connections or upstream APIs it's easy to overlook cron jobs, especially when they're running on a separate host. It can help if cron jobs are deployed like the rest of your app and are included in post-release verification steps.
 
### 3. Your dataset has grown too large

Cron jobs are often used for batch processing, event sourcing and other data intensive tasks that can reveal the constraints of your stack. Jobs may work fine until your data size grows to a point where a bottleneck is reached.

Optimizing database queries and API calls is the right place to start, and depending on the job, running it more frequently may be effective by reducing the data processed each time it runs.
 
### 4. Cron job invocations begin to overlap

Cron will run your command at the scheduled time even if the last invocation is still running, or even if the last 10 are. If your job invocations are close to overlapping, consider spacing them out further or adding a tool like flock to ensure only 1 instance is running.
Creating your First .NET Component
Tags: dotnet, csharp
Published: 2022-03-15 09:33:58

To start things out, you'll need to create an empty directory anywhere in your local machine. Open up the directory in any text environment or IDE of your choice. (I used Visual Studio Code). Create a new C# script and name it as main.cs.

Write the following code in it.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yt6s5jdoiiink583knlr.png)

After that, create additional independent C# scripts containing static functions for all the basic arithmetic operators:

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

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

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

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

**For modulus:**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ruxn2m4d15ej0dst2qd6.png)
      
**Before Compilation:**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ovetvwh3vk2e6e1l0ntl.png)

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

**After Compilation:**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0c0mwh29q3g1n3w3f5bs.png)

**Compiling main.cs**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zc90bhcxnru5huin475z.png)

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

Hence, we have successfully created our first .NET Component!
DEB/RPM meta package
Tags: debian, redhat, packages, devops
Published: 2022-03-15 06:34:08

---
title: DEB/RPM meta package
published: true
description: Trouble create meta package with specific version od dependencies on Ubuntu/RedHat/CentOS
tags: debian, redhat, packages, devops
//cover_image: https://direct_url_to_image.jpg
---
One way to install few packages on the one time, create meta package.
It's easy! The ten line of script and enjoy.

For example, create file my-meta-package.cfg
```
Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: my-meta-package
Version: 1.0.0-1
Maintainer: Your Name <yourname@example.com>
Depends: package-one, package-two, package-three
Description: My meta package
 The meta package
```
and run
```
equivs-build my-meta-package.cfg
```
Should be get my-meta-package-1.0.0-1.noarch.deb package.

Easy!
If packages in repo and allowed to download can do for install
```
sudo apt install -y my-meta-package-1.0.0-1.noarch.deb
``` 
add package-one, package-two, package-three will be installed as dependencies of my-meta-package.

But here has problem if need install (for example) package-one with specific version.

Doing simple change in the my-meta-package.cfg
```
Depends: package-one (= 0.1.0), package-two, package-three
```
and run
```
equivs-build my-meta-package.cfg
```
still get my-meta-package-1.0.0-1.noarch.deb package.

Try install it and if package-one (= 0.1.0) is latest version in the repo - enjoy. If not and in repo exist package-one version great that 0.1.0 - install meta package will be failed.

RPM package behaves terribly similar. Difference - yum/dnf do not failed but install latest version.

I don't know how fix this issue!!!

Somebody know?
SEO Company, SEO Services in Sydney - Digital Moz
Tags: javascript, beginners, productivity, devops
Published: 2022-03-15 09:30:34

Trying harder to rectify the issues coming after you have executed on-page/off-page SEO activities onto your website/websites!! Wait, relax because **DigitalMoz**, a company located in Australia knows how to address those issues in the best possible ways? 

**Feel Free to Call +61 401 915 761
**

[https://www.digitalmoz.com.au/seo-company-in-australia.php](https://www.digitalmoz.com.au/seo-company-in-australia.php)
Opening effect with React Native like App Store feed
Tags: react, reactnative
Published: 2022-03-15 09:27:46

Imagine a feed of items and then you click on one item and it opens in the way shown in this video. I would like to create a news app that has this identical animation (check sec 00:09 of video https://bit.ly/36kJSot)

Is there a component for that?
Comparison: Laravel vs Yii
Tags: php, laravel, opensource, webdev
Published: 2022-03-15 09:25:53

Here is the comparison of Laravel vs Yii, to find which one suits your web development.

**Yii**
Yii is a free open source PHP framework widely used in web application development. Yii comes with Database aspect object, MVC, Ajax-based widgets, DB migration and several other attractive features of PHP. JQuery integration helps front-end developers to adopt this framework quickly.

**Laravel**
Laravel is the most elegant framework for PHP with dominant features like easy emailing, composer support and resourceful controllers. The framework uses simple as well as the expressive syntax for developing applications. Laravel is intended for creating meticulous and complex code bases.

Compare **[Laravel vs Yii](https://www.clariontech.com/blog/php-frameworks-comparison-laravel-vs-yii)**

Both Laravel and Yii include several excellent features; it becomes the [PHP developers](https://www.clariontech.com/hire-developers/hire-php-developers) choice to decide which one to choose. If you are looking for a framework to build a large-scale web app or an enterprise-grade app, Laravel is the ideal choice you can make. In case you want to build a simple web application or small-to-medium grade apps, then Yii can be the best choice.
International Women's Day 2022 - A Series of events
Tags: aws, inclusion, internationalwomensday, cloud
Published: 2022-03-15 09:13:52

International Women's Day 2022 kept me engaged with series of events which I enjoyed hearts content.

A Collage from IWD 2022 events.. 
![IWD-2022](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xh4hbhm5tuh0xbpic7el.png)

### Table of Contents
* [Greenway Health Panelist](#Greenway)
* [Girl Child Career Counselling by Infor](#Littleflower)
* [KSR College of Technology - Pinkathon, Women's Day and Guest Lecture](#KSRCT)
* [AWS User Group Madurai - Getting started with Amazon EC2](#AWSUGMDU)

### Greenway Health Panelist <a name="Greenway"></a>
Great to start Women's Day week in a #greenway and had a great conversation with elite members of the panel.

Thanks for the invite, Panchsheela Basavan and Prasan S. It's wonderful to join hands for a remarkable event after a decade while the whole world is geared up on #internationalwomensday and be an Infor representative.

**Greenway Health Invitation and Event Announcement**
![Greenway - Poster](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c9p6ujopsh9wxvkd4jj7.jpeg)


Read more from the blog - [IWD 2022 - Greenway Health](https://dev.to/aws-heroes/iwd-2022-greenway-health-5dl9)

### Girl Child Career Counseling by Infor <a name="Littleflower"></a>

As  part of Infor’s Girl Child Career Counseling Program initiative, I chose to extend the Counseling Program to 13- to 14-year-old kids of the Little flower school at my home town,  Sathyamangalam, TamilNadu, India. My school days maths teacher Mr. Hari Narayanan, Director of Little Flower school was delighted to host me.

![Littleflower Poster](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5cu17ocilicdttnlplbt.png)


Read more from the blog - [Girl Child Career Counselling by Infor](https://dev.to/aws-heroes/girl-child-career-counselling-by-infor-441d)

### KSR College of Technology - Pinkathon, Women's Day and Guest Lecture <a name="KSRCT"></a>

![KSR Poster](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4mu6f0uldpu5p732y6zy.jpeg)

Read more from the blog - [IWD 2022 - A day long celebration and learning at KSRCT](https://dev.to/aws-heroes/iwd-2022-a-day-long-celebration-and-learning-at-ksrct-40i5)

### AWS User Group Madurai - Getting started with Amazon EC2<a name="AWSUGMDU"></a>

Joined hands with AWS User Group Madurai to go live with first bilingual (English & Tamil) session.

![AWS UG MDU Poster](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ilsosbb6mdl5efajj1rh.jpeg)

Read more from the blog - [IWD 2022 - Getting started with Amazon EC2](https://dev.to/aws-heroes/iwd-2022-getting-started-with-amazon-ec2-gde)
Refactoring code with the Strate Pattern
Tags: designpattern, enum, tutorial, video
Published: 2022-03-15 09:07:41

<center>_Banner image from [Refactoring Guru](https://refactoring.guru/)_</center>

---

The [State Pattern](https://refactoring.guru/design-patterns/state) is one of the most helpful and also underrated Design Patterns that comes in handy when we end up having to make changes to multiple modules each time we need to add new logic based on the **state** of a particular object.

I hope this is helpful for you. Happy coding 🤝

{% youtube https://youtu.be/Sxr3lunr7FI %}
IWD 2022 - Getting started with Amazon EC2
Tags: internationlwomesday, aws, inclusion, ec2
Published: 2022-03-15 08:46:44

AWS User Group Madurai is the youngest of 25 AWS User Groups across India.

I was pretty excited to join hands with them to present bilingual (English & Tamil) session on **Getting stared with Amazon EC2.**

I was really happy and proud, as part of international women's day celebration, an engineering student has volunteered
to host the session. I have came to know that Anusha came forward and volunteered to host the session. She has a long way to go. It's not about only industry people, part of the User Group but also college students like Anusha should come forward try to learn and share knowledge. Thats is the first step to BREAK THE BIAS.
A Big thanks to AWS User Group Madurai User Group Leads - Vivek and Maheswarakumar for the invite. 

We are hosting our first bilingual session. Wondering how would it make a difference?

If we learn or teach any new technology in mother tongue it will be very comfortable and convenient and it is an UNDENIABLE FACT.
As a first attempt AWS User Group India's Madurai chapter, we presented our first English-Tamil technical session. We hope learners will like it.

**Anusha & Bhuvana**
![Anusha & Bhuvana](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9mjv5f4kucx8jbxs3peo.png)

**Bhuvana's Presentation**
![Bhuvana](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j4qpdcvb1z8xx707ghh2.png)

**A Token of love from AWS UG Madurai**
![memento](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vulyfs42me6uep2n1mv2.jpg)

**Recordings**
Madurai Channel: [https://www.youtube.com/watch?v=NAALk8N9hOw](https://www.youtube.com/watch?v=NAALk8N9hOw)
India channel: [https://youtu.be/R5SodLpQU3Q](India channel: https://youtu.be/R5SodLpQU3Q)
Configuring Domains and Sub-Domains in Apache webserver.
Tags: tutorial, devops, css, productivity
Published: 2022-03-15 08:40:40

## What are the Sub-domains?Why are Domains and Sub-Domains required?

Domains are well website name or the identity or a website, that one buys from a domain registrar website like google or GoDaddy and that is the address of your personal or professional website. 
And subdomains are the subset or part of a personal or professional website, where users can add and extend the main domain's functions and features.
For example, a user wants to start his Food tech business and also wants to write blogs about food, and also wants to tracks the business transactions of his business.

Each feature has different functionality on the application side, the calculation, tracking, and analysis on the dashboard, the text editor and content management for the blog, etc. 


Here, comes the subdomains part, why we need it. 
The user will create his home page on a different directory, blog features have different code and stores on the different directory and same for dashboard also, and now the apache webserver will be able to manage all these directories and able to handle the requests on domains and sub-domains using configuration on the virtual host.


## Configuring VirtualHost to Enable Domains and Sub-Domains

Change directory to the `/etc/apache2/` and select the configuration file which you want to edit for adding subdomains.
There must be two files one is `my-domain.conf` and the other is default configuration `000-default.conf`

```
$ sudo vi /etc/apache2/sites-available/my-domain.conf
OR 
$ sudo vi /etc/apache2/sites-available/000-default.conf
```

**Add Wildcard Subdomain**


Home Page - mysite.com (Main Domain) 
```
 <VirtualHost *:80>
   DocumentRoot /var/www/home
   ServerName mysite.com
 </VirtualHost>
```

Blog Page - blog.mysite.com (Sub-Domain)

```
<VirtualHost *:80>
   DocumentRoot /var/www/blog
   ServerName blog.mysite.com
 </VirtualHost>
```

Dashboard - dashboard.mysite.com (Sub-domain)

```
<VirtualHost *:80>
   DocumentRoot /var/www/dash
   ServerName dashboard.mysite.com
 </VirtualHost>
```

Wildcard Domain

```
<VirtualHost *:80>
     ServerAlias *.mysite.com
     DocumentRoot /var/www/html/wildcard/
 </VirtualHost>
```

**Final Configuration**

```
## HomePage
 <VirtualHost *:80>
   DocumentRoot /var/www/home
   ServerName mysite.com
 </VirtualHost>

## Blog Page
<VirtualHost *:80>
   DocumentRoot /var/www/blog
   ServerName blog.mysite.com
 </VirtualHost>

## Dashboard Page
<VirtualHost *:80>
   DocumentRoot /var/www/dash
   ServerName dashboard.mysite.com
 </VirtualHost>

## Wild Card
<VirtualHost *:80>
     ServerAlias *.mysite.com
     DocumentRoot /var/www/html/wildcard/
 </VirtualHost>
```

## Testing and Dry Run the Configuration

**Check the configuration by running the command:**

```
sudo apachectl configtest
```

**Reload and Restart the server**

```
# Reload
$ sudo service apache2 reload

# Restart
$ sudo service apache2 restart
```
Constructor Property Promotion in PHP 8
Tags: php, oop, php8, programming
Published: 2022-03-15 08:10:19

{% youtube MZVvWkGUzTA %}

👉  In today's PHP workshop, we will see why the promoted constructor property is game-changing [in PHP 8](https://wiki.php.net/rfc/constructor_promotion)!

Adding the access modifier (`public`, `protected`, `private`) before the property name will tell PHP to treat the constructor arguments as "property promotions".

Happy coding! 🤠 I'm sure you will love using this feature in your next PHP 8+ project 🎉

👉 If you wish to go further, my Udemy course teaching how to build a complete PHP 8 application from scratch is now available: https://www.udemy.com/course/create-real-world-php-webapp-from-scratch/
A Fun Programming Joke To Start Your Day
Tags: jokes, dailydeveloperjokes
Published: 2022-03-15 08:00:04

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

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259b4a4ae9.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

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

<!--
Joke text:
___Q:___ Why do developers mixup Terminals and Polygraphs?

___A:___ Because they both can see a lie (CLI)
 -->
My Favorite YouTubers
Tags: discuss, webdev, productivity, programming
Published: 2022-03-15 07:36:46

For me, the best way to expose myself to new technologies and concepts is through videos, 'cause ain't nobody got time for reading!

![ain't nobody got time for that](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qdxntcuqxlp5rn9kfu6u.png)
 

So, here are my favorite youtubers and why:

## [Fireship](https://www.youtube.com/c/Fireship)
![Fireship logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zwsat34wcg96yox3b6hs.png)
 
Sometimes all we want is the gist of a technology, something fun and easy to digest, Fireship is great for that.

---

## [Honeypot](https://www.youtube.com/c/Honeypotio)

![Honeypot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfqvptqns53zaupbw795.png)

And sometimes we want to see a movie (documentary) about our favorite technology...ahem GraphQL ahem...
Honeypot gives a Netflix vibe but is directed towards us, developers.

---

## [Dev Ed](https://www.youtube.com/c/DevEd)

![Dev Ed logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aq9gzwe5x87z8znifa9d.png)

Dev Ed makes every tutorial funny and interesting at the same time which is pretty difficult to do. I learned the basics of react from him and they were a great foundation!  

---

## [freeCodeCamp.org](https://www.youtube.com/c/Freecodecamp)

![freeCodeCamp logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2m3si35457u8ivozda6n.png)

When you finally have the energy and the time to sit through an in-depth video freeCodeCamp has a lot to offer.

---

## [Kevin Powell](https://www.youtube.com/kepowob)

![Kevin Powell](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5yqxdjb8xzcsuwgwjsjo.png)

The CSS king, nothing much to say accept that he produces understandable and easy to follow videos about CSS, SCSS and goes into depth about flex examples, which are really helpful.

---

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

![Web Dev Simplified](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r5f2khwmuiw3a524ial1.png)
 
Web Dev Simplified is last on this list, but it’s because I was saving the best for last. 
His channel is full of sorties of tutorials and he explained them so well!
I especially recommend his videos of React hooks 🪝.

---

## ⚡️BONUS TIP⚡️
Don't forget, when it gets boring, or as I like to say you become smarter, you can always speed things up by pressing on  the settings of the video and changing the playback speed!

![Youtube - change playback speed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ds89c22pvrksv2ynv1vj.png)
 

### Thanks for reading, and a big thanks to all the YouTubers! 

### 🙏🏼 🙏🏼 🙏🏼


![KEEP LEARNING](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99ep8uh06zfmh42xa217.png)
Express Server
Tags: node, express, api, javascript
Published: 2022-03-15 07:29:19

**Prerequisites** : Node, npm

**Steps**:

1. `npm init` in the root folder. Fill up the details and it will generate a package.json for you. You may change the entry point to server.js, optional. Create a folder "backend" and inside it a file "server.js"

2. Edit the package.json file and add in the scripts object, the following:
`"start": "node backend/server.js",
 "server": "nodemon backend/server.js"`

3. Install the dependencies: 
`npm i express dotenv`
`npm i -D nodemon` -D implies that it is a devDependency.


**Lets Edit the server.js file now to spin up a server.**


![nodejs code for express server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rs9knb7m8bjfchxnifyp.png)

- Bring in express and other stuff by requiring it at the top.
- dotenv is used so that we can use  Environment variables.
- Specify the `PORT=5000` in a .env file, that way we can acces it in the code like `process.env.PORT`
- Make a instance of express, using its constructor and assign it to app
- Call the listen method on app object and pass in the port and the callback

Now, you can fire it up by running the command `npm run server`, this way nodemon will watch our files for changes and server will be up and running.
React, Vue and Svelte: Comparing Children Component
Tags: javascript, react, vue, svelte
Published: 2022-03-15 07:05:17


## Children in...
### React
[Link](https://stackblitz.com/edit/vitejs-vite-qhfsx2?file=src/App.tsx)

```jsx
// Parent Component
<User>
  Front-end Developer
</User>

// Child Component
const User = (props) => {
  return <p>{props.children}</p>
}
```

### Vue
[Link](https://stackblitz.com/edit/vitejs-vite-1ifejl?file=src/App.vue)

```jsx
// Parent Component
<User>
  Front-end Developer
</User>

// Child Component
<template>
  <slot>Display if no children passed</slot>
</template>
```

### Svelte
[Link](https://stackblitz.com/edit/vitejs-vite-qlpu5c?file=src/App.svelte)

```jsx
// Parent Component
<User>
  Front-end Developer
</User>

// Child Component
<div>
  <slot>Display if no children passed</slot>
</div>
```
The Oven...
Tags: webdev, design, cloud
Published: 2022-03-15 06:40:44

"Hello World"

Haha, I tend to see that phrase a lot these days so I can as well us it. So, I'm WANDE and I unofficially started my journey on this path (a career transition)in October last year.

I'm trusting myself to document my journey and do some #technicalwriting to help people overcome problems I may have faced along the way. 

The Oven a.k.a the journey is mine because I'll be 80% baking myself (the awesome boot camps I'm in deserve credit haha) and I'm looking forward to how far i would have developed myself.


Cheers to doing hard things...
Bismillah