自己动手,更换thinkpad x1硬盘

电脑突然没法用了,提示"A disk read error occurred"的错误。 多次重启也不行,感觉是硬盘挂了。 机器去年过保了,之前有过在售后维护的经历,费用不低,这次决定自己动手。 ...

2022-04-22 · 1 min · 209 words · Liudon

二刷百望山

又是周末,娃约了小伙伴一起爬山。 百望山,二刷走起。 约好了9点半门口见面,早上睁眼8点了,赶紧起床洗漱吃饭。 出门晚了,还打不到车,快10点才到。 小伙伴和人爸爸已经先爬上去了,带着娃一路小跑,20分钟从大门爬到山上。 ...

2022-04-17 · 1 min · 209 words · Liudon

带娃游颐和园

上周的北海之行,本来是想划船的,可惜人太多没有划成,答应娃这周末带她去划船。 周六7点准时起床,得早点去省得人多排队。 8点半吃完饭洗漱完出发,特意带娃坐了一趟双层公交车 —— 二楼第一排观光区。 ...

2022-04-11 · 1 min · 258 words · Liudon

博客架构说明

在拿到liudon.com域名前,手中已有两个域名: liudon.org liudon.xyz liudon.org已经不再更新,仅作归档使用。 liudon.xyz当时是静态博客流行,尝鲜使用。 ...

2022-04-10 · 1 min · 433 words · Liudon

难得的清明假期

前面有写到,被隔离了一周,好在赶在假期开始前解除了隔离。 趁着这次难得的假期,外出放松一下。 爬百望山。 娃是第一次爬山,百望山不高,适合带娃体验爬山,我也从13、14年之后没再爬过山了。 ...

2022-04-06 · 1 min · 343 words · Liudon

十一年的等待,终于拿到了liudon.com域名

在关于部分,有写域名的来历。 当时liudon.com已经被注册,所以只好注册了liudon.org。 2011年注册的liudon.org,最早用wordpress搭建了博客。 ...

2022-04-01 · 2 min · 588 words · Liudon

被隔离的一周

从没有想过疫情会离自己这么近,记录一下。 周一的时候说是有确诊同学来过公司,下午组织全员核酸,做完核酸立马回家。 周二早上全员核酸阴性,继续到公司上班。 ...

2022-04-01 · 1 min · 328 words · Liudon

mysql中字符串和整型自动转换的问题

表结构如下 desc info; +-------+-----------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------------+------+-----+---------+----------------+ | id | int(8) unsigned | NO | PRI | NULL | auto_increment | | name | varchar(20) | YES | | NULL | | +-------+-----------------+------+-----+---------+----------------+ 2 rows in set (0.00 sec) 执行sql. insert into info values ('', 'xxx'); insert into info values ('', 'yyy'); 查询记录. select * from info; +----+------+ | id | name | +----+------+ | 1 | xxx | | 2 | yyy | +----+------+ 2 rows in set (0.00 sec) 执行下面sql. ...

2020-12-14 · 1 min · 303 words · Liudon

一次惊心动魄的Mysql更新操作

问题描述 # 表结构 MySQL > desc user_packages; +----------------+---------------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+---------------------+------+-----+---------------------+----------------+ | up_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment | | start_date | date | NO | | NULL | | | end_date | date | NO | | NULL | | | up_created | datetime | NO | MUL | 0000-00-00 00:00:00 | | | up_updated | datetime | NO | | 0000-00-00 00:00:00 | | +----------------+---------------------+------+-----+---------------------+----------------+ 5 rows in set (0.00 sec) MySQL > select * from user_packages limit 5; +-------+------------+------------+ | up_id | start_date | end_date | +-------+------------+------------+ | 185 | 2018-04-01 | 2018-06-30 | | 186 | 2018-04-01 | 2018-06-30 | | 187 | 2018-04-01 | 2018-06-30 | | 188 | 2018-04-01 | 2018-06-30 | | 189 | 2018-04-01 | 2018-06-30 | +-------+------------+------------+ 5 rows in set (0.00 sec) 操作过程 需要更新某条记录的end_date字段,执行sql如下: ...

2020-05-19 · 2 min · 776 words · Liudon

如何在北京公积金网站上修改婚姻状况

关于取消住房公积金提取业务纸质申请表及部分业务网上办结的公告 时间:2020年01月08日 来源:http://gjj.beijing.gov.cn/web/zwgk/_300583/zxzysx/675803/index.html ...

2020-01-17 · 1 min · 438 words · Liudon

PHP7.2编译安装后没有php.ini文件的问题

下载PHP7.2源码,编译安装。 [root@VM_73_135_centos ~/swoole-src-4.4.12]# php -v PHP 7.2.25 (cli) (built: Nov 26 2019 19:33:23) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies [root@VM_73_135_centos ~/swoole-src-4.4.12]# 安装Swoole。 phpize && \ ./configure && \ make && make install 安装完,准备修改php.ini文件,结果没找到。 ...

2019-11-26 · 1 min · 241 words · Liudon

检测网站支持的SSL/TLS协议版本

Chrome 72及以上版本不支持TLS 1.0和TLS 1.1,访问TLS 1.0或1.1证书的站点会告警,但不阻止用户访问站点。 为了解决Chrome的这个问题,今天升级了下Nginx的TLS协议版本,这里记录一下如何检测支持的协议版本。 ...

2019-11-14 · 1 min · 205 words · Liudon

记一次难忘的手术经历

俗话说的好,十人九痔。这九个人里就有我一个。 😂 去年因为痔疮去过一趟医院,医生当时建议手术。 后来用了点药,没啥症状了,就不放在心上了。 结果前两天公司团建吃了点辣,痔疮又犯了,大便拉不出来,憋的难受。 ...

2019-10-28 · 2 min · 646 words · Liudon

十一假期经历

今年的十一火车票非常难抢,12306的候补订单,一直等到时间截止也没订上票。 只好请了2天假,提前回家了,给自己也放个假休息一下。 回家的几个经历: 家里的老洗衣机光荣退休了,年龄比我都要大,爸妈舍不得换一直用着。 ...

2019-10-08 · 1 min · 306 words · Liudon

Swoft 框架运行分析(五) —— ConsoleProcessor模块分析

这里以Swoft启动http server为例。 php bin/swoft http:start 执行上述命令,启动http server。 在前面第一篇文章的时候,提到了如何启动http服务。 今天我们就来看一下http服务是如何启动的,具体实现就在ConsoleProcess这个模块。 ...

2019-09-26 · 10 min · 4524 words · Liudon

Swoft 框架运行分析(四) —— EventProcessor模块分析

今天我们来看一下EventProcessor的实现。 /** * Handle event register * @return bool */ public function handle(): bool { if (!$this->application->beforeEvent()) { CLog::warning('Stop event processor by beforeEvent return false'); return false; } /** @var EventManager $eventManager */ $eventManager = bean('eventManager'); [$count1, $count2] = ListenerRegister::register($eventManager); CLog::info('Event manager initialized(%d listener, %d subscriber)', $count1, $count2); // Trigger a app init event Swoft::trigger(SwoftEvent::APP_INIT_COMPLETE); return $this->application->afterEvent(); } 获取eventManager的Bean实例,对应为Swoft\Event\Manager\EventManager类。 ...

2019-09-26 · 4 min · 1896 words · Liudon

一个git submodule update引发的问题

背景 1月份的时候,用hugo搭了这套博客系统。 本机写md文件,更新到github,然后通过travis-ci自动发布。 jane主题是通过git submodule引入的,.gitmodules文件内容。 ...

2019-09-06 · 4 min · 1748 words · Liudon

一个Curl的耗时长的问题

发现某个接口请求很慢,但是后端确认接口是很快的。 在机器上通过shell执行curl命令,确实很快,但是PHP代码里请求又确实很慢。 业务里用到了Requests这个库,一开始以为是这个库导致的问题。 ...

2019-09-04 · 2 min · 925 words · Liudon

Swoft 框架运行分析(三) —— BeanProcessor模块分析

今天讲一下BeanProcessor模块,先看一下handle方法实现。 /** * Handle bean * * @return bool * @throws ReflectionException * @throws AnnotationException */ public function handle(): bool { if (!$this->application->beforeBean()) { return false; } $handler = new BeanHandler(); $definitions = $this->getDefinitions(); $parsers = AnnotationRegister::getParsers(); $annotations = AnnotationRegister::getAnnotations(); BeanFactory::addDefinitions($definitions); BeanFactory::addAnnotations($annotations); BeanFactory::addParsers($parsers); BeanFactory::setHandler($handler); BeanFactory::init(); /* @var Config $config*/ $config = BeanFactory::getBean('config'); CLog::info('config path=%s', $config->getPath()); CLog::info('config env=%s', $config->getEnv()); $stats = BeanFactory::getStats(); CLog::info('Bean is initialized(%s)', SwoftHelper::formatStats($stats)); return $this->application->afterBean(); } 先通过getDefinitions方法获取所有的Bean定义。 ...

2019-09-02 · 9 min · 4044 words · Liudon

Swoft 框架运行分析(二) —— AnnotationProcessor模块分析

上一篇介绍了,SwoftApplication里定义了6个Processor对象。 protected function processors(): array { return [ new EnvProcessor($this), new ConfigProcessor($this), new AnnotationProcessor($this), new BeanProcessor($this), new EventProcessor($this), new ConsoleProcessor($this), ]; } 所有的Processor实现都在framework\src\Processor目录下。 ...

2019-08-29 · 4 min · 1656 words · Liudon