teleren/devto huggingface dataset:
Benefits and Application of using Artificial Intelligence on Modern E-commerce Web Application
Tags: webdev, react, ai
Published: 2022-03-05 08:52:36

Benefits and Application of using Artificial Intelligence on Modern E-commerce Web Application

Nowadays we see news about AI everywhere; sometimes, we see the excitement around AI and sometimes we see articles that talk about how AI will replace or destroy our jobs. We also see the occasional article talking about how AI will destroy humanity!?.

The Age of AI
AI can be implemented on the forecast for sales for the next quarter of a company is an obvious prediction problem, but developing an autonomous vehicle was not a prediction problem a decade ago. Cost reduction in AI is changing our way of thinking, which means we started thinking of various problems as a prediction problem. We were already using autonomous vehicles in controlled environments like factories, where the vehicle could be programmed by using if-else programming conditions. Changing the mindset and looking to this as a prediction problem helped engineers to develop autonomous cars, which can be used in the wild.

Human and AI Interaction
How will human and AI interaction evolve in the future? Will they compete, or will they work together? I will focus on those questions by looking through the book Human + Machine: Reimagining Work in the Age of AI. According to the authors, there will be scenarios where humans complement AI and where AI will complement humans.
Conclusion
Although there are some concerns that say “robots are more efficient, so human workers will be discarded in future,” Markus Schaefer, head of production planning at Mercedes, says, “We’re moving away from trying to maximize automation, with people taking a bigger part in industrial processes again.”
Set a Coupon Expiry Date and Time In WooCommerce
Published: 2022-03-05 08:44:20



![Steps to setup coupon expiry date and time](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ia5jvnht8eu30h47mll.png)
 
1. Go to your WordPress Admin panel. Click on **Marketing > Coupons**.
2. Create a new coupon or open an existing one.
3. Under the “General“ tab, choose the discount type, coupon amount.
4. Under “**Coupon expiry date**”, click on the box to open the date selector and pick a date.
5. Now under “**Coupon expiry time**“, click on the box field to open the time selector. Use the slider to set hours & minutes or directly type the time in the box and click on Done. You’ll have to set the time in the 24-hr format.
6. Set other usage and restrictions as required and Publish/Update your coupon.

**Important to know**
1. **Coupon expiry time will work in combination with the Coupon expiry date**. If the Coupon expiry date is not set, then the coupon expiry time will not be considered for validation.
2. The field “Coupon expiry time” will follow the local time of your website shown under **Settings > General > Timezone**.

**Reference Blog**
[Set a Coupon Expiry Date and Time In WooCommerce](https://www.gomahamaya.com/set-coupon-expiry-date-time-in-woocommerce/)
How to create react app on Android devices.
Published: 2022-03-05 08:29:13

React is a wonderful technology in web development category. It is basically a javascript library which is used in multiple react based framework like create-react-app or Next app. But the problem arouses when it comes to device preferences. Create-react-app requires **symlink** or symbolic links to be enabled on the device. That's why we needs a perfect device. It doesn't work on any virtual devices or kernels. Many beginners faced this problem, who doesn't have any laptop or PC. But now you can also run react app directly from your device.

To create a react app, we will need a custom Linux kernel, because we can't use node cli commands on Android without root. So, we will use an application known as **Termux**. You can find it from **play-store**. But it is deprecated now. So, download it from **f-droid**.[ 🔗 Link](https://f-droid.org/en/packages/com.termux/). After downloading, open it and give it required time to initialise. Then run the following commands.

```
apt update && apt upgrade
```
This command will update all of the application dependencies. Then we have to install node js.

```
Pkg install nodejs-lts
```
This will install the lifetime supported version of node js. A package manager called NPM and NPX automatically comes with node. Now we will create our first react app from Android.

**Using localstorage system in termux allows you to access all the files of your device storage and sd-card. But this requires symlink or symbolic links. So, we will create our app inside termux virtual storage.**

```
npx create-react-app <your_app_name>
```
This process will take a few moment and then you will find your react app ready. All the necessary tools required in developing a react app are all here.

Now to edit the files, we will use an application called Acode-editor. Get it on [play-store](https://play.google.com/store/apps/details?id=com.foxdebug.acode). And follow the rules.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8wu9z20zje02ads5s9yd.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9g3kxvmbjgpu887yfa5e.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hw30ygu1ymmppdx5eu7r.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pnwtlxefjvx786cfv8wz.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d7qlics73pyapyhomff4.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bxdc8f2q56k4ms4ubs1c.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9u281swomhozkox95wdu.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wywdg4cqhgex53vwskvq.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nm944tepb50mdawiyys2.jpg)

All done.
Happy hacking...
Enjoy Programming-Themed Humor? Here's today's daily developer joke!
Tags: jokes, dailydeveloperjokes, watercooler
Published: 2022-03-05 08:00:23

---
title: "Enjoy Programming-Themed Humor? Here's today's daily developer joke!"
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, #watercooler
---

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/5e12592aa5db7.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:
Asynchronous JavaScript is amazing.

I Promise you, await and see.
 -->
If Modified Since HTTP Header In WordPress
Published: 2022-03-05 07:58:36



The If-Modified-Since header is a request header, not a response header. As such, it is sent from the browser with the request and should not appear in the response. It would make no sense to implement this in a server-side plugin. The browser would simply ignore it.

This is essentially how it works in the client-server dialogue:

**Browser:**
I have a cached copy of this asset that has exceeded its expiry time. Send me the latest version, but only if it’s newer than my copy.
If-Modified-Since: <timestamp of my cached object>

**Server:**
304 Not Modified (continue using your cached copy for now; I’ll save time and bandwidth by not sending you what you already have)
or
200 OK (the asset was changed since then, so here’s the new version)

If you have an access to the httpd.conf, you can add this line:
ServerTokens Prod

This will reduce the amount of information about your server software. So, if this is the server header value now:

**Apache/2.4.35 (Win64) OpenSSL/1.1.0i PHP/7.2.11**

**Reference Blog**
[If Modified Since HTTP Header In WordPress](https://www.gomahamaya.com/if-modified-since-http-header/)
Day 11/100, 100 Days of Code
Tags: javascript, beginners, codenewbie, devjournal
Published: 2022-03-05 07:58:32

Day 11, back to arrays! I'm slightly confused but starting to retain more information. This is good. Today I learned about nested objects and creating arrays of objects. I also learned how to access these objects.

I'm actually starting to really like how clean the code looks when you write it in object form (don't know if that's the correct terminology).

anyway here's one of the objects I stored into a variable.

**const capFave = spaceship.crew.captain['favorite foods'][0];**

Interest is growing on me for javascript. I haven't given up yet!
How could I go into providing an unique CMS instance...
Tags: webdev, javascript, beginners, programming
Published: 2022-03-05 07:32:55

Question: How could I go into providing an unique CMS instance for each of my customers, in a SaaS multi tenancy scenario?

Hi! I've been playing with some SaaS ideas to develop, and all of then happen to fall under a multi-tenancy scenario, and I am having trouble figuring out some of the ways to fully implement this architecture.

I'll start providing the example: a webapp for showing restaurant's menu. Customers would go to myapp.com and upon registration, receive their own customer1.myapp.com, which would be the page displaying their menu. I've found that this frontend part requires a few sets of domain/dns configurations and it's doable. Even better[,](https://sites.google.com/view/chittaghata/) vercel has recently launched its "Platforms Starter Kit" which includes this config out of the box.

But for my case, I'd need a way for my customer to edit their pages, register their menu itens and so on.

I am familiar with headless CMS solutions like Strapi and Sanity.io, but I haven't found any native support of them for such scenarios.

Basically, upon every registration, the "backend" structure should all be generated automatically[,](https://www.bloglovin.com/@sarataylor1/best-four-season-in-town) creating a new cms instance that the user would deal with and affect only his own tenant.

I am currently not being able to wrap my head around what would it take to do so... and if there's any CMS that provide such support? Perhaps I will need to develop my own micro cms? And then attach it to a route on the tenants like customer1.myapp.com/admin...

Sorry for the long post, and if I couldn't be clear or more precise. Appreciate any input!
Create Website using Html & Css
Tags: html, css, webdev, webs
Published: 2022-03-05 07:08:15

Explained how to create website using HTML, CSS Step by Step.
Very helpful to beginners and learners of web development.

🔥🔥🔥🔥🔥🔥🔥🔥
Timeline :
---------------------------------
00:00 Teaser
01:14 Lets get Started & Launch VSCode
01:40 Create HTML Markup
03:47 Liver Server Extension
05:16 Style Markup using CSS
07:06 Set Background Image
08:52 Style Navigation bar with Flex
14:36 Include Google Fonts
15:10 Style Main Content
15:50 Create Login Form
17:22 Style Placeholder
17:56 Focus 
19:06 Calculate Height with Calc func
26:56 Social Media Icons
32:15 Basic Form Validation
33:17 Change Background dynamically

{%youtube 392YWhAblmQ%}
set up keyboard shortcut to open terminal on mac
Tags: macos, shortcut, productivity
Published: 2022-03-05 07:03:20

I am currently using Monterey. These are actually simple steps to set up the shortcut. (NO coding required! yay! :relieved:)

## open Automator
It is under **Applications > Other > Automator**. Once open a new file, select **Quick Action**.
![create a type for your document](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2932iwpoxddwjh0s9mx.png)
 
For convenience, if the window is blank like below, select **View > Show Library**.
![new file window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qernnfhrvaplgrhqo2ui.png)

Use the search box to find **Launch Application**. Then double-click or drag it to the right-hand side.
![search launch application](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1feey86nvcpuolqu5umr.png)

Change the application from the default **Contact** to **Terminal**. (Select **Other...** and **Terminal** can be found in the **Utilities** folder)
![change application to terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zxrn6xk17vxkwe0xkch2.png) 

Select **Run** on the upper right of the window to make sure the terminal is launched as expected. Then save the file. I have my file named `open terminal`.

## open System Preferences
Under **System Preferences > Keyboard > Shortcuts > Services**, find the file name. By clicking on it, select **Add Shortcut** and set up the keyboard shortcut you prefer. I use `cmd+opt+T` as linux command.
![open terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d0821sma848bhf6q5e73.png)

And now it is all set up! :grimacing:
How to send messages to the Office 365 Company portal
Tags: office365, azure, endpointmanager
Published: 2022-03-05 06:35:28

This blog post shows you how to the Office 365 company portal. 

<img src="https://user-images.githubusercontent.com/58633848/156612073-18141321-6199-41ef-ab65-3ff7787fc724.jpeg" width="500px" />

The steps for sending messages to Microsoft Intune are the same.

1. Open the Office 365 admin center.
2. In the nav bar click on "show all".

![image](https://user-images.githubusercontent.com/58633848/156609477-f4647527-1ed7-453c-a346-367d96928e7c.png)

3. Then click on "Endpoint Manager".

![image](https://user-images.githubusercontent.com/58633848/156609755-78d41bec-fd5d-46fb-a8ba-f91204353f84.png)

4. A new tab should open. There click on "Tenant administration".

![image](https://user-images.githubusercontent.com/58633848/156610705-cebdbc5a-ea7e-4932-94bc-8ccde06d6bf8.png)

5. Then select "Custom notifications".

![image](https://user-images.githubusercontent.com/58633848/156610116-75f2135b-968e-4096-8d27-652727a0ebe6.png)

6. Now you can set a title and the message you want to appear.

![image](https://user-images.githubusercontent.com/58633848/156610430-ca578170-0c02-418c-9226-6cb1ca1fc5dc.png)

7. Click on "Next".
8. Now you can select the groups that this message should be send to. Just click on "Add groups", choose them and click on "select".

![image](https://user-images.githubusercontent.com/58633848/156610935-33f8bccd-0b4a-4c01-a253-8cf21a7acbfa.png)

9. Now you can click on "next", review your message and then select "create".

After a few minutes a push notifications will appear on the devices connected to the company.

![image](https://user-images.githubusercontent.com/58633848/156611825-2c4d19ed-5a65-4963-9d7c-a30e1af39056.png) 

### More informations

[On Microsoft Docs](https://docs.microsoft.com/en-us/mem/intune/remote-actions/custom-notifications).
Proposal writing for Google Summer of Code 2022 (4/5)
Tags: javascript, webdev, beginners
Published: 2022-03-05 05:46:38

Post (4/5) on Google Summer of Code (Long Post)

Let's talk about Proposal writing for Google Summer of Code

what is a proposal?
As per definition it is "a plan or suggestion, especially a formal or written one, put forward for consideration by others". If I relate this to GSoC then you have to mention all the small and large details of your project in a doc file.

There are two ways to write a proposal
1) With Template - some organisations provide a specific proposal template in which you have to fill in your information. For Ex- The Circuit Verse Org has its own Personal Template in which you have to fill out your Goals and milestones for the project.

2) Without Template - These proposals are made from scratch and they have to be according to applicant choice and with the help of suggestions from the mentors. let's discuss this in detail.

length of proposal form: This will depend on your project and the work you are going to do.

KEY HEADINGS

Title: 
Short and precise

Your Info:
Your name along with basic information like your college, location, gender, email and link to your social media handles.

About:
Who you are, what do you do? explain in a short and simple form.

Synopsis: 
Based on the format, start your proposal with a summary, designed to convince the reviewer to read the rest of the proposal

What will you bring to the Community?: 
Ensure that your project aims to benefit the larger purpose by serving the community. Any reputed organization will aim to fund you if your proposal benefits a large audience with a significant impact.

Deliverables: 
Include a brief, clear work breakdown structure with milestones and deadlines

Past Work: 
Do your research, and make sure you understand how the project you are proposing fits into the target organisation

Biographical Information: 
Be sure to communicate personal experiences and skills that might be relevant to the project. Summarise your education, work and open source experience. Any published work, successful open-source projects and the like should be mentioned.

Follow the rules: 
Under all circumstances, you are requested to adhere to the guidelines that can help your application get a green signal. 

GOLDEN TIPS

- Be honest with what you write, unnecessary giving false information will not bring you good results

- Take feedback from the community on your proposal form.

- Plan things ahead of time and always have room for errors.
------------------------------------------------x------------------------------------------------

Give it a like if you made it so far
Don't forget to read my other blogs
Bye :)

#opensource #googlesummerofcode #proposal #projects
Send Email using Mailgun API and Node.js
Tags: node, mailgun, javascript, api
Published: 2022-03-05 05:45:04

For every every web application, there is a need to send the user an email. In this article, I would love to explain you how easy it is to send Email using Mailgun API and Node.Js.

You can check full code with detail article at: [https://github.com/deadwin19/send-email-mailgun-nodejs](https://github.com/deadwin19/send-email-mailgun-nodejs)
how to config ConfigureWebHostDefaults in minimal api
Published: 2022-03-05 04:52:18

## Old Solution

```c#
public static IHostBuilder CreateHostBuilder(string[] args) =>
    Host.CreateDefaultBuilder(args)
        .ConfigureWebHostDefaults(webBuilder =>
        {
            webBuilder.ConfigureKestrel(options =>
            {
                // Setup a HTTP/2 endpoint without TLS.
                options.ListenLocalhost(5000, o => o.Protocols =
                    HttpProtocols.Http2);
            });
            webBuilder.UseStartup<Startup>();
        });
    }
```

## New Solution

```c#
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.ConfigureKestrel(serverOptions =>
{
    serverOptions.ListenLocalhost(5000, o => o.Protocols =
                    HttpProtocols.Http2);
});
```

### reference :

- https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-6.0
- https://docs.microsoft.com/en-us/aspnet/core/grpc/troubleshoot?view=aspnetcore-6.0#unable-to-start-aspnet-core-grpc-app-on-macos
How to design a logo with these awesome hovering effects?
Tags: css, webdev, tutorial, html
Published: 2022-03-05 04:34:56

**🤔 Do you know??**

→ How to design a logo like this?

→ How to design a logo with these awesome hovering effects?

---

👀 This is how you can design your object using box-shadow.


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

---
👀 And on hovering, just you have to use the "inset" keyword!


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

---
If you want the whole code then I uploaded a GitHub link.

**💚 GitHub link:**
**https://github.com/Dhananjaywarade/Nemorphism-logo-design.git**


<u>**But if you like make sure to**</u>

1. Follow me on [GitHub](https://github.com/Dhananjaywarade)

Thank you so much for staying to the end.
Deploy react application using Netlify
Tags: deploy, react, netlify, codewitharjun
Published: 2022-03-05 04:10:38

To deploy your react application you can use the [netlify.](www.netlify.com), for deploying manually you have to create a build using the command : 

```
`$npm run build`
```

In this video i have shown the details how you can deploy and change the domain according to your wish. 

{% embed https://youtu.be/tVzpC5_AC8M %}
What's a Rails Partial?
Tags: 100wordsaday, inkedin, ruby, rails
Published: 2022-03-05 03:41:58

In a Rails Application, partial templates are a way of breaking down the view rendering processes into small bits. Partials allow us to reuse  a block of code in many of others files and templates. 

- Partial are easily created by making a file `_form.html.erb` within the `app/views/tags/_form.html.erb`.

- To use or render a Partial, we need to pass the render method within a view `<%= render 'form' %>`

-  We leave out the underscore when rendering the partial.

- **Important:** To Render a partial in another file, we must use the path.

- `<%= render partial: 'form', locals: { tag: @tag } %>`

> Partial are a great way to practice the DRY philosophy. 
> [Reference](https://api.rubyonrails.org/classes/ActionView/PartialRenderer.html)

 **The example below is an example of a form partial file.**

```ruby
<%= form_with(model: [@tag.bookmark, @tag]) do |f| %>

	<% if !@tag.bookmark %>
	<%= f.label :bookmark_id, "Bookmark:" %>
	<%= f.collection_select :bookmark_id, Bookmark.order(:name), :id, :name %>
	<% else %>
	<%= f.hidden_field :bookmark_id %>
	<% end %>
	<br><br>
	
	<%= f.label :name, 'Tag Name:' %>
	<%= f.text_field :name %><br><br>
	<%= f.submit %>
<% end %>
```

- This Was Just a quick Overview of partials within a Ruby on Rails Application, Please check out the reference to the rails docs linked above the code block as this post only explain the basic use of form partials.

> - **NOTE: This is one of 30 blogs that I would be attempting to write over the next 30 days to improve my writing skills.**