UML class diagram-UML类图

    The UML diagram is a graphical notation used to construct and visualize object oriented systems. A class diagram in the Unified Modeling Language is a type of static structure diagram that describes the structure of a system by showing the system's :       UML类图是一种构造和可视化面向对象系统的图形符号。一个统一模型语言(UML)中的类图是一直静态结构化图形,它通过展示以下内容描述了系统的结构: classes 类 their attributes 属性  operations(or methods) 操作(方法) and the relationships … Read more

SOLID principles of Object-Oriented Design-面向对象设计的SOLID五大准则

面向对象设计的五大准则(SOLID) ## 单一职责原则 Single Responsibility Principle A class should have one,and only one,reason to change.   一个类应该有一个,且只有一个理由改变。   It is one of the basic principles most developers apply to build robust and maintainable software.You can not only apply it to classes,buit also to software compoments and microservices.   单一职责原色是大部分开发者应用构建健壮和可维护软件的基本准则之一。我们不仅可以把单一职责原则应用于类,并且可以应用到软件组件和微服务中。   – Benefits of the Single … Read more

Redmi Note 9 5g(M2007J22C)刷TWRP,Magisk,LSPosed

## step 1 解锁手机   – [小米官方解锁工具及教程](https://www.miui.com/unlock/download.html) ## step 2 刷Android10官方rom(可选)     如果MIUI版本是12.5.1(Android 11),可以选择降低到V12.5.8.0.RJECNXM(Android 10),我在Android 11上用Xposed模块执行shell操作文件的时候会遇到权限问题,所以选择降到Android10,这个是可选步骤,不需要可以直接跳过这一步。   – 下载官方刷机工具,[MiFlash 最新版(2018.5.28) ](http://bigota.d.miui.com/tools/MiFlash2018-5-28-0.zip) – 下载Android 10 刷机包线刷版到[12.5.8.0.RJECNXM](https://web.vip.miui.com/page/info/mio/mio/detail?postId=23527587&app_version=dev.20051)  – – 关机状态长按power键和音量下键进入fastboot模式 – 打开MiFlash刷机,注意右下角模式选择flash_all,这样刷完还是解锁状态,具体看官方给的文档   ## step 3 刷第三方recovery TWRP – 进入fastboot模式 – 执行命令 fastboot flash recovery xxxx.img 刷twrp – 执行命令 astboot –disable-verity –disable-verification flash vbmeta vbmeta.img 去除加密验证 … Read more

Quicksort Algorithm Using Lomuto partition Scheme-Lomuo分割方案的快速排序算法

 QuickSort is another algorithm form Divide and Conquer category.It operates by breaking down large problems into smaller,more easily solvable problems. 快速排序是分治算法分类中的另一种算法,它通过把大问题拆分成更小,更容易解决的问题操作。 The idea of QuickSort is the following: a pivot element is picked.The versions of QuickSort differ in the way of pivot picking.First,last,median,or a randomly selected element is a candidate to be picked, as the … Read more

Merge Sort Algorithm-归并排序

Merge Sort belongs to the category of Divide and Conquer algorithms. These algorithms operate by breaking down large problems into smaller, more easily solvable problems.   归并排序属于分治算法分类,这些算法通过把大的问题拆分成更小的,更容易解决的问题操作。   The idea of the merge sort algorithm is to divide the array in half over and over again util each piece is only one item long.Then those … Read more

Insertion Sort Algorithm-插入排序算法

Insertion Sort is a simple sorting algorithm that works the way we sort playing cards in our hands.We sort the first two cards and then place the third card in the appropriate position within the first two, and then the fourth is positioned within the first three,and so until the whole hand is sorted. 插入排序也是一种简单的排序算法,它的原理跟我们玩扑克牌排序一样。首先排序前两张牌,然后在他们中合适的未知插入第三张牌,然后在前三张合适的位置插入第四张,直到手里的牌全部有序。 … Read more

Selection Sort Algorithm-选择排序算法

     Selection Sort is a simple sorting algorithm that find the smallest element in the array and swaps it with the element in the first position, then find the second smallest element in and swaps it with the element in the second position,and continues in this way until the entire array is sorted.   选择排序是一种简单的排序算法,首先查找数组中最小的元素,跟数组元素第一位交换,然后查找第二小的元素,跟数组第二位元素交换,依此类推,直到整个数组元素有序。 … Read more

Bubble Sort Algorithm-冒泡排序

    Bubble sort is an algorithm that is used to sort a list of elements,for example elements in an array. This algorithm compares two adjacent elements and then swaps them if they are not in order. The process is repeated util no more swapping is needed.       冒泡排序是对一系列元素排序的一种算法,比如数组中的元素。该算法对比相邻的元素,如果顺序不对则交换它们。 该过程一直重复,直到不需要交换为止       The main advantage of Bubble Sort … Read more

阿里云老用户续费优惠,一年6.5折扣

    今天朋友跟我说服务器要续费了,发给我一张截图比去年贵了好几千,但是服务器上部署的网站和内容太多不好迁移。     然后我找了找,阿里云有针对老用户的续费活动,能省下不少钱 。直达链接:阿里云老用户续费活动  这个优惠还是不错的,一年老用户享受6.5折扣,3年6.3折,5年6折 详细步骤: 点击活动链接 阿里云老用户续费活动 领取续费优惠权益 点击去续费 4.选择续费的时长确认折扣生效并完成支付

Xshell通过跳板机连接只有ipv6的vps

    最近折腾了一台欧洲小鸡只有ipv6地址,由于我本地宽带不支持ipv6,所以没有通过xshell或者putty直连。     解决方式可以通过跳板机的方式连,意思就是通过支持ipv6的跳板机代理连接我们只有ipv4的vps。     如果跳板机只支持ipv4是不可行的,我们可以使用WRAP使我们的跳板机支持ipv6。我有一台支持ipv6的vps,所以就不用在跳板机上装WRAP了。     下面总结一下Xshell通过跳板机连接的方式     先添加我们的跳板机,在Xshell菜单选择:文件->打开->新建 填写跳板机vps信息,然后再属性里面点击隧道->添加隧道 ,填写信息,类型选Dynamic,端口随便设置一个,然后点确认保存。     然后再添加我们的ipv6vps,文件->打开->新建,填写vps信息  左侧属性内点击代理->浏览->添加代理,类型选SOCKS5,主机填写127.0.0.1, 端口号更上面设置跳板机的隧道一直,这里我设置的是1088,点击确认保存 以上设置完后,先连接跳板机,再连接ipv6机器,当跳板机显示绿色环形的时候,代表通过跳板机连接ipv6小机成功