【输入输出】25周

27周 输入输出
输入 《程序员数学》80%,对于忘掉数学的我,有些反复看了两遍。但是知识难度是高中数学级别。
输出 一篇blog《【无聊】用程序写一道初中数学题888888×333333》,正好用到了《程序员数学》看到的数学归纳法……
https://www.jianshu.com/p/4c29d57fd3f5
算法:鸡尾酒排序(冒泡排序的一种优化)、计数排序的稳定性版、快排双边跟单边(照着《漫画算法》写的,自己笨)、2的幂次方、数字的次方(《剑指offer中》看到了)
收获 工具

  1. phpstorm 撤销修改,原来是git功能
【输入输出】25周
文章图片
image.png
  1. Phpstorm command +e 查看最近修改文件,方便找文件
  1. docker 里面装xdebug调试,挺有意思的。
  1. Phpstorm 插件 sonarlint,检查语法的
  2. phpStorm 两个php代码检查 插件
https://plugins.jetbrains.com/plugin/7622-php-inspections-ea-extended-
https://plugins.jetbrains.com/plugin/10215-php-inspections-ea-ultimate-
  1. Git add 添加错文件,撤销。 git reset HEAD https://www.cnblogs.com/arieslee/p/8288223.html
  2. git 忽略掉文件更改的方式
[--[no-]assume-unchanged] [--[no-]skip-worktree]

【【输入输出】25周】自行了解https://www.zhihu.com/question/25234996
8.chrome书签管理,搜谷歌扩展: papaly
【输入输出】25周
文章图片
image.png
  1. Redis内存分析工具—redis-rdb-tools
https://www.linuxidc.com/Linux/2018-01/150010.htm
  1. jq命令手册 https://stedolan.github.io/jq/manual/
代码
  1. php扩展 msgpack 压缩数据
  2. 框架(公司自己)路由实现,框架启动时,scandir 扫描controller目录,把Action后缀的method扫出来。放到swoole table中,(当然当把路由放到内存里,还有其他操作,比如根据注解的一些功能),注解实现是用reflection 。swoft中的注解也是如此。示例代码:
class p { /** * @uri "uri/show" */ public function show() {} }$p = new p(); $ref = new ReflectionClass('p'); $methods = $ref->getMethods(ReflectionMethod::IS_PUBLIC); foreach ($methods as $method) { var_dump($method->getDocComment()); }

输出如下
string(34) "/** * @uri "uri/show" */"

中的内容,可以用正则提取。
  1. isset里面可以放多个值。isset(b)

    推荐阅读