Skip to the content Skip to the Navigation

Red And Green

  • Python Code
  • Rust Programming
  • Bitcoin Programming
  • Contact

admin

  1. HOME
  2. admin
builder
October 11, 2023 / Last updated : September 5, 2024 admin Rust Programming

The “Builder” pattern in Rust

The builder pattern is a design pattern designed to provide a flexible solution to various object creation problems in object-oriented programming.

factory-method
October 9, 2023 / Last updated : October 9, 2023 admin Rust Programming

What is a Factory Method in Rust?

In Rust, the Factory Method is a design pattern that allows you to create objects without specifying the exact class of object that will be created. It defines an interface (or a trait in Rust) for creating objects, but the specific implementation of the object creation is left to the subclasses. This pattern promotes loose […]

state-pattern_2
October 9, 2023 / Last updated : February 26, 2024 admin Rust Programming

State Pattern in Rust

The “State” pattern is a behavioural design pattern that allows an object to alter its behaviour when its internal state changes. In Rust, like in other programming languages, you can implement the State pattern to encapsulate different states of an object and manage the transitions between those states. Ok what does that actually mean? Fast […]

pointers
October 8, 2023 / Last updated : October 8, 2023 admin Rust Programming

What is the difference between a raw pointer and a function pointer in Rust?

A raw pointer and a function pointer are both types of pointers in programming, but they have different purposes and use cases: Raw Pointer: Function Pointer: In summary, the key differences are that raw pointers are used for general memory address manipulation and don’t carry type information, while function pointers specifically point to functions and […]

pointers
October 6, 2023 / Last updated : October 8, 2023 admin Rust Programming

function items and function pointers in Rust

In Rust, functions are first-class citizens, meaning they can be assigned to variables, passed as arguments to other functions, and returned from functions.

Rust Closures
October 6, 2023 / Last updated : October 25, 2023 admin Rust Programming

Closure as struct member

The following is an example with a closure and a struct that uses it: In this example, we have a Calculator struct that takes a generic type parameter T, which is expected to be a closure. The closure should take two f32 arguments and return an f32. The struct has a single field named operation […]

function or a closure
October 6, 2023 / Last updated : October 6, 2023 admin Rust Programming

Passing closures into functions

function or a closure ?

Static v Dynamic Dispatch
October 4, 2023 / Last updated : October 6, 2023 admin Rust Programming

What is Static Dispatch & Dynamic Dispatch?

Static v Dynamic Dispatch

October 2, 2023 / Last updated : October 7, 2023 admin Rust Programming

Modify structs – test with assert_eq! macro

This Rust code defines a simple struct called Coord and implements some methods for it. The Coord struct has two fields, x and y, representing coordinates in a two-dimensional space. Create the struct Make an implementation The Coord::new() function is a constructor method that creates a new Coord instance with initial values of x set […]

LangChain
August 16, 2023 / Last updated : March 26, 2024 admin AI ML

LangChain with Python | Full Tutorial & Video

Why use LangChain? The video course looks at how LangChain can simplify and enhance working with a Large Language Model.

Posts pagination

  • «
  • Page 1
  • …
  • Page 15
  • Page 16
  • Page 17
  • …
  • Page 24
  • »

Recent Posts

The singleton pattern gives you the benefits of global access while maintaining control over how that global state is created, accessed, and modified. It's essentially "global variables done right" for cases where you genuinely need global state.

Design Patterns in Rust – Singleton Pattern

July 3, 2025
calcululs

Learning with AI (Calculus)

June 28, 2025
Make your own Ollama Client

Make your own Ollama Client

June 24, 2025

Why MCP uses JSON RPC

June 23, 2025
MCP Servers Auth0

MCP Auth

June 17, 2025
workspaces in rust

Rust Workspaces

May 19, 2025
This Actix-Web Rust server handles messages and tracks server status. It shares state using `Mutex`-protected `HashMap` and `String`. Clients can `GET` or `POST` a message and `GET` a list of servers. State is initialized in `main` and injected into request handlers for simple thread-safe access.

App state in Actix-web

May 17, 2025
Multiple LLM Backends

Protected: Chain Multiple LLM backends in Rust

May 12, 2025

Understanding Encrypted Counters in Rust with RocksDB

May 11, 2025

Protected: Build your first MCP server in Rust and test it with an LLM

May 6, 2025

Category

  • AI ML
  • automation
  • Bitcoin Programming
  • c
  • ebay api
  • email
  • JavaScript
  • LangChain
  • MySQL
  • Pandas
  • postgres
  • Python Code
  • Raspberry Pi
  • requests
  • Rust Programming
  • Scrapy
  • Selenium
  • Smart Contracts
  • Stellar
  • SurrealDB
  • Uncategorized
  • web scraping

Archive

  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • November 2022
  • September 2022
  • November 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • April 2020
  • March 2020

Actix-web AI API async Automation axum BDK bitcoin Bitcoin Core blockchain class Closure closures Design Patterns dictionaries GitHub huggingface iced impl langchain LLM MCP ModelContextProtocol mutable Networks Podman python Qdrant raspberry pi Rust Programming scrapy Smart Contracts Sphinx Stellar struct SurrealDB Upsert VectorDatabase Vectors WASM webscraping web scraping Word DOCX xpath Yaml

  • email
  • github
  • YouTube
This site is hosted with https://webdock.io/en Fast Cloud VPS Hosting Flat fee all-inclusive VPS with a Free Control Panel

Copyright © Red And Green All Rights Reserved.

Powered by WordPress & Lightning Theme by Vektor,Inc. technology.

MENU
  • Python Code
  • Rust Programming
  • Bitcoin Programming
  • Contact
Translate ยป