AutomaticCoder
- 授权协议: 未知
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/zhangxigithub/AutomaticCoder
软件介绍
Automatic Coder 可根据 JSON 字符串自动生成对应的 Objective-C 处理代码。
示例代码:
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://zxapi.sinaapp.com"]];
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSDictionary *json = [data objectFromJSONData];
//init object
Person *person = [[Person alloc] initWithJson:json];
NSLog(@"%@",person.name); //http://zhangxi.me
NSLog(@"%@",person.male?@"男":@"女"); //男
NSLog(@"%ld",person.girlFriends.count); //3
//write to file
BOOL result = [NSKeyedArchiver archiveRootObject:person toFile:@"./person.data"];
NSLog(@"%@",result?@"success":@"failure"); //success
//read from file
Person *thePerson = [NSKeyedUnarchiver unarchiveObjectWithFile:@"./person.data"];
NSLog(@"%@",thePerson.name); //http://zhangxi.me
NSLog(@"%@",thePerson.male?@"男":@"女"); //男
NSLog(@"%ld",thePerson.girlFriends.count); ///3
你也能看得懂的Python算法书
王硕,董文馨,张舒行,张洁 著 / 电子工业出版社 / 2018-11-1 / 59.00
编程的核心是算法,学习算法不仅能教会你解决问题的方法,而且还能为你今后的发展提供一种可能。 《你也能看得懂的Python算法书》面向算法初学者,首先介绍当下流程的编程语言Python,详细讲解Python语言中的变量和循序、分支、循环三大结构,以及列表和函数的使用,为之后学习算法打好基础。然后以通俗易懂的语言讲解双指针、哈希、深度优先、广度优先、回溯、贪心、动态规划和至短路径等经典算法。 ......一起来看看 《你也能看得懂的Python算法书》 这本书的介绍吧!
