- 浏览: 234001 次
- 性别:
- 来自: 北京
最新评论
-
lanzhiyuan:
楼主还混这里不?NSData *data = [NSURLCo ...
[转] 为UIWebView实现离线浏览 -
hyc4117:
#define OpenSSLRSAPublicKeyFile ...
IOS openssl rsa encrypt/decrypt -
guogongjun:
确实有效,不错,感谢啦大神
[转]安装openfire后admin无法登录管理控制平台 -
xiongyoudou1:
怎么办,而且你那下载的demo和你讲解的不是一样
[转] 为UIWebView实现离线浏览 -
xiongyoudou1:
有问题。执行到方法NSData *data = [NSURLC ...
[转] 为UIWebView实现离线浏览
文章列表
现在,用js调用本地代码已经不是一件新鲜事,已经有成熟的库来做这些事情。比如phonegaphttp://phonegap.com
原文
http://buildmobile.com/android-development-do-you-know-your-options/#fbid=N_l-mCvl6bl
译文
http://www.open-open.com/lib/view/open1328777973483.html
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"RSSEntryModel" inManagedObjectContext:_managedObjectContext];
[request setEntity:entity];
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey ...
有时我们需要一些详细的数据,而不只是看看网页上的图表。那么Flurry通过API提供给我们从Flurry获取详细数据的功能。
具体的使用参考下面官方链接。我要说它的大概使用过程。
官方使用说明上会给你一个链接格式,比如:
h ...
+ (NSDictionary*)parametersOfUser:(User*)user{
if (user) {
NSMutableDictionary *returnDict = [NSMutableDictionary dictionaryWithCapacity:0];
if (user.userId && [user.userId length]) {
[returnDict setObject:[user.userId urlEncoded] forKey:@"userId&quo ...
对OpenSSL RSA加解密的封装请移步到:
https://github.com/reference/OpenSSLRSAWrapper
本例子只是一个说明。
大家都清楚在ios上是存在加解密api,库是调用security,一般只用来公钥加密,私钥解密。用途局限,但是一旦反过来便不支持了。也 ...
在播放之前加上如下代码
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setCategory:AVAudioSessionCategoryPlayback error:nil];
转自:http://willonboy.tk/?tag=dispatch_async
/*
* pinyin.c
* Chinese Pinyin First Letter
*
* Created by George on 4/21/10.
* Copyright 2010 RED/SAFI. All rights reserved.
*
*/
#define HANZI_START 19968
#define HANZI_COUNT 20902
static char firstLetterArray[HANZI_COUNT] =
"ydkqsxnwzssxjbymgcczqpssqbycdscdqldylyb ...
1、分享到Facebook连接。
http://m.facebook.com/sharer.php?u=URL&t=标题
2、移除ABPeoplePickerNavigationController右边的Cancel按钮
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.delegate = self;
.................
- (void)navigationController ...
当tableview为grouped时点击cell要想换个选中颜色是一件麻烦的事情,大多时候selectedBackgroundView的颜色是一个没有圆角的矩形,在group边缘点击时会把默认的圆角遮住。
http://stackoverflow.com/questions/400965/how-to-customize-the-background-border-colors-of-a-grouped-table-view
https://github.com/jdp-global/tableviewcellwithbkgnd
以上两个连接很好地解决了这个问题。
//The country name and URL comes from the links:
//http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
//http://countrycode.org/
//there are several countries no prefix code:
//British Indian Ocean Territory io
//Jersey je
//Svalbard sj
//Western Sahara eh
//" ...
导入头文件
#include <libkern/OSAtomic.h>
#include <execinfo.h>
如下代码放到方法里即可知道该方法调用的堆栈信息
void* callstack[128];
int frames = backtrace(callstack, 128);
char **strs = backtrace_symbols(callstack, frames);
int i;
NSMutableArray *backtrace = [NSMutableArray arrayWithC ...
简单说下自己学习openfire的过程。
目的是想用mac搭建一个im即时通讯的服务端。
openfire来自于一个开源的项目,项目地址是:
http://www.igniterealtime.org/projects/openfire/
它需要依赖数据库,本身自带了一个数据库,但是推荐是用外部数据库,所以我选择了时下流行的mysql.
openfire要求mysql数据库版本在4.1以上,不用多说,下载了一个最新的,顺便把UI工具也下载过来,方便使用。
下载安装的教程参考:http://www.cnblogs.com/macro-cheng/archive/2011/10/25/mysql ...
安装完openfire登录管理控制提示:
Login failed:make sure your username and password are correct and that you’re an admin or moderator
解决方案如下:
1.使用Mysql查看工具进入数据库,进入表“ofuser”,将该表清空,然后执行该SQL
INSERT INTO ofUser (username, plainPassword, name, email, creationDate, modificationDate) VALUES ('admin', ' ...
+ (UIImage*)scaleImage:(UIImage*)img toSize:(CGSize)size{
int h = img.size.height;
int w = img.size.width;
if(h <= size.height && w <= size.width) {
return img;
} else {
float destWith = 0.0f;
float destHeight = 0.0f;
...