在iOS中通过WebView加载Url或者请求HTTP时,若是链接中包含中文.特殊符号&%或是空格等都需要预先进行一下转码才可正常访问. 许久没编码,原先的方法已废弃了都,在此对应当前最新的方法进行记录: 官方源码“NSRUL.h”文件中可以看到如下信息:后两个方法已废弃,从iOS7.0开始提供新的两个方法: @interface NSString (NSURLUtilities) // Returns a new string made from the receiver by replaci…
10.6 You have 10 billion URLs. How do you detect the duplicate documents? In this case, assume that "duplicate" means that the URLs are identical. 这道题让我们在一百亿个URL链接中寻找相同项,看这数据量简直吓尿了,如果每个URL链接平均100个字符的话,每个字符是4个字节,那么总共需要占4TB的空间,我们无法在内存中导入这么大的数据量.假如…