teleren/devto huggingface dataset:
Open Source Development Course for Perl developers - 2023.01
Tags: perl
Published: 2023-04-19 19:46:56

What happens in life is that we learn until the end. For me, it's time to learn how to use tools supporting Open Source projects. For years, I mostly worked alone. And mostly in closed projects. I've been developing an Open Source project for some time now. In order to properly cooperate with other programmers, I started an interesting course "Open Source Development Course for Perl developers - 2023.01" implemented as part of the code-maven.com project.
How to Hash and Salt Passwords for Secure Database Storage with Node.js?
Published: 2023-04-21 20:29:30

---
title: How to Hash and Salt Passwords for Secure Database Storage with Node.js?
published: true
date: 2023-04-19 19:45:46 UTC
tags: 
canonical_url: https://harshmange.hashnode.dev/how-to-hash-and-salt-passwords-for-secure-database-storage-with-nodejs
---

Sure, here is an example of how to securely store passwords in a database using Node.js:

1. Install the `bcrypt` library:

2. In your user registration route, hash the password using `bcrypt`:

3. In your user login route, compare the hashed password in the database with the input password using `bcrypt`:

4. To store access tokens in the database, you can create a separate collection/table for tokens and store the token along with the user ID and expiration date. Here is an example using MongoDB and Mongoose:

These are just some examples of how to securely store passwords and access tokens in a database using Node.js. It is important to follow best practices and ensure that your application is properly secured.
Understanding Conflict Serializability in DBMS
Published: 2023-04-21 20:29:22

---
title: Understanding Conflict Serializability in DBMS
published: true
date: 2023-04-19 19:39:05 UTC
tags: 
canonical_url: https://harshmange.hashnode.dev/understanding-conflict-serializability-in-dbms
---

In database management systems, serializability is a property that ensures that the concurrent execution of transactions produces the same results as if the transactions were executed serially, one after another. Conflict serializability is a specific type of serializability that ensures that there are no conflicts between transactions during their concurrent execution.

A conflict between two transactions occurs when they access the same data item and at least one of them modifies it. The following four types of conflicts are considered in conflict serializability:

1. Read-Write conflict (RW): A transaction reads a data item that another transaction has written to.

2. Write-Read conflict (WR): A transaction writes to a data item that another transaction reads.

3. Write-Write conflict (WW): Two transactions write to the same data item.

4. Read-Read conflict (RR): Two transactions read the same data item.

In order to ensure conflict serializability, a schedule of transactions needs to be tested to see if it is conflict equivalent to some serial schedule. A schedule is conflict equivalent to a serial schedule if the two schedules produce the same result, and there are no conflicts between transactions in the schedule.

Let's consider an example to understand this concept more clearly:

Suppose we have two transactions T1 and T2, and a database with two data items X and Y. The following is a schedule of the transactions:

Schedule S1:

T1: Read(X) T2: Read(Y) T2: Write(Y) T1: Write(X)

The above schedule contains two conflicts:

- T1 reads X while T2 writes Y.

- T2 writes Y while T1 writes X.

Now, let's consider a serial schedule that is equivalent to S1:

Schedule S2:

T2: Read(Y) T2: Write(Y) T1: Read(X) T1: Write(X)

S2 is a conflict equivalent schedule to S1, as it produces the same result and there are no conflicts between transactions in S2. Therefore, S1 is conflict serializable.

In summary, conflict serializability ensures that the concurrent execution of transactions produces the same result as if they were executed serially, while preserving the integrity of the data in the database. It is an important concept in database management systems to ensure the correctness of the system.
Python Basics pt 1
Tags: beginners, python, tutorial, programming
Published: 2023-04-19 19:38:10

Hey! i'm super new to coding, like extremely!
I've used what I've learnt from Code Academy so far to make this power point to help myself start learning the basics of Python - hopefully it'll help some other beginners out there! Enjoy :) 
https://1drv.ms/p/s!AtkR5x_-2LIMgQDdAMR5vRy4Cpi4?e=h0Gw1u
Bridge, namespaces et vethernet comme docker0
Tags: docker, linux, network
Published: 2023-05-04 08:38:24

---
title: Bridge, namespaces et vethernet comme docker0
published: true
date: 2023-04-19 19:05:27 UTC
tags: docker,linux,network
canonical_url: https://xavki.blog/bridge-namespaces-et-vethernet-comme-docker0/
---

Souvent quand on introduit docker, on le présente comme un outil qui utilise des fonctionnalités de Linux : les cgroups et les namespaces… Je sais je l’ai fait plusieurs fois sur la chaine Xavki. Bon c’est bien et ça buzz...

L’article [Bridge, namespaces et vethernet comme docker0](https://xavki.blog/bridge-namespaces-et-vethernet-comme-docker0/) est apparu en premier sur [Xavki](https://xavki.blog).
kmnz
Published: 2023-04-19 18:55:32

`pragma solidity ^0.8.0;

contract SimpleStorage {
    uint256 public storedData;

    function set(uint256 x) public {
        storedData = x;
    }
}
`


```
pragma solidity ^0.8.0;

contract SimpleStorage {
    uint256 public storedData;

    function set(uint256 x) public {
        storedData = x;
    }
}

```
Best Colour Prediction Games APK And Websites
Tags: earnmoneyonline, onlinegames
Published: 2023-04-19 09:48:52

Color prediction game is a type of online game where players predict the color of a ball or a card that will be displayed on the screen. The game is usually hosted on a website or mobile app and requires players to register, deposit money, and place bets on the color they believe will be displayed next.

In these games, the odds of winning are typically 50/50, as there are only two possible outcomes - either the color predicted by the player is displayed or it is not. The amount won or lost depends on the amount of the bet placed and the odds offered by the game.

## How Do Colour Prediction Games Work?

Color prediction games typically work by using an algorithm that generates a random sequence of colors, such as red and black. The sequence of colors is usually displayed on the screen, and players are asked to predict the next color that will be displayed.

To participate in the game, players must first register on the platform and deposit money into their account. Once they have done this, they can place a bet on the color they believe will be displayed next.

The game then uses a random number generator to determine the color that will be displayed next. If the player's prediction is correct, they will win a payout based on the amount of the bet placed and the odds offered by the game. If the player's prediction is incorrect, they will lose their bet.

## Best Colour Prediction Game To Join

[Mantrigame](https://mantrigame.com/#/pages/person/register?r_code=281846) is one of the best prediction game to earn some money.

Note: It is important to note that color prediction games are often associated with online gambling and can be highly addictive. It is crucial for players to exercise caution and gamble responsibly.
What is the 'Binary Log Coordinates' aka '--master-data' flag in DB?
Published: 2023-04-21 20:29:04

---
title: What is the 'Binary Log Coordinates' aka '--master-data' flag in DB?
published: true
date: 2023-04-19 18:46:27 UTC
tags: 
canonical_url: https://harshmange.hashnode.dev/what-is-the-binary-log-coordinates-aka-master-data-flag-in-db
---

Binary log coordinates are a set of values that identify a specific location in the binary log of a database server. These values include the name of the binary log file and the position within that file. Binary log coordinates are used to keep track of the changes made to a database server, and are especially useful for incremental backups and point-in-time recovery.

During a backup, binary log coordinates can be included in the backup file using the `--master-data` option in MySQL. When this option is set to `1`, the binary log file name and position are included in the backup file as a comment. When set to `2`, the binary log coordinates are written to the backup file as SQL statements that are executed during the restore process.

Here's an example of how to include binary log coordinates in a MySQL backup:

```
mysqldump -u username -p --databases database_name --master-data=2 > backup.sql

```

In this example, the `--master-data=2` option is used to write the binary log coordinates to the backup file as SQL statements.

During a restore, binary log coordinates are used to identify the point in time to which the database should be restored. The `mysqlbinlog` utility can be used to read the binary log and extract the relevant SQL statements for a point-in-time recovery. Here's an example of how to use binary log coordinates for a point-in-time recovery in MySQL:

1. Determine the binary log coordinates for the desired restore point using the `SHOW MASTER STATUS;` command in MySQL.

2. Restore the full backup file.

3. Use `mysqlbinlog` to extract the relevant SQL statements from the binary log file:

By including binary log coordinates in a database backup, you can ensure that you have a complete record of all changes made to the database server, and that you can restore the database to a specific point in time if necessary.
PostgreSQL Database Clusters, Databases, and Tables: Chapter 1 Recap
Tags: database, postgres
Published: 2023-04-19 18:27:22


Hi, I just wanted to share a short summary of what I learned about PostgreSQl Database from Chapter 1 of The Internals of PostgreSQL.

## 1.1 Logical Structure of Database Clusters

A database cluster is a bunch of databases managed by a PostgreSQL server running on a single host. So, it's not a group of servers but just one server managing multiple databases. In PostgreSQL, databases contain many objects, such as tables, indexes, sequences, views, and functions, which store or reference data. Each database is separate, and its objects belong to it. For instance, tables, indexes, etc. belong to their respective databases. 

## 1.2 Physical Structure of Database Clusters

The physical structure of a PostgreSQL database cluster is essentially a directory with a base directory as its root. The base directory is created when the initdb utility initializes a new database cluster, and it typically resides at a path specified by the environment variable PGDATA. Each database in the cluster is a subdirectory under the base directory, and each table or index is stored as at least one file under the subdirectory of the database to which it belongs. Additionally, there are subdirectories for particular data and configuration files. While PostgreSQL does support tablespaces, the meaning of the term is different from other RDBMS; in PostgreSQL, a tablespace is simply a directory that contains data outside of the base directory.

## 1.3 Internal Layout of a Heap Table File

In PostgreSQL, data files are divided into pages of fixed length. A page in a heap table file consists of heap tuples, line pointers, and header data. Heap tuples contain the actual record data and are stacked in order from the bottom of the page. Line pointers form an array that holds pointers to the heap tuples, and each index is numbered sequentially from 1. Header data, defined by the PageHeaderData structure, contains general information about the page, including the LSN of the last XLOG record written to the page and the checksum value of the page. To identify a tuple within the table, a tuple identifier (TID) is used, which comprises a pair of values: the block number of the page that contains the tuple and the offset number of the line pointer that points to the tuple.

## 1.4 The Methods of Writing and Reading Tuples

This section explains the methods of writing and reading heap tuples in PostgreSQL. When a new tuple is added to a table, a new line pointer is pushed onto the array to point to the new tuple, and the header data within the page is updated accordingly. To read heap tuples, two typical access methods are sequential scan and B-tree index scan. Sequential scan involves reading all tuples in all pages sequentially by scanning all line pointers in each page. In contrast, B-tree index scan involves using an index file to locate the desired heap tuple based on the TID value obtained from the index tuple.

Thats all for this time and I hope to share what I learn further in the future with you guys.
Git amend and reset author
Tags: git
Published: 2023-04-19 18:01:52

You may have ended up with multiple wrong authors in your last commit. Sometimes, squashing or rebasing can do that. When the commit is the most recent one, it's as easy as:

```
git --amend --reset-author
```

That will open up the default editor and allow you to add more co-authors if needed. But if that's not what you want you can skip the editing with:

```
git --amend --reset-author --no-edit
```

Please note that this will get the author information from your global or local git config. If that's wrong, you may want to adjust it before you run the suggested command above.

Please also note, that this will need a force push if the branch is already published. Which means you need to talk to any other collaborators that also work on the same branch.
Using ASCII Art in Python
Published: 2023-04-19 18:00:55

ASCII art is an ancient and mystical art form that uses characters from the ASCII character set to create wacky images. If you're feeling bored and want to spice up your programming life, why not try using Python to create some hilarious ASCII art designs?

Now, let's take a look at the ASCII character set. It's a group of 128 characters that includes letters, numbers, and symbols. But forget all that, because we're going to be using characters like ampersands, bananas, and ice cream cones to create our masterpieces!

To create ASCII art designs using Python, we'll need to use the built-in print() function, which is basically like a printer for your computer screen. We'll also need to use some string concatenation and repetition, which is just a fancy way of saying we're going to stick a bunch of characters together and repeat them until our design is complete.

Here's an example of how to create a simple ASCII art design using Python:

```
print("(\__/)")
print("(='.'=)")
print("('')_(")")
```

This code will output a cute little bunny made of parentheses, equal signs, and underscores:

```
(\__/)
(='.'=)
('')_('')
```

But that's just the beginning! We can create even more outrageous designs by combining characters and strategically using loops. Here's an example of how to create a Triangle:

```
for i in range(5):
    print(" " * (4 - i) + "/" + "  " * i + "\\")
print(" " * 2 + "========")

```

This code will output of simple triangle using symbols like forward slashes, backslashes, and equal signs:

```
   /\
  /  \
 /    \
/      \
  ======
```

If you want to take your ASCII art to the next level, you can also use external libraries like pyfiglet to create ASCII art from text. Pyfiglet is a Python module that provides a way to generate ASCII art from text using ASCII fonts. Here's an example of how to use pyfiglet to create ASCII art from text:

```
import pyfiglet

text = "LOL"
ascii_art = pyfiglet.figlet_format(text)
print(ascii_art)

```

This code will output the text "LOL" in ASCII art using a fancy ASCII font:

```
 _     ___  _     
| |   / _ \| |    
| |  | | | | |    
| |__| |_| | |___ 
|_____\___/|_____|

```
In conclusion, if you're feeling like a wild and crazy programmer, give ASCII art a try with Python! With the built-in print() function, string concatenation and repetition, and external libraries like pyfiglet, you can create hilarious and ridiculous ASCII art designs that will make your friends laugh and your enemies run away in fear.
What is Chmod?
Tags: unix, security, permissions, sre
Published: 2023-04-19 18:00:12

chmod is a command-line utility that enables users to change the access permissions of files and directories on Unix-based systems. Unix file permissions model includes _read_, _write_, and _execute permissions_, and these permissions can be granted or denied to three categories of users, namely the _owner of the file_, the _owner's group_, and all _other users_.

To use `chmod`, users can specify the permissions they want to change, the user category they want to change, and the file or directory they want to modify. 

`chmod [options] mode file`

Here, mode represents the permissions you want to set, and file represents the file or directory you want to modify. The options can be used to specify additional settings, such as recursive mode for modifying permissions of all files and subdirectories under a given directory.

For example, to grant the owner of a file read, write, and execute permissions while denying all other users any permissions, one can use the following command: `chmod 700 filename`. This sets the file permissions to `rwx------`.

The `7` in `700` represents the owner's permissions, which are read, write, and execute (rwx). The `0` represents the permissions for the group and all other users, which are none.

Using `chmod` requires caution as changing permissions incorrectly can compromise system security and data loss. It is crucial to have a good understanding of file permissions and associated risks. `Chmod` helps maintain data security and streamline file management by restricting unauthorized access to files and directories. It is a powerful tool for managing file permissions on Unix-based systems, and using it effectively can help maintain data security and integrity.
Set env variables in Windows at one go
Tags: windows, env, programming
Published: 2023-04-19 17:58:51

## What is Environment Variable and Why do we need it?

![Environment Variables in Windows](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17guawiaxojpqezqlihg.jpg)
Environment Variables contain a value that can change, depending on conditions or on information passed to the program. They are information containers for all applications running on the operating system which helps to set up the software environment.

It provides ease in searching.Instead of going through the entire system, the environment variable contains valuable information about system processes, configuration data, file path, and more.

## In Windows to set all the env variable at one go

- Create a Bash file using the `.bat` extension eg `setenv.bat`.

- In the bash file use the following syntax for setting the env variable.

```
setx [variable_name] “[variable_value]”
```
Here:
[variable_name] - name of the variable you want to enter. 
[variable_value] -  value for the created variable.

For example, let’s add a APP_NAME with a value “ABC” in bash file:

```
setx APP_NAME "ABC"
```

- After creating the bash file To set the env variable in one go We can use the following command in the command prompt

```
setenv.bat 
```
 
## To set env variable individually
You can set each env by using the following command in command prompt 

```
setx APP_NAME "ABC"
```

## Verify its existence

To verify its existence using Command Prompt. We can use the following command:

```
Set APP_NAME 
// ABC 
```

Or you can see the set env variables through the following path in windows:

_Control Panel -> System and Security -> System -> Advance System Setting-> Environment variables_ 

![Verify set env variable](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yjxisoqa5uqrnf3se7n8.gif)
Recap: Introduction to Postman API 101 Workshop at Sahdaya College of Engineering and Technology
Tags: beginners, postmanstudent, postmanapi, api
Published: 2023-04-19 17:47:40


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o8jo0jb8javywx256hgo.jpg)
On Tuesday, April 18, 2023, from 1 p.m. to 4:15 p.m., **Sahrdaya College of Engineering and Technology,Kodakara** in collaboration with **ACES** and **IEEE Computer Society Sahrdaya**, organised a workshop on **"Introduction to Postman API 101"**. The event was conducted by **Mr. Joel Jaison**, an API enthusiast, full stack developer,etc and one of my esteemed classmates.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3y1glhhb195dowfbw9td.jpg)
The workshop aimed to provide an interactive platform for attendees to learn about the fundamentals of API testing using Postman, a popular API development tool. The event started with a brief introduction to APIs and their importance in modern software development. Mr. Joel Jaison then proceeded to explain the features and **functionalities of Postman including API testing, documentation, and collaboration tools.**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fq1r4ut1x3tzbq81owk5.jpg)
The attendees were encouraged to get hands-on experience with Postman through a series of interactive sessions. They were taught **how to create requests, define parameters, and analyse responses using Postman's intuitive interface**. Mr. Joel Jaison also demonstrated how to use Postman to automate API testing and document API endpoints.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wbay8z2n5sp7ane73xaz.jpg)
The workshop concluded with a Q&A session, where the attendees had the opportunity to clarify any doubts they had regarding the topics covered. **The feedback from the attendees was overwhelmingly positive, with many expressing their appreciation for the practical knowledge they gained from the event.**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3sqv3g3sesm32tf0nfdt.png)
Overall, the "Introduction to Postman API 101" workshop was a great success, and we would like to thank Mr. Joel Jaison for his insightful and informative session. We look forward to organising more such events in the future to promote knowledge-sharing and skill-building among our peers.
42 berufliches Vorwärtskommen: Einflüsterung?! Was nun?
Tags: deutsch, career, motivation, discuss
Published: 2023-04-19 17:39:06

Moin Moin,

solltest du festgestellt haben oder zumindest den Verdacht haben, dass jemand dir einflüstert, so solltest du dich auf jeden Fall zur Wehr setzen. Einflüsterung ist ein Angriff auf deine Psyche und damit auf deine Gesundheit. 
Am besten, du handelst sofort.

Es folgen Vorschläge nach Vorzug:
1. Ein direktes Gespräch mit dem (Haupt-)Einflüsterer ( bei mehreren )
2. Ein direktes Gespräch mit einem Vorgesetzten (1)
3. rechtliche Schritte einleiten (2)

Auf jeden Fall solltest du dich von den Ansichten distanzieren, also dich _nicht_ fragen, ob an den Äußerungen etwas dran sein könnte. Reflexionen sollten stets sachlich geführt werden, nicht unter emotionaler Manipulation.

1. Kennt ihr einen Fall bei dem jemand Rechtswege einleiten musste?
2. Habt ihr selber ein Gespräch diesbezüglich führen müssen?

Lass uns über die Kommentare austauschen.

Beste Grüße,
Mustafa

Austausch mittels E-Mail: mustafa.kevin.dwenger@posteo.de
Betreff: Austausch

(1) Kündigung - Falls der Geschäftsführer oder ein Gesellschafter selbst daran beteiligt ist.
(2) [siehe: JuraWiki↗](https://www.jurawiki.de/Mobbing)