- 博客(7)
- 资源 (3)
- 收藏
- 关注
原创 leetcode 143. Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1,2,3,4}, reorder it t
2016-01-15 20:18:42 393
原创 muduo源码分析:reactor模型封装
图中FileDescriptor、socket都不是类 EventLoop:loop --》poller::loop --》pollPoller ::loop 或者epollpoller,循环等待io事件 poller是抽象类,pollpoller和epollpoller 是其子类,实现poll(),updateChannel(),和 removeChannel() 三个纯虚函数。 c
2016-01-11 16:12:41 888
原创 leetcode 142. Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up: Can you solve it without using extra space? 思路:先
2016-01-07 22:34:36 651
转载 auto_ptr、shared_ptr、weak_ptr、scoped_ptr用法小结
auto_ptr auto_ptr是现在标准库里面一个轻量级的智能指针的实现,存在于头文件 memory中,之所以说它是轻量级,是因为它只有一个成员变量(拥有对象的指针),相关的调用开销也非常小。 下面的代码来自于VC++ 8.0里面的源码: 里面有个auto_ptr_ref的数据结构,我们可以把它忽略,这个只是内部使用的代理结构,用于一些隐式的const变化
2016-01-07 15:12:15 497
转载 使用gdb调试nginx源码
工欲善其事必先利其器,如何使用调试工具gdb一步步调试nginx是了解nginx的重要手段。 ps:本文的目标人群是像我这样初接触Unix编程的同学,如果有什么地方错误请指正。 熟悉gdb的使用 这里就不说了,谷歌一搜一堆,这里推荐一篇文章:GDB 命令详细解释 请重点看一下step,run,break,list,info,continue命令 下载nginx源码
2016-01-04 11:21:16 764
原创 leetcode 146. LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive) of the key if
2016-01-02 21:30:09 525
转载 git/github初级运用自如
转自:虫师 http://www.cnblogs.com/fnng/archive/2012/01/07/2315685.html 之前初学过一点git版本控制工具,利用github做仓库,照着github上的文档练习的了一下。不过那只篇只是照虎画猫(我的水平只能照着老虎画个猫模样,嘻嘻!)。 最近在学hibernate,公司与家之间都要调用我练习的小项目,交给git/gi
2016-01-02 13:07:39 544
iNodeClient_Linux(32/64)
2015-11-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人