window.location属性描述hash设置或获取 href 属性中在井号“#”后面的分段。host设置或获取 location 或 URL 的 hostname 和 port 号码。hostname设置或获取 location 或 URL 的主机名称部分。href设置或获取整个 URL 为字...
分类:
Web程序 时间:
2014-07-16 19:12:42
阅读次数:
255
var mysql = require("mysql"); var connection = mysql.createConnection({ host: '127.0.0.1', user: "root", //数据库用户名 ...
分类:
数据库 时间:
2014-07-16 00:00:17
阅读次数:
265
启动docker的时候的指令使用
sudo docker -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock -d &
这样就能使docker听取host得到的任何ip的指令,从而就能从host之外的机器连接到docker container了...
分类:
其他好文 时间:
2014-07-15 22:26:08
阅读次数:
275
puppet分发软件同步文件ssh-批量执行-paramiko-比较好的模块直接修改远端主机的host文件
分类:
编程语言 时间:
2014-07-15 12:02:00
阅读次数:
270
pci passthrough
概念
允许guest排他使用host上的某个PCI设备,就像将该设备物理连接到guest上一样。
使用场景
提升性能(如直通网卡和显卡)
降低延迟(避免数据丢失或丢祯)
直接利用bare-metal上设备的驱动
用法1
需要CPU支持VT-d。主板也支持该技术。
预先配置:
打开bios中的VT-d设置。激活kernel...
分类:
其他好文 时间:
2014-07-15 10:31:59
阅读次数:
359
JAVA、openOffice、myeclipse报错原因:没有启动openOffice服务。解决办法:运行→cmd,输入:cdC:\Program Files (x86)\OpenOffice 4\program回车再输入soffice -headless -accept="socket,host...
分类:
编程语言 时间:
2014-07-14 22:46:06
阅读次数:
1027
服务端:#!/usr/bin/pythonimportsockets=socket.socket()host=‘10.67.15.96‘port=889s.bind((host,port))s.listen(5)whileTrue:c,addr=s.accept()print‘++++++‘c.send(‘server‘)b=c.recv(1024)printbc.close()客户端:#!/usr/bin/pythonimportsockets=socket.socket()host=‘10.6..
分类:
其他好文 时间:
2014-07-14 16:24:40
阅读次数:
183
1、先打开在httpd.conf 中的Include etc/extra/httpd-vhosts.conf2、在httpd-vhosts.conf写上如下配置,Apache只会认同一个端口的第一条VirtualHost ServerAdmin webmaster@dummy-host.exa...
分类:
其他好文 时间:
2014-07-14 10:23:39
阅读次数:
200
配置文件<?phpdefined(‘ACC‘)||exit(‘AccessDenied‘);$cfg=array();$cfg[‘host‘]=‘localhost‘;$cfg[‘user‘]=‘root‘;$cfg[‘pwd‘]=‘111111‘;$cfg[‘db‘]=‘php0620‘;$cfg[‘port‘]=‘3306‘;$cfg[‘charset‘]=‘utf8‘;$cfg[‘updir‘]=‘upload/‘;
分类:
Web程序 时间:
2014-07-13 15:02:40
阅读次数:
245
<?phpdefined(‘ACC‘)||exit(‘AccessDenied‘);//封装mysql操作类,包括连接功能,及查询功能.classmysqlextendsabsdb{protectedstatic$ins=null;protected$host;//主机名protected$user;//用户名protected$passwd;//密码protected$db;//数据库名protected$port;//端口protected..
分类:
数据库 时间:
2014-07-13 14:31:08
阅读次数:
354