Search
6/26/2009
inarray performance comparsion
1.
revideo = /mp3|mp4|rm|asf|wma|avi|mpeg|wmv|mpg|3gp|flv|aac|wav|ram|gsm|divx|xvid|amr|rmvb|mov/;
function search_revideo = function (s) {
revideo.test(s);
}
2.
svideo = 'mp3|mp4|rm|asf|wma|avi|mpeg|wmv|mpg|3gp|flv|aac|wav|ram|gsm|divx|xvid|amr|rmvb|mov|';
function search_svideo = function(s) {
return svideo.indexOf(s + '|') === -1 ? false:true;
}
3.
avideo = ['mp3', 'mp4', 'rm', 'asf', 'wma', 'avi', 'mpeg', 'wmv', '3gp', 'flv', 'aac', 'wav', 'ram', 'gsm', 'divx', 'xvid', 'amr' ,'rmvb', 'mov' ];
function search_avideo = function(s) {
for (var i=0, len=avideo.length; i<len; i++) {
if (avideo[i] === t) {
return true;
}
}
return false;
}
4.
ovideo = { 'mp3' : null, 'mp4': null, 'rm': null, 'asf' : null, 'wma':null, 'avi' : null, 'mpeg': null, 'wmv' : null, '3gp':null, 'flv': null, 'aac' :
null, 'wav': null, 'ram':null, 'gsm':null, 'divx':null, 'xvid':null, 'amr':null, 'rmvb':null, 'mov':null }
function search_ovideo = function(s) {
return ovideo[s] === null;
}
跑十萬次
1. search_ovideo 41
2. search_avidoe 125
3. search_svideo 292
4. search_revideo 495
6/24/2009
6/23/2009
Frontend Performance Engineering in Facebook
Frontend Performance Engineering in Facebook
http://en.oreilly.com/velocity2009/public/schedule/detail/7611
http://en.oreilly.com/velocity2009/public/schedule/speaker/44495
http://en.oreilly.com/velocity2009
http://velocityconference.blip.tv/?sort=date;date=;view=archive;user=velocityconference;nsfw=dc;s=posts;page=1
6/17/2009
6/16/2009
師大美食
地址:台北市師大路92巷46號1樓(近台電大樓站3號出口)
電話:02-2369-6188
網站:http://www.wretch.cc/blog/alamaison
《食記》師大夜市瞞著爹壽司料理&步調咖啡
※瞞著爹壽司※
地址:台北市師大路68巷25號
電話:(02)23697871
時間:17:00~11:00;週一公休
6/11/2009
6/10/2009
Finally, a useful blink tag! Detecting your user blinking
Finally, a useful blink tag! Detecting your user blinking
Inspired by a demo by Paul Rouget, I’ve created an image processing demo that detects eye blinks in real-time. It uses a combination of
6/06/2009
6/05/2009
Optimize browser rendering
Optimize browser rendering
Web Performance Best Practices
Using Page Speed
isServingFromCache
http://page-speed.googlecode.com/svn/trunk/src/js/activity/request-observer.js
/**
* @param {nsIRequest} request the request to get the URL for.
* @return {boolean} whether the response is being served from cache.
* @private
*/
activity.RequestObserver.isServingFromCache_ = function(request) {
var cachingChannel =
activity.xpcom.QI(request, activity.xpcom.CI('nsICachingChannel'));
return request.isPending() && cachingChannel.isFromCache();
};
http://page-speed.googlecode.com/svn/trunk/src/js/closure/base.js
goog.inherits = function(childCtor, parentCtor) {
/** @constructor */
function tempCtor() {};
tempCtor.prototype = parentCtor.prototype;
childCtor.superClass_ = parentCtor.prototype;
childCtor.prototype = new tempCtor();
childCtor.prototype.constructor = childCtor;
};
6/04/2009
6/03/2009
6/01/2009
CSPP 523 Home Page
Lecture Notes:.
Lecture 1: html pdf ps
Lecture 2: html pdf ps
Lecture 3: html pdf ps
Lecture 4: html pdf ps
Lecture 5: html pdf ps
Lecture 6: html pdf ps
Lecture 7: html pdf ps
University of Chicago CSPP 523 Course Syllabus
Pattern-Oriented Software Architecture: A System of Patterns, Buschmann, Meunier, et. al., Wiley, 1996, ISBN: 0471958697
Refactoring: Improving the Design of Existing Code, Martin Fowler, et. al., Addison Wesley, 1999, ISBN: 0201485672
Design Patterns, Gamma, et. al., Addison Wesley, 1995, ISBN: 0201633612
Digg the Blog » Blog Archive » DUI.Stream and MXHR
Digg the Blog » Blog Archive » DUI.Stream and MXHR
Mutli-part Response-Type.
Comet Daily » Blog Archive » A Standards Based Approach to Comet Communication with REST
using the Mutipart-mixed response-type allows a server to send multiple response-types (MIME-types) in one HTTP message.