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 getStrDistance = function(str1, str2) { | |
var lenStr1 = str1.length; | |
var lenStr2 = str2.length; | |
if (lenStr1 === 0 || lenStr2 === 0) { | |
return lenStr1 === 0 ? lenStr2 : lenStr1; | |
} | |
var dArr = new Array(lenStr1 + 1); | |
for (var i = 0; i <= lenStr1; i++) { | |
dArr[i] = new Array(lenStr2 + 1); | |
dArr[i][0] = i; |
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
/** | |
* @author Dongxu Huang, Shu Ke, Wang Lei | |
* @date 2013-07-08 | |
*/ | |
document.addEventListener("mousemove", update_mouse_pos, true); | |
document.addEventListener("mouseup", on_mouse_up, true); | |
document.addEventListener("mousedown", on_mouse_down, true); | |
document.addEventListener("dblclick", on_mouse_dbclick, true); | |
var clientX, clientY; |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
.demo { | |
width: 200px; | |
height: 200px; | |
-webkit-box-shadow: 0px 0px 10px #333; | |
box-shadow: 0px 0px 10px #333; | |
color: transparent; |
NewerOlder