avatar
Articles
56
Tags
0
Categories
10

Home
Archives
Categories
Messageboard
Dan's Blog
Search
Home
Archives
Categories
Messageboard

Dan's Blog

API
Created2023-06-30|Software Development
API123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354const express = require("express");const app = express();const bodyParser = require("body-parser");const https = require("https"); // it's a native node module so we dont need to use npm installapp.use(bodyParser.urlencoded({ extended: true }));app.get("/", function (req, res) { res.sendFile(__dirname + "/index.html");}) ...
Overview
Created2023-06-21|MySql
npm i -y npm i dotenv express hbs mysql npm i –save nodemon Double-check that your package.json file has the “scripts” section defined with the “start” script. It should look like this: 123"scripts": { "start": "nodemon app.js"} you run npm start in terminal. cannot start mysql in xamppThe most likely reason that XAMPP’s MySQL service is unable to start is because port 3306 is already used by a different program that is currently running on your comput ...
EJS
Created2023-06-13|Software Development
EJS(Embedded JavaScript templates)GET STARTED1. 1npm install ejs 2. https://github.com/mde/ejs/wiki/Using-EJS-with-Express In Express v4, a very basic setup using EJS would look like the following. (This assumes a views directory containing an index.ejs page.) 12345678910let express = require('express');let app = express();app.set('view engine', 'ejs'); // TELL APP TO USE EJSapp.get('/', (req, res) => { res.render('index', {fo ...
Bootstrap
Created2023-06-06|Software Development
Bootstraplayout using bootstrap will make you have a lot of classes in tags which is called class bloat On pc, two columns, on mobile, 1 colum 1234<div class="row"> <div class="col-xl-6 col-sm-12">50% desktop, 100% mobile</div> <div class="col-xl-6 col-sm-12">50% desktop, 100% mobile</div></div> actually you can delete col-sm-12 ,cause everything else is defaulted to 100 percent. xl-> pc sm-> phone https://appbrewer ...
Git
Created2023-06-06|Software Development
Local Git Repository remember to run in git bash mkdir foldername touch filename code filename (open the file) 1234567891011121314151617181920212223242526// intialize a git repositorygit init // see what's in staging area// it can also help to see which file has been modified after last commitgit status// add file to staging areagit add chapter1.txtgit add .// remove from staging areagit rm --cached -r filename// commit the filesgit commit -m "test"// see what's been commite ...
jQuery
Created2023-06-06|Software Development
jQuerya library. make js a lot easier. jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code. 1eg. document.querySelector("h1") = $("h1") Incorporate jQuery1234567<body> . . . <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> //this one is from the website, copy the link <script s ...
Overview
Created2023-05-21|Software Development
Node.jsNode.js is a server-side runtime environment for running JavaScript code outside the browser, while React.js is a client-side JavaScript library for building user interfaces. Node.js is used for server-side development, while React.js is used for creating interactive UI components in web applications. They can be used together to build full-stack web applications. Node.js is perfect for building fast and scalable data intensive apps. use: API with database behind(preferably NoSQL) don’t u ...
NodeJS
Created2023-05-21|Software Development
Node.jsIt’s an asynchronous event driven JavaScript Runtime. it’s designed to build scalable network applications. it’s actually not a framework, instead it’s a runtime environment. it enables us to use javescript on a computer and not just limited to wihtin the browser. Express, on the other hand is actually a javascript framework that allow us to create backend for our websties.fs moduleintroductionIn JavaScript, the term “fs” typically refers to the “File System” module. The “fs” module is ...
frontend
Created2023-04-03|Software Development
ctrl + tilde character –> launch the terminal window from within VS Code. npx create-react-app <NAME>–> When you run the npx create-react-app <NAME> command, it will create a new directory with the name <NAME> in the current directory and set up the basic structure of a React project inside that directory. The resulting project will include all the necessary files and dependencies to start building a React application. code .—>is a command that opens the current direct ...
Graph
Created2023-03-20|LeetCode
Graph 🌼foundation:https://github.com/youngyangyang04/leetcode-master/blob/master/problems/%E5%9B%BE%E8%AE%BA%E6%B7%B1%E6%90%9C%E7%90%86%E8%AE%BA%E5%9F%BA%E7%A1%80.md dfs是可一个方向去搜,不到黄河不回头,直到遇到绝境了,搜不下去了,再换方向(换方向的过程就涉及到了回溯)。 bfs是先把本节点所连接的所有节点遍历一遍,走到下一个节点的时候,再把连接节点的所有节点遍历一遍,搜索方向更像是广度,四面八方的搜索过程。 797. All Paths From Source to TargetMedium Given a directed acyclic graph (DAG) of n nodes labeled from 0 to n - 1, find all possible paths from node 0 to node n - 1 and return them in any order. The graph ...
1…3456
avatar
Dan
Lack the words to compliment myself today.
Articles
56
Tags
0
Categories
10
Follow Me
Announcement
This is my Blog
Recent Post
DP2024-06-30
Greedy2024-06-24
💐Linear Neural Networks for Regression💐2024-06-22
💐Preliminaries💐2024-06-21
Backtracking2024-06-15
Categories
  • Algorithm3
  • Gaussian Splatting1
  • Image Process1
  • LeetCode12
  • LeetCode29
  • ML2
  • Machine Learning2
  • MySql1
Archives
  • June 20248
  • May 20245
  • April 20246
  • March 20241
  • November 20231
  • September 20231
  • August 20231
  • July 20237
Info
Article :
56
UV :
PV :
Last Push :
©2020 - 2024 By Dan
Framework Hexo|Theme Butterfly
Search
Loading the Database