teleren/devto huggingface dataset:
Learning the Fundamentals of Web3 and Blockchain Development
Published: 2023-02-17 16:27:04



Are you a programmer interested in learning more about blockchain technology? You have come to the perfect spot!

Blockchain technology and its associated web3 protocols offer an exciting and powerful way to create, store and use digital assets. But before you can start building on the blockchain, you must first understand the basics.

The first step to learning the fundamentals of blockchain and web3 development is to understand the underlying technology. Blockchain is a distributed ledger technology that allows for a secure and immutable digital ledger. It is composed of a network of computers that are connected to each other and can securely store, update and transfer data. This distributed nature of the blockchain makes it incredibly resilient and secure, as the data stored on the blockchain is difficult to corrupt or tamper with.

Once you have a basic understanding of blockchain technology, the next step is to learn about web3 protocols. Web3 protocols are the protocols and standards that allow for the development and deployment of blockchain-based applications. They provide the necessary tools and frameworks for developers to create, deploy and manage decentralized applications. 

Once you are familiar with the basics of blockchain and web3 development, the next step is to learn the specific programming languages used for blockchain development. The most common languages used for blockchain development are Solidity and JavaScript, both of which are powerful and versatile programming languages.

Finally, you will need to learn the basics of developing and deploying smart contracts on the blockchain. Smart contracts are pieces of code that are stored on the blockchain and can be used to facilitate transactions and other behaviors. Learning the fundamentals of smart contract development will go a long way in your pursuit of becoming a blockchain developer.

Learning the fundamentals of blockchain and web3 development is a challenging but rewarding endeavor. With some dedication and hard work, you can become a proficient blockchain developer and begin building powerful applications on the blockchain.
This trick will 10x your JavaScript application performance
Tags: javascript, webdev, tutorial, react
Published: 2023-02-17 16:20:36

Async, defer and normal scripts play a crucial role in improving your javascript app performance. Here's an in-depth guide that teaches you everything about it in just 6 minutes.

Link- https://www.youtube.com/watch?v=RaPMjzYFF9Y

If you are interested in react, JavaScript or frontend development in general, Do checkout and subscribe [xplodivity](https://www.youtube.com/@xplodivity/videos) on youtube
Python dictionaries comprehension tutorial
Published: 2023-02-17 16:19:54

[**Python dictionaries comprehension**](https://www.programdoc.com/python/dictionaries) is a way to create new dictionaries by specifying the key-value pairs using a single expression. This is similar to list comprehension, but instead of creating a list, we create a dictionary.

The general syntax for creating a dictionary using comprehension is:

```py
{key_expression: value_expression for expression in iterable}
``` 

Here, `key_expression` and `value_expression` are the expressions that generate the keys and values of the dictionary. `expression` is a variable that iterates over the `iterable` object.

Let's see two examples of Python dictionary comprehension to understand it better.

Example 1: Creating a dictionary of squares of numbers

```py
squares = {num: num**2 for num in range(1, 6)}
print(squares)
``` 

Output:
```py
{1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
``` 

In this example, we have created a dictionary `squares` using dictionary comprehension that contains the squares of numbers from 1 to 5. The `key_expression` is `num`, the `value_expression` is `num**2`, and the `iterable` is the `range` object from 1 to 6 (excluding 6).

Example 2: Creating a dictionary from a list

```py
fruits = ['apple', 'banana', 'orange', 'kiwi', 'grape']
fruit_dict = {fruit: len(fruit) for fruit in fruits}
print(fruit_dict)
``` 

Output:
```py
{'apple': 5, 'banana': 6, 'orange': 6, 'kiwi': 4, 'grape': 5}
``` 

In this example, we have created a dictionary `fruit_dict` using dictionary comprehension that contains the length of each fruit name in the list `fruits`. The `key_expression` is `fruit`, the `value_expression` is `len(fruit)`, and the `iterable` is the `fruits` list.

Using dictionary comprehension, we can create dictionaries easily and quickly in a single line of code, making our code more concise and readable


## Explore Other Related Articles
[Python comparison between normal for loop and enumerate](https://dev.to/max24816/python-comparison-between-normal-for-loop-and-enumerate-p4a)
[Python if-else Statements Tutorial](https://dev.to/max24816/python-if-else-statements-tutorial-3p25)
[Python set tutorial](https://dev.to/max24816/python-set-tutorial-hcp)
[Python tuple tutorial](https://dev.to/max24816/python-tuple-tutorial-3m62)
[Python Lists tutorial](https://dev.to/max24816/python-lists-tutorial-2g43)
Polyfills in JavaScript | ( forEach, map, filter, reduce ,reduceRight and flat )
Tags: webdev, javascript, tutorial, programming
Published: 2023-02-17 16:14:49

Here's an in depth tutorial on how to implement forEach, map, filter, flat, reduce and reduceRight functions in JavaScript from scratch. This video will teach you the patterns on how to approach creating polyfills of any function and it will also give you in-depth knowledge about how these functions actually work  behind the scenes.

Link (polyfill for forEach, map, filter, reduce, reduceRight, flat)- https://www.youtube.com/watch?v=YfZb_1MPUCY

Link (polyfill for flat)- https://www.youtube.com/watch?v=pTVdymFMTkA

If you are interested in react, JavaScript or frontend development in general, Do checkout and subscribe [xplodivity](https://www.youtube.com/@xplodivity/videos) on youtube
An Apple A Day...
Tags: css, joke, webdev, watercooler
Published: 2023-02-17 15:50:04

---
title: An Apple A Day...
published: true
description: They say an apple a day keeps the doctor away... Does that apply to web development and CSS too?
tags: css,joke,webdev,watercooler
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7y8jjrytiraaz1mtpd0i.png
canonical_url: https://alvaromontoro.com/blog/68028/an-apple-a-day
---

They say an apple a day keeps the doctor away... But does that apply to web development and CSS, too? [Today’s cartoon tried to answer that question](https://comicss.art/?id=74):

![Cartoon with the title 'They say an apple a day keeps the doctor away... but the CSS Developer :has more faith in a margin'. A man doing yoga, his personal space highlighted with a border. There's a bubble with the CSS code: ':has(.doctor) #me { margin: 15vmin; }' And at a distance, there's an angry doctor who can't get closer.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3pnxwa5z1hdwwtiyacu.png)

As the cartoon is coded in HTML and CSS, you can check the [source code at this live demo on comicss.art](https://comicss.art/comics/74/an-apple-a-day.html).

## Alternative

I also coded an alternative version, a bit more educational, highlighting the parts of the box model using the same drawing (hopefully, the personal space idea is clear... I know it may not be obvious...)

!['An apple a day may keep the doctor away... But a CSS developer trusts the box model'. A cartoon with a man doing yoga with a dashed line showing his personal space, a bubble with the CSS code ':has(.doctor) #me { margin: 15vmin; }', and an angry doctor complaining he can't get closer. The person doing yoga is labeled as 'content', the space between the person and the dashed line is 'padding', the dashed line is labeled 'border', the space between the dashed line and the doctor is 'margin'](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfqrsg0fus71we6erw5f.png)

Hopefully, it is clear. Although I must admit, the dashed line marking the personal space is a bit weird, and it can be confusing (as it may seem like it’s a force field and the margin is actually between the person and the border instead of between the border and the doctor.)
Is Accessibility Difficult for Developers?
Tags: discuss, watercooler, webdev, mobile
Published: 2023-02-17 15:59:40

Hey All, 

I talk a lot on here about accessibility in development lifecycle, but I am curious to hear from you all.


Do you think that accessibility in development is a difficult thing to grasp or even do? What is an aspect that makes it difficult? 

If you think that its relatively easy, share with me what you think has made it easier for you all to grasp. 

Let's talk about it!
Build this awesome Dynamic Progress Bar using JavaScript
Tags: webdev, javascript, tutorial, html
Published: 2023-02-17 15:24:03

Here's an in depth tutorial on how to build a dynamic progress bar in JavaScript. I will show you how to replicate the progress bar provided by html on your own. And you will also learn how to display the appropriate percentage in the progress bar based on the value and max value provided.

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


If you are interested in react, JavaScript or frontend development in general, Do checkout and subscribe [xplodivity](https://www.youtube.com/@xplodivity/videos) on youtube
Use ChatGPT to convert function to SQL query
Tags: ai, sql, php
Published: 2023-02-17 15:02:02

I've been struggling with tasks that require me to write SQL queries for testing purposes. I have to create queries that return the same results as PHP functions. I thought this was a good moment to test the capabilities of ChatGPT. I prepared a simpler version of the function that I want to convert into plain SQL and asked it for help. Let's take a look at the results.

#### Example 1

```
function sumQuantity(array $offers): int
{
    $groupsCount = [];

    foreach ($offers as $offer) {

        if ($offer->getStatus() !== OfferStatuses::STATUS_ACTIVE) {
            continue;
        }

        if (isset($groupsCount[$offer->getGroup()->getId()])) {
            continue;
        }

        if ($offer->getGroup()->getOldestOffer()) {
            $offer = $offer->getGroup()->getOldestOffer();
        }

        $quantity = $offer->getGroup()->getQuantity();

        $groupsCount[$offer->getGroup()->getId()] = $quantity;
    }

    return array_sum($groupsCount);
}

PostgreSQL tables:
- "offers", columns: id, group_id, company_status
- "groups", columns: id, oldest_offer_id, quantity


I need a sql query that returns the same result 
```

I was surprised by the answer. It gave me a solution with a fancy explanation:


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


I thought - OK Chat, that was easy. Show me how you handle something harder, maybe with subquery.


#### Example 2

```
function getSumOfMaximalCounts($matches)
{
    $matchesCount = 0;

    foreach ($matches as $match) {
        if (!$match->getMatches()) {
            continue;
        }

        $maxCountFromGroups = 0;
        foreach ($match->getMatches() as $matchItem) {
            if ($matchItem['count'] > $maxCountFromGroups) {
                $maxCountFromGroups = $matchItem['count'];
            }
        }

        $matchesCount += $maxCountFromGroups;
    }

    return $matchesCount;
}

postreSQL table:
offer_matches:
- offer_id int
- matches json

I need a sql query that returns the same result 
```

This time, I was also amazed:


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

I have handled all queries with this cooperation. Not all cases were generated without errors, but even with small corrections from myself, I saved a lot of time.


### Conclusion
Even if not all answers were perfect, I'm very impressed with the capabilities of the OpenAI product. It should be noted that this is the previous version of model (3), but version 4 will be available soon. Another fact is that it is learning all the time, so the number of errors will diminish.
I will further experiment with this tool. I feel that the new era is here :)
My Journey Creating an API to Check Terms and Conditions Using ChatGPT
Tags: chatgpt, javascript, programming, license
Published: 2023-02-17 15:01:53

Hey there, fellow developers! Today, I want to talk about my latest project called [terms-and-conditions-verifier](https://github.com/LaurentiuGabriel/terms-and-conditions-verifier-gpt). The aim of this API is to check any terms and conditions sent by a client app for any irregularities or fishy stuff. To achieve this, I have integrated ChatGPT, which is an advanced language model that can understand natural language, into the API.

To give you a brief idea of how the code works, let's take a look at the following file:

```
import dotenv from "dotenv-safe";
dotenv.config();
import express from "express";
import bodyParser from "body-parser";
import cors from "cors";
import { ChatGPTAPIBrowser } from "chatgpt";
import { oraPromise } from "ora";
import config from "./config.js";

const app = express().use(cors()).use(bodyParser.json());

const gptApi = new ChatGPTAPIBrowser({
  email: process.env.OPENAI_EMAIL,
  password: process.env.OPENAI_PASSWORD,
});

await gptApi.initSession();

const Config = configure(config);

class Conversation {
  //...
}

const conversation = new Conversation();

app.post("/eula-summary", async (req, res) => {
  //...
});

const EnsureAuth = new Promise((resolve, reject) => {
  //...
});

async function start() {
  //...
}

function configure({ plugins, ...opts }) {
  //...
}

start();

```

The first few lines of code import necessary modules such as `dotenv`, `express`, `body-parser`, `cors`, `ChatGPTAPIBrowser` and `oraPromise`. `dotenv` is used to read environment variables from a .env file, `express` is used to create an instance of the express application, `body-parser` is used to parse incoming request bodies, `cors` is used to enable Cross-Origin Resource Sharing (CORS), `ChatGPTAPIBrowser` is used to interact with the ChatGPT API via the browser, and `oraPromise` is used to create loading spinners for various functions.

After importing the modules, the code initializes the ChatGPT API by passing the credentials to the `ChatGPTAPIBrowser` constructor. It then creates a new Conversation instance and configures the API by calling the configure function.

The `configure` function collects rules and parsers from all plugins and trains the ChatGPT model with all the rules. It then runs the ChatGPT response through all plugin parsers.

The `start` function connects to ChatGPT and trains the model with the rules collected from all plugins. It then starts the express application, and the `app.post` method listens for incoming requests. Once a request is received, the API sends the terms and conditions to the Conversation instance for processing.

This project can prove to be a powerful tool that can help you detect any irregularities or fishy stuff in terms and conditions. With the help of ChatGPT, you can easily process natural language and provide quick responses to your clients. I hope this post has given you a better understanding of the code behind the terms-and-conditions-verifier API. Happy coding!
2023 Started
Tags: javascript, discuss, hustle, devjournal
Published: 2023-02-17 15:00:54

Hello, everyone! 

2023 started since almost two months ago. What tehnology do you think will be popular this year? 

In my opinion, I think this year, popular will be ML, AI and Mobile. 

I am not familiar with ML and AI so I will talk about Mobile. 

**Why do I think mobile will be popular this year?**

I think Mobile Development will popular this year because a mobile app will help you to reach customer much better than a simple website. Trough mobile development you can access notifications, you can create Widgets and many many more things which will make your user experience better. 

**What programming languages should I choose for Mobile Development?**

Well, there are many languages and frameworks which can help you to develop mobile applications. I will make a list:

Cross Platform(write once, run on Android and iOS): 
- React Native -> It’s a framework based on JavaScript. 
- Xamarin -> Framework based on C#
- Flutter -> Framework based on Dart

Native: 
- Kotlin -> Programming language for writing Mobile Apps for Android 
- Swift -> Programming language for writing Mobile Apps for iOS, WatchOS, iPad
How to Find Java Programmers?
Tags: hiring, staffing, recruiting
Published: 2023-02-17 14:26:56


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

The demand for [Java programmers ](https://bluebirdinternational.com/staff-augmentation/hire-java-developers/)is high in today’s market due to various reasons. Firstly, Java is a widely used programming language for various purposes such as desktop applications, mobile applications, web development, peer-to-peer applications, IoT devices, and game development. Secondly, the fact that Java has been the most popular programming language for years has led to many applications being developed in Java, which requires a large number of developers.

Employers require a large number of Java developers due to its widespread usage and high demand, which is not comparable to other programming languages such as [Cobol](https://bluebirdinternational.com/cobol/), where the demand is not as high. Java is preferred by many companies and developers as it is a reliable and stable programming language. Though it has dropped to fourth place in the TIOBE index, its popularity is steadily increasing.

There are around 27 million software developers globally, of which 30% have used or are using Java. In Hungary, there are around 79,000 software developers, and 23,700 of them are estimated to be Java programmers. Although the number of available Java programmers is low, a considerable number of them are not actively looking for work, which makes it difficult for most businesses to find experienced professionals.

To find Java programmers, most businesses look for them in online professional communities, meetups, and online platforms. However, finding reliable and experienced Java programmers is not easy in such places. [IT recruitment agencies](https://bluebirdinternational.com/it-recruitment/) or IT headhunting firms can assist businesses in finding Java programmers. [Bluebird](https://bluebirdinternational.com/), which specializes in IT headhunting in Budapest and Vienna, can assist by recruiting the necessary IT skills and a large network of IT developers. They also offer IT staff augmentation where the required Java programmers are recruited and work on the project on a set period of contract.

To get the right Java programmers for a business, it is crucial to determine the specific technology skills or domain knowledge required to fill the position and to check that the salary range being offered is competitive with the market. Businesses can request a quote from Bluebird’s “[Request for offer](https://bluebirdinternational.com/request-for-offer/)” page, and their IT recruitment solution is success fee-based. In [IT staff augmentation](https://bluebirdinternational.com/staff-augmentation/), businesses will be billed monthly for the number of days the Java programmers spend on Java development tasks, with no success fee or other fees.

Do you have trouble finding the right Java developer for your project? If you answered yes, please [contact me](https://www.linkedin.com/in/balazs-refi-bluebird/); I’m sure I can assist you!
What was your win this week?
Tags: discuss, weeklyretro
Published: 2023-02-17 14:25:34

Heyo!

Hope y'all all have fantastic weekends! 🙌

Looking back on this past week, what was something you were proud of accomplishing?

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Cleaning up your place 🧹

---

![Erin Hannon from The Office wildin' out, shaking fists, and cheering](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3gxs5c71n578x43a24au.gif)
🫖 Let's Talk About Tea
Tags: tea, tutorial
Published: 2023-02-17 14:24:59

We all know what Java is. Yeah, it’s a programming language, but I mean the other thing. It’s a type of coffee. Coffee is everywhere these days. Even though it is considered to be “the engineer’s favorite drink”, I think tea deserves some love, too.

Hear me out. You don’t need new equipment to brew tea. You can go ahead and use your French press.

Just like coffee, some types of tea contain caffeine which is what wakes you up and helps you focus. The only difference is tea has less than half of the amount that coffee has. Depending on your needs and taste, this can be a good thing.

You can drink more cups without worrying about your caffeine intake, and in my book, this is a great thing. Keeping your throat warm helps you control your voice better in meetings. And they mostly have additional health benefits.

Without further ado, here is my selection of tea types:

1. Green tea
2. Black tea
3. Peppermint tea

That’s true. Nothing ground-breaking.

Aside from helping you focus these kinds of tea are believed to have some potential health benefits.
Green tea may have anti-inflammatory effects and may reduce the risk of heart disease.

Black tea may help improve gut health by promoting the growth of healthy bacteria. Additionally, a Turkish classic.
Peppermint tea may help improve your digestion and boost your immune system.

Caffeine may improve mental alertness and cognitive function. However, keep in mind that too much of anything can be harmful and, don’t overdrink tea or coffee, especially before you sleep.

_Have a favorite drink while working? Let us know!_
Syncios WhatsApp Transfer 2.3.6 Crack with Registration Code 2023
Tags: javascript, beginners, html
Published: 2023-02-17 14:12:22

[Syncios WhatsApp Transfer Crack](https://fullcrackapp.com/syncios-whatsapp-transfer-crack/) allows users to back up, restore, and transfer WhatsApp data between Android and iOS devices. Your WhatsApp chat can be selectively backed up on your smartphone or laptop using WhatsApp Transfer. Backups can also be exported to different formats. If you want to restore data, you can review it and select what you want to restore.

In just one click, you can back up your WhatsApp chats from iOS or Android devices to your computer/laptop. You only need one mouse click to export your chats, no matter how many you have or how many you have to export. The data you back up on your computer can be restored to your smartphone at any time after you have backed it up.