03 2013 档案

 
Algorithms in Cryptography
摘要:先介绍几个跟算法相关的基本概念。 block cipher In cryptography, a block cipher is a deterministic algorithm operating on fixed-length groups of bits, called blocks, with an unvarying transformation that is specified b... 阅读全文
posted @ 2013-03-26 16:29 做个不善的人 阅读(443) 评论(0) 推荐(0) 编辑
About Common Crypto
摘要:The Common Crypto library, also known as CCCrypt and 3CC, provide access to anumber of types and flavors of encryption algorithms. The Common Crypto library offunctions supports AES, DES, 3DES, and other encryption standards. Depending onthe encryption algorithm used, block and/or stream ciphers are 阅读全文
posted @ 2013-03-21 17:47 做个不善的人 阅读(530) 评论(0) 推荐(0) 编辑
About Cryptography
摘要:Microsoft® CryptographyCSPsIn Microsoft Windows, a Cryptographic Service Provider (CSP) is a software library that implements the Microsoft CryptoAPI (CAPI). Each CSP has a key database in which it stores its persistent cryptographic keys. Each key database contains one or more key containers, 阅读全文
posted @ 2013-03-20 16:28 做个不善的人 阅读(878) 评论(0) 推荐(0) 编辑
Delegate in Cocoa
摘要:Delegate模式并没有标准定义,也没有标准行为,所以在不同的地方使用的方式也不一样,C#中Delegate就是一个方法,而Cocoa中Delegate是一个对象(或者说adopt了某个protocol的对象),下面的一句话描述还比较贴切:A delegate is an object that’s given an opportunity to react to changes in another objector influence the behavior of another object.It stores a reference to another object, its d 阅读全文
posted @ 2013-03-19 19:35 做个不善的人 阅读(576) 评论(0) 推荐(0) 编辑
Outlets, Target and Action
摘要:Target-action is a design pattern in which an object holds the information necessary to send a message to another object when an event occurs. The stored information consists of two items of data: an action selector, which identifies the method to be invoked, and a target, which is the object to rec 阅读全文
posted @ 2013-03-19 17:31 做个不善的人 阅读(1320) 评论(0) 推荐(1) 编辑
UI Elements in Cocoa
摘要:DialogDialog是application modal的,意味着如果没有结束这个Dialog,那用户将无法对这个application做任何操作。SheetsSheets是document modal的,意味着如果没有结束这个sheet,那用户将无法对这个Document或者这个window进行任何操作。什么是啥使用Sheets:需要一个针对某个document的特定dialog时,比如saving, printing。Cocoa的NSSavePanel和NSPrintPanel将其自身present为sheets。某个不创建document的单窗口应用需要一个dialog时,一个单窗口 阅读全文
posted @ 2013-03-19 16:15 做个不善的人 阅读(278) 评论(0) 推荐(0) 编辑
Placeholder Objects(File’s Owner,First Responder,Application)
摘要:There are two kinds of objects displayed in the Interface Builder dock: Interface objects and placeholder objects. Interface objects are the objects that are actually created when the nib file is loaded and typically comprise the bulk of the objects. Placeholder objects refer to files that live outs 阅读全文
posted @ 2013-03-15 14:11 做个不善的人 阅读(1552) 评论(0) 推荐(0) 编辑
Cocoa.Programming.for.Mac.OS.X 3rd 前8章小知识点
摘要:最近看了《Cocoa.Programming.for.Mac.OS.X 3rd》前八章,虽然第一遍的时候,可以很容易按照书中的介绍把例子程序正确的运行起来,但是并不知道为啥那样写代码就work了。对于一些隐藏的知识点,不便作为单独的文章来介绍,本文收集这些知识,介绍如下。1.NSUserInterfaceItemIdentification ProtocolThe NSUserInterfaceItemIdentification protocol is used to associate a unique identifier with objects in your user interf 阅读全文
posted @ 2013-03-14 12:04 做个不善的人 阅读(481) 评论(0) 推荐(0) 编辑
Object copying
摘要:NSObject类定义了copy方法,但这只是一个convinence method for classes who adopt NSCopying协议。如果某个类没有实现copyWithZone:,那调用copy方法会抛出异常。NSObject类的方法mutableCopy对应于NSMutableCopying protocol的方法mutableCopyWithZone:NSObject does not itself support the NSCopying protocol. Subclasses must support the protocol and implement the 阅读全文
posted @ 2013-03-13 19:18 做个不善的人 阅读(291) 评论(0) 推荐(0) 编辑
关于 XIB 和 NIB
摘要:NIB 和 XIB 的区别与联系NIB 和 XIB 都是 Interface Builder 的图形界面设计文档。引用《Cocoa Programming for Mac OSX》一书的说法,Interface Builder 把窗口、菜单栏以及窗口上的各种控件的对象都“冻结”在了一个 NIB文档里面了;程序运行时,这些对象将会“苏醒”。在终端下我们可以看到,NIB 其实是一个目录。它里面有两个也是后缀为 NIB 的文件:designable.nib 和 keyedobjects.nib。前者是一个 XML 文档,而后者则是一个二进制文件。Interface Builder 3 之后,引入了新 阅读全文
posted @ 2013-03-12 19:42 做个不善的人 阅读(4646) 评论(0) 推荐(0) 编辑
精彩分享
摘要:Benefitting from skip-level 1:1s — tips and pitfallshttp://www.anandtech.com/show/6777/understanding-camera-optics-smartphone-camera-trendshttp://arstechnica.com/features/2012/10/windows-8-and-winrt-everything-old-is-new-again/http://coolshell.cn/articles/8088.html 阅读全文
posted @ 2013-03-12 11:21 做个不善的人 阅读(114) 评论(0) 推荐(0) 编辑
Key-Value Observing
摘要:KVO和KVC在Cocoa中往往联合使用,是很好的工具。在之前的文章中我们介绍了KVC,这里要介绍一下KVO了。Key-value observing provides a mechanism that allows objects to be notified of changes to specific properties of other objects. It is particularly useful for communication between model and controller layers in an application. (In OS X, the con 阅读全文
posted @ 2013-03-12 10:00 做个不善的人 阅读(2073) 评论(0) 推荐(0) 编辑
Key-Value Coding Accessor 及其与KVC的关系
摘要:我们知道KVC时,当valueForKey:和setValue:forKey:被调用时,对应key的accessor method会被调用,这里我们介绍Key-Value Coding Accessor,通过此文,我们应该对KVC和Accessor的关系会更清楚。之前我们也介绍过类的ivars与owning object共有4种关系:attribute, to-one relationship , ordered to-many relationship, unordered to-many relationship, 介绍Accessor也要根据这4中关系介绍。Basic Accessor 阅读全文
posted @ 2013-03-06 19:58 做个不善的人 阅读(960) 评论(0) 推荐(0) 编辑
使用Key-Value Coding
摘要:之前的一篇文章介绍了实现Key-Value Coding的5种方法,但用的最多的还是基于NSKeyValueCoding协议的。本文介绍的都是基于这个前提的。key是啥?A key is a string that identifies a specific property of an object. Typically, a key corresponds to the name of anaccessor method or instance variable in the receiving object. Keys must use ASCII encoding, begin wit 阅读全文
posted @ 2013-03-05 12:00 做个不善的人 阅读(3293) 评论(0) 推荐(0) 编辑
实现Key-Value Coding 的5种方法
摘要:简介Key-Value Coding(以后都简称为KVC),是一种设计模式,其想法就是不用对对象的某个属性进行设置或者读取,而是使用key来访问。这种模式在Map中是很容易理解的,因为Map/Dictionary中保存的就是key-value 对,对这个pair进行操作,都是通过key来操作的。KVC就不仅仅限于Map/Dictionary,而是把它扩展到了普通对象。任何不同对象的instance variable都可以用KVC。使用KVC的好处就是可以将变量本身与他要关联的属性进行解耦,比如有个值,代表下载进度,进度一方面要在UI的进度条上显示出来,一方面用数字的方式显示在另一个地方(Con 阅读全文
posted @ 2013-03-04 13:52 做个不善的人 阅读(598) 评论(0) 推荐(0) 编辑

 

点击右上角即可分享
微信分享提示