百度:Tangram
基本上就是个百度版jQuery,2.0版本使用链式API,更像了。
配套的还有UI库Magic和模版引擎BaiduTemplate(和ejs很像)
腾讯:JX
理念在介绍里面写的很详细,代码清晰,注释丰富,可读性很好,但只有文档没有实例。
比较传统的大块头框架,本质上来说还是一堆工具方法和对象的堆积,提供了很基本的模块化的开发方式,但没有模块间的依赖关系支持。
# find the months which First day is monday | |
# My related Blog: http://oldratlee.com/post/2012-11-13/1-st-day-is-monday-month-count | |
dayCountOfMonthOfYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] | |
dayCountOfMonthOfLeapYear = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] | |
print "Day count of non-leap year: ", sum(dayCountOfMonthOfYear) | |
# 365, day count of non-leap year | |
print "Day count of leap year: ", sum(dayCountOfMonthOfLeapYear) | |
# 366, day count of Leap year |
// 完成滚动信息的简短代码 | |
~function ($) { | |
/* 浮动信息插件 | |
* @author sofish, [email protected] | |
* @param options {Object} 加下的参数 | |
* { | |
* data: 传入的 JSON 数据 | |
* tmpl: 显示信息的格式模板 `{json 数组中 object 的 key 名} 发布了 {dataName}` | |
* 为了更快的匹配,{dataName} 中的 dataName 只支持除中文外的 js 变量名命名方法中支持的内容 |
<?php | |
/* | |
Description: A simple class based on a tutorial at WP.Tuts that creates an page with metaboxes. | |
Author: Stephen Harris | |
Author URI: http://www.stephenharris.info | |
*/ | |
/* Copyright 2011 Stephen Harris ([email protected]) | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by |
Git 比较不同版本文件差异的常用命令格式:
git diff 查看尚未暂存的文件更新了哪些部分
git diff filename 查看尚未暂存的某个文件更新了哪些
git diff –cached 查看已经暂存起来的文件和上次提交的版本之间的差异
git diff –cached filename 查看已经暂存起来的某个文件和上次提交的版本之间的差异
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
#!/usr/bin/ruby | |
# | |
# This script fixes /usr/local only. | |
# | |
# 6th January 2010: | |
# Modified the script to just fix, rather than install. - rpavlik | |
# | |
# 30th March 2010: | |
# Added a check to make sure user is in the staff group. This was a problem | |
# for me, and I think it was due to me migrating my account over several |