WatchKit app需要一个现有的iOS app。在iOS app工程中,添加一个新的WatchKit app target,它包含了WatchKit app和WatchKit extension中需要的资源。他们会和iOS app一起发布到appstore。WatchKit app targe...
分类:
移动开发 时间:
2015-04-29 21:28:42
阅读次数:
420
在创建项目工程时,ARC(Automatic Reference Counting)是默认开启的,虽然ARC很好用,但有时不得不关闭。比如Xcode中经常需要导入一些外来的代码文件,如果导入的文件没有使用ARC机制而当前项目使用了ARC,Xcode会给出警告或者错误信息,这时就需要关闭或开启ARC功能了。
可采取下面的方式彻底关闭整个工程的ARC
点击项目导航文件--> 选中Targe...
分类:
其他好文 时间:
2015-04-21 20:52:17
阅读次数:
252
二分查找法functionbinary_search(source_arr,target){varlen=source_arr.length,start=0,end=len-1,middle,middle_val;while(start<=end){middle=parseInt((start+end)/2);middle_val=source_arr[middle];if(middle_val==target){returnmiddle;}elseif(middle_val>targe..
分类:
编程语言 时间:
2015-04-21 18:34:43
阅读次数:
420
linux下IPTABLES配置详解如果你的IPTABLES基础知识还不了解,建议先去看看.开始配置我们来配置一个filter表的防火墙.(1)查看本机关于IPTABLES的设置情况[root@tp ~]# iptables -L -nChain INPUT (policy ACCEPT)targe...
分类:
系统相关 时间:
2015-04-02 18:48:21
阅读次数:
202
1 增加导航栏按钮方式一 UIBarButtonItem的分类中增加下面的方法 2 +(UIBarButtonItem *)itemWithImageName:(NSString *)imageName highImageName:(NSString *)highImageName targe...
分类:
其他好文 时间:
2015-02-28 15:58:52
阅读次数:
238
请用图片替换掉frameworks的res/res目录下drawable-nodpi/drawable-xhpi/drawable-xxhdpi/drawable-xxxhdpi这四个folder下面的default_wallpaper.jpg。
如果是new整个project ,请忽略下面的步骤。
如果是模块编译framework-res.apk,请先删除alps/out/targe...
分类:
移动开发 时间:
2015-02-27 17:02:34
阅读次数:
204
event.target这是注册事件时的对象,或者它的子元素。通常用于比较 event.target 和 this 来确定事件是不是由于冒泡而触发的。经常用于事件冒泡时处理事件委托。1.this和event.target的区别:js中事件是会冒泡的,所以this是可以变化的,但event.targe...
分类:
Web程序 时间:
2015-02-26 13:22:05
阅读次数:
242
1 'myModal',3 'header' => '标题']);4 echo '内容';5 Modal::end();?>这里只需要设置'data-target'=>'#myModal','data-toggle'=>'modal'1 登录', [ 'data-targe...
分类:
其他好文 时间:
2015-02-14 16:07:51
阅读次数:
168
https://oj.leetcode.com/problems/3sum-closest/Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, targe...
分类:
其他好文 时间:
2015-02-10 21:42:48
阅读次数:
373
Q:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the targe...
分类:
其他好文 时间:
2015-01-31 14:40:36
阅读次数:
225