This example demonstrates how to add visible and draggable handles to D3’s d3.svg.brush component, rather than that relying on the invisible boundary of the brush extent. The handle sizes here are exaggerated for demonstration purposes!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<p>d3 add images</p> | |
<script src="jsbin.xeruz.js"></script> |
##用于在shell中给输出上色 ( Colored Bash )
###基本结构:
\033[A;B;Cm YOUR CONTENT \033[m
###A B C是字母替代
A => Attribute codes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lcq={};//全局变量 | |
(function($){ | |
$.get=Sizzle; | |
$.bind=function(element,event,fn){if(element){if(element.addEventListener){console.info("addEventListener"); element.addEventListener(event,fn,false);}else{console.info("attachEvent"); element.attachEvent("on"+event,fn);}} | |
} | |
})(lcq); //自执行函数表达式 | |
function _test(){ alert(lcq.get("#dv1")[0].innerHTML); } | |
//窗口加载事件 | |
window.onload=function(){ | |
lcq.bind(lcq.get("#btnTester")[0],"click",_test);/*给按钮绑定事件*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var audio = new Audio(); | |
audio.src = Modernizr.audio.ogg ? 'background.ogg' : | |
Modernizr.audio.mp3 ? 'background.mp3' : | |
'background.m4a'; | |
audio.play(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
不知道学PHP有没有前途~哎越写越没劲 | |
<?php | |
Class createdb //类的开始 | |
{ | |
var $db= "localhost";//数据库地址; | |
var $dbname = "root";//用户名; | |
var $dbpwd = "";//密码; | |
var $dbtable = "mysql";//使用的数据库 | |
var $conn; //数据库连接; | |
var $result; //结果集 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ajax原理 | |
ajax对象 | |
open()打开 open(method,url,true) the url -- a file on a server. | |
onreadystatechange | |
send() | |
GET方法在open()时即可发送信息体 | |
e.g. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function de($a) | |
{ | |
if($a==0) | |
{ | |
throw new Exception("can't be zero!"); | |
} | |
} | |
try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
回校第一天晚上: | |
表单验证 | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | |
<title>form</title> | |
</head> |