發信人: [email protected] ()
日期: Fri Mar 29 12:05:03 2002
標題: [轉貼] [轉錄]程式設計師懺情錄(上)
作者: erictsai (連備取都沒有的白痴!) 站內: TFcis
標題: [轉錄]程式設計師懺情錄(上) --eric要我轉的
時間: Thu Mar 28 20:54:12 2002
※ 本文轉錄自 [erictsai] 信箱
發信人: [email protected] ()
日期: Fri Mar 29 12:05:03 2002
標題: [轉貼] [轉錄]程式設計師懺情錄(上)
作者: erictsai (連備取都沒有的白痴!) 站內: TFcis
標題: [轉錄]程式設計師懺情錄(上) --eric要我轉的
時間: Thu Mar 28 20:54:12 2002
※ 本文轉錄自 [erictsai] 信箱
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
#Four Ways To Do Pub/Sub With jQuery 1.7 and jQuery UI (in the future)
Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.
(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)
##Option 1: Using jQuery 1.7's $.Callbacks() feature:
require "rubygems" | |
require "rbosa" | |
require "cgi" | |
require "htmlentities" | |
require 'iconv' | |
OSA.utf8_strings = true | |
evernote = OSA.app('Evernote') | |
coder = HTMLEntities.new |
/* | |
* Placeholder plugin for jQuery | |
* @author Daniel Stocks (http://webcloud.se) | |
*/ | |
(function($) { | |
function Placeholder(input) { | |
this.input = input; | |
if (input.attr('type') == 'password') { | |
this.handlePassword(); | |
} |
# AwesomeRouter: A class that I've been using throughout a few Backbone.js apps I've built. | |
# | |
# It adds 2 features: an event that gets fired when one calls `navigate` (aptly named | |
# "navigate"), so you can bind things to when a URL gets triggered. And a "before filter" | |
# method `before`, which you can use to run things before every a route gets triggered. | |
# | |
# This could easily be extended to have after filters too, or to only trigger a route | |
# upon @before returning something that's not false. | |
class AwesomeRouter extends Backbone.Router |
Update: The original post on Netmag has been updated since this was written.
I tweeted earlier that this should be retracted. Generally, these performance-related articles are essentially little more than linkbait -- there are perhaps an infinite number of things you should do to improve a page's performance before worrying about the purported perf hit of multiplication vs. division -- but this post went further than most in this genre: it offered patently inaccurate and misleading advice.
Here are a few examples, assembled by some people who actually know what they're talking about (largely Rick Waldron and Ben Alman, with some help from myself and several others from the place that shall be unnamed).