teleren/devto huggingface dataset:
jcdsbidf
Published: 2022-03-31 09:13:05

<img src="https://raw.githubusercontent.com/aru31/test-blog-publish/master/media/google.png" alt="another tag" />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.
<img src="https://raw.githubusercontent.com/aru31/test-blog-publish/master/media/download.png" alt="another tag" />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.
Rails snack - Upgrade to Ruby 3
Tags: ruby, upgrade, rails
Published: 2022-03-31 09:02:58

There are a [couple](https://www.fastruby.io/blog/ruby/upgrades/upgrade-ruby-from-2.7-to-3.0.html) [of](https://reinteractive.com/posts/499-no-app-left-behind-upgrade-your-application-to-ruby-3-0-and-stay-on-the-upgrade-path) [posts](https://dev.to/michaelcurrin/upgrade-to-ruby-3-update-projects-9id) I found online for the upgrade of Ruby to version 3. Very few of them mentioning Rails and its issues during the upgrade.

My versions prior to the upgrade:
```bash
rails -v
Rails 7.0.2.3

ruby -v
2.7.5

gem list
sidekiq (6.2.2)
```
I'm mentioning _sidekiq_ since it is the most commonly used background processing for Rails (and I had problems when updating 😅).

The two problems I had (not mentioned anywhere):

{% details  1. ActionCable.server.broadcast %} 
[This one](https://github.com/rails/rails/issues/40993) went under the radar but without this change ActionCable won't work. Rails contributors [fixed the issue](https://github.com/rails/rails/pull/41050) but here it is for everyone
{% enddetails %}

{% details  2. Sidekiq (and gems connected to it) %} 
I had to upgrade sidekiq to the newest version because of the issue of log clutter. Specifically, [this deprecation message](https://github.com/mperham/sidekiq/issues/5178#issuecomment-1029545859). This has since been fixed (so update sidekiq). But not all gems connected to sidekiq have since caught up (sidekiq-statistic, sidekiq-cron... to mention a few). This is very annoying, especially for anyone using foreman, makes the logs unreadable. So keep an eye for updates if you are using any of these.
{% enddetails %}


Would love for anyone who did the update to contribute with a comment below. Add any problems you had that were not mentioned anywhere so we can help as many people as possible in one place ❤️
How to Show a div near Cursor position on hover in React js?
Tags: react, hover, javascript, webdev
Published: 2022-03-31 08:59:09

I have two Text Items, item1 and item2, and a div with some text inside. I want to keep the div hidden by default but show it at cursor position when I hover on Text item1 or item2. Please check the sample GIF animation in this Link: https://i.stack.imgur.com/e4lpB.gif

I tried this in Jquery code inside React. But it gives error.

`$(".text-item").mouseenter(function (e) {
  $(".box")
    .css({
      position: "absolute",
      right: e.pageX,
      top: e.pageY,
      display: "block",
    })
    .show();
});`
Pre-increment Operator: C Program
Tags: c, programming, webdev, tutorial
Published: 2022-03-31 08:58:55

**In pre-increment, first the value of the variable is incremented after that the assignment or other operations are carried**

```
#include <stdio.h>

int main()
{
int a = 11 ,b;
b = ++a;  
  
    printf("b = %d\n\n", b);  
    printf("a = %d\n", a);  
  
    return 0;  
}
```
***************************************************************
**Output**
b = 12
a = 12

*Here first the value of a increments and then is assigned to variable b. So both a and b value will be 11.*
Error Fix: Source "@openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File import callback not supported
Tags: openzeppelin, web3, solidity, vscode
Published: 2022-03-31 08:55:32

If you've tried to work with @openzeppelin/contracts on VS Code, you might come across this error 

![VS Code Error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8najv54hnvhu89pocw16.png)
 

The issue above is not with your code but with a particular VS Code extension - *Solidity extension* by Juan Blanco.

The latest version of v0.0.137 shows that error. To correct this

- Go to Extensions and search for Solidity
- You should see something like this

![Juan Blanco Solidity VS Code extension](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7qfpdq5srrgwtnvb9h2c.png)
- Click on the dropdown beside the Uninstall button and select *Install Another Version*

![Install Another Version ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dvxw71bd0ohmsd0hfvjp.png)
 
- Select Version 0.0.135 from the list of options
![Version List](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x4xzuspbv168jyy5tckn.png)

- Allow the version to install
![Installation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/av55nbe80ocnjygcrvff.png)

- Once the installation is done, you will be required to reload VS Code and the error should be gone at this point

![Restart VS Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/968i0y98l0kgp9eoy5ld.png)
 
Viola🥳🥳🥳🥳🥳🥳

![Error Fixed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tcf23uyc42pyv1sgohx.png)

The issue should be gone by now.

Hopefully, this issue is fixed in the next version release of v0.0.138
YOYOYOYOYO
Published: 2022-03-31 08:55:10

<img src="https://raw.githubusercontent.com/aru31/test-blog-publish/master/media/google.png" alt="another tag" />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.
<img src="https://raw.githubusercontent.com/aru31/test-blog-publish/master/media/download.png" alt="another tag" />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.
SPFx 1.14 List View Command Set - UPDATE 31.03.2022
Published: 2022-03-31 08:53:41

As of today, the [issue #7795](https://github.com/SharePoint/sp-dev-docs/issues/7795) I referenced in my previous post is fixed and the business logic List View Command Set can be "cleaned up". 

Using the example from my [previous](https://dev.to/kkazala/spfx-114-list-view-command-set-updates-4b5p) post I can now show/hide buttons, depending on the list context, during `onInit`:

### Show/hide buttons during onInit 

#### CommandSet.ts
```typescript
const registeredList: string[] = ['Travel requests'];

public onInit(): Promise<void> {

  const setCommandsState = (isVisible:boolean) => {
    const compareOneCommand: Command = this.tryGetCommand('COMMAND_1');
    if (compareOneCommand) {
      //Visible for registered lists, does not depend on selected item
      compareOneCommand.visible = isVisible;
    }
  
    const compareTwoCommand: Command = 
    this.tryGetCommand('COMMAND_2');
    if (compareTwoCommand) {
      //Visible for registered lists, enabled if 1 item selected, so disable by default
      compareTwoCommand.visible = isVisible;
      compareTwoCommand.disabled = true;
    }
  }

  const getListUrl = (listUrl: string): string => {
    let result = listUrl.match(/Lists\/(?<ListName>.*)/);
    return result.groups["ListName"];
  }

  setCommandsState( registeredList.includes(getListUrl(this.context.listView.list.serverRelativeUrl)));
  return Promise.resolve();
}
```
### command.disabled
Next, I would like to enable my 'COMMAND_2' button only, if exactly one item is selected. This is a job for `onListViewUpdatedv2`: 

#### CommandSet.ts
```typescript
public onListViewUpdatedv2(args: ListViewStateChangedEventArgs): void{
  const compareTwoCommand: Command = this.tryGetCommand('COMMAND_2');
  compareTwoCommand.disabled = !(this.context.listView.selectedRows.length == 1);  
  this.raiseOnChange(); //is it needed? seems to have no effect
}
```
But... it does NOT seem to work: [issue #7845](https://github.com/SharePoint/sp-dev-docs/issues/7845). :frowning:
Will keep you posted.
Something Different
Published: 2022-03-31 08:49:06

<img src="https://raw.githubusercontent.com/aru31/test-blog-publish/master/media/google.png" alt="another tag" />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.
From Toxic to Antidote: Scrap the Comfort zone for growth
Tags: comfortzone, growth
Published: 2022-03-31 08:35:51

Why do we need to step out of our comfort zone?

We all have our own set of limits and comfort zones. We don’t typically move out of our comfort zones since we are safe and secure in what we know.

This article looks at the shifts in thinking required to step outside of comfort and into personal growth and the benefits can be achieved by leaving our comfort zone.
You can read full article here [https://blog.canopas.com/from-toxic-to-antidote-scrap-the-comfort-zone-for-growth-683301f210f6](https://blog.canopas.com/from-toxic-to-antidote-scrap-the-comfort-zone-for-growth-683301f210f6)
Installation of Perl on Linux/Unix 2022
Tags: perl, linux, ubuntu, centos
Published: 2022-03-31 08:34:17

Perl is already installed in [Linux](https://en.linux.perlzemi.com/)/[UNIX](https://en.wikipedia.org/wiki/Unix) in many cases.

This is originally <a href="https://en.perlzemi.com/blog/20180813153411.html">Installation of Perl on Linux/Unix | Perl ABC</a>

Check if Perl is installed on Linux/UNIX by the following command.

<pre>
perl -v
</pre>

If you see the version of Perl, Perl is already installed.

<pre>
This is perl 5, version 32, subversion 1 (v5.32.1) built for x86_64-linux
(with 1 registered patch, see perl -V for more detail)
</pre>

### Installation of System Perl

If the system doesn't have Perl , you can install the Perl using package managers such as [apt](https://en.ubuntu.perlzemi.com/blog/20200530085516.html) or yum.

#### Ubuntu

How to [install Perl on Ubuntu](https://en.ubuntu.perlzemi.com/blog/20200616085351.html).

<pre>
# Installation of Perl on Ubuntu
sudo apt install perl
</pre>

#### Debian

How to install Perl on Debian.

<pre>
# Installation of Perl on Debian
apt-get install perl
</pre>

#### CentOS/Redhat

How to install Perl on [CentOS](https://en.centos.perlzemi.com/)/Redhat.

<pre>
# Installation of Perl on Cent OS
yum install perl
</pre>

#### FreeBSD

How to install Perl on FreeBSD.

<pre>
# Installation of Perl on FreeBSD
pkg_add -r perl
</pre>

### Installation of Perl on your home directory

If you want to install the specific version of Perl on your home directory, you can use **perlbrew** or **plenv** according to your taste.

* [perlbrew - Install Perl on your home directory](https://en.perlzemi.com/blog/20110220130464.html)
* [plenv - Install Perl on your home directory](https://en.perlzemi.com/blog/20180816153437.html)
How to get quality traffic from search engine in 2022
Tags: seo
Published: 2022-03-31 08:07:10

Guy's now its very tough to get quality traffic on your site in 2022. But there are some technique and tools that you can use to get quality traffic.
Search engines like google pronounce them as [SEO](https://saukrit.com). I hope you all may be aware with the term SEO. because in present days it's almost imposible to get traffic without SEO.
In this article we will discuss about all the component of SEO. that can help you to bring quality traffic on your blog or website.
These are-
Off-page SEO: Off page SEO includes Backlink that you can done with guest post writing.
Along with this [profile creation sites list](https://saukrit.com/profile-creation-site-list/) also help to get quality backlink it also help in branding
If you are lokking for quality backlink you can try [social bookmarking sites](https://saukrit.com/social-bookmarking-sites-list/)
On-Page SEo: Under the on page SEO we look for the technical SEO which help to improve website performance.
Keyword optimization:
Keyword optimization is one of the important component of SEO. If you are chossig write keyword it will get rank Easly.
Today's Daily Dose of Programming Humor
Tags: jokes, dailydeveloperjokes
Published: 2022-03-31 08:00:28

---
title: "Today's Daily Dose of Programming Humor"
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/5e1258e0be565.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:___ How did pirates collaborate before computers ?

___A:___ Pier to pier networking.
 -->
Booking Typescript API with Express, typeORM and Postgres
Tags: node, typescript, express, orm
Published: 2022-03-31 07:53:39

Simple booking api attempt with [Typescript](https://www.typescriptlang.org), [Express](https://expressjs.com), [TypeORM](https://typeorm.io) and [Postgres](https://www.postgresql.org).
Testing with [Jest](https://jestjs.io) & [Supertest](https://github.com/visionmedia/supertest).

### The code

[Project repo](https://github.com/ihaback/booking-api)

### Clone project

```
git clone git@github.com:ihaback/booking-api.git
```

### Project setup

```
npm install
```

### Prerequisites

- Node
- Docker

## Project setup

```
npm install
```

### Rename .env.example to env

Change `NODE_ENV` to `prod` if you want to test building prod version locally.

```yaml
NODE_ENV=dev
DB_TYPE=postgres
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_INSTANCE=postgres
DB_SYNCHRONIZE=true
JWT_SECRET=secret
```

### Run docker compose for Postgres DB

```
docker-compose up
```

### Start dev server and seed database with initial data

```
npm run dev
```

### Run tests against Postgres DB with jest & supertest

```
npm run test
```

### Lint code to detect issues

```
npm run lint
```

### Build code for production

Make sure your `NODE_ENV` is set to `prod`.

```
npm run build
```

## Login to receive jwt token for subsequent request

```bash
POST http://localhost:3000/api/auth/login
```

```json
{
  "username": "admin",
  "password": "admin"
}
```

#### Use token from login respone in the auth header for subsequent request

```
generated-token
```

## Create booking

```bash
POST http://localhost:3000/api/bookings
```

```json
{
  "startDate": "2022-03-24 18:46:55.223294",
  "endDate": "2022-03-24 18:46:55.223294",
  "cost": 100,
  "destinationId": 1 // id for destination
}
```

## Get all bookings

```bash
GET http://localhost:3000/api/bookings
```

## Get single booking

```bash
GET http://localhost:3000/api/bookings/:id
```

## Update booking

```bash
PUT http://localhost:3000/api/bookings/:id
```

```json
{
  "startDate": "2022-03-24 18:46:55.223294",
  "endDate": "2022-03-24 18:46:55.223294",
  "cost": 10000
}
```

## Delete booking

```bash
DELETE http://localhost:3000/api/bookings/:id
```

## Create destination

```bash
POST http://localhost:3000/api/destinations
```

```json
{
  "name": "New York",
  "description": "description",
  "state": "New York",
  "city": "New York",
  "cost": 100,
  "maxGuests": 2,
  "available": true
}
```

## Get all destinations

```bash
GET http://localhost:3000/api/destinations
```

## Get single destination

```bash
GET http://localhost:3000/api/destinations/:id
```

## Update destination

```bash
PUT http://localhost:3000/api/destinations/:id
```

```json
{
  "name": "Los Angeles",
  "state": "California",
  "city": "Los Angeles",
  "cost": 100,
  "maxGuests": 2
}
```

## Delete destination

```bash
DELETE http://localhost:3000/api/destinations/:id
```
Have you heard of Mizu ???
Tags: cncf, kubernetes, cloud, microservices
Published: 2022-03-31 07:53:24

Let us accept and digest the fact that as the global cloud adoption and cloud-native trends are picking the pace, the developers are having a real tough time, especially with troubleshooting and debugging. With the fast-paced adoption of microservices and container orchestrators like Kubernetes, there is always a demand for new tools for testing, debugging, observability and logging.

As more and more organisations are moving towards API driven architecture with the microservices model, it is getting more difficult and painful for the developers to generate payload traffic to test or debug the APIs.

This is where **_Mizu_**, an open-source project from microservice testing platform **UP9, Inc**. comes to the rescue. It is a utility that makes it possible for developers to visualize all their API traffic in a kubernetes cluster in a local web-app. _You can compare it to Wireshark for Kubernetes._

Mizu is an API traffic viewer for Kubernetes enabling you to view all API communication between microservices to help your debug and troubleshoot regressions.You can run Mizu on any Kubernetes cluster (version of 1.16.0 or higher) in a matter of seconds.

Mizu injects a container that performs a tcpdump-like operation at the node level of a Kubernetes cluster. This operation can be performed on-demand via a CLI that injects the container when run. And when ^C is used, the container is removed. Mizu is not a proxy and passively observes the traffic at the network level.

The Mizu CLI is written in Golang and can be downloaded and run without installation. Mizu uses kubectl, and hence can run on any node through which kubectl is configured. Mizu has a filtering system built atop a database software called Basenine. It is schema-free and built for the fastest possible write speed and a read speed that scales linearly.

Mizu does support HTTP/1.x, HTTP/2, AMQP, Apache Kafka and Redis protocols.
_
Another benefit of Mizu is that it does not require code instrumentation. It can be used in a true on-demand fashion without prior preparation.

**Getting Started with Mizu**
You can download Mizu by using the latest release from GitHub([https://lnkd.in/g9yvMe4s]) 

You can also compile it from the source code located here:[https://lnkd.in/gaPjr6KC]
Transformational or empowering leadership styles create better leaders in the Internet Age
Published: 2022-03-31 07:48:19

Geographically dispersed teams are becoming a necessity as the trend of remote working continues. Leaders need to adapt their approach to take this into account.  Transformational or empowering leadership styles help especially when we are all remote. Well this is the academic essay I wrote for my studies. The rest of it is at: https://blackmill.co/blog/transformational-or-empowering-leadership-styles-create-better-leaders
Is Python or Ruby better
Published: 2022-03-31 07:41:24

Need to build an online shop [gogomum](https://www.gogomumstore.com) for Pregnancy Essentials | Newborn Baby Products.
Is Python or Ruby better???

Ruby is a universal, dynamic, object-oriented programming language. It is straightforward to learn compared to other programming languages. Yukihiro Matsumoto invented this language in Japan in the mid-1990s.
Features of Python Programming
Tags: programming, python
Published: 2022-03-31 07:15:52

The portable and extensible homes of Python enable you to execute cross-language procedures effortlessly. Python is supported by a lot of platforms present in the industry .

Python is an amazing language that uses simplified as well as easy-to-understand codes for creating programs.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kf92t9kpgy0i5nurd7an.png)
Its big as well as durable typical library makes [Python](https://insideaiml.com/blog/What-are-The-Key-Features-of-Python-1147) rating over other programming languages.
Something Different
Published: 2022-03-31 07:09:37

<img src="https://raw.githubusercontent.com/SarthakNarayan/Portfolio-blog-website/main/static/media/ftp-automation/cover-ftp.jpg" alt="another tag" />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.
Instagram style stories in ReactJs
Tags: javascript, react, webdev
Published: 2022-03-31 07:04:25

Since the launch of Snapchat stories, every major social media platform has introduced stories format in their platform. so i tried to recreate the same format in ReactJs. 

I created a simple Stories component which allows your to add stories format to your web application in few seconds. 

Introducing [Stories-React](https://github.com/hannadrehman/stories-react). 

<img src="https://camo.githubusercontent.com/4982b91a857d4f6b7d3ec0085e7402aba209ca61ba25f8e26a7e7af829a2bc0f/68747470733a2f2f692e696d6775722e636f6d2f713359344170522e706e67" />

#### Install
`npm install --save stories-react`

#### Usage
```jsx
import React from "react";
import Stories from "stories-react";
import "stories-react/dist/index.css";

function ImagesStories() {
  const stories = [
    {
      type: "image",
      url:
        "https://images.pexels.com/photos/9470805/pexels-photo-9470805.jpeg?w=300",
      duration: 5000
    },
    {
      type: "image",
      duration: 6000,
      url:
        "https://images.pexels.com/photos/9733197/pexels-photo-9733197.jpeg?w=300"
    },
    {
      duration: 7000,
      type: "image",
      url:
        "https://images.pexels.com/photos/10964888/pexels-photo-10964888.jpeg?w=300"
    },
    {
      type: "image",
      duration: 6000,
      url:
        "https://images.pexels.com/photos/10985425/pexels-photo-10985425.jpeg?w=300"
    },
    {
      type: "image",
      url:
        "https://images.pexels.com/photos/9470805/pexels-photo-9470805.jpeg?w=300",
      duration: 5000
    },
    {
      type: "image",
      duration: 6000,
      url:
        "https://images.pexels.com/photos/9733197/pexels-photo-9733197.jpeg?w=300"
    }
  ];

  return <Stories width="400px" height="600px" stories={stories} />;
}

export default function App() {
  return (
    <div className="App">
        <ImagesStories />
    </div>
  );
}


```
#### Demo
[CodeSandbox demo](https://codesandbox.io/embed/react-stories-b6yos?fontsize=14&hidenavigation=1&theme=dark)

[All Story type demos](https://hannadrehman.github.io/stories-react/docs/tutorial-basics/image-stories)

### References
[Stories React Blog post](https://hannadrehman.com/how-to-integrate-instagram-snapchat-style-stories-into-your-react-js-application)
CSS NeuBrutalism Card
Tags: neubrutalism, css, neobrutalism, malewicz
Published: 2022-03-31 07:01:36

Maybe you already know, the new UI super cool trend is _**neubrutalism**_

this is M. Malewicz definition:

> Neo brutalism ditches most of that and merges traditional layout concepts with super-high contrast, solid, often purposefully clashing colors and simpler, yet quirky typography.

> People think: I can do this myself! 

But it's not that simple!

This is a super _brutal_, first attempt...

[Video](https://youtu.be/BRybWulMaZ8)

You can read the full M. Malewicz article here

[https://hype4.academy/](https://hype4.academy/articles/design/neubrutalism-is-taking-over-web)