Skip to content

Commit d9a1b16

Browse files
committed
调整目录结构
1 parent 8f2d70b commit d9a1b16

18 files changed

+836
-99
lines changed

notes/JavaArchitecture/01 Java 基础.md renamed to notes/JavaArchitecture/01-Java基础.md

-99
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,3 @@
1-
<!-- TOC -->
2-
3-
- [前言](#前言)
4-
- [一、基本概念](#一基本概念)
5-
- [1. Java程序初始化的顺序是怎么样的](#1-java程序初始化的顺序是怎么样的)
6-
- [2. Java和C++的区别](#2-java和c的区别)
7-
- [3. 反射](#3-反射)
8-
- [先看一个知乎回答](#先看一个知乎回答)
9-
- [什么是反射](#什么是反射)
10-
- [主要用途](#主要用途)
11-
- [获得Class对象](#获得class对象)
12-
- [4. 注解](#4-注解)
13-
- [什么是注解](#什么是注解)
14-
- [为什么要用注解](#为什么要用注解)
15-
- [基本Annotation](#基本annotation)
16-
- [自定义注解类编写规则](#自定义注解类编写规则)
17-
- [自定义注解实例](#自定义注解实例)
18-
- [5. 泛型](#5-泛型)
19-
- [通俗解释](#通俗解释)
20-
- [泛型方法](#泛型方法)
21-
- [泛型类](#泛型类)
22-
- [类型通配符](#类型通配符)
23-
- [6. 字节与字符的区别](#6-字节与字符的区别)
24-
- [7. 有哪些访问修饰符](#7-有哪些访问修饰符)
25-
- [8. 深拷贝与浅拷贝](#8-深拷贝与浅拷贝)
26-
- [9. Lamda表达式](#9-lamda表达式)
27-
- [语法](#语法)
28-
- [Lambda 表达式实例](#lambda-表达式实例)
29-
- [变量作用域](#变量作用域)
30-
- [10. 字符串常量池](#10-字符串常量池)
31-
- [11. 解释型语言与编译型语言的区别](#11-解释型语言与编译型语言的区别)
32-
- [二、面向对象](#二面向对象)
33-
- [1. Java的四个基本特性,对多态的理解,在项目中哪些地方用到多态](#1-java的四个基本特性对多态的理解在项目中哪些地方用到多态)
34-
- [2. 什么是重载和重写](#2-什么是重载和重写)
35-
- [3. 面向对象和面向过程的区别?用面向过程可以实现面向对象吗?](#3-面向对象和面向过程的区别用面向过程可以实现面向对象吗)
36-
- [4. 面向对象开发的六个基本原则,在项目中用过哪些原则](#4-面向对象开发的六个基本原则在项目中用过哪些原则)
37-
- [5. 内部类有哪些](#5-内部类有哪些)
38-
- [(一)成员内部类](#一成员内部类)
39-
- [(二)局部内部类](#二局部内部类)
40-
- [(三)匿名内部类](#三匿名内部类)
41-
- [(四)静态内部类](#四静态内部类)
42-
- [6. 组合、继承和代理的区别](#6-组合继承和代理的区别)
43-
- [定义](#定义)
44-
- [使用场合](#使用场合)
45-
- [7. 什么是构造函数](#7-什么是构造函数)
46-
- [8. 向上造型和向下造型](#8-向上造型和向下造型)
47-
- [三、关键字](#三关键字)
48-
- [1. final与static的区别](#1-final与static的区别)
49-
- [final](#final)
50-
- [static](#static)
51-
- [2. break、continue、return](#2-breakcontinuereturn)
52-
- [break](#break)
53-
- [continue](#continue)
54-
- [return](#return)
55-
- [3. final、finally和finalize区别](#3-finalfinally和finalize区别)
56-
- [final](#final-1)
57-
- [finally](#finally)
58-
- [finalize](#finalize)
59-
- [判定死亡](#判定死亡)
60-
- [最后的救赎](#最后的救赎)
61-
- [finalize()的作用](#finalize的作用)
62-
- [4. assert有什么作用](#4-assert有什么作用)
63-
- [5. volatile](#5-volatile)
64-
- [6. instanceof](#6-instanceof)
65-
- [7. strictfp](#7-strictfp)
66-
- [8. transient](#8-transient)
67-
- [9. native](#9-native)
68-
- [四、基本数据类型与运算](#四基本数据类型与运算)
69-
- [1. Java的基本数据类型和引用类型,自动装箱和拆箱](#1-java的基本数据类型和引用类型自动装箱和拆箱)
70-
- [2. ValueOf缓存池](#2-valueof缓存池)
71-
- [3. i++和++i有什么区别](#3-i和i有什么区别)
72-
- [i++](#i)
73-
- [++i](#i)
74-
- [4. 位运算符](#4-位运算符)
75-
- [5. 原码、补码、反码是什么](#5-原码补码反码是什么)
76-
- [机器数](#机器数)
77-
- [真值](#真值)
78-
- [原码](#原码)
79-
- [反码](#反码)
80-
- [补码](#补码)
81-
- [6. 不用额外变量交换两个整数的值](#6-不用额外变量交换两个整数的值)
82-
- [7. 不使用运算符进行a+b操作](#7-不使用运算符进行ab操作)
83-
- [8. &和&& 、|和||的区别](#8-和-和的区别)
84-
- [五、字符串与数组](#五字符串与数组)
85-
- [1. String,StringBuffer,StringBuilder,以及对String不变性的理解](#1-stringstringbufferstringbuilder以及对string不变性的理解)
86-
- [2. String有重写Object的hashcode和toString吗?如果重写equals不重写hashcode会出现什么问题?](#2-string有重写object的hashcode和tostring吗如果重写equals不重写hashcode会出现什么问题)
87-
- [3. 如果你定义一个类,包括学号,姓名,分数,如何把这个对象作为key?要重写equals和hashcode吗](#3-如果你定义一个类包括学号姓名分数如何把这个对象作为key要重写equals和hashcode吗)
88-
- [4. 字面量](#4-字面量)
89-
- [六、异常处理](#六异常处理)
90-
- [1. 常见异常分为那两种(Exception,Error),常见异常的基类以及常见的异常](#1-常见异常分为那两种exceptionerror常见异常的基类以及常见的异常)
91-
- [七、Object 通用方法](#七object-通用方法)
92-
- [equals()](#equals)
93-
- [hashCode()](#hashcode)
94-
- [toString()](#tostring)
95-
- [clone()](#clone)
96-
- [更新日志](#更新日志)
97-
98-
<!-- /TOC -->
99-
1001
# 前言
1012

1023
本文主要包含 Java 核心基础知识,主要根据以下部分进行节选。

notes/docsify/about/author.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
3+
<div align="center">
4+
<p>
5+
在颠覆世界的同时,也要好好关照自己。
6+
</p>
7+
<a target="_blank" href="https://zhuanlan.zhihu.com/frankfeekr" rel="nofollow"><img src="https://img.shields.io/badge/知乎专栏-frankfeekr-blue.svg" alt="QQ群" data-canonical-src="" style="max-width:100%;"></a>
8+
<a target="_blank" href="http://blog.csdn.net/u012104219" rel="nofollow"><img src="https://img.shields.io/badge/CSDN-东风牧野-red.svg" alt="CSDN" data-canonical-src="" style="max-width:100%;"></a>
9+
<a target="_blank" href="mailto:frank_lin@whu.edu.cn" rel="nofollow"><img src="https://img.shields.io/badge/Email-frank__lin@whu.edu.cn-lightgrey.svg" alt="邮箱" data-canonical-src="" style="max-width:100%;"></a>
10+
<a target="_blank" href="https://jq.qq.com/?_wv=1027&k=593WvX0" rel="nofollow" ><img src="https://img.shields.io/badge/QQ群-862619503-green.svg" alt="QQ群" data-canonical-src="" style="max-width:100%;"></a>
11+
<br/><br/>
12+
<p>
13+
from zero to hero.
14+
</p>
15+
</div>
16+
<div align="center"><img src="https://raw.githubusercontent.com/frank-lam/fullstack-tutorial/master/assets/wechat-fullstack.png" width="620"/></div><br/>

notes/docsify/about/donate.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
<div align="center">
3+
<p>
4+
如果你觉得这个项目帮助到了你,你可以帮作者买一杯咖啡表示鼓励
5+
</p>
6+
</div><br/>
7+
8+
9+
![donate](https://raw.githubusercontent.com/frank-lam/fullstack-tutorial/master/assets/tipping.jpg)

notes/docsify/coverpage.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# fullstack tutorial
2+
3+
> 全栈开发指南,架构师成长之路
4+
5+
<!-- - 后台技术栈/全栈开发/架构师之路,秋招/春招/校招/面试 -->
6+
- 操作系统、计算机网络、数据库与算法
7+
- Java技术栈、微服务、分布式系统架构
8+
- Docker、Git工作流、正则表达式
9+
- from zero to hero
10+
11+
[Get Started](introduction)
12+
[GitHub](https://github.com/frank-lam/fullstack-tutorial)

notes/docsify/css/main.css

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.markdown-section iframe[src*="buttons.github.io"] {
2+
margin: 0;
3+
}
4+
5+
figure.thumbnails img {
6+
margin: 0.75em 0;
7+
border-radius: 3px;
8+
box-shadow: 0 2px 6px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.15);
9+
}
10+
11+
@media (min-width: 30em) {
12+
figure.thumbnails:after {
13+
content: "";
14+
display: table;
15+
clear: both;
16+
}
17+
18+
figure.thumbnails img {
19+
float: left;
20+
width: calc(50% - 0.75em);
21+
}
22+
23+
figure.thumbnails img:nth-child(even) {
24+
margin-left: 1.5em;
25+
}
26+
27+
@supports (display: flex) {
28+
figure.thumbnails {
29+
display: flex;
30+
align-items: center;
31+
}
32+
33+
figure.thumbnails img {
34+
flex-grow: 1;
35+
width: 0;
36+
}
37+
38+
figure.thumbnails img + img {
39+
margin: 0 0 0 1.5em;
40+
}
41+
}
42+
}

notes/docsify/js/.eslintrc.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
"parserOptions": {
3+
"ecmaVersion": 5,
4+
"sourceType": "script"
5+
},
6+
"env": {
7+
"commonjs": false,
8+
"es6" : false,
9+
"node" : false
10+
},
11+
"rules": {
12+
"no-var" : "off",
13+
"prefer-const": "off"
14+
}
15+
}

notes/docsify/js/main.js

+187
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
(function () {
2+
// Functions
3+
// =========================================================================
4+
/**
5+
* Adds event listeners to change active stylesheet and restore previously
6+
* activated stylesheet on reload.
7+
*
8+
* @example
9+
*
10+
* This link:
11+
* <a href="#" data-link-title="Foo">Foo</a>
12+
* Will active this existing link:
13+
* <link rel="stylesheet alternate" title="Foo" href="..." >
14+
*
15+
* @example
16+
*
17+
* This link:
18+
* <a href="#" data-link-href="path/to/file.css">Bar</a>
19+
* Will activate this existing link:
20+
* <link rel="stylesheet alternate" title="[someID]" href="path/to/file.css" >
21+
* Or generate this active link:
22+
* <link rel="stylesheet" title="Bar" href="path/to/file.css" >
23+
*/
24+
25+
function imgAdd2() {
26+
var imgs = document.querySelectorAll('.content img');
27+
// var imgs = document.getElementsByTagName('medium-zoom-image');
28+
for (let j = 0; j < imgs.length; j++) {
29+
// console.log('zheshi')
30+
let img = imgs[j];
31+
// console.log(img);
32+
if (img.src) {
33+
console.log(img.src);
34+
if (!img.getAttribute('hadassets')) {
35+
let hasharr = window.location.hash.split('/');
36+
// console.log(hasharr);
37+
let origin = window.location.origin;
38+
img.setAttribute('hadassets', 1);
39+
var hasharrPath = "";
40+
for(var i = 1; i < hasharr.length - 1 ; i++){
41+
hasharrPath += hasharr[i] + "/";
42+
}
43+
img.src = origin + '/' + hasharrPath + img.src.substring(origin.length + 1);
44+
// img.src = origin + '/' + hasharrPath + img.src;
45+
}
46+
}
47+
}
48+
}
49+
50+
function imgAdd() {
51+
var imgs = document.querySelectorAll('.markdown-section img');
52+
// var imgs = document.getElementsByTagName('medium-zoom-image');
53+
54+
for (let j = 0; j < imgs.length; j++) {
55+
// console.log('zheshi')
56+
let img = imgs[j];
57+
// console.log(img);
58+
if (img.src) {
59+
console.log(img.src);
60+
if (!img.getAttribute('hadassets')) {
61+
let hasharr = window.location.hash.split('/');
62+
// console.log(hasharr);
63+
let origin = window.location.origin;
64+
img.setAttribute('hadassets', 1);
65+
var hasharrPath = "";
66+
for(var i = 1; i < hasharr.length - 1 ; i++){
67+
hasharrPath += hasharr[i] + "/";
68+
}
69+
70+
// img.src = origin + '/' + hasharrPath + img.src.substring(origin.length + 1);
71+
var imgSrc = img.getAttribute("src");
72+
if(!imgSrc.includes(hasharrPath)){
73+
img.setAttribute("src", hasharrPath + imgSrc);
74+
}
75+
// img.src = origin + '/' + hasharrPath + img.getAttribute("src");
76+
}
77+
}
78+
}
79+
}
80+
function initStyleSwitcher() {
81+
var isInitialzed = false;
82+
var sessionStorageKey = 'activeStylesheetHref';
83+
84+
function handleSwitch(activeHref, activeTitle) {
85+
var activeElm = document.querySelector('link[href*="' + activeHref + '"],link[title="' + activeTitle + '"]');
86+
87+
if (!activeElm && activeHref) {
88+
activeElm = document.createElement('link');
89+
activeElm.setAttribute('href', activeHref);
90+
activeElm.setAttribute('rel', 'stylesheet');
91+
activeElm.setAttribute('title', activeTitle);
92+
93+
document.head.appendChild(activeElm);
94+
95+
activeElm.addEventListener('load', function linkOnLoad() {
96+
activeElm.removeEventListener('load', linkOnLoad);
97+
setActiveLink(activeElm);
98+
});
99+
}
100+
else if (activeElm) {
101+
setActiveLink(activeElm);
102+
}
103+
}
104+
105+
function setActiveLink(activeElm) {
106+
var activeHref = activeElm.getAttribute('href');
107+
var activeTitle = activeElm.getAttribute('title');
108+
var inactiveElms = document.querySelectorAll('link[title]:not([href*="' + activeHref + '"]):not([title="' + activeTitle + '"])');
109+
110+
// Remove "alternate" keyword
111+
activeElm.setAttribute('rel', (activeElm.rel || '').replace(/\s*alternate/g, '').trim());
112+
113+
// Force enable stylesheet (required for some browsers)
114+
activeElm.disabled = true;
115+
activeElm.disabled = false;
116+
117+
// Store active style sheet
118+
sessionStorage.setItem(sessionStorageKey, activeHref);
119+
120+
// Disable other elms
121+
for (var i = 0; i < inactiveElms.length; i++) {
122+
var elm = inactiveElms[i];
123+
124+
elm.disabled = true;
125+
126+
// Fix for browsersync and alternate stylesheet updates. Will
127+
// cause FOUC when switching stylesheets during development, but
128+
// required to properly apply style updates when alternate
129+
// stylesheets are enabled.
130+
if (window.browsersyncObserver) {
131+
var linkRel = elm.getAttribute('rel') || '';
132+
var linkRelAlt = linkRel.indexOf('alternate') > -1 ? linkRel : (linkRel + ' alternate').trim();
133+
134+
elm.setAttribute('rel', linkRelAlt);
135+
}
136+
}
137+
138+
// CSS custom property ponyfil
139+
if ((window.$docsify || {}).themeable) {
140+
window.$docsify.themeable.util.cssVars();
141+
}
142+
}
143+
144+
// Event listeners
145+
if (!isInitialzed) {
146+
isInitialzed = true;
147+
// Restore active stylesheet
148+
document.addEventListener('DOMContentLoaded', function () {
149+
setTimeout(function () {
150+
imgAdd();
151+
}, 300)
152+
var activeHref = sessionStorage.getItem(sessionStorageKey);
153+
154+
if (activeHref) {
155+
handleSwitch(activeHref);
156+
}
157+
158+
159+
// document.querySelector(".markdown-section").click();
160+
161+
162+
});
163+
164+
// Update active stylesheet
165+
document.addEventListener('click', function (evt) {
166+
var dataHref = evt.target.getAttribute('data-link-href');
167+
var dataTitle = evt.target.getAttribute('data-link-title')
168+
169+
if (dataHref || dataTitle) {
170+
dataTitle = dataTitle
171+
|| evt.target.textContent
172+
|| '_' + Math.random().toString(36).substr(2, 9); // UID
173+
174+
handleSwitch(dataHref, dataTitle);
175+
evt.preventDefault();
176+
}
177+
setTimeout(function () {
178+
imgAdd();
179+
}, 300)
180+
});
181+
}
182+
}
183+
184+
// Main
185+
// =========================================================================
186+
initStyleSwitcher();
187+
})();

0 commit comments

Comments
 (0)