Idea快捷键汇总

1 前言 正确使用快捷键可以明显提高编码效率。本文对Idea常用快捷键进行了分类汇总。 文中汇总的快捷键均为 Intellij IDEA 默认的快捷键。快捷键的搜索、配置、...

周二 · 2024-09-03 · 5 分钟 · Yuechen

序列化和反序列化的概念

序列化(Serialization) 可以简单理解为:将对象转换为字节流 的过程。想象你有一个玩具积木(对象),你想把它通过邮寄的方式发送给一个...

周一 · 2024-09-02 · 2 分钟 · Yuechen

如何在Java中操作json

1 简介 json : JavaScript Object Notation,JS对象简谱。 官网: https://www.json.org/json-zh.html 2 使用场景 网络传输 描述同样的信息,json相比xml占用更少的空间,如: <?xml version="1.0" encoding="UTF-8"?> <person> <id>1</id> &l...

周一 · 2024-09-02 · 13 分钟 · Yuechen

Promise

Promise 1. Promises API Reference 1.1. Promise#then promise.then(onFulfilled, onRejected); then代码示例 var promise = new Promise((resolve, reject) => { resolve("传递给then的值"); }); promise.then((value) => { console.log(value); }, (error) => { console.error(error); }); 这段代码创...

周日 · 2024-09-01 · 3 分钟 · Yuechen

浏览器存储

前言 通常我们认为只有服务器端才涉及到数据持久化,才会和数据库打交道,实际上,随着现代浏览器的功能不断增强,以及HTML5 的普及,越来越多的网...

周日 · 2024-09-01 · 9 分钟 · Yuechen

一道sql面试题

假设有以下3张表 create table course ( `id` integer primary key, `name` text not null ); create table student ( `id` integer primary key, `name` text not null ); create table score ( `id` integer primary key, `course_id` integer not null, `student_id` integer not null, `score` integer not null ); 初始化以下数据 -- insert insert into course values (1, &...

周六 · 2024-08-31 · 2 分钟 · Yuechen

Git手册

实际工作中的常见情况 git rebase git rebase 的文档描述是 Reapply commits on top of another base tip,从字面上理解是「在另一个基端之上重新应用提交」,这个定义听起来有点抽象。 换个角...

周五 · 2024-08-30 · 44 分钟 · Yuechen

junit、mockito、powermock等测试框架

前言 为什么要使用 mock? Mock 可以理解为创建一个虚假的对象,或者说模拟出一个对象,在测试环境中用来替换掉真实的对象,以达到我们可以: 验证该对象...

周四 · 2024-08-29 · 5 分钟 · Yuechen