// 当服务端接口没做好时,本地可以构造假数据,并转换为json数据
NSError *error;
NSString *dataStr = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"indEditor" ofType:@"txt"] encoding:NSUTF8Stri...
分类:
移动开发 时间:
2014-12-11 12:31:02
阅读次数:
148
类型查询public class bbb:xxx{}var items = from c in context.Dbset where c is bbb select c;var items= from c in context.Dbset.OfType() select c;
分类:
其他好文 时间:
2014-12-10 00:17:57
阅读次数:
163
都是指定对象的类型 不同的是当使用反向查询select从另一个maper文件中取出数据时必须用ofType都可以为collection和association是指定对象的类型, 都不是必须写的, 只有反向select时需要ofType;一般在collection中默认就是List所以不用指定, 如果...
分类:
编程语言 时间:
2014-12-08 15:10:28
阅读次数:
1542
NSBundle一.获取图片1. NSString *path = [[NSBundle mainBundle] pathForResource:@"resourceName" ofType:@“resourceType"]; UIImage *image = [[UIImageimageW...
分类:
其他好文 时间:
2014-12-05 10:32:35
阅读次数:
160
public class SendCommand : ICommand
{ public void Execute(object parameter) { var labels = ((object[]) parameter).OfType(); } public bool CanExecute(o...
//从budle路径下读取音频文件 轻音乐 - 萨克斯回家 这个文件名是你的歌曲名字,mp3是你的音频格式NSString *string = [[NSBundle mainBundle] pathForResource:@"轻音乐 - 萨克斯回家" ofType:@"mp3"];//把音频文件转....
分类:
其他好文 时间:
2014-12-03 12:06:26
阅读次数:
163
不要用imageNamed用这个方法,内存不会清理的NSString *path = [[NSBundle mainBundle] pathForResource:@"icon" ofType:@"png"];myImage = [UIImage imageWithContentsOfFile:pa...
分类:
其他好文 时间:
2014-11-28 17:58:29
阅读次数:
101
1,本地的html文件一定要放到工程文件的根目录2,html代码中的图片路径一定要是相对路径3,下面是用UIWebView调用本地文件的方法方法一:NSString*filePath = [[NSBundlemainBundle]pathForResource:@"1"ofType:@"html"]...
分类:
移动开发 时间:
2014-11-26 13:54:52
阅读次数:
144
使用JsonKit解析中文时如果返回值为空,可能使用因为计算长度时不准确造成的。
解决方法:
NSString *pricePath = [[NSBundle mainBundle] pathForResource:@"CarSelectPrice" ofType:@"json"];
NSString *priceStr = [[NSString alloc] initWithCont...
分类:
Web程序 时间:
2014-11-22 17:31:50
阅读次数:
152
Nodes: Nodes 方法返回IEnumerable类型的对象,因为返回的节点可能是不同的类型,比如XElement.我们可以使用ofType(type)来指定返回某个类型的节点. Elements : 由于获取XElements是一个非常普遍的需求,于是出现了Nodes.OfType(XEle...
分类:
其他好文 时间:
2014-11-18 23:43:16
阅读次数:
335