摘要: week 10 高级篇 性能优化 减少锁粒度 在多线程编程中,如果多个线程需要访问共享资源,通常需要使用锁来保证资源的安全访问。但是,如果锁的粒度太粗,会导致线程之间的竞争过于激烈,从而影响程序的性能。 以下是使用减少锁粒度进行性能优化的主要方式: 细粒度锁:将共享资源的访问权限限制在一个尽可能小的 阅读全文
posted @ 2023-11-27 09:56 鹏懿如斯 阅读(4) 评论(0) 推荐(0) 编辑
摘要: week 9 去了一趟保定,生病休息了两三周,继续学习 进阶知识 框架 Spring Cloud 服务发现与注册 Eureka 注册中心搭建 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cl 阅读全文
posted @ 2023-11-20 19:33 鹏懿如斯 阅读(7) 评论(0) 推荐(0) 编辑
摘要: week 6 完成第一版平台项目任务书 这周加了两天班,比较累 进阶知识 网络编程 TCP UDP 流量控制和拥塞控制 流量控制和拥塞控制是网络通信中的两个重要概念,它们的目的都是为了确保网络中数据的高效传输和避免网络拥塞。然而,它们在实现方式和使用场景上存在一定的区别。 流量控制主要是通过控制发送 阅读全文
posted @ 2023-10-22 20:49 鹏懿如斯 阅读(6) 评论(0) 推荐(0) 编辑
摘要: week 5 本周工作是搭建项目框架: 前后端配置完成,可以本地启动 mybatis 多数据源配置成功 一个mapper对应多个mapper,根据配置选择 sql建库表语句改造,sqlserver文件夹xml的sql语法改造 数据库切换到sqlserver,并在页面上完成所有页面测试 页面动态配置定 阅读全文
posted @ 2023-10-15 18:22 鹏懿如斯 阅读(3) 评论(0) 推荐(0) 编辑
摘要: week 4 进阶知识 设计模式 行为型设计模式 模板方法模式 模板方法模式是一种行为型设计模式,它在一个抽象类中定义了一个算法的骨架,将一些步骤的具体实现延迟到子类中。这样使得子类可以在不改变该算法结构的情况下,重新定义算法中的某些步骤。 首先,我们创建一个抽象类,定义算法的骨架和一些抽象方法: 阅读全文
posted @ 2023-10-08 19:51 鹏懿如斯 阅读(1) 评论(0) 推荐(0) 编辑
摘要: week 3 完成底层篇,20%的进阶篇 底层知识 JVM 内存结构 运行时区域 程序计数器 线程独享 虚拟机栈(线程栈) 线程独享 本地方法栈:线程独享 堆(heap) 方法区(内含常量池) 在 JDK 8 之前的版本中,方法区是用于存储类信息、常量池、静态变量等的区域。然而,从 JDK 8 开始 阅读全文
posted @ 2023-10-01 22:06 鹏懿如斯 阅读(9) 评论(0) 推荐(0) 编辑
摘要: week 2 基础知识部分看完了 基础知识 序列化 序列化破坏单例模式 序列化会破坏单例模式,因为在序列化过程中,每个已经序列化的对象都会添加一个特殊的标记,然后在反序列化时,如果遇到已序列化的对象,就不再序列化它,而是直接使用之前保存的标记。这样,反序列化后得到的对象就不是原来的单例对象了。 解决 阅读全文
posted @ 2023-09-24 17:05 鹏懿如斯 阅读(5) 评论(0) 推荐(0) 编辑
摘要: html ``` Java Script 点我! Hello World ! 点我! 换图片 段落 换颜色 验证 点我 --> function2 提交 提交 提交 单击此处什么也不会发生 点我! hello ``` javascript ``` /** * @Author: weiyupeng * 阅读全文
posted @ 2023-07-15 22:08 鹏懿如斯 阅读(7) 评论(0) 推荐(0) 编辑
摘要: .css ``` /* author: weiyupeng date: 2023/7/8 10:09 */ #para2 { font-size: xxx-large; } /*背景样式*/ body { /*背景色*/ background-color: mintcream; /*背景图*/ ba 阅读全文
posted @ 2023-07-10 20:12 鹏懿如斯 阅读(7) 评论(0) 推荐(0) 编辑
摘要: ``` 头部 --> 一级标题 二级标题 三级标题 四级标题 五级标题 六级标题 段落1 段落2 链接1 p321 段 落 2 这是个折行段落 加粗字体 着重文字 斜体字 小号字 普通字下标 普通字上标 下划线 删除字 print("代码区域"); 键盘输入 代码样本 变量 预格式文本 a b c 阅读全文
posted @ 2023-07-08 09:20 鹏懿如斯 阅读(9) 评论(0) 推荐(0) 编辑
摘要: ## 1 安装环境 ### Node.js js的运行环境,相当于 java 的 jvm 官网:https://nodejs.org/en,下载最新稳定版 `18.16.0 LTS`,双击安装即可 自动安装了npm,终端验证: ```bash C:\Users\Administrator>node 阅读全文
posted @ 2023-06-18 20:01 鹏懿如斯 阅读(211) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/1205669/202105/1205669-20210507134138661-1026932012.png) 阅读全文
posted @ 2021-05-07 13:42 鹏懿如斯 阅读(188) 评论(0) 推荐(0) 编辑
摘要: LRU Cache (least recently used) multi-level cache in CPU LRU: Hash Table + Double Linked List Time complexity: O(1) lookup, O(1) update/modify 其他缓存替换方 阅读全文
posted @ 2021-03-22 12:47 鹏懿如斯 阅读(47) 评论(0) 推荐(0) 编辑
摘要: Advanced Search Pruning Bidirectional Breadth First Search Heuristic search (A* Search) public class AStar { public final static int BAR = 1; // 障碍值 p 阅读全文
posted @ 2021-03-21 16:50 鹏懿如斯 阅读(26) 评论(0) 推荐(0) 编辑
摘要: Trie inner 208. Implement Trie (Prefix Tree) Trie (we pronounce "try") or prefix tree is a tree data structure used to retrieve a key in a strings dat 阅读全文
posted @ 2021-03-20 16:30 鹏懿如斯 阅读(33) 评论(0) 推荐(0) 编辑
摘要: new climb stairs step: 1 2 3, two adjacent steps cannot be the same. 120. Triangle Given a triangle array, return the minimum path sum from top to bot 阅读全文
posted @ 2021-03-19 20:19 鹏懿如斯 阅读(29) 评论(0) 推荐(0) 编辑
摘要: Binary Search premise : 1. monotonicity 2. exist upper and lower bound 3. index accessible left, right = 0, len(array) - 1 while left <= right: mid = 阅读全文
posted @ 2021-03-18 16:20 鹏懿如斯 阅读(33) 评论(0) 推荐(0) 编辑
摘要: Greedy best in present The difference between Greedy and Dynamic Programming is that it makes choices on the solutions of each sub-problem and can't r 阅读全文
posted @ 2021-03-17 14:17 鹏懿如斯 阅读(54) 评论(0) 推荐(0) 编辑
摘要: Division find sub-problems, split and merge def divide_conquer(problem, param1, param2, ...): # recursion terminator if problem is None: print_result 阅读全文
posted @ 2021-03-16 14:59 鹏懿如斯 阅读(47) 评论(0) 推荐(0) 编辑
摘要: Recursion layer by layer private xxxx recursion(level, param1, param2, ...) { // recursion terminator if (level > MAX_LEVEL) { process_result; return 阅读全文
posted @ 2021-03-15 17:47 鹏懿如斯 阅读(51) 评论(0) 推荐(0) 编辑
摘要: List: one next Tree: multi next, no cycle Graph: has cycle Binary Search Tree left children < root < right children (children! not child!) Time Comple 阅读全文
posted @ 2021-03-14 19:50 鹏懿如斯 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 20. Valid Parentheses Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An inpu 阅读全文
posted @ 2021-03-13 16:49 鹏懿如斯 阅读(27) 评论(0) 推荐(0) 编辑
摘要: Stack extends class Vector Stack<T> stack = new Stack<>(); API: empty() peek() pop() push(E item) search(Object o) Recommended in practice: Deque<T> s 阅读全文
posted @ 2021-03-12 15:06 鹏懿如斯 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 11. Container With Most Water Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines ar 阅读全文
posted @ 2021-03-11 16:32 鹏懿如斯 阅读(26) 评论(0) 推荐(0) 编辑
摘要: Master Theorem ArrayList When insert or delete an element, ArrayList will create a new Array and execute a System.arraycopy. Doing those constantly wi 阅读全文
posted @ 2021-03-10 19:51 鹏懿如斯 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 什么是RPC 微服务:单个应用程序 → 一组小型服务 小型服务之间需要通信 → RPC轻量级通信,像API调用一样easy 微服务优点: 独立缩放,可扩展性强,耦合性低,不相互依赖 独立发布和部署,自己的部署不影响其他的服务 独立开发,独立的技术栈,专注于一个服务 优雅降级 分散治理 Thrift 阅读全文
posted @ 2020-11-15 17:32 鹏懿如斯 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 登录 C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u admin -p Enter password: **** Server version: 5.7.29 distinct去重 select distinct vend_id from p 阅读全文
posted @ 2020-09-25 10:20 鹏懿如斯 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 安装 官网下载exe,一路默认,安装到d盘 IDEA配置git 配置路径 登录账号 443错误,ping不过去 大概是网络被封,需用代理,命令如下 git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:80 阅读全文
posted @ 2020-09-21 09:01 鹏懿如斯 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 线程安全问题:多线程,共享资源,非原子性操作;同一时间,同一资源 i++不是原子性操作,是一组操作,三步操作 1.从主存读值 2.+1操作 3.刷写到内存 A B 都想执行i++ A 获取CPU资源 时间片形式 A 2ms B 5ms 会导致数据更新出问题 解决:synchronized 各种悲观锁 阅读全文
posted @ 2020-08-22 11:02 鹏懿如斯 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 基础部分 785. 判断二分图 中等 给定一个无向图graph,当这个图为二分图时返回true。 如果我们能将一个图的节点集合分割成两个独立的子集A和B,并使图中的每一条边的两个节点一个来自A集合,一个来自B集合,我们就将这个图称为二分图。 graph将会以邻接表方式给出,graph[i]表示图中与 阅读全文
posted @ 2020-08-04 12:43 鹏懿如斯 阅读(456) 评论(0) 推荐(0) 编辑
摘要: 基础部分 基本原理 0s 表示一串 0,1s 表示一串 1。 x ^ 0s = x x & 0s = 0 x | 0s = x x ^ 1s = ~x x & 1s = x x | 1s = 1s x ^ x = 0 x & x = x x | x = x 利用 x ^ 1s = ~x 的特点,可以 阅读全文
posted @ 2020-08-04 12:09 鹏懿如斯 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 基础部分 283. 移动零 简单 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 示例: 输入: [0,1,0,3,12] 输出: [1,3,12,0,0] 说明: 必须在原数组上操作,不能拷贝额外的数组。 尽量减少操作次数。 class Soluti 阅读全文
posted @ 2020-08-03 17:15 鹏懿如斯 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 基础部分 242. 有效的字母异位词 简单 给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的字母异位词。 示例 1: 输入: s = "anagram", t = "nagaram" 输出: true 示例 2: 输入: s = "rat", t = "car" 输出: fals 阅读全文
posted @ 2020-08-03 12:19 鹏懿如斯 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 基础部分 1. 两数之和 简单 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。 示例: 给定 nums = [2, 7, 11, 15], targ 阅读全文
posted @ 2020-08-03 10:14 鹏懿如斯 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 基础部分 232. 用栈实现队列 简单 使用栈实现队列的下列操作: push(x) -- 将一个元素放入队列的尾部。 pop() -- 从队列首部移除元素。 peek() -- 返回队列首部的元素。 empty() -- 返回队列是否为空。 示例: MyQueue queue = new MyQue 阅读全文
posted @ 2020-08-02 20:37 鹏懿如斯 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 基础部分 递归 104. 二叉树的最大深度 简单 给定一个二叉树,找出其最大深度。 二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。 说明: 叶子节点是指没有子节点的节点。 示例: 给定二叉树 [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15 7 返回它的 阅读全文
posted @ 2020-08-02 17:23 鹏懿如斯 阅读(425) 评论(0) 推荐(0) 编辑
摘要: 基础部分 160. 相交链表 简单 编写一个程序,找到两个单链表相交的起始节点。 如下面的两个链表**:** 在节点 c1 开始相交。 示例 1: 输入:intersectVal = 8, listA = [4,1,8,4,5], listB = [5,0,1,8,4,5], skipA = 2, 阅读全文
posted @ 2020-08-01 18:35 鹏懿如斯 阅读(448) 评论(0) 推荐(0) 编辑
摘要: 基础部分 204. 计数质数 简单 统计所有小于非负整数 n 的质数的数量。 示例: 输入: 10 输出: 4 解释: 小于 10 的质数一共有 4 个, 它们是 2, 3, 5, 7 。 class Solution { public int countPrimes(int n) { if (n 阅读全文
posted @ 2020-08-01 14:58 鹏懿如斯 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 基础部分 70. 爬楼梯 简单 假设你正在爬楼梯。需要 n 阶你才能到达楼顶。 每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢? **注意:**给定 n 是一个正整数。 示例 1: 输入: 2 输出: 2 解释: 有两种方法可以爬到楼顶。 1. 1 阶 + 1 阶 2. 2 阶 阅读全文
posted @ 2020-07-31 17:14 鹏懿如斯 阅读(484) 评论(0) 推荐(0) 编辑
摘要: 基础部分 BFS 1091. 二进制矩阵中的最短路径 中等 在一个 N × N 的方形网格中,每个单元格有两种状态:空(0)或者阻塞(1)。 一条从左上角到右下角、长度为 k 的畅通路径,由满足下述条件的单元格 C_1, C_2, ..., C_k 组成: 相邻单元格 C_i 和 C_{i+1} 在 阅读全文
posted @ 2020-07-29 10:29 鹏懿如斯 阅读(2189) 评论(0) 推荐(0) 编辑