自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

shenjianping的专栏

iOS and XMPP

  • 博客(64)
  • 收藏
  • 关注

原创 SpiderMonkey (JavaScript engine)

home pageEmbedding SpiderMonkey - best practice

2011-12-31 13:23:36 1009

原创 Apache Ant

Apache Ant, 现在流行的生成package的一个open source, 还没有研究过,备忘http://ant.apache.org/

2011-12-31 13:15:16 637

转载 Unix File Permissions

http://www.unix.com/tips-tutorials/19060-unix-file-permissions.html

2011-12-31 12:03:05 580

转载 Patch to make openssl1 even more XMPP-friendly

XMPP牛人写的一个patch:https://gist.github.com/1511463description:This adds support for xmpp-server, allows setting the name of the serverdifferently than the host you're connecting to (using -

2011-12-31 11:59:15 654

原创 The GNU Readline Library

一个很好的console read库, 备忘http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html

2011-12-31 11:56:53 662

原创 libevent – an event notification library

一个很好的异步IO event的open source, 用C写的,备忘http://libevent.org/

2011-12-31 11:54:40 696

原创 python列举目录(包括子目录)下的所有文件

def ListFiles(dir) : print "list file in dir ", os.path.abspath(dir) subdir = [] for item in os.listdir(os.path.abspath(dir)) : if os.path.isfile(os.path.join(dir, item)) : print item els

2011-12-09 14:47:37 1998

原创 osx获取全局键盘/鼠标事件

下面的代码可以获取osx下的键盘输入,这个是全局的,也就是说在其他Application中输入键盘事件,这些事件也能被捕获。CGEventRef myCallBack(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *userInfo){ UniCharCount actualStringLen

2011-11-30 14:57:27 6408 3

原创 编译ios平台的openssl

发现一个不错的地方介绍如何在ios平台下编译openssl,试用了一下,成功了。需要注意的一点是,需要用openssl1.0编译,同时编译出来的文件生成在openssl目录下面:libCrypto.a libssl.ahttps://github.com/sjlombardo/openssl-xcodeUsageIn a normal case

2011-11-28 11:53:52 4592

转载 How To Choose The Best XML Parser for Your iPhone Project

come from below blog:http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project

2011-11-25 14:14:34 593

原创 class-dump,分析可执行/app文件的函数定义

class-dump是一个开源项目,可以从http://www.codethecode.com/projects/class-dump/下载。下面是我对自己写的一个demo程序,GKDemo.app用class-dump解析后得到的结果:note: /Users/tonys/Library/Developer/Xcode/DerivedData/GKDemo-bgpwxsribkdlyph

2011-11-24 12:23:48 2733

原创 Message Forwarding总结

在Objective-C中,如果你将一个没有实现的消息发送给一个接受者,系统会调用接受者forwardInvocation:方法,从而给这个接受者一个二次处理的机会。机遇这个特性,我们可以做一些自己的处理。例如下面的调用,我们调用了一个不存在的方法,系统就会调用myObject对象的forwardInvocation:方法。objc_msgSend(self, @selector(di

2011-11-23 15:45:54 1017

原创 显示/隐藏 adium XMPP控制台

come from http://trac.adium.im/wiki/HiddenPreferencesXMPP Advanced Features (Default: Off)To enable the advanced features (only the XML Console menu item right now), run the following comman

2011-11-21 17:08:26 1251

原创 使用AVPlayer获取HTTP live stream audio文件的duration

关于AVPlayer的详细解析,请看Apple document。但是document里面并没有详细解析如何获取HTTP live stream文件的duration,google了一下,发现通过duration属性获取的方法,不能得到正确的直。正确的做法应该是通过调用AVPlayerItem的seekableTimeRanges来获取(loadedTimeRagnes表示已经下载的部分)。事

2011-11-21 14:27:58 5981

原创 如何往iphone模拟器中增加图片

Explain step by step of Airsource Ltd's answer for adding image to simulator:Drag it to simulator, then Safari opens (or browse to the Image in the internet using Safari)Hold your click on the

2011-11-19 21:48:06 853

原创 在macpro上安装windows 7

google一下,网上应该有很多文章介绍如何在macpro上安装windows 7,我今天上午安装了windows 7, 等所有安装好以后,发现windows 7连不上网络,花了一些时间研究了一下,原来是没有安装mac安装盘里面的bootcamp(for windows),安装了bootcamp,一切都正常了。所以简单来说在macpro上安装windows需要如下几个步骤:安装wind

2011-11-14 13:00:49 1877

原创 登陆csdn 1000次

发现自己竟然有排名了,纪念一下。

2011-11-13 20:13:46 468

原创 xcode 4.2 bug  of my mac 32-bit or my mac-64 bit

当xcode 4.2的工程文件被修改后( outside,可能别人修改了), xcode 4.2 就会显示my mac-64bit(我的机器上), stack overflow上有人说这时app dev确认的一个bug,会在xcode 4.2的下一个版本fix。解决方法是close code and reopen it。app的东西做的是很酷, 不过xcode的小问题一直不断,这个问题不知

2011-11-11 15:13:45 2180

原创 xcode 4.2 设置.xcconfig文件

习惯于xcode 3的开发人员,升级到xcode 4.2以后,肯定会有一段时间不会适应,例如在什么地方可以设计xcconfig文件等。google了一下,终于发现如何在xcode 4.2设置这个文件了,直接上图:下图中红色部分,你就可以选择你想要的xcconfig文件了。

2011-11-11 13:55:59 4704

原创 ios多线程之我见

引言随着多核CPU的兴起,传统的线程处理方法已经不能满足现在的需求, 为了解决这个问题,apple ios提出了新的解决方法:GCD grand central dispatch,serial dispatch queue按序执行,concurrent queue并发执行operation queues, 遵循first in, first out原则opera

2011-11-07 09:12:27 4080

原创 iOS平台下实现不同APP之间的通信

我们可以通过UIApplication的openURL方法来实现不同app之间的通信,如下面代码所示:NSURL *myURL = [NSURL URLWithString:@"todolist://www.acme.com?Quarterly%20Report#200806231300"];[[UIApplication sharedApplication] openURL:myURL];

2011-11-02 15:59:07 2932

原创 UIViewController XIB/NIB加载过程

UIViewController中关于nib初始化的函数- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;从这个函数的说明我们可以知道,如果你subclass一个UIViewController,不管有没有使用NIB, [super initWithNibName:bun

2011-11-01 16:41:01 11643

原创 View Programming Guide for iOS读书笔记

View and Window Architecture一个view的所有subviews被安装顺序放在 一个数组中,放在数组最后的view会被显示出来;改变superview的行为,会对subview产生影响,例如修改大小,透明度等如果一个单击行为,当前的view没有处理,就会传给superview进行处理,当然一些特殊的view也会把消息传给responder object进行

2011-11-01 14:16:40 1942

原创 区分是iphone还是ipad

@property (nonatomic, readonly) UIUserInterfaceIdiom userInterfaceIdiomUIDevice中的userInterfaceIdiom可以用来区分iphone还是ipad

2011-11-01 13:07:56 1051

原创 iphone/ipad关于size, frame and bounds总结和UIScroll view学习笔记

1. iphone/ipad大小DeviceScreen dimensions(in points)iphone and ipod320 X 480ipad768 X 10242. UIScreen bounds and applicationFrame[UISCreen mainScreen].bounds, 永远返

2011-11-01 10:19:46 2841

原创 Text, Web, and Editing Programming Guide for iOS读书笔记

Text field/Text view的管理1. 当拥护单击一个Text field的时候,这个Text Field就自动成为first responders2. 发送给Text field delegate的常用消息:textFieldShouldBeginEditing: 成为first responder之前(获取焦点之前)textFieldDidBeginEdit

2011-10-31 14:36:11 1266

原创 xcode 4.2 "XCode could not find a valid private-key/certificate pair for this profile" 解决方案

今天想在xcode上编译一个device上的app,发现xcode提示上面这个错误,google了一下,找到下面这个link:http://stackoverflow.com/questions/5391786/xcode-iphone-profile-doesnt-match-any-valid-certificate-private-key-pair-i根据这个帖子的提示信

2011-10-31 10:52:10 3720

原创 使用TARGET_IPHONE_SIMULATOR和TARGET_OS_IPHONE宏区分模拟器和设备

代码如下: #if TARGET_IPHONE_SIMULATOR NSLog(@"run on simulator");#else NSLog(@"run on device");#endif注意不要用#ifdef TARGET_IPHONE_SIMULATOR, 因为在device上, TARGET_IPHONE_SIMULATOR被定义为0。、

2011-10-31 10:46:54 15640

转载 10个iPhone开发网站、论坛、博客

没事可以看看下面几个网站了,应该不错:整理了一下手中的iPhone开发网站、论坛和博客,精选了这10个常去的网站。其中有2篇教学文章,由于非常经典,于是单列出来,与其网站并列。 建议新入行的朋友在看教学文章的同时多上论坛,与大家交流,偶尔看看别人的自曝,自己也会信心倍增。另外,实践最重要,首先行动起来。 http://cocoachina.com/ 大量iPhone开发

2011-10-30 19:45:08 880

转载 Mac 热键大全

这时我见到过的介绍最全的快捷键大全, 备忘屏幕捕捉快捷键动作............................保存到............-快捷键全屏捕捉........................桌面(.PDF文件)......Command + Shift + 3   (win+shift+3)屏幕部分画面....................桌面(.

2011-10-30 19:22:03 517

转载 在你的 iOS App中 使用 OpenSSL 库

看到有人介绍如何使用openssl的,这个在iphone上应该比较有用。在你的 iOS App中 使用 OpenSSL 库——译自x2on的“Tutorial: iPhone App with compiled OpenSSL 1.0.0a Library”原文地址:http://www.x2on.de/2010/07/13/tutorial-iphone-app-with-c

2011-10-30 19:16:01 623

转载 some tips for objective-C

below tips comes from http://blog.csdn.net/kmyhy/article/details/57167551.使用class获得meta classNSLog(@"Class name: %@",[[[arr objectAtIndex:i] class] description]);2.使用NSClassFromString和 NSSelec

2011-10-28 16:38:39 1139

原创 在mac下显示隐藏文件

defaults write com.apple.finder AppleShowAllFiles -bool true

2011-10-27 17:11:29 475

原创 UIView中的frame和bounds属性的区别

Frame是基于父View的,bounds是基于自身的,所以两者的区别是frame的坐标和bounds的坐标会有区别,如下图:

2011-10-26 14:24:57 2396

转载 MainWindow.xib absence in Xcode 4.2 beta 4 with iOS 5 SDK

(FYI, this instruction is only for me. It is better to go to original article and follow.)1. Create new project in Xcode 4.2 beta and choose “Empty Application” template2. Add “New File” to th

2011-10-25 17:17:42 902

原创 mac lion 10.7.2 不支持SSL连接?

一个application本来在10.6版本上运行的很好,当系统升级到10.7.2的时候,发现连不上服务器了。具体原因现在还不知道,TBD

2011-10-25 10:02:37 744

原创 xcode 4.2 不支持gcc 4.2的解决方案

今天刚刚从xcode 3 升级到xcode 4.2, 发现gcc 4.2没有了,研究了以下发现是由于xcode 4.2不支持gcc4.2了,需要用llvmgcc4.2。由于项目中有几十个工程文件,如果每个工程都需要修改的话,工作量很大,而且也很无聊。想了一下,可以用xcconfig文件来解决这个问题:1.   随便找一个工程,把compiler修改成llvmgcc4.2, 然后拷贝这个选项到x

2011-10-21 14:33:24 2257

原创 XEP-0198:Stream Management研究

最近Jabber Server team的开发人员一直在讨论XEP 0198的东西,这个东西个人感觉还是比较有用的,特别是关于resume的部分,因为对于mobile client来说,网络掉线的概率还是比较大,目前对于掉线重连的case,很多人都觉得重连这一块太花时间了。如果server支持stream resume了,我想重连这一块会快很多。下面是我学习0198这个XEP的一些成果:1

2011-10-20 16:07:15 3443 1

转载 Building the Build System – Part 2 – Project Templates

In Part 1 of our series, you learned how to use basic xcconfig files to manage build configuration in Xcode rather than using the Build Pane

2011-10-18 16:42:57 572

转载 Building the Build System – Part 1 – Abandoning the Build Panel

below article comes from here XCode has a decent build system, but it doesn’t work as well as it could out of the box. With just a littl

2011-10-18 16:41:58 639

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除