摘要: release动作只会对自身计数减一,而不会对属性发出release消息,只有该对象的引用计数为0,系统才会对该对象的所有属性发出release消息类A的属性有类B,类B的属性有类A,而且两者都是强引用retain实例化后[A retainCount]是2 [B retainCount]是2[A ... 阅读全文
posted @ 2015-07-13 21:26 林海云 阅读(543) 评论(0) 推荐(0) 编辑
摘要: 之前做app推送主要是集成友盟SDK,在程序获取deviceToken时,老是提示如下错误:Error Domain=NSCocoaErrorDomain Code=3000 "未找到应用程序的“aps-environment”的权利字符串" UserInfo=0x14dc69e0 {NSLocal... 阅读全文
posted @ 2015-07-12 15:17 林海云 阅读(884) 评论(0) 推荐(0) 编辑
摘要: 1、搭建服务器 - 安装顺序 - (mysql->openfire->spark)数据库:mysql服务器管理工具: openfire测试工具: sparkmysql 安装 http://www.cnblogs.com/xiaodao/archive/2013/04/04/2999426.html注... 阅读全文
posted @ 2015-06-13 14:29 林海云 阅读(353) 评论(0) 推荐(1) 编辑
摘要: struct 定义初始化#include typedef struct stuInfo { char stuName[10]; //姓名 int stuId; //学号 int age; //年龄 char sex; ... 阅读全文
posted @ 2015-04-15 10:45 林海云 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 void priPointChar(char *p[]) 5 { 6 int i=0; 7 while(p[i]) 8 { 9 puts(p[i++]);10 }11 }12 13 int mai... 阅读全文
posted @ 2015-04-14 21:17 林海云 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1.现在有100亿个数字大小为1到10亿的数字,在这100亿个数字里边只有一个数字出现的次数是奇数次的,你用什么方法,找出这个数字呢? 答:显然至少要全部过一遍,可以用位运算,遍历数组,最后剩下的数字就是出现奇数次的数字(^运算 a^b^b = a)2.A和B分苹果。分苹果策略是一次一个或者两个,... 阅读全文
posted @ 2015-04-14 19:32 林海云 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 1、字符串查找strstr char * strstr(const char *s1, const char *s2); 在s1中查找s2,如果找到返回首个s2的首地址char * strcasestr(const char *s1, const char *s2); 在s1中查找s2... 阅读全文
posted @ 2015-04-14 10:27 林海云 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 解题思路:1、将字符串转置2、对转置后的字符串中单词转置 1 #include 2 #include 3 #include 4 #include 5 //字符串转置 6 void tranStr(const char *p,char *s) 7 { 8 int len = strlen(p)... 阅读全文
posted @ 2015-04-14 09:29 林海云 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 主要是应用了头文件中的strstr函数char * strstr(const char *s1, const char *s2);查找是否存在: 1 #include 2 #include 3 int main(void) 4 { 5 char str3[] = {"abcabcda... 阅读全文
posted @ 2015-04-13 18:07 林海云 阅读(832) 评论(0) 推荐(0) 编辑
摘要: 1、单纯用数组来解题思路:从左往右循环,每次碰到一个字符就和左边的字符串比较,如果有相同的就右移,如果没有找到相同的就从这个位置向右统计个数并输出。 1 #include 2 3 void calCount(char arr[]) 4 { 5 int i,j,count,had;... 阅读全文
posted @ 2015-04-10 11:24 林海云 阅读(1388) 评论(0) 推荐(0) 编辑