原创 How to think like a Computer Scientist: 課後習題第十四章1
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # #
原创 How to think like a Computer Scientist: 課後習題第十一章 5-11
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # #
原创 How to think like a Computer Scientist: 課後習題第九章 第6題
#------------------------------------------------------------------------------- # Name: module1 # Purpose: #
原创 How to think like a Computer Scientist: 課後習題第十七章2
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # #
原创 How to think like a Computer Scientist: 課後習題第十八章2
import turtle import time def torn(t, order, size): if order == 0: t.forward(size) else: for
原创 [C++] Boost智能指針——boost::scoped_ptr(使用及原理分析)
轉自: http://www.cnblogs.com/helloamigo/p/3572533.html 簡介 boost::scoped_ptr是一個比較簡單的智能指針,它能保證在離開作用域之後它所管理對象能被自動釋放。下面
原创 【算法】插入排序 insert sort algorithm
#include <stdlib.h> #include <stdio.h> #include <string.h> void main() { int a[10] = {9, 8, 7, 6, 5, 4, 3, 2,
原创 【glusterfs】 LOCK 機制:自旋鎖和互斥量
#if HAVE_SPINLOCK #define LOCK_INIT(x) pthread_spin_init (x, 0) #define LOCK(x) pthread_spin_lock (x) #defin
原创 一步步製作RPM包
來源 http://blog.51cto.com/laoguang/1103628 一.RPM製作步驟 我們在企業中有的軟件基本都是編譯的,我們每次安裝都得編譯,那怎麼辦呢?那就根據我們的需求製作RPM安裝包吧。先來說說基本布驟: 1.
原创 XML-RPC簡單使用
轉載自: https://www.cnblogs.com/hupeng1234/p/6716263.html RPC(Remote Procedure Call)即遠程方法調用,是一種在本地的機器上調用遠端機器上的一個過程(方法)的技術
原创 How to think like a Computer Scientist: 課後習題第十八章3
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # #
原创 【坑】glusterfs + ctdb + samba 搭建高可用服務
坑1 : samba 版本與 libtevent版本不兼容問題 所有的安裝包都從這個地址下載吧,不要直接yum install 下載地址:https://download.gluster.org/pub/gluster/samba/Cen
原创 【算法】歸併排序 merge sort
#include <stdio.h> #include <stdlib.h> #include <string.h> int a[15] = {15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
原创 openat用法
轉自 http://blog.csdn.net/wang1902568721/article/details/47796173 《Unix環境高級編程》的第三章和第四章出現了大量的以at結尾的函數,如openat、fstatat等,書中
原创 How to think like a Computer Scientist: 課後習題第十八章9-11
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # #