1.sorted方法举例闭包的方法 不用闭包传入方法(String, String) -> Bool.需要有这一样一个方法 let names = ["Chris", "Alex", "Ewa", "Barry", "Daniella"] func backward(_ s1: String, _ ...
分类:
编程语言 时间:
2016-12-05 16:52:26
阅读次数:
148
http://chun.tips/blog/2014/11/05/bao-gen-wen-di-objective%5Bnil%5Dc-runtime-(2)%5Bnil%5D-object-and-class-and-meta-class/ 刨根问底Objective-C Runtime(1)- ...
分类:
其他好文 时间:
2016-11-08 01:41:44
阅读次数:
319
一、环境配置 关于MIT课程中使用的JOS的配置教程网上已经有很多了,在这里就不做介绍,个人使用的是Ubuntu 16.04 + qemu。另注,本文章中贴出的代码均是JOS中未经修改的源代码,其中有一些细节是MIT课程中要求学生自己实现的。 二、代码分析 1.boot.S(AT&T汇编格式) / ...
分类:
其他好文 时间:
2016-10-22 14:57:57
阅读次数:
357
难度:普及/提高- 题目类型:DFS 提交次数:1 涉及知识:DFS 题目描述 FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 <= N <= 10) in a certa ...
分类:
其他好文 时间:
2016-10-07 23:30:06
阅读次数:
243
vim ~/.inuptrc 文件内容: "\e[A": history-search-backward"\e[B": history-search-forwardset show-all-if-ambiguous onset completion-ignore-case on 保存退出后,在重新登 ...
分类:
系统相关 时间:
2016-09-28 18:53:23
阅读次数:
205
The worst solitude is to be destitute of sincere friendship. 最大的孤独莫过于没有真诚的友谊。 I walk slowly, but I never walk backward. 我走得慢,但从不后退。 ...
分类:
其他好文 时间:
2016-09-26 23:10:10
阅读次数:
176
FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 <= N <= 10) in a certain order and then sum adjacent numbers t ...
分类:
其他好文 时间:
2016-09-20 19:36:19
阅读次数:
220
Backward Digit Sums Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6350 Accepted: 3673 Description FJ and his cows enjoy playing a mental ...
分类:
其他好文 时间:
2016-09-13 01:28:31
阅读次数:
304
copy()
copy_backward()
以上两个对所有容器都适用的
注意:
1, 没有copy_if()算法,可以使用remove_copy_if()算法;
2,复制过程中要逆转元素次序,使用reverse_copy()算法;
3,把容器内所有元素赋值给另一个容器,要使用赋值操作符或者容器的assign()成员函数;
4,复制过程中删除某些元素,使用remove_copy()和...
分类:
编程语言 时间:
2016-08-17 00:14:41
阅读次数:
279