<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2021-06-14T16:06:51+00:00</updated><id>/feed.xml</id><title type="html">HannibalKcc</title><subtitle>Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.</subtitle><entry><title type="html">Welcome To Jekyll</title><link href="/2021/06/14/welcome-to-jekyll.html" rel="alternate" type="text/html" title="Welcome To Jekyll" /><published>2021-06-14T00:00:00+00:00</published><updated>2021-06-14T00:00:00+00:00</updated><id>/2021/06/14/welcome-to-jekyll</id><content type="html" xml:base="/2021/06/14/welcome-to-jekyll.html">&lt;p&gt;You’ll find this post in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;, which launches a web server and auto-regenerates your site when a file is updated.&lt;/p&gt;

&lt;p&gt;Jekyll requires blog post files to be named according to the following format:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;YEAR-MONTH-DAY-title.MARKUP&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;YEAR&lt;/code&gt; is a four-digit number, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MONTH&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;DAY&lt;/code&gt; are both two-digit numbers, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MARKUP&lt;/code&gt; is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works.&lt;/p&gt;

&lt;p&gt;Jekyll also offers powerful support for code snippets:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hi, &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Tom'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#=&amp;gt; prints 'Hi, Tom' to STDOUT.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Check out the &lt;a href=&quot;https://jekyllrb.com/docs/home&quot;&gt;Jekyll docs&lt;/a&gt; for more info on how to get the most out of Jekyll. File all bugs/feature requests at &lt;a href=&quot;https://github.com/jekyll/jekyll&quot;&gt;Jekyll’s GitHub repo&lt;/a&gt;. If you have questions, you can ask them on &lt;a href=&quot;https://talk.jekyllrb.com/&quot;&gt;Jekyll Talk&lt;/a&gt;.&lt;/p&gt;</content><author><name></name></author><summary type="html">You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.</summary></entry><entry><title type="html">笔记</title><link href="/2020/04/01/%E7%AC%94%E8%AE%B0.html" rel="alternate" type="text/html" title="笔记" /><published>2020-04-01T00:00:00+00:00</published><updated>2020-04-01T00:00:00+00:00</updated><id>/2020/04/01/%E7%AC%94%E8%AE%B0</id><content type="html" xml:base="/2020/04/01/%E7%AC%94%E8%AE%B0.html">&lt;ol&gt;
  &lt;li&gt;在开发环境想要配合微信开发者工具进行微信授权、支付等操作，必须重新设置一个 appId 定向到本地地址——127.0.0.1:8080 &lt;a href=&quot;https://www.jianshu.com/p/9ced1a297c95&quot;&gt;参考网址&lt;/a&gt; 其次必须修改接口 getWechatConfig 允许前端自定义一个 appId 并根据其值生成一套新的对象用于前端初始化 wx sdk&lt;/li&gt;
  &lt;li&gt;测试&lt;/li&gt;
  &lt;li&gt;测试&lt;/li&gt;
&lt;/ol&gt;</content><author><name></name></author><summary type="html">在开发环境想要配合微信开发者工具进行微信授权、支付等操作，必须重新设置一个 appId 定向到本地地址——127.0.0.1:8080 参考网址 其次必须修改接口 getWechatConfig 允许前端自定义一个 appId 并根据其值生成一套新的对象用于前端初始化 wx sdk 测试 测试</summary></entry><entry><title type="html">笔记</title><link href="/2020/03/01/%E7%AC%94%E8%AE%B0.html" rel="alternate" type="text/html" title="笔记" /><published>2020-03-01T00:00:00+00:00</published><updated>2020-03-01T00:00:00+00:00</updated><id>/2020/03/01/%E7%AC%94%E8%AE%B0</id><content type="html" xml:base="/2020/03/01/%E7%AC%94%E8%AE%B0.html">&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git reflog&lt;/code&gt; 是 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git log&lt;/code&gt; 加上部分参数的缩写，所以它也可以使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--grep&lt;/code&gt; 参数&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href=&quot;https://blog.csdn.net/icbm/article/details/73381346&quot;&gt;参考&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;npm ls -g depth=2&lt;/code&gt; 其中 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;depth&lt;/code&gt; 可以设置遍历最大深度&lt;/li&gt;
&lt;/ol&gt;</content><author><name></name></author><summary type="html">git reflog 是 git log 加上部分参数的缩写，所以它也可以使用 --grep 参数</summary></entry><entry><title type="html">笔记</title><link href="/2020/02/01/%E7%AC%94%E8%AE%B0.html" rel="alternate" type="text/html" title="笔记" /><published>2020-02-01T00:00:00+00:00</published><updated>2020-02-01T00:00:00+00:00</updated><id>/2020/02/01/%E7%AC%94%E8%AE%B0</id><content type="html" xml:base="/2020/02/01/%E7%AC%94%E8%AE%B0.html">&lt;ol&gt;
  &lt;li&gt;为什么 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vuex&lt;/code&gt; 在 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;action&lt;/code&gt; 中不建议直接修改 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;state&lt;/code&gt; ? &lt;a href=&quot;https://www.zhihu.com/question/48759748/answer/112823337&quot;&gt;参考&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vuex&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;redux&lt;/code&gt; 在设计时都参考了 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flux&lt;/code&gt; ，而后者是函数式编程的概念，相同的输入+操作必须返回相同的结果。
基于此异步任务是不可控的，所以异步任务不应该直接修改 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;state&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;npm list -g --depth 0&lt;/code&gt; 查看全局安装依赖&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;文件夹参考 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\Users\xxx\AppData\Roaming\npm\node_modules&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vue-cli4&lt;/code&gt; 的指令 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vue&lt;/code&gt; 在 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;powershell&lt;/code&gt; 运行发生错误，如下
```
vue : 无法加载文件 C:\Users\XXX\AppData\Roaming\npm\vue.ps1，因为在此系统上禁止运行脚本。有关详细信息，请参阅 https:/
go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;vue&lt;/li&gt;
      &lt;li&gt;~~~&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
      &lt;li&gt;CategoryInfo          : SecurityError: (:) []，PSSecurityException&lt;/li&gt;
      &lt;li&gt;FullyQualifiedErrorId : UnauthorizedAccess
```
&lt;a href=&quot;https://github.com/vuejs/vue-cli/issues/3424#issuecomment-465143737&quot;&gt;参考&lt;/a&gt; 通过 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vue.cmd&lt;/code&gt; 运行指令；&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;或者在 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;powershell&lt;/code&gt; 输入 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser&lt;/code&gt; 修改策略 &lt;a href=&quot;https://docs.microsoft.com/zh-cn/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7&quot;&gt;策略修改&lt;/a&gt; 具体参考 github 那个链接最底部指令&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dart&lt;/code&gt; 语言中的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/&lt;/code&gt; 为整除
    &lt;div class=&quot;language-dart highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 结果是：2.142857...&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;~/&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 结果是：2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;windows&lt;/code&gt; 预览 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;svg&lt;/code&gt; &lt;a href=&quot;https://www.zhihu.com/question/50727261&quot;&gt;参考&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</content><author><name></name></author><summary type="html">为什么 vuex 在 action 中不建议直接修改 state ? 参考</summary></entry><entry><title type="html">笔记</title><link href="/2019/12/01/%E7%AC%94%E8%AE%B0.html" rel="alternate" type="text/html" title="笔记" /><published>2019-12-01T00:00:00+00:00</published><updated>2019-12-01T00:00:00+00:00</updated><id>/2019/12/01/%E7%AC%94%E8%AE%B0</id><content type="html" xml:base="/2019/12/01/%E7%AC%94%E8%AE%B0.html">&lt;ol&gt;
  &lt;li&gt;IDE &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AS&lt;/code&gt; 有一个快捷键————默认 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ctrl+h type Hierarchy&lt;/code&gt; 可以清晰地看到一个类的继承关系。（在类的声明处使用，而不是调用处使用）&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flutter&lt;/code&gt; 中，想要使得 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Text&lt;/code&gt; 组件可以超出自动换行可以设置父组件 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Expanded&lt;/code&gt; ,若不想横向扩展宽度，可以使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Flexible&lt;/code&gt;，即使其属性是 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flex: 0&lt;/code&gt; 也是阔以的！。&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;process explorer&lt;/code&gt; 让你知道是哪个杀千刀的程序阻止你删除一个文件or文件夹 &lt;a href=&quot;https://superuser.com/questions/1333118/cant-delete-empty-folder-because-it-is-used&quot;&gt;链接&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;关于 flutter 中 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;with&lt;/code&gt; 是否允许内部属性同名的研究
```
void main() {
  var res = new Res();
  res.toFoo();
}&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;class A {
  toFoo() {
    print(‘foo a!’);
  }
}&lt;/p&gt;

&lt;p&gt;class B {
  toFoo() {
    print(‘foo b!’);
  }
}&lt;/p&gt;

&lt;p&gt;// A B 的顺序会影响 res.toFoo() 的结果
// 表明了 with 是允许同名函数的，优先级逻辑为后来居上
class Res with  A,B {}
```&lt;/p&gt;</content><author><name></name></author><summary type="html">IDE AS 有一个快捷键————默认 ctrl+h type Hierarchy 可以清晰地看到一个类的继承关系。（在类的声明处使用，而不是调用处使用） flutter 中，想要使得 Text 组件可以超出自动换行可以设置父组件 Expanded ,若不想横向扩展宽度，可以使用 Flexible，即使其属性是 flex: 0 也是阔以的！。 process explorer 让你知道是哪个杀千刀的程序阻止你删除一个文件or文件夹 链接 关于 flutter 中 with 是否允许内部属性同名的研究 ``` void main() { var res = new Res(); res.toFoo(); }</summary></entry><entry><title type="html">笔记</title><link href="/2019/11/01/%E7%AC%94%E8%AE%B0.html" rel="alternate" type="text/html" title="笔记" /><published>2019-11-01T00:00:00+00:00</published><updated>2019-11-01T00:00:00+00:00</updated><id>/2019/11/01/%E7%AC%94%E8%AE%B0</id><content type="html" xml:base="/2019/11/01/%E7%AC%94%E8%AE%B0.html">&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.cnblogs.com/ghost-xyx/p/5677168.html&quot;&gt;高斯模糊，背景模糊参考&lt;/a&gt; 
&lt;a href=&quot;http://www.zhangxinxu.com/study/201502/image-local-blur-by-js-calculation.html&quot;&gt;参考2&lt;/a&gt; 
&lt;a href=&quot;https://codesandbox.io/s/gaosimohuyanjiu-x13qj&quot;&gt;自己的实践代码&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;正则表达式， &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$1 &lt;/code&gt; 与 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;不包含某连续字符串&lt;/code&gt; 的实践
```
  ‘rgb(144, 144, 144)’.replace(/rgb(([\d]+), ([\d]+), ([\d]+))/, ‘$1 $2 $3’)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;‘&amp;lt;123&amp;gt;’.replace(/&amp;lt;([((?!br).)]+)&amp;gt;/, ‘&amp;lt; $1 &amp;gt;’)&lt;/p&gt;

&lt;p&gt;‘gainover123’.replace(/gai([\w]+?)over([\d]+)/, ‘$1 $2’)&lt;/p&gt;

&lt;p&gt;rawHtml.replace(/&amp;lt;(((?!br).)*)&amp;gt;/, ‘&amp;lt; $1 &amp;gt;’); // 无效化除了 &lt;br /&gt; 以外的标签&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;3. `dart` 中使用 `.runtimeType` 判断类型
4. `dart` 中使用 `??` 是不能用在 `if()` 语句中的，请使用语句
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;var tmp;
 if(tmp?.a?.a ?? false) return ‘’; // null 时返回 false&lt;/p&gt;

&lt;p&gt;if(tmp?.a?.a ?? true) return ‘’; // null 时返回 true
```&lt;/p&gt;</content><author><name></name></author><summary type="html">高斯模糊，背景模糊参考 参考2 自己的实践代码 正则表达式， $1 与 不包含某连续字符串 的实践 ``` ‘rgb(144, 144, 144)’.replace(/rgb(([\d]+), ([\d]+), ([\d]+))/, ‘$1 $2 $3’) ‘&amp;lt;123&amp;gt;’.replace(/&amp;lt;([((?!br).)]+)&amp;gt;/, ‘&amp;lt; $1 &amp;gt;’)</summary></entry><entry><title type="html">笔记</title><link href="/2019/10/01/%E7%AC%94%E8%AE%B0.html" rel="alternate" type="text/html" title="笔记" /><published>2019-10-01T00:00:00+00:00</published><updated>2019-10-01T00:00:00+00:00</updated><id>/2019/10/01/%E7%AC%94%E8%AE%B0</id><content type="html" xml:base="/2019/10/01/%E7%AC%94%E8%AE%B0.html">&lt;ol&gt;
  &lt;li&gt;找到在 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;index.html&lt;/code&gt; 中对 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ico&lt;/code&gt; 设置无效问题的原因了——使用了 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pwa&lt;/code&gt; 插件，会覆盖 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ico&lt;/code&gt; 配置。在 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vue.config.js&lt;/code&gt; 中设置 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pwa&lt;/code&gt; 对应的配置即可解决。&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;safari&lt;/code&gt; 浏览器对于部分 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ISO时间格式&lt;/code&gt; 的解析错误，目前使用时间戳是比较稳的方法。&lt;/li&gt;
  &lt;li&gt;疑问： &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;element-ui&lt;/code&gt; 中的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;table&lt;/code&gt; 加入 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;border&lt;/code&gt; 属性后，可以设置表头宽度，探索实现原理时，发现一个 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;style arrtribute {}&lt;/code&gt; 选择器，是通过原生方法 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setArrtribute()&lt;/code&gt; 实现的吗？ 如果是，为什么在审查模式 dom 节点上下不能看到它？&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;webstorm&lt;/code&gt; 当设置 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;line comment at first column&lt;/code&gt; 可能无效的时候，关闭 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;EditorConfig&lt;/code&gt; , IDE 可能会在界面上提示你冲突了， 点击 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;disable&lt;/code&gt; 后，重启 IDE 即以设置为准&lt;/li&gt;
  &lt;li&gt;与 php 对接使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;formData&lt;/code&gt; 时，如果是数组类型，需要考虑在 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;key&lt;/code&gt; 后面补上 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[]&lt;/code&gt;，比如
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  formData.append('files[]', files[0], 'file.jpg')
  formData.append('files[]', files[1], 'file.jpg')
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;知乎广告类名黑名单 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.Banner-image .Pc-feedAd-container&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;flutter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GridView(), FractionallySizedBox()&lt;/code&gt; 一个栅格组件，一个百分比组件&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flutter install&lt;/code&gt; 在连接设备是安卓的情况下,使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build\app\outputs\apk\app.apk&lt;/code&gt; 文件安装&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;await&lt;/code&gt; 处理 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Promise&lt;/code&gt; 函数，只有可能得到 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Promise Resolve&lt;/code&gt; 状态的值，如果 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Promise&lt;/code&gt; 函数变为 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Reject&lt;/code&gt; 状态，则会被上级函数的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;catch&lt;/code&gt; 方法捕获
```
async function f() {
  await Promise.reject(‘出错了’);
  console.log(‘执行不到这儿啦’);
}&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;f()
  .then(v =&amp;gt; console.log(v))
  .catch(e =&amp;gt; console.log(e))
// 出错了&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;10. 在 `vue` 中，一个组件使用 `$emit` 实际上是给谁了呢？是传递给父组件了吗？会继续向上传递吗？
实际上是给了自己本身；并且 `vnode` 的时间也不会向上传递； `$emit` 触发后，会触发组件自身上的 `vnode.componentOptions.listeners` , 这个属性可以直接设置，也可以 `$on(eventName, eventHandler)` 设置，更可以在 `tmp` 上对组件写入属性 `@eventName=&quot;eventHandler&quot;` 设置。
11. `flutter` 中的 `debug` 模式， `dart` 使用了 `JIT(just in time)`,而 `realease` 模式使用了 `AOT(ahead of time)` [参考](https://book.flutterchina.club/chapter1/flutter_intro.html)
12. `git` 操作出现 `refusing to merge unrelated histories` ，本质上是因为远程端与本地端是2个完全独立的历史。通过指令 `git pull origin master --allow-unrelated-histories` 可以允许合并无关的两个历史。
13. 在 `vue` 中可以直接监听生命周期回调，如下
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;// $on
this.$once(‘hook:beforeDestroy’, () =&amp;gt; {
  clearInterval(timer);
});
```&lt;/p&gt;</content><author><name></name></author><summary type="html">找到在 index.html 中对 ico 设置无效问题的原因了——使用了 pwa 插件，会覆盖 ico 配置。在 vue.config.js 中设置 pwa 对应的配置即可解决。 safari 浏览器对于部分 ISO时间格式 的解析错误，目前使用时间戳是比较稳的方法。 疑问： element-ui 中的 table 加入 border 属性后，可以设置表头宽度，探索实现原理时，发现一个 style arrtribute {} 选择器，是通过原生方法 setArrtribute() 实现的吗？ 如果是，为什么在审查模式 dom 节点上下不能看到它？ webstorm 当设置 line comment at first column 可能无效的时候，关闭 EditorConfig , IDE 可能会在界面上提示你冲突了， 点击 disable 后，重启 IDE 即以设置为准 与 php 对接使用 formData 时，如果是数组类型，需要考虑在 key 后面补上 []，比如 formData.append('files[]', files[0], 'file.jpg') formData.append('files[]', files[1], 'file.jpg') 知乎广告类名黑名单 .Banner-image .Pc-feedAd-container flutter GridView(), FractionallySizedBox() 一个栅格组件，一个百分比组件 flutter install 在连接设备是安卓的情况下,使用 build\app\outputs\apk\app.apk 文件安装 await 处理 Promise 函数，只有可能得到 Promise Resolve 状态的值，如果 Promise 函数变为 Reject 状态，则会被上级函数的 catch 方法捕获 ``` async function f() { await Promise.reject(‘出错了’); console.log(‘执行不到这儿啦’); }</summary></entry><entry><title type="html">笔记</title><link href="/2019/08/01/%E7%AC%94%E8%AE%B0.html" rel="alternate" type="text/html" title="笔记" /><published>2019-08-01T00:00:00+00:00</published><updated>2019-08-01T00:00:00+00:00</updated><id>/2019/08/01/%E7%AC%94%E8%AE%B0</id><content type="html" xml:base="/2019/08/01/%E7%AC%94%E8%AE%B0.html">&lt;ol&gt;
  &lt;li&gt;某个 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flutter&lt;/code&gt; 版本后，支持命名路由传递参数了
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Navigator.pushNamed(
  context,
  '/weather',
  arguments: &amp;lt;String, String&amp;gt; {
 'city': 'Berlin',
 'country': 'Germany',
  },
);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;js滚动穿透问题，找了一些方法，理想的不多。
&lt;a href=&quot;https://juejin.im/post/5ca4816e5188250b251e34e9#heading-4&quot;&gt;参考&lt;/a&gt;
禁用 touchmove 根据情况判断是否使用 event.preventDefault()
或者使用库 &lt;a href=&quot;https://github.com/tuateam/tua-body-scroll-lock&quot;&gt;tua-body-scroll-lock&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</content><author><name></name></author><summary type="html">某个 flutter 版本后，支持命名路由传递参数了 Navigator.pushNamed( context, '/weather', arguments: &amp;lt;String, String&amp;gt; { 'city': 'Berlin', 'country': 'Germany', }, );</summary></entry><entry><title type="html">笔记</title><link href="/2019/07/01/%E7%AC%94%E8%AE%B0.html" rel="alternate" type="text/html" title="笔记" /><published>2019-07-01T00:00:00+00:00</published><updated>2019-07-01T00:00:00+00:00</updated><id>/2019/07/01/%E7%AC%94%E8%AE%B0</id><content type="html" xml:base="/2019/07/01/%E7%AC%94%E8%AE%B0.html">&lt;ol&gt;
  &lt;li&gt;在dart语言中，字符串前面可以加上 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;r&lt;/code&gt; 。根据 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;regexp.dart&lt;/code&gt; 文件中的源码
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; * RegExp exp = new RegExp(r&quot;(\w+)&quot;);
 * String str = &quot;Parse my string&quot;;
 * Iterable&amp;lt;Match&amp;gt; matches = exp.allMatches(str);
 *
 * Note the use of a _raw string_ (a string prefixed with `r`)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;我们可以得知加入 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;r&lt;/code&gt; 可以让字符串作为 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;原始字符串&lt;/code&gt;，参考&lt;a href=&quot;https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/raw&quot;&gt;js 原始字符串&lt;/a&gt;
例子&lt;/p&gt;
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  'abc'.replaceFirst(new RegExp('\w+'), '1') // 'abc'
  'abc'.replaceFirst(new RegExp(r'\w+'), '1') // '1'
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;通过使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;const bool.fromEnvironment(&quot;dart.vm.product&quot;)&lt;/code&gt; 判断当前的开发环境&lt;/li&gt;
  &lt;li&gt;关键字 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;factory&lt;/code&gt; 可以声明 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;工厂构造函数&lt;/code&gt; ， 赋予了构造函数函数体，让其可以选择返回的内容。利用这点，我们可以实现 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;单例模式&lt;/code&gt; 、 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;缓存实例&lt;/code&gt;
```
void main() {
  var a = Logger(‘ggg’);
  var b = Logger(‘ggg’);
  var c = Logger(‘ccc’);
  a.mute = true;
  print(a.mute);
  print(b.mute);
  print(c.mute);
}&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;class Logger {
   final String name;
   bool mute = false;&lt;/p&gt;

&lt;p&gt;// _cache 是一个私有库,幸好名字前有个 _ 。 
   static final Map&amp;lt;String, Logger&amp;gt; _cache = &amp;lt;String, Logger&amp;gt;{};&lt;/p&gt;

&lt;p&gt;factory Logger(String name) {
       if (_cache.containsKey(name)) {
          return _cache[name];
       } else {
          final logger = new Logger._internal(name);
          _cache[name] = logger;
          return logger;
       }
    }&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Logger._internal(this.name);

void log(String msg) {
   if (!mute) {
      print(msg);
   }
} } ```
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ol&gt;
  &lt;li&gt;flutter 开发时，使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dart DevTools&lt;/code&gt; 中的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;debugger&lt;/code&gt; 可以直接 debug , 体验比 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AS&lt;/code&gt; 的 debug 模式好很多&lt;/li&gt;
  &lt;li&gt;flutter 开发时，如果不是很清楚自己所处的位置，可以参考 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Flutter outline&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;</content><author><name></name></author><summary type="html">在dart语言中，字符串前面可以加上 r 。根据 regexp.dart 文件中的源码 * RegExp exp = new RegExp(r&quot;(\w+)&quot;); * String str = &quot;Parse my string&quot;; * Iterable&amp;lt;Match&amp;gt; matches = exp.allMatches(str); * * Note the use of a _raw string_ (a string prefixed with `r`) 我们可以得知加入 r 可以让字符串作为 原始字符串，参考js 原始字符串 例子 'abc'.replaceFirst(new RegExp('\w+'), '1') // 'abc' 'abc'.replaceFirst(new RegExp(r'\w+'), '1') // '1'</summary></entry><entry><title type="html">笔记</title><link href="/2019/06/01/%E7%AC%94%E8%AE%B0.html" rel="alternate" type="text/html" title="笔记" /><published>2019-06-01T00:00:00+00:00</published><updated>2019-06-01T00:00:00+00:00</updated><id>/2019/06/01/%E7%AC%94%E8%AE%B0</id><content type="html" xml:base="/2019/06/01/%E7%AC%94%E8%AE%B0.html">&lt;ol&gt;
  &lt;li&gt;flutter 提供了 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;WidgetsBindingObserver&lt;/code&gt; 给开发者来监听 AppLifecycleState&lt;/li&gt;
&lt;/ol&gt;</content><author><name></name></author><summary type="html">flutter 提供了 WidgetsBindingObserver 给开发者来监听 AppLifecycleState</summary></entry></feed>