06 2015 档案
摘要:插入排序C++代码:template void SortUtil::insertionSort(vector& data){ int j = 0; for (int i = 1; i 0 && data[j - 1] > key) { data[j]...
阅读全文
摘要:1. Range-Based for Loopsfor ( decl : coll ) {statement}eg:for ( int i : { 2, 3, 5, 7, 9, 13, 17, 19 } ) { std::cout vec;...for ( auto& elem : vec ...
阅读全文
摘要:1. Uniform Initializationint values[] { 1, 2, 3 };std::vector v { 2, 3, 5, 7, 11, 13, 17 };std::vector cities {"Berlin", "New York", "London", "Brauns...
阅读全文
摘要:1. 选中模拟器,在屏幕上方的菜单中找到Hardware->Keyboard2. 直接快捷键shift+command+k
阅读全文
摘要:大家知道,在iOS中所有的视图都继承自UIView。UIView处理所有的触摸事件和画图。事实上,UIView所有的渲染和动画是托管给另一个类来负责的,它就是CALayer。但是,需要记住的是,CALayer不负责responder chain,也就是说,无法对事件作出响应。每个UIView都有一个...
阅读全文