Zenghui Bao's World

about life, programming, misc thoughts.

折腾结束了

找工作找了三个月,现在终于有着落了。

实现了一个小型的容器库

最近两个月花时间实现了一个小型的容器库(Github地址,以下简称Minimal Container),实现了C++中的dynamic array,list,queue,map,hashmap,set,hashset等基本的容器,它是一个非正式的、业余的作品,做这个小项目主要是想积累一下写库的经验。这篇文章记录一下我编程时遇到的问题、及每个容器的实现思路。

Quicksort in Linked List

Quick sort is a common sort method for objects stored contiguously, such as arrays. Recently, while implement a list template, I trying to migrate quick sort method to doubly linked list. The basic ideas of implementing quicksort in arrays and in lists are same, also based on partition, but there’s one thing different: The list does not support random access based on index. This essay will discuss how to implement quicksort in the list.

Linux Bash Vulnerability: ShellShock

French Linux enthusiasts Stéphane Chazelas in mid-September 2014, discovered the famous BASH SHELL implementation vulnerability (ShellShock, number CVE-2014-6271), it can execute script code by constructing environment variables. This vulnerability can affect a large number of linux application interact with bash, so that the America National ​​Security Division score this vulnerability 10 points, this is the most devastating score. This essay mainly discusses about the condition of the loophole occurrence, principle analysis, and vulnerability remediation methods.

shell练习:批量修改目录下的文件后缀名

上个星期组长给我分配了一个任务,要将一个目录下的所有子目录的文件名转换成小写,文件的内容中有路径的也将转换成小写,功能可以用任何编程语言实现。我想了一下,这个用shell实现最方便,只需要一个函数遍历子目录,另一个函数做文件名替换的工作。

[转] 求知成瘾,却无作品

文/紫松

激励是人学习的关键因素。可当知识本身成为求知的激励,你已求知成瘾,进入了好学的骗局。

如何记忆

关于记忆有很多方法论,这里只是记录一下我的一些胡思乱想。

工作上的问题

最近工作上老是健忘,很多内容想不起来,比如一个项目中某个程序段的位置,很久以前改的bug的位置,某个linux命令,gdb调试命令,telnet调试命令,wireShark过滤表达式的语法,正则表达式的语法……这些内容中常用的需要记忆的知识其实不多,自己花时间强记一下,应该不会太难。可是最近工作时,老是想不起来,经常要翻笔记,才能慢慢回忆起来。

Google C++编程风格指南

前几个月阅读了《从缺陷中学习C/C++》《C++ primer 5th》,两本书都由潘爱民老师做序,在序中推荐结合《Google C++ Style Guide》一起阅读,所以最近花了点时间读完了这份文档。