teleren/devto huggingface dataset:
Understanding Lexer: The Role of Tokenization in the Compilation Process
Published: 2023-03-19 16:52:18


**Introduction**: The process of compiling source code into executable code is complex, involving multiple components working together. One such component is the lexer, which plays a critical role in the compilation process. In this blog, we'll explore what a lexer is, how it works, and the importance of tokenization in the lexing process.

**What is a Lexer?**
 A lexer, also known as a lexical analyzer, is a component of a compiler or interpreter that breaks down the source code into a sequence of tokens. Tokens are meaningful language constructs that represent keywords, identifiers, operators, and other components of the programming language.
How Does a Lexer Work? A lexer works by scanning the input source code character by character, grouping them into tokens based on the grammar of the programming language. The lexing process involves several steps, including character recognition, tokenization, and classification.
Tokenization: Tokenization is a crucial step in the lexing process, where the lexer breaks down the source code into individual tokens. Tokenization makes it easier for the lexer to classify each token based on its type, making the code easier to analyze and understand.
**Types of Tokens:** The lexer can generate different types of tokens, including keywords, identifiers, literals, operators, and punctuation. Each token type has a specific meaning and purpose within the programming language.
Lexer vs Parser: While the lexer and parser work together to translate source code into executable code, they perform different functions. The lexer breaks down the source code into individual tokens, while the parser uses those tokens to create a parse tree, which is used to generate executable code.
**Lexer Implementation:** There are several lexer generator tools available, such as Flex and ANTLR, that can help implement the lexer component of a compiler or interpreter. These tools make it easier to create a lexer for a programming language by generating the necessary code based on a set of rules and specifications.
**Conclusion:** In conclusion, the lexer plays a critical role in the compilation process by breaking down the source code into individual tokens. Tokenization is a crucial step in the lexing process, making it easier for the lexer to analyze and understand the code. Understanding the lexing process is essential for developers and computer science students, as it provides insight into how programming languages work and how compilers and interpreters translate source code into executable code.

[Apache-Age:-https://age.apache.org/](https://age.apache.org/)
[GitHub:-https://github.com/apache/age](https://github.com/apache/age)
👌👌 CONVERT ANY WEBSITE TO FIGMA DESIGN 👌👌
Tags: figma, tutorial, webdev, beginners
Published: 2023-03-19 16:47:52

{% youtube Z4IGCimjxb8 %}

Thanks For Watching :)

Plugin Links :   https://www.figma.com/community/plugin/1159123024924461424/html.to.design
Major difference between Encryption, Hashing and Salting
Tags: javascript, node
Published: 2023-03-19 16:39:09

Encryption, hashing, and salting are all techniques used to protect data in various ways, but they serve different purposes and have distinct differences.

Encryption is the process of transforming readable data into unreadable ciphertext, which can only be decrypted with a key. Encryption is commonly used to protect data in transit or at rest, such as when sending sensitive information over the internet or storing it on a device. The goal of encryption is to ensure confidentiality, meaning that unauthorized parties cannot access the data.

Hashing is the process of taking data of any size and generating a fixed-length output, known as a hash. The hash is a unique digital fingerprint of the original data, meaning that even a small change in the data will result in a completely different hash. Hashing is commonly used for password storage, as it allows for quick and easy comparison of passwords without actually storing the password in plain text. The goal of hashing is to ensure data integrity, meaning that the original data has not been tampered with.

Salting is a technique used in conjunction with hashing to make it more difficult for attackers to crack passwords. Salting involves adding a random string of characters, known as a salt, to the original password before hashing it. The salt ensures that even if two users have the same password, their hashed passwords will be different. This makes it more difficult for attackers to use precomputed lists of hashes, known as rainbow tables, to crack passwords. The goal of salting is to ensure data security, meaning that the data is protected from unauthorized access.

In summary, encryption is used to ensure confidentiality, hashing is used to ensure data integrity, and salting is used to ensure data security. These techniques are all important for protecting data in different ways and are commonly used together to provide a layered approach to data protection.
First Program in ADO.NET
Tags: aspnetcore, adodotnet, csharp
Published: 2023-03-19 15:55:01

You will learn how to create ADO.NET commands for the console, windows forms, and database connections in this lesson. This programmer serves only as a demonstration of how ADO.NET functions. You will learn everything there is to know about ADO.Net in the ensuing chapters.

## 
First Create Database
Open Visual Studio.

- 
Go to Server Explorer. If Server Explorer is not opened go to View Server Explorer.

- 
Right click on Data Connections and select Create New SQL Server Database.

- 
Fill details like this.

- 
Server Name: .\SQLEXPRESS

- 
Select Windows Authentication

- 
Database Name: Test1

- 
Click OK.

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

## 
Create Table User in Database

```
Create table Users
(
    [Id] [int] IDENTITY(1,1) NOT NULL primary key,
	[Name] [varchar](100) NULL,
	[Address] [varchar](100) NULL,
	[PhoneNo] [varchar](100) NULL
);

```

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

## 
Add Data in Table 
Add some data in table using SQL data table Interface 

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

## 
Get the Database Connection String 
Your tables and database are now ready. Your connection string is in the database's properties.

## 
Right Click on Database Properties
The database you currently have has a table and a connection string. The next step is to establish a database connection and use ADO.Net Commands to fetch the records.

## 
Create the C# Console Application 
Create the C# Console application for writing the ADO.NET Code 

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

## Write the Code in Console Application

```
using System.Data.SqlClient;

string ConString = @"Server=localhost\SQLEXPRESS;Database=Test1;Trusted_Connection=True;";
SqlConnection con = new SqlConnection(ConString);
string SqlQuery = "Select * from Users";
con.Open();
try
{
	SqlCommand sqlCommand = new SqlCommand(SqlQuery,con);
	SqlDataReader reader = sqlCommand.ExecuteReader();
	while (reader.Read())
	{
		Console.WriteLine(reader[0].ToString() + "\n" + 
			reader[1].ToString() + "\n" + reader[2].ToString()+"\n"
			+reader[3].ToString());
	}
}
catch (Exception)
{
	throw;
}
finally { 
	con.Close();
	Console.ReadKey();
}

```

## 
Output Of the Code
Now you can see the Records From the Database Using Ado.NET

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ahbay1647py76e2jzd6.png)
Process FormData file sent to Node server
Tags: file, upload, formdata, attach
Published: 2023-03-19 15:52:16

---
title: Process FormData file sent to Node server
published: true
description: How to process/recieve a formdata file sent to Node server
tags: file, upload, formdata, attach
# cover_image: 
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-19 15:21 +0000
---

I struggled to find much online about how to simply process a FormData file (PDF, in this case) sent to a Node server to be attached to an email or used for other things. This is a very basic example but the key part is this line on the server:

`Buffer.from(await file.arrayBuffer())`

**form.html**
```
<form id="fileForm">
  <div>
    <label for="pdf_file">File Upload</label>
      <input type="file" name="pdf_file" />
  </div>
  <button type="submit">Send File</button>
</form>
```

**form.js**
```
document.getElementById("fileForm").addEventListener("submit", (e) => {
  e.preventDefault();
  const formData = new FormData(e);
  fetch("/", {
    method: "POST",
    body: formData
  });
});
```

**server.js**
```
app.post('/', async (request, response) => {
  const values = await request.formData();
  const file = values.get("pdf_file");
  const processedFile = Buffer.from(await file.arrayBuffer());
  //attach to email or do other things
};
```
Introducing Superviseur - A process supervisor for local development
Tags: tooling, rust
Published: 2023-03-19 15:50:20

Are you tired of manually starting and stopping all the services you need for local development? Have you ever wished there was a tool that could handle this for you? Look no further than Superviseur!

Superviseur is a simple process supervisor for UNIX-like systems that allows you to manage executables, WASM, and Docker containers all from one place. It is perfect for local development environments where you need to manage multiple services simultaneously.

Installation is easy. Simply clone the repository and compile using the following commands:

```bash
brew install protobuf # macOS
sudo apt-get install -y protobuf-compiler # Ubuntu/Debian
curl -fsSL https://bun.sh/install | bash
git clone https://github.com/tsirysndr/superviseur
cd superviseur/webui && bun install && bun run build && cd ..
cargo install --path .
```

Superviseur is still in the alpha phase, so be warned that it may be unstable. However, the tool is already quite powerful and has a lot of features. You can download the latest release for your platform [here](https://github.com/tsirysndr/superviseur/releases).

Once you have installed Superviseur, you can start using it by starting the daemon and initializing a new project using the following command:

```bash
superviseur daemon &
superviseur new
```
This will create a `Superfile.hcl` file in the current directory with an example configuration that you can modify to suit your needs. You can then start a service using the `superviseur start <service_name>` command. You can check the status of a service using the `superviseur status <service_name>` command.

Superviseur also has a web UI that you can use to manage your services. To start the web UI, simply use the `superviseur ui` command.

Superviseur is still a young project, and there are plenty of ways you can contribute. If you encounter a bug or have a feature request, please submit an issue on the [GitHub repository](https://github.com/tsirysndr/superviseur). If you would like to contribute to the project, there are a number of open issues and feature requests that you can work on. You can also contribute by improving the documentation or helping to test the tool.

In conclusion, Superviseur is a powerful and easy-to-use process supervisor that can help you manage your local development environment. Give it a try and let us know what you think!
Create Database Using ADO.NET
Published: 2023-03-19 15:50:01

## 
Create Database Using ADO.NET 
Here, I'll programmatically construct the ADONETPracticeDb database. This code can be used in console programmers as well as Windows and web apps.

## 
Code Example 

```
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ado.net_Practice
{
    public static class CreateDatabaseUsingAdoNetCore
    {
        public static void CtreateDatabase()
        {
            string ConString = @"Server=localhost\SQLEXPRESS;Database=Test1;Trusted_Connection=True;";
            SqlConnection con = new SqlConnection(ConString);
            string query = "Create Database ADONETPracticeDb";
            SqlCommand cmd = new SqlCommand(query, con);
            try
            {
                con.Open();
                cmd.ExecuteNonQuery();
                Console.WriteLine("Database Created Successfully");
            }
            catch (SqlException e)
            {
                Console.WriteLine("Error Details: " + e.ToString());
            }
            finally
            {
                con.Close();
                Console.ReadKey();
            }
        }
    }
}

```

## 
Main Class Code 

```
using Ado.net_Practice;

CreateDatabaseUsingAdoNetCore.CtreateDatabase();

```

## 
Code Output

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

## 
SSMS Database Create Successfully 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1zsfljxdvab1dacy1clo.png)
Connecting To Database Using C# ADO.Net
Published: 2023-03-19 15:44:44

What is Connection Object in ADO.NET
Your application can be connected to a database or data source via a connection object. It opens a connection and carries the necessary authentic data, such as the login and password, in the connection string. For various data providers, a distinct kind of connection object is required. For instance:

- 
OLE DB – OleDbConnection

- 
SQL Server – SqlConnection

- 
ODBC – OdbcConnection

- 
Oracle – OracleConnection

## 
What is Connection String 
The Connection String comprises all the necessary legitimate data, such as Server Name, Database Name, Username, Password, etc., that is used to connect to a Data Source. A connection object uses a single line string to establish a connection to the database. This is how a connection string appears.
Data Source=.\SQLEXPRESS;Initial Catalog=Test1;Integrated Security=True
Another Example 
_Data Source=.\SQLEXPRESS;Initial Catalog=TestDB;User ID=sa;Password=System123;Pooling=False_

## 
Connect To the Database 
There are 5 steps to connecting the database.

- 
Add Namespace: using System.Data.SqlClient;

- 
Create a Connection Object and Pass Connection String as Parameter.

- 
Open Connection

- 
Execute SQL Query

- 
Close the Connection

## 
Read The Data from the Database
The below code snippet will help you understand how we will use ADO.Net to retrieve the data from the database.



```
using System.Data.SqlClient;
string ConString = @"Server=localhost\SQLEXPRESS;Database=Test1;Trusted_Connection=True;";
SqlConnection con = new SqlConnection(ConString);
string SqlQuery = "Select * from Users";
con.Open();
try
{
	SqlCommand sqlCommand = new SqlCommand(SqlQuery,con);
	SqlDataReader reader = sqlCommand.ExecuteReader();
	while (reader.Read())
	{
		Console.WriteLine(reader[0].ToString() + "\n" +
			reader[1].ToString() + "\n" + 
                        reader[2].ToString()+"\n"
			+reader[3].ToString());
	}
}
catch (Exception)
{
	throw;
}
finally {
	con.Close();
	Console.ReadKey();
}

```
Program Output
 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mcrwevstkgb6lli3s32c.png)
Introduction To Ado.NET
Published: 2023-03-19 15:38:37

## Introduction:

You may connect to and operate with data sources such as databases, excel files, access files, XML files, MySQL, SQL, and notepad using the ADO.NET set of classes. You must be aware of the appropriate Data Provider in order to link your application with various databases. In ADO.NET, there are numerous Data Providers that link to various sources. Below is a list of ADO.NET Data Providers.

## Data Providers for.NET in Ado.NET

SQL Server

- 
System.Data.SqlClient  With the help of this Data Provider, you can connect to SQL Server databases.
OLEDB	

- 
System.Data.OleDb  To connect to SQL Server, Oracle, and Microsoft Jet, utilize this Data Provider.
ODBC	

- 
System.Data.Odbc  It is used to connect with SQL Server, Oracle, and Microsoft Databases(.mdb).
Data Provider for Oracle	

- 
System.Data.OracleClient
EntityClient Provider	
•	Gives Entity Data Model (EDM) applications access to data. utilizes the system Namespace Data.EntityClient.
SQL Server Compact 4.0	

- 
Enables Microsoft SQL Server Compact 4.0 to access data. utilizes the system Namespace Data.SqlServerCe.
Essential Components of .NET Data Providers 
To connect to, access, and retrieve data from the database, 4 Core Components of.Net Data Providers are used. You must commit to memory these four essential ADO.Net elements.

## Connection 
To connect to the database, utilize this component. The DbConnection base class is used.

- 
Command 
This part uses the data source to do SQL queries. The DbCommand base class is used.

- 
DataReader 
The data source is read for the data. It only has read-only and forward-only access to data. DbDataReader serves as the foundation class.

- 
DataAdapter 
The dataset is called, and the data source is used to resolve updates. The DbDataAdapter base class.
What is the difference between Local and Public disks with Laravel?
Published: 2023-03-19 15:37:30

With my team, New laravel guys are always having a simple confusion with laravel storage disks like public or local.

My explanation - Laravel comes with a default disk as local. The local disk is only for storing the local files (not for a public expose).
During the file upload process, You may mention the public disk or change the configuration via the .env file.

For accessing a file URL, always use Storage::url() (The alternate way is the url() function. It will help in the future if we move or change our storage disk eg s3.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zpodsj1bj4d4g0m4fcrf.png)
Setting Up Environment For .NET Applications
Tags: programming, csharp, android, api
Published: 2023-03-19 15:33:59

The structure of commands, classes and methods in ado.net can be written using any editor. For this blog, I'm using Visual Studio 2022 and SQL 2019.

## 1-Download the Visual Studio

The structure of commands, classes and methods in ado.net can be written using any editor. I'm using SQL 2019 and Visual Studio 2022 here.
if you don’t have visual studio installed on your PC you can download it from here.
https://www.visualstudio.com/downloads/
Select the Community Edition of Visual Studio. Download it, then install it on your computer. Simple setup settings are not required during the installation procedure. It just adheres to the click > click > finish criteria. Select the Community Edition of Visual Studio. Download it, then install it on your computer. Simple setup settings are not required during the installation procedure. It just adheres to the click > click > finish criteria.

## 2-Download the SQL Server for Database

Install SQL Server There is no need to install SQL Server on your PC because Visual Studio installs the light version of SQL at the same time as Visual Studio. However, I advise that a developer have a full environment so they can explore beyond the bounds. You may create and manage database items in a more open and visual environment after installing SQL Server. SQL Server can be downloaded from this page.
https://www.microsoft.com/en-in/sql-server/sql-server-downloads
Choose the Developer Edition since creating and testing databases is free. Although installing SQL Server is simple, you must be careful when choosing the list of components. When choosing components, you must check the Management Studio checkbox.
Your computer is now prepared to create and test the ADO.NET application. Making your first ADO.NET program is covered in the following chapter.

## Conclusion:

After Downloading these two software’s now you can write Ado.Net Queries for .NET Applications.
The Pioneers and Their Pitfalls: A Look at the First Cryptocurrency Exchanges
Tags: bitcoin, ethereum, general, cryptomarket
Published: 2023-03-20 22:20:31

---
title: The Pioneers and Their Pitfalls: A Look at the First Cryptocurrency Exchanges
published: true
date: 2023-03-19 15:30:43 UTC
tags: Bitcoin,Ethereum,General,cryptomarket
canonical_url: https://cryptoloom.xyz/the-pioneers-and-their-pitfalls-a-look-at-the-first-cryptocurrency-exchanges/
---

Cryptocurrencies have been gaining popularity in recent years, with more people investing in digital currencies and using them for everyday transactions. One crucial factor that has facilitated the mainstream adoption of cryptocurrencies is the presence of cryptocurrency exchanges. These exchanges allow people to buy, sell, and trade digital currencies easily. In this article, we will take a look at the first cryptocurrency exchanges and what happened to them.

## The First Cryptocurrency Exchanges

1. Bitcoinmarket.com  
Bitcoinmarket.com was the first-ever cryptocurrency exchange, launched in March 2010. The platform allowed users to buy and sell Bitcoin using their PayPal accounts. Unfortunately, due to a high level of fraud, the platform shut down in August 2010.
2. Mt. Gox  
Mt. Gox was a Japanese cryptocurrency exchange founded in 2010. It was the largest Bitcoin exchange at the time, handling over 70% of all Bitcoin transactions. However, the exchange was hacked with bitcoins and user information stolen. In February 2014, Mt. Gox suspended trading and filed for bankruptcy, with hundreds of millions of dollars in Bitcoins missing.
3. BitInstant  
BitInstant was a cryptocurrency exchange launched in 2011. It allowed users to buy and sell Bitcoins using cash deposits to their accounts. The platform was shut down in 2013 due to allegations of money laundering.
4. Vircurex  
Vircurex was a digital currency exchange launched in 2011. It allowed users to trade various cryptocurrencies, including Bitcoin, Litecoin, and Namecoin. However, in March 2014, Vircurex declared insolvency after suffering a hacking attack that resulted in the loss of over $16 million.
5. Cryptsy  
Cryptsy was a US-based cryptocurrency exchange launched in 2013. It allowed users to trade over 200 cryptocurrencies, including Bitcoin and Litecoin. However, in 2016, Cryptsy filed for bankruptcy, with over $5 million in users’ funds missing. It was later discovered that Cryptsy’s CEO had stolen the funds and fled the country.

## Conclusion

The above-listed exchanges were pioneers in the crypto world, paving the way for the numerous exchanges available today. However, their history also shows the challenges that crypto exchanges face, including fraud, hacking, and regulatory challenges. As the crypto industry matures, exchanges must adapt to these challenges to ensure the security and success of the digital currency market.
Free Tailwind CSS personal portfolio template
Tags: javascript, career, opensource, tailwindcss
Published: 2023-03-19 15:26:42

Hello everyone!

Building a professional looking portfolio is a hard task and it takes a lot of time. that's why I built an open source portfolio template.

Carbon is free TailwindCSS portfolio template that's perfect for developers and designers. It comes with a high-quality design and all the essential components & pages you need to launch a complete portfolio website.

The template includes 5 pages, and they are:
- Home
- Work
- Case study
- About
- Contact

### Github link: https://github.com/MohamedYoussouf/carbon
### Live preview: https://carbon-theme.netlify.app/



Feel free to share your thoughts in the comments.

Follow me on [Twitter](https://twitter.com/MedMYA), I share useful tweets about web development and design there.