09 2017 档案

摘要:``` var arr=[5,3,8,6,4,1,9]; for(var i=1;i 阅读全文
posted @ 2017-09-25 14:00 技术-刘腾飞 阅读(133) 评论(0) 推荐(0)
摘要:``` var arr=[5,3,8,6,4]; console.log(arr) for(var i=0;ii;j ){ if(arr[j] 阅读全文
posted @ 2017-09-25 13:58 技术-刘腾飞 阅读(210) 评论(0) 推荐(0)
摘要:``` var arr=[5,3,8,6,4,1,9]; var minindex=0; //设置变量,记录算法的移动指针 for(var i=0;i 阅读全文
posted @ 2017-09-25 13:58 技术-刘腾飞 阅读(144) 评论(0) 推荐(0)
摘要:js描述集合 function Set(){ this.datasource=[]; this.add=add; this.remove=remove; //this.size=size; //this.union=union; //this.intersect=intersect; //this. 阅读全文
posted @ 2017-09-23 16:33 技术-刘腾飞 阅读(147) 评论(0) 推荐(0)
摘要:js描述链表 有些情况下js的数组结构在实际使用中速度很慢,此时可以考虑用链表来代替它; 示例 github:https://github.com/Frankltf/js node/tree/features one 阅读全文
posted @ 2017-09-23 09:48 技术-刘腾飞 阅读(213) 评论(0) 推荐(0)
摘要:js描述队列 队列的特性是只能在队尾插入元素,在队首删除元素,先进先出; 队列被用在很多地方,比如提交操作系统执行的一系列进程,打印任务池,模拟现实中的排队; github:https://github.com/Frankltf/js queue/tree/features one 阅读全文
posted @ 2017-09-22 11:44 技术-刘腾飞 阅读(187) 评论(0) 推荐(0)
摘要:js描述栈及栈的使用 栈的特性就是只能通过一端访问,这一段就是叫做栈顶。咖啡馆内的一摞盘子就是最形象的栈的例子; 根据栈的特性,就可以定义栈的一些特殊属性和方法;用js的描述栈的时候底层数据结构用的是数组,通过this.top来跟踪最后一个元素的索引来实现栈的数据结构; 栈的使用场景 回文:即一个字 阅读全文
posted @ 2017-09-20 15:22 技术-刘腾飞 阅读(184) 评论(0) 推荐(0)
摘要:CoreLocation框架实现定位功能(iOS8.0之后) github:https://github.com/Frankltf/ios CoreLocation/tree/features one 阅读全文
posted @ 2017-09-20 12:54 技术-刘腾飞 阅读(151) 评论(0) 推荐(0)
摘要:``` #import "XMGSeeBigPictureViewController.h" #import "XMGTopic.h" #import #import @interface XMGSeeBigPictureViewController () @property (weak, nonatomic) IBOutlet UIButton *saveButton; @propert... 阅读全文
posted @ 2017-09-19 11:16 技术-刘腾飞 阅读(289) 评论(0) 推荐(0)
摘要:``` import "ViewController.h" import @interface ViewController () @end @implementation ViewController (void)viewDidLoad { [super viewDidLoad]; // Do a 阅读全文
posted @ 2017-09-07 13:26 技术-刘腾飞 阅读(517) 评论(0) 推荐(0)
摘要:1.设置scrollview的代理 2.实现如下方法 (UIView )viewForZoomingInScrollView:(UIScrollView )scrollView{ return self.imageview; } 3.设置scrollview放大缩小的最大最小值 scroll.max 阅读全文
posted @ 2017-09-07 10:55 技术-刘腾飞 阅读(160) 评论(0) 推荐(0)
摘要:``` + (void)removeDirectoryPath:(NSString *)directoryPath { // 获取文件管理者 NSFileManager *mgr = [NSFileManager defaultManager]; BOOL isDirectory; BOOL isExist = [mgr fileExistsAtPath:... 阅读全文
posted @ 2017-09-06 14:57 技术-刘腾飞 阅读(122) 评论(0) 推荐(0)
摘要:![](http://images2017.cnblogs.com/blog/1159210/201709/1159210-20170905145851351-94829641.png) 阅读全文
posted @ 2017-09-05 14:59 技术-刘腾飞 阅读(153) 评论(0) 推荐(0)
摘要:1.获取上下文的组件 2. ref属性不仅接受string类型的参数,而且它还可以接受一个function 作为callback。如:将组件view作为参数赋值给this._view this._view=e} / 3. 可以在组件类中定义任何公共方法(如在 Typeahead 中的复位方法), 并 阅读全文
posted @ 2017-09-05 14:57 技术-刘腾飞 阅读(1353) 评论(0) 推荐(0)
摘要:``` #import "XMGTopicViewController.h" #import #import #import "XMGTopic.h" #import #import "XMGTopicCell.h" #import #import @interface XMGTopicViewController () /** 当前最后一条帖子数据的描述信息,专门用来加载下一页数据 ... 阅读全文
posted @ 2017-09-05 12:01 技术-刘腾飞 阅读(499) 评论(0) 推荐(0)
摘要:setState用来更新RN的视图层显示,每一次setState操作都会更新整个 视图,于是对应的是性能消耗,在某些特殊情况下就会造成卡顿 app假死等问题; 因此个人使用setState中总结的原则: 第一:尽量减少不必要的视图刷新; 第二:尽量减少视图刷新的范围; 如何尽量减少不必要的视图刷新? 阅读全文
posted @ 2017-09-05 11:54 技术-刘腾飞 阅读(732) 评论(0) 推荐(0)