teleren/devto huggingface dataset:
Email Marketing with Maizzle and Tailwind CSS
Tags: tailwindcss, html, email
Published: 2022-07-15 09:07:47

Email marketing is a powerful marketing channel that uses email to promote your business products or services. Email marketing is a form of marketing that can make the customers on your email list aware of new products, discounts, and other services. 

Here I will teach you how to create an HTML email with Maizzle and TailwindCSS. 

### 1. Create Project
To create a new project it's quite easy, you can look at the [Maizzle Documentation](https://maizzle.com/docs/installation) like the code below : 
```
npx degit maizzle/maizzle "your-project-name"
``` 
then ` cd "your-project-name"` and `npm install`


### 2. Edit your Email using Tailwind CSS
You can start a development local server that watches  in localhost with :
```
npm run dev
``` 
Maizzle already has a built in template that you can use, you can use it as your starter template.

![localhost maizzle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0c83p0m69uk6ej731a4f.JPG)

#####Notes:
HTML email structure use `table`, `tr` and `td` as layout. The idea is same as CSS Grid, every column behave like Grid which you can adjust the width using Tailwind `class="w-1/2 sm:w-full"`

### 3. Link image with imagekit.io
When using Email HTML often you need to put an image on the email. Since Email HTML doesn't support image assets, you can get the image by hosting your image online. Here I use [imagekit.io]() to host my image. Simply upload and get the URL of the image to put in the src image tag then you are done. Don't forget to reduce the size since it opened between the length of an email.

### 4. Production
Build production ready to send HTML emails that have inlined CSS and many other optimizations, by running the following command:

```
npm run build
```

You can view the result of build production in ***Build Production folder***. Then copy and paste the HTML code to be ready to send to the email receiver.

![Build Production Maizzle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ipbww82fxbg72nt6al4.JPG)

### 4. Send your first html email.
Send your first HTML Email with [Insert HTML by Designmodo](https://chrome.google.com/webstore/detail/insert-html-by-designmodo/bcflbfdlpegakpncdgmejelcolhmfkjh) extension google chrome. 

![HTML Email Designmodo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fb3gi06e4h4lt1ae7e3v.JPG)
How to Rebuild MongoDB Replica-Set Node Fast in Few Minutes
Tags: mongodb, database, replication, rebuild
Published: 2022-07-15 09:00:49

It sometimes happens that the MongoDB replica set node goes out of sync from replica set members and, due to high lag, cannot synchronise itself from the replica set. There are traditional ways to remove the replica set node from the cluster and add it back but the issue arises when your database size is too big and node sync takes hours or days. Also in some cases, it degrades the performance. You simply use the following steps and rebuild your replica set member in a few minutes.

Step1
Remove the node from cluster

Prod:PRIMARY> rs.remove("<IP Address or hostname of the node to be removed>:27017")
Step2
login to ssh to Secondary Node and delete all the content of mongodb directory folder 

Step3
Log in to the Primary node. If you don’t know who is primary run this command rs. slave(ok)  from any node and then run rs.status(). rs. status will give you the [rimary node IP address or Hostname. Just ssh or login to primary and shut the MongoDB services

--Stop MongoDB

[](https://thedbadmin.com/how-to-rebuild-mongodb-replica-set-node-fast-in-few-minutes/)

Read more: https://thedbadmin.com/how-to-rebuild-mongodb-replica-set-node-fast-in-few-minutes/
Good Bye Windows 8
Published: 2022-07-15 09:00:00

https://www.microsoft.com/en-us/windows/end-of-support?OCID=win8_app_omc_win&r=1

> Change can be difficult, but we’re here to help you take the next steps. After January 10, 2023, Microsoft will no longer provide security updates or technical support for Windows 8.1. You might be able to upgrade your Windows 8.1 device to a newer version of Windows, but we recommend moving to a new PC that can run Windows 11 as the best option.
Tencent cloud cos upload file template
Published: 2022-07-15 08:50:06


``` 
# -*- coding=utf-8
# 1. set config, 包括 secretId，secretKey 以及 Region
# python3 install
# pip3 install qcloud_cos_py3
# pip3 install cos-python-sdk-v5
from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client
import sys

secret_id = 'xxxxxx'  
secret_key = 'xxxxxxx'  
region = 'ap-shanghai'  
APPID = "xxxxxx"  # APPID
bucket_name = "xxxx"  
bucket = f'{bucket_name}-{APPID}' 
config = CosConfig(Region=region, SecretId=secret_id, SecretKey=secret_key)
# 2. get client object
client = CosS3Client(config)


def cos_list_buckets():
   
    response = client.list_buckets(
    )
    print(response)


def cos_bucket_status(Bucket):
   
    try:
        response = client.head_bucket(
            Bucket=Bucket,
        )
        if not response:
            return True
    except:
        return None


def cos_upload_file(Bucket, LocalFilePath, Key):
    
    response = client.upload_file(
        Bucket='xxxxxx',  
        LocalFilePath=LocalFilePath,  
        Key=Key,  
    )
    ETag = response["ETag"]
    return f'https://{Bucket}.cos.{region}.myqcloud.com/{Key}'


if __name__ == '__main__':
    bucket = 'xxxx'
    LocalFilePath = 'test.jpeg'  
    Key = 'test.jpeg' 

    print(cos_upload_file(bucket, LocalFilePath, Key))
```

[tencent cloud cos](https://cloud.tencent.com/product/cos?from_social=dev_13)
Dash Platform Sprint 86 Review – Summary
Tags: web3, opensource, blockchain, programming
Published: 2022-07-15 08:49:23

Check out our latest Sprint Review you can check out here. Here's what we have discussed.

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

## TenderDash
**Goals:** Research same block execution

- Finish working on the integration of go-bindings for BLS v1 **_done_**
- Pre-release ABCI++ including improvements for vote-extensions **_done_**
- Update vote-extension part in ABCI++ spec in progressResearch: same-block execution **_in progress_**
- ABCI++ integration with Drive **_in progress_**
- Refactoring MakeBlock function signature to be compatible with upstream **_in progress_**

**What's next?**
- ABCI++ integration with Drive
- Validator key verification
- Research: same-block execution

## GroveDB
**Goals:** Batch fixes and worst case costs improvements

- Standardize root tree to merk avl tree **_done_**
- Path query merge **_in progress_**
- Cost for storage **_done_**
- Worst case costs **_in progress_**

**What's next?**

- Efficient references
- Continuation on Worst Case Costs

## SDK
**Goals:** Rework chain synchronization process (SPV), SDK repository documentation update

- Reworking wallet synchronization process **_in progress_**
- POC for synchronization without storage enabled **_done_**
- Updating storage logic **_in progress_**
- Update SDK docs **_in progress_**

**What's next?**

- SDK repository documentation update
- Review and QA

## Protocol
**Goals:** Prepare to release v0.23 for testnet

- Implementation **_in review_**
- Integration with JS Drive **_in review_**
- Release and deploy v0.23 to devnet **_in progress_**
- ABCI++ for v0.24 **_in progress_**

**What's next?**
- Continue on fee system
- Release Platform v0.23
- ABCI++ integration
- Withdrawal transitions

## Rust port update
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wrrw9aasc2uk265mub68.png)
Someone copied my code on Github and claimed it to be his own project.
Tags: discuss, github, beginners, programming
Published: 2022-07-15 08:37:00

Last week, a guy copied my source code from Github, even the comments I have written in my source code. Since it wasn't much big of a project, It didn't bother me much (even though I put hours of work into it). In the future, if someone tries to copy my project, how should I proceed? Does having your code on Github mean anyone can copy the code without giving any credit to the owner? I also don't want my projects to be private. Just to clarify, I didn't use any license for my project
The most important ESLint rule: max-params
Tags: eslint, javascript, typescript
Published: 2022-07-15 08:14:18

Let me ask you: What do you think this code does?

```ts
resizeImage(imagePath, 300, 200, true, true, 1)
```

It resizes image... but what exactly does it do? For the most part, we cannot tell without looking up the function definition.

Let's say you are reviewing a PR and it includes this change:

```diff
-resizeImage(imagePath, 300, 200, true, true, 1)
+resizeImage(imagePath, 300, 200, false, true, 1)
```

Can you confidently say what is the impact of this change? For the most part... no. You need to know what each positional argument does.

Let's say you know that the interface is:

```ts
function resizeImage(
  imagePath: string,
  width: number,
  height: number,
  upscale: boolean,
  crop: boolean,
  quality: number,
): Promise<Buffer>
```

But now a PR introduces a change to the parameter order (e.g. to make it consistent with other functions):

```diff
function resizeImage(
  imagePath: string,
  width: number,
  height: number,
+  crop: boolean,
  upscale: boolean,
-  crop: boolean,
  quality: number,
): Promise<Buffer>
```

How do you review this change? Sure, reviewing the interface diff is easy, but what about the dozens or hundreds of diffs that update function invocation?

```diff
-resizeImage(imagePath, 300, 200, true, false, 1)
+resizeImage(imagePath, 300, 200, false, true, 1)
resizeImage(imagePath, 300, 200, false, false, 1)
-resizeImage(imagePath, 300, 200, false, true, 1)
+resizeImage(imagePath, 300, 200, false, false, 1)
-resizeImage(imagePath, 300, 200, true, false, 1)
+resizeImage(imagePath, 300, 200, false, true, 1)
```

Hopefully the problem is self-explanatory: Positional arguments create a breading ground for hard and even impossible bugs to catch/debug/fix, esp. when code needs to be refactored. Fear not though as there is a better way.

Let's start from the start, but this time use a single-object parameter:

```ts
resizeImage({
  imagePath,
  width: 300,
  height: 200,
  upscale: true,
  crop: false,
  quality: 1,
})
```

Can you tell what is the intention behind this code? Yes, you can get a good sense, even if you are not familiar with the implementation.

Can you easily refactor the interface? Yes, linter will warn you if contract is not satisfied.

We end up with positional arguments because they feel the most natural to start with. However, as functions grow in scope, what started as a simple function with 1-2 arguments becomes an unreadable mess.

This is where [`max-params`](https://eslint.org/docs/latest/rules/max-params) comes to the rescue. Simply adding an ESLint rule that restricts having functions with more than X parameters ensures that your code remains legible and easy to refactor as your codebase scales.
#TestCulture 🦅 Episode 10 - Podcasts on Software Testing to follow
Tags: discuss, beginners, testing, agile
Published: 2022-07-15 08:04:52

𝐓𝐡𝐞 𝐄𝐯𝐢𝐥 𝐓𝐞𝐬𝐭𝐞𝐫 𝐒𝐡𝐨𝐰, by Alan Richardson. This podcast is produced by Alan Richardson, a test expert. He discusses software testing and presents topics from software development to test automation.

➡ [The Evil Tester Show](https://www.eviltester.com/show/) ⬅

𝐐𝐮𝐚𝐥𝐢𝐭𝐲 𝐑𝐞𝐦𝐚𝐫𝐤𝐬, by Keith Klain. Produced by Keith Klain, which is a professional with over 𝟮𝟬 years in software quality advocate, this podcast speaks about software testing, but also about quality management. 

➡ [Quality Remarks](https://www.listennotes.com/podcasts/quality-remarks-the-podcast-keith-klain-df-EmybMrei/) ⬅

𝐓𝐞𝐬𝐭𝐢𝐧𝐠 𝐏𝐞𝐞𝐫𝐬, a podcast by The Testing Peers team. This podcast was created by 𝟰 speakers which speak about software testing and leadership.

➡ [Testing Peers](https://testingpeers.com/) ⬅

𝐓𝐡𝐞 𝐆𝐮𝐢𝐥𝐭𝐲 𝐓𝐞𝐬𝐭𝐞𝐫. ‘Do you ever feel guilty for not meeting the standards set by others in the Software Testing community? You’re in the right place then.’

➡ [The Guilty Tester](https://theguiltytester.libsyn.com/) ⬅

𝐒𝐨𝐟𝐭𝐰𝐚𝐫𝐞 𝐓𝐞𝐬𝐭𝐢𝐧𝐠 𝐏𝐨𝐝𝐜𝐚𝐬𝐭 is a one-stop marketplace where we can listen what is happening in the software QA testing industry, by KiwiQA Services.

➡ [Software Testing Podcast](https://open.spotify.com/show/0gWSftuQabA1WFBD5SA7ya?si=e270265b05c54838&nd=1) ⬅

𝐒𝐨𝐟𝐭𝐰𝐚𝐫𝐞 𝐓𝐞𝐬𝐭𝐢𝐧𝐠, by Karthik John Babu. Review of tools, manual testing, test automation...

➡ [Software Testing](https://open.spotify.com/show/4KLD7yekyQ0gg8r4gCTXuS?si=3e745ceb3d86431e&nd=1) ⬅

𝐓𝐞𝐬𝐭 & 𝐂𝐨𝐝𝐞. Topics include automated testing, testing strategy, software engineering practices... 

➡ [Test & Code](https://testandcode.com/episodes) ⬅

And you? Which podcast about testing do you like to listen to? 🤔


Thread [on Twitter](https://twitter.com/agilitest/status/1527303091690741760?s=20&t=ViO1aIkDrbI-vRkDwX5j3Q).
How challenging is it to learn the Java programming language? What can you do with it?
Tags: java, tutorial, programming
Published: 2022-07-15 07:16:59

Turing complete in Java. Anything that can be written is fair game. Although the core Java language is simple to learn, some more recent additions are more complicated. Learning the language itself typically takes no longer than a few weeks.

However, creating a fully functional programme in Java is uncommon. Applications typically include a GUI to communicate with users, a connection to a DBMS package for data retrieval and storage, etc. The libraries that deal with handling web request processing or communicating with a DBMS are extensive and quickly become very complex. In the interactions of these complex libraries, errors must be handled correctly.
TCP/IP
Published: 2022-07-15 07:58:27

## What is TCP/IP
CP (Transmission Control Protocol) IP(Internet protocol ) is a network protocol.  TCP IP defines the rule for how electronic devices should be connected to the internet, and how to transmit between them.So the data transferring starts with the TCP protocols breaking the data into packets. Then the packets travel through routers according to the internet protocol. The delivery of the data packets to the right destination is done by Internet protocols.  In the receiving device, TCP protocol reassembles the packets into original data. And also TCP will check the error, if there is any error TCP /IP will send a request to re-transmit the data.  

TCP/IP Has 5 layer
1. Application Layer
This layer is responsible for maintaining the protocol essential for the interaction between the user and the applications.
protocols applied in this layer are:
HTTP
SMTP

2.Traansfer Layer
This layer is responsible for maintaining the data flow and correction step over the network channel and this layer divide the data into packets.

3.Network Layer
The Internet Layer of the TCP/IP model aligns with the Layer 3 (Network) layer of the OSI model. This is where IP addresses and routing live. When data is transmitted from a node on one LAN to a node on a different LAN, the Internet Layer is used. IPv4, IPv6, ICMP, and routing protocols (among others) are Internet Layer TCP/IP protocols.

4.Data Link Layer
The data-link layer identifies the network protocol type of the packet, in this instance TCP/IP

5.Physical Layer
Physical network layer specifies the physical characteristics of the communications media. The physical network layer specifies the characteristics of the hardware to be used for the network
Web Browser based OpenSource solution for room reservations
Tags: opensource, javascript, html, otherprogramminglanguages
Published: 2022-07-15 07:46:51

Hey,

Would anyone know any good open source web applications for room reservations? It should be as simple and easily used as possible.
###### At a minimum, it should meet these criteria:

* drawing of the floor plan from which you can choose a seat
* sees who has reserved what for what time
* bookings are per day or half days, etc

##### Voluntary criteria:
* Standard seat reservation with exceptions
* calendar entries if desired
* easy login, for example, give the reservation a password / browser cookie (which can also be log in once and forget) so that you can modify the reservation
* Read exceptions to standard seat reservations from the person's calendar using the "show as status" information

I have been searching for a while but I can find only hotel reservation softwares.
NPM Cheatsheet
Tags: npm
Published: 2022-07-15 07:05:55

**NPM Installation**

```jsx
npm install -g npm
```

**Checking your version of npm and Node.js**

```jsx
node -v
npm -v
```

**List globally installed packages**

```jsx
npm list -g --depth=0
```

**Uninstall global package**

```jsx
npm -g uninstall <name>
```

**Upgrade `npm` on Windows**

```jsx
npm-windows-upgrade
```

# **Update global packages**

**To see which packages need updating, use:**

```jsx
npm outdated -g --depth=0
```

**To update global packages individually you can use:**

```jsx
npm update -g <package> <package> <package>
```

**list available scripts to run**

```jsx
npm run
```

**Update `npm`**

```jsx
npm install -g npm@latest

// using windows? Then use
npm-windows-upgrade
```

**Installed version**

```jsx
npm list // for local packages
```
What Is TensorFlow?
Tags: python, javascript, programming, devops
Published: 2022-07-15 07:03:06

If you are currently working on a machine learning project with Python, you may have heard of this popular open source library called TensorFlow.

Google and the Brain Team collaborated to create this library. Nearly all Google machine learning applications use TensorFlow.

TensorFlow is like a computational library for writing new algorithms involving operations on a large number of tensors. Since neural networks can be easily represented as computational graphs, they can be implemented in TensorFlow as a series of operations on tensors. Also, tensors are N-dimensional matrices that represent data.
Run Oracle SQL Script From Command Line in Windows
Tags: programming, sql
Published: 2022-07-15 06:57:52

Sometimes we need to run a particular SQL script from the Windows command line “CMD” with or without parameters.

This article will guide you through the steps required to perform
this task to get an employee’s information — both with and without
parameters.
To Run SQL Scripts from Windows Command Line CMD 

Press Windows + R from your keyboard, then type cmd and press enter.

Change the current directory to the directory where your script is available.

To run SQL Script without parameters, we need to type this command.

`sqlplus hr/hr @ScriptWithoutParameter.sql`

To run SQL Script with parameters, we need to type this command.

`sqlplus hr/hr @ScriptWithoutParameter.sql 101`

It is important that when running SQL script with parameters from CMD:

In our script, the WHERE condition should be typed in the substitution variable as follows

`select * from EMPLOYEES where employee_id = &1;`

For the script above, we passed &1 to be replaced with 101 to bring employee number 101's data.

To Run SQL Script from SQL PLUS

Open SQL PLUS and then connect to the database.
In SQL Command, type the following command and press enter

`:\MyScript\ScriptWithoutParameter.sql`

This Article created initially on [Oraask.com](https://www.oraask.com/2021/03/run-oracle-sql-script-from-windows-command-line.html)
Manual Testing Vs Automated Testing — Top Considerations
Published: 2022-07-15 06:56:33

Manual testing and automated testing have their own pros and cons. If you are looking to automate testing of your web app, mobile app, or website then it is necessary to consider the advantages and disadvantages of both manual testing and automated testing.

## Overview of Manual Testing:

In manual web & mobile application testing, testers manually test the features of a product by executing test case scenarios written for the same. Usually, manual web & mobile application testers are highly skilled professionals with excellent knowledge about the features to be tested and what conditions the features need to pass in order to be successfully tested. Manual testers often use various tools such as data tables, barcode scanners, etc. to automate their task of test execution.

## Automated Web & Mobile Application Testing:

Automated web & mobile application testing is performed on web applications, mobile apps, and websites.

**Tools: **There are various tools available in the market that can be used for automated testing. Some of the popular tools are: 
1. Ranorex 
2. Appium 
3. TestComplete 
4. WebDriver 
5. Watir 
6. Sahi 
7. TestFX 
8. SoapUI 
9. QTP 
10. Bugzilla 

**Advantages:** The main advantage of automated testing is that it saves time and money in the long run. Automated tests can be run quickly and easily, with little or no input from the tester. They are also less likely to miss defects, and can be run more frequently than manual tests. 

**Disadvantages:** The main disadvantage of automated testing is the initial investment required to set up the tests. Automated tests also require more maintenance than manual tests, as they need to be updated when the software changes.

So, which is better - Manual Testing or Automated Testing? The answer to this question depends on several factors, including the nature of the project, the skills of the testers, the budget, and the timeline. If you have a small project with a tight budget and timeframe, then manual testing may be the best option. However, if you have a large project with a lot of changes, then automated testing may be a better option.



What are your thoughts? Do you think automated testing is the way to go? Or do you think manual testing is better? Let us know in the comments below!

[PerfectQA Services](https://perfectqaservices.com/services/) provides quality assurance and software testing services globally. We've consistently given our clients high-quality service. We're committed to giving our clients the best experience possible, so we're always innovating. Our clients are our top priority, and we strive to serve them well.
1507. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-15 06:47:59

```
class Solution {
public:
    string reformatDate(string date) {
        istringstream ss(date);
        string day, mon, year, m;
        ss >> day >> mon >> year;
        if (mon == "Jan") m = "01";
        else if (mon == "Feb") m = "02";
        else if (mon == "Mar") m = "03";
        else if (mon == "Apr") m = "04";
        else if (mon == "May") m = "05";
        else if (mon == "Jun") m = "06";
        else if (mon == "Jul") m = "07";
        else if (mon == "Aug") m = "08";
        else if (mon == "Sep") m = "09";
        else if (mon == "Oct") m = "10";
        else if (mon == "Nov") m = "11";
        else m = "12";
        string d = to_string(stoi(day));
        return year + "-" + m + "-" + (d.size() == 1? "0" + d : d);
    }
};
```
#leetcode
#challenge
Here is the link for the problem.....
https://leetcode.com/problems/reformat-date/
1550. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-15 06:46:34

```
class Solution {
public:

    bool threeConsecutiveOdds(vector<int>& arr) {
        int cnt = 0;
        for (auto n : arr) {
            if ( n % 2 ) cnt++;
            else cnt = 0;
            if (cnt >=3) return true;
        }
        return false;
    }
};
```
#leetcode
#challenge
Here is the link for the problem.....
https://leetcode.com/problems/three-consecutive-odds
1680. Leetcode Solution in Cpp
Tags: cpp
Published: 2022-07-15 06:45:10

```
class Solution {
public:
    int concatenatedBinary(int n) {
        long ans = 0, mod = 1e9+7;
        for (int i = 1; i <= n; ++i) {
            int len = 0;
            for (int j = i; j; j >>= 1, ++len);
            ans = ((ans << len) % mod + i) % mod;
        }
        return ans;
    }
};
```
#leetcode
#challenge
Here is the link for the problem.....
https://leetcode.com/problems/concatenation-of-consecutive-binary-numbers/