PinnedRust Web API (Actix) Connect Database (PostgreSQL)Rust Web API (Actix) Connect Database (PostgreSQL) วันนี้เรามาทดลองเขียนโปรแกรม backend ใน vs code ติดต่อกับ database กัน โดยใช้ Rust https://www.rust-lang.org/ Actix https://actix.rs/ ProgreSQL https://www.elephantsql.com/ ติดตั้ง dependencies ใน ไฟล์ Cargo.toml สร้างโปรเจค และ Folder ดังรูปRust4 min readRust4 min read
6 days agoBinary Search Tree With C++, Rust, C#Code C# Generate Random Data 100,000 Id not repeat List<int> ids = new List<int>(); List<int> temp = new List<int>(); for (int i = 1; i <= 99999; i++) { ids.Add(i); } Random rnd = new Random(); for (int i = 1; i <= 99999; i++) { Guid myuuid = Guid.NewGuid()…Cplusplus7 min readCplusplus7 min read
Jan 19Find Employees Under every Manager With C++, Rust, C#AlgorithmsC Plus Plus Language4 min readC Plus Plus Language4 min read
Jan 11Transportation Problem (Least Cost Cell Method) With C++, Rust, C#AlgorithmsAlgorithms7 min readAlgorithms7 min read
Jan 10Transportation Problem (NorthWest Corner Method) With C++, Rust, C#Algorithms Start at upper left hand corner cell (0,0) Check sum of current column and current row must less than current cell - If true go to check balance of current supply and balance current demand +++ If supply great than demand keep value of current demand to current cell…Transportation Problem7 min readTransportation Problem7 min read
Jan 5Iterators in functional programing : Finding method of sums With Rust, C++Array , Vector, Struct Array Code Rust Array : sum all let n = [1, 2, 3, 4, 5, 6, 7, 8, 9]; let sum: i32 = n.iter().sum(); result = 45 Array : sum all by function fold let n = [1, 2, 3, 4, 5, 6, 7, 8, 9]; let sum1: i32 = n.iter().fold(0…Rust Programming Language3 min readRust Programming Language3 min read
Dec 20, 2022Graph Traversal : BFS Algorithm With C++, Rust, C#Breadth-first search - Wikipedia Breadth-first search ( BFS) is an algorithm for searching a tree data structure for a node that satisfies a given…en.wikipedia.org Code C++ #include <iostream> #include <vector> #include <queue> using namespace std; struct Vertex { string name; bool visited; int index; }; struct Edge { Vertex from; Vertex to; }; class Graph { public: Graph(); void InsertVertex(string name, int index)…Bfs6 min readBfs6 min read
Dec 20, 2022Graph Traversal : DFS Algorithm With C++, Rust, C#Depth-first search - Wikipedia Depth-first search ( DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm…en.wikipedia.org Code C++ #include <iostream> #include <vector> #include <stack> using namespace std; struct Vertex { string name; bool visited; int index; }; struct Edge { Vertex from; Vertex to; }; class Graph { public: Graph(); void InsertVertex(string name, int index)…C Language6 min readC Language6 min read
Dec 16, 2022Collection of Algorithm stories written by Rust, C/C++, C#Binary Search Tree Binary Search Tree With C++, Rust, C# Code C# Generate Random Data 100000 Id not repeatmedium.com Find Employees Under every Manager Find Employees Under every Manager With C++, Rust, C# Algorithmsmedium.com Transportation Problem (Least Cost Cell Method) Transportation Problem (Least Cost Cell Method) With C++, Rust, C# Algorithmsmedium.com Transportation Problem (NorthWest Corner Method)Rust2 min readRust2 min read
Dec 15, 2022Topological Sorting Problem With Rust, C#, C++Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge u v, vertex u comes before v in the ordering. Create Vertext and Eages J0 → J1 J0 → J5 J0 → J6 J1 → J2 J2 → J3 J2 → J5 J2 → J7 J3 → J4 J3…C Sharp Programming7 min readC Sharp Programming7 min read