背景 继承了组里师兄师姐写的项目的前端代码,但是是两个人写的,有两格缩进的,有四格缩进的,有字符串外用单引号的,有用双引号的. 于是搜索了一下,可以用eslint强制转化. eslint在github上的链接:https://github.com/eslint/eslint 安装 用VS Code打开刚下载好的项目,npm init项目初始化后(一般不需要这个步骤,这是为了加载各种npm包)在终端 npm install eslint --save-dev结果:不建议用 npm install…
There are commonly three types of memories in a PIC Microcontroller, Flash Program Memory, Data Memory (RAM) and EEPROM Data Memory. We write Programs in the Flash Program Memory of a microcontroller. Flash memory makes it possible to program a micro…
//   首先将caffe的根目录作为当前目录,然后加载caffe程序自带的小猫图片,并显示. 图片大小为360x480,三通道 In [1]: import numpy as np import matplotlib.pyplot as plt %matplotlib inline import caffe caffe_root='/home/xxx/caffe/' import os,sys os.chdir(caffe_root) sys.path.insert(0,caffe_root+…
PHP7.1 新特性 1.可为空(Nullable)类型 类型现在允许为空,当启用这个特性时,传入的参数或者函数返回的结果要么是给定的类型,要么是 null .可以通过在类型前面加上一个问号来使之成为可为空的. function test(?string $name) { var_dump($name); } 以上例程会输出: string(5) "tpunt" NULL Uncaught Error: Too few arguments to function test(), 0 p…
1)禁止系统响应任何从外部/内部来的ping请求攻击者一般首先通过ping命令检测此主机或者IP是否处于活动状态如果能够ping通 某个主机或者IP,那么攻击者就认为此系统处于活动状态,继而进行攻击或破坏.如果没有人能ping通机器并收到响应,那么就可以大大增强服务器的安全性,linux下可以执行如下设置,禁止ping请求:[root@localhost ~]# echo "1"> /proc/sys/net/ipv4/icmp_echo_ignore_all 默认情况下&quo…
Buid-in web server内置了一个简单的Web服务器 把当前目录作为Root Document只需要这条命令即可: php -S localhost:3300 也可以指定其它路径 php -S localhost:3300 -t /path/to/root 还可以指定路由 php -S localhost:3300 router.php 命名空间(php5.3) 命名空间的分隔符为反斜杆\ namespace fox\lanmps\Table; class Select {} 获取完…
PHP7 已经出来1年了,PHP7.1也即将和大家见面,这么多好的特性,好的方法,为什么不使用呢,也希望PHP越来越好. 在这里整理 PHP 5.1 ,PHP5.2,PHP5.3,PHP5.4,PHP5.5,PHP5.6 ,PHP7,PHP7.1 所有新特性,已备大家学习及使用 PHP5.1~PHP5.6 http://blog.csdn.net/fenglailea/article/details/9853645 PHP7~PHP7.1 http://blog.csdn.net/fenglai…
在nagiosXI上,通过nsclient++ 引用plugin “check_ms_win_disk_load”(https://outsideit.net/check-ms-win-disk-load/),安装好后,报错信息:cannot be loaded because the execution of scripts is disabled on this system. 在网上搜到问题根源在于ps1的执行环境,中需要设置: set-executionpolicy unrestrict…
PowerShell 默认不允许执行*.ps1脚本文件.运行ps1文件会得到下面的错误: File C:\Temp\Test.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get- help about_signing" for more details. At line:1 char:19+ c:\Temp\Test.ps1 <<&…