package com.androidstudy.uicomponenttest; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import android.content ...
分类:
其他好文 时间:
2021-01-12 11:26:00
阅读次数:
0
J.U.C是java.util.concurrent的简写,里面提供了很多线程安全的集合。 CopyOnWriteArrayList介绍 CopyOnWriteArrayList相比于ArrayList是线程安全的,字面意思是写操作时复制。CopyOnWriteArrayList使用写操作时复制技术 ...
分类:
编程语言 时间:
2021-01-12 11:22:27
阅读次数:
0
“单一职责”模式 在软件组件的设计中,如果责任划分的不清晰,使用继承得到的结果往往是随着需求的变化,子类急剧膨胀,同时充斥着重复代码,这时候的关键是划清责任。 典型模式? Decorator? Bridge 代码示例: 1 //业务操作 2 class Stream{ 3 public: 4 vir ...
分类:
其他好文 时间:
2021-01-12 11:21:21
阅读次数:
0
题目 本题目一开始想要通过二叉树遍历KMP匹配,但看来实现比较复杂 不如直接暴力匹配,本题和LeetCode100.相同的树有共通之处 1 class Solution { 2 public: 3 bool isSubtree(TreeNode* s, TreeNode* t) { 4 if(!s ...
分类:
其他好文 时间:
2021-01-12 11:17:21
阅读次数:
0
import java.io.*; import org.junit.Test; public class ByteArrayOutputStreamTest { @Test public void test1() throws Exception { //创建文件输入字节流 文件在model下 F ...
分类:
其他好文 时间:
2021-01-12 11:13:28
阅读次数:
0
RabbitMQ - 02Spring整合XML形式 (1)XML形式:方式一 测试启动类 public class SpringTest { public static void main(String[] args) { ApplicationContext context = new Clas ...
分类:
编程语言 时间:
2021-01-12 11:12:45
阅读次数:
0
public string GetMD5(string txt) { System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] frmData ...
228. 汇总区间 分类: 数组 简单题,但是边界条件挺细节,特别是c++,还要额外注意int的边界,不然 nums[i] == nums[i-1] + 1会overflow class Solution { public: vector<string> summaryRanges(vector<i ...
分类:
其他好文 时间:
2021-01-12 11:07:54
阅读次数:
0
1.创建包和类 package com.example.HelloWorld; public class HelloWorld 2.运行方法 3.打jar包 File | Project Settings | Artifacts 选择主类 OK | OK 4.build artifacts buil ...
分类:
编程语言 时间:
2021-01-12 11:07:35
阅读次数:
0
继承、重写和 Super class Lady { content = "Hi,帅哥"; sayHello() { return this.content; } } class XiaoJieJie extends Lady { sayHello() { return super.sayHello( ...
分类:
其他好文 时间:
2021-01-12 11:03:38
阅读次数:
0