摘要: #查看端口占用 netstat -tunlp #启用root passwd -u root passwd root #允许rootssh登陆 sudo vi /etc/ssh/sshd_config 修改远程登录为yes #查看时区 cat /etc/sysconfig/clockcat /etc/ 阅读全文
posted @ 2018-05-11 00:12 QQQnull 阅读(185) 评论(0) 推荐(0) 编辑
摘要: ajax在判断请求成功时会判断返回的数据是否为json,需要将response的content-type设置为application/json,数据为标准的json格式 jQuery版本 flask代码示例 ajax示例,请求返回的结果为result,一个json转换后的对象 阅读全文
posted @ 2018-05-10 00:17 QQQnull 阅读(682) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash #todo:运行前设置主机间SSH信任,将要更新的主机的IP放在mip中 #变量设置 #待更新主机ip存放在mip文件中 if [ ! -f mip ] then echo "mip doesn't exist" exit 1 fi ip=$(cat mip|awk '{print $1}') #远程登陆用户 user="root" #目标文件 tfile="/root... 阅读全文
posted @ 2017-08-03 10:51 QQQnull 阅读(258) 评论(0) 推荐(0) 编辑
摘要: public JsonResult JsonData() { HttpContext.Response.AppendHeader("Access-Control-Allow-Origin", "*"); return Json(db.Weathers.ToList()); } json方法有一个重构 阅读全文
posted @ 2017-06-06 23:48 QQQnull 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 使用示例: 阅读全文
posted @ 2017-05-29 17:52 QQQnull 阅读(325) 评论(0) 推荐(0) 编辑