itstandup.blogspot.com
IT-Standup: Thoughts on Flash by Steve Jobs
http://itstandup.blogspot.com/2010/04/thoughts-on-flash-by-steve-jobs.html
Thoughts on Flash by Steve Jobs. First, there’s “Open”. Adobe’s Flash products are 100% proprietary. They are only available from Adobe, and Adobe has sole authority as to their future enhancement, pricing, etc. While Adobe’s Flash products are widely available, this does not mean they are open, since they are controlled entirely by Adobe and available only from Adobe. By almost any definition, Flash is a closed system. Second, there’s the “full web”. Fourth, there’s battery life. To achieve long battery...
itstandup.blogspot.com
IT-Standup: 二月 2010
http://itstandup.blogspot.com/2010_02_01_archive.html
CD-ROM 因為在設計上是 定線速,所以在讀內圈資料和讀外圈資料時的. 碟片轉速會不同,讀內圈時會比外圈快得多,而為了要簡化設計,許多 CD-ROM. 都只是用一個 FIFO(First In, First out)的緩衝區來控制轉速,當緩衝區快要. 滿的時候就將轉速降低,反之則加快,故在讀取資料時的間距就會忽大忽小,. 這就是 jitter。這在讀取資料軌時沒有什麼問題,因為每個資料區塊有起始碼. 及第三層 ECC(error correcting code),但音樂軌時就有問題了,因為在. 音樂軌的資料中沒有起始碼,無法準確的決定每一個 frame 的起始位置,所以. 會有一種現象就是,一片音樂 CD 中的某一首歌,在兩台 CD-Player 中播放. CD device 裡加上一些線路來設法解決問題,這就是 de-jitter。 當我們要在電腦上利用可以抓音軌的 CD-ROM 來抓音軌時,一樣會發生這種. 問題,但因為近來 CD device 的技術越來越進步,再加上(我猜測的)有些公司. 的 CD-ROM 有用到額外通道中的一些資訊來確定每個 frame 的起始位置,因此. 现在通用的大多数数...
codestandup.blogspot.com
Code-StandUp: 四月 2011
http://codestandup.blogspot.com/2011_04_01_archive.html
Include /* 说明 malloc, NULL, size t */. Include /* 说明 va 相关类型和函数 */. Include /* 说明 strcat 等 */. Char *vstrcat(const char *first, .). Size t len;. Va list argp;. Len = strlen(first);. Va start(argp, first);. While( p = va arg(argp, char *)! Len = strlen(p);. Retbuf = malloc(len 1); /* 1 包含终止符 0 */. Return NULL; /* 出错 */. Void)strcpy(retbuf, first);. Va start(argp, first); /* 重新开始扫描 */. While( p = va arg(argp, char *)! Void)strcat(retbuf, p);. Retbuf = malloc(len 1); /* 1 包含终止符 0 */. Return NULL; /* 出错 */.
codestandup.blogspot.com
Code-StandUp: 七月 2011
http://codestandup.blogspot.com/2011_07_01_archive.html
Beginning with Digital Signatures in .NET Framework. This article explains how to get started with digital signatures, using X509 certificates in .NET. This article will introduce X509 certificates, explain a little about the asymmetric cryptography that is at their heart, and end by describing how to use and manage these certificates within the .NET Framework classes. Asymmetric Cryptography and Digital Signatures. A second public cryptographic key K. Then you will encrypt M1 with your private key K.
codestandup.blogspot.com
Code-StandUp: 五月 2010
http://codestandup.blogspot.com/2010_05_01_archive.html
Function post to url(path, params, method) {. Method = method "post"; / Set method to post by default, if not specified. The rest of this code assumes you are not using a library. It can be made less wordy if you use one. Var form = document.createElement("form");. FormsetAttribute("method", method);. FormsetAttribute("action", path);. For(var key in params) {. Var hiddenField = document.createElement("input");. HiddenField.setAttribute("type", "hidden");. HiddenField.setAttribute("name", key);. 为80ʌ...
codestandup.blogspot.com
Code-StandUp: iPhone/Mac Objective-C內存管理教程和原理剖析
http://codestandup.blogspot.com/2011/11/iphonemac-objective-c.html
初学objectice-C的朋友都有一个困惑,总觉得对objective-C的内存管理机制琢磨不透,程序经常内存泄漏或莫名其妙的崩溃。我在这里总结了自己对objective-C内存管理机制的研究成果和经验,写了这么一个由浅入深的教程。希望对大家有所帮助,也欢迎大家一起探讨。 Objective-C的内存管理机制与.Net/Java那种全自动的垃圾回收机制是不同的,它本质上还是C语言中的手动管理方式,只不过稍微加了一些自动方法。 Objective-C的对象生成于堆之上,生成之后,需要一个指针来指向它。 ClassA *obj1 = [ ClassA alloc] init];. Objective-C的对象在使用完成之后不会自动销毁,需要执行dealloc来释放空间(销毁),否则内存泄露。 ClassA *obj1 = [ ClassA alloc] init];. ClassA *obj2 = obj1;. Obj1 hello]; / 输出hello. Obj2 hello]; / 能够执行这一行和下一行吗? ClassA *obj2 = obj1; / retain count = 1.
codestandup.blogspot.com
Code-StandUp: 十一月 2011
http://codestandup.blogspot.com/2011_11_01_archive.html
舉個例子,XML Parser可能他知道怎麼parse xml,但是parse到的東西要怎麼處理xml parser可能不知道。 當parse到某個element的時候,就callback delegate所定義的message,. 好吧,我承認我解釋的很模糊,不過我這篇本來就不是要你搞懂什麼是delegate,. 假設我的class叫做MyClass,那我們可能會有定義一個MyClassDelegate這個protocol當作我的delegate protocol。 Void) myClassOnSomeEvent:(MyClass*)myClass; @end @interface MyClass { id. Delegate; } @property (nonatomic, assign) delegate; @end. 原因就是在於iOS的reference counting的環境中,我們必須解決circular count的問題。 Void)someAction { myClass = [MyClass new]; myClass.delegate = self; . }. Q=cache:d...
codestandup.blogspot.com
Code-StandUp: 十月 2011
http://codestandup.blogspot.com/2011_10_01_archive.html
Xcode 4.2 中的Automatic Reference Counting (ARC). Automatic Reference Counting (ARC),. IOS5 seed release 2. 65292;需要做如下修改,才能避免编译时的错误:. CFTypeRef CFMakeCollectable(CFTypeRef cf) CF AUTOMATED REFCOUNT UNAVAILABLE;. CFTypeRef CFMakeCollectable(CFTypeRef cf);. Return ( bridge retain CFTypeRef)X;. Return ( bridge retained CFTypeRef)X;. 的工作原理是,在你编译程序时,将内存操作的代码(. 65288;手工引用计数)一样的内存管理机制,但由于. Mac OS X v10.6. Mac OS X v10.6. Convert to Objective-C Automatic Reference Counting”. Interface Person : NSObject. NSLog(@"n...
codestandup.blogspot.com
Code-StandUp: 二月 2011
http://codestandup.blogspot.com/2011_02_01_archive.html
Moving SQL NVarchar to ORACLE NVarchar2. 之前用SSIS在做ORACLE與SQL間資料搬移時,最痛恨遇到NVarchar跟Unicode Code問題了。 明明是NVarchar(SQL)搬到NVarchar2(ORACLE),兩邊都Support Unicode,但SSIS都老會要求指定Data Flow Destination的Code Page,接著又會嚷著SQL中得到的Unicode不能直接轉成Non-Unicode,所以就得很可笑地在Nvarchar與NVarchar2兩個Unicode欄位中加上一個Data Conversion。如下圖:. 不過,苦難還沒有結束. 如果很不幸地,NVarchar中還真的放了Unicode字元,則在轉換時,會出現以下的錯誤訊息。 最近同事想用SSIS來做重要的日常資料搬移,就卡在這個問題上,由於搬移是每天要跑的,繞路的成本就會高出許多,這回我總算被迫要收服這隻妖怪。東試西試之餘,忽然想到之前使用 Query Express. 使用Oracle Provider for OLE DB後,連Data Conve...