filter方法介绍 语法:array.filter(function(currentValue,index,arr), thisValue) 参数 用处 function(currentValue,index,arr) 每个元素都回调用该方法 currentValue 必须。当前元素的值 index 可选。当前元素的索引值 arr 可选……
vue学习笔记
基本操作 js文件 <script src=”js/vue.js”></script> 就收工了.正式环境用 vue.min.js v-for对json数据的邦定 当点击时某个按钮时,更改自已与其他对象的css
1 2 3 4 5 6 7 8 9 10 11 |
<div id="insource" class="col-xs-12"> <hr> <span class="btn btn-app btn-sm btn-pink no-hover" v-for="abc in items"> <P></P> <span class="line-height-1 smaller-90">{{ abc.alias }}</span> <p> <span class="line-height-1 smaller-60">{{ abc.id + ":" + abc.type }}</span> </p> <p> <span class="line-height-1 smaller-80">{{ abc.group }}</span> </p> <span class="badge badge-warning badge-left">电视墙</span> </span> </div> |
[crayon-6009a244d15……
jQuery 学习笔记一
基本用法 get数据
1 2 3 4 5 6 7 |
function loadXMLDoc_justchen() { $.get("/action/led", function (data, status) { // GET 参数,回调函数(参数,状态) $("#NODE-SN").text(data); // 查找到ID为NODE-SN的项目并将其更改为文本 //console.log(data); }); } |
当面页ready 后加载数据
1 2 3 4 |
$(document).ready(function () { loadXMLDoc_justchen(); }); |
定时刷新数据 实际上就是加入 setInterval 方法 setInterval() 方法可按照指定的周期(以毫秒计)来调用函数或计算表达式。 setIn……
GoaHead 学习笔记
初始化及基本流程
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
int goahdStart(void) { char *argp, *auth, *home, *documents, *endpoints, *endpoint, *route, *tok, *lspec; int argind, duration; route = "route.txt"; auth = "auth.txt"; duration = 0; logSetPath("stdout:2"); // 打印 documents = ME_GOAHEAD_DOCUMENTS; //initPlatform(); if (websOpen(documents, route) < 0) { error("初始化WEB系统失败. Exiting."); return -1; } logHeader(); if (websLoad(auth) < 0) { error("Cannot load %s", auth); return -1; } if (websListen("http://*:80") < 0) { return -1; } websDefineHandler("test", testHandler, nullptr, nullptr, 0); websAddRoute("/test", "test", 0); websDefineAction("exampleAction", (void*)exampleAction); if (websGetBackground()) { if (daemon(0, 0) < 0) { error("Cannot run as daemon"); return -1; } } websServiceEvents(&finished); return 0; } |
goActions goActions定义
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
static void exampleAction(Webs *wp) { const char *io_val; io_val = websGetVar(wp, "val_led", nullptr); // 获取POST过来的数据 qDebug() << "on_led_set: " << io_val; websSetStatus(wp, 200); websWriteHeaders(wp, -1, nullptr); websWriteEndHeaders(wp); websWrite(wp, "%s", "<h4>hello GoAction!</h4>"); // 返回数据 websDone(wp); return nullptr; /****这句注册一个可以通过action/exampleGetAction访问的GoAction函数****/ websDefineAction("exampleAction", exampleGetAction); |
esxi 折腾记
使用fping 来查看整个子网有哪些设备在线
密码保护:当代人必须掌握的技能-查看密码为:123456
Linux内核调试方法总结之sysrq
shell 实现监控程运行并自动重启
openwrt webdav安装记录
放弃用Lighttpd-mod-webdav的方法,一直不成功
1 2 3 4 |
opkg update opkg install lighttpd lighttpd-mod-cgi lighttpd-mod-alias lighttpd-mod-webdav opkg install php7 php7-cgi --nodeps |
opkg 在安装时如果报依赖错误,加–nodeps 参数可以解决 修改 /etc/lighttpd/conf.d/30-cgi.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
<br />\####################################################################### ## ## CGI modules ## --------------- ## ## See https://redmine.lighttpd.net/projects/lighttpd/wiki/docs_modcgi ## server.modules += ( "mod_cgi" ) ## ## Plain old CGI handling ## ## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini. # cgi.assign = ( ".php" => "/usr/bin/php-cgi", ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl", ".rb" => "/usr/bin/ruby", ".erb" => "/usr/bin/eruby", ".py" => "/usr/bin/python" ) ## ## to get the old cgi-bin behavior of apache ## ## Note: make sure that mod_alias is loaded if you uncomment the ## next line. (see modules.conf) ## #alias.url += ( "/cgi-bin" => server_root + "/cgi-bin" ) #$HTTP["url"] =~ "^/cgi-bin" { # cgi.assign = ( "" => "" ) #} ## ####################################################################### |
修改……