08 2018 档案

摘要:闭包函数实例: (可以理解为在一个函数作用域外部调用函数作用域内部的变量) 也可也是这样: 既然能引用到变量,那么也可以当做参数传递给另一个函数。 总结: 1、回调函数都是在使用闭包(回调函数: 把一个函数指针作为参数传递给另一个函数,当另一个函数调用时,此参数(函数指针)所指向的函数就被叫做回调函 阅读全文
posted @ 2018-08-21 09:08 MiraclesGG 阅读(141) 评论(0) 推荐(0)
摘要:第二种写法和第一种很像: 第三种是UMD模式(项目中被广泛使用,尽管这种模式略显冗长,但是更容易让人理解): topic: 这样写的好处是不会污染外部作用域。 比如 function foo () { ... } 这样的函数是可以直接在外部调用的; 但是(function foo () { ... 阅读全文
posted @ 2018-08-19 22:59 MiraclesGG 阅读(1658) 评论(0) 推荐(0)
摘要:打开.gitattributes 文件 添加 阅读全文
posted @ 2018-08-14 15:16 MiraclesGG 阅读(171) 评论(0) 推荐(0)
摘要:// TodoList 实例 阅读全文
posted @ 2018-08-12 17:08 MiraclesGG 阅读(361) 评论(0) 推荐(0)
摘要:上次防火墙重启,关闭了443端口导致https域名无效: 查看防火墙端口: service iptables status 开启443端口: iptables -I INPUT -p tcp --dport 443 -j accept 阅读全文
posted @ 2018-08-09 11:33 MiraclesGG 阅读(387) 评论(0) 推荐(0)
摘要:// 内部数据可以直接写后台传过来的变量, 例如: {value: {$sort}, name: {$arrival}}; // echartjs 下载地址: echarts.baidu.com 阅读全文
posted @ 2018-08-07 14:53 MiraclesGG 阅读(213) 评论(0) 推荐(0)
摘要:// 查看防火墙状态 service iptables status // 开启防火墙 service iptables start // 重启防火墙 service iptables restart // 关闭防火墙 service iptables stop // 屏蔽某个IP iptables -I INPUT -s **.**.**.** -j DROP// 屏蔽某个IP段iptabl... 阅读全文
posted @ 2018-08-06 08:45 MiraclesGG 阅读(1541) 评论(0) 推荐(0)
摘要:模拟二维数组: $sortArray = [ ['name' => 'zhangshan', listNumber => 0], ['name' => 'lisi', listNumber => 1], ['name' => 'wangwu', 'listNumber' => 4], ['name' 阅读全文
posted @ 2018-08-05 23:46 MiraclesGG 阅读(960) 评论(0) 推荐(0)