-
Sell soccer balls using Stripe, Node.JS and React
Continued from: https://www.ultimateakash.com/blog-details/Ii1TOGAKYAo=/How-to-Implement-JWT-Authentication-in-React-2023 Change src/App.js to: Change src/app.router.js to: Change src/components/nav-bar.component.jsx to Change src/components/profile.component.jsx Now to back end: Change controllers/auth.controller.js Change models/user.model.js Change node-jwt.sql Change package.json Change routes/index.js Change services/auth.service.js Create utils/stripe.util.js
-
Find path: Depth-First Search Algorithm
Note: Depth-first Search is unweighted and does not guarantee the shortest path! Problem: For a given two positions (startPos,endPos) find a possible path to go from startPos to endPos in a grid. If you want to check out the algorithm in action, I visualized it: https://gjergjk71.github.io/Find-path-Depth-First-Search-Algorithm/ Grid example: 0 is walkable while 1 represents obstacles. To generate a MxM… Read more
-
Find path: Breadth First Search Algorithm
Note: Breadth-first Search is unweighted and guarantees the shortest path! Problem: For a given two positions (startPos,endPos) find a possible path to go from startPos to endPos in a grid. If you want to check out the algorithm in action, I visualized it: https://gjergjk71.github.io/Find-path-Breadth-First-Search-Algorithm/ Grid example: 0 is walkable while 1 represents obstacles. To generate a MxM grid… Read more
-
Let’s make Tic-Tac-Toe with React
Setup In the first step let’s create all the files we need for our tic-tac-toe game. To make life easier I use create-react-app of npx. Final App Structure: node_modules/* public/* src/ components/ Board.css Board.js App.js index.js serviceWorker.js .gitignore package.json README.md Now let’s get started. In our App component all we’re going to do is import… Read more
-
How to write a simple interpreter
How to write a simple interpreter Source code: https://github.com/gjergjk71/How-to-write-a-simple-interpreter Web-based Version: https://gjergjk71.github.io/How-to-write-a-simple-interpreter/ Informal grammar explanation:Valid expressions:Code: Formal Grammar (EBNF):Code: Usage: High-level explanation of how the interpreter is going to work: Implementation: Constants: Helper functions: We’ll create a function which we’ll extend with javascript’s prototype system. The Lexer: Lexer takes as input the source code that… Read more
- Algorithms (2)
- Games (1)
- Interpreters (1)
- React (1)
- Sorting (2)
- Uncategorized (1)
Follow My Blog
Get new content delivered directly to your inbox.