Fork me on GitHub
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 125 下一页

2012年5月17日

摘要: http://www.dotblogs.com.tw/billy3321/archive/2010/06/02/xmpp.aspx最近剛好有機會碰到XMPP,把一些學習心得記錄在這邊。XMPP(Extensible Messageing and Presence Protocol) 是一種IM的通訊協定,其前身為Jabber,後於IETF標準化為RFC3920。除 了一般通訊協定常有的Server與Client外,XMPP還另外定義了Gateway,只要通過Gateway,便可以與其他的IM Protocol通話。XMPP最大的特色在於傳輸的內容。其傳輸的內容為XML;藉由XML的擴充性,可以 阅读全文
posted @ 2012-05-17 08:49 pengyingh 阅读(271) 评论(0) 推荐(0)

2012年5月16日

摘要: I need a method to convert a UIImage in a NSString and then convert the NSString back to a UIImage.image name? path? url? image data as base64? What do you try to do?Convert it to a binary stream instead (NSData). This will depend on the format of yourUIImage. If it's a JPEG/PNG for instance, yo 阅读全文
posted @ 2012-05-16 20:46 pengyingh 阅读(2261) 评论(0) 推荐(0)
摘要: I am facing a problem to convert NSString to UIImage. EDIT1: I'm downloading photo as a string from gtalk server and parsed xml 5896efb83a92deaee41a30648cc9dbf7e9942b0e to use as an image.It's not clear from the question what it is that you are trying to do.There is no standard convention fo 阅读全文
posted @ 2012-05-16 20:24 pengyingh 阅读(1052) 评论(0) 推荐(0)
摘要: Apple Mach-O Linker Error是一类错误,错误信息的最后一行,通常如下Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1发生这种错误的原因通常是因为两个子工程中存在同名类造成的链接错误。比如我发生错误的原因就是因为在两个.m文件中都定义了同样名字的const变量。虽然给的错误信息不明显,但是点开还是可以发现一些信息,从而定位的。但是信息很多,需要仔细排查,这次就是在众多的信息中发现了那个变量的命名,从而找到这个问题,通常你的变量都会被加一 阅读全文
posted @ 2012-05-16 20:14 pengyingh 阅读(315) 评论(0) 推荐(0)
摘要: Cocoa资源文件嵌入是本文要介绍的内容,主要是俩学习Cocoa/iPhoneApp/静态库嵌入资源文件rtb v0.1发布,软件开发中,可能需要把用到的资源文件嵌入到二进制执行文件中,例如生成单个执行文件、防止机密或版权信息被PE工具查看或修改、嵌入图片资源到静态库中等等。在Mac OSX Cocoa 或iOS开发中,编译生成的Product.app是一个APP包,其实就是个文件夹,右键Show Package Contents或者去掉,app 扩展后双击打开就可以查看包内容,修改包里面的任何资源文件都不会影响程序正常运行,要提交到App Store的程序在修改资源文件后运行下codesig 阅读全文
posted @ 2012-05-16 19:54 pengyingh 阅读(318) 评论(0) 推荐(0)
摘要: I wrote up a function to decode some Base64 text and return it. Here is the (somewhat messy) code I made:- (NSString)decodeBase64:(NSString)input { NSString alphabet = @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"; NSString decoded = @""; NSString encoded = 阅读全文
posted @ 2012-05-16 19:36 pengyingh 阅读(420) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/loyal_baby/article/details/4067223声明用于向程序表明变量的类型和名字。定义也是声明:当定义变量时我们声明了它的类型和名字。可以通过使用extern关键字声明变量名而不定义它。不定义变量的声明包括对象名、对象类型和对象类型前的关键字extern:extern int i; // declares but does not define iint i; // declares and defines iAn extern declaration is not a definition and does not alloca 阅读全文
posted @ 2012-05-16 18:22 pengyingh 阅读(470) 评论(0) 推荐(0)
摘要: http://blog.sina.com.cn/s/blog_6fc5bfa90100oaum.html看了C++ Primer 感觉真的不太好理解,反正我是不好理解,还是买一本Primer Plus 吧。P59页说:头文件用于声明而不是用于定义当设计头文件时,记住定义和声明的区别是很重要的。定义只可以出现一次,而声明则可以出现多次(第 2.3.5 节)。下列语句是一些定义,所以不应该放在头文件里:extern int ival = 10;//initializer, so it's a definitiondouble fica_rate;//no extern, so it' 阅读全文
posted @ 2012-05-16 17:58 pengyingh 阅读(265) 评论(0) 推荐(0)
摘要: 问题1:你是把变量传给了函数,还是把地址传给了函数?例:#include<stdio.h>#include<stdlib.h>#include<string.h>void oxx(char *dest){dest=(char *)malloc(30);strcpy(dest,"contenthasbeenmodied");}voidoxx2(char *dest){strcpy(dest,"contenthatbeenmodied");}intmain(){char *dest;char str[30];dest = 阅读全文
posted @ 2012-05-16 15:47 pengyingh 阅读(369) 评论(0) 推荐(0)
摘要: 两周前空闲的时候编译了opencore for iOS, 如何编译的请参看这一篇文章。今天又有空,所以就试着去用了一下这个库,我想把.amr的文件decode为.wav格式的。在test目录下有简单的例子,教大家如何用这个库,于是我就照着里面的代码,写了一个for iOS在xcode里跑,结果大失所望, 转化出来的文件只有4K大小。首先我说说我的方法。新建了一个iOS的工程,然后把编译好的lib与include文件拖到工程里,然后修改wav.cpp后缀为wav.mm,并修改它的内容如下:#import<UIKit/UIkit.h>#include"wav.h"v 阅读全文
posted @ 2012-05-16 09:57 pengyingh 阅读(599) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 125 下一页

导航