2018年3月30日
摘要: str="taolue@126.com"echo "len="${#str} #字符串长度 expr index $str 'ba' #字符串查找不正确 echo ${str:3:6} #从第3个向后数6个截取 expr match $str '\(^[a-z]{1,}@[0-9]{1,}\.[a- 阅读全文
posted @ 2018-03-30 16:19 编程男孩 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1.条件表达式:整数 l == -eq>= -ge> -gt<= -le< -lt!= -nt2.条件语句if [ 表达式 ]then elif[表达式]then else fi例子:count=10if [ $count -gt 10 ]then echo "count>10"elif [ $co 阅读全文
posted @ 2018-03-30 16:19 编程男孩 阅读(275) 评论(0) 推荐(0) 编辑
摘要: shell编程1.监控内存,生成日志2.数据库定时备份3.邮件的监控4.定时发邮件5.开机执行(启动Apache,启动mysql) 文件类型:1.创建couse1.sh文件写入:count=5 //等号前后千万不要加空格echo $count保存wq2.赋予权限chmod a+x couse1.sh 阅读全文
posted @ 2018-03-30 16:18 编程男孩 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 常用命令:1.查看目录:ls ls -a 包含隐藏目录 ls -l 显示详细信息,-开头为文件 d开头为目录 蓝色为目录 绿色为可执行文件 黑色(白色):普通文件2.看帮助: man 命令名 q 退出3.看当前目录: pwd 看在哪个目录下4.进入目录 cd 目录名 绝对目录 / 相对目录 .当前目 阅读全文
posted @ 2018-03-30 16:17 编程男孩 阅读(90) 评论(0) 推荐(0) 编辑
摘要: var nodemailer = require('nodemailer');var transporter = nodemailer.createTransport({ //https://github.com/andris9/nodemailer-wellknown#supported-serv 阅读全文
posted @ 2018-03-30 16:11 编程男孩 阅读(103) 评论(0) 推荐(0) 编辑
  2018年1月3日
摘要: 1.安装插件:npm install vue-amap --save2.main.js中import AMap from 'vue-amap'Vue.use(AMap);3.index.html文件中<script type="text/javascript" src="http://webapi. 阅读全文
posted @ 2018-01-03 16:10 编程男孩 阅读(6509) 评论(0) 推荐(0) 编辑
摘要: 1.首先要注册高德地图,完后成为开发者 2.控制台里获取自己的key值 3.在要显示地图的页面添加如下的代码 <script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>< 阅读全文
posted @ 2018-01-03 16:09 编程男孩 阅读(316) 评论(0) 推荐(0) 编辑
  2017年12月23日
摘要: app.js中: // 拦截器的实现 var openPage = ['/','/users/regist','/users/login','/users/logout']; app.use(function(req, res, next) { var url = req.originalUrl; 阅读全文
posted @ 2017-12-23 10:24 编程男孩 阅读(143) 评论(0) 推荐(0) 编辑
  2017年12月22日
摘要: 1.E:创建nodejs文件夹 2.先配置npm的全局模块的存放路径以及cache路径: npm config set prefix "E:\nodejs\node_global" npm config set cache "D:\nodejs\node_cache" 3.安装express模块 n 阅读全文
posted @ 2017-12-22 17:18 编程男孩 阅读(1863) 评论(0) 推荐(0) 编辑
摘要: *全局对象: global: 表示Node所在的全局环境,类似浏览器的window对象 console: 提供命令黄精中的标准输入,输出功能 process: 指向Node内置的process模块,允许开发者与当前进程互动 *全局函数: setInterval(callback,ms,[参数1],[ 阅读全文
posted @ 2017-12-22 16:43 编程男孩 阅读(208) 评论(0) 推荐(0) 编辑