Introduction
Hello,
Welcome to my blog. I am Matthew, a graduate of MIT from USYD. I’d like to share some knowledge here that I have learned and been learning. Apart from that, I really hope my posts can help you a little bit.
SpringBoot和Vue的基本知识点
MavenMaven是一个项目管理工具,可以对Java项目进行自动化的构建和依赖管理
Maven的作用
项目构建:提供标准的,跨平台的自动化构建项目的方式
依赖管理:方便快捷的管理项目依赖的资源(jar包),避免资源间的版本冲突等问题
统一开发结构:提供标准的,统一的项目开发结构,如下图所示
运行 Maven 的时候,Maven 所需要的任何构件都是直接从本地仓库获取的。如果本地仓库没有,它会首先尝试从远程仓库下载构件至本地仓库。
本地仓库配置修改maven安装包中的conf/settings.xml文件,指定本地仓库位置。
远程仓库配置maven默认连接的远程仓库位置并不在国内,因此有时候下载速度非常慢,我们可以配置一个国内站点镜像,可用于加速下载资源。
与IDEA集成
SpringBoot快速上手SpringBoot介绍
Spring Boot是由Pivotal团队提供的基于Spring的全新框架,旨在简化Spring应用的初始搭建和开发过程。
Spring Boot是所有基于Spring开发项目的起点。
Spring Boot就是尽可能地简化应用开发的门槛,让应用开发 ...
Mac m1Pro 配置 MySQL5.7.21环境
下载安装根据链接https://downloads.mysql.com/archives/community/下载并安装MySQL5.7.21
配置环境变量1234567cd ~vim ./.bash_profile# 进入.bash_profile后添加PATHexport PATH=$PATH:/usr/local/mysql/bin export PATH=$PATH:/usr/local/mysql/support-filessource ~/.bashrc
从系统偏好设置中开启MySQL服务并修改1234567891011# 打开终端,通过命令查看进程ps aux | grep mysql# 打开MySQL Clientmysql -u root -p# 输入初始密码# 修改密码SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root');# 刷新缓存FLUSH PRIVILEGES;# 退出exit
MySQL服务的启停和状态的查看12345678# 停止MySQ ...
编程能力入门
Leetcode 编程能力入门徽章最佳实践基本数据类型1523. 在区间范围内统计奇数数目思路一:
[low, high]上循环遍历
判断是不是奇数 <=> 是否能被2整除
返回函数为int,全局累加
123456789class Solution { public int countOdds(int low, int high) { int ans = 0; for(int i = low; i <=high; i++ ){ if (i % 2 != 0 ) ans++; } return ans; }}
但是超时了。。。时间复杂度O(n)所以我们需要判断如何准确用公式总结问题的规律,[3, 7]有三个奇数,
12345class Solution { public int countOdds(int low, int high) { return (high+ ...
SQL 入门
Leetcode MySQL 入门学习计划选择595. 大的国家思路:
简单过滤,无顺序要求
显示字段 name, population, area
area >= 3 000 000 or population >=25 000 000
12select name, population, area from World where area >= 3000000 or population >=25000000
1757. 可回收且低脂的产品思路:
简单过滤, 无顺序要求
显示字段product_id
低脂 and 可回收
1select product_id from Products where low_fats='Y' and recyclable='Y'
584. 寻找用户推荐人思路:
简单过滤,无顺序要求
显示字段name
推荐人编号不是2有两种情况,为空或者非空非2
1select name from customer where referee_id<>2 ...
MySQL Frequently Used Command(II)
MySQL Frequently Used Command (II)CRUD (Create, Retrieve, Update, Delete)1. Basic Retrieve Usage123select * from <table_name>;# assign certain columnsselect <col1>, <col2>,... from <table_name>;
2. Create a new data item12345678# insert all columns as a data iteminsert into <table_name> values(...);# insert several columns as a data iteminsert into <table_name>(col1, col2, col3, ...) values(value1, value2, value3, ...);# insert more than one data items (all c ...
MySQL Frequently Used Command (I)
MySQL Frequently Used Command (I)SQL is a structured query language, it is a database language used to operate RDBMS, current relational databases support the use of SQL language, that is, you can use SQL to operate oracle, sql server, mysql, sqlite and all other relational databases
SQL clause mainly includes DQL, DML, TPL, DCL, DDL, CCL[, in which DQL and DML are most important for web developer.
Data integrity
A database is a complete business unit and can contain multiple tables in which da ...
Hello World
Mac下使用GitHub+Hexo搭建个人博客开始之前需要在电脑上安装好Git和node.js,Mac上可以使用Homebrew命令行工具来安装Git和node.js
安装Homebrew在命令行工具输入以下命令,如果已经安装过Homebrew可以忽略
1/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Homebrew 安装 node.js1brew install node
安装后可以使用命令来检查是否安装成功
检查node
1node -v
输出结果:
v12.14.1
检查npm是否安装成功,npm是node.js的包管理工具,用它来安装hexo
1npm -v
输出结果:
6.13.4
Homebrew 安装git1brew install git
检查git是否安装成功
1git -v
输出结果:
git version 2.24.3 (Apple Git-128)
使用 npm 安装 hexo1 ...
