teleren/devto huggingface dataset:
Web2 && web3
Tags: blockchain, web3
Published: 2022-03-02 04:07:05


Web2 refers to the version of the internet most of us know today. An internet dominated by companies that provide services exchange for your personal data. Web3, in the context of Ethereum, Solana, Polygon etc. refers to decentralized apps (dApp is an application that can operate autonomously, typically through the use of smart contracts) that run on the blockchain. These are apps that allow anyone to participate without monetizing their personal data. Trusted institutions take control over the data of users in web 2.0, especially due to the need for trusted intermediaries. If two parties want to complete a transaction and they don’t know or trust each other, then they would have to rely on trusted intermediaries.

Web3 enables future where distributed users and machines are able to interact with data, value and other counterparties via a substrate of peer-to-peer networks without the need for third parties. Women, men, machines and businesses will be able to trade value, information and work with global counterparties they don’t know or yet explicitly trust, without an intermediary. Web3 will fundamentally expand the scale & scope of both human and machine interactions far beyond that we can imagine today. These interactions, ranging from seamless payments to richer information flows, to trusted data transfers, will become possible with a vastly increased range of potential counterparties. Web3 makes it possible to interact with any individual in the world without having to pass through fee-charging middlemen. This will give room for decentralized autonomous organizations and self-sovereign data marketplaces.

In web2, all participants are connected to a central authority; information propagation is handled by a central authority with a lot of computational resources, while on a decentralized system (web3) the furthest participants on the network may potentially be many edges away from each other, which is handled by no centralized authority because individual has the vote power in the decision making of the network. There are no “gatekeepers” and the cost of participation is very low. Before I leave, central authority (web2) can censor data, potentially cutting off parts of the network from interacting with the rest of the network but in web3 …. I think you know the answer now but for knowledge sake, censorship is much harder, as information has many ways to propagate across the network.

https://blockgames.gg
https://nestcoin.com
https://zuri.team
Absolute Beginners' Guide to Building a Website.
Tags: beginners, css, html, codenewbie
Published: 2022-03-02 04:02:42

> There are times I would have loved it that I am part of my website development process, that I can change the color of my footer to my favourite color of my good dreams.
> `~ Unknown`


<br />
## Introduction

This absolute beginners' friendly guide is to those who already have a good solid understanding of using their computers and would want to dive into exploring the interesting space of building websites for themselves, friends, colleague or to show to the whole world that something more can be done with their time and understanding.

In following along in this learning phase, it is expected that one already have a  prerequisite grounded understanding of how the computer works, which includes: turning on and off a computer, using the internet to send emails and chat on social media, creating new files and folders on a computer, renaming files and directories, using various office applications with ease, installing and uninstalling applications on your computer system.

> Never underestimate what has brought you this far!

If you have all these prerequisite checked, great! We can go ahead in this **Absolute Beginners' Friendly Guide to Building a Website.**
<br />
## Duration

The Expected duration of going through these and fully grasping the understanding to aid in moving to next levels is six (6) weeks to 3-months, with absolute attention, when required to various tasks, assignment and lectures that will be involved in this learning phase.

<br />
## What is needed to take part in this

- **A Computer** (A laptop or desktop computer)
- **Able to use the internet browser**
- **Internet Connection** (Data) to download various the various tools needed and continue in the class.
- **Able to download and install softwares**

<br />
## How to Get Started

[Click here to get started!](https://academyappheart.netlify.app)

<br />
## Glossary

**Web Page**
> An interconnected page consisting of hyperlinks`

**Website**
> An interconnected site hosted on the internet consisting of several webpages that includes hyperlinks to aid in navigating the several pages on the site.

**HTML**
> HyperText Markup Langauge

**CSS**
> Cascading SpreadSheet

**WWW**
> World Wide Web
Web Development & SEO services - A Must for Digital Marketing
Tags: javascript, webdev, programming, python
Published: 2022-03-02 03:58:16

Every genuine business has its own unique requirement. For instance, when a supermarket is setting up its business, it has to do so in manner where it shelves all the goods and at the same time allow for maximum accommodation of customers. In a similar fashion, a website is also designed and developed keeps the businesses requirements in mind. It has to one have the capability to handle the traffic the business is looking to achieve.

**What Goes into Web Design & Web Development!**

The first step in web development, is assessing the business requirement and seeing how it can be stepped up. For instance, if a business is looking to step up its sales, the digital marketing effort can feature a push notification where in, all the offers the store has, is passed on it potential customer base. Hence a typical **[Web design company in mumbai](https://www.d-designstudio.com/)** will offer a balance of both aesthetic web design and functional web development.

**Why Growing Businesses Need Web Development**

About 81% of customers check their purchases online before making an interesting purchase. In this digital age information is freely available on products and services. Hence, a web development that draws customers to your website to buy a product or service they are looking for is pretty much a needed SEO strategy, digital marketing employs in web development.

This helps businesses owners set the pace in this information age with having a website, where it helps if websites are regularly maintained with the latest keywords, which in turn draws customers based on what is trending and most talked about in the digital space.

**What Website Development Company Can Offer**

If you are a business owner looking for the best of SEO companies in Mumbai, it is beneficial if the agency can also help you create and maintain your Web presence both on the Google listing and on social media too. If the budget allows, a web-development agency can help you boost your products and services sales via an e-commerce portal.

On a retainership basis, a web development company, can help your business grow exponentially by consistent using White Hat SEO tools to boost your business’s marketing efforts. This is done by making sure everything that is trending in your area of business is leveraged for more footfall in terms of increasing website traffic, which in turn can help boost your business.

**Web Development and the SEO service edge**

In the website development space, SEO help your website and related marketing communication break through the clutter, thus giving your business that due attention it needs, to get noticed and crack those sales targets. For instance, if you are a store that sells footwear, and you branch off
More Thoughts on Vue vs EJS
Tags: javascript, beginners, webdev, vue
Published: 2022-03-02 03:52:55

This is continued from my post yesterday about Vue vs EJS. I ended up making the vue version and I was surprised to find out the gzip helped it quite a bit as well. The data transmission was faster and the creation of the page was also faster. It looks like EJS took about 100ms longer to be done which shocked me! I hadn't expected that. The problem with the input box being laggy with vue is still there but there must be a way to deal with that.

Now the next thing I want to get set up is sorting and pagination. This seems to be a big step where if I got with EJS and server side rendering, I'll need to write backend code but if I use vue I can do it all in the frontend. This seems to be the big thing in my eyes. Where do I want to write my code?

Though I could still be wrong, after all it only took a day for me to find out vue is actually better than EJS in this very narrow and crummy test :)

Vue might be the winner at this point. There is an ease to shipping everything over and then manipulating the data to do sorting in the frontend. Obviously the backend could do it as well and I imagine it might even be simpler but the huge gain is that you just need someone in that frontend context to quickly build things that just work. This might be why frameworks in javascript are so prevalent. They let you do stuff in a context you already know.

Switching to Vue prod was game changing. Vue ends up being 52kb gzipped. This would get even smaller if I used the vue build system. The generation of a large 5mb page on the server vs shipping over the data in less than 1mb and then building the page on the clients machine is huge in how much data is transferred. I'm guessing this will have a large effect on speed. So now the comparison is between the speed of the client's machine vs the speed of the network. SPAs are pretty amazing now because the average PC has gone up in ability. That might be the assumption.

Pagination fixes the input issues. I wish my head was a basketball, with the amount of palming going on I could probably dunk it.

Every few minutes I feel like I learn something new that I didn't notice about these javascript frameworks and web development in general.

This is a stream of consciousness writing that I'm doing while also working on my code search engine.

The biggest takeaway is to gzip and use the production grade version of a framework. I'm a dummy.
Diifference Between Web2 and Web3
Published: 2022-03-02 03:42:42

There is been a lot of content about is web2 and web3, the differences, the similarities, and their future implications.

Let dive straight into it. What is Web2? The internet as we know it today can be said to be Web2. Web2 gives users better interaction with applications, better user experience, ease of use, and so on. Web2 allowed anyone to be a creator, users can easily upload a picture, a video, publish a post/article, comment on a post, it changed the traditional way of doing business, even education was transformed at this generation of the internet. An application like Facebook, Twitter, Google, Amazon, Apple was born out of it.

Web2 is cool, but it has one big problem "Data", this big tech application has access to users' data without the consent of the user, user's had no access to how their data was being used or stored. In simple terms, web2 operated on a **centralized server**. This is where web3 comes into play, web3 is the next-generation internet, that can do what web2 can do but more in a decentralized way.

Web3 is built on blockchain technology. Blockchain is built to be 

- Open: It will be an open-source software built by an open and accessible community of developers and executed in the full view of the world.
- Trustless: Web3 is trustless and permissionless, which means participants can interact without permission from a trusted intermediary or governing body.
- Permissionless: users do not need any authorization from a governing body for participating.

Applications in Web3 run on decentralized peer-to-peer networks. That’s why they’re called decentralized applications, or dApps, rather than “apps.”.

**Conclusion**
As in web2 programming languages like TypeScript are used to build them, In web3 one of the commonly used languages is [solidity](https://docs.soliditylang.org/en/v0.8.12/). Thanks to [Blockgames](https://blockgames.gg/), [Nestcoin](https://nestcoin.com/), [Zuri](https://zuri.team/) for the platform to learn about web3
Adding MySQL 8 to Laragon
Tags: mysql, windows, webdev, php
Published: 2022-03-02 02:18:57

Using MySQL 5.7 for development still comfy for you, right? But why don't you try the higher version since it will give you higher read/write performance ([ref](https://severalnines.com/database-blog/mysql-performance-benchmarking-mysql-57-vs-mysql-80#:~:text=When%20number%20of%20threads%20goes,pretty%20much%20using%20default%20values.))

> I hope we never find any new production app created using MySQL 5.7 ever again. We need to break this "curse" for PHP developers.

## Downloading the MySQL 8 Binary

Go to the official download page [dev.mysql.com/downloads/mysql](https://dev.mysql.com/downloads/mysql) and you may find the latest MySQL 8 Community Server version available.

![mysql8 download link](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jokh4pfhcn11qbxrokw8.png)

Hit the download button and on the next page may want to register oracle account first or just start the download directly by clicking the "No, just start my download" link. 

## Extract and Move

After you downloaded the binary, extract it and move the extracted folder to the `C:\laragon\bin\mysql` directory (your custom location may differ) as you may find the existing mysql 5.7 here.

![laragon mysql directory](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ubwpozn9zgjvy1holofh.png)

Don't start the server yet, because we will have error issue like this.


![mysql 8 error on laragon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8na3hsdrd2qbb6uuvnh6.png)

## Upgrade Existing MySQL 5.7 data into MySQL 8

According to the [forum](https://forum.laragon.org/topic/973/laragon-updating-to-mysql-8-not-working/3), we only need to rename the existing mysql data folder. 
Go to `C:\laragon\data` and you will find `mysql` folder. Rename it into `mysql-8`.

> if you started the server first to find out the error, it will generate `mysql-8`. you could rename it into another name and make the existing `mysql` folder into `mysql-8`

## Start The MySQL 8 Server

Go to laragon dashboard, and you will find the mysql 8 menu click on it to select the version and start the mysql server as you usually do.

![mysql 8 on laragon dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kp2ax8hypmhbv0wkfdcm.png)

And it will start and run normal.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6lx7232lrtimlpqclyc3.png)
AWS Deployment and Provisioning
Published: 2022-03-02 03:40:04

**Deploy an EC2 Instance**

service - EC2 - Launch Instance - choose AMI - choose Inatance Type - configure instances - Add storage - Add Tag - Configure Security Group - Launch

**EC2 Launch Issues**

**EBS Volumes and IOPS**

**EBS Volumes and IOPS**

**Bastion Host**

**Elastic Load Balancers**

**ELB Error Messages**

**ELB Cloudwatch Metrics**

**Deploying An Application Load Balancer**

Launch EC2 instance by adding bootstrap.sh in configure instance and allow ssh and http rule in Configure Security Group. 

click on Load Balancers - Application Load Balancer - configure Load Balancer - configure security settings - configure security groups - configure Routing(path /index.html) - Register targets (select instance and click Add to registered) - create - copy the DNS name and paste in web-browser 

**AWS Systems Manager**

Go to IAM - Roles - create role - AWS Service - select EC2 - select AmazonEC2RoleforSSM - create

Launch EC2 by adding created IAM role in configure Instance 

Go to Management tools - systems manager - Find Resources,saved Resources,Build-In Insights(config,cloudTrail ...),Dashboard by Cloudwatch,Inventory,Complaince(patch),Automation(Execute Automation),Run command(Ansible-playbook,docker,shell
script...),Patch manager,Maintenance windows,Maintenance window(cron),state manager,managed Instances,Activations,Documents,Parameter store(secrets)

**Placement Groups**
Creating a Ruby gem using Thor generator
Tags: gemgenerator, rubygems, rubythor, ruby
Published: 2022-04-06 15:12:11

---
title: Creating a Ruby gem using Thor generator
published: true
date: 2022-03-02 03:33:15 UTC
tags: gemgenerator,rubygems,rubythor,ruby
canonical_url: 
---

I have been writing ruby gems for sometime now and always wish that there could be a command that can generate the gem structure/boilerplate and the things I love pre-configured for me.

This is where [Thor](https://github.com/rails/thor/wiki) comes in handy. I am going to introduce you to Thor a.k.a the badass command line generator that will make your life easy when it comes to ruby gem creation.

I do want to mention [Mariella Miranda](https://medium.com/@maku_m) who’s article on this topic inspired me to create a project which can be used as a gem generator to save you a lot of time.

just imagine this command:

```shell
thor mygem age_calculator
```

Produces this:

```shell
age_calculator
│ README.md
│ age_calculator.gemspec
│ Gemfile
│ .gitignore
│
└───lib
│ │ age_calculator.rb
│ └───age_calculator
        │ version.rb
│   
└───spec
    └───age_calculator
    │ age_calculator_spec.rb
    │ spec_helper.rb
```

## Let’s do this!

![](https://s3-ap-southeast-2.amazonaws.com/sal-blog/wp-content/uploads/2020/01/04030038/bacha.gif)

### Install thor

```shell
gem install thor
```

Clone my repository from github

```shell
git clone https://github.com/saluminati/gem_generator.git
```

Link to my repo [https://github.com/saluminati/gem\_generator](https://github.com/saluminati/gem_generator)

### Getting started

```shell
cd gem_generator
thor gem_generator age_calculator
```

![](https://s3-ap-southeast-2.amazonaws.com/sal-blog/wp-content/uploads/2022/03/image-1-1024x291.png)

Your gem with all the required files is now created in the age\_calculator directory

You can also append gem generator with **use\_rspec\_suit** and **use\_rubocop** options have rspec and rubocop pre-installed and configured with your

Example:

```shell
thor gem_generator age_calculator --use_rspec_suit=true --use_rubocop=true
```

![](https://s3-ap-southeast-2.amazonaws.com/sal-blog/wp-content/uploads/2022/03/image-2-1024x437.png)

Once your gem is created, make sure that you try to build it.

Example:

```
cd age_calculator
bundle install
gem build age_calculator.gemspec
```

## Some explanation – As I promised

#### Content of gem\_generator.thor file


![](https://s3-ap-southeast-2.amazonaws.com/sal-blog/wp-content/uploads/2019/12/31220842/meme1.gif)

Our main file is **gem\_generator.thor** which holds everything together.

This file is extended from **Thor::Group** which, in a nutshell will execute all the methods defined in this class in the order they were defined.

If you look at the methods inside this class, it is creating the gem directory and copying the templates files within your gem namespace with everything per-configured.

Happy coding! please let me know if you run into any issue.
How To Integrate Stripe Payment Gateway In Laravel 8
Tags: laravel, laravel8, stripe, paymentgateway
Published: 2022-03-02 03:32:13

In this tutorial, we will see how to integrate stripe payment gateway in laravel 8. Stripe is online payment processing for internet businesses. Stripe is a suite of payment APIs that powers commerce for online businesses of all sizes, including fraud prevention, and subscription management. Stripe’s payment platform to accept and process payments online for easy-to-use commerce solutions.

Stripe payment gateway is integrated into many websites for payment collection from clients. In this time many e-commerce websites and other shopping websites are use stripe payment gateway. So, here we will learn stripe payment gateway integration in laravel 8 or laravel 8 stripe payment gateway integration and payment gateway integration in laravel 8. And In this stripe payment gateway example, we are use stripe/stripe-php package.

So, let's see how to integrate stripe payment gateway in laravel 8 step by step.

```
Step 1 : Create Laravel 8 Application

Step 2 : Install Stripe Payment Gateway Package In Laravel

Step 3 : Configure Stripe Payment Gateway

Step 4 : Create Route

Step 5 : Add Controller

Step 6 : Create a Blade File for View

Step 7 : Run Example
```

---

> **_[Read More : How To Integrate Stripe Payment Gateway In Laravel 8](https://techsolutionstuff.com/post/how-to-integrate-stripe-payment-gateway-in-laravel-8)_**
Two Sum Problem
Tags: javascript, tutorial, career, algorithms
Published: 2022-03-02 03:19:21

You want to find 2 numbers that add up to the target and return their indices.

This is considered an easy interview problem, if you get it, god is watching over you.

Now, there are few ways to approach this: the brute force way (it'l work but it aint impressive), and then the optimal way. We will cover both.

## The brute force way

Note: This will work, but make sure you can optimize it too.

The logic is as follows. We will use two for loops. The first will look through all the elements starting at the first element. Then next loop will go through all the elements starting at second element. If the two add up to the target, return the indicies of them. Relatively straightforward, but it takes up a lot of memory to run two for loops so it'l become more inefficient as the array grows. Nevertheless, here's the answer.

```
`var twoSum = function(nums, target) {
    let result = []
    for (let i = 0; i < nums.length; i++) {
    for (let j = i + 1; j < nums.length; j++) {
        if (nums[i] + nums[j] === target) {
            result.push(i, j)
        }
     }
   }
     return result
}`
```

## The efficient way

We don't want to use 2 for loops. Let's just use one. 

What we'll do is create an empty object, and then we'll use forEach on the nums array. The forEach method can take in an element and its index, so we can set each set the element as the key and its index as its value.

```

`var twoSum = function(nums, target) {
 let obj = {}
 nums.forEach((num, index) => {
  obj[num] = index
 }


}`
```

Now we are going to loop through the nums array and use our one shot at a for loop.

```
var twoSum = function(nums, target) {
 let obj = {}
 nums.forEach((num, index) => {
  obj[num] = index
 }

 for (let i = 0; i < nums.length; i++) {
 let secondElement = target - element
 if (obj[secondElement] !== undefined && obj[secondElement] !== index) {
  return [index, secondElement]
  }
 }
}
```

Lets take a look at the example above. 

We're looping through the numbers in the nums array and were saying, does the result of the target number minus the current element exist as a number here? That is, if the target is 9 and our nums array is [2, 7, 13, 15], does 9 - 2 exist? or does 9 - 7 exist? And is it not an existing element (we can use the same number twice)? 

If so, return the element, and then the secondElement i.e the result of the target element minus the current element.