Git常用命令
Git常用命令
命令
说明
git init
初始化本地仓库
git commit -am “第一次提交”
添加并提交到本地库
git status
查看当前文件状态
git reflog
查看简洁日志
git log
查看完整日志
git remote
查看添加的远程库
git remote add origin [远程库地址]
添加一个别名为origin的远程库
git push -u origin main
将本地库main分支推送到origin远程库的main分支
git push -u [远程库地址] main
将本地库main分支推送到[远程库地址]所在的远程库的main分支
git push -u origin master:main
将本地库master分支推送到origin远程库的main分支
git remote rm origin
删除origin远程库
分支
git branch -v
查看所有分支
git branch dev
创建一个名为dev的分支
git checkout dev
切 ...
Hexo基本安装和使用
Hexo
hexo参考官方文档:
https://hexo.io/zh-cn/docs/
butterfly主题配置 参考教程:
推荐: https://butterfly.js.org
https://butterfly.zhheo.com/docs
全局安装#
前提#
12345678C:\Users\30362>git -vgit version 2.37.3.windows.1C:\Users\30362>node -vv18.12.1C:\Users\30362>npm -v8.19.2
安装#
1234567891011121314151617181920212223242526C:\Users\30362>npm install -g hexo-cliadded 59 packages in 7sC:\Users\30362>hexo -vhexo-cli: 4.3.0os: win32 10.0.19044node: 18.12.1v8: 10.2.154.15-node.12uv: 1.43.0zlib: 1.2.1 ...
ES6语法新特性
ES6
参考文章:
https://zhuanlan.zhihu.com/p/30400262
http://caibaojian.com/es6/class.html
https://www.jianshu.com/p/d23a506cdca2
查看对es6语法的支持#
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374D:\desktop\Vue> npm install -g es-checkeradded 13 packages in 4sPS D:\desktop\Vue> es-checkerECMAScript 6 Feature Detection (v1.4.2)Variables √ let and const √ TDZ error for too-early access of let or const ...
JavaWeb
JavaWeb
2022/11/18
实现Servlet的三种方式#
1. 继承GenericServlet#
123456public class ServletDemo3 extends GenericServlet { @Override public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException { System.out.println("GenericServlet实现Servlet"); }}
2. 实现Servlet类#
12345678910111213141516171819202122232425262728293031323334public class ServletDemo2 implements Servlet { private ServletConfig servl ...
C常见编程题
2022 06 13
1. 累计和#
12345678910#include<stdio.h>int main(){ int i=1,sum=0; while (i<=100) sum+=i++; printf("%d",sum); return 0;}
2. 兔子数列第10项#
1234567891011#include<stdio.h>int fun(int n){ if(n<3) return 1; return fun(n-1)+fun(n-2);}int main(){ printf("%d",fun(10)); return 0;}
3. 前10项和#
1234567891011121314#include<stdio.h>int main(){ int sum= 2,m1=1,m2=1,m,i; for(i=2;i<10;i++){ m=m1+m2; sum+=m; m1=m2; m2 ...
Linux命令实例
Linux命令
Linux 命令大全
Vim 中文文档计划
[TOC]
用户#
管理员
账号: root
密码: 985464
普通用户
账号: tiam
密码: tiam
ls命令#
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162# 查看当前目录下文件[root@bogon ~]# lsanaconda-ks.cfg# 查看隐藏文件[root@bogon ~]# ls -a. .. anaconda-ks.cfg .bash_history .bash_logout .bash_profile .bashrc .cshrc .lesshst .tcshrc# 查看详细信息[root@bogon ~]# ls -l总用量 4-rw-------. 1 root root 1413 12月 8 00:38 anaconda-ks.cfg# 简写[root ...
application.yaml配置
12345public class Pet { private String type; private int age; //setter方法}
1234567891011121314@Component //注入spring的bean中@ConfigurationProperties(prefix = "user")//在配置文件中,将以user开头的属性注入public class User { private int id; //基本数据类型 int private String username; //基本数据类型 String private String password; private List hobby; //集合 private String\[\] song; //数组 private Map map; //Map对象 private Pet pet; //POJO对象//setter方法}
application.yeal 注意 ...
WX小程序--音乐播放器
从最开始了解微信小程序到萌生想法想自己做一个发布到自己的公众号,中间还是隔了蛮久,近几天突然有了想法做什么了,今天却因为个人小程序的原因审核不通过,可气。
最开始也是一点也不了解,甚至小程序用什么语言写的也不知道。萌生了想法就去找官方文档查看,寥寥草草的差不多看了一晚上,知道了小程序的文件结构以及所需的编程语言,主要编程语言是JavaScript,好在JavaScript有学过一点,至少还有点基础。还有新的语言,WXML和WXSS,不过呢WXML和HTML极为相似,WXSS和CSS极为相似,正好HTML和CSS都学过一点,还记得一点基本语法。也不算新的东西。还有个配置文件的JSON格式,虽不是编程语言,也没有学过,可是之前几次做项目却用过几次,大概还记得怎么用。就这样,觉得自己应该可以做出来,第二天就开始新建项目做了。
当然过程中会遇到很多很多的困难,只能一步一步慢慢解决,慢慢来了。
实践的时候,总觉得没有之前那么逻辑顺畅,而且有了之前的经验应该会该快更好才对。上学期用Vue映入API接口做了个网页的音乐播放器,然后又用uni-app做了个表格的增删改查。虽不一样,却有很多类似的地方可 ...
MyBatis
以Maven方式创建文件
1 搭建目录结构,如下:#
2 引入数据库Customer表#
1234567891011CREATE DATABASE mybatis; USE mybatis; create table `t_customer` (`id` int (32),`username` varchar (150),`jobs` varchar (150),`phone` varchar (48)); insert into `t_customer` (`id`, `username`, `jobs`, `phone`) values('1','joy','doctor','13745874578');insert into `t_customer` (`id`, `username`, `jobs`, `phone`) values('2','jack','doctor','17623194363');insert i ...
第一个Spring Boot入门程序
1、基于spring框架。
2、使用“约定优先配置”的思想,优化繁琐的手动配置方式。
3、依靠大量注解,实现自动化配置。
4、Spring Boot 2.1.3版本必须要求JDK版本 8 及以上
5、第三方项目构建工具 Maven(3.3+)和Gradle(4.4+)
6、①以Maven方式构建
②以Spring Initializr 方式构建
7、@SpringBootApplication 标记为主程序启动类,是SpringBoot的核心注解。
①以Maven方式构建
主程序启动类 :
123456789101112package com;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication //标记为主程序启动类public class ManualChapter01Application { //启动方法 public static ...















