teleren/devto huggingface dataset:
01 - Understanding the Database Structure
Tags: apacheage, postgres, sql, tutorial
Published: 2023-07-10 11:46:28

Relational database management system PostgreSQL, sometimes referred to as Postgres, is free and open-source and places a strong emphasis on extensibility and SQL compliance. The Apache AGE team uses openCypher's flexibility to construct a graph database.

This blog post contains excerpts from Hironobu SUZUKI's book "Internals of Postgres," which he wrote.

The distinct database structure of PostgreSQL will be outlined in the sections that follow.

## Logical structure

A group of databases run by a PostgreSQL server constitute a database cluster in this database management system. In a previous article, I used the commands `bin/pg_ctl -D test -l logfile start` and `bin/createdb testdb` to launch a database cluster called test and create a database within the same post. Different databases may be included in a database cluster. The illustration that follows, taken from "Internals of Postgres," explains things better.

![image](https://res.cloudinary.com/practicaldev/image/fetch/s--E-ErrX23--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t71pe4uzynu6cl2a4ud7.png)

## Physical Structure

A database cluster is represented physically by a base directory that includes subdirectories that stand in for the different databases. A variety of database items linked to each of these databases can be found in each of these subdirectories. Individual Object Identifiers (OIDs) are used to manage smaller tables and indexes, whereas the variable "relfilenode" is used to manage data files. However, a new relfilenode is made to manage it when the size surpasses 1GB.

## Closing remarks

It is essential to appreciate the logical structure of a database cluster in order to understand the links between the databases and database objects that make up the cluster.

People can learn more about the precise locations of files thanks to the physical organization of the database, which makes database manipulation and management simpler.

## References

[https://www.interdb.jp/pg/pgsql01.html](https://www.interdb.jp/pg/pgsql01.html)
[Summary] Chapter#09 "The Internals of PostgreSQL" Write Ahead Logging (WAL) (Part-01)
Tags: postgres, apacheage, devcommunity, bitnine
Published: 2023-07-10 14:00:28

It is a rule to write both changes and actions into a transaction log, In PostgreSQL this term is used opposite of transaction log and used to refer to implement mechanism related to writing actions to transaction log.
following is introduction of some topics:
- The logical and physical Structure
- The internal layout of WAL data
- Writing on WAL data
- The checkpoint processing
- The database recovery processing
- Managing WAL segment files
- Continuous archiving

**Insertion Operation without WAL**
To provide efficient access to the relation's pages, every dbms implements shared buffer pool.

**Insertion Operation and Database Recovery**
PostgreSQL writes all modifications as history data into a persistent storage, to prepare for failures, and history data are known as WAL Data.
Record written into in-memory WAL buffer by change operations such as insertion and deletion or commit action. 
REDO point recover from the PostgreSQL database, it is the point that is location to write XLOG record at the moment when latest checkpoints is started.

**Full-Page Writes**
This system deals with failure of data, PostgreSQL writes a pair of the header-data and the entire page as XLOG record during the first change of each page after every checkpoint.

**Transaction Log and WAL segment Files**
Logically, PostgreSQL writes XLOG records into the transaction log which is a virtual file 8-byte long.
Transaction log in PostgreSQL is divided into files of 16-Mbyte by default, each of which knows as WAL segment.

**Internal Layout of WAL Segment**
WAL segment is a 16 MB file, by default and it is internally divided into pages of 8192 bytes. 

**Internal Layout of XLOG Record**
XLOG record first subsection describes the header structure and remaining two describe structure of data portion.

**Header Portion**
All XLOG records have a general header portion defined by the structure of XLogRecord.

**Data Portion of XLOG Record**
This structure formate is to maintain the source code to implement new features.
It is comprise of Backup block or non backup block

**Backup Log**
It is composed of two data structures and one data object.
- The Structure XLogRecord
- The Structure BkpBlock
- The entire page apart from its free-space

**Non-Backup Block**
This is also Comprised of two data structures an one data object.
- The structure XogRecord
- The structure xl_heap_insert
- The inserted tuple-to be precise, a few bytes is removed from the tuple.

[Reference](https://www.interdb.jp/pg/pgsql09.html)
58123b
Published: 2023-07-10 13:52:36

Nhà cái 123B lâu đời trong lĩnh vực cá cược trực tuyến. Cụ thể nó hoạt động từ năm 2012 và được cấp phép bởi tổ chức Philippines (PAGCOR). Tổ chức này luôn tuân theo các tiêu chuẩn, chuyên nghiệp trong ngành công nghiệp cá cược.
Với kinh nghiệm và uy tín, nhà cái 123B nhận được tin tưởng cao. Nhất là trong mảng cá cược trực tuyến. Sự tham gia của nhiều game thủ cũng cho thấy sự phổ biến của nhà cái này trong cộng đồng người chơi tại Việt Nam.
#123b #nhacai123b #link123b
ĐC: 233 Pham Van Dong, Quận 3, HCM, Việt Nam
Phone: (+84) 825123123
Mail liên hệ: 123B88com@gmail.com
Website: http://58123b.com
https://www.facebook.com/58123b/ 
https://twitter.com/58123b 
https://www.pinterest.com/58123b/ 
https://www.linkedin.com/in/nh%C3%A0-c%C3%A1i-b-b75956282/ 
https://vimeo.com/58123b 
https://www.tumblr.com/58123b 
https://www.reddit.com/user/58123b 
https://www.quora.com/profile/58123b 
https://soundcloud.com/58123b 
https://social.msdn.microsoft.com/Profile/58123b
Weekly AI News and Discussion Thread
Tags: ai, discuss, news
Published: 2023-07-10 13:33:28

Hey everyone, the past few months have been pretty electric in terms of advancements in AI and actual/imagined changes to our workflow and industry.

This is a regular open thread where everyone is encouraged to share...

* Notable news in the field of AI
* Personal experiences and insights
* Concerns and fears
* Success stories and demos
* And any other related discussions you'd like to bring to the table

This thread will go out every week.
React Counter App...
Tags: beginners, react, webdev, programming
Published: 2023-07-10 13:27:58

```
import React, { useState } from 'react';

function Counter() {
  const [count, setCount] = useState(0);

  const handleIncrement = () => {
    setCount(count + 1);
  };

  const handleDecrement = () => {
    setCount(count - 1);
  };

  return (
    <div>
      <h2>Count: {count}</h2>
      <button onClick={handleIncrement} data-testid="plus-btn">+</button>
      <button onClick={handleDecrement} data-testid="minus-btn">-</button>
    </div>
  );
}

export default Counter;
```

In this solution, I've used the useState hook to declare a state variable for the current count. I've also defined two event handlers, handleIncrement and handleDecrement, that update the count using the setCount function.

In the return statement, I'm displaying the current count along with two buttons that call the event handlers when clicked. I've also added **data-testid** attributes to each button so that they can be tested using React Testing Library or a similar tool.
ChatGPT: how I used it to convert HTTP requests to OpenAPI document
Tags: chatgpt, opensource, ts, programming
Published: 2023-07-10 13:12:45

Hi everyone! 👋
As a junior software developer, I try to learn as much as I can about new technologies and how to enhance my skills.
Contributing to open-source projects is one of the best ways to do that.

The following article shows one of my recent contributions to 
[Sharkio](https://github.com/idodav/sharkio), using ChatGPT.

## What is Sharkio? 🦈
Sharkio is a developer tool for API developers. It makes the developer's work easier by aggregating and presenting the requests sent to our services in a clean and clear UI. It also allows the mocking of HTTP requests to make it easier for backend and frontend developers to work efficiently together. 
Sharkio is an **open-source project** written in TS with a growing community and a long list of features requested by its developers and users.

## My contribution - HTTP requests to OpenAPI
My contribution to Sharkio focused on a highly requested feature: auto-generation of standardized [OpenAPI](https://swagger.io/) documentation using recorded HTTP requests. This feature addresses the need for consistent and comprehensive documentation in API development.

## Why use ChatGPT?
Using ChatGPT in my development process was a game-changer. It reduced the time spent on formatting the OpenAPI document structure, saving me hours of research. This freed up my focus to prioritize coding and implementation, leading to greater efficiency and productivity in my work.

My prompt: 

![ChatGPT prompt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99vnvbzt5qfe28l5b44e.png)

and the chat's output:

![ChatGPT output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sqmbgxir3k9zlsyzltp7.png)

A few prompts later, I end up with 3 interface to represent the OpenAPI document:


![openAPI interfaces](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kmu4u9fixcrlmhxjpd8i.png)

I modified the code to match the code structure, extracted interfaces and added a form to get the name and version type in the UI.

You could see the code [in the PR].(https://github.com/idodav/sharkio/pull/95)

The outcome was a form and a page to create an OpenAPI document using HTTP requests:

![openAPI generation UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4irg9wi8bgy1p6mblf5f.png)

## Join us 👨‍💻 👩‍💻
If you're interested in learning more about Sharkio, I invite you to visit the [repository](https://github.com/idodav/sharkio) and explore the project. Feel free to use the tool, provide feedback, and join the growing community of contributors. We welcome developers of all levels of expertise to join us on this exciting journey.
Basics - Class
Published: 2023-07-10 13:11:05

- What is a Class? 
A class is a data structure that may contain data members (constants and fields), function members (methods, properties, events, indexers, operators, instance constructors, finalizers, and static constructors), and nested types.
Imagine you have different types of toys, like cars, dolls, and balls. Each toy is special and does different things. A class is like a group that keeps similar toys together.

For example, let's say we have a class called "Vehicle." Inside this class, we can put all the toy cars. The class "Vehicle" tells us that these toys have wheels, can move around, and make vroom-vroom sounds. It's like a special group for all the toy cars.

- 
Why do we need a class? 
Having classes helps us organize and understand our toys better. It's like having different boxes for different types of toys. We can find our favorite toys easily because they are grouped together in a class.

So, a class is like a special group that helps us keep similar things together and understand them better.


```
``using System;

// Define the class
class Vehicle
{
    // Class properties
    public int NumberOfWheels;
    public string Sound;

    // Class constructor
    public Vehicle(int wheels, string sound)
    {
        NumberOfWheels = wheels;
        Sound = sound;
    }

    // Class method
    public void MakeSound()
    {
        Console.WriteLine(Sound);
    }
}

class Program
{
    static void Main()
    {
        // Create an object (toy car) from the Vehicle class
        Vehicle toyCar = new Vehicle(4, "Vroom-vroom!");

        // Access the object's properties
        Console.WriteLine("Number of wheels: " + toyCar.NumberOfWheels);

        // Call the object's method
        toyCar.MakeSound();
    }
}

```
Say goodbye to offline limitations and hello to seamless experiences!
Tags: programming, pwa, webdev
Published: 2023-07-10 13:11:05

🌐📲 Learn how Progressive Web #Applications (#PWAs) combine the best of web and #native apps to revolutionize user #experience [in our latest article (https://devler.io/blog/enhancing-user-experience-with-progressive-web-applications-pwas) 💪: 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8udoolli85985dyhiost.png)
Why should employers encourage contribution to Open Source?
Tags: opensource, discuss, programming, career
Published: 2023-07-10 12:35:29

---
title: Why should employers encourage contribution to Open Source? 
published: true
description: If contribution to open source projects can increase ones chances to find a new job, why should an employer encourage that?
tags: opensource, discuss, programming, career
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-07-10 12:14 +0000
series: opensource
---

I have a strong belief that participation in Open Source projects can increase  ones chances to find their first job. As an extension, continued contribution might improve the chances to find a new job for people already employed. 

Given this I wonder what do you think, why is it valuable for an employer to encourage its employees to contribute to open source projects? What would the employer gain from that?
🌱 Embracing Growth Mindset
Published: 2023-07-10 12:25:50

## Nurture Your Positive Learning Approach 🌟

**Hey there, fellow learners! 💡 Today, let's dive into the power of embracing a growth mindset as we embark on our coding journey. 🚀**

✨ Embrace Challenges:
Challenges are opportunities for growth! 💪 Instead of shying away, welcome them as chances to expand your skills and knowledge. Embrace the mindset that with effort and perseverance, you can conquer any coding hurdle that comes your way.

🌱 Emphasize Learning and Improvement:
Shift your focus from seeking perfection to valuing progress. 📚 Embrace the journey of continuous learning and improvement, knowing that mistakes and setbacks are stepping stones toward mastery. Embrace each new coding concept or project as a chance to develop and enhance your skills.

💡 Cultivate a Positive Attitude:
Adopt a positive outlook on learning. 🌟 Instead of getting discouraged by challenges, view them as valuable opportunities to grow. Celebrate small victories along the way, and recognize that every step forward brings you closer to your goals.

🤝 Seek Feedback and Collaboration:
Be open to feedback and collaboration. 🗣️ Engage with others in the coding community to exchange knowledge and ideas. Embrace the power of collaboration, recognizing that working together can enhance your learning experience and expand your horizons.

🌟 Embrace the Potential Within:
Believe in your potential! 🚀 Embrace the mindset that your abilities can be developed through dedication and effort. Emphasize the process of learning rather than focusing solely on outcomes. With a growth mindset, you can achieve remarkable things in your coding journey.

So, let's nurture our growth mindset, embrace challenges, and foster a positive approach to learning. Together, we'll unlock new possibilities and continue to thrive on our coding adventures! 💻💪
Unlocking Slack's Potential: Blog 1 - Overview and Key Functionalities
Tags: slack, tutorial, developer
Published: 2023-07-10 12:12:02

**What is Slack?** 

Slack is a powerful messaging and collaboration platform used by teams of all sizes. It goes beyond a simple communication tool and offers a wide range of features that can transform the way you work. 

Slack is all about Productivity you can customise it as per your needs, it is your Digital HQ.

> While Slack started as a collaboration tool, it has evolved into much more. 

Slack is more than just a collaboration tool. It can also be used for a variety of other purposes, such as:

- For **Customer support:** Slack can be used to provide customer support to your customers. For example, you can create a channel for customer support tickets and use Slack's search feature to find old tickets quickly. 

- For **Marketing:** Slack can be used to communicate with your marketing team and track your marketing campaigns. For example, you can create a channel for marketing announcements and use Slack's integrations with other tools to track the performance of your campaigns.

- For **Sales:** Slack can be used to communicate with your sales team and track your sales leads. For example, you can create a channel for sales leads and use Slack's reminders feature to follow up on leads that haven't been contacted in a while. 

To kick start yourself with slack watch my youtube video

{% embed https://youtu.be/DgtP-C74izI %}
Best AI Voiceover Tool in the Market | Wavel AI
Tags: ai, software
Published: 2023-07-10 12:08:40

The [**Wavel**](https://wavel.ai/) [AI voiceover tool](https://wavel.ai/solutions/voiceover/) uses advanced deep learning algorithms to convert text into natural-sounding speech.

With just a few clicks, you can create high-quality voiceovers for your videos, presentations, and other content. Our tool offers a wide variety of voices to choose from, so you can find the perfect one for your project. And because our tool is cloud-based, you can use it from anywhere, on any device.
**Try it now!**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h83yx2x9n26j2fovj6ep.jpg)
Securing AWS Accounts
Published: 2023-07-10 12:08:03

AWS Accounts are opened with a Root Account. By Default, this Root Account has full access to all aspects of an AWS Environment. As such, this account should **never** be used for routine, daily access. This account should be secured by MFA and only known to a few individuals within your organization. Instead, identities (human and machine) should be created to securely access your AWS workloads. 

- For all human identities, the Best Practice is to rely on a centralized identity provider (Identity Federation) for all human users who access AWS using the SAML 2.0 protocol or Open ID Connect. 

- All users who require access to Resources within your Amazon account for your organization should be provided with an account. This aids in monitoring and auditing of resources and allows granular control of access to resource, when combined with groups and policies. All users should be set up to use MFA and their devices allowed to be registered. Strong passwords should be required, and periodic audits and rotation of credentials should be mandatory. 

- Groups should be created for access to internal resources. All users should belong to one or more groups, to provide them with access to resources. Group memberships should be periodically reviewed and membership revoked for those who no longer require access, due to changes in role or exit from your organization. 

- Policies should be created that allow (or deny) access to resources within your AWS Account. These policies should then be assigned appropriately to the Groups containing the users requiring access to resources. Privileges should be granted using the Principle of Least Privilege--meaning that only the permissions required for an individual to do their job should be applied. 

This barely scratches the surface of what is needed to secure user access to AWS Resources. The [Security Pillar](https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/welcome.html) of the AWS Well-Architected Framework contains the Best Practices for securing AWS Workloads.
How To Properly Install NodeJS On Linux
Tags: node, tutorial, npm, nextjs
Published: 2023-07-10 12:03:14

I was trying to debug an error for a couple of hours. Later, I realised I was using an older version of NodeJS which was one among the many dependencies!

Here's how to properly install the current LTS version of NodeJS.
![right](https://media.giphy.com/media/pziaecoxBb9me2JnNb/giphy.gif)
```
# This is an important step
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
```
```
sudo apt install nodejs
```
In case, if you get an overwrite error. Do the following.

```
sudo dpkg -i --force-overwrite /var/cache/apt/archives/nodejs_18.16.1-deb-1nodesource1_amd64.deb
```

```
sudo apt -f install
```

```
sudo apt update
```

```
sudo apt dist-upgrade
```
![right](https://media.giphy.com/media/uo8gOZedkMlDblbkzV/giphy.gif)
Now, you are good to go. Enjoy the latest LTS (Long Term Support) version of NodeJS! 🥳
Survey for my master thesis for IT employees
Tags: beginners, workplace, career, learning
Published: 2023-07-10 11:56:04

Hi,

Just got a permanent job from qa and now trying to make my master thesis ready before it starts and need to make a study. I decided to write my thesis on information system modeling and would be very grateful if you are working on IT and could answer this survey which takes 2 minutes. It has questions that study do people use IS modeling and do they think it’s important. It’s completely anonymous. Would hugely gratitude if you have time to answer so I can graduate from school!

https://forms.gle/N2vRowUFXVqZTuWu6
DX executed correctly Continuous Learning
Tags: devex, dx, lifelonglearning
Published: 2023-07-10 11:30:00


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

Hey guys! Are you all right?

Today I want to share with you a little about the culture of continuous learning (you may have heard it called Lifelong Learning) and knowledge sharing that DX proposes. This culture is essential for creating innovative and high-quality solutions for customers and users.
What is continuous learning? It is the ability to always be looking for new knowledge and skills, whether through courses, books, podcasts, articles, or other sources. It is also being open to receiving feedback and learning from mistakes and successes.
What is knowledge sharing? It is the practice of disseminating what we have learned with our colleagues, whether through lectures, workshops, mentoring, or other ways. It is also being willing to help others and clear up doubts.
Why are these two things important to Developer Experience? Because they allow us to keep up with market changes and trends, adopt best practices and tools, solve complex and challenging problems, and deliver value to our stakeholders.
How do we cultivate this culture in Sinqia? We have some rituals and initiatives that encourage us to constantly learn and share. For example:
- We have channels on Teams where we share interesting links about software development, design, UX/UI, accessibility, etc.
- We have periodic meetings (Guilds) on various technology topics, where a team member presents a topic relevant to our work or a personal project.
- We have an internal mentoring program, where the more experienced team members help the younger ones with technical or behavioral issues.
- We have a Corporate University, SinqiaUP, with several courses, for example: technical, business, and soft skills leadership. All related to our work.
- We participate in external events such as conferences, meetups, and hackathons to update ourselves and expand our network of contacts.

These are some of the ways we’ve found to maintain a culture of continuous learning and knowledge sharing within our team. And you? How do you learn and share your knowledge in your work? Leave your comment below!
Hope you enjoyed this article.

Thank you for your attention and see you later!

[Armando Guimarães Junior](https://www.linkedin.com/in/armandojr/) 🥑