已经2年多没更新博客了,2年前这时候我还在准备考研,现在都研二了,时间过得可真快呀,研究生3年也转瞬即逝。最近稍微有点时间,于是在刷Leetcode,昨天遇到了一道题,是字符串匹配问题,我一看就知道用KMP算法,题目如下: 28. Implement strStr() 该题难度为easy,但我感觉K ...
分类:
编程语言 时间:
2020-10-09 20:47:51
阅读次数:
17
主要三步: 1、state方法中混入with AutomaticKeepAliveClientMixin 2、继续在state方法中的build方法中添加super.build(context); 3、继续在state方法中添加 1 @override 2 // TODO: implement wa ...
分类:
其他好文 时间:
2020-09-18 02:17:18
阅读次数:
41
首先来张图 代码打印这些方法在何时执行 class _LifeDemoState extends State<LifeDemo> with WidgetsBindingObserver { @override void initState() { // TODO: implement initSta ...
分类:
其他好文 时间:
2020-09-16 12:10:04
阅读次数:
28
一、动态代理 1、定义接口 public interface CoverProxyInterface { String eat(String str); String sleep(String str); } 2、实现接口 public class CoverProxyClass implement ...
分类:
其他好文 时间:
2020-09-15 21:27:15
阅读次数:
50
这题就是典型的字符串匹配问题。实现方法可谓极多。而且网上教程实在很详尽了。故不多赘述啦。贴我个人码了一遍的代码。。 感兴趣的直接参考下面这些大神的博客哈哈 https://www.zhihu.com/question/21923021 http://www.voidcn.com/article/p- ...
分类:
其他好文 时间:
2020-09-09 18:53:26
阅读次数:
33
Recently I came across this very funny picture and I would like to share with you. This picture shows totally five different approaches to implement “ ...
分类:
其他好文 时间:
2020-09-08 20:39:18
阅读次数:
51
Varnish 已经通过 Hitch 完整的支持 HTTP/2,以下是在 CentOS 8.0 中的实现示例。
分类:
Web程序 时间:
2020-08-27 11:48:40
阅读次数:
69
实现 strStr() 函数。 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。 示例 1: 输入: haystack = "hello", needle = "ll"输 ...
分类:
编程语言 时间:
2020-08-15 22:25:23
阅读次数:
56
This example shows how to implement the HARQ Indicator (HI) and physical HI channel (PHICH). You create the processing chain of coding hybrid indicato ...
分类:
其他好文 时间:
2020-08-13 12:11:36
阅读次数:
61
package newleetcode;/** * leetcode20.strStr匹配字符串 * 给定一个主串和一个匹配字符串 * 在主串中寻找匹配字符串并返回下标 */public class LeetCode28 { //KMP算法 //dp前一个括号代表匹配状态 private int[] ...
分类:
编程语言 时间:
2020-08-01 09:21:06
阅读次数:
94