This is the template code of controller:didChangeObject:atIndexPath:forChangeType:newIndexPath: given by Apple: – (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath { UITableView *tableView = self.tableView; switch(type) { case NSFetchedResultsChangeInsert: [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] [...]
新浪微博很火,开放平台很火,开发者很“火”。 开发者火是因为新浪微博开放平台对开发者很不友好,其 API 从实现到文档都很粗糙。 API 实现不标准还能忍,但是文档不说明清楚,要开发者自己摸索就离谱了。1看来新浪尚未有暇顾及第三方开发者,开放平台现在也只是“开门放出来”而已。结果就是开发者在很多毫无意义的事情上折腾,浪费时间! 我写这一系列文章的目的就是避免后来者遭同样的罪。 这是第一篇,关于 upload API 的 OAuth 验证失败问题。去论坛搜索一下 upload 就知道有多少人深受其害了。2 Upload API 的 OAuth 之所以难搞,部分是因为其 HTTP 请求格式的特殊性,主要是因为新浪微博那匪夷所思的实现。 Upload API 的特殊性在于其请求“采用 multipart/form-data 编码方式提交”3。根据 OAuth 1.0 协议,Content-Type 为 multipart/form-data 的 HTTP 请求,其 entity body 不参与 OAuth 签名。照此,upload API 的 OAuth 应该比其他普通 API 更简单,因为只有 OAuth 参数(oauth_ 开头的一系列特别参数)参与签名。所以,标准的 Signature Base String 应该是: POSThttp%3A%2F%2Fapi.t.sina.com.cn%2Fstatuses%2Fupload.jsonoauth_consumer_key%3Dxxxxxxxxxx%26oauth_nonce%3D15492994958798014939%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1312912324%26oauth_token%3Dyyyyyyyyyy%26oauth_version%3D1.0 与其对应的标准的 [...]
CAMediaTiming Protocol offers a small set of eight properties. But it is sufficient to do all kinds of time warps, if you know what exactly every property means and how to use it. The most used and simple one is duration: duration Specifies the basic duration of the animation, in seconds. Nothing needs further explanation [...]
© Wangling. Powered by WordPress using the DePo Skinny Theme.