html select optgroup
<select id="manager" name="manager" onchange="document.getElementById('hierLabelDiv').style.display = this.options[this.selectedIndex].value=='Other' ? 'block' : 'none'; document.getElementById('ownMgrElm').disabled = this.selectedIndex == 0 ? 'true' : ''; if (this.selectedIndex == 0) document.getElementById('ownMgrElm').checked = ''"> <option value="">--None--</option> <optgroup label="Standard User Fields"> <option value="Mana...
js数组排序
Array.prototype.sortBy = function (attr, rev) { return this.sort(sortByKey(attr, rev));} var sortByKey = function (attr, rev) { //第二个参数没有传递 默认升序排列 if (rev == undefined) { rev = 1; } else { rev = (rev) ? 1 : -1; } return function (a, b) { a = a[attr].toLowerCase(); b = b[attr].toLowerCase(); if (a < b) { return rev * -1; } if (a > b) { r...
raid0、raid1、raid5、raid10这四种raid的特点和区别
raid(Redundant Array of Independent Disk 独立冗余磁盘阵列)技术是加州大学伯克利分校1987年提出,最初是为了组合小的廉价磁盘来代替大的昂贵磁盘,同时希望磁盘失效时不会使对数据的访问受损 失而开发出一定水平的数据保护技术。raid就是一种由多块廉价磁盘构成的冗余阵列,在操作系统下是作为一个独立的大型存储设备出现。raid可以充分发 挥出多块硬盘的优势,可以提升硬盘速度,增大容量,提供容错功能够确保数据安全性,易于管理的优点,在任何一块硬盘出现问题的情况下都可以继续工作,不会 受到损坏硬...
百度地图api:根据经纬度获取地理位置信息
调用百度api,根据经度和纬度获取地理位置信息,返回Json。C#代码:123456789101112131415161718192021222324252627282930313233using Newtonsoft.Json;using Newtonsoft.Json.Linq;using System;using System.Net.Http; public class LocationService { //百度api private static string url = @"http://api.map.baidu.com/geocoder/v2/?location={0}&output=json&ak=WEc8RlPXzSifaq9RHxE1WW7lRKgbid6Y"; /// <su...
使用NSSM将exe封装为服务
NSSM是一个服务封装程序,它可以将普通exe程序封装成服务,使之像windows服务一样运行。同类型的工具还有微软自己的srvany,不过nssm更加简单易用,并且功能强大。它的特点如下:支持普通exe程序(控制台程序或者带界面的Windows程序都可以)安装简单,修改方便可以重定向输出(并且支持Rotation)可以自动守护封装了的服务,程序挂掉了后可以自动重启可以自定义环境变量这里面的每一个功能都非常实用,使用NSSM来封装服务可以大大简化我们的开发流程了。开发的时候是一个普通程序,降低...
nginx使用stream模块做ssh转发
nginx使用stream模块做ssh转发一、前言nginx从1.9.0开始,新增加了一个stream模块,用来实现四层协议的转发、代理或者负载均衡等。这完全就是抢HAproxy份额的节奏,鉴于nginx在7层负载均衡和web service上的成功,和nginx良好的框架,stream模块前景一片光明。二、stream 模块编译stream模块默认没有编译到nginx, 编译nginx时候 ./configure –with-stream 即可官网:http://nginx.org/en/docs/stream/ngx_stream_core_module.html三、使用stream模块做ssh转发使用案例:公司的测试主机在内网,不能直接访...
apex highlight userDefineLang for notepad++
apex userDefineLang for notepad++下载: userDefineLang
JQuery如何监听DIV内容变化
JQuery如何监听DIV内容变化$("#wb_follow_btn").bind('DOMNodeInserted', function(e){ alert('element now contains: '+ $(e.target).html());}); //可以检测title变化 $("title").bind('DOMNodeInserted', function(e) { document.title='Web Skype'; });