自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 Java 字符串操作

Regular Expressions: \\s 匹配任何不可见字符,包括空格、制表符、换页符等等。等价于[ \f\n\r\t\v]。 \\S 匹配任何可见字符。等价于[^ \f\n\r\t\v]。 \\w 匹配包括下划线的任何单词字符。类似但不等价于“[A-Za-z0-9_]”,这里的"单词"字符使用Unicode字符集。 \\W 匹配任何非单词字符。等价于“[^A-Za-z0-9_]”...

2019-01-02 21:54:47 139

原创 Ubuntu16.04 在docker中搭建hadoop集群的配置与测试

hadoop集群的配置参照 https://blog.csdn.net/weixin_42051109/article/details/82744993 这里补充几点 1. 需要配置Slave名字 修改$HADOOP_HOME/etc/hadoop下面的slave,里面有slave的名字,修改成slave的主机名 2. 查看log: log文件在hadoop目录(镜像中为/usr/lo...

2018-12-26 23:25:09 532

原创 Priority Queue and Heap

Time complexity topmax/topmin O(1) push O(logn) Pop O(logn)   Remove (Java) Priority Queue: O(n) (traverse O(n) + swap O(1) + sift up/down O(logn)) Hash Heap: O(logn) (traverse O(1) + swap O(1)...

2018-11-12 15:30:48 238

原创 Python 基本数据结构使用方法

1. Queue 用collections.deque实现 double linked list queue = collections.deque([]) queue.append(0) //O(1) queue.popleft() //O(1) 2. Stack 用list就可以实现。。  

2018-10-31 11:49:16 160

转载 C++ iterator & const_iterator

我们在C++中使用STL的容器时,经常会用到迭代器。使用迭代器可以很方便的进行容器元素遍历和修改等操作。 近日,在使用Visual Studio 2015编程的时候发现,set的迭代器直接就是const_iterator类型,而vector的迭代器则是普通的iterator类型,这是为什么呢?今天就和大家一起来探究一下。 Set/Map类型 1 set<int>::iterat...

2018-10-30 13:31:27 250

转载 C++ pair/map/set 基本用法

1. pair initialize: pair<int, int> p1 = {6, 8}; pair<string, int> p2("tom", 24);   p1.first = 10; cout << p1.first << " " << p1.second; //10 8 2. map 1):map则是

2018-10-30 13:28:50 1591

原创 C++ vector容器基本用法

vector initialize: vector<int> v1; //empty vector<int> v2(v1) ;  vector<int> v2(v1.begin(), v1.end()); vector<int> v3(n, i); //n numbers of i vector<int> v4(n); //n ...

2018-10-30 13:13:05 204

原创 C++, Python, Java string的操作对比

C++: initialize: string str1(5, 'c'); string str2("Now is the time..."); string str3(str2, 11, 4); cout << str1 << endl; //ccccc cout << str2 << endl; //Now is the time.....

2018-10-30 10:44:25 130

原创 C++ Technical Interview Questions

Virtual Functions Difference between Java and C++   ****挖坑待补****

2018-10-14 13:13:19 150

原创 Python Technical Interview Questions

Decoration Dynamic typing Garbage management Inheritance ****挖坑待补****

2018-10-14 13:11:03 214

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除