├── .gitignore
├── README.md
├── assets
├── 06
│ └── 1
├── binary
│ ├── binaryTree.js
│ └── index.html
├── mv*.png
└── qrcode.jpg
├── build
├── index.js
├── package-lock.json
├── package.json
└── run.js
└── docs
├── 杂记-01.xcode模拟器管理.md
├── 杂记-02.HTML5的Video标签的属性,方法和事件汇总.md
├── 杂记-03.判断页面ready.md
├── 杂记-04-1.数据结构之数组.md
├── 杂记-04.数据结构.md
├── 杂记-05.代码抽象三原则.md
├── 杂记-06.flutter配置国内镜像.md
├── 杂记-07.页面解析渲染.md
├── 杂记-08.ssh免密登陆.md
├── 杂记-09.mqtt入门使用.md
├── 杂记-10.mv*介绍.md
├── 杂记-11.JS实现继承的几种方式.md
├── 杂记-12.BFC是什么?.md
├── 杂记-13.js中new一个对象的过程.md
├── 杂记-14.手写Promise.md
├── 杂记-15.css基础.md
├── 杂记-16.cookie安全.md
├── 杂记-17.JavaScript中的执行上下文和执行栈.md
├── 杂记-18.获取运行环境.md
├── 杂记-19.面试问题总结.md
├── 杂记-20.http状态码含义.md
├── 杂记-21.meta-viewport原理.md
├── 杂记-22.域名发散与收敛.md
├── 杂记-23.floath和inline-block的区别.md
├── 杂记-24.前端跨域解决.md
├── 杂记-25.web缓存.md
├── 杂记-26.css优化与盒子模型.md
├── 杂记-27.WebAssembly给前端带来了什么.md
├── 杂记-28.Vue.nextTick实现.md
├── 杂记-29.从输入url到页面加载完成发生了什么?.md
├── 杂记-30.webworker使用.md
├── 杂记-31.css指定打印时只显示指定区域.md
├── 杂记-32.一个好用的图片占位图地址.md
├── 杂记-33.flutter笔记.md
├── 杂记-35.测试构建.md
├── 杂记-44.一个等待动画.md
├── 杂记-45.Golang 在 Mac、Linux、Windows 下如何交叉编译.md
├── 杂记-46.node日志监控.md
├── 杂记-47.怎么写出美观的js代码.md
├── 杂记-48.定时任务配置.md
└── 杂记-49.cache-control.md
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 前端点滴
2 | > 记录学习中遇到的问题,记录成长
3 | ---
4 | #### 杂记-48 - [定时任务配置](./docs/%E6%9D%82%E8%AE%B0-48.%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1%E9%85%8D%E7%BD%AE.md)
5 | 简介:设置定时任务为每天凌晨2点执行和每小时执行一次?
6 | 作者:hazer、时间:2019-6-28
7 | ***
8 | #### 杂记-47 - [怎么写出美观的js代码](./docs/%E6%9D%82%E8%AE%B0-47.%E6%80%8E%E4%B9%88%E5%86%99%E5%87%BA%E7%BE%8E%E8%A7%82%E7%9A%84js%E4%BB%A3%E7%A0%81.md)
9 | ***
10 | #### 杂记-46 - [node日志监控](./docs/%E6%9D%82%E8%AE%B0-46.node%E6%97%A5%E5%BF%97%E7%9B%91%E6%8E%A7.md)
11 | ***
12 | #### 杂记-45 - [Golang 在 Mac、Linux、Windows 下如何交叉编译](./docs/%E6%9D%82%E8%AE%B0-45.Golang%20%E5%9C%A8%20Mac%E3%80%81Linux%E3%80%81Windows%20%E4%B8%8B%E5%A6%82%E4%BD%95%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91.md)
13 | ***
14 | #### 杂记-44 - [一个等待动画](./docs/%E6%9D%82%E8%AE%B0-44.%E4%B8%80%E4%B8%AA%E7%AD%89%E5%BE%85%E5%8A%A8%E7%94%BB.md)
15 | ***
16 | #### 杂记-35 - [测试构建](./docs/%E6%9D%82%E8%AE%B0-35.%E6%B5%8B%E8%AF%95%E6%9E%84%E5%BB%BA.md)
17 | 简介:github readme自动生成工具
18 | 作者:hazer 、时间:2019-6-27
19 | ***
20 | #### 杂记-33 - [flutter笔记](./docs/%E6%9D%82%E8%AE%B0-33.flutter%E7%AC%94%E8%AE%B0.md)
21 | ***
22 | #### 杂记-32 - [一个好用的图片占位图地址](./docs/%E6%9D%82%E8%AE%B0-32.%E4%B8%80%E4%B8%AA%E5%A5%BD%E7%94%A8%E7%9A%84%E5%9B%BE%E7%89%87%E5%8D%A0%E4%BD%8D%E5%9B%BE%E5%9C%B0%E5%9D%80.md)
23 | ***
24 | #### 杂记-31 - [css指定打印时只显示指定区域](./docs/%E6%9D%82%E8%AE%B0-31.css%E6%8C%87%E5%AE%9A%E6%89%93%E5%8D%B0%E6%97%B6%E5%8F%AA%E6%98%BE%E7%A4%BA%E6%8C%87%E5%AE%9A%E5%8C%BA%E5%9F%9F.md)
25 | ***
26 | #### 杂记-30 - [webworker使用](./docs/%E6%9D%82%E8%AE%B0-30.webworker%E4%BD%BF%E7%94%A8.md)
27 | ***
28 | #### 杂记-29 - [从输入url到页面加载完成发生了什么?](./docs/%E6%9D%82%E8%AE%B0-29.%E4%BB%8E%E8%BE%93%E5%85%A5url%E5%88%B0%E9%A1%B5%E9%9D%A2%E5%8A%A0%E8%BD%BD%E5%AE%8C%E6%88%90%E5%8F%91%E7%94%9F%E4%BA%86%E4%BB%80%E4%B9%88%EF%BC%9F.md)
29 | ***
30 | #### 杂记-28 - [Vue](./docs/%E6%9D%82%E8%AE%B0-28.Vue.nextTick%E5%AE%9E%E7%8E%B0.md)
31 | ***
32 | #### 杂记-27 - [WebAssembly给前端带来了什么](./docs/%E6%9D%82%E8%AE%B0-27.WebAssembly%E7%BB%99%E5%89%8D%E7%AB%AF%E5%B8%A6%E6%9D%A5%E4%BA%86%E4%BB%80%E4%B9%88.md)
33 | ***
34 | #### 杂记-26 - [css优化与盒子模型](./docs/%E6%9D%82%E8%AE%B0-26.css%E4%BC%98%E5%8C%96%E4%B8%8E%E7%9B%92%E5%AD%90%E6%A8%A1%E5%9E%8B.md)
35 | ***
36 | #### 杂记-25 - [web缓存](./docs/%E6%9D%82%E8%AE%B0-25.web%E7%BC%93%E5%AD%98.md)
37 | ***
38 | #### 杂记-24 - [前端跨域解决](./docs/%E6%9D%82%E8%AE%B0-24.%E5%89%8D%E7%AB%AF%E8%B7%A8%E5%9F%9F%E8%A7%A3%E5%86%B3.md)
39 | ***
40 | #### 杂记-23 - [floath和inline-block的区别](./docs/%E6%9D%82%E8%AE%B0-23.floath%E5%92%8Cinline-block%E7%9A%84%E5%8C%BA%E5%88%AB.md)
41 | ***
42 | #### 杂记-22 - [域名发散与收敛](./docs/%E6%9D%82%E8%AE%B0-22.%E5%9F%9F%E5%90%8D%E5%8F%91%E6%95%A3%E4%B8%8E%E6%94%B6%E6%95%9B.md)
43 | ***
44 | #### 杂记-21 - [meta-viewport原理](./docs/%E6%9D%82%E8%AE%B0-21.meta-viewport%E5%8E%9F%E7%90%86.md)
45 | ***
46 | #### 杂记-20 - [http状态码含义](./docs/%E6%9D%82%E8%AE%B0-20.http%E7%8A%B6%E6%80%81%E7%A0%81%E5%90%AB%E4%B9%89.md)
47 | ***
48 | #### 杂记-19 - [面试问题总结](./docs/%E6%9D%82%E8%AE%B0-19.%E9%9D%A2%E8%AF%95%E9%97%AE%E9%A2%98%E6%80%BB%E7%BB%93.md)
49 | ***
50 | #### 杂记-18 - [获取运行环境](./docs/%E6%9D%82%E8%AE%B0-18.%E8%8E%B7%E5%8F%96%E8%BF%90%E8%A1%8C%E7%8E%AF%E5%A2%83.md)
51 | ***
52 | #### 杂记-17 - [JavaScript中的执行上下文和执行栈](./docs/%E6%9D%82%E8%AE%B0-17.JavaScript%E4%B8%AD%E7%9A%84%E6%89%A7%E8%A1%8C%E4%B8%8A%E4%B8%8B%E6%96%87%E5%92%8C%E6%89%A7%E8%A1%8C%E6%A0%88.md)
53 | ***
54 | #### 杂记-16 - [cookie安全](./docs/%E6%9D%82%E8%AE%B0-16.cookie%E5%AE%89%E5%85%A8.md)
55 | ***
56 | #### 杂记-15 - [css基础](./docs/%E6%9D%82%E8%AE%B0-15.css%E5%9F%BA%E7%A1%80.md)
57 | ***
58 | #### 杂记-14 - [手写Promise](./docs/%E6%9D%82%E8%AE%B0-14.%E6%89%8B%E5%86%99Promise.md)
59 | ***
60 | #### 杂记-13 - [js中new一个对象的过程](./docs/%E6%9D%82%E8%AE%B0-13.js%E4%B8%ADnew%E4%B8%80%E4%B8%AA%E5%AF%B9%E8%B1%A1%E7%9A%84%E8%BF%87%E7%A8%8B.md)
61 | ***
62 | #### 杂记-12 - [BFC是什么?](./docs/%E6%9D%82%E8%AE%B0-12.BFC%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F.md)
63 | ***
64 | #### 杂记-11 - [JS实现继承的几种方式](./docs/%E6%9D%82%E8%AE%B0-11.JS%E5%AE%9E%E7%8E%B0%E7%BB%A7%E6%89%BF%E7%9A%84%E5%87%A0%E7%A7%8D%E6%96%B9%E5%BC%8F.md)
65 | ***
66 | #### 杂记-10 - [mv*介绍](./docs/%E6%9D%82%E8%AE%B0-10.mv*%E4%BB%8B%E7%BB%8D.md)
67 | ***
68 | #### 杂记-09 - [mqtt入门使用](./docs/%E6%9D%82%E8%AE%B0-09.mqtt%E5%85%A5%E9%97%A8%E4%BD%BF%E7%94%A8.md)
69 | ***
70 | #### 杂记-08 - [ssh免密登陆](./docs/%E6%9D%82%E8%AE%B0-08.ssh%E5%85%8D%E5%AF%86%E7%99%BB%E9%99%86.md)
71 | ***
72 | #### 杂记-07 - [页面解析渲染](./docs/%E6%9D%82%E8%AE%B0-07.%E9%A1%B5%E9%9D%A2%E8%A7%A3%E6%9E%90%E6%B8%B2%E6%9F%93.md)
73 | ***
74 | #### 杂记-06 - [flutter配置国内镜像](./docs/%E6%9D%82%E8%AE%B0-06.flutter%E9%85%8D%E7%BD%AE%E5%9B%BD%E5%86%85%E9%95%9C%E5%83%8F.md)
75 | ***
76 | #### 杂记-05 - [代码抽象三原则](./docs/%E6%9D%82%E8%AE%B0-05.%E4%BB%A3%E7%A0%81%E6%8A%BD%E8%B1%A1%E4%B8%89%E5%8E%9F%E5%88%99.md)
77 | ***
78 | #### 杂记-04 - [数据结构](./docs/%E6%9D%82%E8%AE%B0-04.%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84.md)
79 | ***
80 | #### 杂记-04-1 - [数据结构之数组](./docs/%E6%9D%82%E8%AE%B0-04-1.%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B9%8B%E6%95%B0%E7%BB%84.md)
81 | ***
82 | #### 杂记-03 - [判断页面ready](./docs/%E6%9D%82%E8%AE%B0-03.%E5%88%A4%E6%96%AD%E9%A1%B5%E9%9D%A2ready.md)
83 | ***
84 | #### 杂记-02 - [HTML5的Video标签的属性,方法和事件汇总](./docs/%E6%9D%82%E8%AE%B0-02.HTML5%E7%9A%84Video%E6%A0%87%E7%AD%BE%E7%9A%84%E5%B1%9E%E6%80%A7%2C%E6%96%B9%E6%B3%95%E5%92%8C%E4%BA%8B%E4%BB%B6%E6%B1%87%E6%80%BB.md)
85 | 简介:video方法和属性总结
86 | 作者:hazer、时间:2018-6-4
87 | ***
88 | #### 杂记-01 - [xcode模拟器管理](./docs/%E6%9D%82%E8%AE%B0-01.xcode%E6%A8%A1%E6%8B%9F%E5%99%A8%E7%AE%A1%E7%90%86.md)
89 | 简介:xcode模拟器简单使用
90 | 作者:hazer 、时间:2018-6-2
91 | ***
92 |
93 |
94 | #### 个人订阅号(前端趣闻)
95 | 
96 |
--------------------------------------------------------------------------------
/assets/06/1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mynane/web-problem/77d785c96c1f935bde32c515b051dc3245cb7c74/assets/06/1
--------------------------------------------------------------------------------
/assets/binary/binaryTree.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | // 存放树变量
3 | var root = null;
4 |
5 | /**
6 | * 节点构造器
7 | * @param {number} key 节点值
8 | */
9 | var Node = function (key) {
10 | this.key = key;
11 | this.left = null;
12 | this.right = null;
13 | }
14 |
15 | /**
16 | * 插入节点
17 | * @param {Object} node
18 | * @param {Object} newNode
19 | */
20 | var insertNode = function(node, newNode) {
21 | if (node.key > newNode.key) {
22 | if (node.left) {
23 | insertNode(node.left, newNode);
24 | } else {
25 | node.left = newNode;
26 | }
27 | } else if (node.key < newNode.key) {
28 | if (node.right) {
29 | insertNode(node.right, newNode);
30 | } else {
31 | node.right = newNode;
32 | }
33 | }
34 | }
35 |
36 | /**
37 | * 中序便利(升序排列)
38 | * @param {Object} node
39 | * @param {Function} callback
40 | */
41 | var inorderTraversal = function (node, callback) {
42 | if (node === null) return;
43 | /**
44 | * 左 -> 中 -> 右
45 | */
46 | inorderTraversal(node.left, callback);
47 | callback(node.key);
48 | inorderTraversal(node.right, callback);
49 | }
50 |
51 | /**
52 | * 先序便利(一般用于复制二叉树)
53 | * @param {Object} node
54 | * @param {Function} callback
55 | */
56 | var preorderTraversal = function (node, callback) {
57 | if (node === null) return;
58 | /**
59 | * 中 -> 左 -> 右
60 | */
61 | callback(node.key);
62 | preorderTraversal(node.left, callback);
63 | preorderTraversal(node.right, callback);
64 | }
65 |
66 | /**
67 | * 先序便利(一般用于目录树遍历)
68 | * @param {Object} node
69 | * @param {Function} callback
70 | */
71 | var nextorderTraversal = function (node, callback) {
72 | if (node === null) return;
73 | /**
74 | * 左 -> 右 -> 中
75 | */
76 | nextorderTraversal(node.left, callback);
77 | nextorderTraversal(node.right, callback);
78 | callback(node.key);
79 | }
80 |
81 | /**
82 | * 获取最小节点
83 | */
84 | var minNode = function (node) {
85 | if (node.left) {
86 | return minNode(node.left);
87 | } else {
88 | return node.key;
89 | }
90 | }
91 |
92 | /**
93 | * 获取最大节点
94 | */
95 | var maxNode = function (node) {
96 | if (node.right) {
97 | return maxNode(node.right);
98 | } else {
99 | return node.key;
100 | }
101 | }
102 |
103 | /**
104 | * 获取指定节点
105 | * @param {Object} node
106 | * @param {number} key
107 | */
108 | var searchNode = function (node, key) {
109 | if (!node) return false;
110 | if (node.key > key) {
111 | return searchNode(node.left, key);
112 | } else if (node.key < key) {
113 | return searchNode(node.right, key);
114 | } else {
115 | return true;
116 | }
117 |
118 | return false;
119 | }
120 |
121 | /**
122 | * 删除指定节点
123 | * @param {Object} node
124 | * @param {number} key
125 | */
126 | var removeNode = function (node, key) {
127 | if (node.key > key) {
128 | node.left = removeNode(node.left, key);
129 | return node;
130 | } else if (node.key < key) {
131 | node.right = removeNode(node.right, key);
132 | return node;
133 | } else {
134 | if (node.left === null && node.right === null) {
135 | node = null;
136 | return node;
137 | } else if (node.left === null) {
138 | node = node.right;
139 | return node;
140 | } else if (node.right === null) {
141 | node = node.left;
142 | return node;
143 | } else {
144 | var min = minNode(node.right);
145 | node.key = min;
146 | node.right = removeNode(node.right, min);
147 | return node;
148 | }
149 | }
150 | }
151 |
152 | var BinaryTree = function () {
153 | /**
154 | * 获取二叉树
155 | */
156 | this.getTree = function () {
157 | return root;
158 | }
159 |
160 | /**
161 | * 插入节点
162 | * @param {number} key 插入值
163 | */
164 | this.insert = function (key) {
165 | var newNode = new Node(key);
166 | if (root === null) {
167 | root = newNode;
168 | } else {
169 | insertNode(root, newNode);
170 | }
171 | }
172 |
173 | /**
174 | * 中序便利
175 | * @param {Function} callback
176 | */
177 | this.inorderTraversal = function (callback) {
178 | inorderTraversal(root, callback);
179 | }
180 |
181 | /**
182 | * 先序遍历
183 | * @param {Function} callback
184 | */
185 | this.preorderTraversal = function (callback) {
186 | preorderTraversal(root, callback);
187 | }
188 |
189 | /**
190 | * 后序遍历
191 | * @param {Function} callback
192 | */
193 | this.nextorderTraversal = function (callback) {
194 | nextorderTraversal(root, callback);
195 | }
196 |
197 | /**
198 | * 最小节点
199 | */
200 | this.min = function () {
201 | return minNode(root);
202 | }
203 |
204 | /**
205 | * 最大节点
206 | */
207 | this.max = function () {
208 | return maxNode(root);
209 | }
210 |
211 | /**
212 | * 获取指定节点
213 | */
214 | this.search = function (key) {
215 | return searchNode(root, key);
216 | }
217 |
218 | /**
219 | * 删除节点
220 | * @param {number} key
221 | */
222 | this.remove = function (key) {
223 | return removeNode(root, key);
224 | }
225 | }
226 |
227 | window.BinaryTree = BinaryTree;
228 | })()
--------------------------------------------------------------------------------
/assets/binary/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 排序二叉树
8 |
9 |
10 |
11 |
52 |
53 |
--------------------------------------------------------------------------------
/assets/mv*.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mynane/web-problem/77d785c96c1f935bde32c515b051dc3245cb7c74/assets/mv*.png
--------------------------------------------------------------------------------
/assets/qrcode.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mynane/web-problem/77d785c96c1f935bde32c515b051dc3245cb7c74/assets/qrcode.jpg
--------------------------------------------------------------------------------
/build/index.js:
--------------------------------------------------------------------------------
1 | const schedule = require('node-schedule');
2 | const process = require('child_process');
3 | const path = require('path');
4 | const { fileDisplay } = require('./run');
5 |
6 | const filePath = path.resolve('../docs/');
7 |
8 | function run() {
9 | process.exec(`cd .. && git pull && git add .`, function (error, stdout, stderr) {
10 | if (error === null) {
11 | fileDisplay(filePath);
12 | const date = new Date();
13 |
14 | process.exec(`cd .. && git add . && git commit -m 'README自动生成:${date}' && git push`, function (error, stdout, stderr) {
15 | console.log(stderr);
16 | if (error !== null) {
17 | console.log('exec error: ' + error);
18 | }
19 | });
20 | }
21 | })
22 |
23 | // fileDisplay(filePath);
24 | // const date = new Date();
25 |
26 | // process.exec(`cd .. && git add . && git commit -m 'README自动生成:${date}' && git push`, function (error, stdout, stderr) {
27 | // console.log(stderr);
28 | // if (error !== null) {
29 | // console.log('exec error: ' + error);
30 | // }
31 | // });
32 | }
33 |
34 | const scheduleCronstyle = ()=>{
35 | // 每天凌晨执行
36 | schedule.scheduleJob('0 0 * * * *',()=>{
37 | run();
38 | });
39 | }
40 |
41 | scheduleCronstyle();
42 | // run();
--------------------------------------------------------------------------------
/build/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "web-problem",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "cron-parser": {
8 | "version": "2.12.0",
9 | "resolved": "https://registry.npm.taobao.org/cron-parser/download/cron-parser-2.12.0.tgz",
10 | "integrity": "sha1-Ba6MAIAlzs3Yd4dGYmoYMknKMAs=",
11 | "requires": {
12 | "is-nan": "^1.2.1",
13 | "moment-timezone": "^0.5.25"
14 | }
15 | },
16 | "define-properties": {
17 | "version": "1.1.3",
18 | "resolved": "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz",
19 | "integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=",
20 | "requires": {
21 | "object-keys": "^1.0.12"
22 | }
23 | },
24 | "is-nan": {
25 | "version": "1.2.1",
26 | "resolved": "https://registry.npm.taobao.org/is-nan/download/is-nan-1.2.1.tgz",
27 | "integrity": "sha1-n69ltvttskt/XAYoR16nH5iEAeI=",
28 | "requires": {
29 | "define-properties": "^1.1.1"
30 | }
31 | },
32 | "long-timeout": {
33 | "version": "0.1.1",
34 | "resolved": "https://registry.npm.taobao.org/long-timeout/download/long-timeout-0.1.1.tgz",
35 | "integrity": "sha1-lyHXiLR+C8taJMLivuGg2lXatRQ="
36 | },
37 | "moment": {
38 | "version": "2.24.0",
39 | "resolved": "https://registry.npm.taobao.org/moment/download/moment-2.24.0.tgz",
40 | "integrity": "sha1-DQVdU/UFKqZTyfbraLtdEr9cK1s="
41 | },
42 | "moment-timezone": {
43 | "version": "0.5.25",
44 | "resolved": "https://registry.npm.taobao.org/moment-timezone/download/moment-timezone-0.5.25.tgz",
45 | "integrity": "sha1-oRv6L3TgiDJ/LNTAiz5731WVeBA=",
46 | "requires": {
47 | "moment": ">= 2.9.0"
48 | }
49 | },
50 | "node-schedule": {
51 | "version": "1.3.2",
52 | "resolved": "https://registry.npm.taobao.org/node-schedule/download/node-schedule-1.3.2.tgz",
53 | "integrity": "sha1-13Szg+Km9q3lnuzGIlSuoHzXWMs=",
54 | "requires": {
55 | "cron-parser": "^2.7.3",
56 | "long-timeout": "0.1.1",
57 | "sorted-array-functions": "^1.0.0"
58 | }
59 | },
60 | "object-keys": {
61 | "version": "1.1.1",
62 | "resolved": "https://registry.npm.taobao.org/object-keys/download/object-keys-1.1.1.tgz",
63 | "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4="
64 | },
65 | "sorted-array-functions": {
66 | "version": "1.2.0",
67 | "resolved": "https://registry.npm.taobao.org/sorted-array-functions/download/sorted-array-functions-1.2.0.tgz",
68 | "integrity": "sha1-QyZbIdbphbffMWIbHBHMaNjvx8M="
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/build/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "web-problem",
3 | "version": "1.0.0",
4 | "description": "记录学习中遇到的问题,记录成长(每一期都会在订阅号上同步更新,也欢迎大家一起参与)",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/mynane/web-problem.git"
12 | },
13 | "author": "",
14 | "license": "ISC",
15 | "bugs": {
16 | "url": "https://github.com/mynane/web-problem/issues"
17 | },
18 | "homepage": "https://github.com/mynane/web-problem#readme",
19 | "dependencies": {
20 | "node-schedule": "^1.3.2"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/build/run.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 | var path = require('path');//解析需要遍历的文件夹
3 | var ignoreFiles = ['README.md', '.gitignore', '.git', '.DS_Store'];
4 | const filePath = path.resolve('../docs/');
5 |
6 | //调用文件遍历方法
7 | // fileDisplay(filePath);
8 |
9 | function parseDoc(doc) {
10 | const RG1 = /作者:(.*)/;
11 | const RG2 = /时间:(.*)/;
12 | const RG3 = /简介:(.*)/;
13 | const matchResult1 = doc.match(RG1);
14 | const matchResult2 = doc.match(RG2);
15 | const matchResult3 = doc.match(RG3);
16 | return {
17 | auth: matchResult1 ? matchResult1[1] : '',
18 | time: matchResult2 ? matchResult2[1] : '',
19 | des: matchResult3 ? matchResult3[1] : ''
20 | }
21 | }
22 |
23 | //文件遍历方法
24 | function fileDisplay(filePath) {
25 | var template = '# 前端点滴\n> 记录学习中遇到的问题,记录成长\n---\n';
26 | //根据文件路径读取文件,返回文件列表
27 | fs.readdir(filePath, function (err, files) {
28 | if (err) {
29 | console.warn(err)
30 | } else {
31 |
32 | for (let i = files.length - 1; i >= 0; i--) {
33 | const filename = files[i];
34 | console.log(i, filename);
35 | //获取当前文件的绝对路径
36 | var filedir = path.join(filePath, filename);
37 | //根据文件路径获取文件信息,返回一个fs.Stats对象
38 | var stats = fs.statSync(filedir);
39 | var isFile = stats.isFile();//是文件
40 | // var isDir = stats.isDirectory();//是文件夹
41 | if (isFile) {
42 | if (ignoreFiles.indexOf(filename) === -1) {
43 | const res = parseDoc(fs.readFileSync(filedir).toString());
44 | var fileArr = filename.split('.');
45 | template += `#### ${fileArr[0]} - [${fileArr[1]}](./docs/${encodeURIComponent(filename)}) \n`;
46 | if (res.des) {
47 | template += `简介:${res.des} \n`;
48 | }
49 | if (res.auth) {
50 | template += `作者:${res.auth}`;
51 | }
52 | if (res.time) {
53 | template += `、时间:${res.time} \n`;
54 | }
55 | template += `***\n`;
56 | }
57 | }
58 | }
59 |
60 | //遍历读取到的文件列表
61 | // files.forEach(function (filename) {
62 |
63 | // });
64 | var date = new Date();
65 | var year = date.getFullYear();
66 | template += '\n\n#### 个人订阅号(前端趣闻)\n\n';
67 | fs.writeFileSync('../README.md', template);
68 | // console.log(template);
69 | }
70 | });
71 | }
72 |
73 |
74 | module.exports = {
75 | fileDisplay
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/docs/杂记-01.xcode模拟器管理.md:
--------------------------------------------------------------------------------
1 | xcode模拟器
2 |
3 | 一、Xcode允许我们使用xcrun命令运行模拟器
4 |
5 | 1、列出你安装的所有可用的设备
6 | ```
7 | xcrun instruments -s
8 | ```
9 | 2、开启指定模拟器(上面的列表就是可用模拟器名称)
10 | ```
11 | xcrun instruments -w "iPhone 8 (11.2)"
12 | ```
13 | 二、使用的Xcode的simctl命令来控制模拟器
14 |
15 | 1、安装指定的app
16 |
17 | ```
18 | xcrun simctl install booted
19 | ```
20 |
21 |
22 | 2、运行指定的app (com.example.app)
23 |
24 | ```
25 | xcrun simctl launch booted
26 | ```
27 |
28 |
29 | 3、卸载指定的应用
30 |
31 | ```
32 | xcrun simctl uninstall booted
33 | ```
34 |
35 | 作者:hazer
36 | 时间:2018-6-2
37 | 简介:xcode模拟器简单使用
38 |
--------------------------------------------------------------------------------
/docs/杂记-02.HTML5的Video标签的属性,方法和事件汇总.md:
--------------------------------------------------------------------------------
1 |
2 | #### `