Search

2/27/2008

Microsoft Office Binary (doc, xls, ppt) File Formats

Microsoft Office Binary (doc, xls, ppt) File Formats

Microsoft Word
Word 97-2007 Binary File Format (.doc) Specification PDF | XPS
Microsoft PowerPoint
PowerPoint 97-2007 Binary File Format (.ppt) Specification PDF | XPS
Microsoft Excel
Excel 97-2007 Binary File Format (.xls) Specification PDF | XPS
Excel 2007 Binary File Format (.xlsb) Specification PDF | XPS
Office Drawing
Office Drawing 97-2007 Binary Format Specification PDF | XPS

wbr

wbr

<wbr> (word break) means: "The browser may insert a line break here, if it wishes." It the browser does not think a line break necessary nothing happens.

I give the browser the option of adding a line break. This won't be necessary on very large resolutions, when the table has plenty of space. On smaller resolutions, however, such strategically placed line breaks keep the table from growing larger than the window, and thus causing horizontal scrollbars.

2/24/2008

What is a leecher/seeker

What is Torrent, Leecher and seeder? - AiO Forums ~ Community to Hang Out & Stick to~

What is a leecher ?

A leech(er) is a client on the BT network that does not have a complete copy of a particular archive yet. When any new client begins downloading an archive, they are a leecher until they have finished downloading the entire archive and then become a seeder. The name 'leecher' here is an unfortunate use that has become too commonly used even though it is really not applicable to what the meaning is. A leecher normally means someone who downloads without uploading (takes but does not give.) But here, a leecher is part of the network and is uploading as well, many times more KB than they download. But hey, it's worth the new meaning once you appreciate the vast resources that BT brings to you.

What is a seeder ?

A seed(er) is a client on the BT network that has a complete copy of a particular archive. For any archive to work, there must be at least one seed to download from originally. Sometimes under certain circumstances, there may be no one seeder but enough people with all the parts to make up the whole archive, this is called a distributed copy. It is HIGHLY recommended that once you have gotten an archive you leave the BT client running for at least the amount of time that it took you to download the archive to help ensure that others will also be able to get it. Share and Share alike!

2/23/2008

(译)开发人员经常犯的8个设计错误 at Taobao.com UED Team

(译)开发人员经常犯的8个设计错误 at Taobao.com UED Team
8 Web Design Mistakes That Developers Make

“我知道什么看起来很好(我有photoshop)”
你需要把时间花费在看伟大的设计上,诸如 TheFWA, FaveUp, Design is Kinky, 和我个人喜欢的 Behance Network 这些网站。你可能也知道如何去挑选设计杂志,比如How或者print(注意两者并不都是美国的,可能更加国际化一些)。

“一再地使用蓝色和白色”
寻找配色方案最好的一个站点是 COLOURlovers.

“我们可以在那里放置更多的信息”
需要知道(a)杂乱的网站可能没有效果(b)留白不是设计师偷懒 (c)被称作“空”的部分是很必要的,以便突出其它元素。

“我可不想为照片付钱”
在网页上那么多的资源,没有理由使用差劲的图片。对于非营利站点而言,可以查看stock.xchngFlickr。对于商业的站点,有许许多多的站点,比如iStockPhoto(但是需要了解版权的知识,因为不久后,你可能在其他站点上看到同样的照片了)。最后不要为在诸如Veer这样的站点上找到完美的照片而花费大笔的钱吓坏了。

2/22/2008

Motionbox EventHandler: Event Subscription and Delegation

Ajaxian » Motionbox EventHandler: Event Subscription and Delegation - 持續關注中。簡單的講就是在 document.body observe 所有 bubble 上來的 event.

As you know, the technique of listening to events high in the DOM adds a lot of benefits. The two most notable are:

1. The ability to bind to events before the elements are available in the DOM. This is especially useful for AJAX applications where the DOM is being updated as there is no need to (re)create all your observers. Using this library, the developer doesn't care if an element exists or not, he/she can simply say "any thing with this class works this way" and "anything with this ID does this" All with a simple interface: MBX.EventHandler.subscribe("#myId", "click", myHandlerFunction);
2. Since we handle events outside of the usual manner, custom event handling becomes trivial. The subscription interface is exactly the same, and custom events can be fired easily with: MBX.EventHandler.fireCustom(domElement, "my_custom_event_name");

A Look at Sun.COM's New Event Delegation Library - Gregory Reimer's Weblog
How is this even possible?
Two facts conspire to make this feasible. 1) The <body> (document.body) is available almost immediately. 2) Most events bubble. All you need to do is to stand on document.body, and you're privy to almost every event that occurs on the page, right out of the gate. No need to go seeking out the elements you need, they literally bubble their way to you. All you do is grab the event's target and ask the question, does this element, or one of its ancestors, match 'ul.foo > li > a.bar'? If so, run the associated function, if not, ignore it. This is really just event delegation, and it's nothing new, but we've made little use of it on Sun.COM before now.

Limitations, caveats, dangers
I harbor no illusions this is a perfect solution. There are limitations. Besides the fact that not all events bubble, much of time, behavior depends exclusively on preprocessing, especially if you're doing progressive enhancement. You don't want non-JS users to see useless expand/collapse signs or widgets laying around, so you build the widgets only if scripting is enabled. And the only time to build the widgets is onload. And the only way to build the widgets in the right place is... *sigh* traversal. Some of this can fortunately be avoided by relying as much as possible on CSS and making your widget styles depend on a dynamically-added class name, such as body.jsenabled, so there's some workaround potential at least.

There's also an inherent performance limitation. Sitting in the driver's seat on document.body isn't always a relaxing cruise through the countryside. It can easily turn into rush-hour gridlock, with a flood of events each demanding to be checked. For that reason, I dare not use this technique to handle mousemove events. That would cause a veritable torrent of events. Even mouseover events are iffy. We have the capability and it appears to work reasonably well, but time will tell whether it's really viable. Click events, on the other hand, because of their relative infrequency, are a good candidate. Of course, as we develop this thing further, we'll be looking for ways to mitigate performance risks.

ROT13 - Wikipedia, the free encyclopedia

ROT13 - Wikipedia, the free encyclopedia - ggVGg? : rot13 whole file

ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple substitution cipher used in online forums as a means of hiding spoilers, punchlines, puzzle solutions, and offensive materials from the casual glance. ROT13 has been described as the "Usenet equivalent of a magazine printing the answer to a quiz upside down".[1] ROT13 is a variation of the Caesar cipher, developed in ancient Rome.

ROT13 is its own inverse; that is, to undo ROT13, the same algorithm is applied, so the same action can be used for encoding and decoding. The algorithm provides no real cryptographic security and is not normally used for such. It is often cited as a canonical example of weak encryption. ROT13 has inspired a variety of letter and word games on-line, and is frequently mentioned in newsgroup conversations.

2/21/2008

Definition Lists. DL, DT and DD

Definition Lists. DL, DT and DD

<DL>
A definition list is the container element for DT and DD elements. The DL element should be used when you want incorporate a definition of a term in your document, it is often used in glossaries to define many terms, it is also used in "normal" documents when the author wishes to explain a term in a more detail (Like this definition).
<DT>
The term currently being defined in the definition list. This element contains inline data.
<DD>
The definition description element contains data that describes a definition term. This data may be either inline, or it may be block level.

Single Definition Term - Single Description
<dl>
<dt>Cascading Style Sheets</dt>
<dd><p>Style sheets are used to provide presentational suggestions.</p>
<p>Documents structured using XML or HTML are able to make use of them.</p></dd>
<dt>Content Management</dt>
<dd>The process of collecting, managing and publishing content to various media.</dd>
</dl>

Multiple Terms - Single Description

<dl>
<dt>Number 9</dt>
<dt>Striker</dt>
<dt>Centre Forward</dt>
<dd>The player who should be scoring the most goals in a game of (real) football.</dd>
</dl>

Single Term - Multiple Descriptions

<dl>
<dt>Centre</dt>
<dd>A point equidistant from all points on the surface of a sphere.</dd>
<dd>In some field sports, the player who holds the middle position on the field, court, or forward line.</dd>
</dl>

Multiple Terms - Multiple Descriptions

<dl>
<dt>Garbage</dt>
<dt>Rubbish</dt>
<dd>Waste material that is disposed of.</dd>
<dd>Television shown during the daytime, "Daytime TV".</dd>
</dl>

ydn-javascript : Message: YUI 2.5.0 now available

ydn-javascript : Message: YUI 2.5.0 now available

    The 2.5.0 release adds 6 new components to the YUI Library:

  • Cookie Utility: a utility package that supports reading and writing of cookies via JavaScript; Cookie includes the concept of sub-cookies, which provides maximum use of limited cookie space.
  • Image Cropper: an API that makes an image croppable with a user interface similar to those implemented in desktop applications.
  • Layout Manager: eases the development of full-page or element-level multi-pane UIs; each unit within the layout is resizable, collapsible, and removable.
  • Resize: an API which makes any block-level element resizable either directly or by proxy.
  • Uploader: the Flash-based file uploader developed for Yahoo! applications like Flickr is now part of YUI. Its functionality is made accessible via a JavaScript interface; it supports multiple-file upload, access to file metadata, improved performance (versus traditional upload) on fast connections, and progress tracking.
    • Profiler Viewer: this component is designed to work with the Profiler; it provides a visual display of profiling data.

2/20/2008

Julien Lecomte’s Blog » Goodbye Yahoo! Hello Apple!

Julien Lecomte’s Blog » Goodbye Yahoo! Hello Apple! - YUI compressor & YUI history manager 的作者 Julien Lecomte 離開 YUI team 到 蘋果去了,這陣子走了不少人阿

John Resig - Interviewing for Open Source

John Resig - Interviewing for Open Source

Conversely, experience and initiative have a huge amount of power over an applicant. If you're able to demonstrate that you've devoted large amounts of time to building side projects (especially when they're Ajax-y web applications - PHP, Ruby, Python, Perl - all good). Since most of the people that I talk to for Mozilla are coming from MIT they all end up being amazingly similar. The deciding factors for a candidate come down to how they've gone beyond the basic program and excelled. This is especially important since good web development skills aren't seemingly taught in the MIT curriculum, which is a shame.

JavaScript Language: Good knowledge of the language - an understanding of its functional aspects and prototypal inheritance are usually the most that I can hope for.

Cross-Browser Code: Writing effective cross-browser code is incredibly difficult and can be a good way of marking a proficient JavaScript developer. One of my favorite questions to figure this out is "What is your favorite cross-browser bug?" - either the candidate has like 20 answers or doesn't know what I'm talking about.

Testing: Having test-backed code is pretty common in software development but still in its relative infancy in the land of JavaScript. Developing JavaScript tests, using a test suite - or even having written your own suite - score big.

For Firefox Frontend Engineers, in particular, I also tend to look at the two other core aspects: CSS and XUL.

CSS: It's surprisingly easy to weed out people who do, or don't, know CSS. Ask the question "What's the syntax for making all paragraphs on a page red." If they aren't able to give you some combination of "p color colon red" then it's time to move on. If they handle that then it's good to explore CSS property manipulation in JavaScript, making sure they have a good grasp of that.

XUL: By far the most challenging skillset to find. Oftentimes when I actually interview a candidate that has XUL knowledge they're more proficient than I am. However, most people aren't familiar with XUL so I tend to explore topics like XML, XPath, XSLT, and SVG. Having good knowledge of any of those is a big win.

As far as my favorite pure cross-browser bug I think it would have to be how Safari 3 handles computed css style on elements that are display: none. Effectively an empty value is returned for every element - however there is no way to determine if that empty value is actually a correct value, or if you're just being lied to. The only way to do it (as I've found) is to check and see what the 'color' of the element is. All elements appear to have some color (even iframes, objects, etc.) associated with them so if no value is returned then I assume that we're dealing with a broken computed style function. Fun times.

How vista launches programs - or, a detailed analysis of how precisely not to launch programs

reddit.com: How vista launches programs - or, a detailed analysis of how precisely not to launch programs

Create a folder named test (whatever the name actually) on your desktop, open Internet Explorer and type the name of the folder in the URL bar.. surprise !

But a genius in the IE team assumed that I would like to search in my Desktop for a folder and open it in first place.

That's excellent! I just made a folder called "microsoft.com" on my desktop. When I opened IE7, and typed in microsoft.com, it decided to open the folder on my desktop instead of microsoft.com. I'm using Vista. Wow indeed.

John Resig - Most Bizarre IE Quirk

John Resig - Most Bizarre IE Quirk


setInterval(function(){
alert("hello!");
}, -1);

What happened is positively bizarre: The callback function will be executed every time the user left clicks the mouse, anywhere in the document.

女工程師的紐約生活手札 - Blue or Green?

女工程師的紐約生活手札 - Blue or Green?

我記得我在之前回覆留言時有提到,現在就順便再提一次,在美國工作場合,有三件事是大禁忌(taboo),除非你準備隔天辭職,不然絕對不要在同事面前大肆談論。這三件事就是:政治、宗教信仰和薪水。
[註二] 美國一樣有顏色(藍紅)之爭,民主黨(代表顏色藍),共和黨(代表顏色紅),共和黨代表比較保守的力量(比較明顯的主張如:對移民不友善、種族歧視比較明顯、不贊成同性婚姻等),地理位置上來看他們佔據大部分中西部的州,而民主黨代表的事比較開放開明的政策,支持力量主要是在美東、美西沿岸的州。

Consistent hashing - Wikipedia, the free encyclopedia

Consistent hashing - Wikipedia, the free encyclopedia

Consistent hashing is a scheme that provides hash table functionality in a way that the addition or removal of one slot does not significantly change the mapping of keys to slots. In contrast, in most traditional hash tables, a change in the number of array slots causes nearly all keys to be remapped. By using consistent hashing, only K/n keys need to be remapped on average, where K is the number of keys, and n is the number of slots.

» MMDays - Mr. Monday - 五里迷霧中設計新產品

» MMDays - Mr. Monday - 五里迷霧中設計新產品

少即是多
通常在 RD 的眼裡是物盡其用,不然豈不就是浪費資源。但是如果所設計出來的東西沒人想用,那恐怕才是真正的浪費資源。是這個樣子的,通常來說,每多加一個功能就會讓產品的介面以及複雜度多增加一點,因此如果多加了一堆功能,介面在呈現上面就無法簡潔。而當介面呈現過於複雜時,恐怕連技術狂熱者都想要退避三舍了。更何況是新創產品在市場上面是一般人認知度比較低的情況。

2/19/2008

新的 GPL 字型:文泉驛正黑

新的 GPL 字型:文泉驛正黑 at Gea-Suan Lin’s BLOG

又多了一套字型可以用了:文泉驿开源矢量中文字体,包括了 GB2312、Big5,以及日韓文,以 GPL 發行。(請注意,關於 GPL Fonts 的問題請參考 How does the GPL apply to fonts?)

回程速記

1. 柬國政府鼓勵生育,所以小孩個數都是從七個到十幾個都有,每生一個政府給一塊土地在小孩子的名下。
2. 當地導遊的是領公司日薪的,15 us dollar per day。
3. 基本上柬國是貪污蠻嚴重的一個國家,包括海關在內,通常都會跟遊客說"one dollar, one dollar",這次付了 3 us dollar 的快速通關費,真的很快,護照一疊給他,遊客魚貫走過去就可以了,也沒有一個一個看。
5.當地導遊是華僑第三代,考導遊記得花了台幣10萬左右,基本上不花錢是考不上的。導遊考證照的錢是賣土地來的。
6. 導遊有十個兄弟姊妹,排行老四,第一跟第二都是姊姊,死於赤棉政權下,第三的姊姊出車禍身亡。
7. 導遊做過爬樹摘椰子,後來養雞,太慢,後來學補輪胎,後來在吳哥地區老師,因收入太少所以學中文,考導遊。
8. 台灣這邊的領隊是沒有底薪的,收入是小費,每人每日$200 NT dollars.
9. 柬國的貨幣雖然有當地的柬幣,不過大部分都以美金為主,柬幣為輔,也可能是因為我們到的地方都是觀光客為主,譬如買一包 Lays 洋芋片,0.85美金,給他一元美金會找 (1-0.85)*4000 = 150柬幣。
10. 當地的小孩不要糖果美金,導遊建議是衣物,書包,筆記本,書,筆之類幫助學習的東西,在那邊看到幾次當地小孩穿台灣送過去的衣服,像是許添財的競選帽子,以及台南縣某國小幼稚園的衣服。
10. 柬國很熱,雖然二月是柬國的冬天,不過氣溫一直都在27-30度左右,中午更熱,所以通常都是7:00起床,8:00出門,逛到十一點多太陽大時吃飯,吃完飯就回飯店睡午覺,通常睡兩到三個小時,整體講起來蠻悠閒放鬆的。
11. 吃的大致上都是中式合菜,常吃到的有滷豬腳,炒空心菜,炒茄子等等。
12. 購物形成有兩個,都是寶石,十克拉的頂級紅寶石開價只要 NT $8000,業績掛零。
13. 椰子一顆大概台幣20塊錢。吃過當地的食物還有水煮玉米,跟台灣的差不多,蠻甜的,還有一種叫做牛奶果的熱帶水果。

2/14/2008

Flickr Uploadr: Open Source and Powered by XULRunner

Flickr Uploadr: Open Source and Powered by XULRunner (Yahoo! Developer Network blog)
flickr uploadr source code

First off, the new Flickr Uploadr is built on top of Mozilla technology--XULRunner to be specific. If you haven't heard of XULRunner...

XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications that are as rich as Firefox and Thunderbird. It will provide mechanisms for installing, upgrading, and uninstalling these applications. XULRunner will also provide libxul, a solution which allows the embedding of Mozilla technologies in other projects and products.

The choice to build on XULRunner is something that I discussed with Richard Crowley in this video for our Experts at Work series on YDN Theater.

2/12/2008

A JavaScript Module Pattern » Yahoo! User Interface Blog

A JavaScript Module Pattern » Yahoo! User Interface Blog
1. Create a namespace object:


YAHOO.namespace("myProject");

2. Assign the return value of an anonymous function to your namespace object:

YAHOO.myProject.myModule = function () {

return {
myPublicProperty: "I'm accessible as YAHOO.myProject.myModule.myPublicProperty.";
myPublicMethod: function () {
YAHOO.log("I'm accessible as YAHOO.myProject.myModule.myPublicMethod.");
}
};

}(); // the parens here cause the anonymous function to execute and return

3. Add “private” methods and variables in the anonymous function prior to the return statement.

YAHOO.myProject.myModule = function () {

//"private" variables:
var myPrivateVar = "I can be accessed only from within YAHOO.myProject.myModule.";

//"private" method:
var myPrivateMethod = function () {
YAHOO.log("I can be accessed only from within YAHOO.myProject.myModule");
}

return {
myPublicProperty: "I'm accessible as YAHOO.myProject.myModule.myPublicProperty."
myPublicMethod: function () {
YAHOO.log("I'm accessible as YAHOO.myProject.myModule.myPublicMethod.");

//Within myProject, I can access "private" vars and methods:
YAHOO.log(myPrivateVar);
YAHOO.log(myPrivateMethod());

//The native scope of myPublicMethod is myProject; we can
//access public members using "this":
YAHOO.log(this.myPublicProperty);
}
};

}(); // the parens here cause the anonymous function to execute and return


<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/utilities/utilities.js"></script>

<ul id="myList">
<li class="draggable">Item one.</li>
<li>Item two.</li> <!--item two won't be draggable-->
<li class="draggable">Item three.</li>
</ul>

<script>
YAHOO.namespace("myProject");
YAHOO.myProject.myModule = function () {

//private shorthand references to YUI utilities:
var yue = YAHOO.util.Event,
yud = YAHOO.util.Dom;

//private method:
var getListItems = function () {

//note that we can use other private variables here, including
//our "yud" shorthand to YAHOO.util.Dom:
var elList = yud.get("myList");
var aListItems = yud.getElementsByClassName(
"draggable", //get only items with css class "draggable"
"li", //only return list items
elList //restrict search to children of this element
);
return aListItems;
};

//the returned object here will become YAHOO.myProject.myModule:
return {

aDragObjects: [], //a publicly accessible place to store our DD objects

init: function () {
//we'll defer making list items draggable until the DOM is fully loaded:
yue.onDOMReady(this.makeLIsDraggable, this, true);
},

makeLIsDraggable: function () {
var aListItems = getListItems(); //these are the elements we'll make draggable
for (var i=0, j=aListItems.length; i<j; i++) {
this.aDragObjects.push(new YAHOO.util.DD(aListItems[i]));
}
}

};
}(); // the parens here cause the anonymous function to execute and return

//The above code has already executed, so we can access the init
//method immediately:
YAHOO.myProject.myModule.init();
</script>

with Statement Considered Harmful » Yahoo! User Interface Blog

with Statement Considered Harmful » Yahoo! User Interface Blog


ooo.eee.oo.ah_ah.ting.tang.walla.walla.bing = true;
ooo.eee.oo.ah_ah.ting.tang.walla.walla.bang = true;

Will ooo.eee.oo.ah_ah.ting.tang.walla.walla be modified? Or will the global variables bing and bang get clobbered? It is impossible to know for sure.

instead of writing

with (ooo.eee.oo.ah_ah.ting.tang.walla.walla) {
bing = true;
bang = true;
}

write

var o = ooo.eee.oo.ah_ah.ting.tang.walla.walla;
o.bing = true;
o.bang = true;

Helping the YUI Compressor » Yahoo! User Interface Blog

Helping the YUI Compressor » Yahoo! User Interface Blog
it can perform all kinds of smart operations to save bytes in a completely safe way:

* Replacement of local variable names with shorter (one, two, or three character) variable names.
* Replacement of bracket notation with dot notation where possible (i.e. foo["bar"] becomes foo.bar).
* Replacement of quoted literal property names where possible (i.e. { "foo":"bar" } becomes { foo:"bar" } ).
* Replacement of escaped quotes in strings (i.e. 'aaa\'bbb' becomes "aaa’bbb").
Use Constants for Repeated Values
instead of writing


function toggle(element){
if (YAHOO.util.Dom.hasClass(element, "selected")){
YAHOO.util.Dom.removeClass(element, "selected");
} else {
YAHOO.util.Dom.addClass(element, "selected");
}
}
function toggle(A){if(YAHOO.util.Dom.hasClass(A,"selected")){YAHOO.util.Dom.removeClass(A,"selected")}else{YAHOO.util.Dom.addClass(A,"selected")}}

write

function toggle(element){
var className = "selected";
if (YAHOO.util.Dom.hasClass(element, className)){
YAHOO.util.Dom.removeClass(element, className);
} else {
YAHOO.util.Dom.addClass(element, className);
}
}
function toggle(A){var B="selected";if(YAHOO.util.Dom.hasClass(A,B)){YAHOO.util.Dom.removeClass(A,B)}else{YAHOO.util.Dom.addClass(A,B)}}

Store Local References to Objects/Values

function toggle(element){
var className = "selected";
var YUD = YAHOO.util.Dom;
if (YUD.hasClass(element, className)){
YUD.removeClass(element, className);
} else {
YUD.addClass(element, className);
}
}
function toggle(A){var B="selected";var C=YAHOO.util.Dom;if(C.hasClass(A,B)){C.removeClass(A,B)}else{C.addClass(A,B)}}

Realazy » reflow

Realazy » reflow

CSS规范中有一个渲染对象的概念,通常用一个盒子(box, rectangle)来表示。mozilla通过一个叫frame的对象对盒子进行操作。frame主要的动作有三个:
* 构造frame, 以建立对象树(DOM树)
* reflow, 以确定对象位置,或者是调用mozilla的Layout(这里是指源码的实现)
* 绘制,以便对象能显示在屏幕上
reflow就是载入内容树(在HTML中就是DOM树)和创建或更新frame结构的响应的一种过程。
把元素置为display:none,相当于把这个元素的frame销毁了,再置回非none时,需要重新构造frame,这就产生了reflow. 而另外一个切换可见性的属性visibility则不存在reflow问题,置为visibility:hidden的元素的frame并没有销毁,需要显示的时候其实就是一个绘制(上面提到的动作第三步)过程而已,没有reflow,因此效率会更高。如果你看过一些JavaScript库/框架的源码,会发现它们大量使用visibility而不是display,道理应该如此。
24条留言 »

2/08/2008

(译)开发人员经常犯的8个设计错误 at Taobao.com UED Team

(译)开发人员经常犯的8个设计错误 at Taobao.com UED Team

Re: Real men don't attack straw men [LWN.net]

Re: Real men don't attack straw men [LWN.net]

For personal reasons, I do not browse the web from my computer. (I
also have not net connection much of the time.) To look at page I
send mail to a demon which runs wget and mails the page back to me.
It is very efficient use of my time, but it is slow in real time.

via: Richard Stallman is Getting Things Done (GTD). Old School. (by Jeremy Zawodny)

段正淳的css笔记(7)-表单在各个浏览器下的表现统一 at Taobao.com UED Team

段正淳的css笔记(7)-表单在各个浏览器下的表现统一 at Taobao.com UED Team

1. Safari 3之前的表单部件是不允许 CSS 控制的。
2. Windows 有各种各样的主题,Linux 也是。浏览器都一定程度上受到主题的影响。
3. 2004年就有人说为表单样式化不是个好主意:http://www.themaninblue.com/writing/perspective/2004/04/28/
4. 延伸阅读: http://www.456bereastreet.com/archive/200705/why_styling_form_controls_with_css_is_problematic/
5. 或许也可以看看你实在是控制不了那么多:http://www.456bereastreet.com/archive/200410/styling_even_more_form_controls/
结论:不要对表单作任何样式化(通常由于* {margin:0; padding:0} 导致表单的默认样式被改才显得难看,所以老老实实写需要 reset 的元素,不要用通配符。)

JavaScript security & XSS

John Resig - JavaScript-Based Injection Attacks
Secure String Interpolation
sla.ckers.org web application security forum :: XSS Info :: New XSS vectors/Unusual Javascript
p42 labs
XSS Attacks: Cross Site Scripting ... - Google 圖書搜尋

Newline - Wikipedia, the free encyclopedia

Newline - Wikipedia, the free encyclopedia

Systems based on ASCII or a compatible character set use either LF (Line feed, 0Ah) or CR (Carriage Return, 0Dh) individually, or CR followed by LF (CR+LF, 0Dh 0Ah); see below for the historical reason for the CR+LF convention. These characters are based on printer commands: The line feed indicated that one line of paper should feed out of the printer, and a carriage return indicated that the printer carriage should return to the beginning of the current line.

* LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, etc.), BeOS, Amiga, RISC OS, and others
* CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows
* CR: Commodore machines, Apple II family and Mac OS up to version 9

dos/unix - Everyday Work
Windows/Dos 下文字檔案是用 CR LF 兩個字元 (ASCII 13 的 \r, 和 ASCII 10 的 \n) 代表分行;程式看到這兩個字元連在一起,就該知道要換行。在 Un*x 下,分行則只用 LF 來代表;程式只需要看到這一個字元就知道要換行。

在 vim 裡,用 set ff=unix 可以把文字檔改成 Un*x 用的格式 (set ff=dos 則改成 DOS 格式),執行後儲存就好了。

2/07/2008

從 Facebook 看起,你的個人資料究竟算誰的?

從 Facebook 看起,你的個人資料究竟算誰的?

web scraping 廣義來說是讓電腦自動去擷取網路上資料的一種通稱
Robert Scoble 這個傢伙是在部落界最為有名的 blogger 之一,他也為部落格寫了一本書叫做「裸體商業革命
但是一但 Facebook 用這種方式把你的個人資料給吸進去之後,他們就拒絕再把資料用任何方式吐出來,這就是 Robert Scoble 覺得不合理的地方,為什麼 Facebook 可以從別人那邊搜括你的個人資料,但是使用者卻不能把自己的資料再拿出來,這根本就是一個單方面的雙重標準.所以他之所以要開始去把資料搶回來,為的就是打破 Facebook 的這面高牆,讓他們知道使用者的資料不應該被他們這樣子封鎖起來.他要逼 Facebook 主動提供介面,讓使用者可以把自己的資料帶走.
不知道是時機剛剛好還是事件本身的影響,反正 Robert Scoble 的行為也算是收到了成效.五天之後,Google 和 Facebook 以及 Plaxo 三家公司都加入了 DataPortability 這個團體.DataPortability 這個組織的目的在於透過整合和推廣開放的標準,設計出和推行讓使用者資料可以在網路上各個地方暢行無阻的機制.等於就是把使用者的資料整個開放出來,當然具體的細節還在研擬之中,各家公司的配合也是不可或缺的成功要素.值得注意的是,使用者的資料流通性更大之後,安全性又是一個重要的考量.

2/01/2008

Taking Browser Tabs Seriously

Taking Browser Tabs Seriously - good point!
Software As She’s Developed » Blog Archive » Dynamic Favicon Library Updated
Favicon Demo

* Notifications. The whole issue of attention and notifications needs re-thinking in light of the new world of rich web apps. Quintessential example is web chat - how do you inform the user someone has sent a message, in another window? The favicon library helps here, and the update in my next post, helps a bit more. Playing a sound is also possible. Still, I would like to see API support for ambient dialogs, like Growl/Snarl and the Windows “sunrise” notfier that emerges from the taskbar (what’s it called officially?). And sound. It’s 2008, why can’t browsers issue a single beep like a good 1970s PC, without requiring flash or unreliable hacks!!! Speaking of sound …
* Where’s that sound coming from? There’s a sound in my browser, but I don’t know where! Tabs should provide a visual indication if a sound is emerging from them.
* Default/Custom Favicons. If a site doesn’t have a favicon, browsers show nothing. Bzzzt!!! They should provide more sensible defaults, e.g. at least show the site’s background colour or a thumbnail of the first image. Something to make them all different from each other.
* Provide a Summary List. Like clicking on Ctrl-Alt-Delete in Windows to get a task list or “ps” in Unix. You’d be able to see how long each tab has been open, memory usage, other excitement.
* COLOUR AND STUFF!!! Browser tabs are pretty dull - just an icon and some text. Using cues such as colour and font styles, the browser could say a lot more about what’s happening in the other tabs. Perhaps it could be set by the programmer or perhaps it could be set by the user (e.g. create a heatmap highlighting the least used tabs).
* Javascript events. Javascript onEntered()/onExited() events to let the application know if it’s active or not. (Similar to what desktop apps receive.) This would be absolutely brilliant for when you are notifying the user about something they need to see (e.g. a new chat message) - once they re-enter the tab, you can switch off the notification.
* Open Forms. What about when I start writing something in a form, then switch tabs, and forget which tab has the form, or forget that it’s there at all. The browser should indicate when there’s a form open that you’ve been writing to. (Though in some cases auto-backup features may mean that’s not necessary.)
* Search. No-brainer. Browser search should work across all tabs, not just the one currently open. This would not only help you find some text, but also pinpoint one of the fifty tabs you have open.
* Virtual Desktop. Maybe it sounds mad, but I’d like something similar to virtual desktop (”Spaces” for Mac-heads). ie Switch from “work” tabset to “social” tabset, etc.
* Auto-remove. Instead of forcing me to close all windows, or some random subset, or restart the browser altogether, provide some support for removing the tabs that matter least. e.g. the tabs that I haven’t used for the longest and which I appear not to have interacted with (ie started editing a form), and/or the tabs that are taking up the most resources.

Rotating Java and JavaScript on the Server on Dion Almaer's Blog

Rotating Java and JavaScript on the Server on Dion Almaer's Blog
Ajaxian » Rhino on Rails: JavaScript MVC on the server
javajshistory