摘要: image.userInteractionEnabled = YES; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(imagePressed:)]; [image addGestureRecognizer:tap]; 阅读全文
posted @ 2015-12-14 09:45 Ficow 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 安装cocoapods的流程: 1.打开终端,输入: sudo gem update —system 2.输入密码,稍等 3.gem sources --remove https://rubygems.org/ ,最后的那个斜杠不能省略!!成功后显示 ...removed from sources。 阅读全文
posted @ 2015-12-13 10:40 Ficow 阅读(353) 评论(0) 推荐(0) 编辑
摘要: NSString *path = [[@"~" stringByExpandingTildeInPath] stringByAppendingString: @"/tmp.txt"]; [path writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:nil]; 阅读全文
posted @ 2015-12-12 10:02 Ficow 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 源码来自《Objective-C基础教程》 阅读全文
posted @ 2015-12-12 09:35 Ficow 阅读(984) 评论(0) 推荐(0) 编辑
摘要: NSDateFormatter *formatter = [[NSDateFormatter alloc]init]; [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; NSString *dateTime = [formatter stringFromDate:[NSDate date]]; NSLog(@"formatted time i... 阅读全文
posted @ 2015-12-12 09:31 Ficow 阅读(558) 评论(0) 推荐(0) 编辑
摘要: 创建Empty文件,最好与其Controller同名, 在File's Owner的类属性里面指明其所属类(或者说它是个什么Controller), 从File's Owner右键拖向内部创建的视图(如UIView),选择view进行关联。 在Controller 的initWithNibName方 阅读全文
posted @ 2015-12-11 17:40 Ficow 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 1.不可变词典NSDictionary 字典初始化 NSNumber *numObj = [NSNumber numberWithInt:100]; 以一个元素初始化 NSDictionary *dic = [NSDictionary dictionaryWithObject:numObj forKey:@"key"]; 初始化两个元素 NSDictionary *dic =... 阅读全文
posted @ 2015-12-11 14:21 Ficow 阅读(881) 评论(0) 推荐(0) 编辑
摘要: 非ARC模式下: ARC模式下: 阅读全文
posted @ 2015-12-10 10:03 Ficow 阅读(665) 评论(0) 推荐(0) 编辑
摘要: 1、 同步GET请求 //第一步,创建URL NSURL *url = [NSURL URLWithString:@"http://api.hudong.com/iphonexml.do?type=focus-c"]; //第二步,通过URL创建网络请求 NSURLRequest *request = [[NSURLRequ... 阅读全文
posted @ 2015-12-10 09:38 Ficow 阅读(2535) 评论(0) 推荐(0) 编辑
摘要: 新手写来自己用做备忘录的,可能存在很多错误,不喜勿喷。如有高手愿意指点一下,在下感激不尽! 阅读全文
posted @ 2015-12-10 00:02 Ficow 阅读(243) 评论(0) 推荐(0) 编辑
摘要: You can easily add it to the plist using the GUI: On the last line add the + Enter the name of the group: App Transport Security Right click on the gr 阅读全文
posted @ 2015-12-07 13:13 Ficow 阅读(209) 评论(0) 推荐(0) 编辑
摘要: package service; import java.util.regex.Matcher; import java.util.regex.Pattern; public class CodeChange { /* * 把中文字符串转换为十六进制Unicode编码字符串 */ public static String stringToUnicode(String s)... 阅读全文
posted @ 2015-11-26 00:28 Ficow 阅读(3531) 评论(0) 推荐(0) 编辑
摘要: 输出结果:sb:abcdefghij sb_sub:de sc:0123456789 sc_sub:34 sb_copy:abcdefghij 二、方法: 说明: ①、所有方法均为public。 ②、书写格式: [修饰符] <返回类型><方法名([参数列表])> 例如:static int pars 阅读全文
posted @ 2015-11-25 21:12 Ficow 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 1 URL url = new URL(strUrl); 2 URLConnection con = url.openConnection(); 1 URL url = new URL(strUrl); 2 HttpURLConnection con = (HttpURLConnection)url.openConnection(); 阅读全文
posted @ 2015-11-25 20:54 Ficow 阅读(1112) 评论(1) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-11-25 20:51 Ficow 阅读(2176) 评论(0) 推荐(0) 编辑
摘要: 1、打开 Eclipse -> Window -> Perferences -> Java -> Editor -> Content Assist,在右边最下面一栏找到 auto-Activation ,下面有三个选项,找到第二个“Auto activation triggers for Java: 阅读全文
posted @ 2015-11-25 19:50 Ficow 阅读(2408) 评论(1) 推荐(0) 编辑
摘要: 使用Tomcat服务器时,访问地址的 localhost 改为 127.0.0.1 即可看到效果。 阅读全文
posted @ 2015-11-25 18:42 Ficow 阅读(2976) 评论(0) 推荐(0) 编辑
摘要: 创建的项目类型为WEB PROJECT。 新建的.JSP文件,可直接访问的放到WebRoot目录下,不可直接访问的就放到WEB-INF里。 要添加的.jar文件,复制到项目目录内,再右键Build Path - Add to build Path Deploy时,选择好服务器,如:Tomcat 7. 阅读全文
posted @ 2015-11-25 18:35 Ficow 阅读(931) 评论(0) 推荐(0) 编辑
摘要: 注意事项: 1.一个.xib里面最多设置一个cell 2.要仔细调整自动布局,其实它不太好用 3.记得设置<UITableViewDataSource>委托 4.记得在ViewController中为TableView设置IBOutlet 5.从controller图标拖线到tablview上,关联 阅读全文
posted @ 2015-11-24 23:30 Ficow 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 关于cocoapods的安装和使用的基本教程: http://my.oschina.net/vimfung/blog/182427?fromerr=j7l3DvCG 出现以下错误提示: Specs satisfying the `IQKeyboardManager (~> 3.3.4)` depen 阅读全文
posted @ 2015-11-23 00:10 Ficow 阅读(5457) 评论(0) 推荐(0) 编辑
摘要: 可以学习一下使用ReactiveCocoa库来做LoginDemo,很好用哦! 阅读全文
posted @ 2015-11-20 17:28 Ficow 阅读(437) 评论(0) 推荐(1) 编辑
摘要: 一、隐藏自身软键盘 当对于有多个UITextField控件都想通过点击“Return”来隐藏自身软键盘的情况,这时的最好办法是使用Did End on Exit事件。在点击软键盘右下角的“Return”按钮后,会触发该事件。 该事件有一个sender参数表示当前文本框,这样便可以编写一个通用的事件处 阅读全文
posted @ 2015-11-18 23:31 Ficow 阅读(4678) 评论(0) 推荐(0) 编辑
摘要: cd /home/ficow/桌面/rjsupplicant&&sudo chmod +x ./rjsupplicant.sh&&sudo chmod +x ./rjsupplicant.sh&&sudo ./rjsupplicant.sh -d 1 -u 1406100186 -p password 阅读全文
posted @ 2015-09-06 16:14 Ficow 阅读(593) 评论(0) 推荐(0) 编辑
摘要: 之前一直搞不定VMware和锐捷的问题,校园网,你懂的。 后来发现,使用NAT模式联网时,锐捷会间隔性地终结windows系统的那个关于NAT联网的服务,你可以在计算机管理 - 服务,找到一个写有NAT的服务。 然后,有时候也会因为DHCP服务没有启动,无法使用NAT联网。尤其是在VM虚拟机运行苹果 阅读全文
posted @ 2015-09-06 16:10 Ficow 阅读(2058) 评论(0) 推荐(0) 编辑