Tim

my first react web app

Create your first React web app: easy basics

In this tutorial, you will learn how to create your first simple React web app using TypeScript. You will learn how to set up the project, what all the parts are, and how to add components and some interactive elements. I wrote this tutorial as a basic foundation to help you on your way before you dive into bigger tutorials. We will go through each file and explain its purpose. By the end of this guide, you’ll have a solid understanding of how React is set up. Contents1 In this tutorial2 Prerequisites3 What is TypeScript?4 What is React?4.1 React components4.1.1…

python virtual environment art

Python Virtual Environment (venv): easy guide for beginners

When diving into Python programming, one of the most useful tools you’ll encounter is the virtual environment, often referred to by its tool name venv. A virtual environment for Python is used to manage the dependencies of Python packages. Even though beginner Python programmers might not be concerned with dependency management. And some might not even be aware that it could be a problem. However, it will save you a lot of headaches if you get into the habit of using virtual environments for your projects as soon as possible. What is a Virtual Environment? In Python, a virtual environment…

how to install nvm

How to install node version manager (nvm)

This short tutorial will explain how to install node version manager (nvm) on Windows or Linux and Mac OS systems. Node Version Manager is very useful when working with node.js based projects Contents1 What is Node Version Manager?2 Why developers like nvm3 Installing nvm on Windows3.1 Download nvm for windows3.2 Install nvm3.3 Verify the Installation on Windows3.4 Important notes4 How to install nvm on Linux or Mac OS4.1 Open your Terminal and download nvm4.2 Update your System’s Environment4.3 Verify the Installation5 How to use nvm to install and switch between Node versions5.1 Install Node.js5.2 Switch Between Node Versions5.3 List Installed…

solana and rust

Solana wallet with Rust: get started now

In this tutorial, we will learn the basics of Solana development by programming a software wallet with Rust. What is a cryptocurrency wallet? A cryptocurrency wallet’s primary function is storing keys that allow you to send and receive cryptocurrency, in this case, Solana. This wallet can be a device or software program. For this tutorial, we will write a Solana wallet with Rust that can generate keys and perform actions. With our wallet application, we will be able to: All this using Rust code. To help us easily connect to Solana RCP servers we will use Solana crates like: solana_client…

Rust SQLx basics with SQLite: super easy how to

In this tutorial, we will learn the basics of using the SQLx crate with Rust and SQLite. The SQLx crate is an async pure Rust SQL crate featuring compiling time-checked queries. However, it is not an ORM. We will look at how to create an SQLite database and do SQL operations on it with SQLx. After we complete this tutorial we will have a good understanding of the basics for using SQLite databases in our future Rust projects using SQLx. The repository with the finished project can be found here: https://github.com/tmsdev82/sqlx-sqlite-basics-tutorial. Another rust and database-related article can be found here:…

solana and rust

Solana transactions per second: how to with Rust

In this tutorial, we will learn how to count Solana transactions per second (TPS) using the Rust programming language. We will look at how to connect to the Solana blockchain API using the Solana SDK crates. Using this simple program we will learn some basics about using the Solana crates for Rust. Our program will count non-vote transactions over the course of some time period and then calculate the transactions per second. The repository with the whole project can be found here: https://github.com/tmsdev82/solana-count-tps Contents1 What is Solana?2 Prerequisites3 Project setup4 Connecting to a Solana RPC server4.1 Get Solana core version4.2…

Image input web Rust Yew app: Learn now

In this tutorial, we will build an image input web app with pure Rust and WebAssembly. We are going to use frontend framework Yew. With our Yew UI, a user will be able to select an image and submit it to the frontend app. Our frontend code will then produce an inverted color image and ASCII art based on the image. Just to demonstrate how to process the image data and do things with it. We will use the Rust front-end framework called Yew to help us create the user interface. For the image manipulation, we will be using the…

Ethereum transactions viewer app: Rust how to

In this tutorial, we will build an Ethereum transactions viewer app with Rust. This will be a full-stack Rust application. A benefit of this is that we can share the data model between frontend and backend. For the backend API we will use warp and for the frontend we will use the Rust framework Yew. Our application will make use of the Etherscan API to get data about transactions for a specified wallet address. This data will then be displayed in our Rust/Webassembly frontend. For this tutorial, we will keep the data we use and the frontend relatively simple. There…

Tutorial using Rust Yew and Chart.js

CSS and JavaScript WASM Rust: Yew how to P2

In this tutorial, we will learn how to use Cascading Style Sheets (CSS) and JavaScript in a WebAssembly (WASM) Rust front-end using the Yew framework. This is part 2 in a series of tutorials about the basics of the Yew framework. We will look at how to reference CSS and dynamically use CSS classes with Yew, and how to interact with a JavaScript library. For the JavaScript library interaction example, we will use chart.js, which is a library for visualizing data using charts. Part 1 of this tutorial series on Yew can be found here: WebAssembly Rust front-end with Yew:…

WebAssembly Rust front-end with Yew: how to P1

In this tutorial, we will learn some basics on how to build a web front-end using pure Rust compiled to WebAssembly with the help of the Yew framework. This is part 1 of a multi-part series exploring various concepts within the Yew framework. In this first part, we will look at how to generate HTML with Yew, what components are, some event handling, and manipulating HTML elements. After we have finished the project explained in this tutorial we will have experience with: Creating components Handling events Manipulating element values The complete code for this tutorial can be found on my…