年归档:2013年

CSS:IE,Chrome,Firefox兼容性和CSS Hack

hack列表(全部经笔者测试,均为标准模式下,混杂模式由于很少会用到所以未对其进行测试):

点击查看原图

其中粉红色部分为属性hack,黄色部分为选择器hack,它们可以结合使用。此外Firefox和Chrome也有它们专有的hack,详细hack方式及使

用示例如下:

Firefox:

@-moz-document url-prefix()    /*写在选择器外层时(只可写在此处):Firefox only*/

Chrome:

@media screen and (-webkit-min-device-pixel-ratio:0)    /*写在选择器外层时(只可写在此处):...

继续阅读

发表在 css | 标签为 | CSS:IE,Chrome,Firefox兼容性和CSS Hack已关闭评论

mobile check

if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){
	if(window.location.href.indexOf("?mobile")<0){
		try{
			if(/Android|Windows Pho...

继续阅读

发表在 javascript | 标签为 | mobile check已关闭评论

js oauth_v1.0

/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://ww...

继续阅读

发表在 javascript | 标签为 , | js oauth_v1.0已关闭评论

PNG transparency in Win IE 5.5 & 6

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])
    if ((version >= 5.5) && (document.body.filters))
    {
       for(var j=0; j<document.images...

继续阅读

发表在 javascript | PNG transparency in Win IE 5.5 & 6已关闭评论

Windows8 各种版本区别对比

功能特性 Windows RT Windows 8

(标准版)
Windows8 Pro

(专业版)
Windows 8 Enterprise

(企业版)
与现有Windows 兼容
购买渠道 在设备上预装 大多数渠道 大多数渠道 经过认证的客户
架构 ARM (32-bit) IA-32 (32-bit) or x86-64 (64-bit) IA-32 (32-bit) or x86-64 (64-bit) IA-32 (32-bit) or x86-64 (64-bit)
安全启动
图片密码
开始界面、动态磁帖以及相关效果
触摸键盘、拇指键盘
语言包
更新的资源管理器
...

继续阅读

发表在 windows | 标签为 | Windows8 各种版本区别对比已关闭评论

innerHTML script

function parseScript(html)
{
	var result = { html:'',scripts:[] };
	if (html)
	{
		//脚本
		//var re = /(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;
		var re = /(?:<script([^>]*text\/javascript[^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;
		//外部脚本
	...

继续阅读

发表在 javascript | 标签为 , | innerHTML script已关闭评论

Adf

Aooshi Donet Framework (Adf)

PS:原名 Aooshi.dll  自3.7版本起更名为 Adf

 

Source(源代码授权):

User(帐户): readonly

Pass(密码): readonly

Aooshi(源代码):

https://svn.aooshi.org:8080/svn/adf/tags/aooshi/3.7

 

Adf(源代码):

https://svn.aooshi.org:8080/svn/adf/tags/adf/4.1

https://svn.aooshi.org:8080/svn/adf/tags/adf.cs/1.1

ht...

继续阅读

发表在 adf | 标签为 , , , , , | Adf已关闭评论

ie 10, .net 4, __doPostBack

程序包:

-----------------------------------------------------------

-----------------------------------------------------------

知识库文章编号:2600088

语言:All (Global)

平台:x64

位置:http://hotfixv4.microsoft.com/.NET%20Framework%204.0%20-%20Windows%20XP,%20Windows%202003,%20Windows%20Vista,%20Windows%20Server%202008,%20...

继续阅读

发表在 .net | 标签为 | ie 10, .net 4, __doPostBack已关闭评论

mongod

#!/bin/bash

# mongod - Startup script for mongod

# chkconfig: 35 85 15
# description: Mongo is a scalable, document-oriented database.
# processname: mongod
# config: /etc/mongod.conf
# pidfile: /var/run/mongo/mongod.pid

. /etc/rc.d/init.d/functions

# things from mongod.conf get ther...

继续阅读

发表在 db | 标签为 | mongod已关闭评论

BAT切换IIS目录

cscript %SystemDrive%\inetpub\adminscripts\adsutil.vbs SET /W3SVC/1/ROOT/path “D:\wwwroot”

继续阅读

发表在 windows | BAT切换IIS目录已关闭评论

postfix+dovecot+extmail

系统环境:rhel6 | centos

点击查看原图 

1.使用extmail自带模板在mysql中创建数据库

    yum install mysql mysql-server mailx -y

    /etc/init.d/mysqld start

   

    mkdir /var/www/extsuite; cd /var/www/extsuite/

    tar zxf extmail-1.2.tar.gz 

   ...
继续阅读

发表在 mail | 标签为 | postfix+dovecot+extmail已关闭评论

varnish vcl

# This is a basic VCL configuration file for varnish.  See the vcl(7)
# man page for details on VCL syntax and semantics.
# 
# Default backend definition.  Set this to point to your content
# server.
# 

probe healthcheck {
   .url = "/";
   .interval = 60s;
   .timeout = 0.3s;
   .wind...

继续阅读

发表在 web server | 标签为 | varnish vcl已关闭评论

linux TIME_WAIT

现象:

1、外部机器不能正常连接SSH

2、内向外不能够正常的ping通过,域名也不能正常解析。

问题排查:

通过 netstat  -anp | grep TIME_WAIT | wc -l 命令查看数量,发现TIME_WAIT的连接数量超过了18000太夸张了。

1、初步怀疑是程序没有关闭连接,codereview了两遍,发现,已经正常关闭。

2、网上看TIME_WAIT产生的原因,可能是因为服务器主动关闭连接导致TIME_WAIT产生。

3、查找TIME_WAIT解决方案:

发现系统存在大量TIME_WAIT状态的连接,通过调整内核参数解决,
vi /etc/sysctl.c...

继续阅读

发表在 linux | 标签为 | linux TIME_WAIT已关闭评论

mysql 误删除ibdata1之后如何恢复

删除了在线服务器中mysql innodb相关的数据文件ibdata1以及日志文件 ib_logfile*,
应该怎样恢复呢?

观察网站,发现一切都很正常,数据的读取与写入操作都完全正常。
这是怎么个情况?

其实,mysqld在运行状态中,会保持这些文件为打开状态,
即使把它们删除了,它们仍旧存在于文件系统中,mysqld仍然可以对其进行读写。

root@localhost:/var/lib/mysql# ls -la /proc/14101/fd/| grep -e ibdata -e ib_
lrwx------ 1 root  root  64 Aug  7 23:29 3 ...

继续阅读

发表在 db | 标签为 | mysql 误删除ibdata1之后如何恢复已关闭评论

mooseFS

mfs文件系统(一)

MFS文件系统结构:
包含4种角色: 
        管理服务器managing server (master)
        元数据日志服务器Metalogger server(Metalogger)
        数据存储服务器data servers (chunkservers) 
   ...

继续阅读

发表在 linux | 标签为 | mooseFS已关闭评论