• 2024-02-13Go 100 mistakes - #8: any says nothing
    WithGo1.18,thepredeclaredtypeanybecameanaliasforanempty interface;hence,alltheinterface{}occurrencescanbereplacedbyany. IffuturedevelopersneedtousetheStore struct,theywillprobablyhavetodigintothedocumentationorre
  • 2023-09-07行为型设计模式-模板方法 Template Method
    简介父类抽象类定义大的处理流程,部分细节做成抽象方法,留给子类去实现。如Java的JUnit中,setUptearDown方法都是留给具体的测试用例来写,Servlet中service处理了一个请求的大部分工作,留下doGet和doPost给业务自定义处理。另外callback一般分两种方式:同步回调、异步回调,其中同步
  • 2023-08-07[ABC141E] Who Says a Pun?
    WhoSaysaPunの传送门看到两个完全相同的子串,考虑dp。设\(f_{i,j}\)为从第\(i\)项和第\(j\)项开始的最长相同子串,则有\(s_i=s_j\)时,\(f_{i,j}=\max({f_{i-1,j-1}+1},f_{i,j})\)。注意,因为两个子串互不重叠,所以\(f_{i-1,j-1}<j-i\)时才可以转移状态。#include
  • 2023-06-07English Learning Articles 2023-06-07 Nonsurgical cat contraception could help curb overpopulation, s
    Nonsurgicalcatcontraceptioncouldhelpcurboverpopulation,studysaysThereareanestimated600milliondomesticcatsintheworld,and80%ofthemareferalorstrayanimals.Spayingandneuteringcatshelpspreventhomelesskittensandovercrowdeda
  • 2023-01-31Stop say I love you
    Areporteraskedanelderlycouple,一位记者访谈一对老夫妻“Howdidyoumanagetostaytogetherfor65years?”你们是如何维护65年的感情?Thewoman’sreplybl
  • 2022-12-16S1 - Lesson 101 - 102
    WordsScotlandTheUnitedKingdomofGreatBritainandNorthernIreland cardbusinesscardcreditcardbankcardidcard youthyoung hostel[招待所,旅
  • 2022-12-11Unlawfully wed 小小新娘 | 经济学人中英双语对照精读笔记
    文/王不留(微信公众号:王不留)Unlawfullywed非法结婚Religiouscourtscontinuetoallowgrownmentomarrygirls.宗教法院继续允许成年男子与女孩结婚。印尼司法机构,设
  • 2022-11-10新大陆 之 MySQLWorkbench 8.0 生成 SQL 语句
    LZ-Says:说不清,道不明,终将SaysGoodBye。前言仿若是昨天,由于原有数据库表中字段无法满足现有需求,让LZ整个“脚本”,实现。脚本?懵逼,什么鬼?哎,一通问,一通鄙视后,明远老哥指