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
@img-size: 10px; | |
@url:'list.gif'; | |
ul { | |
margin:0; | |
padding: 0; | |
list-style: none; | |
} |
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
//load external js | |
function loadJs(src, callback) { | |
s = document.createElement("script"); | |
s.src = "src"; | |
if (s.addEventListener) { | |
s.addEventListener("load", callback, false); | |
} else if (s.readyState) { | |
s.onreadystatechange = callback; | |
} | |
document.body.appendChild(s); |
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
function test(str) { | |
return /.*{6,10}/g.test(str) && !!~str.search(/[a-zA-Z]/) && !!~str.search(/\d/) && !~str.search(/\W/); | |
} |
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 lang="utf-8"> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="css/style.css"> | |
<title>JQuery Template</title> | |
</head> | |
<body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> |
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 lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="css/style.css"> | |
<title>Prototype.js Template</title> | |
</head> | |
<body> | |
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script> |
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
// Internet Explorer detection. | |
function IE(version) { | |
var b = document.createElement('b'); | |
b.innerHTML = '<!--[if IE ' + version + ']><br><![endif]-->'; | |
return !!b.getElementsByTagName('br').length; | |
} | |
//Example | |
var IE6 = IE(6); | |
var IE7 = IE(7); |
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
tell application "Safari" | |
set u to the URL of the current tab of the first window | |
end tell | |
tell application "Google Chrome" | |
open location u | |
activate | |
end tell |
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
.thirdDiv { | |
width:50%; | |
display:inline-block; | |
display: -moz-inline-stack; /*Firefox 2*/ | |
zoom: 1; /* IE hack to trigger **hasLayout** */ | |
line-height:30px; | |
_height:30px;/* IE 6 Height */ | |
*display: inline; /* IE hack to achieve inline-block behavior */ | |
/* from http://blog.mozilla.org/webdev/2009/02/20/cross-browser-inline-block/ */ | |
} |
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
# editorconfig.org | |
root = true | |
[*] | |
indent_style = tab | |
indent_size = 4 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
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
public class Solution { | |
private static final String seq = "IVXLCDM"; | |
public int romanToInt(String s) { | |
if (null == s || s.length() == 0) { | |
return 0; | |
} | |
OlderNewer