This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import java.util.Arrays; | |
import java.util.stream.Collectors; | |
public class MyClass { | |
public static void main(String args[]) { | |
List<Place> places = Arrays.asList( | |
new Place(2, 2), | |
new Place(1, 1), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import java.util.Arrays; | |
public class MyClass { | |
public static void main(String args[]) { | |
List<Place> places = Arrays.asList( | |
new Place(2, 2), | |
new Place(1, 1), | |
new Place(3, 3) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------ | |
2014.10.20 | |
问题描述:在一加手机上刷CM系统的官方教程? | |
解决方法: | |
[教程] 一加手机 oneplus 刷 CyanogenMod 详细教程,请认真观看 | |
http://www.oneplusbbs.com/forum.php?mod=viewthread&tid=408783 | |
[ROM] CyanogenMod官方固件 CM11S XNPH33R official & OTA XNPH38R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void test6() { | |
int value = 1; | |
function<void()> f = [&value]() { value += 1; }; | |
cout << value << endl; // 1 | |
f(); | |
cout << value << endl; // 2 | |
f(); | |
cout << value << endl; // 3 | |
class TestLambda { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int global_value = 10; | |
int test() { | |
int local_value = 20; | |
int value_by_ref = 30; | |
function<int(int)> f = [global_value, local_value, &value_by_ref](int arg) { | |
return global_value + local_value + value_by_ref + arg; | |
}; | |
cout << f(40) << endl; // 10 + 20 + 30 + 40; | |
} |