teleren/devto huggingface dataset:
User Role Editor
Tags: woocommerce, userrole, editor, plugin
Published: 2022-08-18 11:19:57

[WooCommerce user roles](https://woocommerce.com/products/user-roles-editor-for-woocommerce/) allows you to assign and switch user roles automatically by setting different cart and product related conditions.

Key Features of User role editor is

1. Assign roles to new users
2. Automate user-role switching
3. Manager user roles with multiple rules
4. Set criteria for user role-switching and gaining
5. Change or assign new roles based on:
6. Specific product purchases
7. Purchasing from a specific category
8. Placing orders of a higher price range
9. Exceeding total purchase in a range
10. Schedule user role changes
11. Revoke assigned roles and explain the changes with custom reasons
12. Email notifications when roles shift
13. Exclude specific users from the rule
14. Users and admins can access the role-change history

For More Information: https://woocommerce.com/products/user-roles-editor-for-woocommerce/
Custom Shipping Icons for WooCommerce
Tags: woocommerce, shipping, icons, plugins
Published: 2022-08-18 11:31:40

[WooCommerce shipping icons plugin](https://woocommerce.com/products/custom-shipping-icons-for-woocommerce/) allows shop owners to create custom icons with descriptions to make shipping methods clear and attractive.

Features of WooCommerce shipping icons are:

1. Create custom shipping icons with custom descriptions.
2. Display custom icons on the cart and, or checkout pages.
3. Customize icon positions, icon sizes, text sizes, and text colors.

**For More Information:** https://woocommerce.com/products/custom-shipping-icons-for-woocommerce/
One New Healthy Habit this Month
Tags: beginners, webdev, challenge, mentalhealth
Published: 2022-08-18 11:29:00

Learning web development is a lot of work. It's fun but the work never ends.

Between collaborating in an open source unfamiliar codebase, starting a fullstack project with other developers, being more involved in the community, taking a computer science course and submitting problem sets, learning about Redux and using it in a personal project, exploring the job market as an early career developer looking for advice and networking, AND writing my first blog post, my mind has certainly been busy.

I try to stay healthy - I mostly cook at home and keep consistent at the gym where weightlifting and cardio are part of my routine. Still, I kept getting excited at night thinking about code, solving the next problem or all the cool things I could do with a skill like coding. But I need to learn to give my brain a rest.
<br />
## The Challenge: A New Habit

I decided to join in on VC’s monthly challenge called [“Healthy habits for Happy devs.”](https://virtualcoffee.io/monthlychallenges/aug-2022)

This challenge couldn’t have come at a better time! I decided my goal would be 5 minutes of meditation every day for 30 days, and hopefully keep the new habit going after that. I needed to learn to quiet the mind, to prevent burnout and have a healthy long-term career. This new habit would also help me process my learning.
<br />
### Achieving the Goal
Developing a new habit is basically a new goal so there has to be a plan.

1. I started to track the habit daily by blocking the time on my calendar. The goal is small enough that it should be easy to do daily.

2. My favourite way of creating a new habit is [The Xeffect](https://www.reddit.com/r/theXeffect/wiki/index/), where I go full-on old school [pen and paper](https://imgur.com/zupkEZb) to keep track by crossing off a big X on a large square.

3. I downloaded a free meditation app. I'm not a big fan of guided meditation so I use the app's timer function. I can set the number of minutes, whether or not there is a bell to tell me it's the end of the meditation and if I want to listen to any sounds/music during it or just focus on my breathing and listen to nothing.

I just sit comfortably or lay down, and start by taking 3 slow deep breaths in and out. When I realize my thoughts trailed off, I just bring my attention back to my breathing. Repeat until the bell rings.
<br />
### Halfway there

Here's what my Xeffect looks like.
![xeffect](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/svt6l11s0pf9wvkjfxu4.jpg)

I can't find my markers but anything will do as long as I have a way of keeping track.
<br />
## Conclusion

It’s been two weeks. It feels like a chore to start but some days, once the 5 minutes are up I wish I could sit there longer. So I’m gonna up it to 10 minutes a day and see how that goes.
Price Guaranteed for WooCommerce
Tags: woocommerce, name, your, price
Published: 2022-08-18 11:25:42

[Name your price WooCommerce plugin](https://woocommerce.com/products/price-guaranteed-for-woocommerce/) invites your customers to share product prices that beat yours and allows you to bid for their business.

Key Features of this plugins are:

1. Offer the lowest prices to potential customers
2. Allow customers to submit competitors’ prices
3. Manage price requests from a user-friendly dashboard
4. Send coupons to offer the best prices
5. Incentivize shoppers with free shipping offers
6. Notify customers of price discounts and coupon expiration dates via emails
7. Customize the price-request popup to match your store’s theme
8. Add additional custom fields to the popup
**For More Information:** https://woocommerce.com/products/price-guaranteed-for-woocommerce/
Cart Limits for WooCommerce
Tags: woocommerce, cart, limit, plugins
Published: 2022-08-18 11:22:52

[WooCommerce quantity manager plugin](https://woocommerce.com/products/cart-limits-for-woocommerce/) enables you to add cart checkout restrictions based on rules and conditions you set.

Key Features of Cart Limits for WooCommerce are:

1. Limits total cart amount or product quantity
2. When a customer reaches the maximum cart quantity, it stops them from adding products or allows them to replace items in their carts with new items
3. Allows customers to replace the first or last cart item
4. Displays customizable message
For More Information: https://woocommerce.com/products/cart-limits-for-woocommerce/
How I run code on twitter
Tags: bot, twitter, coderunner, programming
Published: 2022-08-18 11:20:43

Ever ran code right on twitter? No, right? Now you can! 😎
Imagine writing code in twitter and someone runs the code for you and reply with output. No, it's not possible that a human will reply you with the output every time. 😅

Here my twitter bot [@coderunnerbot](https://twitter.com/coderunnerbot) comes handy. It will reply you with the output of your code every time you mention it in your tweet containing the code and use the command `run`.

Still not sure how to use it? Here is how

Just mention [@coderunnerbot](https://twitter.com/coderunnerbot) in your tweet followed by the command `run` followed by the code you want to run in [markdown format](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks). [@coderunnerbot](https://twitter.com/coderunnerbot) will reply you with the output of your code.

Example: 
![Code run example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dfjub3e8bihv48ut8v5x.png)

{% embed https://twitter.com/decodeprasant/status/1559601137887907840 %}
 

## What else can coderunner bot do? 

It can also render your html, css, js code
Mention [@coderunnerbot](https://twitter.com/coderunnerbot) in your tweet followed by the command `render` followed by the code you want to render in [markdown format](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks).

Example:
![Code Render example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8xj8dv9we5mcrvsc13n5.png)

![Rendered page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6a79cxm3d4zvq01no0lp.png)

{% embed https://twitter.com/decodeprasant/status/1560217332441829376 %}

Still confused? Here is the [guide on how to use the bot](https://coderunnerbot.vercel.app/).

Thanks for reading!
Becoming an Expert is Simple
Tags: productivity, entrepreneur
Published: 2022-08-18 11:13:49

I'm extremely impressed with the Gymnast that performs 15 back handsprings in a row.

It looks effortless.

It's like they're a different type of human compared to me. One with abilities I'd only dream of having.

Naturally you'd think they're gifted.

You don't really want to admit that it's just a LIFETIME of hard work.

Hours and hours of repetition. Doing the same thing over and over. Making small tweaks to your technique and doing it again.

Most people will never reach the level of expert at anything because they lack the Grit required to get there.

### Outliers

In the book Outliers, it boils down to the person and the situation.

A child's environment massively impacts their ability to excel at a particular thing.

If I remember correctly, Bill Gates was one of the first kids in his town to get access to a computer and hours of alone time.

Tinkering and playing with this new invention.

Hours with something that many had only seen in magazines.

By the time it was commercially available, the amount of hours he had racked up with PCs put him in the realm of experts on the topic.

He was miles ahead of the pack.

Even if he had no affinity for PCs compared to his peers, he had a massive head start with learning how to use them.

The mythical 10,000 hours.

### Difficult Practice

Lessons learned the hard way are lesson that stick.

Learning doesn't happen when things are easy.

[Don't ask for things to be easy, you don't want things to be easy.](https://www.calvintorra.com/blog/my-observations-of-what-7-figure-earners-have-in-common)

Ever think you understand and KNOW something that is obvious, only to forget it later?

Ever spent days or weeks revisiting a topic that just doesn't make sense and then finally....having that eureka moment?

That eureka moment is that one that will be etched into your brain for the rest of your days, like a battle scar.

Most people pratice in ways that are easy. Ways that are effortless.

Never growing, never pushing themselves beyond their capabilities.

Spinning their wheels. This is maintenance, not growth.

We can all be experts in our field.

Is it simple? Yes

Is it easy? No, but you don't want things to be easy right?
Customer Order Cancellation for WooCommerce
Tags: woocommerce, order, cancellation, plugin
Published: 2022-08-18 11:09:17

[WooCommerce cancel order plugin](https://woocommerce.com/products/customer-order-cancellation-for-woocommerce/) let your customers cancel orders if they have change in mind or made by mistake. Admin can approve or disapprove cancellation requests.

Key Features of Customer order cancellation are:

1. Allows customers to cancel orders
2. Auto or manual approval of canceled orders requests
3. Option to charge an order cancellation fee
4. Option to pay full or partial refunds for a canceled order
5. Ask customers for a reason for their order cancellations
6. Provide a list of cancellation reasons for customers to select
7. Inform customers and store owners about cancellations
8. Hide the cancel order button or display it to specific users
9. Allows users to cancel orders for selected products
10. Enable the Cancel Order button for selected statuses only
11. Allows customers to order again with the reordering button
12. Hide the Cancel Order button after a specific time

For more details: https://woocommerce.com/products/customer-order-cancellation-for-woocommerce/
My life as a Software Development Student.
Tags: webdev, javascript, programming, beginners
Published: 2022-08-18 11:06:00

Hello folks,

My name is Malvin. I am new to coding. In this piece, i'll share with you my journey this far as a Software Engineering  student. 

To understand this, let me take you back a bit. I first interacted with code about a year ago out of curiosity. I was casually browsing a website when i got intrigued by how websites actually do work. A fast forward to that is my stars aligned; i applied for a bootcamp and a year later i got the scholarship. A silver lining in a cloud!

At first it was a bummer,i am not used to spending that much time infront of the computer. However, lately i have had to re-adjust some of my habits to cope with the new craft. I am of the strongest belief that it takes a little bit of stretching to be skillfull and practice to reach near perfection. 

My typical day begins at 4.00am. I start with my morning prayers followed by a cup of cofee as i plan my day. At 8.00am i am usually already settled infront of my computer working.

I begin by checking my email for invites to classroom sessions and meetings, as well as other communication channels such as **Slack**. I respond to any messages pending response.

The next hours are spent attending the morning standup and lectures up until 1.00pm. This is immediately followed by an hour lunch break. In the afternoon its coding time. As a learner, i really enjoy coding during the free time when there's basically no pressure of beating deadlines and meetings in between.

I mentioned earlier that i employ several new habits that have helped me manage myself during this period. For one, while coding, i employed the **Pomodoro** technique which helps me focus on a particular task, with a 10 minute interval break after each hour. 

Secondly, i read a chapter a book to prepare my mind for the coding experience and enhance my motivation as i go into the day. I have found this helpful in increasing my brain's knowledge retention capacity.

To keep my body healthy and fit on oder to prevent burn out, i regularly exercise. I occassionally attend sessions at the gym. All these habits i believe will be of great  during this period and even after transitioning to the industry marketplace.

I am still more enthusiastic about learning this craft. Despite the challenges or blockers i face, and for more yet to come, i believe adaptability will play quite a significant role towards a succeful completion of the course. 

For any of you out there who maybe interested in learning Software Development, it is definately a recommendation i'd give. 

Happy Coding!
 
(https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s7cfn3ypttt2xo5uuy3c.jpg)
What do React vs. Next.js projects look like?
Tags: javascript, webdev, tutorial, discuss
Published: 2022-08-18 10:57:43


First let's start by finding out more about React and Next.js

## React

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


Facebook originally developed React, which has now grown to be one of the most widely used libraries in the frontend industry. With the help of frameworks like Redux, React can be quickly expanded to include features like routing and state management patterns. Although React has a small footprint, it can be tailored for practically any project. Visit the official React documentation to learn more in-depth information on React.

## Next.js

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


Based atop of React, Next.js was developed as a user-friendly programming framework. It was created by Vercel (formerly Zeit) and uses a lot of React's well-liked features. Next.js has features like pre-rendering, routing, code splitting, and support for Webpack out of the box. Visit the official Next.js documentation for additional information.
 

Installing Node.js on your computer and running npx create-react-app my-app will get you started with React. As the starting point for the application, the src/App.js file will be created as the basic project structure.

A service worker and a way to bring in Jest for testing are also included in the first scaffold, along with a public folder where you may put assets. The initial scaffold appears as follows:

`├── README.md
├── package.json
├── node_modules
├── public
│   ├── favicon.ico
│   ├── index.html
│   ├── logo192.png
│   ├── logo512.png
│   ├── manifest.json
│   └── robots.txt
├── src
│   ├── App.css
│   ├── App.js
│   ├── App.test.js
│   ├── index.css
│   ├── index.js
│   ├── logo.svg
│   ├── reportWebVitals.js
│   └── setupTests.js
└── yarn.lock (or package-lock.json)`



With Next.js, you can get started by running npx create-next-app. This will scaffold out a project that already has a pages folder for the pages or routes and a public directory that hosts your assets. The initial scaffold looks like this:


`├── README.md
├── package.json
├── node_modules
├── pages
│   ├── _app.js
│   ├── api
│   └── index.js
├── public
│   ├── favicon.ico
│   └── vercel.svg
├── styles
│   ├── Home.module.css
│   └── globals.css
└── yarn.lock (package-lock.json)`


At the end of the day, both React and Next.js provide solid developer experiences. I hope the comparisons and discussions I’ve included here give some insight to how you could use them with your projects. I encourage you to check them out, and check out my sample projects as well.


Do you want to dive more into the difference between React and Next.js ?? Let me know in the comments
Project Five (Python): Conway's Game of Life
Tags: python, beginners, opensource, programming
Published: 2022-08-18 10:56:00

## Why?
Hello, this is my fifth posted project. This project was created with the intention of exposing myself to Python, Stack Overflow, GitHub BASH, and Pygame.



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

## How
This project uses Pygame to create an interactable GUI. The cells in the Game of Life follow a specific ruleset that determines whether they spawn, die, or continue living.

## Conclusion
I hope you enjoy this part of my learning journey.
[GitHub](https://github.com/shiahalan/Conways-Game-of-Life)

### Background on Conway's Game of Life
Conway's Game of Life is a cellular automaton originally created by John Conway in 1970. The game is a zero-player game where cells interact with each other by abiding to four rules. Thus, the outcome of the game is predetermined by the initial configuration of what cells are alive and dead.

#### Rules of the game:
1. Any live cell with fewer than two live neighbours dies, as if by underpopulation.
2. Any live cell with two or three live neighbours lives on to the next generation.
3. Any live cell with more than three live neighbours dies, as if by overpopulation.
4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

## Advice?
Advice is greatly appreciated (post in comment section).
How to execute Windows container with NodeJs
Tags: node, windows, docker, windowscontainer
Published: 2022-08-18 10:56:00

Hi dear, in this article we'll see how to execute Windows container with NodeJs

**Note:** For now, don't exists any official docker image with NodeJs to Windows container. You can confire at the official repository on dockerhub: https://hub.docker.com/_/node/

Let's see one example to run Windows container with NodeJs, separated at:

- Some Versions >= 14.19.0 from the image `henriqueholtz/node-win` [see official repository on dockerhub](https://hub.docker.com/repository/docker/henriqueholtz/node-win)
- Some versions <= 13 from the image `stefanscherer/node-windows` [see official repository on dockerhub](https://hub.docker.com/r/stefanscherer/node-windows/tags)

**Note:** You can see the tags that are the versions of NodeJs, for example `henriqueholtz/node-win:16.15.1` have the NodeJs on 16.15.1 version.

Let's run it!

In your terminal, run the command below to create the container with the name `win-16-15-1`

```
docker run -d -t --name=node-win-16-15-1 henriqueholtz/node-win:16.15.1
```

After created, we can access the container by name with the command:

```
docker exec -it node-win-16-15-1 cmd
```

Now we are into the container, and we can see the NodeJs version with the simple command:

```
node --version
```

![output of `node --version` command](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zszsbxe7x5trmxkf64v4.png)
 

With this we can run another apps like ReactJs, NextJs and much more, on Windows container!

See [How to run ReactJs on Windows container](https://dev.to/henriqueholtz/how-to-run-reactjs-on-windows-container-20f3)

Thanks for reading. See you in another post!
AWS Corretto sample application source
Tags: cloudformation
Published: 2022-08-18 10:50:45

I just posted this on StackOverflow. Would anyone be able to help please?

Would anyone now what is the S3Key for corretto.zip sample app? For S3Key property I tried corretto-newsample-app.zip and corretto.zip but I get a 400 error in Cloud Formation.
```
Unable to download from S3 location (Bucket: elasticbeanstalk-samples-eu-west-1 Key: corretto-newsample-app.zip). Reason: Forbidden: S3Bucket=elasticbeanstalk-samples-eu-west-1, S3Key=corretto-newsample-app.zip (Service: AWSElasticBeanstalk; Status Code: 400; Error Code: InvalidParameterCombination;
```

If I use the PHP sample app from the AWS example php-newsample-app.zip it works fine and I can successfully start an EB environment, but I would like to use a Java sample app.
DO NOT trust your frontend validators
Tags: javascript, react, angular
Published: 2022-08-18 10:50:40

Trusting frontend validation logic is like trusting a thief when he says he won't steal your wallet. Frontend validation is for _convenience_, to reduce HTTP requests, not for ensuring data quality. You can add TypeScript validators until your face turns red, and the moment some guy creates another frontend to consume your API, your validators are basically useless. [Hyperlambda](https://aista.com/hyperlambda/) validators on the other side are executing on your server, which makes them much more valuable.

## Data quality and Hyperlambda validators

I have worked with 50+ companies during my 25+ years as en enterprise software developer. Most of these companies struggled with poor data quality. Phone numbers would be written like; _"John Doe"_, or _"foo@bar.com"_. Manually going through 500,000 records to clean up garbage data is literally impossible. This reduces the data quality your employer has. Which again results in more trouble doing business. Which again leads to less profit. Which again leads to less salary for you. Data quality __IS KING__!

In the following video I am illustrating how to create _server side validators_ with Hyperlambda, which is a much better alternative if you're to chose only one. If you want to follow the video hands on, you can [register a Magic cloudlet here](https://aista.com).

{% embed https://www.youtube.com/watch?v=lWOp32vxSfQ %}

Adding server side validation ensures data quality, assuming all data goes in and out of your database through your backend API. This results in higher data quality over time, which again results in better business.

Only relying upon frontend validators created with for instance React or Angular, is asking for trouble. Very soon somebody will want to create another frontend client using for instance Swift or the Android SDK. As they do, they're going to bypass your validator logic. If they do, you will end up with garbage data in your database.

> DO NOT trust frontend validators (alone!) - Because they're "mostly useless" from a data quality perspective

With [Hyperlambda](https://aista.com/hyperlambda/) you've got validators for every imaginable purpose, ranging from email validators to regular expression validators. Don't trust users of your web API to supply you valid data, ensure it using validators.
The state status is displayed incorrectly after the openGauss switch
Published: 2022-08-18 10:49:16

One master and one backup
Version: openGauss 3
Before switching:

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

Toggle:
Execute on the standby machine:
[omm@db10150 ~]$ gs_ctl switchover -D /my/openGauss/data/dn/
[omm@db10150 ~]$ gs_om -t refreshconf
Check the status after switching, the display is wrong

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bye38wls0lamuwch12bv.png)
Executing the gs_checkperf command also reports ERROR: cannot execute DROP SCHEMA in a read-only transaction

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