一、继承Thread类 重写run()方法 二、实现Runnable接口 实现run()方法 不能返回值、不能抛出异常 三、实现Callable接口 重写call()方法 返回值 抛异常 第三种方式需要借助FutureTask来使用:new Thread(new FutureTask(new MyC ...
                            
                            
                                分类:
编程语言   时间:
2021-07-26 16:48:30   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    JAVA DP 反向: public final int maximalSquare(char[][] matrix) { int xLen = matrix.length, yLen = matrix[0].length, re = 0; int[][] cache = new int[xLen] ...
                            
                            
                                分类:
其他好文   时间:
2021-07-23 17:42:02   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    // 复制文本内容 copy(data) { let url = data; // #ifdef APP-PLUS uni.setClipboardData({ data:url, success() { uni.showToast({ title: '复制成功', icon: 'none', du ...
                            
                            
                                分类:
移动开发   时间:
2021-07-22 17:32:52   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    如果有卸载官方自带的安装包 rpm -qa | grep -i mysql rpm -qa | grep -i mariadb rpm -e xxxx #注:如上命令删除不成功,有别的软件依赖无法删除时,如下操作: yum remove xxxx 或 rpm -e --nodeps xxxx ``` ...
                            
                            
                                分类:
数据库   时间:
2021-07-20 16:25:40   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    基于elasticSearch实现自动补全 为什么要用es来实现? 因为能共用一个搜索服务,并且稳定,能利用已有的分词器。 有多少种实现方法?本文用的是哪一种? https://www.elastic.co/guide/en/elasticsearch/reference/current/searc ...
                            
                            
                                分类:
其他好文   时间:
2021-07-19 16:56:46   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    String对象的不可变性 在实现代码中,String类被final关键字修饰了。变量char数组也被final修饰了。 类被final修饰代表该类不可被继承,char[]被final+private修饰,代表String对象不可被修改。Java实现的这个特性叫做String对象的不可变性,即Str ...
                            
                            
                                分类:
其他好文   时间:
2021-07-19 16:51:57   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    目前为止的问题的总结 new Button(); 与 Button button = new Button(); 有什么区别 如下的监听事件,frame.addWindowListener(new WindowAdapter()) 中的 new WindowAdapter()具体是什么意思,有什么特 ...
                            
                            
                                分类:
其他好文   时间:
2021-07-19 16:43:28   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    一、什么是泛型? 泛型是一种未知的数据类型,当我们不知道要使用什么数据类型的时候,可以使用泛型。 泛型也可以看成是一个变量,用来接收数据类型 E e:Element 元素 T t:type 类型 如: 1 public class ArrayList<E>{ 2 public boolean add ...
                            
                            
                                分类:
编程语言   时间:
2021-07-19 16:42:15   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    用malloc和free;类似与C++的new和delete 代码: #include <iostream> #include <string> using namespace std; int main(int argc, char* argv[]) { void* ptr = (void*)ma ...
                            
                            
                                分类:
编程语言   时间:
2021-07-15 18:57:44   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    案例一、 public static void Main() { // Create the token source. CancellationTokenSource cts = new CancellationTokenSource(); // Pass the token to the can ...
                            
                            
                                分类:
编程语言   时间:
2021-07-14 18:50:15   
                                阅读次数:
0