会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
林海云
博客园
首页
新随笔
联系
订阅
管理
2015年7月13日
iOS 相互引用引起内存泄露问题说明
摘要: release动作只会对自身计数减一,而不会对属性发出release消息,只有该对象的引用计数为0,系统才会对该对象的所有属性发出release消息类A的属性有类B,类B的属性有类A,而且两者都是强引用retain实例化后[A retainCount]是2 [B retainCount]是2[A ...
阅读全文
posted @ 2015-07-13 21:26 林海云
阅读(551)
评论(0)
推荐(0)
2015年7月12日
iOS app 集成友盟推送问题
摘要: 之前做app推送主要是集成友盟SDK,在程序获取deviceToken时,老是提示如下错误:Error Domain=NSCocoaErrorDomain Code=3000 "未找到应用程序的“aps-environment”的权利字符串" UserInfo=0x14dc69e0 {NSLocal...
阅读全文
posted @ 2015-07-12 15:17 林海云
阅读(906)
评论(0)
推荐(0)
2015年6月13日
ios即时通讯客户端开发之-mac上基于XMPP的聊天客户端开发环境搭建
摘要: 1、搭建服务器 - 安装顺序 - (mysql->openfire->spark)数据库:mysql服务器管理工具: openfire测试工具: sparkmysql 安装 http://www.cnblogs.com/xiaodao/archive/2013/04/04/2999426.html注...
阅读全文
posted @ 2015-06-13 14:29 林海云
阅读(362)
评论(0)
推荐(1)
2015年4月15日
c 结构体struct
摘要: struct 定义初始化#include typedef struct stuInfo { char stuName[10]; //姓名 int stuId; //学号 int age; //年龄 char sex; ...
阅读全文
posted @ 2015-04-15 10:45 林海云
阅读(154)
评论(0)
推荐(0)
2015年4月14日
草稿
摘要: 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 林海云
阅读(122)
评论(0)
推荐(0)
2015腾讯暑期实习生 Web前端开发 面试经历 --作者imwtr
摘要: 1.现在有100亿个数字大小为1到10亿的数字,在这100亿个数字里边只有一个数字出现的次数是奇数次的,你用什么方法,找出这个数字呢? 答:显然至少要全部过一遍,可以用位运算,遍历数组,最后剩下的数字就是出现奇数次的数字(^运算 a^b^b = a)2.A和B分苹果。分苹果策略是一次一个或者两个,...
阅读全文
posted @ 2015-04-14 19:32 林海云
阅读(350)
评论(0)
推荐(0)
c 跟字符串有关的函数
摘要: 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 林海云
阅读(379)
评论(0)
推荐(0)
c 转置字符串You are a so cheap man ->man cheap so a are You
摘要: 解题思路: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 林海云
阅读(285)
评论(0)
推荐(0)
2015年4月13日
c 查找A字符串在B字符串中是否存在,计算出现的次数
摘要: 主要是应用了头文件中的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 林海云
阅读(868)
评论(0)
推荐(0)
2015年4月10日
c 统计字符串中字符出现的个数
摘要: 1、单纯用数组来解题思路:从左往右循环,每次碰到一个字符就和左边的字符串比较,如果有相同的就右移,如果没有找到相同的就从这个位置向右统计个数并输出。 1 #include 2 3 void calCount(char arr[]) 4 { 5 int i,j,count,had;...
阅读全文
posted @ 2015-04-10 11:24 林海云
阅读(1425)
评论(0)
推荐(0)
下一页
公告