- 博客(32)
- 资源 (4)
- 收藏
- 关注
原创 Qualcomm Atheros Device [168c:0041] (rev 20) ubuntu wifi driver
最近把联想拯救者装了ubuntu15.10。装完发现wifi用不了。一搜联想的一大堆本子装ubuntu都有这问题,包括yoga使用命令查看网卡型号: $lspci -nn |grep Network03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0041] (rev 20)这个在windows里能看到
2016-01-24 13:27:18
3180
原创 libhdfs 报错和解决方法
使用libhdfs时,一定要把jdk的clib路径添加进 /etc/ld.so.conf 中/usr/local/lib/jdk1.8.0_45/jre/lib/amd64/usr/local/lib/jdk1.8.0_45/jre/lib/amd64/server否则报link错误.另一个错误是运行时loadFileSystems error:(unable to get
2016-01-18 18:23:43
3551
1
转载 无符号和栈破坏情况下coredump的分析方法
原文:http://zhangzhibiao02005.blog.163.com/blog/static/37367820201482044137298/无符号和栈破坏情况下coredump的分析方法昨天在上线的时候,出现了一个无符号和栈破坏的coredump.今天总结下这类core的追查方法:1.打开core,gdb /tmp/gss core.20140911180
2015-12-23 11:23:37
9342
转载 MongoDB Replica Sets + Sharding 方案 及 chunks块 和 片键分析
以下就是我们将要搭建的mongdb集群架构创建第一个replset---------------------------------------------------------------------------------------------------------------------------------------------------创建目录mk
2015-10-20 16:08:23
564
原创 Emacs 24.4 配置C++智能提示
依赖clang++智能提示需要使用clang++编译器,否则会报错并提示失败。company-mode用于智能提示,依赖clang++编译器的分析,可以提示标准库函数 安装方法 M-x list-package 查找 company-mode 安装。flycheck用于语法提示,速度飞快,且精准。 安装方法 M-x list-package 查找 flycheck 安装。auto-comp
2015-10-10 17:59:00
1475
原创 std::forward 完美转发的原理
C++11里面有两个函数比较有意思,一个是std::move 另一个就是std::forward.move函数是用来实现右值引用的。而forward是用来转发参数的。假设有这样一个模板转发函数:template<typename T>void DoSomething(/* */){ DoItActually(/* */);}DoItActually(int & a){}//lvalue
2015-08-04 23:11:49
2687
原创 C++ log
以下代码摘自SSDB。 最近项目使用boost log 发现有些问题,于是在 SSDB源码里找到了下面的log类,使用起来不错。大家可以学习一下文件操作和变长参数函数实现。log.h/*Copyright (c) 2012-2014 The SSDB Authors. All rights reserved.Use of this source code is governed by a B
2015-07-09 15:20:14
871
原创 C++ 线程池
简单的线程池实现下面这段代码摘自CppCMS thread_pool.cpp 。 CppCMS是一个C++ 的Web开发框架,用于可发展的网站,性能极高。推荐给大家使用。/////////////////////////////////////////////////////////////////////////////////
2015-07-09 15:11:29
551
原创 LeetCode --- Plus One
Plus OneGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.My Submitted Codeclas
2015-06-07 21:45:22
496
原创 LeetCode --- Climbing Stairs
Climbing Stairs You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?My Submitted
2015-06-07 21:42:27
531
原创 LeetCode --- Add Binary
Add Binary Given two binary strings, return their sum (also a binary string). For example, a = “11” b = “1” Return “100”.My Submitted Codeclass Solution {public: string addBinary(
2015-06-07 21:38:32
352
原创 LeetCode --- Maximum Subarray
Maximum Subarray Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2,1,−5,4], the contiguous
2015-06-07 21:26:57
439
原创 LeetCode --- Combination Sum
Combination Sum Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from
2015-06-07 21:18:23
506
原创 SSDB --- zset实现
zsetzset是一种很有用的数据结构,你可能听说过set,但什么是zset呢?zset就是sorted_set(排序集),STL里有set,底层是用红黑树实现的,并没有提供sorted_set的实现,要实现一个zset并不难,比如SSDB的作者就用map和set实现了一个简单的zset。代码在ssdb/src/util/sorted_set.h sorted_set.cpp中。 sorted_s
2015-06-05 14:02:24
2632
原创 SSDB --- queue实现
SSDB介绍SSDB是一款nosql数据库,使用leveldb作为存储引擎,支持众多的数据结构,如 queue、zset和hash,宣称可用来替代redis,看来性能不可小觑。其作者是位国人,曾在360游戏部门任职过。SSDB被很多知名公司使用,代码质量不错。 http://ssdb.io/zh_cn/,代码托管在github。queue的实现leveldb本身是k/v数据库,如何在单纯的k/v上
2015-06-01 22:26:33
2808
原创 LeetCode ---Binary Tree Level Order Traversal
Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).
2015-05-30 17:23:05
397
原创 LeetCode --- Same Tree
Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
2015-05-30 17:17:55
448
原创 LeetCode ---Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array
2015-05-30 17:10:11
400
原创 LeetCode --- Remove Nth Node From End of List
Remove Nth Node From End of List
2015-05-30 15:15:07
549
原创 LeetCode --- Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters
2015-05-29 07:43:18
384
Boost graph library User guide.pdf
2015-05-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人