zoukankan      html  css  js  c++  java
  • Objective-C 字符串

     1 #import <UIKit/UIKit.h>
     2 #import "AppDelegate.h"
     3 
     4 int main(int argc, char * argv[]) {
     5     NSString *str = @"hello OC";
     6     NSString *str1 = [NSString stringWithFormat:@"Number is %d",100];
     7     NSString *str2 = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://baidu.com"] encoding:NSUTF8StringEncoding error:nil]; // 同步加载网页内容
     8     
     9     NSLog(@"%@",str2);
    10     
    11     // [str substringFromIndex:<#(NSUInteger)#>] 截取字符串
    12     
    13     
    14     @autoreleasepool {
    15         return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    16     }
    17 }
    18 /*
    19  在iOS9 beta1中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据。
    20  
    21  解决办法:
    22  
    23  在info.plist中添加
    24  <key>NSAppTransportSecurity</key><dict>
    25  <key>NSAllowsArbitraryLoads</key>
    26  <true/></dict>
    27  */

  • 相关阅读:
    ES6 Promise多步骤操作
    RPN
    全连接层提速
    Fast R-CNN
    smooth L1损失函数
    ROI pooling
    SPP Net
    R-CNN常见问题
    R-CNN
    NMS
  • 原文地址:https://www.cnblogs.com/-jpp/p/4999326.html
Copyright © 2011-2022 走看看