JavaScript IE 6背景闪烁

try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}

Ruby with_options干扰路线创建

map.with_options :controller => "message" do |msg|
  msg.create_message "/msg/create/:id", :action => "create"
  msg.delete_message "/msg/delete/:id", :action => "delete"
  msg.message "/msg/:id", :action => "get"
end

Bash 带有调试选项的ssh

#substitute user for your username and 0.0.0.0 for the ip of the server
sh -v -v -v user@0.0.0.0

Other 在Ubuntu中从命令行设置静态IP

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
        script grep
        map eth0

# The primary network interface
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1

JavaScript FN。获取单选按钮值

function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

Bash 导入subversion工作副本中的所有新文件

svn status|grep '?' |cut -b 8-|xargs svn add

ASP UrlDecode方法

' An inverse to Server.URLEncode
function URLDecode(str)
	dim re
	set re = new RegExp

	str = Replace(str, "+", " ")
	
	re.Pattern = "%([0-9a-fA-F]{2})"
	re.Global = True
	URLDecode = re.Replace(str, GetRef("URLDecodeHex"))
end function

' Replacement function for the above
function URLDecodeHex(match, hex_digits, pos, source)
	URLDecodeHex = chr("&H" & hex_digits)
end function

HTML 代码HTML代码

Rendre apparentes les balises HTML sans qu'elles soient prises en compte par le navigateur comme du code, comme c'est le cas dans la ligne ci dessous, rien de plus simple avec la balise <XMP> :

<XMP>
<HTML>
<HEAD>
</HEAD>
<BODY>
blabla
</BODY>
</HTML>
</XMP>

Grâce à ces balises, le code suivant ne sera pas interprété. Voici le résultat :


<HTML>
<HEAD>
</HEAD>
<BODY>
blabla
</BODY>
</HTML>

SQL Enregistrementpré发送dans table1 mais pas dans table2

SELECT table1.* FROM table1 LEFT JOIN table2 ON table1.name=table2.table1_name WHERE table2.table1_name IS NULL;

PHP 插入,更新

UPDATE livre_fr SET prix=prix_editeur*0.7 where isbn= '2000';

insert INTO reponse_qcm (prenom,codepostal,adresse,pays,id,nom,email,rep_txt,num_qcm) VALUES ('$ce','$nombre','$adresse','$tel','$resp','$nom','$mail','$quest',176);