自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(202)
  • 资源 (25)
  • 收藏
  • 关注

原创 Python type and object relationship

1) Everything is object in Python, even types (what the hell, how can this happen ? See below bullet points)2) "class" and "type" are the same thing, they are "type objects". "Type objects" can be s

2013-06-25 12:15:17 1788 1

原创 The problematic NULLs

(1)  The base principalanything OP NULL => NULLNULL OP anything => NULLNULL doesn't equal anything including NULL NULL = NULL => NULLNULL NULLNULL IS NULL => trueNULL IS NOT NULL => fal

2013-06-17 22:37:03 638

原创 free - Linux tools 2 of n

"free" is used to check the system's memory information.Let's understand its output.sysadmin@ubuntu:~$ free                 total             used            free           shared    buffers

2013-06-15 22:08:53 604

转载 /proc/meminfo

How To Analyse Output Of /proc/meminfo | Linux  The /proc filesystem is pseudo filesystem. It does not exist on a disk. Instead, the kernel creates it in memory. It is used to provide in

2013-06-15 21:32:18 1415

原创 top - Linux tools 1 of n

(1) The command linetop -hv|-bcHisS -d delay -n limit -u|U user -p pid -w [cols]# dump top to a text file (-b batch mode)top -b -n 1 > top.txt # use command line instead of command name (-

2013-06-15 12:59:56 923

原创 Linux perf monitor tools

1 - top --> CPU usage, memory usage, swap memory, Cache, Buffer Size, PID process user commands.2 - vmstat -> Virtual Memory Statistics3 - lsof -> open files list4 - tcpdump-i eth0 -> Packet Ana

2013-06-11 09:37:17 1138

转载 C++ auto and decltype Explained

ContentsIntroductionThe auto Keyword: The BasicsThe auto Keyword: The Rest of the StoryWhen auto Is Not a LuxuryThe decltype keyword: The BasicsHow decltype Deduces the Type of an Expression: Case

2013-05-31 22:02:39 2009

转载 C++ Rvalue References Explained

Last updated: March 2013ContentsIntroductionMove SemanticsRvalue ReferencesForcing Move SemanticsIs an Rvalue Reference an Rvalue?Move Semantics and Compiler OptimizationsPerfect Forwarding: T

2013-05-31 21:57:33 2418

转载 How browses work

How browsers workBehind the scenes of modern web browsers Safeguarded by Incapsula IntroductionThe browsers we will talk aboutThe browser's main functionalityThe browse

2013-05-26 22:54:12 1055

原创 Cool tools/binaries you need to know on Linux

1) netstat2) ifconfig3) lsof4) sysstat/iostat5) top6) grep7) awk/gawk8) sed9) chkconfig10) log rotate11) scp12) rsync13) screen14) tup15) ps 16) ls

2013-05-05 20:57:20 652

原创 Greenplum - Merge tables in two different database instances

(1) Solution 1:pg_dump -d launchpad -t src_flr_sum2 | psql lsipsql -d lsi insert into src_flr_sum select * from src_flr_sum2;(2) Solution 2:http://blog.2ndquadrant.com/using_dblink_in_gree

2013-04-22 13:43:48 978

原创 Regex in VIM

1) The metacharacters2)  The greedy qualifiers3)  The non-greedy qualifiers4) The ranges[12345], [^"], [a-z], [-0-9], ...5) The grouping and backreferences6) The alternatives

2013-04-08 22:20:30 1339

转载 Software development procedure at Facebook

http://www.csdn.net/article/2013-03-15/2814517

2013-04-07 10:26:26 714

原创 Python Logger module

2013-03-13 21:48:55 717

原创 Python yield expression (generator)

When a function has a "yield" expression, it is called generator.The generator doesn't run until it is called with next(g) or g.next(). The first time to call the function which has "yield" expression

2013-02-25 09:49:18 792

原创 The implementation of multiprocess.Queue

Note:1) When calling _buffer.popleft(), it doesn't hold any lock in QueueFeederThread.2) It uses semaphore/pipe for mulitiprocess resource management.3) Reader and Writer are holding different l

2013-02-24 15:39:16 730

原创 Solution to the failure of installing pywin32-218.win-amd64-py2.6.exe in Win7 64bit

During the installation of package downloaded from sourceforge.net, it reports the following error in its post installation process.With the following traceback:Traceback (most recent call

2013-01-18 14:42:10 4452

原创 config group quota for smb shares in Ubuntu

1) sudo vim /etc/fsftabEdit the corresponding filesystem entry as below (add "grpquota"):/dev/mapper/lpfs-root  /   ext4    grpquota,errors=remount-ro 0    12) Remount the file systemsudo moun

2013-01-09 17:46:32 816

原创 Windows - "Multiple connections to a server or shared resource by the same user..."

After created a new smb share directories in Ubuntu and trying to access in Windows, it complains as below :After running the following command, I can access this new share, but I lost the previou

2013-01-09 14:58:05 4264

转载 My End of the World Post

With the coming and passing of the predicated date of the Mayan apocalypse, I got to thinking about what kind of final advice I would leave the development world in the event of my untimely departure.

2013-01-05 09:57:38 907

转载 Suggestion for using "auto" from Herb Sutter

Short answer: More completely, my current opinion on auto is that you should useauto by default unless you explicitly want a conversion. (Slightly more precisely, "... unless you want to explicitly co

2013-01-03 19:38:08 472

原创 Extend ext3 filesystem for RH5 Virtual Machine running in vCluster

1) Add more disk space to RH VM by vSphere    a. Power off the RH VM    b. Click 'Edit Virtual Machine Setting' in the panel of vSphere     c. 'Hardware -> Hard Disk 1 -> Increase the provisione

2012-12-07 13:40:36 693

转载 vector<> VS <> deque<> VS list<>

Here is the summary from an interesting performance benchmark article which comparing vector and list int C++11ConclusionTo conclude, we can get some facts about each data structure:std::l

2012-11-29 18:03:29 562

转载 Universal References in C++11—Scott Meyers

T&& Doesn’t Always Mean “Rvalue Reference”by Scott MeyersRelated materials:A video of Scott’s C&B talk based on this material is available on Channel 9.A black-and-white PDF version of thi

2012-11-27 22:18:52 1779

转载 On the Superfluousness of std::move - Scott Meyers

During my presentation of "Universal References in C++11" at C++ and Beyond 2012, I gave the advice to apply std::move to rvalue reference parameters and std::forward to universal reference parame

2012-11-27 17:19:26 793

原创 Install PostgreSQL 9.2 on RHEL 5, x64

1) Install from rpm    a. download rpm from http://yum.postgresql.org/rpmchart.php  and then do "rpm -ivhpgdg-redhat92-9.2-4.noarch.rpm"    b. rpm -i http://yum.postgresql.org/9.2/redhat/rhel-5-x8

2012-11-22 16:21:56 1312

转载 upsert VS merge

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:[email protected]> create global temporary table ao 2 on commit PRESERVE ROWS 3 as 4 select *

2012-11-14 22:31:41 1373

原创 A nice article which shows how to root cause the package corruption

http://mina.naguib.ca/blog/2012/10/22/the-little-ssh-that-sometimes-couldnt.html

2012-11-14 22:27:38 594

原创 After clone Redhat machine by using vSphere, can't reach the new machine

After cloning the redhat machine by using vSphere and configure the ip address by using ifconfig, the new machine is not accessible by public network, but can be accessible in the intranet of the VM c

2012-11-14 20:42:28 725

原创 "No match" error while execute the excutable

This related to the C shell and the special characters like "?"{nsgb26}ken_410: echo $SHELL/bin/csh{nsgb26}ken_411: gdb --args./smController -?gdb: No match.{nsgb26}ken_412: ./smController

2012-11-13 18:33:14 524

转载 Python Performance 2 of n - Python Performance Tips, Part 1

Two good articles talking the performance for Python. Bookmark them here.http://blog.monitis.com/index.php/2012/02/13/python-performance-tips-part-1/http://blog.monitis.com/index.php/2012/03/21/py

2012-10-28 14:49:08 650

原创 ctypes free memory which is allocated by C

In Python, how to explicitly free the non-trivial memory (not int/char/ etc) returned by C module ?Say C interface is like as below:____________________struct Dummy{    int a;    int b;

2012-10-27 23:29:03 1370

原创 One quick note for poi lib accessing excel

Usually don't use HSSFRow.getPhysicalNumberOfCells()  (it may return wrong information) to determine how many columns there are in excel spreadsheet, use HSSFRow.getLastCellNum() instead. getPhysicalN

2012-10-25 11:42:01 425

原创 C module with ctypes

Python ctypes module is very convenient for python to integrate C module.Win7 X64 examples:1) Call c dll library passing in arguments and return structure ptrC lib:------------------------

2012-10-24 16:06:37 756

原创 CMake - an example

Project treeCMakeLists file

2012-10-14 17:12:30 742

原创 Watchdog on Linux

On Linux, if we would like to restart our process when it is down without expect, we can achieve this goal by1) As a service, can be used as 'service start/stop program' etcWrite a script which

2012-10-14 10:39:36 505

原创 The protocols - Python

iteration protocol: implement __iter__() methodsequence protocol ([]): implement __len__() and __getitem__() method with integer argument starting at 0iterator protocol: implement __next__() metho

2012-10-08 15:16:10 571

原创 Python Eggs

This is the summary from the network.1) What is Python egg file ?It’s simply a way of distributing Python packages, similar to RPM or Java jar package.2) Where do I find the Python eggs ?You

2012-10-06 10:26:19 1916

原创 Python idioms, 2 of n

1) Don't do trivial assignment in __init__ of the classDon't:class Foo(object):     def __init__(self):        self.attr1 = 0        self.attr2 = ''        self.attr3 = []        self.at

2012-09-26 09:36:06 1305

原创 Python performance 1 of n

If you would like to improve the running performance of Python, try1) Use profile/cProfile to benchmark your program, find the possible hotspot, switch to correct data structure to solve problem etc

2012-09-25 22:43:34 484

MPEG-4 ISO 标准 ISO/IEC14496-3 part3

MPEG-4 ISO 标准 ISO/IEC14496-3,因为文件太大,需分三卷压缩上传,这是第三部分,研究MPEG-4的朋友耐心下载

2009-02-26

MPEG-4 ISO 标准 ISO/IEC14496-3 part2

MPEG-4 ISO 标准 ISO/IEC14496-3,因为文件太大,需分三卷压缩上传,这是第一部分,研究MPEG-4的朋友耐心下载

2009-02-26

MPEG-4 ISO 标准 ISO/IEC14496-3 part1

MPEG-4 ISO 标准 ISO/IEC14496-3,因为文件太大,需分三卷压缩上传,这是第一部分,研究MPEG-4的朋友耐心下载

2009-02-26

MPEG-4 ISO 标准 ISO/IEC14496-15

MPEG-4 ISO 标准 ISO/IEC14496-15,研究MPEG-4的朋友必备

2009-02-26

MPEG-4 ISO 标准 ISO/IEC14496-14

MPEG-4 ISO 标准 ISO/IEC14496-14,研究MPEG-4的朋友必备

2009-02-26

MPEG-4 ISO 标准 ISO/IEC14496-12

MPEG-4 ISO 标准 ISO/IEC14496-12,研究MPEG-4的朋友必备

2009-02-26

MPEG-4 ISO 标准 ISO/IEC14496-6

MPEG-4 ISO 标准 ISO/IEC14496-6,研究MPEG-4的朋友必备

2009-02-26

MPEG-4 ISO 标准 ISO/IEC14496-5

MPEG-4 ISO 标准 ISO/IEC14496-5,研究MPEG-4的朋友必备

2009-02-26

MPEG-4 ISO 标准 ISO/IEC14496-1 2004 third edition

MPEG-4 ISO 标准 ISO/IEC14496-2,研究MPEG-4的朋友必备

2009-02-26

MPEG-4 ISO 标准 ISO/IEC14496-2

MPEG-4 ISO 标准 ISO/IEC14496-2文档,研究MPEG-4的朋友必备

2009-02-26

用TCP/IP进行网际互联(卷1).part1

网络编程的经典书籍,强烈推荐。三卷都上传了,请下载的朋友注意。

2008-03-20

用TCP/IP进行网际互联(卷1).part2

网络编程的经典书籍,强烈推荐。三卷都上传了,请下载的朋友注意。

2008-03-20

用TCP/IP进行网际互联(卷3).part2

网络编程的经典书籍,强烈推荐。

2008-03-19

用TCP/IP进行网际互联(卷3).part1

网络编程的经典书籍,强烈推荐。第三卷分两个分卷压缩包上传此为第一部分。

2008-03-19

用TCP/IP进行网际互联(卷3).part1

网络编程的经典书籍,强烈推荐。第三卷分两个分卷压缩包上传此为第一部分。

2008-03-19

用TCP/IP进行网际互联(卷2)

网络编程的经典书籍,强烈推荐。三卷我都会上传,请关注。

2008-03-19

C++国际标准(C++ Standard)

C++国际标准,强烈推荐学习研究C++的朋友下载

2007-10-21

inside the c++ model 深度探索C++对象模型.part1.rar(中文版

c++牛书,推荐阅读

2007-10-12

inside the c++ model 深度探索C++对象模型.part1.rar(中文版)

深入c++系列,牛书,分两部分上传

2007-10-12

the c++ Standard library C++标准程序库—自修教程与参考手册.part4.rar(中文版)

分四部分上传。上次上传了第一部分后,因网络原因不能上传第二部分。所以大家不要下以前那个版本。在次也向各位表示歉意。

2007-10-12

the c++ Standard library C++标准程序库—自修教程与参考手册.part3.rar(中文版)

分四部分上传。上次上传了第一部分后,因网络原因不能上传第二部分。所以大家不要下以前那个版本。在次也向各位表示歉意。

2007-10-11

the c++ Standard library C++标准程序库—自修教程与参考手册.part2.rar(中文版)

分四部分上传。上次上传了第一部分后,因网络原因不能上传第二部分。所以大家不要下以前那个版本。在次也向各位表示歉意。

2007-10-11

the c++ Standard library C++标准程序库—自修教程与参考手册.part1.rar(中文版)

分四部分上传。上次上传了第一部分后,因网络原因不能上传第二部分。所以大家不要下以前那个版本。在次也向各位表示歉意。

2007-10-10

the c++ Standard libraryC++标准程序库—自修教程与参考手册.pdf(中文版)

应上传文件不能超过10MB,所以分卷上传

2007-10-07

C++ net programming using ACE

C++网络编程方便的经典书籍

2007-08-11

空空如也

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

TA关注的人

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