teleren/devto huggingface dataset:
Reasons why Short videos increase customer engagement with Brand
Tags: salesforce, enagagement, brandengagement, shortvideos
Published: 2022-03-10 15:54:21

Keeping the customers engaged is one of the biggest challenges faced by businesses. There is so much content and so many options available that it is becoming harder to keep customers interested in one's brand. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lswwl0ig91hbq6mc6yyj.png) 

A well-rounded and updated content strategy is crucial to compete with the influx of content. One key aspect of a good content strategy is to add video marketing to it and give it priority over other things. Video marketing has a lot of potentials and is effective in boosting customer engagement. 

Videos are much more engaging than written content and are also more memorable.  It is a perfect format to get the attention of the customers and keep them interested. Video marketing integrated with [salesforce marketing services](https://sptechusa.com/salesforce-marketing-cloud-implementation/) can help to scale the customer engagement.

Why Short Videos Increase Customer Engagement? 

Nowadays there are so many platforms that allow people and businesses to share short videos. These platforms are popular among people, so they are perfect for not just finding new customers but also for staying in touch and engaging them. 

Creating and sharing short videos with customers can help businesses in many ways. 

Diverse dissemination of the content 

Businesses can share their short videos on a variety of platforms making sure they reach a wide audience. YouTube is a must for sharing video content as it is the biggest video-sharing platform and allows you to share videos of varying lengths. Social media platforms like Instagram, TikTok, etc. are perfect for short videos as well. 

Companies often cut down their videos in short snippets and share them on social media to get attention and increase the curiosity of the audience. After peaking their interest, they direct them to full-length videos. Platforms such as Salesforce allow companies to share video content on various platforms at the same time. Salesforce also has automation and analytics tools that allow organizations to plan and execute their video content distribution in a seamless and efficient manner.
Day-41 Training At Ryaz :Handling and Logging error
Tags: webdev, beginners, node, mongodb
Published: 2022-03-10 16:36:08

Date:10/03/2022
Day:Thursday

Today I started at about 10:10 am as I was done with till 10 sub modules of eleventh module and I was to start with rest of submodules so, I started with it so, first of all the instructor started with extracting all the routes as while teaching the instructor made all the db connection information and all routes information in the main index.js file but it looks little messy so, only relevant information would be kept in index.js file son order to gain this the instructor started extracting all routes in a separate folder after this he extracted the db information from index.js file and kept inside separate file db.js after this the instructor began with this step with extracting the login logic as well as he separated config logic and validation logic from index.js file so, this way we were able to attain cleaner and more understandable file and we were having neat and clean selfexplaining code so, after this he instructed to see the unhandled execution on console and guided some of tisps and important things about this.so,this way my day ended up and I got to learn many new things.
Expandable WordPress post excerpt
Tags: wordpress, php, javascript, css
Published: 2022-03-10 16:27:34


**First the PHP**
Add this function in function.php
```
function expandable_excerpt($excerpt)
{
    $split = explode(" ", $excerpt); //convert string to array
    $len = count($split); //get number of words
    $words_to_show_first = 19; //Word to be dsiplayed first
    if ($len > $words_to_show_first) { //check if it's longer the than first part
 
        $firsthalf = array_slice($split, 0, $words_to_show_first);
        $secondhalf = array_slice($split, $words_to_show_first, $len - 1);
        $output = '<p class="event-excerpt" >';
        $output .= implode(' ', $firsthalf) . '<span class="see-more-text">...see more</span>';
 
        $output .= '<span class="excerpt-full hide">';
        $output .= ' ' . implode(' ', $secondhalf);
        $output .= '</span>';
        $output .= '</p>';
    } else {
        $output = '<p class="event-excerpt">'  .   $excerpt . '</p>';
    }
    return $output;
}
```
**Required CSS**
CSS to simply hide elements when needed

```
.excerpt-full.hide {
display: none;
}
.see-more-text.hide {
display: none;
}
```
**Required JS**
script to add/remove css classes when needed

```
const itemSeeMore = document.querySelectorAll(
  "p.event-excerpt> span.see-more-text"
);
if (itemSeeMore) {
  itemSeeMore.forEach((item) => {
    item.addEventListener("click", () => {
      item.classList.toggle("hide");
      item.nextElementSibling.classList.toggle("hide");
    });
  });
}
```
Using the function in simple shortcode example

```
function display_post()
{
	$rand_post = get_post('7');
	print_r($rand_post);
	$output = '<div class="post-wrapper">';
	$output .= '<h2>' . $rand_post->post_title . '</h2>';
	$output .= expandable_excerpt($rand_post->post_excerpt);
	$output .= '</div>';

	return $output;
}
add_shortcode('display_post', 'display_post');
```
Add the short code `[display_post]` in you page editor

And that's it, thanks for reading the article if you want any support on it just let me know.
Purple is (now) my favorite color
Tags: bootcamp, struggles
Published: 2022-03-10 16:17:17

Ah, the sweet sight of all my past due modules!

This is what is greeting me anytime I log in to my bootcamp's website to work through the courses.

When I started the bootcamp, I started falling behind very quickly, I caught up, then I got sick with what I *believe* was COVID, then I caught up, then I fell behind again... you catch my drift, haha!

Although my real graduation deadline is set for June 8th, I can ask for a 3 month extension, after which if I don't graduate, I'll be permanently kicked out from the program.

In the beginning, I was under a lot of stress. I had a lot of things going on in my personal life, I was working, doing this bootcamp, taking care of my son, then I got sick, and then the hives started showing up in my body! No lie, I developed this 'stress allergy' when I was pregnant with my son, and this is just one of the wonderful souvenirs I've been left with postpartum(my son being the very best out of all of them, haha!)

The sight of the words "Past due" in purple was really getting to me. Any time I used a purple pen to write anything all that would flash in my brain was "PAST DUE." I'd try to go to sleep and the last thing I'd remember before falling asleep was "past due" all in purple. It was something like out of a cartoon or something, now that I think about it.

Since this program is remote, and self-paced, at the time I wasn't really speaking much with my cohort. Then I got sick with COVID and I was very open about how I'm stressed about how behind, and I asked if anybody else is struggling, and lo and behold! Everybody started sharing how they are also behind or have been struggling understanding the material. Some of my classmates are 5 modules behind, others are closer to 10 modules behind. Although this bootcamp is 'self-paced', they still expect you to put in a minimum of 30 hours of work, as well as have 30 minute sessions with your mentor twice a week.

One of my classmates shared a screenshot of the contract we signed in the beginning, and there I saw about the 3 month extension for our graduation date. Immediately I felt my body relax, I felt like I could finally breathe a sigh of relief. Although that extension does come with strings attached... of course! We lose our "money back"/"loan forgiveness" guarantee if we don't graduate by our actual deadline, but that is future Marilia's problem!

Since the day I read those words, purple is now one of my favorite colors.
SCADA Systems on the Web with Wisej
Tags: javascript, webdev, programming, dotnet
Published: 2022-03-10 16:17:08

Web-enabling for production control systems is a challenging task. A new article on CodeProject.com explains how [Wisej](https://www.wisej.com/) can be used to implement or migrate SCADA and OPC-based systems to the Web.

Web-enabling for industrial control systems
Today’s production sites are all connected and entirely digital. Integrated control centers connect to industrial devices on the shop floor using serial interfaces, bus systems, as well as wired and wireless networks. In many cases, SCADA plays a key role in conjunction with OPC servers in Microsoft Windows-based environments.

SCADA stands for Supervisory Control and Data Acquisition. As it turned out in several customer projects, Wisej is an ideal solution for migrating SCADA systems to the web. A new article on CodeProject.com analyzes typical pitfalls and possible modernization approaches for:

- Monitoring
- Controlling
- UI complexity
- Local Hardware connectivity
The article was published along with a sample application to visualize a SCADA dashboard for monitoring and controlling device management tasks with Wisej. 

Read the full text on CodeProject.com:
[https://www.codeproject.com/Articles/5305074/SCADA-Systems-on-the-Web](https://www.codeproject.com/Articles/5305074/SCADA-Systems-on-the-Web)

![Pixel-Perfect Wisej Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3g0e7mo7gzgmwq8a9vpw.png)
Native alert and confirm in Wisej
Tags: javascript, webdev, dotnet, csharp
Published: 2022-03-10 16:13:32

_This post was originally shared on [https://wisej.com/blog/native_alert/](https://wisej.com/blog/native_alert/)._

Sometimes you don’t need a fancy box and the browser’s native alert or confirm boxes will do just fine.

With [Wisej](https://www.wisej.com/) you can integrate the native alert and confirm with your server side .NET code with a single line. Call it on the server, it shows on the browser, blocks, and server execution resumes after the user decides what to do. Just like magic. With the added benefit that the native alerts block the browser.

Here is the code:

```
public static async Task Alert(string message)
{
    await Application.CallAsync("alert", message);
}

public static async Task Confirm(string message)
{
    return await Application.CallAsync("confirm", message);
}

public static async Task<string> Prompt(string message)
{
    return await Application.CallAsync("prompt", message);
}
```
Now you can call **Alert(“Thank you for playing.”)** or **Confirm(“Do you want to continue?”)** in your server side code like this:

```
private async void button1_Click(object sender, EventArgs e)
{
    await Alert("Thank you for playing.");
    AlertBox.Show("Alert closed.");

    var result = await Confirm("Do you want to continue?");
    AlertBox.Show($"Confirm closed: {result}");
}
```
![Wisej Native Alert](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbukhw56fke01xtkh5gf.png)
 
Please be aware that while the native alert box is on the screen, the browser fully suspends all JavaScript execution – if the user doesn’t take any action and the session timeout kicks in, the session will expire.

Happy coding with Wisej!
#66 Days of Data
Tags: python, datascience, 100daysofcode, ankitgupta
Published: 2022-03-10 16:10:15

## **Learning Python**  👨‍💻

D 26 of #66daysofdata 📈

Today I have learnt - Python Variables, Declaring & Assigning Values, Object references, Object identity, Variable names, Multiple Assignment, Variable Types ✌️

Checkout 👉 [My #66 Days of Data timeline on Github](https://github.com/mrankitgupta/66DaysOfData)

I'll be glad to connect & learn with similar goal centric people on 
👇

**Twitter** @ [Mr_AnkitGupta01](https://twitter.com/Mr_AnkitGupta01)

**Github** @ [MrAnkitGupta](https://github.com/mrankitgupta)
v1.2.0 for djs-marshal is out!
Tags: discord, typescript, javascript, opensource
Published: 2022-03-10 15:47:59

It has been a long time since I worked on my [discord.js](https://www.npmjs.com/package/discord.js) command and interaction manager [djs-marshal](https://www.npmjs.com/package/djs-marshal). So here we are!

v1.2.0 brings permission options like `allowRoles`, `denyRoles`, `allowUsers` and `denyUsers`, better error handling and deprecates `allowWithPermission`, which was a terrible idea to even begin with. Check it out!

{% embed https://github.com/DeathVenom54/djs-marshal %}
How to clear an HTML Canvas
Tags: beginners, tutorial, html, javascript
Published: 2022-03-10 15:32:21

When we've created a canvas, sometimes we'll want to clear it completely before redrawing something else. Let's look at how to do that.

## How to clear HTML Canvas for Redrawing
Let's say we have a canvas, and we've already written code like this:

```javascript
let myCanvas = document.getElementById('myCanvas');
let ctx = myCanvas.getContext('2d');
```

If we want to clear the entire canvas and leave it blank, we use `clearRect()`. clearRect has the 4 arguments - `x`, `y`, `width` and `height`.

If we want to clear a canvas entirely, starting at `(0, 0)`, our code looks like this:

```javascript
let myCanvas = document.getElementById('myCanvas');
let ctx = myCanvas.getContext('2d');

ctx.clearRect(0, 0, myCanvas.width, myCanvas.height);
```

Although we can clear different areas if we want. The below code clears a canvas starting at the xy coordinates (150, 150), and only clearing 100px by 150px (width by height) of content:

```javascript
let myCanvas = document.getElementById('myCanvas');
let ctx = myCanvas.getContext('2d');

ctx.clearRect(150, 150, 100, 150);
```

## Clearing a HTML Canvas with a Custom Color
To clear a canvas with a custom color, you can instead use the normal `rect()` function, with a custom color. That looks like this:

```javascript
let myCanvas = document.getElementById('myCanvas');
let ctx = myCanvas.getContext('2d');

ctx.rect(0, 0, myCanvas.width, myCanvas.height);
// Fill our rectangle
ctx.fillStyle = 'red';
ctx.fill();
```

The above code will clear our canvas and fill it with red instead.
How to implement Google JavaScript style guide
Tags: javascript, programming, coding, styleguide
Published: 2022-03-10 15:21:11


<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">No two developers write code the same way. Indeed, in a large team of developers, everyone codes with their own style preferences.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">In terms of functionality, there is no problem with these personal approaches. After all, the code works, and your JavaScript program runs smoothly. However, individual preferences make it impossible to read large codebases, making them difficult to manage and maintain.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">Therefore, big enterprises establish some code styling rules to make the entire codebase consistent and easier to read. But what is a style guide, exactly?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"justify"} -->
Read the full article below to know more about style guides and how you can set up the Google JavaScript style guide with Codacy:</p>
<!-- /wp:paragraph -->

https://blog.codacy.com/implement-google-javascript-style-guide-with-codacy/

## What will you find in this link? 👆

- What are code style guides, and why do you need them
- What’s included in a code style guide?
- What are the advantages of code style guides?
- Implement Google JavaScript style guide with Codacy
IAM USER
Published: 2022-03-10 15:09:29

What is an IAM user?
An IAM User is an entity created in AWS that provides a way to interact with AWS resources. We don't need to give the root user account and password to interact with AWS services. So, an IAM user is created for the clients to use and interact with AWS resources without hampering any security.

**How to create IAM user ?**

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

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

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


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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4fe7k7yas30pminfkva0.jpeg)

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

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

(Suppose, you want to create an IAM user for admin access only)

1st - Login through root user.
2nd - Now, go to IAM user.
3rd - Click on "users" on the left column.
4th - Now press add users.
5th - Give username as "admin".
6th - Now select both "access key" and "password".
7th - Select custom password at console password and give a strong 
      password.
8th - Tick on the check box of "Required password reset".
9th - Then click on next: Permission
10th - Click on attach existing policy.
11th - Tick on the check box of "administration access", then 
       click on next: tags.
12th - Adding tag is optional, then next.
13th - Then you can see username - Admin: Then click  on create 
       user.
14th - Then download .csv file, then click on close.

**How to login into IAM user?**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yo4dvie4wh12ll2tcgr5.jpg)

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

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


Go to AWS console -> Click on the IAM user -> Enter 12 digit account ID -> Give the username - Admin (whatever username you have set while creating the IAM user) -> Enter the password which you have set.   
Then when you log in it will ask to change password.
After changing password, you are done and you can use the account.

So, this is how we can create IAM user for particular user groups.
Create Fullstack Ecommerce website in 2022 - Part 3
Tags: css, webdev, javascript, beginners
Published: 2022-03-10 14:59:42

Hello! guys, welcome back here. Well if you do follow me you know I was make a FullStack Ecom website series and already made 2 part of it right? So here is the 3 part of it today.

In the 3rd part, you'll learn to create a working add product page which can add product to the firebase. It also do have form validations along with image upload. After that you'll learn to create a working dashboard page where you'll be able to edit and delete the product from database. You can even make a product draft to edit it later and delete it in single click. You'll also learn to create dynamic product page where you'll make dynamic product page for all the product pages stored in database, you'll create search page too.

So in short this part if very fun to code. Majority of the code is a backend and I believe backend make sense when we learn it from video, So you can watch the part 3 video below.

Also if you haven't watch the previous 2 parts of it you can check them too.

Download the [Source code](https://www.patreon.com/posts/63613846)

#Part 1
{% youtube vHCSnaUdNkE %}
#Part 2
{% youtube SB-oPvvd6F4 %}
#Part 3
{% youtube xvUXDyEwq5c %}

I hope you like this series. If you have any query related to code you can ask me on the comments. And you can also consider subscribing my youtube channel.

<a href="https://www.youtube.com/c/modern_web?sub_confirmation=1"><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jeitpawvax07cx7r9yoa.png"></a>

Thanks for reading
How the mkdir command works in Linux
Tags: linux, bash, webdev, beginners
Published: 2022-03-10 14:59:11

On Linux and unix-like systems, like Mac, we use mkdir to make a new directory from the terminal. To do this, open up a new terminal, and make sure you're in the right directory using the cd command.

The syntax for mkdir looks like this, where dir_name is the name of your new directory, and `[OPTIONS]` are optional settings.

```
mkdir [OPTIONS] dir_name
```

For example, to create a new directory called "`hello_world`", we would type:

```
mkdir hello_world
```

If you want to make multiple directories, just put them in curly brackets, and separate each directory by a comma. For example, the below code makes two directories called "hello" and "world":

```
mkdir {hello,world}
```

## Options for mkdir
`mkdir` has 3 options which we can add to our command:

- **-p** - this allows us to make multiple directories within each other.
- **-v** - this outputs information on the directory or directories created.
- **-m** - this lets us set the chmod/mode value for our directory, i.e. 777.

## Making multiple directories within each other with mkdir -p
Let's say we wanted to create a folder structure, where we have a project folder within a parent folder, within a master folder. If we use just mkdir, we would have to make each individually. Instead, we can use mkdir -p to make them all at once.

```
mkdir -p master/parent/project
```

This will make three directories, each within the other.

## Verify a folder is created with mkdir
If we want to see a message about if mkdir was successful or not, we can use `mkdir -v`.

```
mkdir -v master
```

The above will output the following message:

```
mkdir: created directory 'master'
```

Unfortunately, `-p` and `-v` will not work together - so you have to use one or the other.

## Setting the chmod or mode of a directory with mkdir
If we want to set the mode of a directory, we can set it directly with `mkdir`. For example, to create a directory with a chmod value of `777`, we would write the following:

```
mkdir -m777 master
```

Creating multiple directories with a certain chmod or mode using mkdir

We can combine `-m` and `-p` for mkdir into one command, if we want. For example, the below code will create the folder structure master/parent/project, and set each directory to a mode of 777:

```
mkdir -p -v -m777 master/parent/project
```
POV - Code
Tags: code, codenewbie, backend, beginners
Published: 2022-03-10 14:37:56

Honestly, I'll keep this short..

For as long as I can remember, the method I use to learn new coding languages and technologies are based on HOW I learn things. And in my point of view, that's the key to picking up the right information.

This means, of course, you need to know how YOU learn. And not how everyone is learning. 

Everyone has a way of learning and when everyone learns how to learn their own way, they become great on what they want to learn.

I guess what I'm trying to say is: focus on how you obtain knowledge, and you will learn faster and more accurately.