01 2021 档案
Node js Intro
摘要:node xx.js; process.argv; Use file system to creat folder and files; const fs = require('fs'); mkdirSync; writeFileSync
阅读全文
TVMAZE API应用:查找电影图片
摘要:form.elements.query.value; createElement('IMG'); await axios.get(`http://api.tvmaze.com/search/shows`, config);
阅读全文
axios.get应用,使用dad-joke API生成随机笑话
摘要:按钮点击事件(addEventListener);async; await; axios.get; document.createElement('LI');
阅读全文
http请求:XMLHttpRequest, Fetch, AXIOS
摘要:什么是xml, json, ajax; 发送请求的三种方式:XMLHttpRequest, Fetch, AXIOS, 什么是API
阅读全文
Async Functions
摘要:ASYNC; AWAIT; delayedColorChange demo using await; try catch to handle errors in async functions
阅读全文
Promise intro ang creating promises
摘要:.then .catch. resolve reject delayedColorChange demo using promise
阅读全文
Event_Delegation
摘要:console.dir(e.target); //check the details of the e.target e.target.nodeName === 'LI' && e.target.remove();//只有当nodeName是LI时才会删除
阅读全文
input/change event practice
摘要:输入框输入文字,h1显示动态文字, input.addEventListener('input',) input.addEventListener('change',)
阅读全文
Form event
摘要:form, 'submit', name用来干什么?怎么避免提交当前页面时自动跳转到另一个不存在的页面?form.elements.product.value。 输入框文字动态清空
阅读全文
BST_traverse(中序遍历,前序遍历,后序遍历)
摘要:refer to: https://www.algoexpert.io/questions/BST%20Traversal && leetcode &&力扣 分别使用前序遍历中序遍历后序遍历的方法遍历搜索二叉树 1 import java.util.*; 2 3 class Program { 4
阅读全文
JS_DOM_practice with Pokemon
摘要:display: inline-block, block; document.querySelector; document.createElement; .classList.add; .innerText /.src; label.innerText = `#${i}`; newImg.src = `${baseURL}${i}.png`; appendChild
阅读全文
JS-DOM
摘要:querySelector, querySelectorAll; innerHTML, textContent/innerText/src; .style.width to change style; getAttribute/ setAttribute/ .classList/ .classList.add() / .classList.remove() /classList.contains() / classList.toggle(); traversing parent/child/sibling; Append& AppendChild(create DOM element and append it into page); remove/removeChild
阅读全文
Newer js features
摘要:Default parameters, Spread(...), Rest(...), Arguments Object, Destructuring
阅读全文
JS - callbacks & array methods
摘要:forEach, map,filter,reduce, arrow function, setTimeout && setInterval, some & every methods, arrow function vs this
阅读全文
Validate BST
摘要:refer to : https://www.algoexpert.io/questions/Validate%20BST 1. Problem statement. Given the root of a binary tree, determine if it is a valid binary
阅读全文
BST construction
摘要:BST construction refer to : https://www.algoexpert.io/questions/BST%20Construction 1. 什么是二叉搜索树? 二叉搜索树是二叉树的一种特殊形式,而二叉树的特性在于每个节点包含最多两个子节点。 二叉搜索树的特性:每个节点
阅读全文
Find closest value in BST
摘要:refer to : https://www.algoexpert.io/questions/Find%20Closest%20Value%20In%20BST Find Closest Value in BST 1. problem statement. 给定一个二叉搜索树和一个目标值,返回这个B
阅读全文
three number sum
摘要:refer to: https://www.algoexpert.io/questions/Three%20Number%20Sum Three number Sum problem statement 给定一个数组和一个目标值,返回二维数组包含所有的三元组使得这三个数值的和等于目标值,返回的二维数
阅读全文
two number sum
摘要:Refer to : https://www.algoexpert.io/questions/Two%20Number%20Sum Two number sum 1. problem statement. 给定一个不含重复数字的数组和一个目标值,返回一个长度为2的数组,这个数组包含的两个数的和要等于
阅读全文
First duplicate value
摘要:From : https://www.algoexpert.io/questions/First%20Duplicate%20Value First duplicate value 1. problem statement 给定一个长度为n的数组,这个数组包含的整数的范围在[1,n],我们需要找到第
阅读全文
Closest sum_pair
摘要:From Youtuber: CS Dojo Closest sum_pair 1. Problem Statement given two arrays and a target value, we need to find the pair value that their sum is mos
阅读全文
滑动窗口 sliding window
摘要:From : https://www.educative.io/courses/grokking-the-coding-interview Maximum Sum Subarray of Size K (easy) 1. problem statement Given an array of pos
阅读全文
SQL学习笔记-day1
摘要:What is SQL? SQL stands for Structured Query Language. A sequel is a set of commands. SQL is a set of commands that can be sent to the database, then
阅读全文
浙公网安备 33010602011771号