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
JSON 0 secs ████████▍░░░░░░░░░░░░ 40.5% | |
TypeScript 0 secs ███████▌░░░░░░░░░░░░░ 35.9% | |
Markdown 0 secs ████▏░░░░░░░░░░░░░░░░ 19.9% | |
C++ 0 secs ▎░░░░░░░░░░░░░░░░░░░░ 1.3% | |
JavaScript 0 secs ▏░░░░░░░░░░░░░░░░░░░░ 1.1% |
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
GLAPI void GLAPIENTRY | |
gluLookAt(GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, | |
GLdouble upX, GLdouble upY, GLdouble upZ) { | |
int i; | |
Me::Vector3f forward, side, up; | |
Me::Matrix4X4f m; | |
forward.x = centerX - eyeX; | |
forward.y = centerY - eyeY; |
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
run(function*(){ | |
try{ | |
var tpContent = yield readFile('blog_post_template.html'); | |
var mdContent = yield readFile('my_blog_post.md'); | |
resp.end(template(tpContent, markdown(String(mdContent)))); | |
}catch(e){ | |
resp.end(e.message); | |
} | |
}); |
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
if (typeof Array.isArray === 'undefinded') { | |
Array.isArray = function (arg) { | |
return Object.prototype.toString.call(arg) === '[Object Array]'; | |
}; | |
} |
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 _gifPreview:GIFPlayer = new GIFPlayer(); | |
var _fr:FileReference = fr; | |
var _ba:ByteArray = _fr.data; | |
_gifPreview.loadBytes(_ba); | |
// _gifPreview is a Shape, just append to some where | |
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
// 沒有使用trigger | |
/** | |
* 按鈕A,點擊後彈出登陸框 | |
*/ | |
(function () { | |
$('.btn-a').bind('click', function () { | |
// 彈出登陸框 | |
$('.login-form').show(); | |
// balabalabala |
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
<!-- 条件注释hack法 --> | |
<!--[if IE 6]> | |
<link type="text/css" rel="stylesheet" href="ie6.css" /> | |
<![endif]--> | |
<!--[if gt IE 7]> | |
<link type="text/css" rel="stylesheet" href="ie6.css" /> | |
<![endif]--> | |
<!--[if gt IE 8]> | |
<link type="text/css" rel="stylesheet" href="ie6.css" /> |
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
// 较慢 | |
str += 'one' + 'two'; | |
str = 'one' + str + 'two'; | |
// 在IE7+,以及其他浏览器中以下两种都较快 | |
str += 'one'; |
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
/** | |
* DOM动画方法扩展 | |
* 使用方法: | |
* document.getElementsByTagName('div')[0].hide(200); | |
* document.getElementsByTagName('div')[0].show(500); | |
* document.getElementsByTagName('div')[0].animate(300, 300, 500); | |
*/ | |
(function (d) { |
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
/** | |
* 触发hasLayout | |
* IE下css解析的一些诡异问题可能与hasLayout没被触发 | |
*/ | |
.test-old { | |
height: 1%; | |
} | |
.test-best { |
NewerOlder