自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(114)
  • 收藏
  • 关注

原创 使用 git 提交到指定远程分支

【代码】使用 git 提交到指定远程分支。

2022-11-03 20:17:14 1385 1

原创 Vue 学习笔记 -- 6. Vue3 快速上手

Vue 学习笔记 – 6. Vue3 快速上手6. Vue3 快速上手6.1 创建 Vue3 工程6.1.1 使用 vue-cli 创建官方文档## 查看@vue/cli版本,确保@vue/cli版本在4.5.0以上vue --versionvue -V## 安装或者升级你的@vue/clinpm install -g @vue/cli## 创建vue create vue_test## 启动cd vue_testnpm run serve6.1.2 使用 vite 创建

2021-12-30 12:30:00 287

原创 Vue 学习笔记 -- 5. vue-router

Vue 学习笔记 – 5. vue-router5. vue-router一个路由(route)就是一组映射关系(key - value),多个路由需要路由器(router)进行管理。前端路由:key是路径,value是组件。5.1 基本使用安装vue-router,命令:npm i vue-router引入并应用插件:import router from './router'Vue.use(vueRouter)编写router配置项:// 引入组件import

2021-12-29 12:00:00 273

原创 Vue 学习笔记 -- 4. Vuex

Vue 学习笔记 – 4. Vuex4. Vuex概念:专门在Vue 中实现集中式状态(数据)管理的一个Vue 插件,对vue 应用中多个组件的共享状态进行集中式的管理(读/写),也是一种组件间通信的方式,且适用于任意组件间通信。Github 地址传送门使用的场景:多个组件需要共享数据时。4.1 Vuex 与 全局事件总线对比4.2 vuex 原理4.3 搭建vuex环境创建文件,文件路径: src/store/index.js 。//引入Vue核心库impo

2021-12-28 13:30:00 212

原创 Vue 学习笔记 -- 3.Vue 中的 AJAX

Vue 学习笔记 – 3.Vue 中的 AJAX3.Vue 中的 AJAX3.1 vue脚手架配置代理3.1.1 方法一在vue.config.js 中添加如下配置:devServer:{ proxy:"http://localhost:5000"}说明:优点:配置简单,请求资源时直接发给前端(8080)即可。缺点:不能配置多个代理,不能灵活的控制请求是否走代理。工作方式:若按照上述配置代理,当请求了前端不存在的资源时,那么该请求会转发给服务器 (优先匹配前端资

2021-12-27 00:09:39 261

原创 Vue 学习笔记 -- 2. Vue 组件化编程与脚手架

Vue 学习笔记 – 2. Vue 组件化编程与脚手架2.1 组件与模块化模块向外提供特定功能的 js 程序,一般就是一个 js 文件。为什么:js 文件很多很复杂。作用:复用 js,简化 js 的编写,提高 js 的运行效率。模块:用来实现局部(特定)功能效果的代码集合(html/css/js/image……)。为什么:一个界面的功能很复杂。作用:复用编码,简化项目编码,提高运行效率。模块化:当应用中的 js 都以模块来编写,那这个应用就是一个模块化的应用。组件化:当

2021-12-26 00:45:48 688

原创 Vue 学习笔记 -- 1 Vue 核心

Vue 学习笔记

2021-12-24 00:14:23 601

原创 AOP 日志

Spring AOPAOP(Aspect-Oriented Programming,面向切面编程),它利用一种"横切"的技术,将那些多个类的共同行为封装到一个可重用的模块。便于减少系统的重复代码,降低模块之间的耦合度,并有利于未来的可操作性和可维护性。AOP中有以下概念:Aspect(切面):声明类似于Java中的类声明,在Aspect中会包含一些Pointcut及相应的Advice。Joint point(连接点):表示在程序中明确定义的点。包括方法的调用、对类成员的访问等。Pointcut(

2021-12-20 16:32:25 410

原创 登录功能使用 JWT 技术

JWT登录使用JWT技术。JWT 可以生成 一个加密的 token,做为用户登录的令牌,当用户登录成功之后,发放给客户端。请求需要登录的资源或者接口的时候,将token携带,后端验证token是否合法。JWT 有三部分组成:A.B.CA:Header,{“type”:“JWT”,“alg”:“HS256”} 固定B:playload,存放信息,比如,用户id,过期时间等等,可以被解密,不能存放敏感信息C: 签证,A和B加上秘钥 加密而成,只要秘钥不丢失,可以认为是安全的。J

2021-12-20 16:09:39 1252

原创 使用线程池,加快网页响应速度

使用线程池,加快网页响应速度线程池配置import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.scheduling.annotation.EnableAsync;import org.springframework.scheduling.concurrent.ThreadPoolT

2021-12-20 15:52:29 417

原创 ThreadLocal保存用户信息与ThreadLocal内存泄漏

ThreadLocal保存用户信息创建本地 ThreadLocal 类import top.lingchen.blogapi.bean.SysUser;/** * @Author 凌宸 * @create 2021-12-16 下午 8:35 * @Description * @Version 1.0 */public class UserThreadLocal { private UserThreadLocal(){ } private static fin

2021-12-20 15:42:42 899

原创 统一错误码示例

定义枚举类,实现错误码的统一定义实现错误码的统一定义,方便管理,也避免出现代码中出现很多字面量和字面值。 /** * @Author 凌宸 * @create 2021-12-16 下午 5:12 * @Description * @Version 1.0 */public enum ErrorCode { PARAMS_ERROR(10001,"参数有误"), ACCOUNT_PWD_NOT_EXIST(10002,"用户名或密码不存在"), TOKEN_ILLE

2021-12-19 00:06:27 546

原创 统一缓存处理 AOP

使用 Redis 做缓存, 并实现统一的缓存处理 (AOP)

2021-12-18 23:54:07 749 1

原创 Java 简单控制台项目之客户信息管理软件 --- 凌宸1642

项目二:客户信息管理软件模拟实现一个基于文本界面的《客户信息管理软件》进一步掌握编程技巧和调试技巧,熟悉面向对象编程主要涉及以下知识点:类结构的使用:属性、方法及构造器对象的创建与使用类的封装性声明和使用数组数组的插入、删除和替换关键字的使用:this该软件能够实现对客户对象的插入、修改和删除(用数组实现),并能够打印客户明细表。项目采用分级菜单方式。主菜单如下:/* -----------------客户信息管理软件-------

2021-10-12 23:17:18 297

原创 Java 简单控制台项目之家庭记账本 --- 凌宸1642

项目一:家庭记账本模拟实现一个基于文本界面的 模拟实现一个基于文本界面的 《家庭记账软件 家庭记账软件 》主要涉及以下知识点:变量的定义基本数据类型的使用循环语句分支语句方法声明、调用和返回值的接收简单的屏幕输出格式控制该软件能够记录家庭的收入、支出,并能够打印收支明细表。/*-----------------家庭收支记账软件----------------- 1 收支明细 2 登记收入

2021-10-12 23:14:27 315

原创 浙江大学计算机与软件学院2019年保研上机模拟练习 --- 凌宸1642

浙江大学计算机与软件学院2019年保研上机模拟练习 — 凌宸16427-1 Happy Numbers (20 分) — 简单数学A happy number is defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits in base-ten, and repeat the process until

2021-09-18 22:43:22 395

原创 PAT(甲级)2019年秋季考试 7-4 Dijkstra Sequence (30 分) 凌宸1642

PAT(甲级)2019年秋季考试 7-4 Dijkstra Sequence (30 分)题目描述:Dijkstra’s algorithm is one of the very famous greedy algorithms. It is used for solving the single source shortest path problem which gives the shortest paths from one particular source vertex to all th

2021-09-04 18:07:36 138

原创 PAT(甲级)2019年秋季考试 7-3 Postfix Expression (25 分) 凌宸1642

PAT(甲级)2019年秋季考试 7-3 Postfix Expression (25 分)题目描述:Given a syntax tree (binary), you are supposed to output the corresponding postfix expression, with parentheses reflecting the precedences of the operators.译:给定一颗语法树(二叉树),你应该输出相应的后缀表达式,并且用括号反应运算的优先级。

2021-09-04 18:06:20 151

原创 PAT(甲级)2019年秋季考试 7-2 Merging Linked Lists (25 分)凌宸1642

PAT(甲级)2019年秋季考试 7-2 Merging Linked Lists (25 分)题目描述:Given two singly linked lists L1=a1→a2→⋯→an−1→an and L2=b1→b2→⋯→bm−1→bm. If n≥2m, you are supposed to reverse and merge the shorter one into the longer one to obtain a list like a1→a2→bm→a3→a4→bm−1⋯.

2021-09-04 18:03:19 309

原创 PAT(甲级)2019年秋季考试 7-1 Forever (20 分) 凌宸1642

PAT(甲级)2019年秋季考试 7-1 Forever (20 分)题目描述:“Forever number” is a positive integer A with K digits, satisfying the following constrains:the sum of all the digits of A is m;the sum of all the digits of A+1 is n; andthe greatest common divisor of m and n i

2021-09-04 17:59:55 174

原创 PAT (Advanced Level) Practice 1119 Pre- and Post-order Traversals (30 分) 凌宸1642

PAT (Advanced Level) Practice 1119 Pre- and Post-order Traversals (30 分) 凌宸1642题目描述:Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder traversal seq

2021-08-26 00:34:08 115

原创 PAT (Advanced Level) Practice 1117 Eddington Number (25 分) 凌宸1642

PAT (Advanced Level) Practice 1117 Eddington Number (25 分) 凌宸1642题目描述:British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an “Eddington number”, E – that is, the maximum integer E such th

2021-08-26 00:32:21 76

原创 PAT (Advanced Level) Practice 1055 The World‘s Richest (25 分) 凌宸1642

PAT (Advanced Level) Practice 1055 The World’s Richest (25 分) 凌宸1642题目描述:Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to simulate this job, but concentr

2021-08-23 23:08:59 385

原创 PAT (Advanced Level) Practice 1051 Pop Sequence (25 分) 凌宸1642

PAT (Advanced Level) Practice 1051 Pop Sequence (25 分) 凌宸1642题目描述:Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop

2021-08-23 23:02:58 149

原创 PAT (Advanced Level) Practice 1049 Counting Ones (30 分) 凌宸1642

PAT (Advanced Level) Practice 1049 Counting Ones (30 分) 凌宸1642题目描述:The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. For example, given N being 12, there a

2021-08-23 23:01:55 75

原创 PAT (Advanced Level) Practice 1048 Find Coins (25 分) 凌宸1642

PAT (Advanced Level) Practice 1048 Find Coins (25 分) 凌宸1642题目描述:Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as paymen

2021-08-21 03:40:16 186

原创 PAT (Advanced Level) Practice 1040 Longest Symmetric String (25 分) 凌宸1642

PAT (Advanced Level) Practice 1040 Longest Symmetric String (25 分) 凌宸1642题目描述:Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is PAT&TAP symmetric?, the longest symmetric sub-string is s P

2021-08-21 03:39:04 152

原创 PAT (Advanced Level) Practice 1038 Recover the Smallest Number (30 分) 凌宸1642

PAT (Advanced Level) Practice 1038 Recover the Smallest Number (30 分) 凌宸1642题目描述:Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we can recover many numbe

2021-08-21 03:37:48 118

原创 PAT (Advanced Level) Practice 1101 Quick Sort (25 分) 凌宸1642

PAT (Advanced Level) Practice 1101 Quick Sort (25 分) 凌宸1642题目描述:There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot are mov

2021-08-21 03:36:23 122

原创 PAT (Advanced Level) Practice 1151 LCA in a Binary Tree (30 分) 凌宸1642

PAT (Advanced Level) Practice 1151 LCA in a Binary Tree (30 分) 凌宸1642题目描述:The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants.Given any two nodes in a binary tree, you are supposed to

2021-08-20 01:59:28 154

原创 PAT (Advanced Level) Practice 1147 Heaps (30 分) 凌宸1642

PAT (Advanced Level) Practice 1147 Heaps (30 分) 凌宸1642题目描述:In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equ

2021-08-20 01:57:55 104

原创 PAT (Advanced Level) Practice 1146 Topological Order (25 分) 凌宸1642

PAT (Advanced Level) Practice 1145 Hashing - Average Search Time (25 分) 凌宸1642题目描述:This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed graph? Now you are supp

2021-08-20 01:52:24 109

原创 PAT (Advanced Level) Practice 1145 Hashing - Average Search Time (25 分) 凌宸1642

PAT (Advanced Level) Practice 1145 Hashing - Average Search Time (25 分) 凌宸1642题目描述:The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try to find another sequence of integer keys from the

2021-08-20 01:50:43 111

原创 PAT (Advanced Level) Practice 1144 The Missing Number (20 分) 凌宸1642

PAT (Advanced Level) Practice 1144 The Missing Number (20 分) 凌宸1642题目描述:Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list.译:给定 N 个整数,您应该找到不在给定列表中的最小正整数。Input Specification (输入说明):Each input file co

2021-08-19 00:48:50 58

原创 PAT (Advanced Level) Practice 1143 Lowest Common Ancestor (30 分) 凌宸1642

PAT (Advanced Level) Practice 1143 Lowest Common Ancestor (30 分) 凌宸1642题目描述:The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants.A binary search tree (BST) is recursively defined as a b

2021-08-19 00:47:49 86

原创 PAT (Advanced Level) Practice 1141 PAT Ranking of Institutions (25 分) 凌宸1642

PAT (Advanced Level) Practice 1141 PAT Ranking of Institutions (25 分) 凌宸1642题目描述:After each PAT, the PAT Center will announce the ranking of institutions based on their students’ performances. Now you are asked to generate the ranklist.译:每次PAT后,PAT中心会根

2021-08-19 00:46:17 57

原创 PAT (Advanced Level) Practice 1138 Postorder Traversal (25 分) 凌宸1642

PAT (Advanced Level) Practice 1138 Postorder Traversal (25 分) 凌宸1642题目描述:Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal sequences, you are supposed to output the first number of the p

2021-08-17 00:25:01 61

原创 PAT (Advanced Level) Practice 1137 Final Grading (25 分) 凌宸1642

PAT (Advanced Level) Practice 1137 Final Grading (25 分) 凌宸1642题目描述:For a student taking the online course “Data Structures” on China University MOOC (http://www.icourse163.org/), to be qualified for a certificate, he/she must first obtain no less than

2021-08-17 00:23:50 131

原创 PAT (Advanced Level) Practice 1136 A Delayed Palindrome (20 分) 凌宸1642

PAT (Advanced Level) Practice 1136 A Delayed Palindrome (20 分) 凌宸1642题目描述:Consider a positive integer N written in standard notation with k+1 digits aias ak ⋯a1 a0 with 0 ≤ ai < 10 for all i and ak>0. Then N is palindromic if and only if ai = ak−i

2021-08-17 00:22:39 89

原创 PAT (Advanced Level) Practice 1132 Cut Integer (20 分) 凌宸1642

PAT (Advanced Level) Practice 1132 Cut Integer (20 分) 凌宸1642题目描述:Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 167334, we have A = 167 and B = 334. It i

2021-08-17 00:21:41 90

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除