Skip to content

Commit

Permalink
增加模块
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjianping committed May 11, 2021
1 parent 6979641 commit 2453660
Show file tree
Hide file tree
Showing 34 changed files with 1,375 additions and 9 deletions.
40 changes: 40 additions & 0 deletions DevOps/Git/Git 使用.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
```bash
git add xxx

git commit -m "commit message"

git pull origin master:dev

git fetch origin master:tmp

git merge tmp --no-ff

git push origin dev:master

git branch -d tmp
```



```bash
#切换到当前你自己的分支,获取最新的代码
git branch consult
#rebase远程master分支的最新代码,合并到你自己的分支
git rebase origin/master
#如果出现冲突,则需要解决冲突
git diff -w
#解决冲突文件
vim 冲突文件
git rebase origin/master
git rebase --continue
git add .
git commit -m "xx"
git log
#然后fetch到当前分支
git fetch
#然后push到自己的分支
git push origin consult
#push不上去的时候,直接强push(慎用)
git push -f origin consult
```

File renamed without changes
22 changes: 22 additions & 0 deletions Untitled.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#

swagger

druid

pageoffice

menucode



多线程/多进程

springboot/springmvc/ssm

mysql/mongo

kafaka

xpath

Binary file added 云析学院Java架构精品课V2.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions 应用框架/Spring Boot/Spring Boot 简介.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".

We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need minimal Spring configuration.

If you’re looking for information about a specific version, or instructions about how to upgrade from an earlier release, check out [the project release notes section](https://github.com/spring-projects/spring-boot/wiki#release-notes) on our wiki.

## Features

- Create stand-alone Spring applications
- Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
- Provide opinionated 'starter' dependencies to simplify your build configuration
- Automatically configure Spring and 3rd party libraries whenever possible
- Provide production-ready features such as metrics, health checks, and externalized configuration
- Absolutely no code generation and no requirement for XML configuration
Empty file.
Empty file.
83 changes: 83 additions & 0 deletions 筑基/集合/Collection/List.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# ArrayList

![image-20210510125008211](images/image-20210510125008211.png)

默认大小 10



扩容策略: 1.5 倍扩容

```java
private void grow(int minCapacity) {
// overflow-conscious code
int oldCapacity = elementData.length;
int newCapacity = oldCapacity + (oldCapacity >> 1);
if (newCapacity - minCapacity < 0)
newCapacity = minCapacity;
if (newCapacity - MAX_ARRAY_SIZE > 0)
newCapacity = hugeCapacity(minCapacity);
// minCapacity is usually close to size, so this is a win:
elementData = Arrays.copyOf(elementData, newCapacity);
}
```

非线程安全, add 方法先判断是否扩容,然后增加元素



# LinkedList

![image-20210510130337678](images/image-20210510130337678.png)

# Vector

![image-20210510130946803](images/image-20210510130946803.png)

默认大小 10



扩容策略: 初始化时指定 capacityIncrement,否则是 2 倍扩容

```java
public Vector(int initialCapacity, int capacityIncrement) {
super();
if (initialCapacity < 0)
throw new IllegalArgumentException("Illegal Capacity: "+
initialCapacity);
this.elementData = new Object[initialCapacity];
this.capacityIncrement = capacityIncrement;
}
```



```java
private void grow(int minCapacity) {
// overflow-conscious code
int oldCapacity = elementData.length;
int newCapacity = oldCapacity + ((capacityIncrement > 0) ?
capacityIncrement : oldCapacity);
if (newCapacity - minCapacity < 0)
newCapacity = minCapacity;
if (newCapacity - MAX_ARRAY_SIZE > 0)
newCapacity = hugeCapacity(minCapacity);
elementData = Arrays.copyOf(elementData, newCapacity);
}
```

线程安全,使用 java 同步关键字

```java
public synchronized boolean add(E e) {
modCount++;
ensureCapacityHelper(elementCount + 1);
elementData[elementCount++] = e;
return true;
}
```

# Stack

![image-20210510133747411](images/image-20210510133747411.png)
Empty file.
33 changes: 33 additions & 0 deletions 筑基/集合/Collection/Set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# HashSet

![image-20210510140339780](images/image-20210510140339780.png)



```java
public HashSet() {
map = new HashMap<>();
}
```



```java
private static final Object PRESENT = new Object();

public boolean add(E e) {
return map.put(e, PRESENT)==null;
}
```



## TreeSet



```java
public TreeSet() {
this(new TreeMap<E,Object>());
}
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2453660

Please sign in to comment.